f_000005 313 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933
  1. // node_modules/@vue/shared/dist/shared.esm-bundler.js
  2. function makeMap(str, expectsLowerCase) {
  3. const map2 = /* @__PURE__ */ Object.create(null);
  4. const list = str.split(",");
  5. for (let i = 0; i < list.length; i++) {
  6. map2[list[i]] = true;
  7. }
  8. return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val];
  9. }
  10. var EMPTY_OBJ = true ? Object.freeze({}) : {};
  11. var EMPTY_ARR = true ? Object.freeze([]) : [];
  12. var NOOP = () => {
  13. };
  14. var NO = () => false;
  15. var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
  16. (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  17. var isModelListener = (key) => key.startsWith("onUpdate:");
  18. var extend = Object.assign;
  19. var remove = (arr, el) => {
  20. const i = arr.indexOf(el);
  21. if (i > -1) {
  22. arr.splice(i, 1);
  23. }
  24. };
  25. var hasOwnProperty = Object.prototype.hasOwnProperty;
  26. var hasOwn = (val, key) => hasOwnProperty.call(val, key);
  27. var isArray = Array.isArray;
  28. var isMap = (val) => toTypeString(val) === "[object Map]";
  29. var isSet = (val) => toTypeString(val) === "[object Set]";
  30. var isDate = (val) => toTypeString(val) === "[object Date]";
  31. var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  32. var isFunction = (val) => typeof val === "function";
  33. var isString = (val) => typeof val === "string";
  34. var isSymbol = (val) => typeof val === "symbol";
  35. var isObject = (val) => val !== null && typeof val === "object";
  36. var isPromise = (val) => {
  37. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  38. };
  39. var objectToString = Object.prototype.toString;
  40. var toTypeString = (value) => objectToString.call(value);
  41. var toRawType = (value) => {
  42. return toTypeString(value).slice(8, -1);
  43. };
  44. var isPlainObject = (val) => toTypeString(val) === "[object Object]";
  45. var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  46. var isReservedProp = makeMap(
  47. // the leading comma is intentional so empty string "" is also included
  48. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  49. );
  50. var isBuiltInDirective = makeMap(
  51. "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
  52. );
  53. var cacheStringFunction = (fn) => {
  54. const cache = /* @__PURE__ */ Object.create(null);
  55. return (str) => {
  56. const hit = cache[str];
  57. return hit || (cache[str] = fn(str));
  58. };
  59. };
  60. var camelizeRE = /-(\w)/g;
  61. var camelize = cacheStringFunction((str) => {
  62. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  63. });
  64. var hyphenateRE = /\B([A-Z])/g;
  65. var hyphenate = cacheStringFunction(
  66. (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
  67. );
  68. var capitalize = cacheStringFunction((str) => {
  69. return str.charAt(0).toUpperCase() + str.slice(1);
  70. });
  71. var toHandlerKey = cacheStringFunction((str) => {
  72. const s = str ? `on${capitalize(str)}` : ``;
  73. return s;
  74. });
  75. var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  76. var invokeArrayFns = (fns, arg) => {
  77. for (let i = 0; i < fns.length; i++) {
  78. fns[i](arg);
  79. }
  80. };
  81. var def = (obj, key, value) => {
  82. Object.defineProperty(obj, key, {
  83. configurable: true,
  84. enumerable: false,
  85. value
  86. });
  87. };
  88. var looseToNumber = (val) => {
  89. const n = parseFloat(val);
  90. return isNaN(n) ? val : n;
  91. };
  92. var toNumber = (val) => {
  93. const n = isString(val) ? Number(val) : NaN;
  94. return isNaN(n) ? val : n;
  95. };
  96. var _globalThis;
  97. var getGlobalThis = () => {
  98. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  99. };
  100. 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";
  101. var isGloballyAllowed = makeMap(GLOBALS_ALLOWED);
  102. function normalizeStyle(value) {
  103. if (isArray(value)) {
  104. const res = {};
  105. for (let i = 0; i < value.length; i++) {
  106. const item = value[i];
  107. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  108. if (normalized) {
  109. for (const key in normalized) {
  110. res[key] = normalized[key];
  111. }
  112. }
  113. }
  114. return res;
  115. } else if (isString(value) || isObject(value)) {
  116. return value;
  117. }
  118. }
  119. var listDelimiterRE = /;(?![^(]*\))/g;
  120. var propertyDelimiterRE = /:([^]+)/;
  121. var styleCommentRE = /\/\*[^]*?\*\//g;
  122. function parseStringStyle(cssText) {
  123. const ret = {};
  124. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  125. if (item) {
  126. const tmp = item.split(propertyDelimiterRE);
  127. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  128. }
  129. });
  130. return ret;
  131. }
  132. function normalizeClass(value) {
  133. let res = "";
  134. if (isString(value)) {
  135. res = value;
  136. } else if (isArray(value)) {
  137. for (let i = 0; i < value.length; i++) {
  138. const normalized = normalizeClass(value[i]);
  139. if (normalized) {
  140. res += normalized + " ";
  141. }
  142. }
  143. } else if (isObject(value)) {
  144. for (const name in value) {
  145. if (value[name]) {
  146. res += name + " ";
  147. }
  148. }
  149. }
  150. return res.trim();
  151. }
  152. function normalizeProps(props) {
  153. if (!props)
  154. return null;
  155. let { class: klass, style } = props;
  156. if (klass && !isString(klass)) {
  157. props.class = normalizeClass(klass);
  158. }
  159. if (style) {
  160. props.style = normalizeStyle(style);
  161. }
  162. return props;
  163. }
  164. 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";
  165. 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";
  166. var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
  167. var isHTMLTag = makeMap(HTML_TAGS);
  168. var isSVGTag = makeMap(SVG_TAGS);
  169. var isVoidTag = makeMap(VOID_TAGS);
  170. var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  171. var isSpecialBooleanAttr = makeMap(specialBooleanAttrs);
  172. var isBooleanAttr = makeMap(
  173. specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
  174. );
  175. function includeBooleanAttr(value) {
  176. return !!value || value === "";
  177. }
  178. var isKnownHtmlAttr = makeMap(
  179. `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`
  180. );
  181. var isKnownSvgAttr = makeMap(
  182. `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`
  183. );
  184. function looseCompareArrays(a, b) {
  185. if (a.length !== b.length)
  186. return false;
  187. let equal = true;
  188. for (let i = 0; equal && i < a.length; i++) {
  189. equal = looseEqual(a[i], b[i]);
  190. }
  191. return equal;
  192. }
  193. function looseEqual(a, b) {
  194. if (a === b)
  195. return true;
  196. let aValidType = isDate(a);
  197. let bValidType = isDate(b);
  198. if (aValidType || bValidType) {
  199. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  200. }
  201. aValidType = isSymbol(a);
  202. bValidType = isSymbol(b);
  203. if (aValidType || bValidType) {
  204. return a === b;
  205. }
  206. aValidType = isArray(a);
  207. bValidType = isArray(b);
  208. if (aValidType || bValidType) {
  209. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  210. }
  211. aValidType = isObject(a);
  212. bValidType = isObject(b);
  213. if (aValidType || bValidType) {
  214. if (!aValidType || !bValidType) {
  215. return false;
  216. }
  217. const aKeysCount = Object.keys(a).length;
  218. const bKeysCount = Object.keys(b).length;
  219. if (aKeysCount !== bKeysCount) {
  220. return false;
  221. }
  222. for (const key in a) {
  223. const aHasKey = a.hasOwnProperty(key);
  224. const bHasKey = b.hasOwnProperty(key);
  225. if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
  226. return false;
  227. }
  228. }
  229. }
  230. return String(a) === String(b);
  231. }
  232. function looseIndexOf(arr, val) {
  233. return arr.findIndex((item) => looseEqual(item, val));
  234. }
  235. var toDisplayString = (val) => {
  236. return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
  237. };
  238. var replacer = (_key, val) => {
  239. if (val && val.__v_isRef) {
  240. return replacer(_key, val.value);
  241. } else if (isMap(val)) {
  242. return {
  243. [`Map(${val.size})`]: [...val.entries()].reduce(
  244. (entries, [key, val2], i) => {
  245. entries[stringifySymbol(key, i) + " =>"] = val2;
  246. return entries;
  247. },
  248. {}
  249. )
  250. };
  251. } else if (isSet(val)) {
  252. return {
  253. [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
  254. };
  255. } else if (isSymbol(val)) {
  256. return stringifySymbol(val);
  257. } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  258. return String(val);
  259. }
  260. return val;
  261. };
  262. var stringifySymbol = (v, i = "") => {
  263. var _a;
  264. return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
  265. };
  266. // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  267. function warn(msg, ...args) {
  268. console.warn(`[Vue warn] ${msg}`, ...args);
  269. }
  270. var activeEffectScope;
  271. var EffectScope = class {
  272. constructor(detached = false) {
  273. this.detached = detached;
  274. this._active = true;
  275. this.effects = [];
  276. this.cleanups = [];
  277. this.parent = activeEffectScope;
  278. if (!detached && activeEffectScope) {
  279. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  280. this
  281. ) - 1;
  282. }
  283. }
  284. get active() {
  285. return this._active;
  286. }
  287. run(fn) {
  288. if (this._active) {
  289. const currentEffectScope = activeEffectScope;
  290. try {
  291. activeEffectScope = this;
  292. return fn();
  293. } finally {
  294. activeEffectScope = currentEffectScope;
  295. }
  296. } else if (true) {
  297. warn(`cannot run an inactive effect scope.`);
  298. }
  299. }
  300. /**
  301. * This should only be called on non-detached scopes
  302. * @internal
  303. */
  304. on() {
  305. activeEffectScope = this;
  306. }
  307. /**
  308. * This should only be called on non-detached scopes
  309. * @internal
  310. */
  311. off() {
  312. activeEffectScope = this.parent;
  313. }
  314. stop(fromParent) {
  315. if (this._active) {
  316. let i, l;
  317. for (i = 0, l = this.effects.length; i < l; i++) {
  318. this.effects[i].stop();
  319. }
  320. for (i = 0, l = this.cleanups.length; i < l; i++) {
  321. this.cleanups[i]();
  322. }
  323. if (this.scopes) {
  324. for (i = 0, l = this.scopes.length; i < l; i++) {
  325. this.scopes[i].stop(true);
  326. }
  327. }
  328. if (!this.detached && this.parent && !fromParent) {
  329. const last = this.parent.scopes.pop();
  330. if (last && last !== this) {
  331. this.parent.scopes[this.index] = last;
  332. last.index = this.index;
  333. }
  334. }
  335. this.parent = void 0;
  336. this._active = false;
  337. }
  338. }
  339. };
  340. function effectScope(detached) {
  341. return new EffectScope(detached);
  342. }
  343. function recordEffectScope(effect2, scope = activeEffectScope) {
  344. if (scope && scope.active) {
  345. scope.effects.push(effect2);
  346. }
  347. }
  348. function getCurrentScope() {
  349. return activeEffectScope;
  350. }
  351. function onScopeDispose(fn) {
  352. if (activeEffectScope) {
  353. activeEffectScope.cleanups.push(fn);
  354. } else if (true) {
  355. warn(
  356. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  357. );
  358. }
  359. }
  360. var createDep = (effects) => {
  361. const dep = new Set(effects);
  362. dep.w = 0;
  363. dep.n = 0;
  364. return dep;
  365. };
  366. var wasTracked = (dep) => (dep.w & trackOpBit) > 0;
  367. var newTracked = (dep) => (dep.n & trackOpBit) > 0;
  368. var initDepMarkers = ({ deps }) => {
  369. if (deps.length) {
  370. for (let i = 0; i < deps.length; i++) {
  371. deps[i].w |= trackOpBit;
  372. }
  373. }
  374. };
  375. var finalizeDepMarkers = (effect2) => {
  376. const { deps } = effect2;
  377. if (deps.length) {
  378. let ptr = 0;
  379. for (let i = 0; i < deps.length; i++) {
  380. const dep = deps[i];
  381. if (wasTracked(dep) && !newTracked(dep)) {
  382. dep.delete(effect2);
  383. } else {
  384. deps[ptr++] = dep;
  385. }
  386. dep.w &= ~trackOpBit;
  387. dep.n &= ~trackOpBit;
  388. }
  389. deps.length = ptr;
  390. }
  391. };
  392. var targetMap = /* @__PURE__ */ new WeakMap();
  393. var effectTrackDepth = 0;
  394. var trackOpBit = 1;
  395. var maxMarkerBits = 30;
  396. var activeEffect;
  397. var ITERATE_KEY = Symbol(true ? "iterate" : "");
  398. var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : "");
  399. var ReactiveEffect = class {
  400. constructor(fn, scheduler = null, scope) {
  401. this.fn = fn;
  402. this.scheduler = scheduler;
  403. this.active = true;
  404. this.deps = [];
  405. this.parent = void 0;
  406. recordEffectScope(this, scope);
  407. }
  408. run() {
  409. if (!this.active) {
  410. return this.fn();
  411. }
  412. let parent = activeEffect;
  413. let lastShouldTrack = shouldTrack;
  414. while (parent) {
  415. if (parent === this) {
  416. return;
  417. }
  418. parent = parent.parent;
  419. }
  420. try {
  421. this.parent = activeEffect;
  422. activeEffect = this;
  423. shouldTrack = true;
  424. trackOpBit = 1 << ++effectTrackDepth;
  425. if (effectTrackDepth <= maxMarkerBits) {
  426. initDepMarkers(this);
  427. } else {
  428. cleanupEffect(this);
  429. }
  430. return this.fn();
  431. } finally {
  432. if (effectTrackDepth <= maxMarkerBits) {
  433. finalizeDepMarkers(this);
  434. }
  435. trackOpBit = 1 << --effectTrackDepth;
  436. activeEffect = this.parent;
  437. shouldTrack = lastShouldTrack;
  438. this.parent = void 0;
  439. if (this.deferStop) {
  440. this.stop();
  441. }
  442. }
  443. }
  444. stop() {
  445. if (activeEffect === this) {
  446. this.deferStop = true;
  447. } else if (this.active) {
  448. cleanupEffect(this);
  449. if (this.onStop) {
  450. this.onStop();
  451. }
  452. this.active = false;
  453. }
  454. }
  455. };
  456. function cleanupEffect(effect2) {
  457. const { deps } = effect2;
  458. if (deps.length) {
  459. for (let i = 0; i < deps.length; i++) {
  460. deps[i].delete(effect2);
  461. }
  462. deps.length = 0;
  463. }
  464. }
  465. function effect(fn, options) {
  466. if (fn.effect instanceof ReactiveEffect) {
  467. fn = fn.effect.fn;
  468. }
  469. const _effect = new ReactiveEffect(fn);
  470. if (options) {
  471. extend(_effect, options);
  472. if (options.scope)
  473. recordEffectScope(_effect, options.scope);
  474. }
  475. if (!options || !options.lazy) {
  476. _effect.run();
  477. }
  478. const runner = _effect.run.bind(_effect);
  479. runner.effect = _effect;
  480. return runner;
  481. }
  482. function stop(runner) {
  483. runner.effect.stop();
  484. }
  485. var shouldTrack = true;
  486. var trackStack = [];
  487. function pauseTracking() {
  488. trackStack.push(shouldTrack);
  489. shouldTrack = false;
  490. }
  491. function resetTracking() {
  492. const last = trackStack.pop();
  493. shouldTrack = last === void 0 ? true : last;
  494. }
  495. function track(target, type, key) {
  496. if (shouldTrack && activeEffect) {
  497. let depsMap = targetMap.get(target);
  498. if (!depsMap) {
  499. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  500. }
  501. let dep = depsMap.get(key);
  502. if (!dep) {
  503. depsMap.set(key, dep = createDep());
  504. }
  505. const eventInfo = true ? { effect: activeEffect, target, type, key } : void 0;
  506. trackEffects(dep, eventInfo);
  507. }
  508. }
  509. function trackEffects(dep, debuggerEventExtraInfo) {
  510. let shouldTrack2 = false;
  511. if (effectTrackDepth <= maxMarkerBits) {
  512. if (!newTracked(dep)) {
  513. dep.n |= trackOpBit;
  514. shouldTrack2 = !wasTracked(dep);
  515. }
  516. } else {
  517. shouldTrack2 = !dep.has(activeEffect);
  518. }
  519. if (shouldTrack2) {
  520. dep.add(activeEffect);
  521. activeEffect.deps.push(dep);
  522. if (activeEffect.onTrack) {
  523. activeEffect.onTrack(
  524. extend(
  525. {
  526. effect: activeEffect
  527. },
  528. debuggerEventExtraInfo
  529. )
  530. );
  531. }
  532. }
  533. }
  534. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  535. const depsMap = targetMap.get(target);
  536. if (!depsMap) {
  537. return;
  538. }
  539. let deps = [];
  540. if (type === "clear") {
  541. deps = [...depsMap.values()];
  542. } else if (key === "length" && isArray(target)) {
  543. const newLength = Number(newValue);
  544. depsMap.forEach((dep, key2) => {
  545. if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
  546. deps.push(dep);
  547. }
  548. });
  549. } else {
  550. if (key !== void 0) {
  551. deps.push(depsMap.get(key));
  552. }
  553. switch (type) {
  554. case "add":
  555. if (!isArray(target)) {
  556. deps.push(depsMap.get(ITERATE_KEY));
  557. if (isMap(target)) {
  558. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  559. }
  560. } else if (isIntegerKey(key)) {
  561. deps.push(depsMap.get("length"));
  562. }
  563. break;
  564. case "delete":
  565. if (!isArray(target)) {
  566. deps.push(depsMap.get(ITERATE_KEY));
  567. if (isMap(target)) {
  568. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  569. }
  570. }
  571. break;
  572. case "set":
  573. if (isMap(target)) {
  574. deps.push(depsMap.get(ITERATE_KEY));
  575. }
  576. break;
  577. }
  578. }
  579. const eventInfo = true ? { target, type, key, newValue, oldValue, oldTarget } : void 0;
  580. if (deps.length === 1) {
  581. if (deps[0]) {
  582. if (true) {
  583. triggerEffects(deps[0], eventInfo);
  584. } else {
  585. triggerEffects(deps[0]);
  586. }
  587. }
  588. } else {
  589. const effects = [];
  590. for (const dep of deps) {
  591. if (dep) {
  592. effects.push(...dep);
  593. }
  594. }
  595. if (true) {
  596. triggerEffects(createDep(effects), eventInfo);
  597. } else {
  598. triggerEffects(createDep(effects));
  599. }
  600. }
  601. }
  602. function triggerEffects(dep, debuggerEventExtraInfo) {
  603. const effects = isArray(dep) ? dep : [...dep];
  604. for (const effect2 of effects) {
  605. if (effect2.computed) {
  606. triggerEffect(effect2, debuggerEventExtraInfo);
  607. }
  608. }
  609. for (const effect2 of effects) {
  610. if (!effect2.computed) {
  611. triggerEffect(effect2, debuggerEventExtraInfo);
  612. }
  613. }
  614. }
  615. function triggerEffect(effect2, debuggerEventExtraInfo) {
  616. if (effect2 !== activeEffect || effect2.allowRecurse) {
  617. if (effect2.onTrigger) {
  618. effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));
  619. }
  620. if (effect2.scheduler) {
  621. effect2.scheduler();
  622. } else {
  623. effect2.run();
  624. }
  625. }
  626. }
  627. function getDepFromReactive(object, key) {
  628. var _a;
  629. return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
  630. }
  631. var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
  632. var builtInSymbols = new Set(
  633. Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  634. );
  635. var arrayInstrumentations = createArrayInstrumentations();
  636. function createArrayInstrumentations() {
  637. const instrumentations = {};
  638. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  639. instrumentations[key] = function(...args) {
  640. const arr = toRaw(this);
  641. for (let i = 0, l = this.length; i < l; i++) {
  642. track(arr, "get", i + "");
  643. }
  644. const res = arr[key](...args);
  645. if (res === -1 || res === false) {
  646. return arr[key](...args.map(toRaw));
  647. } else {
  648. return res;
  649. }
  650. };
  651. });
  652. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  653. instrumentations[key] = function(...args) {
  654. pauseTracking();
  655. const res = toRaw(this)[key].apply(this, args);
  656. resetTracking();
  657. return res;
  658. };
  659. });
  660. return instrumentations;
  661. }
  662. function hasOwnProperty2(key) {
  663. const obj = toRaw(this);
  664. track(obj, "has", key);
  665. return obj.hasOwnProperty(key);
  666. }
  667. var BaseReactiveHandler = class {
  668. constructor(_isReadonly = false, _shallow = false) {
  669. this._isReadonly = _isReadonly;
  670. this._shallow = _shallow;
  671. }
  672. get(target, key, receiver) {
  673. const isReadonly2 = this._isReadonly, shallow = this._shallow;
  674. if (key === "__v_isReactive") {
  675. return !isReadonly2;
  676. } else if (key === "__v_isReadonly") {
  677. return isReadonly2;
  678. } else if (key === "__v_isShallow") {
  679. return shallow;
  680. } else if (key === "__v_raw") {
  681. if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  682. // this means the reciever is a user proxy of the reactive proxy
  683. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  684. return target;
  685. }
  686. return;
  687. }
  688. const targetIsArray = isArray(target);
  689. if (!isReadonly2) {
  690. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  691. return Reflect.get(arrayInstrumentations, key, receiver);
  692. }
  693. if (key === "hasOwnProperty") {
  694. return hasOwnProperty2;
  695. }
  696. }
  697. const res = Reflect.get(target, key, receiver);
  698. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  699. return res;
  700. }
  701. if (!isReadonly2) {
  702. track(target, "get", key);
  703. }
  704. if (shallow) {
  705. return res;
  706. }
  707. if (isRef(res)) {
  708. return targetIsArray && isIntegerKey(key) ? res : res.value;
  709. }
  710. if (isObject(res)) {
  711. return isReadonly2 ? readonly(res) : reactive(res);
  712. }
  713. return res;
  714. }
  715. };
  716. var MutableReactiveHandler = class extends BaseReactiveHandler {
  717. constructor(shallow = false) {
  718. super(false, shallow);
  719. }
  720. set(target, key, value, receiver) {
  721. let oldValue = target[key];
  722. if (!this._shallow) {
  723. const isOldValueReadonly = isReadonly(oldValue);
  724. if (!isShallow(value) && !isReadonly(value)) {
  725. oldValue = toRaw(oldValue);
  726. value = toRaw(value);
  727. }
  728. if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
  729. if (isOldValueReadonly) {
  730. return false;
  731. } else {
  732. oldValue.value = value;
  733. return true;
  734. }
  735. }
  736. }
  737. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  738. const result = Reflect.set(target, key, value, receiver);
  739. if (target === toRaw(receiver)) {
  740. if (!hadKey) {
  741. trigger(target, "add", key, value);
  742. } else if (hasChanged(value, oldValue)) {
  743. trigger(target, "set", key, value, oldValue);
  744. }
  745. }
  746. return result;
  747. }
  748. deleteProperty(target, key) {
  749. const hadKey = hasOwn(target, key);
  750. const oldValue = target[key];
  751. const result = Reflect.deleteProperty(target, key);
  752. if (result && hadKey) {
  753. trigger(target, "delete", key, void 0, oldValue);
  754. }
  755. return result;
  756. }
  757. has(target, key) {
  758. const result = Reflect.has(target, key);
  759. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  760. track(target, "has", key);
  761. }
  762. return result;
  763. }
  764. ownKeys(target) {
  765. track(
  766. target,
  767. "iterate",
  768. isArray(target) ? "length" : ITERATE_KEY
  769. );
  770. return Reflect.ownKeys(target);
  771. }
  772. };
  773. var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  774. constructor(shallow = false) {
  775. super(true, shallow);
  776. }
  777. set(target, key) {
  778. if (true) {
  779. warn(
  780. `Set operation on key "${String(key)}" failed: target is readonly.`,
  781. target
  782. );
  783. }
  784. return true;
  785. }
  786. deleteProperty(target, key) {
  787. if (true) {
  788. warn(
  789. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  790. target
  791. );
  792. }
  793. return true;
  794. }
  795. };
  796. var mutableHandlers = new MutableReactiveHandler();
  797. var readonlyHandlers = new ReadonlyReactiveHandler();
  798. var shallowReactiveHandlers = new MutableReactiveHandler(
  799. true
  800. );
  801. var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
  802. var toShallow = (value) => value;
  803. var getProto = (v) => Reflect.getPrototypeOf(v);
  804. function get(target, key, isReadonly2 = false, isShallow3 = false) {
  805. target = target["__v_raw"];
  806. const rawTarget = toRaw(target);
  807. const rawKey = toRaw(key);
  808. if (!isReadonly2) {
  809. if (hasChanged(key, rawKey)) {
  810. track(rawTarget, "get", key);
  811. }
  812. track(rawTarget, "get", rawKey);
  813. }
  814. const { has: has2 } = getProto(rawTarget);
  815. const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  816. if (has2.call(rawTarget, key)) {
  817. return wrap(target.get(key));
  818. } else if (has2.call(rawTarget, rawKey)) {
  819. return wrap(target.get(rawKey));
  820. } else if (target !== rawTarget) {
  821. target.get(key);
  822. }
  823. }
  824. function has(key, isReadonly2 = false) {
  825. const target = this["__v_raw"];
  826. const rawTarget = toRaw(target);
  827. const rawKey = toRaw(key);
  828. if (!isReadonly2) {
  829. if (hasChanged(key, rawKey)) {
  830. track(rawTarget, "has", key);
  831. }
  832. track(rawTarget, "has", rawKey);
  833. }
  834. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  835. }
  836. function size(target, isReadonly2 = false) {
  837. target = target["__v_raw"];
  838. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  839. return Reflect.get(target, "size", target);
  840. }
  841. function add(value) {
  842. value = toRaw(value);
  843. const target = toRaw(this);
  844. const proto = getProto(target);
  845. const hadKey = proto.has.call(target, value);
  846. if (!hadKey) {
  847. target.add(value);
  848. trigger(target, "add", value, value);
  849. }
  850. return this;
  851. }
  852. function set(key, value) {
  853. value = toRaw(value);
  854. const target = toRaw(this);
  855. const { has: has2, get: get2 } = getProto(target);
  856. let hadKey = has2.call(target, key);
  857. if (!hadKey) {
  858. key = toRaw(key);
  859. hadKey = has2.call(target, key);
  860. } else if (true) {
  861. checkIdentityKeys(target, has2, key);
  862. }
  863. const oldValue = get2.call(target, key);
  864. target.set(key, value);
  865. if (!hadKey) {
  866. trigger(target, "add", key, value);
  867. } else if (hasChanged(value, oldValue)) {
  868. trigger(target, "set", key, value, oldValue);
  869. }
  870. return this;
  871. }
  872. function deleteEntry(key) {
  873. const target = toRaw(this);
  874. const { has: has2, get: get2 } = getProto(target);
  875. let hadKey = has2.call(target, key);
  876. if (!hadKey) {
  877. key = toRaw(key);
  878. hadKey = has2.call(target, key);
  879. } else if (true) {
  880. checkIdentityKeys(target, has2, key);
  881. }
  882. const oldValue = get2 ? get2.call(target, key) : void 0;
  883. const result = target.delete(key);
  884. if (hadKey) {
  885. trigger(target, "delete", key, void 0, oldValue);
  886. }
  887. return result;
  888. }
  889. function clear() {
  890. const target = toRaw(this);
  891. const hadItems = target.size !== 0;
  892. const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
  893. const result = target.clear();
  894. if (hadItems) {
  895. trigger(target, "clear", void 0, void 0, oldTarget);
  896. }
  897. return result;
  898. }
  899. function createForEach(isReadonly2, isShallow3) {
  900. return function forEach(callback, thisArg) {
  901. const observed = this;
  902. const target = observed["__v_raw"];
  903. const rawTarget = toRaw(target);
  904. const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  905. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  906. return target.forEach((value, key) => {
  907. return callback.call(thisArg, wrap(value), wrap(key), observed);
  908. });
  909. };
  910. }
  911. function createIterableMethod(method, isReadonly2, isShallow3) {
  912. return function(...args) {
  913. const target = this["__v_raw"];
  914. const rawTarget = toRaw(target);
  915. const targetIsMap = isMap(rawTarget);
  916. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  917. const isKeyOnly = method === "keys" && targetIsMap;
  918. const innerIterator = target[method](...args);
  919. const wrap = isShallow3 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  920. !isReadonly2 && track(
  921. rawTarget,
  922. "iterate",
  923. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  924. );
  925. return {
  926. // iterator protocol
  927. next() {
  928. const { value, done } = innerIterator.next();
  929. return done ? { value, done } : {
  930. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  931. done
  932. };
  933. },
  934. // iterable protocol
  935. [Symbol.iterator]() {
  936. return this;
  937. }
  938. };
  939. };
  940. }
  941. function createReadonlyMethod(type) {
  942. return function(...args) {
  943. if (true) {
  944. const key = args[0] ? `on key "${args[0]}" ` : ``;
  945. console.warn(
  946. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  947. toRaw(this)
  948. );
  949. }
  950. return type === "delete" ? false : type === "clear" ? void 0 : this;
  951. };
  952. }
  953. function createInstrumentations() {
  954. const mutableInstrumentations2 = {
  955. get(key) {
  956. return get(this, key);
  957. },
  958. get size() {
  959. return size(this);
  960. },
  961. has,
  962. add,
  963. set,
  964. delete: deleteEntry,
  965. clear,
  966. forEach: createForEach(false, false)
  967. };
  968. const shallowInstrumentations2 = {
  969. get(key) {
  970. return get(this, key, false, true);
  971. },
  972. get size() {
  973. return size(this);
  974. },
  975. has,
  976. add,
  977. set,
  978. delete: deleteEntry,
  979. clear,
  980. forEach: createForEach(false, true)
  981. };
  982. const readonlyInstrumentations2 = {
  983. get(key) {
  984. return get(this, key, true);
  985. },
  986. get size() {
  987. return size(this, true);
  988. },
  989. has(key) {
  990. return has.call(this, key, true);
  991. },
  992. add: createReadonlyMethod("add"),
  993. set: createReadonlyMethod("set"),
  994. delete: createReadonlyMethod("delete"),
  995. clear: createReadonlyMethod("clear"),
  996. forEach: createForEach(true, false)
  997. };
  998. const shallowReadonlyInstrumentations2 = {
  999. get(key) {
  1000. return get(this, key, true, true);
  1001. },
  1002. get size() {
  1003. return size(this, true);
  1004. },
  1005. has(key) {
  1006. return has.call(this, key, true);
  1007. },
  1008. add: createReadonlyMethod("add"),
  1009. set: createReadonlyMethod("set"),
  1010. delete: createReadonlyMethod("delete"),
  1011. clear: createReadonlyMethod("clear"),
  1012. forEach: createForEach(true, true)
  1013. };
  1014. const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
  1015. iteratorMethods.forEach((method) => {
  1016. mutableInstrumentations2[method] = createIterableMethod(
  1017. method,
  1018. false,
  1019. false
  1020. );
  1021. readonlyInstrumentations2[method] = createIterableMethod(
  1022. method,
  1023. true,
  1024. false
  1025. );
  1026. shallowInstrumentations2[method] = createIterableMethod(
  1027. method,
  1028. false,
  1029. true
  1030. );
  1031. shallowReadonlyInstrumentations2[method] = createIterableMethod(
  1032. method,
  1033. true,
  1034. true
  1035. );
  1036. });
  1037. return [
  1038. mutableInstrumentations2,
  1039. readonlyInstrumentations2,
  1040. shallowInstrumentations2,
  1041. shallowReadonlyInstrumentations2
  1042. ];
  1043. }
  1044. var [
  1045. mutableInstrumentations,
  1046. readonlyInstrumentations,
  1047. shallowInstrumentations,
  1048. shallowReadonlyInstrumentations
  1049. ] = createInstrumentations();
  1050. function createInstrumentationGetter(isReadonly2, shallow) {
  1051. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  1052. return (target, key, receiver) => {
  1053. if (key === "__v_isReactive") {
  1054. return !isReadonly2;
  1055. } else if (key === "__v_isReadonly") {
  1056. return isReadonly2;
  1057. } else if (key === "__v_raw") {
  1058. return target;
  1059. }
  1060. return Reflect.get(
  1061. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  1062. key,
  1063. receiver
  1064. );
  1065. };
  1066. }
  1067. var mutableCollectionHandlers = {
  1068. get: createInstrumentationGetter(false, false)
  1069. };
  1070. var shallowCollectionHandlers = {
  1071. get: createInstrumentationGetter(false, true)
  1072. };
  1073. var readonlyCollectionHandlers = {
  1074. get: createInstrumentationGetter(true, false)
  1075. };
  1076. var shallowReadonlyCollectionHandlers = {
  1077. get: createInstrumentationGetter(true, true)
  1078. };
  1079. function checkIdentityKeys(target, has2, key) {
  1080. const rawKey = toRaw(key);
  1081. if (rawKey !== key && has2.call(target, rawKey)) {
  1082. const type = toRawType(target);
  1083. console.warn(
  1084. `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.`
  1085. );
  1086. }
  1087. }
  1088. var reactiveMap = /* @__PURE__ */ new WeakMap();
  1089. var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1090. var readonlyMap = /* @__PURE__ */ new WeakMap();
  1091. var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1092. function targetTypeMap(rawType) {
  1093. switch (rawType) {
  1094. case "Object":
  1095. case "Array":
  1096. return 1;
  1097. case "Map":
  1098. case "Set":
  1099. case "WeakMap":
  1100. case "WeakSet":
  1101. return 2;
  1102. default:
  1103. return 0;
  1104. }
  1105. }
  1106. function getTargetType(value) {
  1107. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1108. }
  1109. function reactive(target) {
  1110. if (isReadonly(target)) {
  1111. return target;
  1112. }
  1113. return createReactiveObject(
  1114. target,
  1115. false,
  1116. mutableHandlers,
  1117. mutableCollectionHandlers,
  1118. reactiveMap
  1119. );
  1120. }
  1121. function shallowReactive(target) {
  1122. return createReactiveObject(
  1123. target,
  1124. false,
  1125. shallowReactiveHandlers,
  1126. shallowCollectionHandlers,
  1127. shallowReactiveMap
  1128. );
  1129. }
  1130. function readonly(target) {
  1131. return createReactiveObject(
  1132. target,
  1133. true,
  1134. readonlyHandlers,
  1135. readonlyCollectionHandlers,
  1136. readonlyMap
  1137. );
  1138. }
  1139. function shallowReadonly(target) {
  1140. return createReactiveObject(
  1141. target,
  1142. true,
  1143. shallowReadonlyHandlers,
  1144. shallowReadonlyCollectionHandlers,
  1145. shallowReadonlyMap
  1146. );
  1147. }
  1148. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1149. if (!isObject(target)) {
  1150. if (true) {
  1151. console.warn(`value cannot be made reactive: ${String(target)}`);
  1152. }
  1153. return target;
  1154. }
  1155. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  1156. return target;
  1157. }
  1158. const existingProxy = proxyMap.get(target);
  1159. if (existingProxy) {
  1160. return existingProxy;
  1161. }
  1162. const targetType = getTargetType(target);
  1163. if (targetType === 0) {
  1164. return target;
  1165. }
  1166. const proxy = new Proxy(
  1167. target,
  1168. targetType === 2 ? collectionHandlers : baseHandlers
  1169. );
  1170. proxyMap.set(target, proxy);
  1171. return proxy;
  1172. }
  1173. function isReactive(value) {
  1174. if (isReadonly(value)) {
  1175. return isReactive(value["__v_raw"]);
  1176. }
  1177. return !!(value && value["__v_isReactive"]);
  1178. }
  1179. function isReadonly(value) {
  1180. return !!(value && value["__v_isReadonly"]);
  1181. }
  1182. function isShallow(value) {
  1183. return !!(value && value["__v_isShallow"]);
  1184. }
  1185. function isProxy(value) {
  1186. return isReactive(value) || isReadonly(value);
  1187. }
  1188. function toRaw(observed) {
  1189. const raw = observed && observed["__v_raw"];
  1190. return raw ? toRaw(raw) : observed;
  1191. }
  1192. function markRaw(value) {
  1193. def(value, "__v_skip", true);
  1194. return value;
  1195. }
  1196. var toReactive = (value) => isObject(value) ? reactive(value) : value;
  1197. var toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1198. function trackRefValue(ref2) {
  1199. if (shouldTrack && activeEffect) {
  1200. ref2 = toRaw(ref2);
  1201. if (true) {
  1202. trackEffects(ref2.dep || (ref2.dep = createDep()), {
  1203. target: ref2,
  1204. type: "get",
  1205. key: "value"
  1206. });
  1207. } else {
  1208. trackEffects(ref2.dep || (ref2.dep = createDep()));
  1209. }
  1210. }
  1211. }
  1212. function triggerRefValue(ref2, newVal) {
  1213. ref2 = toRaw(ref2);
  1214. const dep = ref2.dep;
  1215. if (dep) {
  1216. if (true) {
  1217. triggerEffects(dep, {
  1218. target: ref2,
  1219. type: "set",
  1220. key: "value",
  1221. newValue: newVal
  1222. });
  1223. } else {
  1224. triggerEffects(dep);
  1225. }
  1226. }
  1227. }
  1228. function isRef(r) {
  1229. return !!(r && r.__v_isRef === true);
  1230. }
  1231. function ref(value) {
  1232. return createRef(value, false);
  1233. }
  1234. function shallowRef(value) {
  1235. return createRef(value, true);
  1236. }
  1237. function createRef(rawValue, shallow) {
  1238. if (isRef(rawValue)) {
  1239. return rawValue;
  1240. }
  1241. return new RefImpl(rawValue, shallow);
  1242. }
  1243. var RefImpl = class {
  1244. constructor(value, __v_isShallow) {
  1245. this.__v_isShallow = __v_isShallow;
  1246. this.dep = void 0;
  1247. this.__v_isRef = true;
  1248. this._rawValue = __v_isShallow ? value : toRaw(value);
  1249. this._value = __v_isShallow ? value : toReactive(value);
  1250. }
  1251. get value() {
  1252. trackRefValue(this);
  1253. return this._value;
  1254. }
  1255. set value(newVal) {
  1256. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  1257. newVal = useDirectValue ? newVal : toRaw(newVal);
  1258. if (hasChanged(newVal, this._rawValue)) {
  1259. this._rawValue = newVal;
  1260. this._value = useDirectValue ? newVal : toReactive(newVal);
  1261. triggerRefValue(this, newVal);
  1262. }
  1263. }
  1264. };
  1265. function triggerRef(ref2) {
  1266. triggerRefValue(ref2, true ? ref2.value : void 0);
  1267. }
  1268. function unref(ref2) {
  1269. return isRef(ref2) ? ref2.value : ref2;
  1270. }
  1271. function toValue(source) {
  1272. return isFunction(source) ? source() : unref(source);
  1273. }
  1274. var shallowUnwrapHandlers = {
  1275. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  1276. set: (target, key, value, receiver) => {
  1277. const oldValue = target[key];
  1278. if (isRef(oldValue) && !isRef(value)) {
  1279. oldValue.value = value;
  1280. return true;
  1281. } else {
  1282. return Reflect.set(target, key, value, receiver);
  1283. }
  1284. }
  1285. };
  1286. function proxyRefs(objectWithRefs) {
  1287. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1288. }
  1289. var CustomRefImpl = class {
  1290. constructor(factory) {
  1291. this.dep = void 0;
  1292. this.__v_isRef = true;
  1293. const { get: get2, set: set2 } = factory(
  1294. () => trackRefValue(this),
  1295. () => triggerRefValue(this)
  1296. );
  1297. this._get = get2;
  1298. this._set = set2;
  1299. }
  1300. get value() {
  1301. return this._get();
  1302. }
  1303. set value(newVal) {
  1304. this._set(newVal);
  1305. }
  1306. };
  1307. function customRef(factory) {
  1308. return new CustomRefImpl(factory);
  1309. }
  1310. function toRefs(object) {
  1311. if (!isProxy(object)) {
  1312. console.warn(`toRefs() expects a reactive object but received a plain one.`);
  1313. }
  1314. const ret = isArray(object) ? new Array(object.length) : {};
  1315. for (const key in object) {
  1316. ret[key] = propertyToRef(object, key);
  1317. }
  1318. return ret;
  1319. }
  1320. var ObjectRefImpl = class {
  1321. constructor(_object, _key, _defaultValue) {
  1322. this._object = _object;
  1323. this._key = _key;
  1324. this._defaultValue = _defaultValue;
  1325. this.__v_isRef = true;
  1326. }
  1327. get value() {
  1328. const val = this._object[this._key];
  1329. return val === void 0 ? this._defaultValue : val;
  1330. }
  1331. set value(newVal) {
  1332. this._object[this._key] = newVal;
  1333. }
  1334. get dep() {
  1335. return getDepFromReactive(toRaw(this._object), this._key);
  1336. }
  1337. };
  1338. var GetterRefImpl = class {
  1339. constructor(_getter) {
  1340. this._getter = _getter;
  1341. this.__v_isRef = true;
  1342. this.__v_isReadonly = true;
  1343. }
  1344. get value() {
  1345. return this._getter();
  1346. }
  1347. };
  1348. function toRef(source, key, defaultValue) {
  1349. if (isRef(source)) {
  1350. return source;
  1351. } else if (isFunction(source)) {
  1352. return new GetterRefImpl(source);
  1353. } else if (isObject(source) && arguments.length > 1) {
  1354. return propertyToRef(source, key, defaultValue);
  1355. } else {
  1356. return ref(source);
  1357. }
  1358. }
  1359. function propertyToRef(source, key, defaultValue) {
  1360. const val = source[key];
  1361. return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1362. }
  1363. var ComputedRefImpl = class {
  1364. constructor(getter, _setter, isReadonly2, isSSR) {
  1365. this._setter = _setter;
  1366. this.dep = void 0;
  1367. this.__v_isRef = true;
  1368. this["__v_isReadonly"] = false;
  1369. this._dirty = true;
  1370. this.effect = new ReactiveEffect(getter, () => {
  1371. if (!this._dirty) {
  1372. this._dirty = true;
  1373. triggerRefValue(this);
  1374. }
  1375. });
  1376. this.effect.computed = this;
  1377. this.effect.active = this._cacheable = !isSSR;
  1378. this["__v_isReadonly"] = isReadonly2;
  1379. }
  1380. get value() {
  1381. const self2 = toRaw(this);
  1382. trackRefValue(self2);
  1383. if (self2._dirty || !self2._cacheable) {
  1384. self2._dirty = false;
  1385. self2._value = self2.effect.run();
  1386. }
  1387. return self2._value;
  1388. }
  1389. set value(newValue) {
  1390. this._setter(newValue);
  1391. }
  1392. };
  1393. function computed(getterOrOptions, debugOptions, isSSR = false) {
  1394. let getter;
  1395. let setter;
  1396. const onlyGetter = isFunction(getterOrOptions);
  1397. if (onlyGetter) {
  1398. getter = getterOrOptions;
  1399. setter = true ? () => {
  1400. console.warn("Write operation failed: computed value is readonly");
  1401. } : NOOP;
  1402. } else {
  1403. getter = getterOrOptions.get;
  1404. setter = getterOrOptions.set;
  1405. }
  1406. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  1407. if (debugOptions && !isSSR) {
  1408. cRef.effect.onTrack = debugOptions.onTrack;
  1409. cRef.effect.onTrigger = debugOptions.onTrigger;
  1410. }
  1411. return cRef;
  1412. }
  1413. var tick = Promise.resolve();
  1414. // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  1415. var stack = [];
  1416. function pushWarningContext(vnode) {
  1417. stack.push(vnode);
  1418. }
  1419. function popWarningContext() {
  1420. stack.pop();
  1421. }
  1422. function warn2(msg, ...args) {
  1423. if (false)
  1424. return;
  1425. pauseTracking();
  1426. const instance = stack.length ? stack[stack.length - 1].component : null;
  1427. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  1428. const trace = getComponentTrace();
  1429. if (appWarnHandler) {
  1430. callWithErrorHandling(
  1431. appWarnHandler,
  1432. instance,
  1433. 11,
  1434. [
  1435. msg + args.join(""),
  1436. instance && instance.proxy,
  1437. trace.map(
  1438. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  1439. ).join("\n"),
  1440. trace
  1441. ]
  1442. );
  1443. } else {
  1444. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  1445. if (trace.length && // avoid spamming console during tests
  1446. true) {
  1447. warnArgs.push(`
  1448. `, ...formatTrace(trace));
  1449. }
  1450. console.warn(...warnArgs);
  1451. }
  1452. resetTracking();
  1453. }
  1454. function getComponentTrace() {
  1455. let currentVNode = stack[stack.length - 1];
  1456. if (!currentVNode) {
  1457. return [];
  1458. }
  1459. const normalizedStack = [];
  1460. while (currentVNode) {
  1461. const last = normalizedStack[0];
  1462. if (last && last.vnode === currentVNode) {
  1463. last.recurseCount++;
  1464. } else {
  1465. normalizedStack.push({
  1466. vnode: currentVNode,
  1467. recurseCount: 0
  1468. });
  1469. }
  1470. const parentInstance = currentVNode.component && currentVNode.component.parent;
  1471. currentVNode = parentInstance && parentInstance.vnode;
  1472. }
  1473. return normalizedStack;
  1474. }
  1475. function formatTrace(trace) {
  1476. const logs = [];
  1477. trace.forEach((entry, i) => {
  1478. logs.push(...i === 0 ? [] : [`
  1479. `], ...formatTraceEntry(entry));
  1480. });
  1481. return logs;
  1482. }
  1483. function formatTraceEntry({ vnode, recurseCount }) {
  1484. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  1485. const isRoot = vnode.component ? vnode.component.parent == null : false;
  1486. const open = ` at <${formatComponentName(
  1487. vnode.component,
  1488. vnode.type,
  1489. isRoot
  1490. )}`;
  1491. const close = `>` + postfix;
  1492. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  1493. }
  1494. function formatProps(props) {
  1495. const res = [];
  1496. const keys = Object.keys(props);
  1497. keys.slice(0, 3).forEach((key) => {
  1498. res.push(...formatProp(key, props[key]));
  1499. });
  1500. if (keys.length > 3) {
  1501. res.push(` ...`);
  1502. }
  1503. return res;
  1504. }
  1505. function formatProp(key, value, raw) {
  1506. if (isString(value)) {
  1507. value = JSON.stringify(value);
  1508. return raw ? value : [`${key}=${value}`];
  1509. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  1510. return raw ? value : [`${key}=${value}`];
  1511. } else if (isRef(value)) {
  1512. value = formatProp(key, toRaw(value.value), true);
  1513. return raw ? value : [`${key}=Ref<`, value, `>`];
  1514. } else if (isFunction(value)) {
  1515. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  1516. } else {
  1517. value = toRaw(value);
  1518. return raw ? value : [`${key}=`, value];
  1519. }
  1520. }
  1521. function assertNumber(val, type) {
  1522. if (false)
  1523. return;
  1524. if (val === void 0) {
  1525. return;
  1526. } else if (typeof val !== "number") {
  1527. warn2(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  1528. } else if (isNaN(val)) {
  1529. warn2(`${type} is NaN - the duration expression might be incorrect.`);
  1530. }
  1531. }
  1532. var ErrorTypeStrings = {
  1533. ["sp"]: "serverPrefetch hook",
  1534. ["bc"]: "beforeCreate hook",
  1535. ["c"]: "created hook",
  1536. ["bm"]: "beforeMount hook",
  1537. ["m"]: "mounted hook",
  1538. ["bu"]: "beforeUpdate hook",
  1539. ["u"]: "updated",
  1540. ["bum"]: "beforeUnmount hook",
  1541. ["um"]: "unmounted hook",
  1542. ["a"]: "activated hook",
  1543. ["da"]: "deactivated hook",
  1544. ["ec"]: "errorCaptured hook",
  1545. ["rtc"]: "renderTracked hook",
  1546. ["rtg"]: "renderTriggered hook",
  1547. [0]: "setup function",
  1548. [1]: "render function",
  1549. [2]: "watcher getter",
  1550. [3]: "watcher callback",
  1551. [4]: "watcher cleanup function",
  1552. [5]: "native event handler",
  1553. [6]: "component event handler",
  1554. [7]: "vnode hook",
  1555. [8]: "directive hook",
  1556. [9]: "transition hook",
  1557. [10]: "app errorHandler",
  1558. [11]: "app warnHandler",
  1559. [12]: "ref function",
  1560. [13]: "async component loader",
  1561. [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
  1562. };
  1563. function callWithErrorHandling(fn, instance, type, args) {
  1564. let res;
  1565. try {
  1566. res = args ? fn(...args) : fn();
  1567. } catch (err) {
  1568. handleError(err, instance, type);
  1569. }
  1570. return res;
  1571. }
  1572. function callWithAsyncErrorHandling(fn, instance, type, args) {
  1573. if (isFunction(fn)) {
  1574. const res = callWithErrorHandling(fn, instance, type, args);
  1575. if (res && isPromise(res)) {
  1576. res.catch((err) => {
  1577. handleError(err, instance, type);
  1578. });
  1579. }
  1580. return res;
  1581. }
  1582. const values = [];
  1583. for (let i = 0; i < fn.length; i++) {
  1584. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  1585. }
  1586. return values;
  1587. }
  1588. function handleError(err, instance, type, throwInDev = true) {
  1589. const contextVNode = instance ? instance.vnode : null;
  1590. if (instance) {
  1591. let cur = instance.parent;
  1592. const exposedInstance = instance.proxy;
  1593. const errorInfo = true ? ErrorTypeStrings[type] : type;
  1594. while (cur) {
  1595. const errorCapturedHooks = cur.ec;
  1596. if (errorCapturedHooks) {
  1597. for (let i = 0; i < errorCapturedHooks.length; i++) {
  1598. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  1599. return;
  1600. }
  1601. }
  1602. }
  1603. cur = cur.parent;
  1604. }
  1605. const appErrorHandler = instance.appContext.config.errorHandler;
  1606. if (appErrorHandler) {
  1607. callWithErrorHandling(
  1608. appErrorHandler,
  1609. null,
  1610. 10,
  1611. [err, exposedInstance, errorInfo]
  1612. );
  1613. return;
  1614. }
  1615. }
  1616. logError(err, type, contextVNode, throwInDev);
  1617. }
  1618. function logError(err, type, contextVNode, throwInDev = true) {
  1619. if (true) {
  1620. const info = ErrorTypeStrings[type];
  1621. if (contextVNode) {
  1622. pushWarningContext(contextVNode);
  1623. }
  1624. warn2(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  1625. if (contextVNode) {
  1626. popWarningContext();
  1627. }
  1628. if (throwInDev) {
  1629. throw err;
  1630. } else {
  1631. console.error(err);
  1632. }
  1633. } else {
  1634. console.error(err);
  1635. }
  1636. }
  1637. var isFlushing = false;
  1638. var isFlushPending = false;
  1639. var queue = [];
  1640. var flushIndex = 0;
  1641. var pendingPostFlushCbs = [];
  1642. var activePostFlushCbs = null;
  1643. var postFlushIndex = 0;
  1644. var resolvedPromise = Promise.resolve();
  1645. var currentFlushPromise = null;
  1646. var RECURSION_LIMIT = 100;
  1647. function nextTick(fn) {
  1648. const p2 = currentFlushPromise || resolvedPromise;
  1649. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  1650. }
  1651. function findInsertionIndex(id) {
  1652. let start = flushIndex + 1;
  1653. let end = queue.length;
  1654. while (start < end) {
  1655. const middle = start + end >>> 1;
  1656. const middleJob = queue[middle];
  1657. const middleJobId = getId(middleJob);
  1658. if (middleJobId < id || middleJobId === id && middleJob.pre) {
  1659. start = middle + 1;
  1660. } else {
  1661. end = middle;
  1662. }
  1663. }
  1664. return start;
  1665. }
  1666. function queueJob(job) {
  1667. if (!queue.length || !queue.includes(
  1668. job,
  1669. isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
  1670. )) {
  1671. if (job.id == null) {
  1672. queue.push(job);
  1673. } else {
  1674. queue.splice(findInsertionIndex(job.id), 0, job);
  1675. }
  1676. queueFlush();
  1677. }
  1678. }
  1679. function queueFlush() {
  1680. if (!isFlushing && !isFlushPending) {
  1681. isFlushPending = true;
  1682. currentFlushPromise = resolvedPromise.then(flushJobs);
  1683. }
  1684. }
  1685. function invalidateJob(job) {
  1686. const i = queue.indexOf(job);
  1687. if (i > flushIndex) {
  1688. queue.splice(i, 1);
  1689. }
  1690. }
  1691. function queuePostFlushCb(cb) {
  1692. if (!isArray(cb)) {
  1693. if (!activePostFlushCbs || !activePostFlushCbs.includes(
  1694. cb,
  1695. cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
  1696. )) {
  1697. pendingPostFlushCbs.push(cb);
  1698. }
  1699. } else {
  1700. pendingPostFlushCbs.push(...cb);
  1701. }
  1702. queueFlush();
  1703. }
  1704. function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
  1705. if (true) {
  1706. seen = seen || /* @__PURE__ */ new Map();
  1707. }
  1708. for (; i < queue.length; i++) {
  1709. const cb = queue[i];
  1710. if (cb && cb.pre) {
  1711. if (instance && cb.id !== instance.uid) {
  1712. continue;
  1713. }
  1714. if (checkRecursiveUpdates(seen, cb)) {
  1715. continue;
  1716. }
  1717. queue.splice(i, 1);
  1718. i--;
  1719. cb();
  1720. }
  1721. }
  1722. }
  1723. function flushPostFlushCbs(seen) {
  1724. if (pendingPostFlushCbs.length) {
  1725. const deduped = [...new Set(pendingPostFlushCbs)];
  1726. pendingPostFlushCbs.length = 0;
  1727. if (activePostFlushCbs) {
  1728. activePostFlushCbs.push(...deduped);
  1729. return;
  1730. }
  1731. activePostFlushCbs = deduped;
  1732. if (true) {
  1733. seen = seen || /* @__PURE__ */ new Map();
  1734. }
  1735. activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
  1736. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  1737. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  1738. continue;
  1739. }
  1740. activePostFlushCbs[postFlushIndex]();
  1741. }
  1742. activePostFlushCbs = null;
  1743. postFlushIndex = 0;
  1744. }
  1745. }
  1746. var getId = (job) => job.id == null ? Infinity : job.id;
  1747. var comparator = (a, b) => {
  1748. const diff = getId(a) - getId(b);
  1749. if (diff === 0) {
  1750. if (a.pre && !b.pre)
  1751. return -1;
  1752. if (b.pre && !a.pre)
  1753. return 1;
  1754. }
  1755. return diff;
  1756. };
  1757. function flushJobs(seen) {
  1758. isFlushPending = false;
  1759. isFlushing = true;
  1760. if (true) {
  1761. seen = seen || /* @__PURE__ */ new Map();
  1762. }
  1763. queue.sort(comparator);
  1764. const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
  1765. try {
  1766. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  1767. const job = queue[flushIndex];
  1768. if (job && job.active !== false) {
  1769. if (check(job)) {
  1770. continue;
  1771. }
  1772. callWithErrorHandling(job, null, 14);
  1773. }
  1774. }
  1775. } finally {
  1776. flushIndex = 0;
  1777. queue.length = 0;
  1778. flushPostFlushCbs(seen);
  1779. isFlushing = false;
  1780. currentFlushPromise = null;
  1781. if (queue.length || pendingPostFlushCbs.length) {
  1782. flushJobs(seen);
  1783. }
  1784. }
  1785. }
  1786. function checkRecursiveUpdates(seen, fn) {
  1787. if (!seen.has(fn)) {
  1788. seen.set(fn, 1);
  1789. } else {
  1790. const count = seen.get(fn);
  1791. if (count > RECURSION_LIMIT) {
  1792. const instance = fn.ownerInstance;
  1793. const componentName = instance && getComponentName(instance.type);
  1794. warn2(
  1795. `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.`
  1796. );
  1797. return true;
  1798. } else {
  1799. seen.set(fn, count + 1);
  1800. }
  1801. }
  1802. }
  1803. var isHmrUpdating = false;
  1804. var hmrDirtyComponents = /* @__PURE__ */ new Set();
  1805. if (true) {
  1806. getGlobalThis().__VUE_HMR_RUNTIME__ = {
  1807. createRecord: tryWrap(createRecord),
  1808. rerender: tryWrap(rerender),
  1809. reload: tryWrap(reload)
  1810. };
  1811. }
  1812. var map = /* @__PURE__ */ new Map();
  1813. function registerHMR(instance) {
  1814. const id = instance.type.__hmrId;
  1815. let record = map.get(id);
  1816. if (!record) {
  1817. createRecord(id, instance.type);
  1818. record = map.get(id);
  1819. }
  1820. record.instances.add(instance);
  1821. }
  1822. function unregisterHMR(instance) {
  1823. map.get(instance.type.__hmrId).instances.delete(instance);
  1824. }
  1825. function createRecord(id, initialDef) {
  1826. if (map.has(id)) {
  1827. return false;
  1828. }
  1829. map.set(id, {
  1830. initialDef: normalizeClassComponent(initialDef),
  1831. instances: /* @__PURE__ */ new Set()
  1832. });
  1833. return true;
  1834. }
  1835. function normalizeClassComponent(component) {
  1836. return isClassComponent(component) ? component.__vccOpts : component;
  1837. }
  1838. function rerender(id, newRender) {
  1839. const record = map.get(id);
  1840. if (!record) {
  1841. return;
  1842. }
  1843. record.initialDef.render = newRender;
  1844. [...record.instances].forEach((instance) => {
  1845. if (newRender) {
  1846. instance.render = newRender;
  1847. normalizeClassComponent(instance.type).render = newRender;
  1848. }
  1849. instance.renderCache = [];
  1850. isHmrUpdating = true;
  1851. instance.update();
  1852. isHmrUpdating = false;
  1853. });
  1854. }
  1855. function reload(id, newComp) {
  1856. const record = map.get(id);
  1857. if (!record)
  1858. return;
  1859. newComp = normalizeClassComponent(newComp);
  1860. updateComponentDef(record.initialDef, newComp);
  1861. const instances = [...record.instances];
  1862. for (const instance of instances) {
  1863. const oldComp = normalizeClassComponent(instance.type);
  1864. if (!hmrDirtyComponents.has(oldComp)) {
  1865. if (oldComp !== record.initialDef) {
  1866. updateComponentDef(oldComp, newComp);
  1867. }
  1868. hmrDirtyComponents.add(oldComp);
  1869. }
  1870. instance.appContext.propsCache.delete(instance.type);
  1871. instance.appContext.emitsCache.delete(instance.type);
  1872. instance.appContext.optionsCache.delete(instance.type);
  1873. if (instance.ceReload) {
  1874. hmrDirtyComponents.add(oldComp);
  1875. instance.ceReload(newComp.styles);
  1876. hmrDirtyComponents.delete(oldComp);
  1877. } else if (instance.parent) {
  1878. queueJob(instance.parent.update);
  1879. } else if (instance.appContext.reload) {
  1880. instance.appContext.reload();
  1881. } else if (typeof window !== "undefined") {
  1882. window.location.reload();
  1883. } else {
  1884. console.warn(
  1885. "[HMR] Root or manually mounted instance modified. Full reload required."
  1886. );
  1887. }
  1888. }
  1889. queuePostFlushCb(() => {
  1890. for (const instance of instances) {
  1891. hmrDirtyComponents.delete(
  1892. normalizeClassComponent(instance.type)
  1893. );
  1894. }
  1895. });
  1896. }
  1897. function updateComponentDef(oldComp, newComp) {
  1898. extend(oldComp, newComp);
  1899. for (const key in oldComp) {
  1900. if (key !== "__file" && !(key in newComp)) {
  1901. delete oldComp[key];
  1902. }
  1903. }
  1904. }
  1905. function tryWrap(fn) {
  1906. return (id, arg) => {
  1907. try {
  1908. return fn(id, arg);
  1909. } catch (e) {
  1910. console.error(e);
  1911. console.warn(
  1912. `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
  1913. );
  1914. }
  1915. };
  1916. }
  1917. var devtools;
  1918. var buffer = [];
  1919. var devtoolsNotInstalled = false;
  1920. function emit$1(event, ...args) {
  1921. if (devtools) {
  1922. devtools.emit(event, ...args);
  1923. } else if (!devtoolsNotInstalled) {
  1924. buffer.push({ event, args });
  1925. }
  1926. }
  1927. function setDevtoolsHook(hook, target) {
  1928. var _a, _b;
  1929. devtools = hook;
  1930. if (devtools) {
  1931. devtools.enabled = true;
  1932. buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
  1933. buffer = [];
  1934. } else if (
  1935. // handle late devtools injection - only do this if we are in an actual
  1936. // browser environment to avoid the timer handle stalling test runner exit
  1937. // (#4815)
  1938. typeof window !== "undefined" && // some envs mock window but not fully
  1939. window.HTMLElement && // also exclude jsdom
  1940. !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
  1941. ) {
  1942. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  1943. replay.push((newHook) => {
  1944. setDevtoolsHook(newHook, target);
  1945. });
  1946. setTimeout(() => {
  1947. if (!devtools) {
  1948. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  1949. devtoolsNotInstalled = true;
  1950. buffer = [];
  1951. }
  1952. }, 3e3);
  1953. } else {
  1954. devtoolsNotInstalled = true;
  1955. buffer = [];
  1956. }
  1957. }
  1958. function devtoolsInitApp(app, version2) {
  1959. emit$1("app:init", app, version2, {
  1960. Fragment,
  1961. Text,
  1962. Comment,
  1963. Static
  1964. });
  1965. }
  1966. function devtoolsUnmountApp(app) {
  1967. emit$1("app:unmount", app);
  1968. }
  1969. var devtoolsComponentAdded = createDevtoolsComponentHook(
  1970. "component:added"
  1971. /* COMPONENT_ADDED */
  1972. );
  1973. var devtoolsComponentUpdated = createDevtoolsComponentHook(
  1974. "component:updated"
  1975. /* COMPONENT_UPDATED */
  1976. );
  1977. var _devtoolsComponentRemoved = createDevtoolsComponentHook(
  1978. "component:removed"
  1979. /* COMPONENT_REMOVED */
  1980. );
  1981. var devtoolsComponentRemoved = (component) => {
  1982. if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  1983. !devtools.cleanupBuffer(component)) {
  1984. _devtoolsComponentRemoved(component);
  1985. }
  1986. };
  1987. function createDevtoolsComponentHook(hook) {
  1988. return (component) => {
  1989. emit$1(
  1990. hook,
  1991. component.appContext.app,
  1992. component.uid,
  1993. component.parent ? component.parent.uid : void 0,
  1994. component
  1995. );
  1996. };
  1997. }
  1998. var devtoolsPerfStart = createDevtoolsPerformanceHook(
  1999. "perf:start"
  2000. /* PERFORMANCE_START */
  2001. );
  2002. var devtoolsPerfEnd = createDevtoolsPerformanceHook(
  2003. "perf:end"
  2004. /* PERFORMANCE_END */
  2005. );
  2006. function createDevtoolsPerformanceHook(hook) {
  2007. return (component, type, time) => {
  2008. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  2009. };
  2010. }
  2011. function devtoolsComponentEmit(component, event, params) {
  2012. emit$1(
  2013. "component:emit",
  2014. component.appContext.app,
  2015. component,
  2016. event,
  2017. params
  2018. );
  2019. }
  2020. function emit(instance, event, ...rawArgs) {
  2021. if (instance.isUnmounted)
  2022. return;
  2023. const props = instance.vnode.props || EMPTY_OBJ;
  2024. if (true) {
  2025. const {
  2026. emitsOptions,
  2027. propsOptions: [propsOptions]
  2028. } = instance;
  2029. if (emitsOptions) {
  2030. if (!(event in emitsOptions) && true) {
  2031. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  2032. warn2(
  2033. `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
  2034. );
  2035. }
  2036. } else {
  2037. const validator = emitsOptions[event];
  2038. if (isFunction(validator)) {
  2039. const isValid = validator(...rawArgs);
  2040. if (!isValid) {
  2041. warn2(
  2042. `Invalid event arguments: event validation failed for event "${event}".`
  2043. );
  2044. }
  2045. }
  2046. }
  2047. }
  2048. }
  2049. let args = rawArgs;
  2050. const isModelListener2 = event.startsWith("update:");
  2051. const modelArg = isModelListener2 && event.slice(7);
  2052. if (modelArg && modelArg in props) {
  2053. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  2054. const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
  2055. if (trim) {
  2056. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  2057. }
  2058. if (number) {
  2059. args = rawArgs.map(looseToNumber);
  2060. }
  2061. }
  2062. if (true) {
  2063. devtoolsComponentEmit(instance, event, args);
  2064. }
  2065. if (true) {
  2066. const lowerCaseEvent = event.toLowerCase();
  2067. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
  2068. warn2(
  2069. `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
  2070. instance,
  2071. instance.type
  2072. )} 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(event)}" instead of "${event}".`
  2073. );
  2074. }
  2075. }
  2076. let handlerName;
  2077. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  2078. props[handlerName = toHandlerKey(camelize(event))];
  2079. if (!handler && isModelListener2) {
  2080. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  2081. }
  2082. if (handler) {
  2083. callWithAsyncErrorHandling(
  2084. handler,
  2085. instance,
  2086. 6,
  2087. args
  2088. );
  2089. }
  2090. const onceHandler = props[handlerName + `Once`];
  2091. if (onceHandler) {
  2092. if (!instance.emitted) {
  2093. instance.emitted = {};
  2094. } else if (instance.emitted[handlerName]) {
  2095. return;
  2096. }
  2097. instance.emitted[handlerName] = true;
  2098. callWithAsyncErrorHandling(
  2099. onceHandler,
  2100. instance,
  2101. 6,
  2102. args
  2103. );
  2104. }
  2105. }
  2106. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  2107. const cache = appContext.emitsCache;
  2108. const cached = cache.get(comp);
  2109. if (cached !== void 0) {
  2110. return cached;
  2111. }
  2112. const raw = comp.emits;
  2113. let normalized = {};
  2114. let hasExtends = false;
  2115. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  2116. const extendEmits = (raw2) => {
  2117. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  2118. if (normalizedFromExtend) {
  2119. hasExtends = true;
  2120. extend(normalized, normalizedFromExtend);
  2121. }
  2122. };
  2123. if (!asMixin && appContext.mixins.length) {
  2124. appContext.mixins.forEach(extendEmits);
  2125. }
  2126. if (comp.extends) {
  2127. extendEmits(comp.extends);
  2128. }
  2129. if (comp.mixins) {
  2130. comp.mixins.forEach(extendEmits);
  2131. }
  2132. }
  2133. if (!raw && !hasExtends) {
  2134. if (isObject(comp)) {
  2135. cache.set(comp, null);
  2136. }
  2137. return null;
  2138. }
  2139. if (isArray(raw)) {
  2140. raw.forEach((key) => normalized[key] = null);
  2141. } else {
  2142. extend(normalized, raw);
  2143. }
  2144. if (isObject(comp)) {
  2145. cache.set(comp, normalized);
  2146. }
  2147. return normalized;
  2148. }
  2149. function isEmitListener(options, key) {
  2150. if (!options || !isOn(key)) {
  2151. return false;
  2152. }
  2153. key = key.slice(2).replace(/Once$/, "");
  2154. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  2155. }
  2156. var currentRenderingInstance = null;
  2157. var currentScopeId = null;
  2158. function setCurrentRenderingInstance(instance) {
  2159. const prev = currentRenderingInstance;
  2160. currentRenderingInstance = instance;
  2161. currentScopeId = instance && instance.type.__scopeId || null;
  2162. return prev;
  2163. }
  2164. function pushScopeId(id) {
  2165. currentScopeId = id;
  2166. }
  2167. function popScopeId() {
  2168. currentScopeId = null;
  2169. }
  2170. var withScopeId = (_id) => withCtx;
  2171. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2172. if (!ctx)
  2173. return fn;
  2174. if (fn._n) {
  2175. return fn;
  2176. }
  2177. const renderFnWithContext = (...args) => {
  2178. if (renderFnWithContext._d) {
  2179. setBlockTracking(-1);
  2180. }
  2181. const prevInstance = setCurrentRenderingInstance(ctx);
  2182. let res;
  2183. try {
  2184. res = fn(...args);
  2185. } finally {
  2186. setCurrentRenderingInstance(prevInstance);
  2187. if (renderFnWithContext._d) {
  2188. setBlockTracking(1);
  2189. }
  2190. }
  2191. if (true) {
  2192. devtoolsComponentUpdated(ctx);
  2193. }
  2194. return res;
  2195. };
  2196. renderFnWithContext._n = true;
  2197. renderFnWithContext._c = true;
  2198. renderFnWithContext._d = true;
  2199. return renderFnWithContext;
  2200. }
  2201. var accessedAttrs = false;
  2202. function markAttrsAccessed() {
  2203. accessedAttrs = true;
  2204. }
  2205. function renderComponentRoot(instance) {
  2206. const {
  2207. type: Component,
  2208. vnode,
  2209. proxy,
  2210. withProxy,
  2211. props,
  2212. propsOptions: [propsOptions],
  2213. slots,
  2214. attrs,
  2215. emit: emit2,
  2216. render: render2,
  2217. renderCache,
  2218. data,
  2219. setupState,
  2220. ctx,
  2221. inheritAttrs
  2222. } = instance;
  2223. let result;
  2224. let fallthroughAttrs;
  2225. const prev = setCurrentRenderingInstance(instance);
  2226. if (true) {
  2227. accessedAttrs = false;
  2228. }
  2229. try {
  2230. if (vnode.shapeFlag & 4) {
  2231. const proxyToUse = withProxy || proxy;
  2232. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
  2233. get(target, key, receiver) {
  2234. warn2(
  2235. `Property '${String(
  2236. key
  2237. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  2238. );
  2239. return Reflect.get(target, key, receiver);
  2240. }
  2241. }) : proxyToUse;
  2242. result = normalizeVNode(
  2243. render2.call(
  2244. thisProxy,
  2245. proxyToUse,
  2246. renderCache,
  2247. props,
  2248. setupState,
  2249. data,
  2250. ctx
  2251. )
  2252. );
  2253. fallthroughAttrs = attrs;
  2254. } else {
  2255. const render22 = Component;
  2256. if (attrs === props) {
  2257. markAttrsAccessed();
  2258. }
  2259. result = normalizeVNode(
  2260. render22.length > 1 ? render22(
  2261. props,
  2262. true ? {
  2263. get attrs() {
  2264. markAttrsAccessed();
  2265. return attrs;
  2266. },
  2267. slots,
  2268. emit: emit2
  2269. } : { attrs, slots, emit: emit2 }
  2270. ) : render22(
  2271. props,
  2272. null
  2273. /* we know it doesn't need it */
  2274. )
  2275. );
  2276. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  2277. }
  2278. } catch (err) {
  2279. blockStack.length = 0;
  2280. handleError(err, instance, 1);
  2281. result = createVNode(Comment);
  2282. }
  2283. let root = result;
  2284. let setRoot = void 0;
  2285. if (result.patchFlag > 0 && result.patchFlag & 2048) {
  2286. [root, setRoot] = getChildRoot(result);
  2287. }
  2288. if (fallthroughAttrs && inheritAttrs !== false) {
  2289. const keys = Object.keys(fallthroughAttrs);
  2290. const { shapeFlag } = root;
  2291. if (keys.length) {
  2292. if (shapeFlag & (1 | 6)) {
  2293. if (propsOptions && keys.some(isModelListener)) {
  2294. fallthroughAttrs = filterModelListeners(
  2295. fallthroughAttrs,
  2296. propsOptions
  2297. );
  2298. }
  2299. root = cloneVNode(root, fallthroughAttrs);
  2300. } else if (!accessedAttrs && root.type !== Comment) {
  2301. const allAttrs = Object.keys(attrs);
  2302. const eventAttrs = [];
  2303. const extraAttrs = [];
  2304. for (let i = 0, l = allAttrs.length; i < l; i++) {
  2305. const key = allAttrs[i];
  2306. if (isOn(key)) {
  2307. if (!isModelListener(key)) {
  2308. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  2309. }
  2310. } else {
  2311. extraAttrs.push(key);
  2312. }
  2313. }
  2314. if (extraAttrs.length) {
  2315. warn2(
  2316. `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
  2317. );
  2318. }
  2319. if (eventAttrs.length) {
  2320. warn2(
  2321. `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.`
  2322. );
  2323. }
  2324. }
  2325. }
  2326. }
  2327. if (vnode.dirs) {
  2328. if (!isElementRoot(root)) {
  2329. warn2(
  2330. `Runtime directive used on component with non-element root node. The directives will not function as intended.`
  2331. );
  2332. }
  2333. root = cloneVNode(root);
  2334. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  2335. }
  2336. if (vnode.transition) {
  2337. if (!isElementRoot(root)) {
  2338. warn2(
  2339. `Component inside <Transition> renders non-element root node that cannot be animated.`
  2340. );
  2341. }
  2342. root.transition = vnode.transition;
  2343. }
  2344. if (setRoot) {
  2345. setRoot(root);
  2346. } else {
  2347. result = root;
  2348. }
  2349. setCurrentRenderingInstance(prev);
  2350. return result;
  2351. }
  2352. var getChildRoot = (vnode) => {
  2353. const rawChildren = vnode.children;
  2354. const dynamicChildren = vnode.dynamicChildren;
  2355. const childRoot = filterSingleRoot(rawChildren);
  2356. if (!childRoot) {
  2357. return [vnode, void 0];
  2358. }
  2359. const index = rawChildren.indexOf(childRoot);
  2360. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  2361. const setRoot = (updatedRoot) => {
  2362. rawChildren[index] = updatedRoot;
  2363. if (dynamicChildren) {
  2364. if (dynamicIndex > -1) {
  2365. dynamicChildren[dynamicIndex] = updatedRoot;
  2366. } else if (updatedRoot.patchFlag > 0) {
  2367. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  2368. }
  2369. }
  2370. };
  2371. return [normalizeVNode(childRoot), setRoot];
  2372. };
  2373. function filterSingleRoot(children) {
  2374. let singleRoot;
  2375. for (let i = 0; i < children.length; i++) {
  2376. const child = children[i];
  2377. if (isVNode(child)) {
  2378. if (child.type !== Comment || child.children === "v-if") {
  2379. if (singleRoot) {
  2380. return;
  2381. } else {
  2382. singleRoot = child;
  2383. }
  2384. }
  2385. } else {
  2386. return;
  2387. }
  2388. }
  2389. return singleRoot;
  2390. }
  2391. var getFunctionalFallthrough = (attrs) => {
  2392. let res;
  2393. for (const key in attrs) {
  2394. if (key === "class" || key === "style" || isOn(key)) {
  2395. (res || (res = {}))[key] = attrs[key];
  2396. }
  2397. }
  2398. return res;
  2399. };
  2400. var filterModelListeners = (attrs, props) => {
  2401. const res = {};
  2402. for (const key in attrs) {
  2403. if (!isModelListener(key) || !(key.slice(9) in props)) {
  2404. res[key] = attrs[key];
  2405. }
  2406. }
  2407. return res;
  2408. };
  2409. var isElementRoot = (vnode) => {
  2410. return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
  2411. };
  2412. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  2413. const { props: prevProps, children: prevChildren, component } = prevVNode;
  2414. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  2415. const emits = component.emitsOptions;
  2416. if ((prevChildren || nextChildren) && isHmrUpdating) {
  2417. return true;
  2418. }
  2419. if (nextVNode.dirs || nextVNode.transition) {
  2420. return true;
  2421. }
  2422. if (optimized && patchFlag >= 0) {
  2423. if (patchFlag & 1024) {
  2424. return true;
  2425. }
  2426. if (patchFlag & 16) {
  2427. if (!prevProps) {
  2428. return !!nextProps;
  2429. }
  2430. return hasPropsChanged(prevProps, nextProps, emits);
  2431. } else if (patchFlag & 8) {
  2432. const dynamicProps = nextVNode.dynamicProps;
  2433. for (let i = 0; i < dynamicProps.length; i++) {
  2434. const key = dynamicProps[i];
  2435. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  2436. return true;
  2437. }
  2438. }
  2439. }
  2440. } else {
  2441. if (prevChildren || nextChildren) {
  2442. if (!nextChildren || !nextChildren.$stable) {
  2443. return true;
  2444. }
  2445. }
  2446. if (prevProps === nextProps) {
  2447. return false;
  2448. }
  2449. if (!prevProps) {
  2450. return !!nextProps;
  2451. }
  2452. if (!nextProps) {
  2453. return true;
  2454. }
  2455. return hasPropsChanged(prevProps, nextProps, emits);
  2456. }
  2457. return false;
  2458. }
  2459. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  2460. const nextKeys = Object.keys(nextProps);
  2461. if (nextKeys.length !== Object.keys(prevProps).length) {
  2462. return true;
  2463. }
  2464. for (let i = 0; i < nextKeys.length; i++) {
  2465. const key = nextKeys[i];
  2466. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  2467. return true;
  2468. }
  2469. }
  2470. return false;
  2471. }
  2472. function updateHOCHostEl({ vnode, parent }, el) {
  2473. while (parent && parent.subTree === vnode) {
  2474. (vnode = parent.vnode).el = el;
  2475. parent = parent.parent;
  2476. }
  2477. }
  2478. var COMPONENTS = "components";
  2479. var DIRECTIVES = "directives";
  2480. function resolveComponent(name, maybeSelfReference) {
  2481. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  2482. }
  2483. var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  2484. function resolveDynamicComponent(component) {
  2485. if (isString(component)) {
  2486. return resolveAsset(COMPONENTS, component, false) || component;
  2487. } else {
  2488. return component || NULL_DYNAMIC_COMPONENT;
  2489. }
  2490. }
  2491. function resolveDirective(name) {
  2492. return resolveAsset(DIRECTIVES, name);
  2493. }
  2494. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  2495. const instance = currentRenderingInstance || currentInstance;
  2496. if (instance) {
  2497. const Component = instance.type;
  2498. if (type === COMPONENTS) {
  2499. const selfName = getComponentName(
  2500. Component,
  2501. false
  2502. /* do not include inferred name to avoid breaking existing code */
  2503. );
  2504. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  2505. return Component;
  2506. }
  2507. }
  2508. const res = (
  2509. // local registration
  2510. // check instance[type] first which is resolved for options API
  2511. resolve(instance[type] || Component[type], name) || // global registration
  2512. resolve(instance.appContext[type], name)
  2513. );
  2514. if (!res && maybeSelfReference) {
  2515. return Component;
  2516. }
  2517. if (warnMissing && !res) {
  2518. const extra = type === COMPONENTS ? `
  2519. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  2520. warn2(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  2521. }
  2522. return res;
  2523. } else if (true) {
  2524. warn2(
  2525. `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
  2526. );
  2527. }
  2528. }
  2529. function resolve(registry, name) {
  2530. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  2531. }
  2532. var isSuspense = (type) => type.__isSuspense;
  2533. var SuspenseImpl = {
  2534. name: "Suspense",
  2535. // In order to make Suspense tree-shakable, we need to avoid importing it
  2536. // directly in the renderer. The renderer checks for the __isSuspense flag
  2537. // on a vnode's type and calls the `process` method, passing in renderer
  2538. // internals.
  2539. __isSuspense: true,
  2540. process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
  2541. if (n1 == null) {
  2542. mountSuspense(
  2543. n2,
  2544. container,
  2545. anchor,
  2546. parentComponent,
  2547. parentSuspense,
  2548. isSVG,
  2549. slotScopeIds,
  2550. optimized,
  2551. rendererInternals
  2552. );
  2553. } else {
  2554. patchSuspense(
  2555. n1,
  2556. n2,
  2557. container,
  2558. anchor,
  2559. parentComponent,
  2560. isSVG,
  2561. slotScopeIds,
  2562. optimized,
  2563. rendererInternals
  2564. );
  2565. }
  2566. },
  2567. hydrate: hydrateSuspense,
  2568. create: createSuspenseBoundary,
  2569. normalize: normalizeSuspenseChildren
  2570. };
  2571. var Suspense = SuspenseImpl;
  2572. function triggerEvent(vnode, name) {
  2573. const eventListener = vnode.props && vnode.props[name];
  2574. if (isFunction(eventListener)) {
  2575. eventListener();
  2576. }
  2577. }
  2578. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
  2579. const {
  2580. p: patch,
  2581. o: { createElement }
  2582. } = rendererInternals;
  2583. const hiddenContainer = createElement("div");
  2584. const suspense = vnode.suspense = createSuspenseBoundary(
  2585. vnode,
  2586. parentSuspense,
  2587. parentComponent,
  2588. container,
  2589. hiddenContainer,
  2590. anchor,
  2591. isSVG,
  2592. slotScopeIds,
  2593. optimized,
  2594. rendererInternals
  2595. );
  2596. patch(
  2597. null,
  2598. suspense.pendingBranch = vnode.ssContent,
  2599. hiddenContainer,
  2600. null,
  2601. parentComponent,
  2602. suspense,
  2603. isSVG,
  2604. slotScopeIds
  2605. );
  2606. if (suspense.deps > 0) {
  2607. triggerEvent(vnode, "onPending");
  2608. triggerEvent(vnode, "onFallback");
  2609. patch(
  2610. null,
  2611. vnode.ssFallback,
  2612. container,
  2613. anchor,
  2614. parentComponent,
  2615. null,
  2616. // fallback tree will not have suspense context
  2617. isSVG,
  2618. slotScopeIds
  2619. );
  2620. setActiveBranch(suspense, vnode.ssFallback);
  2621. } else {
  2622. suspense.resolve(false, true);
  2623. }
  2624. }
  2625. function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  2626. const suspense = n2.suspense = n1.suspense;
  2627. suspense.vnode = n2;
  2628. n2.el = n1.el;
  2629. const newBranch = n2.ssContent;
  2630. const newFallback = n2.ssFallback;
  2631. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  2632. if (pendingBranch) {
  2633. suspense.pendingBranch = newBranch;
  2634. if (isSameVNodeType(newBranch, pendingBranch)) {
  2635. patch(
  2636. pendingBranch,
  2637. newBranch,
  2638. suspense.hiddenContainer,
  2639. null,
  2640. parentComponent,
  2641. suspense,
  2642. isSVG,
  2643. slotScopeIds,
  2644. optimized
  2645. );
  2646. if (suspense.deps <= 0) {
  2647. suspense.resolve();
  2648. } else if (isInFallback) {
  2649. patch(
  2650. activeBranch,
  2651. newFallback,
  2652. container,
  2653. anchor,
  2654. parentComponent,
  2655. null,
  2656. // fallback tree will not have suspense context
  2657. isSVG,
  2658. slotScopeIds,
  2659. optimized
  2660. );
  2661. setActiveBranch(suspense, newFallback);
  2662. }
  2663. } else {
  2664. suspense.pendingId++;
  2665. if (isHydrating) {
  2666. suspense.isHydrating = false;
  2667. suspense.activeBranch = pendingBranch;
  2668. } else {
  2669. unmount(pendingBranch, parentComponent, suspense);
  2670. }
  2671. suspense.deps = 0;
  2672. suspense.effects.length = 0;
  2673. suspense.hiddenContainer = createElement("div");
  2674. if (isInFallback) {
  2675. patch(
  2676. null,
  2677. newBranch,
  2678. suspense.hiddenContainer,
  2679. null,
  2680. parentComponent,
  2681. suspense,
  2682. isSVG,
  2683. slotScopeIds,
  2684. optimized
  2685. );
  2686. if (suspense.deps <= 0) {
  2687. suspense.resolve();
  2688. } else {
  2689. patch(
  2690. activeBranch,
  2691. newFallback,
  2692. container,
  2693. anchor,
  2694. parentComponent,
  2695. null,
  2696. // fallback tree will not have suspense context
  2697. isSVG,
  2698. slotScopeIds,
  2699. optimized
  2700. );
  2701. setActiveBranch(suspense, newFallback);
  2702. }
  2703. } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  2704. patch(
  2705. activeBranch,
  2706. newBranch,
  2707. container,
  2708. anchor,
  2709. parentComponent,
  2710. suspense,
  2711. isSVG,
  2712. slotScopeIds,
  2713. optimized
  2714. );
  2715. suspense.resolve(true);
  2716. } else {
  2717. patch(
  2718. null,
  2719. newBranch,
  2720. suspense.hiddenContainer,
  2721. null,
  2722. parentComponent,
  2723. suspense,
  2724. isSVG,
  2725. slotScopeIds,
  2726. optimized
  2727. );
  2728. if (suspense.deps <= 0) {
  2729. suspense.resolve();
  2730. }
  2731. }
  2732. }
  2733. } else {
  2734. if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  2735. patch(
  2736. activeBranch,
  2737. newBranch,
  2738. container,
  2739. anchor,
  2740. parentComponent,
  2741. suspense,
  2742. isSVG,
  2743. slotScopeIds,
  2744. optimized
  2745. );
  2746. setActiveBranch(suspense, newBranch);
  2747. } else {
  2748. triggerEvent(n2, "onPending");
  2749. suspense.pendingBranch = newBranch;
  2750. suspense.pendingId++;
  2751. patch(
  2752. null,
  2753. newBranch,
  2754. suspense.hiddenContainer,
  2755. null,
  2756. parentComponent,
  2757. suspense,
  2758. isSVG,
  2759. slotScopeIds,
  2760. optimized
  2761. );
  2762. if (suspense.deps <= 0) {
  2763. suspense.resolve();
  2764. } else {
  2765. const { timeout, pendingId } = suspense;
  2766. if (timeout > 0) {
  2767. setTimeout(() => {
  2768. if (suspense.pendingId === pendingId) {
  2769. suspense.fallback(newFallback);
  2770. }
  2771. }, timeout);
  2772. } else if (timeout === 0) {
  2773. suspense.fallback(newFallback);
  2774. }
  2775. }
  2776. }
  2777. }
  2778. }
  2779. var hasWarned = false;
  2780. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  2781. if (!hasWarned) {
  2782. hasWarned = true;
  2783. console[console.info ? "info" : "log"](
  2784. `<Suspense> is an experimental feature and its API will likely change.`
  2785. );
  2786. }
  2787. const {
  2788. p: patch,
  2789. m: move,
  2790. um: unmount,
  2791. n: next,
  2792. o: { parentNode, remove: remove2 }
  2793. } = rendererInternals;
  2794. let parentSuspenseId;
  2795. const isSuspensible = isVNodeSuspensible(vnode);
  2796. if (isSuspensible) {
  2797. if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
  2798. parentSuspenseId = parentSuspense.pendingId;
  2799. parentSuspense.deps++;
  2800. }
  2801. }
  2802. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  2803. if (true) {
  2804. assertNumber(timeout, `Suspense timeout`);
  2805. }
  2806. const suspense = {
  2807. vnode,
  2808. parent: parentSuspense,
  2809. parentComponent,
  2810. isSVG,
  2811. container,
  2812. hiddenContainer,
  2813. anchor,
  2814. deps: 0,
  2815. pendingId: 0,
  2816. timeout: typeof timeout === "number" ? timeout : -1,
  2817. activeBranch: null,
  2818. pendingBranch: null,
  2819. isInFallback: !isHydrating,
  2820. isHydrating,
  2821. isUnmounted: false,
  2822. effects: [],
  2823. resolve(resume = false, sync = false) {
  2824. if (true) {
  2825. if (!resume && !suspense.pendingBranch) {
  2826. throw new Error(
  2827. `suspense.resolve() is called without a pending branch.`
  2828. );
  2829. }
  2830. if (suspense.isUnmounted) {
  2831. throw new Error(
  2832. `suspense.resolve() is called on an already unmounted suspense boundary.`
  2833. );
  2834. }
  2835. }
  2836. const {
  2837. vnode: vnode2,
  2838. activeBranch,
  2839. pendingBranch,
  2840. pendingId,
  2841. effects,
  2842. parentComponent: parentComponent2,
  2843. container: container2
  2844. } = suspense;
  2845. let delayEnter = false;
  2846. if (suspense.isHydrating) {
  2847. suspense.isHydrating = false;
  2848. } else if (!resume) {
  2849. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  2850. if (delayEnter) {
  2851. activeBranch.transition.afterLeave = () => {
  2852. if (pendingId === suspense.pendingId) {
  2853. move(
  2854. pendingBranch,
  2855. container2,
  2856. next(activeBranch),
  2857. 0
  2858. );
  2859. queuePostFlushCb(effects);
  2860. }
  2861. };
  2862. }
  2863. let { anchor: anchor2 } = suspense;
  2864. if (activeBranch) {
  2865. anchor2 = next(activeBranch);
  2866. unmount(activeBranch, parentComponent2, suspense, true);
  2867. }
  2868. if (!delayEnter) {
  2869. move(pendingBranch, container2, anchor2, 0);
  2870. }
  2871. }
  2872. setActiveBranch(suspense, pendingBranch);
  2873. suspense.pendingBranch = null;
  2874. suspense.isInFallback = false;
  2875. let parent = suspense.parent;
  2876. let hasUnresolvedAncestor = false;
  2877. while (parent) {
  2878. if (parent.pendingBranch) {
  2879. parent.effects.push(...effects);
  2880. hasUnresolvedAncestor = true;
  2881. break;
  2882. }
  2883. parent = parent.parent;
  2884. }
  2885. if (!hasUnresolvedAncestor && !delayEnter) {
  2886. queuePostFlushCb(effects);
  2887. }
  2888. suspense.effects = [];
  2889. if (isSuspensible) {
  2890. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  2891. parentSuspense.deps--;
  2892. if (parentSuspense.deps === 0 && !sync) {
  2893. parentSuspense.resolve();
  2894. }
  2895. }
  2896. }
  2897. triggerEvent(vnode2, "onResolve");
  2898. },
  2899. fallback(fallbackVNode) {
  2900. if (!suspense.pendingBranch) {
  2901. return;
  2902. }
  2903. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
  2904. triggerEvent(vnode2, "onFallback");
  2905. const anchor2 = next(activeBranch);
  2906. const mountFallback = () => {
  2907. if (!suspense.isInFallback) {
  2908. return;
  2909. }
  2910. patch(
  2911. null,
  2912. fallbackVNode,
  2913. container2,
  2914. anchor2,
  2915. parentComponent2,
  2916. null,
  2917. // fallback tree will not have suspense context
  2918. isSVG2,
  2919. slotScopeIds,
  2920. optimized
  2921. );
  2922. setActiveBranch(suspense, fallbackVNode);
  2923. };
  2924. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  2925. if (delayEnter) {
  2926. activeBranch.transition.afterLeave = mountFallback;
  2927. }
  2928. suspense.isInFallback = true;
  2929. unmount(
  2930. activeBranch,
  2931. parentComponent2,
  2932. null,
  2933. // no suspense so unmount hooks fire now
  2934. true
  2935. // shouldRemove
  2936. );
  2937. if (!delayEnter) {
  2938. mountFallback();
  2939. }
  2940. },
  2941. move(container2, anchor2, type) {
  2942. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  2943. suspense.container = container2;
  2944. },
  2945. next() {
  2946. return suspense.activeBranch && next(suspense.activeBranch);
  2947. },
  2948. registerDep(instance, setupRenderEffect) {
  2949. const isInPendingSuspense = !!suspense.pendingBranch;
  2950. if (isInPendingSuspense) {
  2951. suspense.deps++;
  2952. }
  2953. const hydratedEl = instance.vnode.el;
  2954. instance.asyncDep.catch((err) => {
  2955. handleError(err, instance, 0);
  2956. }).then((asyncSetupResult) => {
  2957. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
  2958. return;
  2959. }
  2960. instance.asyncResolved = true;
  2961. const { vnode: vnode2 } = instance;
  2962. if (true) {
  2963. pushWarningContext(vnode2);
  2964. }
  2965. handleSetupResult(instance, asyncSetupResult, false);
  2966. if (hydratedEl) {
  2967. vnode2.el = hydratedEl;
  2968. }
  2969. const placeholder = !hydratedEl && instance.subTree.el;
  2970. setupRenderEffect(
  2971. instance,
  2972. vnode2,
  2973. // component may have been moved before resolve.
  2974. // if this is not a hydration, instance.subTree will be the comment
  2975. // placeholder.
  2976. parentNode(hydratedEl || instance.subTree.el),
  2977. // anchor will not be used if this is hydration, so only need to
  2978. // consider the comment placeholder case.
  2979. hydratedEl ? null : next(instance.subTree),
  2980. suspense,
  2981. isSVG,
  2982. optimized
  2983. );
  2984. if (placeholder) {
  2985. remove2(placeholder);
  2986. }
  2987. updateHOCHostEl(instance, vnode2.el);
  2988. if (true) {
  2989. popWarningContext();
  2990. }
  2991. if (isInPendingSuspense && --suspense.deps === 0) {
  2992. suspense.resolve();
  2993. }
  2994. });
  2995. },
  2996. unmount(parentSuspense2, doRemove) {
  2997. suspense.isUnmounted = true;
  2998. if (suspense.activeBranch) {
  2999. unmount(
  3000. suspense.activeBranch,
  3001. parentComponent,
  3002. parentSuspense2,
  3003. doRemove
  3004. );
  3005. }
  3006. if (suspense.pendingBranch) {
  3007. unmount(
  3008. suspense.pendingBranch,
  3009. parentComponent,
  3010. parentSuspense2,
  3011. doRemove
  3012. );
  3013. }
  3014. }
  3015. };
  3016. return suspense;
  3017. }
  3018. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  3019. const suspense = vnode.suspense = createSuspenseBoundary(
  3020. vnode,
  3021. parentSuspense,
  3022. parentComponent,
  3023. node.parentNode,
  3024. document.createElement("div"),
  3025. null,
  3026. isSVG,
  3027. slotScopeIds,
  3028. optimized,
  3029. rendererInternals,
  3030. true
  3031. /* hydrating */
  3032. );
  3033. const result = hydrateNode(
  3034. node,
  3035. suspense.pendingBranch = vnode.ssContent,
  3036. parentComponent,
  3037. suspense,
  3038. slotScopeIds,
  3039. optimized
  3040. );
  3041. if (suspense.deps === 0) {
  3042. suspense.resolve(false, true);
  3043. }
  3044. return result;
  3045. }
  3046. function normalizeSuspenseChildren(vnode) {
  3047. const { shapeFlag, children } = vnode;
  3048. const isSlotChildren = shapeFlag & 32;
  3049. vnode.ssContent = normalizeSuspenseSlot(
  3050. isSlotChildren ? children.default : children
  3051. );
  3052. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  3053. }
  3054. function normalizeSuspenseSlot(s) {
  3055. let block;
  3056. if (isFunction(s)) {
  3057. const trackBlock = isBlockTreeEnabled && s._c;
  3058. if (trackBlock) {
  3059. s._d = false;
  3060. openBlock();
  3061. }
  3062. s = s();
  3063. if (trackBlock) {
  3064. s._d = true;
  3065. block = currentBlock;
  3066. closeBlock();
  3067. }
  3068. }
  3069. if (isArray(s)) {
  3070. const singleChild = filterSingleRoot(s);
  3071. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
  3072. warn2(`<Suspense> slots expect a single root node.`);
  3073. }
  3074. s = singleChild;
  3075. }
  3076. s = normalizeVNode(s);
  3077. if (block && !s.dynamicChildren) {
  3078. s.dynamicChildren = block.filter((c) => c !== s);
  3079. }
  3080. return s;
  3081. }
  3082. function queueEffectWithSuspense(fn, suspense) {
  3083. if (suspense && suspense.pendingBranch) {
  3084. if (isArray(fn)) {
  3085. suspense.effects.push(...fn);
  3086. } else {
  3087. suspense.effects.push(fn);
  3088. }
  3089. } else {
  3090. queuePostFlushCb(fn);
  3091. }
  3092. }
  3093. function setActiveBranch(suspense, branch) {
  3094. suspense.activeBranch = branch;
  3095. const { vnode, parentComponent } = suspense;
  3096. const el = vnode.el = branch.el;
  3097. if (parentComponent && parentComponent.subTree === vnode) {
  3098. parentComponent.vnode.el = el;
  3099. updateHOCHostEl(parentComponent, el);
  3100. }
  3101. }
  3102. function isVNodeSuspensible(vnode) {
  3103. var _a;
  3104. return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
  3105. }
  3106. function watchEffect(effect2, options) {
  3107. return doWatch(effect2, null, options);
  3108. }
  3109. function watchPostEffect(effect2, options) {
  3110. return doWatch(
  3111. effect2,
  3112. null,
  3113. true ? extend({}, options, { flush: "post" }) : { flush: "post" }
  3114. );
  3115. }
  3116. function watchSyncEffect(effect2, options) {
  3117. return doWatch(
  3118. effect2,
  3119. null,
  3120. true ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
  3121. );
  3122. }
  3123. var INITIAL_WATCHER_VALUE = {};
  3124. function watch(source, cb, options) {
  3125. if (!isFunction(cb)) {
  3126. warn2(
  3127. `\`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.`
  3128. );
  3129. }
  3130. return doWatch(source, cb, options);
  3131. }
  3132. function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
  3133. var _a;
  3134. if (!cb) {
  3135. if (immediate !== void 0) {
  3136. warn2(
  3137. `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
  3138. );
  3139. }
  3140. if (deep !== void 0) {
  3141. warn2(
  3142. `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
  3143. );
  3144. }
  3145. }
  3146. const warnInvalidSource = (s) => {
  3147. warn2(
  3148. `Invalid watch source: `,
  3149. s,
  3150. `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
  3151. );
  3152. };
  3153. const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;
  3154. let getter;
  3155. let forceTrigger = false;
  3156. let isMultiSource = false;
  3157. if (isRef(source)) {
  3158. getter = () => source.value;
  3159. forceTrigger = isShallow(source);
  3160. } else if (isReactive(source)) {
  3161. getter = () => source;
  3162. deep = true;
  3163. } else if (isArray(source)) {
  3164. isMultiSource = true;
  3165. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  3166. getter = () => source.map((s) => {
  3167. if (isRef(s)) {
  3168. return s.value;
  3169. } else if (isReactive(s)) {
  3170. return traverse(s);
  3171. } else if (isFunction(s)) {
  3172. return callWithErrorHandling(s, instance, 2);
  3173. } else {
  3174. warnInvalidSource(s);
  3175. }
  3176. });
  3177. } else if (isFunction(source)) {
  3178. if (cb) {
  3179. getter = () => callWithErrorHandling(source, instance, 2);
  3180. } else {
  3181. getter = () => {
  3182. if (instance && instance.isUnmounted) {
  3183. return;
  3184. }
  3185. if (cleanup) {
  3186. cleanup();
  3187. }
  3188. return callWithAsyncErrorHandling(
  3189. source,
  3190. instance,
  3191. 3,
  3192. [onCleanup]
  3193. );
  3194. };
  3195. }
  3196. } else {
  3197. getter = NOOP;
  3198. warnInvalidSource(source);
  3199. }
  3200. if (cb && deep) {
  3201. const baseGetter = getter;
  3202. getter = () => traverse(baseGetter());
  3203. }
  3204. let cleanup;
  3205. let onCleanup = (fn) => {
  3206. cleanup = effect2.onStop = () => {
  3207. callWithErrorHandling(fn, instance, 4);
  3208. cleanup = effect2.onStop = void 0;
  3209. };
  3210. };
  3211. let ssrCleanup;
  3212. if (isInSSRComponentSetup) {
  3213. onCleanup = NOOP;
  3214. if (!cb) {
  3215. getter();
  3216. } else if (immediate) {
  3217. callWithAsyncErrorHandling(cb, instance, 3, [
  3218. getter(),
  3219. isMultiSource ? [] : void 0,
  3220. onCleanup
  3221. ]);
  3222. }
  3223. if (flush === "sync") {
  3224. const ctx = useSSRContext();
  3225. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  3226. } else {
  3227. return NOOP;
  3228. }
  3229. }
  3230. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  3231. const job = () => {
  3232. if (!effect2.active) {
  3233. return;
  3234. }
  3235. if (cb) {
  3236. const newValue = effect2.run();
  3237. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
  3238. if (cleanup) {
  3239. cleanup();
  3240. }
  3241. callWithAsyncErrorHandling(cb, instance, 3, [
  3242. newValue,
  3243. // pass undefined as the old value when it's changed for the first time
  3244. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  3245. onCleanup
  3246. ]);
  3247. oldValue = newValue;
  3248. }
  3249. } else {
  3250. effect2.run();
  3251. }
  3252. };
  3253. job.allowRecurse = !!cb;
  3254. let scheduler;
  3255. if (flush === "sync") {
  3256. scheduler = job;
  3257. } else if (flush === "post") {
  3258. scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
  3259. } else {
  3260. job.pre = true;
  3261. if (instance)
  3262. job.id = instance.uid;
  3263. scheduler = () => queueJob(job);
  3264. }
  3265. const effect2 = new ReactiveEffect(getter, scheduler);
  3266. if (true) {
  3267. effect2.onTrack = onTrack;
  3268. effect2.onTrigger = onTrigger;
  3269. }
  3270. if (cb) {
  3271. if (immediate) {
  3272. job();
  3273. } else {
  3274. oldValue = effect2.run();
  3275. }
  3276. } else if (flush === "post") {
  3277. queuePostRenderEffect(
  3278. effect2.run.bind(effect2),
  3279. instance && instance.suspense
  3280. );
  3281. } else {
  3282. effect2.run();
  3283. }
  3284. const unwatch = () => {
  3285. effect2.stop();
  3286. if (instance && instance.scope) {
  3287. remove(instance.scope.effects, effect2);
  3288. }
  3289. };
  3290. if (ssrCleanup)
  3291. ssrCleanup.push(unwatch);
  3292. return unwatch;
  3293. }
  3294. function instanceWatch(source, value, options) {
  3295. const publicThis = this.proxy;
  3296. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  3297. let cb;
  3298. if (isFunction(value)) {
  3299. cb = value;
  3300. } else {
  3301. cb = value.handler;
  3302. options = value;
  3303. }
  3304. const cur = currentInstance;
  3305. setCurrentInstance(this);
  3306. const res = doWatch(getter, cb.bind(publicThis), options);
  3307. if (cur) {
  3308. setCurrentInstance(cur);
  3309. } else {
  3310. unsetCurrentInstance();
  3311. }
  3312. return res;
  3313. }
  3314. function createPathGetter(ctx, path) {
  3315. const segments = path.split(".");
  3316. return () => {
  3317. let cur = ctx;
  3318. for (let i = 0; i < segments.length && cur; i++) {
  3319. cur = cur[segments[i]];
  3320. }
  3321. return cur;
  3322. };
  3323. }
  3324. function traverse(value, seen) {
  3325. if (!isObject(value) || value["__v_skip"]) {
  3326. return value;
  3327. }
  3328. seen = seen || /* @__PURE__ */ new Set();
  3329. if (seen.has(value)) {
  3330. return value;
  3331. }
  3332. seen.add(value);
  3333. if (isRef(value)) {
  3334. traverse(value.value, seen);
  3335. } else if (isArray(value)) {
  3336. for (let i = 0; i < value.length; i++) {
  3337. traverse(value[i], seen);
  3338. }
  3339. } else if (isSet(value) || isMap(value)) {
  3340. value.forEach((v) => {
  3341. traverse(v, seen);
  3342. });
  3343. } else if (isPlainObject(value)) {
  3344. for (const key in value) {
  3345. traverse(value[key], seen);
  3346. }
  3347. }
  3348. return value;
  3349. }
  3350. function validateDirectiveName(name) {
  3351. if (isBuiltInDirective(name)) {
  3352. warn2("Do not use built-in directive ids as custom directive id: " + name);
  3353. }
  3354. }
  3355. function withDirectives(vnode, directives) {
  3356. const internalInstance = currentRenderingInstance;
  3357. if (internalInstance === null) {
  3358. warn2(`withDirectives can only be used inside render functions.`);
  3359. return vnode;
  3360. }
  3361. const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
  3362. const bindings = vnode.dirs || (vnode.dirs = []);
  3363. for (let i = 0; i < directives.length; i++) {
  3364. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  3365. if (dir) {
  3366. if (isFunction(dir)) {
  3367. dir = {
  3368. mounted: dir,
  3369. updated: dir
  3370. };
  3371. }
  3372. if (dir.deep) {
  3373. traverse(value);
  3374. }
  3375. bindings.push({
  3376. dir,
  3377. instance,
  3378. value,
  3379. oldValue: void 0,
  3380. arg,
  3381. modifiers
  3382. });
  3383. }
  3384. }
  3385. return vnode;
  3386. }
  3387. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  3388. const bindings = vnode.dirs;
  3389. const oldBindings = prevVNode && prevVNode.dirs;
  3390. for (let i = 0; i < bindings.length; i++) {
  3391. const binding = bindings[i];
  3392. if (oldBindings) {
  3393. binding.oldValue = oldBindings[i].value;
  3394. }
  3395. let hook = binding.dir[name];
  3396. if (hook) {
  3397. pauseTracking();
  3398. callWithAsyncErrorHandling(hook, instance, 8, [
  3399. vnode.el,
  3400. binding,
  3401. vnode,
  3402. prevVNode
  3403. ]);
  3404. resetTracking();
  3405. }
  3406. }
  3407. }
  3408. var leaveCbKey = Symbol("_leaveCb");
  3409. var enterCbKey = Symbol("_enterCb");
  3410. function useTransitionState() {
  3411. const state = {
  3412. isMounted: false,
  3413. isLeaving: false,
  3414. isUnmounting: false,
  3415. leavingVNodes: /* @__PURE__ */ new Map()
  3416. };
  3417. onMounted(() => {
  3418. state.isMounted = true;
  3419. });
  3420. onBeforeUnmount(() => {
  3421. state.isUnmounting = true;
  3422. });
  3423. return state;
  3424. }
  3425. var TransitionHookValidator = [Function, Array];
  3426. var BaseTransitionPropsValidators = {
  3427. mode: String,
  3428. appear: Boolean,
  3429. persisted: Boolean,
  3430. // enter
  3431. onBeforeEnter: TransitionHookValidator,
  3432. onEnter: TransitionHookValidator,
  3433. onAfterEnter: TransitionHookValidator,
  3434. onEnterCancelled: TransitionHookValidator,
  3435. // leave
  3436. onBeforeLeave: TransitionHookValidator,
  3437. onLeave: TransitionHookValidator,
  3438. onAfterLeave: TransitionHookValidator,
  3439. onLeaveCancelled: TransitionHookValidator,
  3440. // appear
  3441. onBeforeAppear: TransitionHookValidator,
  3442. onAppear: TransitionHookValidator,
  3443. onAfterAppear: TransitionHookValidator,
  3444. onAppearCancelled: TransitionHookValidator
  3445. };
  3446. var BaseTransitionImpl = {
  3447. name: `BaseTransition`,
  3448. props: BaseTransitionPropsValidators,
  3449. setup(props, { slots }) {
  3450. const instance = getCurrentInstance();
  3451. const state = useTransitionState();
  3452. let prevTransitionKey;
  3453. return () => {
  3454. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  3455. if (!children || !children.length) {
  3456. return;
  3457. }
  3458. let child = children[0];
  3459. if (children.length > 1) {
  3460. let hasFound = false;
  3461. for (const c of children) {
  3462. if (c.type !== Comment) {
  3463. if (hasFound) {
  3464. warn2(
  3465. "<transition> can only be used on a single element or component. Use <transition-group> for lists."
  3466. );
  3467. break;
  3468. }
  3469. child = c;
  3470. hasFound = true;
  3471. if (false)
  3472. break;
  3473. }
  3474. }
  3475. }
  3476. const rawProps = toRaw(props);
  3477. const { mode } = rawProps;
  3478. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
  3479. warn2(`invalid <transition> mode: ${mode}`);
  3480. }
  3481. if (state.isLeaving) {
  3482. return emptyPlaceholder(child);
  3483. }
  3484. const innerChild = getKeepAliveChild(child);
  3485. if (!innerChild) {
  3486. return emptyPlaceholder(child);
  3487. }
  3488. const enterHooks = resolveTransitionHooks(
  3489. innerChild,
  3490. rawProps,
  3491. state,
  3492. instance
  3493. );
  3494. setTransitionHooks(innerChild, enterHooks);
  3495. const oldChild = instance.subTree;
  3496. const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
  3497. let transitionKeyChanged = false;
  3498. const { getTransitionKey } = innerChild.type;
  3499. if (getTransitionKey) {
  3500. const key = getTransitionKey();
  3501. if (prevTransitionKey === void 0) {
  3502. prevTransitionKey = key;
  3503. } else if (key !== prevTransitionKey) {
  3504. prevTransitionKey = key;
  3505. transitionKeyChanged = true;
  3506. }
  3507. }
  3508. if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
  3509. const leavingHooks = resolveTransitionHooks(
  3510. oldInnerChild,
  3511. rawProps,
  3512. state,
  3513. instance
  3514. );
  3515. setTransitionHooks(oldInnerChild, leavingHooks);
  3516. if (mode === "out-in") {
  3517. state.isLeaving = true;
  3518. leavingHooks.afterLeave = () => {
  3519. state.isLeaving = false;
  3520. if (instance.update.active !== false) {
  3521. instance.update();
  3522. }
  3523. };
  3524. return emptyPlaceholder(child);
  3525. } else if (mode === "in-out" && innerChild.type !== Comment) {
  3526. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  3527. const leavingVNodesCache = getLeavingNodesForType(
  3528. state,
  3529. oldInnerChild
  3530. );
  3531. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  3532. el[leaveCbKey] = () => {
  3533. earlyRemove();
  3534. el[leaveCbKey] = void 0;
  3535. delete enterHooks.delayedLeave;
  3536. };
  3537. enterHooks.delayedLeave = delayedLeave;
  3538. };
  3539. }
  3540. }
  3541. return child;
  3542. };
  3543. }
  3544. };
  3545. var BaseTransition = BaseTransitionImpl;
  3546. function getLeavingNodesForType(state, vnode) {
  3547. const { leavingVNodes } = state;
  3548. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  3549. if (!leavingVNodesCache) {
  3550. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  3551. leavingVNodes.set(vnode.type, leavingVNodesCache);
  3552. }
  3553. return leavingVNodesCache;
  3554. }
  3555. function resolveTransitionHooks(vnode, props, state, instance) {
  3556. const {
  3557. appear,
  3558. mode,
  3559. persisted = false,
  3560. onBeforeEnter,
  3561. onEnter,
  3562. onAfterEnter,
  3563. onEnterCancelled,
  3564. onBeforeLeave,
  3565. onLeave,
  3566. onAfterLeave,
  3567. onLeaveCancelled,
  3568. onBeforeAppear,
  3569. onAppear,
  3570. onAfterAppear,
  3571. onAppearCancelled
  3572. } = props;
  3573. const key = String(vnode.key);
  3574. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  3575. const callHook3 = (hook, args) => {
  3576. hook && callWithAsyncErrorHandling(
  3577. hook,
  3578. instance,
  3579. 9,
  3580. args
  3581. );
  3582. };
  3583. const callAsyncHook = (hook, args) => {
  3584. const done = args[1];
  3585. callHook3(hook, args);
  3586. if (isArray(hook)) {
  3587. if (hook.every((hook2) => hook2.length <= 1))
  3588. done();
  3589. } else if (hook.length <= 1) {
  3590. done();
  3591. }
  3592. };
  3593. const hooks = {
  3594. mode,
  3595. persisted,
  3596. beforeEnter(el) {
  3597. let hook = onBeforeEnter;
  3598. if (!state.isMounted) {
  3599. if (appear) {
  3600. hook = onBeforeAppear || onBeforeEnter;
  3601. } else {
  3602. return;
  3603. }
  3604. }
  3605. if (el[leaveCbKey]) {
  3606. el[leaveCbKey](
  3607. true
  3608. /* cancelled */
  3609. );
  3610. }
  3611. const leavingVNode = leavingVNodesCache[key];
  3612. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  3613. leavingVNode.el[leaveCbKey]();
  3614. }
  3615. callHook3(hook, [el]);
  3616. },
  3617. enter(el) {
  3618. let hook = onEnter;
  3619. let afterHook = onAfterEnter;
  3620. let cancelHook = onEnterCancelled;
  3621. if (!state.isMounted) {
  3622. if (appear) {
  3623. hook = onAppear || onEnter;
  3624. afterHook = onAfterAppear || onAfterEnter;
  3625. cancelHook = onAppearCancelled || onEnterCancelled;
  3626. } else {
  3627. return;
  3628. }
  3629. }
  3630. let called = false;
  3631. const done = el[enterCbKey] = (cancelled) => {
  3632. if (called)
  3633. return;
  3634. called = true;
  3635. if (cancelled) {
  3636. callHook3(cancelHook, [el]);
  3637. } else {
  3638. callHook3(afterHook, [el]);
  3639. }
  3640. if (hooks.delayedLeave) {
  3641. hooks.delayedLeave();
  3642. }
  3643. el[enterCbKey] = void 0;
  3644. };
  3645. if (hook) {
  3646. callAsyncHook(hook, [el, done]);
  3647. } else {
  3648. done();
  3649. }
  3650. },
  3651. leave(el, remove2) {
  3652. const key2 = String(vnode.key);
  3653. if (el[enterCbKey]) {
  3654. el[enterCbKey](
  3655. true
  3656. /* cancelled */
  3657. );
  3658. }
  3659. if (state.isUnmounting) {
  3660. return remove2();
  3661. }
  3662. callHook3(onBeforeLeave, [el]);
  3663. let called = false;
  3664. const done = el[leaveCbKey] = (cancelled) => {
  3665. if (called)
  3666. return;
  3667. called = true;
  3668. remove2();
  3669. if (cancelled) {
  3670. callHook3(onLeaveCancelled, [el]);
  3671. } else {
  3672. callHook3(onAfterLeave, [el]);
  3673. }
  3674. el[leaveCbKey] = void 0;
  3675. if (leavingVNodesCache[key2] === vnode) {
  3676. delete leavingVNodesCache[key2];
  3677. }
  3678. };
  3679. leavingVNodesCache[key2] = vnode;
  3680. if (onLeave) {
  3681. callAsyncHook(onLeave, [el, done]);
  3682. } else {
  3683. done();
  3684. }
  3685. },
  3686. clone(vnode2) {
  3687. return resolveTransitionHooks(vnode2, props, state, instance);
  3688. }
  3689. };
  3690. return hooks;
  3691. }
  3692. function emptyPlaceholder(vnode) {
  3693. if (isKeepAlive(vnode)) {
  3694. vnode = cloneVNode(vnode);
  3695. vnode.children = null;
  3696. return vnode;
  3697. }
  3698. }
  3699. function getKeepAliveChild(vnode) {
  3700. return isKeepAlive(vnode) ? (
  3701. // #7121 ensure get the child component subtree in case
  3702. // it's been replaced during HMR
  3703. vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
  3704. ) : vnode;
  3705. }
  3706. function setTransitionHooks(vnode, hooks) {
  3707. if (vnode.shapeFlag & 6 && vnode.component) {
  3708. setTransitionHooks(vnode.component.subTree, hooks);
  3709. } else if (vnode.shapeFlag & 128) {
  3710. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  3711. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  3712. } else {
  3713. vnode.transition = hooks;
  3714. }
  3715. }
  3716. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  3717. let ret = [];
  3718. let keyedFragmentCount = 0;
  3719. for (let i = 0; i < children.length; i++) {
  3720. let child = children[i];
  3721. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  3722. if (child.type === Fragment) {
  3723. if (child.patchFlag & 128)
  3724. keyedFragmentCount++;
  3725. ret = ret.concat(
  3726. getTransitionRawChildren(child.children, keepComment, key)
  3727. );
  3728. } else if (keepComment || child.type !== Comment) {
  3729. ret.push(key != null ? cloneVNode(child, { key }) : child);
  3730. }
  3731. }
  3732. if (keyedFragmentCount > 1) {
  3733. for (let i = 0; i < ret.length; i++) {
  3734. ret[i].patchFlag = -2;
  3735. }
  3736. }
  3737. return ret;
  3738. }
  3739. function defineComponent(options, extraOptions) {
  3740. return isFunction(options) ? (
  3741. // #8326: extend call and options.name access are considered side-effects
  3742. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  3743. (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  3744. ) : options;
  3745. }
  3746. var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  3747. function defineAsyncComponent(source) {
  3748. if (isFunction(source)) {
  3749. source = { loader: source };
  3750. }
  3751. const {
  3752. loader,
  3753. loadingComponent,
  3754. errorComponent,
  3755. delay = 200,
  3756. timeout,
  3757. // undefined = never times out
  3758. suspensible = true,
  3759. onError: userOnError
  3760. } = source;
  3761. let pendingRequest = null;
  3762. let resolvedComp;
  3763. let retries = 0;
  3764. const retry = () => {
  3765. retries++;
  3766. pendingRequest = null;
  3767. return load();
  3768. };
  3769. const load = () => {
  3770. let thisRequest;
  3771. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  3772. err = err instanceof Error ? err : new Error(String(err));
  3773. if (userOnError) {
  3774. return new Promise((resolve2, reject) => {
  3775. const userRetry = () => resolve2(retry());
  3776. const userFail = () => reject(err);
  3777. userOnError(err, userRetry, userFail, retries + 1);
  3778. });
  3779. } else {
  3780. throw err;
  3781. }
  3782. }).then((comp) => {
  3783. if (thisRequest !== pendingRequest && pendingRequest) {
  3784. return pendingRequest;
  3785. }
  3786. if (!comp) {
  3787. warn2(
  3788. `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
  3789. );
  3790. }
  3791. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
  3792. comp = comp.default;
  3793. }
  3794. if (comp && !isObject(comp) && !isFunction(comp)) {
  3795. throw new Error(`Invalid async component load result: ${comp}`);
  3796. }
  3797. resolvedComp = comp;
  3798. return comp;
  3799. }));
  3800. };
  3801. return defineComponent({
  3802. name: "AsyncComponentWrapper",
  3803. __asyncLoader: load,
  3804. get __asyncResolved() {
  3805. return resolvedComp;
  3806. },
  3807. setup() {
  3808. const instance = currentInstance;
  3809. if (resolvedComp) {
  3810. return () => createInnerComp(resolvedComp, instance);
  3811. }
  3812. const onError = (err) => {
  3813. pendingRequest = null;
  3814. handleError(
  3815. err,
  3816. instance,
  3817. 13,
  3818. !errorComponent
  3819. /* do not throw in dev if user provided error component */
  3820. );
  3821. };
  3822. if (suspensible && instance.suspense || isInSSRComponentSetup) {
  3823. return load().then((comp) => {
  3824. return () => createInnerComp(comp, instance);
  3825. }).catch((err) => {
  3826. onError(err);
  3827. return () => errorComponent ? createVNode(errorComponent, {
  3828. error: err
  3829. }) : null;
  3830. });
  3831. }
  3832. const loaded = ref(false);
  3833. const error = ref();
  3834. const delayed = ref(!!delay);
  3835. if (delay) {
  3836. setTimeout(() => {
  3837. delayed.value = false;
  3838. }, delay);
  3839. }
  3840. if (timeout != null) {
  3841. setTimeout(() => {
  3842. if (!loaded.value && !error.value) {
  3843. const err = new Error(
  3844. `Async component timed out after ${timeout}ms.`
  3845. );
  3846. onError(err);
  3847. error.value = err;
  3848. }
  3849. }, timeout);
  3850. }
  3851. load().then(() => {
  3852. loaded.value = true;
  3853. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  3854. queueJob(instance.parent.update);
  3855. }
  3856. }).catch((err) => {
  3857. onError(err);
  3858. error.value = err;
  3859. });
  3860. return () => {
  3861. if (loaded.value && resolvedComp) {
  3862. return createInnerComp(resolvedComp, instance);
  3863. } else if (error.value && errorComponent) {
  3864. return createVNode(errorComponent, {
  3865. error: error.value
  3866. });
  3867. } else if (loadingComponent && !delayed.value) {
  3868. return createVNode(loadingComponent);
  3869. }
  3870. };
  3871. }
  3872. });
  3873. }
  3874. function createInnerComp(comp, parent) {
  3875. const { ref: ref2, props, children, ce } = parent.vnode;
  3876. const vnode = createVNode(comp, props, children);
  3877. vnode.ref = ref2;
  3878. vnode.ce = ce;
  3879. delete parent.vnode.ce;
  3880. return vnode;
  3881. }
  3882. var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  3883. var KeepAliveImpl = {
  3884. name: `KeepAlive`,
  3885. // Marker for special handling inside the renderer. We are not using a ===
  3886. // check directly on KeepAlive in the renderer, because importing it directly
  3887. // would prevent it from being tree-shaken.
  3888. __isKeepAlive: true,
  3889. props: {
  3890. include: [String, RegExp, Array],
  3891. exclude: [String, RegExp, Array],
  3892. max: [String, Number]
  3893. },
  3894. setup(props, { slots }) {
  3895. const instance = getCurrentInstance();
  3896. const sharedContext = instance.ctx;
  3897. if (!sharedContext.renderer) {
  3898. return () => {
  3899. const children = slots.default && slots.default();
  3900. return children && children.length === 1 ? children[0] : children;
  3901. };
  3902. }
  3903. const cache = /* @__PURE__ */ new Map();
  3904. const keys = /* @__PURE__ */ new Set();
  3905. let current = null;
  3906. if (true) {
  3907. instance.__v_cache = cache;
  3908. }
  3909. const parentSuspense = instance.suspense;
  3910. const {
  3911. renderer: {
  3912. p: patch,
  3913. m: move,
  3914. um: _unmount,
  3915. o: { createElement }
  3916. }
  3917. } = sharedContext;
  3918. const storageContainer = createElement("div");
  3919. sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
  3920. const instance2 = vnode.component;
  3921. move(vnode, container, anchor, 0, parentSuspense);
  3922. patch(
  3923. instance2.vnode,
  3924. vnode,
  3925. container,
  3926. anchor,
  3927. instance2,
  3928. parentSuspense,
  3929. isSVG,
  3930. vnode.slotScopeIds,
  3931. optimized
  3932. );
  3933. queuePostRenderEffect(() => {
  3934. instance2.isDeactivated = false;
  3935. if (instance2.a) {
  3936. invokeArrayFns(instance2.a);
  3937. }
  3938. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  3939. if (vnodeHook) {
  3940. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  3941. }
  3942. }, parentSuspense);
  3943. if (true) {
  3944. devtoolsComponentAdded(instance2);
  3945. }
  3946. };
  3947. sharedContext.deactivate = (vnode) => {
  3948. const instance2 = vnode.component;
  3949. move(vnode, storageContainer, null, 1, parentSuspense);
  3950. queuePostRenderEffect(() => {
  3951. if (instance2.da) {
  3952. invokeArrayFns(instance2.da);
  3953. }
  3954. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  3955. if (vnodeHook) {
  3956. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  3957. }
  3958. instance2.isDeactivated = true;
  3959. }, parentSuspense);
  3960. if (true) {
  3961. devtoolsComponentAdded(instance2);
  3962. }
  3963. };
  3964. function unmount(vnode) {
  3965. resetShapeFlag(vnode);
  3966. _unmount(vnode, instance, parentSuspense, true);
  3967. }
  3968. function pruneCache(filter) {
  3969. cache.forEach((vnode, key) => {
  3970. const name = getComponentName(vnode.type);
  3971. if (name && (!filter || !filter(name))) {
  3972. pruneCacheEntry(key);
  3973. }
  3974. });
  3975. }
  3976. function pruneCacheEntry(key) {
  3977. const cached = cache.get(key);
  3978. if (!current || !isSameVNodeType(cached, current)) {
  3979. unmount(cached);
  3980. } else if (current) {
  3981. resetShapeFlag(current);
  3982. }
  3983. cache.delete(key);
  3984. keys.delete(key);
  3985. }
  3986. watch(
  3987. () => [props.include, props.exclude],
  3988. ([include, exclude]) => {
  3989. include && pruneCache((name) => matches(include, name));
  3990. exclude && pruneCache((name) => !matches(exclude, name));
  3991. },
  3992. // prune post-render after `current` has been updated
  3993. { flush: "post", deep: true }
  3994. );
  3995. let pendingCacheKey = null;
  3996. const cacheSubtree = () => {
  3997. if (pendingCacheKey != null) {
  3998. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  3999. }
  4000. };
  4001. onMounted(cacheSubtree);
  4002. onUpdated(cacheSubtree);
  4003. onBeforeUnmount(() => {
  4004. cache.forEach((cached) => {
  4005. const { subTree, suspense } = instance;
  4006. const vnode = getInnerChild(subTree);
  4007. if (cached.type === vnode.type && cached.key === vnode.key) {
  4008. resetShapeFlag(vnode);
  4009. const da = vnode.component.da;
  4010. da && queuePostRenderEffect(da, suspense);
  4011. return;
  4012. }
  4013. unmount(cached);
  4014. });
  4015. });
  4016. return () => {
  4017. pendingCacheKey = null;
  4018. if (!slots.default) {
  4019. return null;
  4020. }
  4021. const children = slots.default();
  4022. const rawVNode = children[0];
  4023. if (children.length > 1) {
  4024. if (true) {
  4025. warn2(`KeepAlive should contain exactly one component child.`);
  4026. }
  4027. current = null;
  4028. return children;
  4029. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  4030. current = null;
  4031. return rawVNode;
  4032. }
  4033. let vnode = getInnerChild(rawVNode);
  4034. const comp = vnode.type;
  4035. const name = getComponentName(
  4036. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  4037. );
  4038. const { include, exclude, max } = props;
  4039. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  4040. current = vnode;
  4041. return rawVNode;
  4042. }
  4043. const key = vnode.key == null ? comp : vnode.key;
  4044. const cachedVNode = cache.get(key);
  4045. if (vnode.el) {
  4046. vnode = cloneVNode(vnode);
  4047. if (rawVNode.shapeFlag & 128) {
  4048. rawVNode.ssContent = vnode;
  4049. }
  4050. }
  4051. pendingCacheKey = key;
  4052. if (cachedVNode) {
  4053. vnode.el = cachedVNode.el;
  4054. vnode.component = cachedVNode.component;
  4055. if (vnode.transition) {
  4056. setTransitionHooks(vnode, vnode.transition);
  4057. }
  4058. vnode.shapeFlag |= 512;
  4059. keys.delete(key);
  4060. keys.add(key);
  4061. } else {
  4062. keys.add(key);
  4063. if (max && keys.size > parseInt(max, 10)) {
  4064. pruneCacheEntry(keys.values().next().value);
  4065. }
  4066. }
  4067. vnode.shapeFlag |= 256;
  4068. current = vnode;
  4069. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  4070. };
  4071. }
  4072. };
  4073. var KeepAlive = KeepAliveImpl;
  4074. function matches(pattern, name) {
  4075. if (isArray(pattern)) {
  4076. return pattern.some((p2) => matches(p2, name));
  4077. } else if (isString(pattern)) {
  4078. return pattern.split(",").includes(name);
  4079. } else if (isRegExp(pattern)) {
  4080. return pattern.test(name);
  4081. }
  4082. return false;
  4083. }
  4084. function onActivated(hook, target) {
  4085. registerKeepAliveHook(hook, "a", target);
  4086. }
  4087. function onDeactivated(hook, target) {
  4088. registerKeepAliveHook(hook, "da", target);
  4089. }
  4090. function registerKeepAliveHook(hook, type, target = currentInstance) {
  4091. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  4092. let current = target;
  4093. while (current) {
  4094. if (current.isDeactivated) {
  4095. return;
  4096. }
  4097. current = current.parent;
  4098. }
  4099. return hook();
  4100. });
  4101. injectHook(type, wrappedHook, target);
  4102. if (target) {
  4103. let current = target.parent;
  4104. while (current && current.parent) {
  4105. if (isKeepAlive(current.parent.vnode)) {
  4106. injectToKeepAliveRoot(wrappedHook, type, target, current);
  4107. }
  4108. current = current.parent;
  4109. }
  4110. }
  4111. }
  4112. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  4113. const injected = injectHook(
  4114. type,
  4115. hook,
  4116. keepAliveRoot,
  4117. true
  4118. /* prepend */
  4119. );
  4120. onUnmounted(() => {
  4121. remove(keepAliveRoot[type], injected);
  4122. }, target);
  4123. }
  4124. function resetShapeFlag(vnode) {
  4125. vnode.shapeFlag &= ~256;
  4126. vnode.shapeFlag &= ~512;
  4127. }
  4128. function getInnerChild(vnode) {
  4129. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  4130. }
  4131. function injectHook(type, hook, target = currentInstance, prepend = false) {
  4132. if (target) {
  4133. const hooks = target[type] || (target[type] = []);
  4134. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  4135. if (target.isUnmounted) {
  4136. return;
  4137. }
  4138. pauseTracking();
  4139. setCurrentInstance(target);
  4140. const res = callWithAsyncErrorHandling(hook, target, type, args);
  4141. unsetCurrentInstance();
  4142. resetTracking();
  4143. return res;
  4144. });
  4145. if (prepend) {
  4146. hooks.unshift(wrappedHook);
  4147. } else {
  4148. hooks.push(wrappedHook);
  4149. }
  4150. return wrappedHook;
  4151. } else if (true) {
  4152. const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ""));
  4153. warn2(
  4154. `${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.`
  4155. );
  4156. }
  4157. }
  4158. var createHook = (lifecycle) => (hook, target = currentInstance) => (
  4159. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  4160. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  4161. );
  4162. var onBeforeMount = createHook("bm");
  4163. var onMounted = createHook("m");
  4164. var onBeforeUpdate = createHook("bu");
  4165. var onUpdated = createHook("u");
  4166. var onBeforeUnmount = createHook("bum");
  4167. var onUnmounted = createHook("um");
  4168. var onServerPrefetch = createHook("sp");
  4169. var onRenderTriggered = createHook(
  4170. "rtg"
  4171. );
  4172. var onRenderTracked = createHook(
  4173. "rtc"
  4174. );
  4175. function onErrorCaptured(hook, target = currentInstance) {
  4176. injectHook("ec", hook, target);
  4177. }
  4178. function renderList(source, renderItem, cache, index) {
  4179. let ret;
  4180. const cached = cache && cache[index];
  4181. if (isArray(source) || isString(source)) {
  4182. ret = new Array(source.length);
  4183. for (let i = 0, l = source.length; i < l; i++) {
  4184. ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
  4185. }
  4186. } else if (typeof source === "number") {
  4187. if (!Number.isInteger(source)) {
  4188. warn2(`The v-for range expect an integer value but got ${source}.`);
  4189. }
  4190. ret = new Array(source);
  4191. for (let i = 0; i < source; i++) {
  4192. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  4193. }
  4194. } else if (isObject(source)) {
  4195. if (source[Symbol.iterator]) {
  4196. ret = Array.from(
  4197. source,
  4198. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  4199. );
  4200. } else {
  4201. const keys = Object.keys(source);
  4202. ret = new Array(keys.length);
  4203. for (let i = 0, l = keys.length; i < l; i++) {
  4204. const key = keys[i];
  4205. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  4206. }
  4207. }
  4208. } else {
  4209. ret = [];
  4210. }
  4211. if (cache) {
  4212. cache[index] = ret;
  4213. }
  4214. return ret;
  4215. }
  4216. function createSlots(slots, dynamicSlots) {
  4217. for (let i = 0; i < dynamicSlots.length; i++) {
  4218. const slot = dynamicSlots[i];
  4219. if (isArray(slot)) {
  4220. for (let j = 0; j < slot.length; j++) {
  4221. slots[slot[j].name] = slot[j].fn;
  4222. }
  4223. } else if (slot) {
  4224. slots[slot.name] = slot.key ? (...args) => {
  4225. const res = slot.fn(...args);
  4226. if (res)
  4227. res.key = slot.key;
  4228. return res;
  4229. } : slot.fn;
  4230. }
  4231. }
  4232. return slots;
  4233. }
  4234. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  4235. if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
  4236. if (name !== "default")
  4237. props.name = name;
  4238. return createVNode("slot", props, fallback && fallback());
  4239. }
  4240. let slot = slots[name];
  4241. if (slot && slot.length > 1) {
  4242. warn2(
  4243. `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.`
  4244. );
  4245. slot = () => [];
  4246. }
  4247. if (slot && slot._c) {
  4248. slot._d = false;
  4249. }
  4250. openBlock();
  4251. const validSlotContent = slot && ensureValidVNode(slot(props));
  4252. const rendered = createBlock(
  4253. Fragment,
  4254. {
  4255. key: props.key || // slot content array of a dynamic conditional slot may have a branch
  4256. // key attached in the `createSlots` helper, respect that
  4257. validSlotContent && validSlotContent.key || `_${name}`
  4258. },
  4259. validSlotContent || (fallback ? fallback() : []),
  4260. validSlotContent && slots._ === 1 ? 64 : -2
  4261. );
  4262. if (!noSlotted && rendered.scopeId) {
  4263. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  4264. }
  4265. if (slot && slot._c) {
  4266. slot._d = true;
  4267. }
  4268. return rendered;
  4269. }
  4270. function ensureValidVNode(vnodes) {
  4271. return vnodes.some((child) => {
  4272. if (!isVNode(child))
  4273. return true;
  4274. if (child.type === Comment)
  4275. return false;
  4276. if (child.type === Fragment && !ensureValidVNode(child.children))
  4277. return false;
  4278. return true;
  4279. }) ? vnodes : null;
  4280. }
  4281. function toHandlers(obj, preserveCaseIfNecessary) {
  4282. const ret = {};
  4283. if (!isObject(obj)) {
  4284. warn2(`v-on with no argument expects an object value.`);
  4285. return ret;
  4286. }
  4287. for (const key in obj) {
  4288. ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  4289. }
  4290. return ret;
  4291. }
  4292. var getPublicInstance = (i) => {
  4293. if (!i)
  4294. return null;
  4295. if (isStatefulComponent(i))
  4296. return getExposeProxy(i) || i.proxy;
  4297. return getPublicInstance(i.parent);
  4298. };
  4299. var publicPropertiesMap = (
  4300. // Move PURE marker to new line to workaround compiler discarding it
  4301. // due to type annotation
  4302. extend(/* @__PURE__ */ Object.create(null), {
  4303. $: (i) => i,
  4304. $el: (i) => i.vnode.el,
  4305. $data: (i) => i.data,
  4306. $props: (i) => true ? shallowReadonly(i.props) : i.props,
  4307. $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
  4308. $slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
  4309. $refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
  4310. $parent: (i) => getPublicInstance(i.parent),
  4311. $root: (i) => getPublicInstance(i.root),
  4312. $emit: (i) => i.emit,
  4313. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  4314. $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
  4315. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  4316. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  4317. })
  4318. );
  4319. var isReservedPrefix = (key) => key === "_" || key === "$";
  4320. var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  4321. var PublicInstanceProxyHandlers = {
  4322. get({ _: instance }, key) {
  4323. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  4324. if (key === "__isVue") {
  4325. return true;
  4326. }
  4327. let normalizedProps;
  4328. if (key[0] !== "$") {
  4329. const n = accessCache[key];
  4330. if (n !== void 0) {
  4331. switch (n) {
  4332. case 1:
  4333. return setupState[key];
  4334. case 2:
  4335. return data[key];
  4336. case 4:
  4337. return ctx[key];
  4338. case 3:
  4339. return props[key];
  4340. }
  4341. } else if (hasSetupBinding(setupState, key)) {
  4342. accessCache[key] = 1;
  4343. return setupState[key];
  4344. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  4345. accessCache[key] = 2;
  4346. return data[key];
  4347. } else if (
  4348. // only cache other properties when instance has declared (thus stable)
  4349. // props
  4350. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  4351. ) {
  4352. accessCache[key] = 3;
  4353. return props[key];
  4354. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  4355. accessCache[key] = 4;
  4356. return ctx[key];
  4357. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
  4358. accessCache[key] = 0;
  4359. }
  4360. }
  4361. const publicGetter = publicPropertiesMap[key];
  4362. let cssModule, globalProperties;
  4363. if (publicGetter) {
  4364. if (key === "$attrs") {
  4365. track(instance, "get", key);
  4366. markAttrsAccessed();
  4367. } else if (key === "$slots") {
  4368. track(instance, "get", key);
  4369. }
  4370. return publicGetter(instance);
  4371. } else if (
  4372. // css module (injected by vue-loader)
  4373. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  4374. ) {
  4375. return cssModule;
  4376. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  4377. accessCache[key] = 4;
  4378. return ctx[key];
  4379. } else if (
  4380. // global properties
  4381. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  4382. ) {
  4383. {
  4384. return globalProperties[key];
  4385. }
  4386. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  4387. // to infinite warning loop
  4388. key.indexOf("__v") !== 0)) {
  4389. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  4390. warn2(
  4391. `Property ${JSON.stringify(
  4392. key
  4393. )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
  4394. );
  4395. } else if (instance === currentRenderingInstance) {
  4396. warn2(
  4397. `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
  4398. );
  4399. }
  4400. }
  4401. },
  4402. set({ _: instance }, key, value) {
  4403. const { data, setupState, ctx } = instance;
  4404. if (hasSetupBinding(setupState, key)) {
  4405. setupState[key] = value;
  4406. return true;
  4407. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  4408. warn2(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  4409. return false;
  4410. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  4411. data[key] = value;
  4412. return true;
  4413. } else if (hasOwn(instance.props, key)) {
  4414. warn2(`Attempting to mutate prop "${key}". Props are readonly.`);
  4415. return false;
  4416. }
  4417. if (key[0] === "$" && key.slice(1) in instance) {
  4418. warn2(
  4419. `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
  4420. );
  4421. return false;
  4422. } else {
  4423. if (key in instance.appContext.config.globalProperties) {
  4424. Object.defineProperty(ctx, key, {
  4425. enumerable: true,
  4426. configurable: true,
  4427. value
  4428. });
  4429. } else {
  4430. ctx[key] = value;
  4431. }
  4432. }
  4433. return true;
  4434. },
  4435. has({
  4436. _: { data, setupState, accessCache, ctx, appContext, propsOptions }
  4437. }, key) {
  4438. let normalizedProps;
  4439. 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);
  4440. },
  4441. defineProperty(target, key, descriptor) {
  4442. if (descriptor.get != null) {
  4443. target._.accessCache[key] = 0;
  4444. } else if (hasOwn(descriptor, "value")) {
  4445. this.set(target, key, descriptor.value, null);
  4446. }
  4447. return Reflect.defineProperty(target, key, descriptor);
  4448. }
  4449. };
  4450. if (true) {
  4451. PublicInstanceProxyHandlers.ownKeys = (target) => {
  4452. warn2(
  4453. `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
  4454. );
  4455. return Reflect.ownKeys(target);
  4456. };
  4457. }
  4458. var RuntimeCompiledPublicInstanceProxyHandlers = extend(
  4459. {},
  4460. PublicInstanceProxyHandlers,
  4461. {
  4462. get(target, key) {
  4463. if (key === Symbol.unscopables) {
  4464. return;
  4465. }
  4466. return PublicInstanceProxyHandlers.get(target, key, target);
  4467. },
  4468. has(_, key) {
  4469. const has2 = key[0] !== "_" && !isGloballyAllowed(key);
  4470. if (!has2 && PublicInstanceProxyHandlers.has(_, key)) {
  4471. warn2(
  4472. `Property ${JSON.stringify(
  4473. key
  4474. )} should not start with _ which is a reserved prefix for Vue internals.`
  4475. );
  4476. }
  4477. return has2;
  4478. }
  4479. }
  4480. );
  4481. function createDevRenderContext(instance) {
  4482. const target = {};
  4483. Object.defineProperty(target, `_`, {
  4484. configurable: true,
  4485. enumerable: false,
  4486. get: () => instance
  4487. });
  4488. Object.keys(publicPropertiesMap).forEach((key) => {
  4489. Object.defineProperty(target, key, {
  4490. configurable: true,
  4491. enumerable: false,
  4492. get: () => publicPropertiesMap[key](instance),
  4493. // intercepted by the proxy so no need for implementation,
  4494. // but needed to prevent set errors
  4495. set: NOOP
  4496. });
  4497. });
  4498. return target;
  4499. }
  4500. function exposePropsOnRenderContext(instance) {
  4501. const {
  4502. ctx,
  4503. propsOptions: [propsOptions]
  4504. } = instance;
  4505. if (propsOptions) {
  4506. Object.keys(propsOptions).forEach((key) => {
  4507. Object.defineProperty(ctx, key, {
  4508. enumerable: true,
  4509. configurable: true,
  4510. get: () => instance.props[key],
  4511. set: NOOP
  4512. });
  4513. });
  4514. }
  4515. }
  4516. function exposeSetupStateOnRenderContext(instance) {
  4517. const { ctx, setupState } = instance;
  4518. Object.keys(toRaw(setupState)).forEach((key) => {
  4519. if (!setupState.__isScriptSetup) {
  4520. if (isReservedPrefix(key[0])) {
  4521. warn2(
  4522. `setup() return property ${JSON.stringify(
  4523. key
  4524. )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
  4525. );
  4526. return;
  4527. }
  4528. Object.defineProperty(ctx, key, {
  4529. enumerable: true,
  4530. configurable: true,
  4531. get: () => setupState[key],
  4532. set: NOOP
  4533. });
  4534. }
  4535. });
  4536. }
  4537. var warnRuntimeUsage = (method) => warn2(
  4538. `${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.`
  4539. );
  4540. function defineProps() {
  4541. if (true) {
  4542. warnRuntimeUsage(`defineProps`);
  4543. }
  4544. return null;
  4545. }
  4546. function defineEmits() {
  4547. if (true) {
  4548. warnRuntimeUsage(`defineEmits`);
  4549. }
  4550. return null;
  4551. }
  4552. function defineExpose(exposed) {
  4553. if (true) {
  4554. warnRuntimeUsage(`defineExpose`);
  4555. }
  4556. }
  4557. function defineOptions(options) {
  4558. if (true) {
  4559. warnRuntimeUsage(`defineOptions`);
  4560. }
  4561. }
  4562. function defineSlots() {
  4563. if (true) {
  4564. warnRuntimeUsage(`defineSlots`);
  4565. }
  4566. return null;
  4567. }
  4568. function defineModel() {
  4569. if (true) {
  4570. warnRuntimeUsage("defineModel");
  4571. }
  4572. }
  4573. function withDefaults(props, defaults) {
  4574. if (true) {
  4575. warnRuntimeUsage(`withDefaults`);
  4576. }
  4577. return null;
  4578. }
  4579. function useSlots() {
  4580. return getContext().slots;
  4581. }
  4582. function useAttrs() {
  4583. return getContext().attrs;
  4584. }
  4585. function useModel(props, name, options) {
  4586. const i = getCurrentInstance();
  4587. if (!i) {
  4588. warn2(`useModel() called without active instance.`);
  4589. return ref();
  4590. }
  4591. if (!i.propsOptions[0][name]) {
  4592. warn2(`useModel() called with prop "${name}" which is not declared.`);
  4593. return ref();
  4594. }
  4595. if (options && options.local) {
  4596. const proxy = ref(props[name]);
  4597. watch(
  4598. () => props[name],
  4599. (v) => proxy.value = v
  4600. );
  4601. watch(proxy, (value) => {
  4602. if (value !== props[name]) {
  4603. i.emit(`update:${name}`, value);
  4604. }
  4605. });
  4606. return proxy;
  4607. } else {
  4608. return {
  4609. __v_isRef: true,
  4610. get value() {
  4611. return props[name];
  4612. },
  4613. set value(value) {
  4614. i.emit(`update:${name}`, value);
  4615. }
  4616. };
  4617. }
  4618. }
  4619. function getContext() {
  4620. const i = getCurrentInstance();
  4621. if (!i) {
  4622. warn2(`useContext() called without active instance.`);
  4623. }
  4624. return i.setupContext || (i.setupContext = createSetupContext(i));
  4625. }
  4626. function normalizePropsOrEmits(props) {
  4627. return isArray(props) ? props.reduce(
  4628. (normalized, p2) => (normalized[p2] = null, normalized),
  4629. {}
  4630. ) : props;
  4631. }
  4632. function mergeDefaults(raw, defaults) {
  4633. const props = normalizePropsOrEmits(raw);
  4634. for (const key in defaults) {
  4635. if (key.startsWith("__skip"))
  4636. continue;
  4637. let opt = props[key];
  4638. if (opt) {
  4639. if (isArray(opt) || isFunction(opt)) {
  4640. opt = props[key] = { type: opt, default: defaults[key] };
  4641. } else {
  4642. opt.default = defaults[key];
  4643. }
  4644. } else if (opt === null) {
  4645. opt = props[key] = { default: defaults[key] };
  4646. } else if (true) {
  4647. warn2(`props default key "${key}" has no corresponding declaration.`);
  4648. }
  4649. if (opt && defaults[`__skip_${key}`]) {
  4650. opt.skipFactory = true;
  4651. }
  4652. }
  4653. return props;
  4654. }
  4655. function mergeModels(a, b) {
  4656. if (!a || !b)
  4657. return a || b;
  4658. if (isArray(a) && isArray(b))
  4659. return a.concat(b);
  4660. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  4661. }
  4662. function createPropsRestProxy(props, excludedKeys) {
  4663. const ret = {};
  4664. for (const key in props) {
  4665. if (!excludedKeys.includes(key)) {
  4666. Object.defineProperty(ret, key, {
  4667. enumerable: true,
  4668. get: () => props[key]
  4669. });
  4670. }
  4671. }
  4672. return ret;
  4673. }
  4674. function withAsyncContext(getAwaitable) {
  4675. const ctx = getCurrentInstance();
  4676. if (!ctx) {
  4677. warn2(
  4678. `withAsyncContext called without active current instance. This is likely a bug.`
  4679. );
  4680. }
  4681. let awaitable = getAwaitable();
  4682. unsetCurrentInstance();
  4683. if (isPromise(awaitable)) {
  4684. awaitable = awaitable.catch((e) => {
  4685. setCurrentInstance(ctx);
  4686. throw e;
  4687. });
  4688. }
  4689. return [awaitable, () => setCurrentInstance(ctx)];
  4690. }
  4691. function createDuplicateChecker() {
  4692. const cache = /* @__PURE__ */ Object.create(null);
  4693. return (type, key) => {
  4694. if (cache[key]) {
  4695. warn2(`${type} property "${key}" is already defined in ${cache[key]}.`);
  4696. } else {
  4697. cache[key] = type;
  4698. }
  4699. };
  4700. }
  4701. var shouldCacheAccess = true;
  4702. function applyOptions(instance) {
  4703. const options = resolveMergedOptions(instance);
  4704. const publicThis = instance.proxy;
  4705. const ctx = instance.ctx;
  4706. shouldCacheAccess = false;
  4707. if (options.beforeCreate) {
  4708. callHook(options.beforeCreate, instance, "bc");
  4709. }
  4710. const {
  4711. // state
  4712. data: dataOptions,
  4713. computed: computedOptions,
  4714. methods,
  4715. watch: watchOptions,
  4716. provide: provideOptions,
  4717. inject: injectOptions,
  4718. // lifecycle
  4719. created,
  4720. beforeMount,
  4721. mounted,
  4722. beforeUpdate,
  4723. updated,
  4724. activated,
  4725. deactivated,
  4726. beforeDestroy,
  4727. beforeUnmount,
  4728. destroyed,
  4729. unmounted,
  4730. render: render2,
  4731. renderTracked,
  4732. renderTriggered,
  4733. errorCaptured,
  4734. serverPrefetch,
  4735. // public API
  4736. expose,
  4737. inheritAttrs,
  4738. // assets
  4739. components,
  4740. directives,
  4741. filters
  4742. } = options;
  4743. const checkDuplicateProperties = true ? createDuplicateChecker() : null;
  4744. if (true) {
  4745. const [propsOptions] = instance.propsOptions;
  4746. if (propsOptions) {
  4747. for (const key in propsOptions) {
  4748. checkDuplicateProperties("Props", key);
  4749. }
  4750. }
  4751. }
  4752. if (injectOptions) {
  4753. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  4754. }
  4755. if (methods) {
  4756. for (const key in methods) {
  4757. const methodHandler = methods[key];
  4758. if (isFunction(methodHandler)) {
  4759. if (true) {
  4760. Object.defineProperty(ctx, key, {
  4761. value: methodHandler.bind(publicThis),
  4762. configurable: true,
  4763. enumerable: true,
  4764. writable: true
  4765. });
  4766. } else {
  4767. ctx[key] = methodHandler.bind(publicThis);
  4768. }
  4769. if (true) {
  4770. checkDuplicateProperties("Methods", key);
  4771. }
  4772. } else if (true) {
  4773. warn2(
  4774. `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
  4775. );
  4776. }
  4777. }
  4778. }
  4779. if (dataOptions) {
  4780. if (!isFunction(dataOptions)) {
  4781. warn2(
  4782. `The data option must be a function. Plain object usage is no longer supported.`
  4783. );
  4784. }
  4785. const data = dataOptions.call(publicThis, publicThis);
  4786. if (isPromise(data)) {
  4787. warn2(
  4788. `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
  4789. );
  4790. }
  4791. if (!isObject(data)) {
  4792. warn2(`data() should return an object.`);
  4793. } else {
  4794. instance.data = reactive(data);
  4795. if (true) {
  4796. for (const key in data) {
  4797. checkDuplicateProperties("Data", key);
  4798. if (!isReservedPrefix(key[0])) {
  4799. Object.defineProperty(ctx, key, {
  4800. configurable: true,
  4801. enumerable: true,
  4802. get: () => data[key],
  4803. set: NOOP
  4804. });
  4805. }
  4806. }
  4807. }
  4808. }
  4809. }
  4810. shouldCacheAccess = true;
  4811. if (computedOptions) {
  4812. for (const key in computedOptions) {
  4813. const opt = computedOptions[key];
  4814. const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  4815. if (get2 === NOOP) {
  4816. warn2(`Computed property "${key}" has no getter.`);
  4817. }
  4818. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : true ? () => {
  4819. warn2(
  4820. `Write operation failed: computed property "${key}" is readonly.`
  4821. );
  4822. } : NOOP;
  4823. const c = computed2({
  4824. get: get2,
  4825. set: set2
  4826. });
  4827. Object.defineProperty(ctx, key, {
  4828. enumerable: true,
  4829. configurable: true,
  4830. get: () => c.value,
  4831. set: (v) => c.value = v
  4832. });
  4833. if (true) {
  4834. checkDuplicateProperties("Computed", key);
  4835. }
  4836. }
  4837. }
  4838. if (watchOptions) {
  4839. for (const key in watchOptions) {
  4840. createWatcher(watchOptions[key], ctx, publicThis, key);
  4841. }
  4842. }
  4843. if (provideOptions) {
  4844. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  4845. Reflect.ownKeys(provides).forEach((key) => {
  4846. provide(key, provides[key]);
  4847. });
  4848. }
  4849. if (created) {
  4850. callHook(created, instance, "c");
  4851. }
  4852. function registerLifecycleHook(register, hook) {
  4853. if (isArray(hook)) {
  4854. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  4855. } else if (hook) {
  4856. register(hook.bind(publicThis));
  4857. }
  4858. }
  4859. registerLifecycleHook(onBeforeMount, beforeMount);
  4860. registerLifecycleHook(onMounted, mounted);
  4861. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4862. registerLifecycleHook(onUpdated, updated);
  4863. registerLifecycleHook(onActivated, activated);
  4864. registerLifecycleHook(onDeactivated, deactivated);
  4865. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4866. registerLifecycleHook(onRenderTracked, renderTracked);
  4867. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4868. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4869. registerLifecycleHook(onUnmounted, unmounted);
  4870. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4871. if (isArray(expose)) {
  4872. if (expose.length) {
  4873. const exposed = instance.exposed || (instance.exposed = {});
  4874. expose.forEach((key) => {
  4875. Object.defineProperty(exposed, key, {
  4876. get: () => publicThis[key],
  4877. set: (val) => publicThis[key] = val
  4878. });
  4879. });
  4880. } else if (!instance.exposed) {
  4881. instance.exposed = {};
  4882. }
  4883. }
  4884. if (render2 && instance.render === NOOP) {
  4885. instance.render = render2;
  4886. }
  4887. if (inheritAttrs != null) {
  4888. instance.inheritAttrs = inheritAttrs;
  4889. }
  4890. if (components)
  4891. instance.components = components;
  4892. if (directives)
  4893. instance.directives = directives;
  4894. }
  4895. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  4896. if (isArray(injectOptions)) {
  4897. injectOptions = normalizeInject(injectOptions);
  4898. }
  4899. for (const key in injectOptions) {
  4900. const opt = injectOptions[key];
  4901. let injected;
  4902. if (isObject(opt)) {
  4903. if ("default" in opt) {
  4904. injected = inject(
  4905. opt.from || key,
  4906. opt.default,
  4907. true
  4908. /* treat default function as factory */
  4909. );
  4910. } else {
  4911. injected = inject(opt.from || key);
  4912. }
  4913. } else {
  4914. injected = inject(opt);
  4915. }
  4916. if (isRef(injected)) {
  4917. Object.defineProperty(ctx, key, {
  4918. enumerable: true,
  4919. configurable: true,
  4920. get: () => injected.value,
  4921. set: (v) => injected.value = v
  4922. });
  4923. } else {
  4924. ctx[key] = injected;
  4925. }
  4926. if (true) {
  4927. checkDuplicateProperties("Inject", key);
  4928. }
  4929. }
  4930. }
  4931. function callHook(hook, instance, type) {
  4932. callWithAsyncErrorHandling(
  4933. isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  4934. instance,
  4935. type
  4936. );
  4937. }
  4938. function createWatcher(raw, ctx, publicThis, key) {
  4939. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4940. if (isString(raw)) {
  4941. const handler = ctx[raw];
  4942. if (isFunction(handler)) {
  4943. watch(getter, handler);
  4944. } else if (true) {
  4945. warn2(`Invalid watch handler specified by key "${raw}"`, handler);
  4946. }
  4947. } else if (isFunction(raw)) {
  4948. watch(getter, raw.bind(publicThis));
  4949. } else if (isObject(raw)) {
  4950. if (isArray(raw)) {
  4951. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  4952. } else {
  4953. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4954. if (isFunction(handler)) {
  4955. watch(getter, handler, raw);
  4956. } else if (true) {
  4957. warn2(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4958. }
  4959. }
  4960. } else if (true) {
  4961. warn2(`Invalid watch option: "${key}"`, raw);
  4962. }
  4963. }
  4964. function resolveMergedOptions(instance) {
  4965. const base = instance.type;
  4966. const { mixins, extends: extendsOptions } = base;
  4967. const {
  4968. mixins: globalMixins,
  4969. optionsCache: cache,
  4970. config: { optionMergeStrategies }
  4971. } = instance.appContext;
  4972. const cached = cache.get(base);
  4973. let resolved;
  4974. if (cached) {
  4975. resolved = cached;
  4976. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  4977. {
  4978. resolved = base;
  4979. }
  4980. } else {
  4981. resolved = {};
  4982. if (globalMixins.length) {
  4983. globalMixins.forEach(
  4984. (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
  4985. );
  4986. }
  4987. mergeOptions(resolved, base, optionMergeStrategies);
  4988. }
  4989. if (isObject(base)) {
  4990. cache.set(base, resolved);
  4991. }
  4992. return resolved;
  4993. }
  4994. function mergeOptions(to, from, strats, asMixin = false) {
  4995. const { mixins, extends: extendsOptions } = from;
  4996. if (extendsOptions) {
  4997. mergeOptions(to, extendsOptions, strats, true);
  4998. }
  4999. if (mixins) {
  5000. mixins.forEach(
  5001. (m) => mergeOptions(to, m, strats, true)
  5002. );
  5003. }
  5004. for (const key in from) {
  5005. if (asMixin && key === "expose") {
  5006. warn2(
  5007. `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
  5008. );
  5009. } else {
  5010. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  5011. to[key] = strat ? strat(to[key], from[key]) : from[key];
  5012. }
  5013. }
  5014. return to;
  5015. }
  5016. var internalOptionMergeStrats = {
  5017. data: mergeDataFn,
  5018. props: mergeEmitsOrPropsOptions,
  5019. emits: mergeEmitsOrPropsOptions,
  5020. // objects
  5021. methods: mergeObjectOptions,
  5022. computed: mergeObjectOptions,
  5023. // lifecycle
  5024. beforeCreate: mergeAsArray,
  5025. created: mergeAsArray,
  5026. beforeMount: mergeAsArray,
  5027. mounted: mergeAsArray,
  5028. beforeUpdate: mergeAsArray,
  5029. updated: mergeAsArray,
  5030. beforeDestroy: mergeAsArray,
  5031. beforeUnmount: mergeAsArray,
  5032. destroyed: mergeAsArray,
  5033. unmounted: mergeAsArray,
  5034. activated: mergeAsArray,
  5035. deactivated: mergeAsArray,
  5036. errorCaptured: mergeAsArray,
  5037. serverPrefetch: mergeAsArray,
  5038. // assets
  5039. components: mergeObjectOptions,
  5040. directives: mergeObjectOptions,
  5041. // watch
  5042. watch: mergeWatchOptions,
  5043. // provide / inject
  5044. provide: mergeDataFn,
  5045. inject: mergeInject
  5046. };
  5047. function mergeDataFn(to, from) {
  5048. if (!from) {
  5049. return to;
  5050. }
  5051. if (!to) {
  5052. return from;
  5053. }
  5054. return function mergedDataFn() {
  5055. return extend(
  5056. isFunction(to) ? to.call(this, this) : to,
  5057. isFunction(from) ? from.call(this, this) : from
  5058. );
  5059. };
  5060. }
  5061. function mergeInject(to, from) {
  5062. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  5063. }
  5064. function normalizeInject(raw) {
  5065. if (isArray(raw)) {
  5066. const res = {};
  5067. for (let i = 0; i < raw.length; i++) {
  5068. res[raw[i]] = raw[i];
  5069. }
  5070. return res;
  5071. }
  5072. return raw;
  5073. }
  5074. function mergeAsArray(to, from) {
  5075. return to ? [...new Set([].concat(to, from))] : from;
  5076. }
  5077. function mergeObjectOptions(to, from) {
  5078. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  5079. }
  5080. function mergeEmitsOrPropsOptions(to, from) {
  5081. if (to) {
  5082. if (isArray(to) && isArray(from)) {
  5083. return [.../* @__PURE__ */ new Set([...to, ...from])];
  5084. }
  5085. return extend(
  5086. /* @__PURE__ */ Object.create(null),
  5087. normalizePropsOrEmits(to),
  5088. normalizePropsOrEmits(from != null ? from : {})
  5089. );
  5090. } else {
  5091. return from;
  5092. }
  5093. }
  5094. function mergeWatchOptions(to, from) {
  5095. if (!to)
  5096. return from;
  5097. if (!from)
  5098. return to;
  5099. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  5100. for (const key in from) {
  5101. merged[key] = mergeAsArray(to[key], from[key]);
  5102. }
  5103. return merged;
  5104. }
  5105. function createAppContext() {
  5106. return {
  5107. app: null,
  5108. config: {
  5109. isNativeTag: NO,
  5110. performance: false,
  5111. globalProperties: {},
  5112. optionMergeStrategies: {},
  5113. errorHandler: void 0,
  5114. warnHandler: void 0,
  5115. compilerOptions: {}
  5116. },
  5117. mixins: [],
  5118. components: {},
  5119. directives: {},
  5120. provides: /* @__PURE__ */ Object.create(null),
  5121. optionsCache: /* @__PURE__ */ new WeakMap(),
  5122. propsCache: /* @__PURE__ */ new WeakMap(),
  5123. emitsCache: /* @__PURE__ */ new WeakMap()
  5124. };
  5125. }
  5126. var uid$1 = 0;
  5127. function createAppAPI(render2, hydrate2) {
  5128. return function createApp2(rootComponent, rootProps = null) {
  5129. if (!isFunction(rootComponent)) {
  5130. rootComponent = extend({}, rootComponent);
  5131. }
  5132. if (rootProps != null && !isObject(rootProps)) {
  5133. warn2(`root props passed to app.mount() must be an object.`);
  5134. rootProps = null;
  5135. }
  5136. const context = createAppContext();
  5137. if (true) {
  5138. Object.defineProperty(context.config, "unwrapInjectedRef", {
  5139. get() {
  5140. return true;
  5141. },
  5142. set() {
  5143. warn2(
  5144. `app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
  5145. );
  5146. }
  5147. });
  5148. }
  5149. const installedPlugins = /* @__PURE__ */ new WeakSet();
  5150. let isMounted = false;
  5151. const app = context.app = {
  5152. _uid: uid$1++,
  5153. _component: rootComponent,
  5154. _props: rootProps,
  5155. _container: null,
  5156. _context: context,
  5157. _instance: null,
  5158. version,
  5159. get config() {
  5160. return context.config;
  5161. },
  5162. set config(v) {
  5163. if (true) {
  5164. warn2(
  5165. `app.config cannot be replaced. Modify individual options instead.`
  5166. );
  5167. }
  5168. },
  5169. use(plugin, ...options) {
  5170. if (installedPlugins.has(plugin)) {
  5171. warn2(`Plugin has already been applied to target app.`);
  5172. } else if (plugin && isFunction(plugin.install)) {
  5173. installedPlugins.add(plugin);
  5174. plugin.install(app, ...options);
  5175. } else if (isFunction(plugin)) {
  5176. installedPlugins.add(plugin);
  5177. plugin(app, ...options);
  5178. } else if (true) {
  5179. warn2(
  5180. `A plugin must either be a function or an object with an "install" function.`
  5181. );
  5182. }
  5183. return app;
  5184. },
  5185. mixin(mixin) {
  5186. if (__VUE_OPTIONS_API__) {
  5187. if (!context.mixins.includes(mixin)) {
  5188. context.mixins.push(mixin);
  5189. } else if (true) {
  5190. warn2(
  5191. "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
  5192. );
  5193. }
  5194. } else if (true) {
  5195. warn2("Mixins are only available in builds supporting Options API");
  5196. }
  5197. return app;
  5198. },
  5199. component(name, component) {
  5200. if (true) {
  5201. validateComponentName(name, context.config);
  5202. }
  5203. if (!component) {
  5204. return context.components[name];
  5205. }
  5206. if (context.components[name]) {
  5207. warn2(`Component "${name}" has already been registered in target app.`);
  5208. }
  5209. context.components[name] = component;
  5210. return app;
  5211. },
  5212. directive(name, directive) {
  5213. if (true) {
  5214. validateDirectiveName(name);
  5215. }
  5216. if (!directive) {
  5217. return context.directives[name];
  5218. }
  5219. if (context.directives[name]) {
  5220. warn2(`Directive "${name}" has already been registered in target app.`);
  5221. }
  5222. context.directives[name] = directive;
  5223. return app;
  5224. },
  5225. mount(rootContainer, isHydrate, isSVG) {
  5226. if (!isMounted) {
  5227. if (rootContainer.__vue_app__) {
  5228. warn2(
  5229. `There is already an app instance mounted on the host container.
  5230. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
  5231. );
  5232. }
  5233. const vnode = createVNode(rootComponent, rootProps);
  5234. vnode.appContext = context;
  5235. if (true) {
  5236. context.reload = () => {
  5237. render2(cloneVNode(vnode), rootContainer, isSVG);
  5238. };
  5239. }
  5240. if (isHydrate && hydrate2) {
  5241. hydrate2(vnode, rootContainer);
  5242. } else {
  5243. render2(vnode, rootContainer, isSVG);
  5244. }
  5245. isMounted = true;
  5246. app._container = rootContainer;
  5247. rootContainer.__vue_app__ = app;
  5248. if (true) {
  5249. app._instance = vnode.component;
  5250. devtoolsInitApp(app, version);
  5251. }
  5252. return getExposeProxy(vnode.component) || vnode.component.proxy;
  5253. } else if (true) {
  5254. warn2(
  5255. `App has already been mounted.
  5256. 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)\``
  5257. );
  5258. }
  5259. },
  5260. unmount() {
  5261. if (isMounted) {
  5262. render2(null, app._container);
  5263. if (true) {
  5264. app._instance = null;
  5265. devtoolsUnmountApp(app);
  5266. }
  5267. delete app._container.__vue_app__;
  5268. } else if (true) {
  5269. warn2(`Cannot unmount an app that is not mounted.`);
  5270. }
  5271. },
  5272. provide(key, value) {
  5273. if (key in context.provides) {
  5274. warn2(
  5275. `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
  5276. );
  5277. }
  5278. context.provides[key] = value;
  5279. return app;
  5280. },
  5281. runWithContext(fn) {
  5282. currentApp = app;
  5283. try {
  5284. return fn();
  5285. } finally {
  5286. currentApp = null;
  5287. }
  5288. }
  5289. };
  5290. return app;
  5291. };
  5292. }
  5293. var currentApp = null;
  5294. function provide(key, value) {
  5295. if (!currentInstance) {
  5296. if (true) {
  5297. warn2(`provide() can only be used inside setup().`);
  5298. }
  5299. } else {
  5300. let provides = currentInstance.provides;
  5301. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  5302. if (parentProvides === provides) {
  5303. provides = currentInstance.provides = Object.create(parentProvides);
  5304. }
  5305. provides[key] = value;
  5306. }
  5307. }
  5308. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  5309. const instance = currentInstance || currentRenderingInstance;
  5310. if (instance || currentApp) {
  5311. const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
  5312. if (provides && key in provides) {
  5313. return provides[key];
  5314. } else if (arguments.length > 1) {
  5315. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  5316. } else if (true) {
  5317. warn2(`injection "${String(key)}" not found.`);
  5318. }
  5319. } else if (true) {
  5320. warn2(`inject() can only be used inside setup() or functional components.`);
  5321. }
  5322. }
  5323. function hasInjectionContext() {
  5324. return !!(currentInstance || currentRenderingInstance || currentApp);
  5325. }
  5326. function initProps(instance, rawProps, isStateful, isSSR = false) {
  5327. const props = {};
  5328. const attrs = {};
  5329. def(attrs, InternalObjectKey, 1);
  5330. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  5331. setFullProps(instance, rawProps, props, attrs);
  5332. for (const key in instance.propsOptions[0]) {
  5333. if (!(key in props)) {
  5334. props[key] = void 0;
  5335. }
  5336. }
  5337. if (true) {
  5338. validateProps(rawProps || {}, props, instance);
  5339. }
  5340. if (isStateful) {
  5341. instance.props = isSSR ? props : shallowReactive(props);
  5342. } else {
  5343. if (!instance.type.props) {
  5344. instance.props = attrs;
  5345. } else {
  5346. instance.props = props;
  5347. }
  5348. }
  5349. instance.attrs = attrs;
  5350. }
  5351. function isInHmrContext(instance) {
  5352. while (instance) {
  5353. if (instance.type.__hmrId)
  5354. return true;
  5355. instance = instance.parent;
  5356. }
  5357. }
  5358. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  5359. const {
  5360. props,
  5361. attrs,
  5362. vnode: { patchFlag }
  5363. } = instance;
  5364. const rawCurrentProps = toRaw(props);
  5365. const [options] = instance.propsOptions;
  5366. let hasAttrsChanged = false;
  5367. if (
  5368. // always force full diff in dev
  5369. // - #1942 if hmr is enabled with sfc component
  5370. // - vite#872 non-sfc component used by sfc component
  5371. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  5372. ) {
  5373. if (patchFlag & 8) {
  5374. const propsToUpdate = instance.vnode.dynamicProps;
  5375. for (let i = 0; i < propsToUpdate.length; i++) {
  5376. let key = propsToUpdate[i];
  5377. if (isEmitListener(instance.emitsOptions, key)) {
  5378. continue;
  5379. }
  5380. const value = rawProps[key];
  5381. if (options) {
  5382. if (hasOwn(attrs, key)) {
  5383. if (value !== attrs[key]) {
  5384. attrs[key] = value;
  5385. hasAttrsChanged = true;
  5386. }
  5387. } else {
  5388. const camelizedKey = camelize(key);
  5389. props[camelizedKey] = resolvePropValue(
  5390. options,
  5391. rawCurrentProps,
  5392. camelizedKey,
  5393. value,
  5394. instance,
  5395. false
  5396. /* isAbsent */
  5397. );
  5398. }
  5399. } else {
  5400. if (value !== attrs[key]) {
  5401. attrs[key] = value;
  5402. hasAttrsChanged = true;
  5403. }
  5404. }
  5405. }
  5406. }
  5407. } else {
  5408. if (setFullProps(instance, rawProps, props, attrs)) {
  5409. hasAttrsChanged = true;
  5410. }
  5411. let kebabKey;
  5412. for (const key in rawCurrentProps) {
  5413. if (!rawProps || // for camelCase
  5414. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  5415. // and converted to camelCase (#955)
  5416. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  5417. if (options) {
  5418. if (rawPrevProps && // for camelCase
  5419. (rawPrevProps[key] !== void 0 || // for kebab-case
  5420. rawPrevProps[kebabKey] !== void 0)) {
  5421. props[key] = resolvePropValue(
  5422. options,
  5423. rawCurrentProps,
  5424. key,
  5425. void 0,
  5426. instance,
  5427. true
  5428. /* isAbsent */
  5429. );
  5430. }
  5431. } else {
  5432. delete props[key];
  5433. }
  5434. }
  5435. }
  5436. if (attrs !== rawCurrentProps) {
  5437. for (const key in attrs) {
  5438. if (!rawProps || !hasOwn(rawProps, key) && true) {
  5439. delete attrs[key];
  5440. hasAttrsChanged = true;
  5441. }
  5442. }
  5443. }
  5444. }
  5445. if (hasAttrsChanged) {
  5446. trigger(instance, "set", "$attrs");
  5447. }
  5448. if (true) {
  5449. validateProps(rawProps || {}, props, instance);
  5450. }
  5451. }
  5452. function setFullProps(instance, rawProps, props, attrs) {
  5453. const [options, needCastKeys] = instance.propsOptions;
  5454. let hasAttrsChanged = false;
  5455. let rawCastValues;
  5456. if (rawProps) {
  5457. for (let key in rawProps) {
  5458. if (isReservedProp(key)) {
  5459. continue;
  5460. }
  5461. const value = rawProps[key];
  5462. let camelKey;
  5463. if (options && hasOwn(options, camelKey = camelize(key))) {
  5464. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  5465. props[camelKey] = value;
  5466. } else {
  5467. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  5468. }
  5469. } else if (!isEmitListener(instance.emitsOptions, key)) {
  5470. if (!(key in attrs) || value !== attrs[key]) {
  5471. attrs[key] = value;
  5472. hasAttrsChanged = true;
  5473. }
  5474. }
  5475. }
  5476. }
  5477. if (needCastKeys) {
  5478. const rawCurrentProps = toRaw(props);
  5479. const castValues = rawCastValues || EMPTY_OBJ;
  5480. for (let i = 0; i < needCastKeys.length; i++) {
  5481. const key = needCastKeys[i];
  5482. props[key] = resolvePropValue(
  5483. options,
  5484. rawCurrentProps,
  5485. key,
  5486. castValues[key],
  5487. instance,
  5488. !hasOwn(castValues, key)
  5489. );
  5490. }
  5491. }
  5492. return hasAttrsChanged;
  5493. }
  5494. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  5495. const opt = options[key];
  5496. if (opt != null) {
  5497. const hasDefault = hasOwn(opt, "default");
  5498. if (hasDefault && value === void 0) {
  5499. const defaultValue = opt.default;
  5500. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  5501. const { propsDefaults } = instance;
  5502. if (key in propsDefaults) {
  5503. value = propsDefaults[key];
  5504. } else {
  5505. setCurrentInstance(instance);
  5506. value = propsDefaults[key] = defaultValue.call(
  5507. null,
  5508. props
  5509. );
  5510. unsetCurrentInstance();
  5511. }
  5512. } else {
  5513. value = defaultValue;
  5514. }
  5515. }
  5516. if (opt[
  5517. 0
  5518. /* shouldCast */
  5519. ]) {
  5520. if (isAbsent && !hasDefault) {
  5521. value = false;
  5522. } else if (opt[
  5523. 1
  5524. /* shouldCastTrue */
  5525. ] && (value === "" || value === hyphenate(key))) {
  5526. value = true;
  5527. }
  5528. }
  5529. }
  5530. return value;
  5531. }
  5532. function normalizePropsOptions(comp, appContext, asMixin = false) {
  5533. const cache = appContext.propsCache;
  5534. const cached = cache.get(comp);
  5535. if (cached) {
  5536. return cached;
  5537. }
  5538. const raw = comp.props;
  5539. const normalized = {};
  5540. const needCastKeys = [];
  5541. let hasExtends = false;
  5542. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  5543. const extendProps = (raw2) => {
  5544. hasExtends = true;
  5545. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  5546. extend(normalized, props);
  5547. if (keys)
  5548. needCastKeys.push(...keys);
  5549. };
  5550. if (!asMixin && appContext.mixins.length) {
  5551. appContext.mixins.forEach(extendProps);
  5552. }
  5553. if (comp.extends) {
  5554. extendProps(comp.extends);
  5555. }
  5556. if (comp.mixins) {
  5557. comp.mixins.forEach(extendProps);
  5558. }
  5559. }
  5560. if (!raw && !hasExtends) {
  5561. if (isObject(comp)) {
  5562. cache.set(comp, EMPTY_ARR);
  5563. }
  5564. return EMPTY_ARR;
  5565. }
  5566. if (isArray(raw)) {
  5567. for (let i = 0; i < raw.length; i++) {
  5568. if (!isString(raw[i])) {
  5569. warn2(`props must be strings when using array syntax.`, raw[i]);
  5570. }
  5571. const normalizedKey = camelize(raw[i]);
  5572. if (validatePropName(normalizedKey)) {
  5573. normalized[normalizedKey] = EMPTY_OBJ;
  5574. }
  5575. }
  5576. } else if (raw) {
  5577. if (!isObject(raw)) {
  5578. warn2(`invalid props options`, raw);
  5579. }
  5580. for (const key in raw) {
  5581. const normalizedKey = camelize(key);
  5582. if (validatePropName(normalizedKey)) {
  5583. const opt = raw[key];
  5584. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  5585. if (prop) {
  5586. const booleanIndex = getTypeIndex(Boolean, prop.type);
  5587. const stringIndex = getTypeIndex(String, prop.type);
  5588. prop[
  5589. 0
  5590. /* shouldCast */
  5591. ] = booleanIndex > -1;
  5592. prop[
  5593. 1
  5594. /* shouldCastTrue */
  5595. ] = stringIndex < 0 || booleanIndex < stringIndex;
  5596. if (booleanIndex > -1 || hasOwn(prop, "default")) {
  5597. needCastKeys.push(normalizedKey);
  5598. }
  5599. }
  5600. }
  5601. }
  5602. }
  5603. const res = [normalized, needCastKeys];
  5604. if (isObject(comp)) {
  5605. cache.set(comp, res);
  5606. }
  5607. return res;
  5608. }
  5609. function validatePropName(key) {
  5610. if (key[0] !== "$") {
  5611. return true;
  5612. } else if (true) {
  5613. warn2(`Invalid prop name: "${key}" is a reserved property.`);
  5614. }
  5615. return false;
  5616. }
  5617. function getType(ctor) {
  5618. const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
  5619. return match ? match[2] : ctor === null ? "null" : "";
  5620. }
  5621. function isSameType(a, b) {
  5622. return getType(a) === getType(b);
  5623. }
  5624. function getTypeIndex(type, expectedTypes) {
  5625. if (isArray(expectedTypes)) {
  5626. return expectedTypes.findIndex((t) => isSameType(t, type));
  5627. } else if (isFunction(expectedTypes)) {
  5628. return isSameType(expectedTypes, type) ? 0 : -1;
  5629. }
  5630. return -1;
  5631. }
  5632. function validateProps(rawProps, props, instance) {
  5633. const resolvedValues = toRaw(props);
  5634. const options = instance.propsOptions[0];
  5635. for (const key in options) {
  5636. let opt = options[key];
  5637. if (opt == null)
  5638. continue;
  5639. validateProp(
  5640. key,
  5641. resolvedValues[key],
  5642. opt,
  5643. !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
  5644. );
  5645. }
  5646. }
  5647. function validateProp(name, value, prop, isAbsent) {
  5648. const { type, required, validator, skipCheck } = prop;
  5649. if (required && isAbsent) {
  5650. warn2('Missing required prop: "' + name + '"');
  5651. return;
  5652. }
  5653. if (value == null && !required) {
  5654. return;
  5655. }
  5656. if (type != null && type !== true && !skipCheck) {
  5657. let isValid = false;
  5658. const types = isArray(type) ? type : [type];
  5659. const expectedTypes = [];
  5660. for (let i = 0; i < types.length && !isValid; i++) {
  5661. const { valid, expectedType } = assertType(value, types[i]);
  5662. expectedTypes.push(expectedType || "");
  5663. isValid = valid;
  5664. }
  5665. if (!isValid) {
  5666. warn2(getInvalidTypeMessage(name, value, expectedTypes));
  5667. return;
  5668. }
  5669. }
  5670. if (validator && !validator(value)) {
  5671. warn2('Invalid prop: custom validator check failed for prop "' + name + '".');
  5672. }
  5673. }
  5674. var isSimpleType = makeMap(
  5675. "String,Number,Boolean,Function,Symbol,BigInt"
  5676. );
  5677. function assertType(value, type) {
  5678. let valid;
  5679. const expectedType = getType(type);
  5680. if (isSimpleType(expectedType)) {
  5681. const t = typeof value;
  5682. valid = t === expectedType.toLowerCase();
  5683. if (!valid && t === "object") {
  5684. valid = value instanceof type;
  5685. }
  5686. } else if (expectedType === "Object") {
  5687. valid = isObject(value);
  5688. } else if (expectedType === "Array") {
  5689. valid = isArray(value);
  5690. } else if (expectedType === "null") {
  5691. valid = value === null;
  5692. } else {
  5693. valid = value instanceof type;
  5694. }
  5695. return {
  5696. valid,
  5697. expectedType
  5698. };
  5699. }
  5700. function getInvalidTypeMessage(name, value, expectedTypes) {
  5701. if (expectedTypes.length === 0) {
  5702. return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  5703. }
  5704. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  5705. const expectedType = expectedTypes[0];
  5706. const receivedType = toRawType(value);
  5707. const expectedValue = styleValue(value, expectedType);
  5708. const receivedValue = styleValue(value, receivedType);
  5709. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  5710. message += ` with value ${expectedValue}`;
  5711. }
  5712. message += `, got ${receivedType} `;
  5713. if (isExplicable(receivedType)) {
  5714. message += `with value ${receivedValue}.`;
  5715. }
  5716. return message;
  5717. }
  5718. function styleValue(value, type) {
  5719. if (type === "String") {
  5720. return `"${value}"`;
  5721. } else if (type === "Number") {
  5722. return `${Number(value)}`;
  5723. } else {
  5724. return `${value}`;
  5725. }
  5726. }
  5727. function isExplicable(type) {
  5728. const explicitTypes = ["string", "number", "boolean"];
  5729. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  5730. }
  5731. function isBoolean(...args) {
  5732. return args.some((elem) => elem.toLowerCase() === "boolean");
  5733. }
  5734. var isInternalKey = (key) => key[0] === "_" || key === "$stable";
  5735. var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  5736. var normalizeSlot = (key, rawSlot, ctx) => {
  5737. if (rawSlot._n) {
  5738. return rawSlot;
  5739. }
  5740. const normalized = withCtx((...args) => {
  5741. if (currentInstance) {
  5742. warn2(
  5743. `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.`
  5744. );
  5745. }
  5746. return normalizeSlotValue(rawSlot(...args));
  5747. }, ctx);
  5748. normalized._c = false;
  5749. return normalized;
  5750. };
  5751. var normalizeObjectSlots = (rawSlots, slots, instance) => {
  5752. const ctx = rawSlots._ctx;
  5753. for (const key in rawSlots) {
  5754. if (isInternalKey(key))
  5755. continue;
  5756. const value = rawSlots[key];
  5757. if (isFunction(value)) {
  5758. slots[key] = normalizeSlot(key, value, ctx);
  5759. } else if (value != null) {
  5760. if (true) {
  5761. warn2(
  5762. `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
  5763. );
  5764. }
  5765. const normalized = normalizeSlotValue(value);
  5766. slots[key] = () => normalized;
  5767. }
  5768. }
  5769. };
  5770. var normalizeVNodeSlots = (instance, children) => {
  5771. if (!isKeepAlive(instance.vnode) && true) {
  5772. warn2(
  5773. `Non-function value encountered for default slot. Prefer function slots for better performance.`
  5774. );
  5775. }
  5776. const normalized = normalizeSlotValue(children);
  5777. instance.slots.default = () => normalized;
  5778. };
  5779. var initSlots = (instance, children) => {
  5780. if (instance.vnode.shapeFlag & 32) {
  5781. const type = children._;
  5782. if (type) {
  5783. instance.slots = toRaw(children);
  5784. def(children, "_", type);
  5785. } else {
  5786. normalizeObjectSlots(
  5787. children,
  5788. instance.slots = {}
  5789. );
  5790. }
  5791. } else {
  5792. instance.slots = {};
  5793. if (children) {
  5794. normalizeVNodeSlots(instance, children);
  5795. }
  5796. }
  5797. def(instance.slots, InternalObjectKey, 1);
  5798. };
  5799. var updateSlots = (instance, children, optimized) => {
  5800. const { vnode, slots } = instance;
  5801. let needDeletionCheck = true;
  5802. let deletionComparisonTarget = EMPTY_OBJ;
  5803. if (vnode.shapeFlag & 32) {
  5804. const type = children._;
  5805. if (type) {
  5806. if (isHmrUpdating) {
  5807. extend(slots, children);
  5808. trigger(instance, "set", "$slots");
  5809. } else if (optimized && type === 1) {
  5810. needDeletionCheck = false;
  5811. } else {
  5812. extend(slots, children);
  5813. if (!optimized && type === 1) {
  5814. delete slots._;
  5815. }
  5816. }
  5817. } else {
  5818. needDeletionCheck = !children.$stable;
  5819. normalizeObjectSlots(children, slots);
  5820. }
  5821. deletionComparisonTarget = children;
  5822. } else if (children) {
  5823. normalizeVNodeSlots(instance, children);
  5824. deletionComparisonTarget = { default: 1 };
  5825. }
  5826. if (needDeletionCheck) {
  5827. for (const key in slots) {
  5828. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  5829. delete slots[key];
  5830. }
  5831. }
  5832. }
  5833. };
  5834. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  5835. if (isArray(rawRef)) {
  5836. rawRef.forEach(
  5837. (r, i) => setRef(
  5838. r,
  5839. oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),
  5840. parentSuspense,
  5841. vnode,
  5842. isUnmount
  5843. )
  5844. );
  5845. return;
  5846. }
  5847. if (isAsyncWrapper(vnode) && !isUnmount) {
  5848. return;
  5849. }
  5850. const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el;
  5851. const value = isUnmount ? null : refValue;
  5852. const { i: owner, r: ref2 } = rawRef;
  5853. if (!owner) {
  5854. warn2(
  5855. `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
  5856. );
  5857. return;
  5858. }
  5859. const oldRef = oldRawRef && oldRawRef.r;
  5860. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  5861. const setupState = owner.setupState;
  5862. if (oldRef != null && oldRef !== ref2) {
  5863. if (isString(oldRef)) {
  5864. refs[oldRef] = null;
  5865. if (hasOwn(setupState, oldRef)) {
  5866. setupState[oldRef] = null;
  5867. }
  5868. } else if (isRef(oldRef)) {
  5869. oldRef.value = null;
  5870. }
  5871. }
  5872. if (isFunction(ref2)) {
  5873. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  5874. } else {
  5875. const _isString = isString(ref2);
  5876. const _isRef = isRef(ref2);
  5877. if (_isString || _isRef) {
  5878. const doSet = () => {
  5879. if (rawRef.f) {
  5880. const existing = _isString ? hasOwn(setupState, ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
  5881. if (isUnmount) {
  5882. isArray(existing) && remove(existing, refValue);
  5883. } else {
  5884. if (!isArray(existing)) {
  5885. if (_isString) {
  5886. refs[ref2] = [refValue];
  5887. if (hasOwn(setupState, ref2)) {
  5888. setupState[ref2] = refs[ref2];
  5889. }
  5890. } else {
  5891. ref2.value = [refValue];
  5892. if (rawRef.k)
  5893. refs[rawRef.k] = ref2.value;
  5894. }
  5895. } else if (!existing.includes(refValue)) {
  5896. existing.push(refValue);
  5897. }
  5898. }
  5899. } else if (_isString) {
  5900. refs[ref2] = value;
  5901. if (hasOwn(setupState, ref2)) {
  5902. setupState[ref2] = value;
  5903. }
  5904. } else if (_isRef) {
  5905. ref2.value = value;
  5906. if (rawRef.k)
  5907. refs[rawRef.k] = value;
  5908. } else if (true) {
  5909. warn2("Invalid template ref type:", ref2, `(${typeof ref2})`);
  5910. }
  5911. };
  5912. if (value) {
  5913. doSet.id = -1;
  5914. queuePostRenderEffect(doSet, parentSuspense);
  5915. } else {
  5916. doSet();
  5917. }
  5918. } else if (true) {
  5919. warn2("Invalid template ref type:", ref2, `(${typeof ref2})`);
  5920. }
  5921. }
  5922. }
  5923. var hasMismatch = false;
  5924. var isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== "foreignObject";
  5925. var isComment = (node) => node.nodeType === 8;
  5926. function createHydrationFunctions(rendererInternals) {
  5927. const {
  5928. mt: mountComponent,
  5929. p: patch,
  5930. o: {
  5931. patchProp: patchProp2,
  5932. createText,
  5933. nextSibling,
  5934. parentNode,
  5935. remove: remove2,
  5936. insert,
  5937. createComment
  5938. }
  5939. } = rendererInternals;
  5940. const hydrate2 = (vnode, container) => {
  5941. if (!container.hasChildNodes()) {
  5942. warn2(
  5943. `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
  5944. );
  5945. patch(null, vnode, container);
  5946. flushPostFlushCbs();
  5947. container._vnode = vnode;
  5948. return;
  5949. }
  5950. hasMismatch = false;
  5951. hydrateNode(container.firstChild, vnode, null, null, null);
  5952. flushPostFlushCbs();
  5953. container._vnode = vnode;
  5954. if (hasMismatch && true) {
  5955. console.error(`Hydration completed but contains mismatches.`);
  5956. }
  5957. };
  5958. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  5959. const isFragmentStart = isComment(node) && node.data === "[";
  5960. const onMismatch = () => handleMismatch(
  5961. node,
  5962. vnode,
  5963. parentComponent,
  5964. parentSuspense,
  5965. slotScopeIds,
  5966. isFragmentStart
  5967. );
  5968. const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
  5969. let domType = node.nodeType;
  5970. vnode.el = node;
  5971. if (true) {
  5972. if (!("__vnode" in node)) {
  5973. Object.defineProperty(node, "__vnode", {
  5974. value: vnode,
  5975. enumerable: false
  5976. });
  5977. }
  5978. if (!("__vueParentComponent" in node)) {
  5979. Object.defineProperty(node, "__vueParentComponent", {
  5980. value: parentComponent,
  5981. enumerable: false
  5982. });
  5983. }
  5984. }
  5985. if (patchFlag === -2) {
  5986. optimized = false;
  5987. vnode.dynamicChildren = null;
  5988. }
  5989. let nextNode = null;
  5990. switch (type) {
  5991. case Text:
  5992. if (domType !== 3) {
  5993. if (vnode.children === "") {
  5994. insert(vnode.el = createText(""), parentNode(node), node);
  5995. nextNode = node;
  5996. } else {
  5997. nextNode = onMismatch();
  5998. }
  5999. } else {
  6000. if (node.data !== vnode.children) {
  6001. hasMismatch = true;
  6002. warn2(
  6003. `Hydration text mismatch:
  6004. - Server rendered: ${JSON.stringify(
  6005. node.data
  6006. )}
  6007. - Client rendered: ${JSON.stringify(vnode.children)}`
  6008. );
  6009. node.data = vnode.children;
  6010. }
  6011. nextNode = nextSibling(node);
  6012. }
  6013. break;
  6014. case Comment:
  6015. if (isTemplateNode(node)) {
  6016. nextNode = nextSibling(node);
  6017. replaceNode(
  6018. vnode.el = node.content.firstChild,
  6019. node,
  6020. parentComponent
  6021. );
  6022. } else if (domType !== 8 || isFragmentStart) {
  6023. nextNode = onMismatch();
  6024. } else {
  6025. nextNode = nextSibling(node);
  6026. }
  6027. break;
  6028. case Static:
  6029. if (isFragmentStart) {
  6030. node = nextSibling(node);
  6031. domType = node.nodeType;
  6032. }
  6033. if (domType === 1 || domType === 3) {
  6034. nextNode = node;
  6035. const needToAdoptContent = !vnode.children.length;
  6036. for (let i = 0; i < vnode.staticCount; i++) {
  6037. if (needToAdoptContent)
  6038. vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  6039. if (i === vnode.staticCount - 1) {
  6040. vnode.anchor = nextNode;
  6041. }
  6042. nextNode = nextSibling(nextNode);
  6043. }
  6044. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  6045. } else {
  6046. onMismatch();
  6047. }
  6048. break;
  6049. case Fragment:
  6050. if (!isFragmentStart) {
  6051. nextNode = onMismatch();
  6052. } else {
  6053. nextNode = hydrateFragment(
  6054. node,
  6055. vnode,
  6056. parentComponent,
  6057. parentSuspense,
  6058. slotScopeIds,
  6059. optimized
  6060. );
  6061. }
  6062. break;
  6063. default:
  6064. if (shapeFlag & 1) {
  6065. if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
  6066. nextNode = onMismatch();
  6067. } else {
  6068. nextNode = hydrateElement(
  6069. node,
  6070. vnode,
  6071. parentComponent,
  6072. parentSuspense,
  6073. slotScopeIds,
  6074. optimized
  6075. );
  6076. }
  6077. } else if (shapeFlag & 6) {
  6078. vnode.slotScopeIds = slotScopeIds;
  6079. const container = parentNode(node);
  6080. if (isFragmentStart) {
  6081. nextNode = locateClosingAnchor(node);
  6082. } else if (isComment(node) && node.data === "teleport start") {
  6083. nextNode = locateClosingAnchor(node, node.data, "teleport end");
  6084. } else {
  6085. nextNode = nextSibling(node);
  6086. }
  6087. mountComponent(
  6088. vnode,
  6089. container,
  6090. null,
  6091. parentComponent,
  6092. parentSuspense,
  6093. isSVGContainer(container),
  6094. optimized
  6095. );
  6096. if (isAsyncWrapper(vnode)) {
  6097. let subTree;
  6098. if (isFragmentStart) {
  6099. subTree = createVNode(Fragment);
  6100. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  6101. } else {
  6102. subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  6103. }
  6104. subTree.el = node;
  6105. vnode.component.subTree = subTree;
  6106. }
  6107. } else if (shapeFlag & 64) {
  6108. if (domType !== 8) {
  6109. nextNode = onMismatch();
  6110. } else {
  6111. nextNode = vnode.type.hydrate(
  6112. node,
  6113. vnode,
  6114. parentComponent,
  6115. parentSuspense,
  6116. slotScopeIds,
  6117. optimized,
  6118. rendererInternals,
  6119. hydrateChildren
  6120. );
  6121. }
  6122. } else if (shapeFlag & 128) {
  6123. nextNode = vnode.type.hydrate(
  6124. node,
  6125. vnode,
  6126. parentComponent,
  6127. parentSuspense,
  6128. isSVGContainer(parentNode(node)),
  6129. slotScopeIds,
  6130. optimized,
  6131. rendererInternals,
  6132. hydrateNode
  6133. );
  6134. } else if (true) {
  6135. warn2("Invalid HostVNode type:", type, `(${typeof type})`);
  6136. }
  6137. }
  6138. if (ref2 != null) {
  6139. setRef(ref2, null, parentSuspense, vnode);
  6140. }
  6141. return nextNode;
  6142. };
  6143. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  6144. optimized = optimized || !!vnode.dynamicChildren;
  6145. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  6146. const forcePatch = type === "input" || type === "option";
  6147. if (true) {
  6148. if (dirs) {
  6149. invokeDirectiveHook(vnode, null, parentComponent, "created");
  6150. }
  6151. let needCallTransitionHooks = false;
  6152. if (isTemplateNode(el)) {
  6153. needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  6154. const content = el.content.firstChild;
  6155. if (needCallTransitionHooks) {
  6156. transition.beforeEnter(content);
  6157. }
  6158. replaceNode(content, el, parentComponent);
  6159. vnode.el = el = content;
  6160. }
  6161. if (props) {
  6162. if (forcePatch || !optimized || patchFlag & (16 | 32)) {
  6163. for (const key in props) {
  6164. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
  6165. key[0] === ".") {
  6166. patchProp2(
  6167. el,
  6168. key,
  6169. null,
  6170. props[key],
  6171. false,
  6172. void 0,
  6173. parentComponent
  6174. );
  6175. }
  6176. }
  6177. } else if (props.onClick) {
  6178. patchProp2(
  6179. el,
  6180. "onClick",
  6181. null,
  6182. props.onClick,
  6183. false,
  6184. void 0,
  6185. parentComponent
  6186. );
  6187. }
  6188. }
  6189. let vnodeHooks;
  6190. if (vnodeHooks = props && props.onVnodeBeforeMount) {
  6191. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  6192. }
  6193. if (dirs) {
  6194. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  6195. }
  6196. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
  6197. queueEffectWithSuspense(() => {
  6198. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  6199. needCallTransitionHooks && transition.enter(el);
  6200. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  6201. }, parentSuspense);
  6202. }
  6203. if (shapeFlag & 16 && // skip if element has innerHTML / textContent
  6204. !(props && (props.innerHTML || props.textContent))) {
  6205. let next = hydrateChildren(
  6206. el.firstChild,
  6207. vnode,
  6208. el,
  6209. parentComponent,
  6210. parentSuspense,
  6211. slotScopeIds,
  6212. optimized
  6213. );
  6214. let hasWarned2 = false;
  6215. while (next) {
  6216. hasMismatch = true;
  6217. if (!hasWarned2) {
  6218. warn2(
  6219. `Hydration children mismatch in <${vnode.type}>: server rendered element contains more child nodes than client vdom.`
  6220. );
  6221. hasWarned2 = true;
  6222. }
  6223. const cur = next;
  6224. next = next.nextSibling;
  6225. remove2(cur);
  6226. }
  6227. } else if (shapeFlag & 8) {
  6228. if (el.textContent !== vnode.children) {
  6229. hasMismatch = true;
  6230. warn2(
  6231. `Hydration text content mismatch in <${vnode.type}>:
  6232. - Server rendered: ${el.textContent}
  6233. - Client rendered: ${vnode.children}`
  6234. );
  6235. el.textContent = vnode.children;
  6236. }
  6237. }
  6238. }
  6239. return el.nextSibling;
  6240. };
  6241. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  6242. optimized = optimized || !!parentVNode.dynamicChildren;
  6243. const children = parentVNode.children;
  6244. const l = children.length;
  6245. let hasWarned2 = false;
  6246. for (let i = 0; i < l; i++) {
  6247. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  6248. if (node) {
  6249. node = hydrateNode(
  6250. node,
  6251. vnode,
  6252. parentComponent,
  6253. parentSuspense,
  6254. slotScopeIds,
  6255. optimized
  6256. );
  6257. } else if (vnode.type === Text && !vnode.children) {
  6258. continue;
  6259. } else {
  6260. hasMismatch = true;
  6261. if (!hasWarned2) {
  6262. warn2(
  6263. `Hydration children mismatch in <${container.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`
  6264. );
  6265. hasWarned2 = true;
  6266. }
  6267. patch(
  6268. null,
  6269. vnode,
  6270. container,
  6271. null,
  6272. parentComponent,
  6273. parentSuspense,
  6274. isSVGContainer(container),
  6275. slotScopeIds
  6276. );
  6277. }
  6278. }
  6279. return node;
  6280. };
  6281. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  6282. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  6283. if (fragmentSlotScopeIds) {
  6284. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  6285. }
  6286. const container = parentNode(node);
  6287. const next = hydrateChildren(
  6288. nextSibling(node),
  6289. vnode,
  6290. container,
  6291. parentComponent,
  6292. parentSuspense,
  6293. slotScopeIds,
  6294. optimized
  6295. );
  6296. if (next && isComment(next) && next.data === "]") {
  6297. return nextSibling(vnode.anchor = next);
  6298. } else {
  6299. hasMismatch = true;
  6300. insert(vnode.anchor = createComment(`]`), container, next);
  6301. return next;
  6302. }
  6303. };
  6304. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  6305. hasMismatch = true;
  6306. warn2(
  6307. `Hydration node mismatch:
  6308. - Client vnode:`,
  6309. vnode.type,
  6310. `
  6311. - Server rendered DOM:`,
  6312. node,
  6313. node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``
  6314. );
  6315. vnode.el = null;
  6316. if (isFragment) {
  6317. const end = locateClosingAnchor(node);
  6318. while (true) {
  6319. const next2 = nextSibling(node);
  6320. if (next2 && next2 !== end) {
  6321. remove2(next2);
  6322. } else {
  6323. break;
  6324. }
  6325. }
  6326. }
  6327. const next = nextSibling(node);
  6328. const container = parentNode(node);
  6329. remove2(node);
  6330. patch(
  6331. null,
  6332. vnode,
  6333. container,
  6334. next,
  6335. parentComponent,
  6336. parentSuspense,
  6337. isSVGContainer(container),
  6338. slotScopeIds
  6339. );
  6340. return next;
  6341. };
  6342. const locateClosingAnchor = (node, open = "[", close = "]") => {
  6343. let match = 0;
  6344. while (node) {
  6345. node = nextSibling(node);
  6346. if (node && isComment(node)) {
  6347. if (node.data === open)
  6348. match++;
  6349. if (node.data === close) {
  6350. if (match === 0) {
  6351. return nextSibling(node);
  6352. } else {
  6353. match--;
  6354. }
  6355. }
  6356. }
  6357. }
  6358. return node;
  6359. };
  6360. const replaceNode = (newNode, oldNode, parentComponent) => {
  6361. const parentNode2 = oldNode.parentNode;
  6362. if (parentNode2) {
  6363. parentNode2.replaceChild(newNode, oldNode);
  6364. }
  6365. let parent = parentComponent;
  6366. while (parent) {
  6367. if (parent.vnode.el === oldNode) {
  6368. parent.vnode.el = parent.subTree.el = newNode;
  6369. }
  6370. parent = parent.parent;
  6371. }
  6372. };
  6373. const isTemplateNode = (node) => {
  6374. return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
  6375. };
  6376. return [hydrate2, hydrateNode];
  6377. }
  6378. var supported;
  6379. var perf;
  6380. function startMeasure(instance, type) {
  6381. if (instance.appContext.config.performance && isSupported()) {
  6382. perf.mark(`vue-${type}-${instance.uid}`);
  6383. }
  6384. if (true) {
  6385. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  6386. }
  6387. }
  6388. function endMeasure(instance, type) {
  6389. if (instance.appContext.config.performance && isSupported()) {
  6390. const startTag = `vue-${type}-${instance.uid}`;
  6391. const endTag = startTag + `:end`;
  6392. perf.mark(endTag);
  6393. perf.measure(
  6394. `<${formatComponentName(instance, instance.type)}> ${type}`,
  6395. startTag,
  6396. endTag
  6397. );
  6398. perf.clearMarks(startTag);
  6399. perf.clearMarks(endTag);
  6400. }
  6401. if (true) {
  6402. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  6403. }
  6404. }
  6405. function isSupported() {
  6406. if (supported !== void 0) {
  6407. return supported;
  6408. }
  6409. if (typeof window !== "undefined" && window.performance) {
  6410. supported = true;
  6411. perf = window.performance;
  6412. } else {
  6413. supported = false;
  6414. }
  6415. return supported;
  6416. }
  6417. function initFeatureFlags() {
  6418. const needWarn = [];
  6419. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  6420. needWarn.push(`__VUE_OPTIONS_API__`);
  6421. getGlobalThis().__VUE_OPTIONS_API__ = true;
  6422. }
  6423. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  6424. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  6425. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  6426. }
  6427. if (needWarn.length) {
  6428. const multi = needWarn.length > 1;
  6429. console.warn(
  6430. `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.
  6431. For more details, see https://link.vuejs.org/feature-flags.`
  6432. );
  6433. }
  6434. }
  6435. var queuePostRenderEffect = queueEffectWithSuspense;
  6436. function createRenderer(options) {
  6437. return baseCreateRenderer(options);
  6438. }
  6439. function createHydrationRenderer(options) {
  6440. return baseCreateRenderer(options, createHydrationFunctions);
  6441. }
  6442. function baseCreateRenderer(options, createHydrationFns) {
  6443. {
  6444. initFeatureFlags();
  6445. }
  6446. const target = getGlobalThis();
  6447. target.__VUE__ = true;
  6448. if (true) {
  6449. setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  6450. }
  6451. const {
  6452. insert: hostInsert,
  6453. remove: hostRemove,
  6454. patchProp: hostPatchProp,
  6455. createElement: hostCreateElement,
  6456. createText: hostCreateText,
  6457. createComment: hostCreateComment,
  6458. setText: hostSetText,
  6459. setElementText: hostSetElementText,
  6460. parentNode: hostParentNode,
  6461. nextSibling: hostNextSibling,
  6462. setScopeId: hostSetScopeId = NOOP,
  6463. insertStaticContent: hostInsertStaticContent
  6464. } = options;
  6465. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  6466. if (n1 === n2) {
  6467. return;
  6468. }
  6469. if (n1 && !isSameVNodeType(n1, n2)) {
  6470. anchor = getNextHostNode(n1);
  6471. unmount(n1, parentComponent, parentSuspense, true);
  6472. n1 = null;
  6473. }
  6474. if (n2.patchFlag === -2) {
  6475. optimized = false;
  6476. n2.dynamicChildren = null;
  6477. }
  6478. const { type, ref: ref2, shapeFlag } = n2;
  6479. switch (type) {
  6480. case Text:
  6481. processText(n1, n2, container, anchor);
  6482. break;
  6483. case Comment:
  6484. processCommentNode(n1, n2, container, anchor);
  6485. break;
  6486. case Static:
  6487. if (n1 == null) {
  6488. mountStaticNode(n2, container, anchor, isSVG);
  6489. } else if (true) {
  6490. patchStaticNode(n1, n2, container, isSVG);
  6491. }
  6492. break;
  6493. case Fragment:
  6494. processFragment(
  6495. n1,
  6496. n2,
  6497. container,
  6498. anchor,
  6499. parentComponent,
  6500. parentSuspense,
  6501. isSVG,
  6502. slotScopeIds,
  6503. optimized
  6504. );
  6505. break;
  6506. default:
  6507. if (shapeFlag & 1) {
  6508. processElement(
  6509. n1,
  6510. n2,
  6511. container,
  6512. anchor,
  6513. parentComponent,
  6514. parentSuspense,
  6515. isSVG,
  6516. slotScopeIds,
  6517. optimized
  6518. );
  6519. } else if (shapeFlag & 6) {
  6520. processComponent(
  6521. n1,
  6522. n2,
  6523. container,
  6524. anchor,
  6525. parentComponent,
  6526. parentSuspense,
  6527. isSVG,
  6528. slotScopeIds,
  6529. optimized
  6530. );
  6531. } else if (shapeFlag & 64) {
  6532. type.process(
  6533. n1,
  6534. n2,
  6535. container,
  6536. anchor,
  6537. parentComponent,
  6538. parentSuspense,
  6539. isSVG,
  6540. slotScopeIds,
  6541. optimized,
  6542. internals
  6543. );
  6544. } else if (shapeFlag & 128) {
  6545. type.process(
  6546. n1,
  6547. n2,
  6548. container,
  6549. anchor,
  6550. parentComponent,
  6551. parentSuspense,
  6552. isSVG,
  6553. slotScopeIds,
  6554. optimized,
  6555. internals
  6556. );
  6557. } else if (true) {
  6558. warn2("Invalid VNode type:", type, `(${typeof type})`);
  6559. }
  6560. }
  6561. if (ref2 != null && parentComponent) {
  6562. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  6563. }
  6564. };
  6565. const processText = (n1, n2, container, anchor) => {
  6566. if (n1 == null) {
  6567. hostInsert(
  6568. n2.el = hostCreateText(n2.children),
  6569. container,
  6570. anchor
  6571. );
  6572. } else {
  6573. const el = n2.el = n1.el;
  6574. if (n2.children !== n1.children) {
  6575. hostSetText(el, n2.children);
  6576. }
  6577. }
  6578. };
  6579. const processCommentNode = (n1, n2, container, anchor) => {
  6580. if (n1 == null) {
  6581. hostInsert(
  6582. n2.el = hostCreateComment(n2.children || ""),
  6583. container,
  6584. anchor
  6585. );
  6586. } else {
  6587. n2.el = n1.el;
  6588. }
  6589. };
  6590. const mountStaticNode = (n2, container, anchor, isSVG) => {
  6591. [n2.el, n2.anchor] = hostInsertStaticContent(
  6592. n2.children,
  6593. container,
  6594. anchor,
  6595. isSVG,
  6596. n2.el,
  6597. n2.anchor
  6598. );
  6599. };
  6600. const patchStaticNode = (n1, n2, container, isSVG) => {
  6601. if (n2.children !== n1.children) {
  6602. const anchor = hostNextSibling(n1.anchor);
  6603. removeStaticNode(n1);
  6604. [n2.el, n2.anchor] = hostInsertStaticContent(
  6605. n2.children,
  6606. container,
  6607. anchor,
  6608. isSVG
  6609. );
  6610. } else {
  6611. n2.el = n1.el;
  6612. n2.anchor = n1.anchor;
  6613. }
  6614. };
  6615. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  6616. let next;
  6617. while (el && el !== anchor) {
  6618. next = hostNextSibling(el);
  6619. hostInsert(el, container, nextSibling);
  6620. el = next;
  6621. }
  6622. hostInsert(anchor, container, nextSibling);
  6623. };
  6624. const removeStaticNode = ({ el, anchor }) => {
  6625. let next;
  6626. while (el && el !== anchor) {
  6627. next = hostNextSibling(el);
  6628. hostRemove(el);
  6629. el = next;
  6630. }
  6631. hostRemove(anchor);
  6632. };
  6633. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  6634. isSVG = isSVG || n2.type === "svg";
  6635. if (n1 == null) {
  6636. mountElement(
  6637. n2,
  6638. container,
  6639. anchor,
  6640. parentComponent,
  6641. parentSuspense,
  6642. isSVG,
  6643. slotScopeIds,
  6644. optimized
  6645. );
  6646. } else {
  6647. patchElement(
  6648. n1,
  6649. n2,
  6650. parentComponent,
  6651. parentSuspense,
  6652. isSVG,
  6653. slotScopeIds,
  6654. optimized
  6655. );
  6656. }
  6657. };
  6658. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  6659. let el;
  6660. let vnodeHook;
  6661. const { type, props, shapeFlag, transition, dirs } = vnode;
  6662. el = vnode.el = hostCreateElement(
  6663. vnode.type,
  6664. isSVG,
  6665. props && props.is,
  6666. props
  6667. );
  6668. if (shapeFlag & 8) {
  6669. hostSetElementText(el, vnode.children);
  6670. } else if (shapeFlag & 16) {
  6671. mountChildren(
  6672. vnode.children,
  6673. el,
  6674. null,
  6675. parentComponent,
  6676. parentSuspense,
  6677. isSVG && type !== "foreignObject",
  6678. slotScopeIds,
  6679. optimized
  6680. );
  6681. }
  6682. if (dirs) {
  6683. invokeDirectiveHook(vnode, null, parentComponent, "created");
  6684. }
  6685. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  6686. if (props) {
  6687. for (const key in props) {
  6688. if (key !== "value" && !isReservedProp(key)) {
  6689. hostPatchProp(
  6690. el,
  6691. key,
  6692. null,
  6693. props[key],
  6694. isSVG,
  6695. vnode.children,
  6696. parentComponent,
  6697. parentSuspense,
  6698. unmountChildren
  6699. );
  6700. }
  6701. }
  6702. if ("value" in props) {
  6703. hostPatchProp(el, "value", null, props.value);
  6704. }
  6705. if (vnodeHook = props.onVnodeBeforeMount) {
  6706. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6707. }
  6708. }
  6709. if (true) {
  6710. Object.defineProperty(el, "__vnode", {
  6711. value: vnode,
  6712. enumerable: false
  6713. });
  6714. Object.defineProperty(el, "__vueParentComponent", {
  6715. value: parentComponent,
  6716. enumerable: false
  6717. });
  6718. }
  6719. if (dirs) {
  6720. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  6721. }
  6722. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  6723. if (needCallTransitionHooks) {
  6724. transition.beforeEnter(el);
  6725. }
  6726. hostInsert(el, container, anchor);
  6727. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  6728. queuePostRenderEffect(() => {
  6729. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  6730. needCallTransitionHooks && transition.enter(el);
  6731. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  6732. }, parentSuspense);
  6733. }
  6734. };
  6735. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  6736. if (scopeId) {
  6737. hostSetScopeId(el, scopeId);
  6738. }
  6739. if (slotScopeIds) {
  6740. for (let i = 0; i < slotScopeIds.length; i++) {
  6741. hostSetScopeId(el, slotScopeIds[i]);
  6742. }
  6743. }
  6744. if (parentComponent) {
  6745. let subTree = parentComponent.subTree;
  6746. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
  6747. subTree = filterSingleRoot(subTree.children) || subTree;
  6748. }
  6749. if (vnode === subTree) {
  6750. const parentVNode = parentComponent.vnode;
  6751. setScopeId(
  6752. el,
  6753. parentVNode,
  6754. parentVNode.scopeId,
  6755. parentVNode.slotScopeIds,
  6756. parentComponent.parent
  6757. );
  6758. }
  6759. }
  6760. };
  6761. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
  6762. for (let i = start; i < children.length; i++) {
  6763. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  6764. patch(
  6765. null,
  6766. child,
  6767. container,
  6768. anchor,
  6769. parentComponent,
  6770. parentSuspense,
  6771. isSVG,
  6772. slotScopeIds,
  6773. optimized
  6774. );
  6775. }
  6776. };
  6777. const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  6778. const el = n2.el = n1.el;
  6779. let { patchFlag, dynamicChildren, dirs } = n2;
  6780. patchFlag |= n1.patchFlag & 16;
  6781. const oldProps = n1.props || EMPTY_OBJ;
  6782. const newProps = n2.props || EMPTY_OBJ;
  6783. let vnodeHook;
  6784. parentComponent && toggleRecurse(parentComponent, false);
  6785. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  6786. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  6787. }
  6788. if (dirs) {
  6789. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  6790. }
  6791. parentComponent && toggleRecurse(parentComponent, true);
  6792. if (isHmrUpdating) {
  6793. patchFlag = 0;
  6794. optimized = false;
  6795. dynamicChildren = null;
  6796. }
  6797. const areChildrenSVG = isSVG && n2.type !== "foreignObject";
  6798. if (dynamicChildren) {
  6799. patchBlockChildren(
  6800. n1.dynamicChildren,
  6801. dynamicChildren,
  6802. el,
  6803. parentComponent,
  6804. parentSuspense,
  6805. areChildrenSVG,
  6806. slotScopeIds
  6807. );
  6808. if (true) {
  6809. traverseStaticChildren(n1, n2);
  6810. }
  6811. } else if (!optimized) {
  6812. patchChildren(
  6813. n1,
  6814. n2,
  6815. el,
  6816. null,
  6817. parentComponent,
  6818. parentSuspense,
  6819. areChildrenSVG,
  6820. slotScopeIds,
  6821. false
  6822. );
  6823. }
  6824. if (patchFlag > 0) {
  6825. if (patchFlag & 16) {
  6826. patchProps(
  6827. el,
  6828. n2,
  6829. oldProps,
  6830. newProps,
  6831. parentComponent,
  6832. parentSuspense,
  6833. isSVG
  6834. );
  6835. } else {
  6836. if (patchFlag & 2) {
  6837. if (oldProps.class !== newProps.class) {
  6838. hostPatchProp(el, "class", null, newProps.class, isSVG);
  6839. }
  6840. }
  6841. if (patchFlag & 4) {
  6842. hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG);
  6843. }
  6844. if (patchFlag & 8) {
  6845. const propsToUpdate = n2.dynamicProps;
  6846. for (let i = 0; i < propsToUpdate.length; i++) {
  6847. const key = propsToUpdate[i];
  6848. const prev = oldProps[key];
  6849. const next = newProps[key];
  6850. if (next !== prev || key === "value") {
  6851. hostPatchProp(
  6852. el,
  6853. key,
  6854. prev,
  6855. next,
  6856. isSVG,
  6857. n1.children,
  6858. parentComponent,
  6859. parentSuspense,
  6860. unmountChildren
  6861. );
  6862. }
  6863. }
  6864. }
  6865. }
  6866. if (patchFlag & 1) {
  6867. if (n1.children !== n2.children) {
  6868. hostSetElementText(el, n2.children);
  6869. }
  6870. }
  6871. } else if (!optimized && dynamicChildren == null) {
  6872. patchProps(
  6873. el,
  6874. n2,
  6875. oldProps,
  6876. newProps,
  6877. parentComponent,
  6878. parentSuspense,
  6879. isSVG
  6880. );
  6881. }
  6882. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  6883. queuePostRenderEffect(() => {
  6884. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  6885. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  6886. }, parentSuspense);
  6887. }
  6888. };
  6889. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
  6890. for (let i = 0; i < newChildren.length; i++) {
  6891. const oldVNode = oldChildren[i];
  6892. const newVNode = newChildren[i];
  6893. const container = (
  6894. // oldVNode may be an errored async setup() component inside Suspense
  6895. // which will not have a mounted element
  6896. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  6897. // of the Fragment itself so it can move its children.
  6898. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  6899. // which also requires the correct parent container
  6900. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  6901. oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
  6902. // In other cases, the parent container is not actually used so we
  6903. // just pass the block element here to avoid a DOM parentNode call.
  6904. fallbackContainer
  6905. )
  6906. );
  6907. patch(
  6908. oldVNode,
  6909. newVNode,
  6910. container,
  6911. null,
  6912. parentComponent,
  6913. parentSuspense,
  6914. isSVG,
  6915. slotScopeIds,
  6916. true
  6917. );
  6918. }
  6919. };
  6920. const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
  6921. if (oldProps !== newProps) {
  6922. if (oldProps !== EMPTY_OBJ) {
  6923. for (const key in oldProps) {
  6924. if (!isReservedProp(key) && !(key in newProps)) {
  6925. hostPatchProp(
  6926. el,
  6927. key,
  6928. oldProps[key],
  6929. null,
  6930. isSVG,
  6931. vnode.children,
  6932. parentComponent,
  6933. parentSuspense,
  6934. unmountChildren
  6935. );
  6936. }
  6937. }
  6938. }
  6939. for (const key in newProps) {
  6940. if (isReservedProp(key))
  6941. continue;
  6942. const next = newProps[key];
  6943. const prev = oldProps[key];
  6944. if (next !== prev && key !== "value") {
  6945. hostPatchProp(
  6946. el,
  6947. key,
  6948. prev,
  6949. next,
  6950. isSVG,
  6951. vnode.children,
  6952. parentComponent,
  6953. parentSuspense,
  6954. unmountChildren
  6955. );
  6956. }
  6957. }
  6958. if ("value" in newProps) {
  6959. hostPatchProp(el, "value", oldProps.value, newProps.value);
  6960. }
  6961. }
  6962. };
  6963. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  6964. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  6965. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  6966. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  6967. if (
  6968. // #5523 dev root fragment may inherit directives
  6969. isHmrUpdating || patchFlag & 2048
  6970. ) {
  6971. patchFlag = 0;
  6972. optimized = false;
  6973. dynamicChildren = null;
  6974. }
  6975. if (fragmentSlotScopeIds) {
  6976. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  6977. }
  6978. if (n1 == null) {
  6979. hostInsert(fragmentStartAnchor, container, anchor);
  6980. hostInsert(fragmentEndAnchor, container, anchor);
  6981. mountChildren(
  6982. n2.children,
  6983. container,
  6984. fragmentEndAnchor,
  6985. parentComponent,
  6986. parentSuspense,
  6987. isSVG,
  6988. slotScopeIds,
  6989. optimized
  6990. );
  6991. } else {
  6992. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  6993. // of renderSlot() with no valid children
  6994. n1.dynamicChildren) {
  6995. patchBlockChildren(
  6996. n1.dynamicChildren,
  6997. dynamicChildren,
  6998. container,
  6999. parentComponent,
  7000. parentSuspense,
  7001. isSVG,
  7002. slotScopeIds
  7003. );
  7004. if (true) {
  7005. traverseStaticChildren(n1, n2);
  7006. } else if (
  7007. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  7008. // get moved around. Make sure all root level vnodes inherit el.
  7009. // #2134 or if it's a component root, it may also get moved around
  7010. // as the component is being moved.
  7011. n2.key != null || parentComponent && n2 === parentComponent.subTree
  7012. ) {
  7013. traverseStaticChildren(
  7014. n1,
  7015. n2,
  7016. true
  7017. /* shallow */
  7018. );
  7019. }
  7020. } else {
  7021. patchChildren(
  7022. n1,
  7023. n2,
  7024. container,
  7025. fragmentEndAnchor,
  7026. parentComponent,
  7027. parentSuspense,
  7028. isSVG,
  7029. slotScopeIds,
  7030. optimized
  7031. );
  7032. }
  7033. }
  7034. };
  7035. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  7036. n2.slotScopeIds = slotScopeIds;
  7037. if (n1 == null) {
  7038. if (n2.shapeFlag & 512) {
  7039. parentComponent.ctx.activate(
  7040. n2,
  7041. container,
  7042. anchor,
  7043. isSVG,
  7044. optimized
  7045. );
  7046. } else {
  7047. mountComponent(
  7048. n2,
  7049. container,
  7050. anchor,
  7051. parentComponent,
  7052. parentSuspense,
  7053. isSVG,
  7054. optimized
  7055. );
  7056. }
  7057. } else {
  7058. updateComponent(n1, n2, optimized);
  7059. }
  7060. };
  7061. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
  7062. const instance = initialVNode.component = createComponentInstance(
  7063. initialVNode,
  7064. parentComponent,
  7065. parentSuspense
  7066. );
  7067. if (instance.type.__hmrId) {
  7068. registerHMR(instance);
  7069. }
  7070. if (true) {
  7071. pushWarningContext(initialVNode);
  7072. startMeasure(instance, `mount`);
  7073. }
  7074. if (isKeepAlive(initialVNode)) {
  7075. instance.ctx.renderer = internals;
  7076. }
  7077. {
  7078. if (true) {
  7079. startMeasure(instance, `init`);
  7080. }
  7081. setupComponent(instance);
  7082. if (true) {
  7083. endMeasure(instance, `init`);
  7084. }
  7085. }
  7086. if (instance.asyncDep) {
  7087. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
  7088. if (!initialVNode.el) {
  7089. const placeholder = instance.subTree = createVNode(Comment);
  7090. processCommentNode(null, placeholder, container, anchor);
  7091. }
  7092. return;
  7093. }
  7094. setupRenderEffect(
  7095. instance,
  7096. initialVNode,
  7097. container,
  7098. anchor,
  7099. parentSuspense,
  7100. isSVG,
  7101. optimized
  7102. );
  7103. if (true) {
  7104. popWarningContext();
  7105. endMeasure(instance, `mount`);
  7106. }
  7107. };
  7108. const updateComponent = (n1, n2, optimized) => {
  7109. const instance = n2.component = n1.component;
  7110. if (shouldUpdateComponent(n1, n2, optimized)) {
  7111. if (instance.asyncDep && !instance.asyncResolved) {
  7112. if (true) {
  7113. pushWarningContext(n2);
  7114. }
  7115. updateComponentPreRender(instance, n2, optimized);
  7116. if (true) {
  7117. popWarningContext();
  7118. }
  7119. return;
  7120. } else {
  7121. instance.next = n2;
  7122. invalidateJob(instance.update);
  7123. instance.update();
  7124. }
  7125. } else {
  7126. n2.el = n1.el;
  7127. instance.vnode = n2;
  7128. }
  7129. };
  7130. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
  7131. const componentUpdateFn = () => {
  7132. if (!instance.isMounted) {
  7133. let vnodeHook;
  7134. const { el, props } = initialVNode;
  7135. const { bm, m, parent } = instance;
  7136. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  7137. toggleRecurse(instance, false);
  7138. if (bm) {
  7139. invokeArrayFns(bm);
  7140. }
  7141. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  7142. invokeVNodeHook(vnodeHook, parent, initialVNode);
  7143. }
  7144. toggleRecurse(instance, true);
  7145. if (el && hydrateNode) {
  7146. const hydrateSubTree = () => {
  7147. if (true) {
  7148. startMeasure(instance, `render`);
  7149. }
  7150. instance.subTree = renderComponentRoot(instance);
  7151. if (true) {
  7152. endMeasure(instance, `render`);
  7153. }
  7154. if (true) {
  7155. startMeasure(instance, `hydrate`);
  7156. }
  7157. hydrateNode(
  7158. el,
  7159. instance.subTree,
  7160. instance,
  7161. parentSuspense,
  7162. null
  7163. );
  7164. if (true) {
  7165. endMeasure(instance, `hydrate`);
  7166. }
  7167. };
  7168. if (isAsyncWrapperVNode) {
  7169. initialVNode.type.__asyncLoader().then(
  7170. // note: we are moving the render call into an async callback,
  7171. // which means it won't track dependencies - but it's ok because
  7172. // a server-rendered async wrapper is already in resolved state
  7173. // and it will never need to change.
  7174. () => !instance.isUnmounted && hydrateSubTree()
  7175. );
  7176. } else {
  7177. hydrateSubTree();
  7178. }
  7179. } else {
  7180. if (true) {
  7181. startMeasure(instance, `render`);
  7182. }
  7183. const subTree = instance.subTree = renderComponentRoot(instance);
  7184. if (true) {
  7185. endMeasure(instance, `render`);
  7186. }
  7187. if (true) {
  7188. startMeasure(instance, `patch`);
  7189. }
  7190. patch(
  7191. null,
  7192. subTree,
  7193. container,
  7194. anchor,
  7195. instance,
  7196. parentSuspense,
  7197. isSVG
  7198. );
  7199. if (true) {
  7200. endMeasure(instance, `patch`);
  7201. }
  7202. initialVNode.el = subTree.el;
  7203. }
  7204. if (m) {
  7205. queuePostRenderEffect(m, parentSuspense);
  7206. }
  7207. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  7208. const scopedInitialVNode = initialVNode;
  7209. queuePostRenderEffect(
  7210. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  7211. parentSuspense
  7212. );
  7213. }
  7214. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  7215. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  7216. }
  7217. instance.isMounted = true;
  7218. if (true) {
  7219. devtoolsComponentAdded(instance);
  7220. }
  7221. initialVNode = container = anchor = null;
  7222. } else {
  7223. let { next, bu, u, parent, vnode } = instance;
  7224. let originNext = next;
  7225. let vnodeHook;
  7226. if (true) {
  7227. pushWarningContext(next || instance.vnode);
  7228. }
  7229. toggleRecurse(instance, false);
  7230. if (next) {
  7231. next.el = vnode.el;
  7232. updateComponentPreRender(instance, next, optimized);
  7233. } else {
  7234. next = vnode;
  7235. }
  7236. if (bu) {
  7237. invokeArrayFns(bu);
  7238. }
  7239. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  7240. invokeVNodeHook(vnodeHook, parent, next, vnode);
  7241. }
  7242. toggleRecurse(instance, true);
  7243. if (true) {
  7244. startMeasure(instance, `render`);
  7245. }
  7246. const nextTree = renderComponentRoot(instance);
  7247. if (true) {
  7248. endMeasure(instance, `render`);
  7249. }
  7250. const prevTree = instance.subTree;
  7251. instance.subTree = nextTree;
  7252. if (true) {
  7253. startMeasure(instance, `patch`);
  7254. }
  7255. patch(
  7256. prevTree,
  7257. nextTree,
  7258. // parent may have changed if it's in a teleport
  7259. hostParentNode(prevTree.el),
  7260. // anchor may have changed if it's in a fragment
  7261. getNextHostNode(prevTree),
  7262. instance,
  7263. parentSuspense,
  7264. isSVG
  7265. );
  7266. if (true) {
  7267. endMeasure(instance, `patch`);
  7268. }
  7269. next.el = nextTree.el;
  7270. if (originNext === null) {
  7271. updateHOCHostEl(instance, nextTree.el);
  7272. }
  7273. if (u) {
  7274. queuePostRenderEffect(u, parentSuspense);
  7275. }
  7276. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  7277. queuePostRenderEffect(
  7278. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  7279. parentSuspense
  7280. );
  7281. }
  7282. if (true) {
  7283. devtoolsComponentUpdated(instance);
  7284. }
  7285. if (true) {
  7286. popWarningContext();
  7287. }
  7288. }
  7289. };
  7290. const effect2 = instance.effect = new ReactiveEffect(
  7291. componentUpdateFn,
  7292. () => queueJob(update),
  7293. instance.scope
  7294. // track it in component's effect scope
  7295. );
  7296. const update = instance.update = () => effect2.run();
  7297. update.id = instance.uid;
  7298. toggleRecurse(instance, true);
  7299. if (true) {
  7300. effect2.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  7301. effect2.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  7302. update.ownerInstance = instance;
  7303. }
  7304. update();
  7305. };
  7306. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  7307. nextVNode.component = instance;
  7308. const prevProps = instance.vnode.props;
  7309. instance.vnode = nextVNode;
  7310. instance.next = null;
  7311. updateProps(instance, nextVNode.props, prevProps, optimized);
  7312. updateSlots(instance, nextVNode.children, optimized);
  7313. pauseTracking();
  7314. flushPreFlushCbs(instance);
  7315. resetTracking();
  7316. };
  7317. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
  7318. const c1 = n1 && n1.children;
  7319. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  7320. const c2 = n2.children;
  7321. const { patchFlag, shapeFlag } = n2;
  7322. if (patchFlag > 0) {
  7323. if (patchFlag & 128) {
  7324. patchKeyedChildren(
  7325. c1,
  7326. c2,
  7327. container,
  7328. anchor,
  7329. parentComponent,
  7330. parentSuspense,
  7331. isSVG,
  7332. slotScopeIds,
  7333. optimized
  7334. );
  7335. return;
  7336. } else if (patchFlag & 256) {
  7337. patchUnkeyedChildren(
  7338. c1,
  7339. c2,
  7340. container,
  7341. anchor,
  7342. parentComponent,
  7343. parentSuspense,
  7344. isSVG,
  7345. slotScopeIds,
  7346. optimized
  7347. );
  7348. return;
  7349. }
  7350. }
  7351. if (shapeFlag & 8) {
  7352. if (prevShapeFlag & 16) {
  7353. unmountChildren(c1, parentComponent, parentSuspense);
  7354. }
  7355. if (c2 !== c1) {
  7356. hostSetElementText(container, c2);
  7357. }
  7358. } else {
  7359. if (prevShapeFlag & 16) {
  7360. if (shapeFlag & 16) {
  7361. patchKeyedChildren(
  7362. c1,
  7363. c2,
  7364. container,
  7365. anchor,
  7366. parentComponent,
  7367. parentSuspense,
  7368. isSVG,
  7369. slotScopeIds,
  7370. optimized
  7371. );
  7372. } else {
  7373. unmountChildren(c1, parentComponent, parentSuspense, true);
  7374. }
  7375. } else {
  7376. if (prevShapeFlag & 8) {
  7377. hostSetElementText(container, "");
  7378. }
  7379. if (shapeFlag & 16) {
  7380. mountChildren(
  7381. c2,
  7382. container,
  7383. anchor,
  7384. parentComponent,
  7385. parentSuspense,
  7386. isSVG,
  7387. slotScopeIds,
  7388. optimized
  7389. );
  7390. }
  7391. }
  7392. }
  7393. };
  7394. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  7395. c1 = c1 || EMPTY_ARR;
  7396. c2 = c2 || EMPTY_ARR;
  7397. const oldLength = c1.length;
  7398. const newLength = c2.length;
  7399. const commonLength = Math.min(oldLength, newLength);
  7400. let i;
  7401. for (i = 0; i < commonLength; i++) {
  7402. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7403. patch(
  7404. c1[i],
  7405. nextChild,
  7406. container,
  7407. null,
  7408. parentComponent,
  7409. parentSuspense,
  7410. isSVG,
  7411. slotScopeIds,
  7412. optimized
  7413. );
  7414. }
  7415. if (oldLength > newLength) {
  7416. unmountChildren(
  7417. c1,
  7418. parentComponent,
  7419. parentSuspense,
  7420. true,
  7421. false,
  7422. commonLength
  7423. );
  7424. } else {
  7425. mountChildren(
  7426. c2,
  7427. container,
  7428. anchor,
  7429. parentComponent,
  7430. parentSuspense,
  7431. isSVG,
  7432. slotScopeIds,
  7433. optimized,
  7434. commonLength
  7435. );
  7436. }
  7437. };
  7438. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  7439. let i = 0;
  7440. const l2 = c2.length;
  7441. let e1 = c1.length - 1;
  7442. let e2 = l2 - 1;
  7443. while (i <= e1 && i <= e2) {
  7444. const n1 = c1[i];
  7445. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7446. if (isSameVNodeType(n1, n2)) {
  7447. patch(
  7448. n1,
  7449. n2,
  7450. container,
  7451. null,
  7452. parentComponent,
  7453. parentSuspense,
  7454. isSVG,
  7455. slotScopeIds,
  7456. optimized
  7457. );
  7458. } else {
  7459. break;
  7460. }
  7461. i++;
  7462. }
  7463. while (i <= e1 && i <= e2) {
  7464. const n1 = c1[e1];
  7465. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  7466. if (isSameVNodeType(n1, n2)) {
  7467. patch(
  7468. n1,
  7469. n2,
  7470. container,
  7471. null,
  7472. parentComponent,
  7473. parentSuspense,
  7474. isSVG,
  7475. slotScopeIds,
  7476. optimized
  7477. );
  7478. } else {
  7479. break;
  7480. }
  7481. e1--;
  7482. e2--;
  7483. }
  7484. if (i > e1) {
  7485. if (i <= e2) {
  7486. const nextPos = e2 + 1;
  7487. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  7488. while (i <= e2) {
  7489. patch(
  7490. null,
  7491. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  7492. container,
  7493. anchor,
  7494. parentComponent,
  7495. parentSuspense,
  7496. isSVG,
  7497. slotScopeIds,
  7498. optimized
  7499. );
  7500. i++;
  7501. }
  7502. }
  7503. } else if (i > e2) {
  7504. while (i <= e1) {
  7505. unmount(c1[i], parentComponent, parentSuspense, true);
  7506. i++;
  7507. }
  7508. } else {
  7509. const s1 = i;
  7510. const s2 = i;
  7511. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  7512. for (i = s2; i <= e2; i++) {
  7513. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7514. if (nextChild.key != null) {
  7515. if (keyToNewIndexMap.has(nextChild.key)) {
  7516. warn2(
  7517. `Duplicate keys found during update:`,
  7518. JSON.stringify(nextChild.key),
  7519. `Make sure keys are unique.`
  7520. );
  7521. }
  7522. keyToNewIndexMap.set(nextChild.key, i);
  7523. }
  7524. }
  7525. let j;
  7526. let patched = 0;
  7527. const toBePatched = e2 - s2 + 1;
  7528. let moved = false;
  7529. let maxNewIndexSoFar = 0;
  7530. const newIndexToOldIndexMap = new Array(toBePatched);
  7531. for (i = 0; i < toBePatched; i++)
  7532. newIndexToOldIndexMap[i] = 0;
  7533. for (i = s1; i <= e1; i++) {
  7534. const prevChild = c1[i];
  7535. if (patched >= toBePatched) {
  7536. unmount(prevChild, parentComponent, parentSuspense, true);
  7537. continue;
  7538. }
  7539. let newIndex;
  7540. if (prevChild.key != null) {
  7541. newIndex = keyToNewIndexMap.get(prevChild.key);
  7542. } else {
  7543. for (j = s2; j <= e2; j++) {
  7544. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  7545. newIndex = j;
  7546. break;
  7547. }
  7548. }
  7549. }
  7550. if (newIndex === void 0) {
  7551. unmount(prevChild, parentComponent, parentSuspense, true);
  7552. } else {
  7553. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  7554. if (newIndex >= maxNewIndexSoFar) {
  7555. maxNewIndexSoFar = newIndex;
  7556. } else {
  7557. moved = true;
  7558. }
  7559. patch(
  7560. prevChild,
  7561. c2[newIndex],
  7562. container,
  7563. null,
  7564. parentComponent,
  7565. parentSuspense,
  7566. isSVG,
  7567. slotScopeIds,
  7568. optimized
  7569. );
  7570. patched++;
  7571. }
  7572. }
  7573. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  7574. j = increasingNewIndexSequence.length - 1;
  7575. for (i = toBePatched - 1; i >= 0; i--) {
  7576. const nextIndex = s2 + i;
  7577. const nextChild = c2[nextIndex];
  7578. const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
  7579. if (newIndexToOldIndexMap[i] === 0) {
  7580. patch(
  7581. null,
  7582. nextChild,
  7583. container,
  7584. anchor,
  7585. parentComponent,
  7586. parentSuspense,
  7587. isSVG,
  7588. slotScopeIds,
  7589. optimized
  7590. );
  7591. } else if (moved) {
  7592. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  7593. move(nextChild, container, anchor, 2);
  7594. } else {
  7595. j--;
  7596. }
  7597. }
  7598. }
  7599. }
  7600. };
  7601. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  7602. const { el, type, transition, children, shapeFlag } = vnode;
  7603. if (shapeFlag & 6) {
  7604. move(vnode.component.subTree, container, anchor, moveType);
  7605. return;
  7606. }
  7607. if (shapeFlag & 128) {
  7608. vnode.suspense.move(container, anchor, moveType);
  7609. return;
  7610. }
  7611. if (shapeFlag & 64) {
  7612. type.move(vnode, container, anchor, internals);
  7613. return;
  7614. }
  7615. if (type === Fragment) {
  7616. hostInsert(el, container, anchor);
  7617. for (let i = 0; i < children.length; i++) {
  7618. move(children[i], container, anchor, moveType);
  7619. }
  7620. hostInsert(vnode.anchor, container, anchor);
  7621. return;
  7622. }
  7623. if (type === Static) {
  7624. moveStaticNode(vnode, container, anchor);
  7625. return;
  7626. }
  7627. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  7628. if (needTransition2) {
  7629. if (moveType === 0) {
  7630. transition.beforeEnter(el);
  7631. hostInsert(el, container, anchor);
  7632. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  7633. } else {
  7634. const { leave, delayLeave, afterLeave } = transition;
  7635. const remove22 = () => hostInsert(el, container, anchor);
  7636. const performLeave = () => {
  7637. leave(el, () => {
  7638. remove22();
  7639. afterLeave && afterLeave();
  7640. });
  7641. };
  7642. if (delayLeave) {
  7643. delayLeave(el, remove22, performLeave);
  7644. } else {
  7645. performLeave();
  7646. }
  7647. }
  7648. } else {
  7649. hostInsert(el, container, anchor);
  7650. }
  7651. };
  7652. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  7653. const {
  7654. type,
  7655. props,
  7656. ref: ref2,
  7657. children,
  7658. dynamicChildren,
  7659. shapeFlag,
  7660. patchFlag,
  7661. dirs
  7662. } = vnode;
  7663. if (ref2 != null) {
  7664. setRef(ref2, null, parentSuspense, vnode, true);
  7665. }
  7666. if (shapeFlag & 256) {
  7667. parentComponent.ctx.deactivate(vnode);
  7668. return;
  7669. }
  7670. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  7671. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  7672. let vnodeHook;
  7673. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  7674. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7675. }
  7676. if (shapeFlag & 6) {
  7677. unmountComponent(vnode.component, parentSuspense, doRemove);
  7678. } else {
  7679. if (shapeFlag & 128) {
  7680. vnode.suspense.unmount(parentSuspense, doRemove);
  7681. return;
  7682. }
  7683. if (shouldInvokeDirs) {
  7684. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  7685. }
  7686. if (shapeFlag & 64) {
  7687. vnode.type.remove(
  7688. vnode,
  7689. parentComponent,
  7690. parentSuspense,
  7691. optimized,
  7692. internals,
  7693. doRemove
  7694. );
  7695. } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
  7696. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  7697. unmountChildren(
  7698. dynamicChildren,
  7699. parentComponent,
  7700. parentSuspense,
  7701. false,
  7702. true
  7703. );
  7704. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  7705. unmountChildren(children, parentComponent, parentSuspense);
  7706. }
  7707. if (doRemove) {
  7708. remove2(vnode);
  7709. }
  7710. }
  7711. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  7712. queuePostRenderEffect(() => {
  7713. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7714. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  7715. }, parentSuspense);
  7716. }
  7717. };
  7718. const remove2 = (vnode) => {
  7719. const { type, el, anchor, transition } = vnode;
  7720. if (type === Fragment) {
  7721. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
  7722. vnode.children.forEach((child) => {
  7723. if (child.type === Comment) {
  7724. hostRemove(child.el);
  7725. } else {
  7726. remove2(child);
  7727. }
  7728. });
  7729. } else {
  7730. removeFragment(el, anchor);
  7731. }
  7732. return;
  7733. }
  7734. if (type === Static) {
  7735. removeStaticNode(vnode);
  7736. return;
  7737. }
  7738. const performRemove = () => {
  7739. hostRemove(el);
  7740. if (transition && !transition.persisted && transition.afterLeave) {
  7741. transition.afterLeave();
  7742. }
  7743. };
  7744. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  7745. const { leave, delayLeave } = transition;
  7746. const performLeave = () => leave(el, performRemove);
  7747. if (delayLeave) {
  7748. delayLeave(vnode.el, performRemove, performLeave);
  7749. } else {
  7750. performLeave();
  7751. }
  7752. } else {
  7753. performRemove();
  7754. }
  7755. };
  7756. const removeFragment = (cur, end) => {
  7757. let next;
  7758. while (cur !== end) {
  7759. next = hostNextSibling(cur);
  7760. hostRemove(cur);
  7761. cur = next;
  7762. }
  7763. hostRemove(end);
  7764. };
  7765. const unmountComponent = (instance, parentSuspense, doRemove) => {
  7766. if (instance.type.__hmrId) {
  7767. unregisterHMR(instance);
  7768. }
  7769. const { bum, scope, update, subTree, um } = instance;
  7770. if (bum) {
  7771. invokeArrayFns(bum);
  7772. }
  7773. scope.stop();
  7774. if (update) {
  7775. update.active = false;
  7776. unmount(subTree, instance, parentSuspense, doRemove);
  7777. }
  7778. if (um) {
  7779. queuePostRenderEffect(um, parentSuspense);
  7780. }
  7781. queuePostRenderEffect(() => {
  7782. instance.isUnmounted = true;
  7783. }, parentSuspense);
  7784. if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
  7785. parentSuspense.deps--;
  7786. if (parentSuspense.deps === 0) {
  7787. parentSuspense.resolve();
  7788. }
  7789. }
  7790. if (true) {
  7791. devtoolsComponentRemoved(instance);
  7792. }
  7793. };
  7794. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  7795. for (let i = start; i < children.length; i++) {
  7796. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  7797. }
  7798. };
  7799. const getNextHostNode = (vnode) => {
  7800. if (vnode.shapeFlag & 6) {
  7801. return getNextHostNode(vnode.component.subTree);
  7802. }
  7803. if (vnode.shapeFlag & 128) {
  7804. return vnode.suspense.next();
  7805. }
  7806. return hostNextSibling(vnode.anchor || vnode.el);
  7807. };
  7808. const render2 = (vnode, container, isSVG) => {
  7809. if (vnode == null) {
  7810. if (container._vnode) {
  7811. unmount(container._vnode, null, null, true);
  7812. }
  7813. } else {
  7814. patch(container._vnode || null, vnode, container, null, null, null, isSVG);
  7815. }
  7816. flushPreFlushCbs();
  7817. flushPostFlushCbs();
  7818. container._vnode = vnode;
  7819. };
  7820. const internals = {
  7821. p: patch,
  7822. um: unmount,
  7823. m: move,
  7824. r: remove2,
  7825. mt: mountComponent,
  7826. mc: mountChildren,
  7827. pc: patchChildren,
  7828. pbc: patchBlockChildren,
  7829. n: getNextHostNode,
  7830. o: options
  7831. };
  7832. let hydrate2;
  7833. let hydrateNode;
  7834. if (createHydrationFns) {
  7835. [hydrate2, hydrateNode] = createHydrationFns(
  7836. internals
  7837. );
  7838. }
  7839. return {
  7840. render: render2,
  7841. hydrate: hydrate2,
  7842. createApp: createAppAPI(render2, hydrate2)
  7843. };
  7844. }
  7845. function toggleRecurse({ effect: effect2, update }, allowed) {
  7846. effect2.allowRecurse = update.allowRecurse = allowed;
  7847. }
  7848. function needTransition(parentSuspense, transition) {
  7849. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  7850. }
  7851. function traverseStaticChildren(n1, n2, shallow = false) {
  7852. const ch1 = n1.children;
  7853. const ch2 = n2.children;
  7854. if (isArray(ch1) && isArray(ch2)) {
  7855. for (let i = 0; i < ch1.length; i++) {
  7856. const c1 = ch1[i];
  7857. let c2 = ch2[i];
  7858. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  7859. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  7860. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  7861. c2.el = c1.el;
  7862. }
  7863. if (!shallow)
  7864. traverseStaticChildren(c1, c2);
  7865. }
  7866. if (c2.type === Text) {
  7867. c2.el = c1.el;
  7868. }
  7869. if (c2.type === Comment && !c2.el) {
  7870. c2.el = c1.el;
  7871. }
  7872. }
  7873. }
  7874. }
  7875. function getSequence(arr) {
  7876. const p2 = arr.slice();
  7877. const result = [0];
  7878. let i, j, u, v, c;
  7879. const len = arr.length;
  7880. for (i = 0; i < len; i++) {
  7881. const arrI = arr[i];
  7882. if (arrI !== 0) {
  7883. j = result[result.length - 1];
  7884. if (arr[j] < arrI) {
  7885. p2[i] = j;
  7886. result.push(i);
  7887. continue;
  7888. }
  7889. u = 0;
  7890. v = result.length - 1;
  7891. while (u < v) {
  7892. c = u + v >> 1;
  7893. if (arr[result[c]] < arrI) {
  7894. u = c + 1;
  7895. } else {
  7896. v = c;
  7897. }
  7898. }
  7899. if (arrI < arr[result[u]]) {
  7900. if (u > 0) {
  7901. p2[i] = result[u - 1];
  7902. }
  7903. result[u] = i;
  7904. }
  7905. }
  7906. }
  7907. u = result.length;
  7908. v = result[u - 1];
  7909. while (u-- > 0) {
  7910. result[u] = v;
  7911. v = p2[v];
  7912. }
  7913. return result;
  7914. }
  7915. var isTeleport = (type) => type.__isTeleport;
  7916. var isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  7917. var isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  7918. var resolveTarget = (props, select) => {
  7919. const targetSelector = props && props.to;
  7920. if (isString(targetSelector)) {
  7921. if (!select) {
  7922. warn2(
  7923. `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
  7924. );
  7925. return null;
  7926. } else {
  7927. const target = select(targetSelector);
  7928. if (!target) {
  7929. warn2(
  7930. `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.`
  7931. );
  7932. }
  7933. return target;
  7934. }
  7935. } else {
  7936. if (!targetSelector && !isTeleportDisabled(props)) {
  7937. warn2(`Invalid Teleport target: ${targetSelector}`);
  7938. }
  7939. return targetSelector;
  7940. }
  7941. };
  7942. var TeleportImpl = {
  7943. name: "Teleport",
  7944. __isTeleport: true,
  7945. process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
  7946. const {
  7947. mc: mountChildren,
  7948. pc: patchChildren,
  7949. pbc: patchBlockChildren,
  7950. o: { insert, querySelector, createText, createComment }
  7951. } = internals;
  7952. const disabled = isTeleportDisabled(n2.props);
  7953. let { shapeFlag, children, dynamicChildren } = n2;
  7954. if (isHmrUpdating) {
  7955. optimized = false;
  7956. dynamicChildren = null;
  7957. }
  7958. if (n1 == null) {
  7959. const placeholder = n2.el = true ? createComment("teleport start") : createText("");
  7960. const mainAnchor = n2.anchor = true ? createComment("teleport end") : createText("");
  7961. insert(placeholder, container, anchor);
  7962. insert(mainAnchor, container, anchor);
  7963. const target = n2.target = resolveTarget(n2.props, querySelector);
  7964. const targetAnchor = n2.targetAnchor = createText("");
  7965. if (target) {
  7966. insert(targetAnchor, target);
  7967. isSVG = isSVG || isTargetSVG(target);
  7968. } else if (!disabled) {
  7969. warn2("Invalid Teleport target on mount:", target, `(${typeof target})`);
  7970. }
  7971. const mount = (container2, anchor2) => {
  7972. if (shapeFlag & 16) {
  7973. mountChildren(
  7974. children,
  7975. container2,
  7976. anchor2,
  7977. parentComponent,
  7978. parentSuspense,
  7979. isSVG,
  7980. slotScopeIds,
  7981. optimized
  7982. );
  7983. }
  7984. };
  7985. if (disabled) {
  7986. mount(container, mainAnchor);
  7987. } else if (target) {
  7988. mount(target, targetAnchor);
  7989. }
  7990. } else {
  7991. n2.el = n1.el;
  7992. const mainAnchor = n2.anchor = n1.anchor;
  7993. const target = n2.target = n1.target;
  7994. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  7995. const wasDisabled = isTeleportDisabled(n1.props);
  7996. const currentContainer = wasDisabled ? container : target;
  7997. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  7998. isSVG = isSVG || isTargetSVG(target);
  7999. if (dynamicChildren) {
  8000. patchBlockChildren(
  8001. n1.dynamicChildren,
  8002. dynamicChildren,
  8003. currentContainer,
  8004. parentComponent,
  8005. parentSuspense,
  8006. isSVG,
  8007. slotScopeIds
  8008. );
  8009. traverseStaticChildren(n1, n2, true);
  8010. } else if (!optimized) {
  8011. patchChildren(
  8012. n1,
  8013. n2,
  8014. currentContainer,
  8015. currentAnchor,
  8016. parentComponent,
  8017. parentSuspense,
  8018. isSVG,
  8019. slotScopeIds,
  8020. false
  8021. );
  8022. }
  8023. if (disabled) {
  8024. if (!wasDisabled) {
  8025. moveTeleport(
  8026. n2,
  8027. container,
  8028. mainAnchor,
  8029. internals,
  8030. 1
  8031. );
  8032. } else {
  8033. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  8034. n2.props.to = n1.props.to;
  8035. }
  8036. }
  8037. } else {
  8038. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  8039. const nextTarget = n2.target = resolveTarget(
  8040. n2.props,
  8041. querySelector
  8042. );
  8043. if (nextTarget) {
  8044. moveTeleport(
  8045. n2,
  8046. nextTarget,
  8047. null,
  8048. internals,
  8049. 0
  8050. );
  8051. } else if (true) {
  8052. warn2(
  8053. "Invalid Teleport target on update:",
  8054. target,
  8055. `(${typeof target})`
  8056. );
  8057. }
  8058. } else if (wasDisabled) {
  8059. moveTeleport(
  8060. n2,
  8061. target,
  8062. targetAnchor,
  8063. internals,
  8064. 1
  8065. );
  8066. }
  8067. }
  8068. }
  8069. updateCssVars(n2);
  8070. },
  8071. remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  8072. const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
  8073. if (target) {
  8074. hostRemove(targetAnchor);
  8075. }
  8076. doRemove && hostRemove(anchor);
  8077. if (shapeFlag & 16) {
  8078. const shouldRemove = doRemove || !isTeleportDisabled(props);
  8079. for (let i = 0; i < children.length; i++) {
  8080. const child = children[i];
  8081. unmount(
  8082. child,
  8083. parentComponent,
  8084. parentSuspense,
  8085. shouldRemove,
  8086. !!child.dynamicChildren
  8087. );
  8088. }
  8089. }
  8090. },
  8091. move: moveTeleport,
  8092. hydrate: hydrateTeleport
  8093. };
  8094. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  8095. if (moveType === 0) {
  8096. insert(vnode.targetAnchor, container, parentAnchor);
  8097. }
  8098. const { el, anchor, shapeFlag, children, props } = vnode;
  8099. const isReorder = moveType === 2;
  8100. if (isReorder) {
  8101. insert(el, container, parentAnchor);
  8102. }
  8103. if (!isReorder || isTeleportDisabled(props)) {
  8104. if (shapeFlag & 16) {
  8105. for (let i = 0; i < children.length; i++) {
  8106. move(
  8107. children[i],
  8108. container,
  8109. parentAnchor,
  8110. 2
  8111. );
  8112. }
  8113. }
  8114. }
  8115. if (isReorder) {
  8116. insert(anchor, container, parentAnchor);
  8117. }
  8118. }
  8119. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  8120. o: { nextSibling, parentNode, querySelector }
  8121. }, hydrateChildren) {
  8122. const target = vnode.target = resolveTarget(
  8123. vnode.props,
  8124. querySelector
  8125. );
  8126. if (target) {
  8127. const targetNode = target._lpa || target.firstChild;
  8128. if (vnode.shapeFlag & 16) {
  8129. if (isTeleportDisabled(vnode.props)) {
  8130. vnode.anchor = hydrateChildren(
  8131. nextSibling(node),
  8132. vnode,
  8133. parentNode(node),
  8134. parentComponent,
  8135. parentSuspense,
  8136. slotScopeIds,
  8137. optimized
  8138. );
  8139. vnode.targetAnchor = targetNode;
  8140. } else {
  8141. vnode.anchor = nextSibling(node);
  8142. let targetAnchor = targetNode;
  8143. while (targetAnchor) {
  8144. targetAnchor = nextSibling(targetAnchor);
  8145. if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
  8146. vnode.targetAnchor = targetAnchor;
  8147. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  8148. break;
  8149. }
  8150. }
  8151. hydrateChildren(
  8152. targetNode,
  8153. vnode,
  8154. target,
  8155. parentComponent,
  8156. parentSuspense,
  8157. slotScopeIds,
  8158. optimized
  8159. );
  8160. }
  8161. }
  8162. updateCssVars(vnode);
  8163. }
  8164. return vnode.anchor && nextSibling(vnode.anchor);
  8165. }
  8166. var Teleport = TeleportImpl;
  8167. function updateCssVars(vnode) {
  8168. const ctx = vnode.ctx;
  8169. if (ctx && ctx.ut) {
  8170. let node = vnode.children[0].el;
  8171. while (node && node !== vnode.targetAnchor) {
  8172. if (node.nodeType === 1)
  8173. node.setAttribute("data-v-owner", ctx.uid);
  8174. node = node.nextSibling;
  8175. }
  8176. ctx.ut();
  8177. }
  8178. }
  8179. var Fragment = Symbol.for("v-fgt");
  8180. var Text = Symbol.for("v-txt");
  8181. var Comment = Symbol.for("v-cmt");
  8182. var Static = Symbol.for("v-stc");
  8183. var blockStack = [];
  8184. var currentBlock = null;
  8185. function openBlock(disableTracking = false) {
  8186. blockStack.push(currentBlock = disableTracking ? null : []);
  8187. }
  8188. function closeBlock() {
  8189. blockStack.pop();
  8190. currentBlock = blockStack[blockStack.length - 1] || null;
  8191. }
  8192. var isBlockTreeEnabled = 1;
  8193. function setBlockTracking(value) {
  8194. isBlockTreeEnabled += value;
  8195. }
  8196. function setupBlock(vnode) {
  8197. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  8198. closeBlock();
  8199. if (isBlockTreeEnabled > 0 && currentBlock) {
  8200. currentBlock.push(vnode);
  8201. }
  8202. return vnode;
  8203. }
  8204. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  8205. return setupBlock(
  8206. createBaseVNode(
  8207. type,
  8208. props,
  8209. children,
  8210. patchFlag,
  8211. dynamicProps,
  8212. shapeFlag,
  8213. true
  8214. /* isBlock */
  8215. )
  8216. );
  8217. }
  8218. function createBlock(type, props, children, patchFlag, dynamicProps) {
  8219. return setupBlock(
  8220. createVNode(
  8221. type,
  8222. props,
  8223. children,
  8224. patchFlag,
  8225. dynamicProps,
  8226. true
  8227. /* isBlock: prevent a block from tracking itself */
  8228. )
  8229. );
  8230. }
  8231. function isVNode(value) {
  8232. return value ? value.__v_isVNode === true : false;
  8233. }
  8234. function isSameVNodeType(n1, n2) {
  8235. if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) {
  8236. n1.shapeFlag &= ~256;
  8237. n2.shapeFlag &= ~512;
  8238. return false;
  8239. }
  8240. return n1.type === n2.type && n1.key === n2.key;
  8241. }
  8242. var vnodeArgsTransformer;
  8243. function transformVNodeArgs(transformer) {
  8244. vnodeArgsTransformer = transformer;
  8245. }
  8246. var createVNodeWithArgsTransform = (...args) => {
  8247. return _createVNode(
  8248. ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
  8249. );
  8250. };
  8251. var InternalObjectKey = `__vInternal`;
  8252. var normalizeKey = ({ key }) => key != null ? key : null;
  8253. var normalizeRef = ({
  8254. ref: ref2,
  8255. ref_key,
  8256. ref_for
  8257. }) => {
  8258. if (typeof ref2 === "number") {
  8259. ref2 = "" + ref2;
  8260. }
  8261. return ref2 != null ? isString(ref2) || isRef(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  8262. };
  8263. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  8264. const vnode = {
  8265. __v_isVNode: true,
  8266. __v_skip: true,
  8267. type,
  8268. props,
  8269. key: props && normalizeKey(props),
  8270. ref: props && normalizeRef(props),
  8271. scopeId: currentScopeId,
  8272. slotScopeIds: null,
  8273. children,
  8274. component: null,
  8275. suspense: null,
  8276. ssContent: null,
  8277. ssFallback: null,
  8278. dirs: null,
  8279. transition: null,
  8280. el: null,
  8281. anchor: null,
  8282. target: null,
  8283. targetAnchor: null,
  8284. staticCount: 0,
  8285. shapeFlag,
  8286. patchFlag,
  8287. dynamicProps,
  8288. dynamicChildren: null,
  8289. appContext: null,
  8290. ctx: currentRenderingInstance
  8291. };
  8292. if (needFullChildrenNormalization) {
  8293. normalizeChildren(vnode, children);
  8294. if (shapeFlag & 128) {
  8295. type.normalize(vnode);
  8296. }
  8297. } else if (children) {
  8298. vnode.shapeFlag |= isString(children) ? 8 : 16;
  8299. }
  8300. if (vnode.key !== vnode.key) {
  8301. warn2(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  8302. }
  8303. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  8304. !isBlockNode && // has current parent block
  8305. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  8306. // component nodes also should always be patched, because even if the
  8307. // component doesn't need to update, it needs to persist the instance on to
  8308. // the next vnode so that it can be properly unmounted later.
  8309. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  8310. // vnode should not be considered dynamic due to handler caching.
  8311. vnode.patchFlag !== 32) {
  8312. currentBlock.push(vnode);
  8313. }
  8314. return vnode;
  8315. }
  8316. var createVNode = true ? createVNodeWithArgsTransform : _createVNode;
  8317. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  8318. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  8319. if (!type) {
  8320. warn2(`Invalid vnode type when creating vnode: ${type}.`);
  8321. }
  8322. type = Comment;
  8323. }
  8324. if (isVNode(type)) {
  8325. const cloned = cloneVNode(
  8326. type,
  8327. props,
  8328. true
  8329. /* mergeRef: true */
  8330. );
  8331. if (children) {
  8332. normalizeChildren(cloned, children);
  8333. }
  8334. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  8335. if (cloned.shapeFlag & 6) {
  8336. currentBlock[currentBlock.indexOf(type)] = cloned;
  8337. } else {
  8338. currentBlock.push(cloned);
  8339. }
  8340. }
  8341. cloned.patchFlag |= -2;
  8342. return cloned;
  8343. }
  8344. if (isClassComponent(type)) {
  8345. type = type.__vccOpts;
  8346. }
  8347. if (props) {
  8348. props = guardReactiveProps(props);
  8349. let { class: klass, style } = props;
  8350. if (klass && !isString(klass)) {
  8351. props.class = normalizeClass(klass);
  8352. }
  8353. if (isObject(style)) {
  8354. if (isProxy(style) && !isArray(style)) {
  8355. style = extend({}, style);
  8356. }
  8357. props.style = normalizeStyle(style);
  8358. }
  8359. }
  8360. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  8361. if (shapeFlag & 4 && isProxy(type)) {
  8362. type = toRaw(type);
  8363. warn2(
  8364. `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\`.`,
  8365. `
  8366. Component that was made reactive: `,
  8367. type
  8368. );
  8369. }
  8370. return createBaseVNode(
  8371. type,
  8372. props,
  8373. children,
  8374. patchFlag,
  8375. dynamicProps,
  8376. shapeFlag,
  8377. isBlockNode,
  8378. true
  8379. );
  8380. }
  8381. function guardReactiveProps(props) {
  8382. if (!props)
  8383. return null;
  8384. return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
  8385. }
  8386. function cloneVNode(vnode, extraProps, mergeRef = false) {
  8387. const { props, ref: ref2, patchFlag, children } = vnode;
  8388. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  8389. const cloned = {
  8390. __v_isVNode: true,
  8391. __v_skip: true,
  8392. type: vnode.type,
  8393. props: mergedProps,
  8394. key: mergedProps && normalizeKey(mergedProps),
  8395. ref: extraProps && extraProps.ref ? (
  8396. // #2078 in the case of <component :is="vnode" ref="extra"/>
  8397. // if the vnode itself already has a ref, cloneVNode will need to merge
  8398. // the refs so the single vnode can be set on multiple refs
  8399. mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  8400. ) : ref2,
  8401. scopeId: vnode.scopeId,
  8402. slotScopeIds: vnode.slotScopeIds,
  8403. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  8404. target: vnode.target,
  8405. targetAnchor: vnode.targetAnchor,
  8406. staticCount: vnode.staticCount,
  8407. shapeFlag: vnode.shapeFlag,
  8408. // if the vnode is cloned with extra props, we can no longer assume its
  8409. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  8410. // note: preserve flag for fragments since they use the flag for children
  8411. // fast paths only.
  8412. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  8413. dynamicProps: vnode.dynamicProps,
  8414. dynamicChildren: vnode.dynamicChildren,
  8415. appContext: vnode.appContext,
  8416. dirs: vnode.dirs,
  8417. transition: vnode.transition,
  8418. // These should technically only be non-null on mounted VNodes. However,
  8419. // they *should* be copied for kept-alive vnodes. So we just always copy
  8420. // them since them being non-null during a mount doesn't affect the logic as
  8421. // they will simply be overwritten.
  8422. component: vnode.component,
  8423. suspense: vnode.suspense,
  8424. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  8425. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  8426. el: vnode.el,
  8427. anchor: vnode.anchor,
  8428. ctx: vnode.ctx,
  8429. ce: vnode.ce
  8430. };
  8431. return cloned;
  8432. }
  8433. function deepCloneVNode(vnode) {
  8434. const cloned = cloneVNode(vnode);
  8435. if (isArray(vnode.children)) {
  8436. cloned.children = vnode.children.map(deepCloneVNode);
  8437. }
  8438. return cloned;
  8439. }
  8440. function createTextVNode(text = " ", flag = 0) {
  8441. return createVNode(Text, null, text, flag);
  8442. }
  8443. function createStaticVNode(content, numberOfNodes) {
  8444. const vnode = createVNode(Static, null, content);
  8445. vnode.staticCount = numberOfNodes;
  8446. return vnode;
  8447. }
  8448. function createCommentVNode(text = "", asBlock = false) {
  8449. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  8450. }
  8451. function normalizeVNode(child) {
  8452. if (child == null || typeof child === "boolean") {
  8453. return createVNode(Comment);
  8454. } else if (isArray(child)) {
  8455. return createVNode(
  8456. Fragment,
  8457. null,
  8458. // #3666, avoid reference pollution when reusing vnode
  8459. child.slice()
  8460. );
  8461. } else if (typeof child === "object") {
  8462. return cloneIfMounted(child);
  8463. } else {
  8464. return createVNode(Text, null, String(child));
  8465. }
  8466. }
  8467. function cloneIfMounted(child) {
  8468. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  8469. }
  8470. function normalizeChildren(vnode, children) {
  8471. let type = 0;
  8472. const { shapeFlag } = vnode;
  8473. if (children == null) {
  8474. children = null;
  8475. } else if (isArray(children)) {
  8476. type = 16;
  8477. } else if (typeof children === "object") {
  8478. if (shapeFlag & (1 | 64)) {
  8479. const slot = children.default;
  8480. if (slot) {
  8481. slot._c && (slot._d = false);
  8482. normalizeChildren(vnode, slot());
  8483. slot._c && (slot._d = true);
  8484. }
  8485. return;
  8486. } else {
  8487. type = 32;
  8488. const slotFlag = children._;
  8489. if (!slotFlag && !(InternalObjectKey in children)) {
  8490. children._ctx = currentRenderingInstance;
  8491. } else if (slotFlag === 3 && currentRenderingInstance) {
  8492. if (currentRenderingInstance.slots._ === 1) {
  8493. children._ = 1;
  8494. } else {
  8495. children._ = 2;
  8496. vnode.patchFlag |= 1024;
  8497. }
  8498. }
  8499. }
  8500. } else if (isFunction(children)) {
  8501. children = { default: children, _ctx: currentRenderingInstance };
  8502. type = 32;
  8503. } else {
  8504. children = String(children);
  8505. if (shapeFlag & 64) {
  8506. type = 16;
  8507. children = [createTextVNode(children)];
  8508. } else {
  8509. type = 8;
  8510. }
  8511. }
  8512. vnode.children = children;
  8513. vnode.shapeFlag |= type;
  8514. }
  8515. function mergeProps(...args) {
  8516. const ret = {};
  8517. for (let i = 0; i < args.length; i++) {
  8518. const toMerge = args[i];
  8519. for (const key in toMerge) {
  8520. if (key === "class") {
  8521. if (ret.class !== toMerge.class) {
  8522. ret.class = normalizeClass([ret.class, toMerge.class]);
  8523. }
  8524. } else if (key === "style") {
  8525. ret.style = normalizeStyle([ret.style, toMerge.style]);
  8526. } else if (isOn(key)) {
  8527. const existing = ret[key];
  8528. const incoming = toMerge[key];
  8529. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
  8530. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  8531. }
  8532. } else if (key !== "") {
  8533. ret[key] = toMerge[key];
  8534. }
  8535. }
  8536. }
  8537. return ret;
  8538. }
  8539. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  8540. callWithAsyncErrorHandling(hook, instance, 7, [
  8541. vnode,
  8542. prevVNode
  8543. ]);
  8544. }
  8545. var emptyAppContext = createAppContext();
  8546. var uid = 0;
  8547. function createComponentInstance(vnode, parent, suspense) {
  8548. const type = vnode.type;
  8549. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  8550. const instance = {
  8551. uid: uid++,
  8552. vnode,
  8553. type,
  8554. parent,
  8555. appContext,
  8556. root: null,
  8557. // to be immediately set
  8558. next: null,
  8559. subTree: null,
  8560. // will be set synchronously right after creation
  8561. effect: null,
  8562. update: null,
  8563. // will be set synchronously right after creation
  8564. scope: new EffectScope(
  8565. true
  8566. /* detached */
  8567. ),
  8568. render: null,
  8569. proxy: null,
  8570. exposed: null,
  8571. exposeProxy: null,
  8572. withProxy: null,
  8573. provides: parent ? parent.provides : Object.create(appContext.provides),
  8574. accessCache: null,
  8575. renderCache: [],
  8576. // local resolved assets
  8577. components: null,
  8578. directives: null,
  8579. // resolved props and emits options
  8580. propsOptions: normalizePropsOptions(type, appContext),
  8581. emitsOptions: normalizeEmitsOptions(type, appContext),
  8582. // emit
  8583. emit: null,
  8584. // to be set immediately
  8585. emitted: null,
  8586. // props default value
  8587. propsDefaults: EMPTY_OBJ,
  8588. // inheritAttrs
  8589. inheritAttrs: type.inheritAttrs,
  8590. // state
  8591. ctx: EMPTY_OBJ,
  8592. data: EMPTY_OBJ,
  8593. props: EMPTY_OBJ,
  8594. attrs: EMPTY_OBJ,
  8595. slots: EMPTY_OBJ,
  8596. refs: EMPTY_OBJ,
  8597. setupState: EMPTY_OBJ,
  8598. setupContext: null,
  8599. attrsProxy: null,
  8600. slotsProxy: null,
  8601. // suspense related
  8602. suspense,
  8603. suspenseId: suspense ? suspense.pendingId : 0,
  8604. asyncDep: null,
  8605. asyncResolved: false,
  8606. // lifecycle hooks
  8607. // not using enums here because it results in computed properties
  8608. isMounted: false,
  8609. isUnmounted: false,
  8610. isDeactivated: false,
  8611. bc: null,
  8612. c: null,
  8613. bm: null,
  8614. m: null,
  8615. bu: null,
  8616. u: null,
  8617. um: null,
  8618. bum: null,
  8619. da: null,
  8620. a: null,
  8621. rtg: null,
  8622. rtc: null,
  8623. ec: null,
  8624. sp: null
  8625. };
  8626. if (true) {
  8627. instance.ctx = createDevRenderContext(instance);
  8628. } else {
  8629. instance.ctx = { _: instance };
  8630. }
  8631. instance.root = parent ? parent.root : instance;
  8632. instance.emit = emit.bind(null, instance);
  8633. if (vnode.ce) {
  8634. vnode.ce(instance);
  8635. }
  8636. return instance;
  8637. }
  8638. var currentInstance = null;
  8639. var getCurrentInstance = () => currentInstance || currentRenderingInstance;
  8640. var internalSetCurrentInstance;
  8641. var globalCurrentInstanceSetters;
  8642. var settersKey = "__VUE_INSTANCE_SETTERS__";
  8643. {
  8644. if (!(globalCurrentInstanceSetters = getGlobalThis()[settersKey])) {
  8645. globalCurrentInstanceSetters = getGlobalThis()[settersKey] = [];
  8646. }
  8647. globalCurrentInstanceSetters.push((i) => currentInstance = i);
  8648. internalSetCurrentInstance = (instance) => {
  8649. if (globalCurrentInstanceSetters.length > 1) {
  8650. globalCurrentInstanceSetters.forEach((s) => s(instance));
  8651. } else {
  8652. globalCurrentInstanceSetters[0](instance);
  8653. }
  8654. };
  8655. }
  8656. var setCurrentInstance = (instance) => {
  8657. internalSetCurrentInstance(instance);
  8658. instance.scope.on();
  8659. };
  8660. var unsetCurrentInstance = () => {
  8661. currentInstance && currentInstance.scope.off();
  8662. internalSetCurrentInstance(null);
  8663. };
  8664. var isBuiltInTag = makeMap("slot,component");
  8665. function validateComponentName(name, config) {
  8666. const appIsNativeTag = config.isNativeTag || NO;
  8667. if (isBuiltInTag(name) || appIsNativeTag(name)) {
  8668. warn2(
  8669. "Do not use built-in or reserved HTML elements as component id: " + name
  8670. );
  8671. }
  8672. }
  8673. function isStatefulComponent(instance) {
  8674. return instance.vnode.shapeFlag & 4;
  8675. }
  8676. var isInSSRComponentSetup = false;
  8677. function setupComponent(instance, isSSR = false) {
  8678. isInSSRComponentSetup = isSSR;
  8679. const { props, children } = instance.vnode;
  8680. const isStateful = isStatefulComponent(instance);
  8681. initProps(instance, props, isStateful, isSSR);
  8682. initSlots(instance, children);
  8683. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  8684. isInSSRComponentSetup = false;
  8685. return setupResult;
  8686. }
  8687. function setupStatefulComponent(instance, isSSR) {
  8688. var _a;
  8689. const Component = instance.type;
  8690. if (true) {
  8691. if (Component.name) {
  8692. validateComponentName(Component.name, instance.appContext.config);
  8693. }
  8694. if (Component.components) {
  8695. const names = Object.keys(Component.components);
  8696. for (let i = 0; i < names.length; i++) {
  8697. validateComponentName(names[i], instance.appContext.config);
  8698. }
  8699. }
  8700. if (Component.directives) {
  8701. const names = Object.keys(Component.directives);
  8702. for (let i = 0; i < names.length; i++) {
  8703. validateDirectiveName(names[i]);
  8704. }
  8705. }
  8706. if (Component.compilerOptions && isRuntimeOnly()) {
  8707. warn2(
  8708. `"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.`
  8709. );
  8710. }
  8711. }
  8712. instance.accessCache = /* @__PURE__ */ Object.create(null);
  8713. instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
  8714. if (true) {
  8715. exposePropsOnRenderContext(instance);
  8716. }
  8717. const { setup } = Component;
  8718. if (setup) {
  8719. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  8720. setCurrentInstance(instance);
  8721. pauseTracking();
  8722. const setupResult = callWithErrorHandling(
  8723. setup,
  8724. instance,
  8725. 0,
  8726. [true ? shallowReadonly(instance.props) : instance.props, setupContext]
  8727. );
  8728. resetTracking();
  8729. unsetCurrentInstance();
  8730. if (isPromise(setupResult)) {
  8731. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  8732. if (isSSR) {
  8733. return setupResult.then((resolvedResult) => {
  8734. handleSetupResult(instance, resolvedResult, isSSR);
  8735. }).catch((e) => {
  8736. handleError(e, instance, 0);
  8737. });
  8738. } else {
  8739. instance.asyncDep = setupResult;
  8740. if (!instance.suspense) {
  8741. const name = (_a = Component.name) != null ? _a : "Anonymous";
  8742. warn2(
  8743. `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.`
  8744. );
  8745. }
  8746. }
  8747. } else {
  8748. handleSetupResult(instance, setupResult, isSSR);
  8749. }
  8750. } else {
  8751. finishComponentSetup(instance, isSSR);
  8752. }
  8753. }
  8754. function handleSetupResult(instance, setupResult, isSSR) {
  8755. if (isFunction(setupResult)) {
  8756. if (instance.type.__ssrInlineRender) {
  8757. instance.ssrRender = setupResult;
  8758. } else {
  8759. instance.render = setupResult;
  8760. }
  8761. } else if (isObject(setupResult)) {
  8762. if (isVNode(setupResult)) {
  8763. warn2(
  8764. `setup() should not return VNodes directly - return a render function instead.`
  8765. );
  8766. }
  8767. if (true) {
  8768. instance.devtoolsRawSetupState = setupResult;
  8769. }
  8770. instance.setupState = proxyRefs(setupResult);
  8771. if (true) {
  8772. exposeSetupStateOnRenderContext(instance);
  8773. }
  8774. } else if (setupResult !== void 0) {
  8775. warn2(
  8776. `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
  8777. );
  8778. }
  8779. finishComponentSetup(instance, isSSR);
  8780. }
  8781. var compile;
  8782. var installWithProxy;
  8783. function registerRuntimeCompiler(_compile) {
  8784. compile = _compile;
  8785. installWithProxy = (i) => {
  8786. if (i.render._rc) {
  8787. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  8788. }
  8789. };
  8790. }
  8791. var isRuntimeOnly = () => !compile;
  8792. function finishComponentSetup(instance, isSSR, skipOptions) {
  8793. const Component = instance.type;
  8794. if (!instance.render) {
  8795. if (!isSSR && compile && !Component.render) {
  8796. const template = Component.template || resolveMergedOptions(instance).template;
  8797. if (template) {
  8798. if (true) {
  8799. startMeasure(instance, `compile`);
  8800. }
  8801. const { isCustomElement, compilerOptions } = instance.appContext.config;
  8802. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  8803. const finalCompilerOptions = extend(
  8804. extend(
  8805. {
  8806. isCustomElement,
  8807. delimiters
  8808. },
  8809. compilerOptions
  8810. ),
  8811. componentCompilerOptions
  8812. );
  8813. Component.render = compile(template, finalCompilerOptions);
  8814. if (true) {
  8815. endMeasure(instance, `compile`);
  8816. }
  8817. }
  8818. }
  8819. instance.render = Component.render || NOOP;
  8820. if (installWithProxy) {
  8821. installWithProxy(instance);
  8822. }
  8823. }
  8824. if (__VUE_OPTIONS_API__ && true) {
  8825. setCurrentInstance(instance);
  8826. pauseTracking();
  8827. try {
  8828. applyOptions(instance);
  8829. } finally {
  8830. resetTracking();
  8831. unsetCurrentInstance();
  8832. }
  8833. }
  8834. if (!Component.render && instance.render === NOOP && !isSSR) {
  8835. if (!compile && Component.template) {
  8836. warn2(
  8837. `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".`
  8838. /* should not happen */
  8839. );
  8840. } else {
  8841. warn2(`Component is missing template or render function.`);
  8842. }
  8843. }
  8844. }
  8845. function getAttrsProxy(instance) {
  8846. return instance.attrsProxy || (instance.attrsProxy = new Proxy(
  8847. instance.attrs,
  8848. true ? {
  8849. get(target, key) {
  8850. markAttrsAccessed();
  8851. track(instance, "get", "$attrs");
  8852. return target[key];
  8853. },
  8854. set() {
  8855. warn2(`setupContext.attrs is readonly.`);
  8856. return false;
  8857. },
  8858. deleteProperty() {
  8859. warn2(`setupContext.attrs is readonly.`);
  8860. return false;
  8861. }
  8862. } : {
  8863. get(target, key) {
  8864. track(instance, "get", "$attrs");
  8865. return target[key];
  8866. }
  8867. }
  8868. ));
  8869. }
  8870. function getSlotsProxy(instance) {
  8871. return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
  8872. get(target, key) {
  8873. track(instance, "get", "$slots");
  8874. return target[key];
  8875. }
  8876. }));
  8877. }
  8878. function createSetupContext(instance) {
  8879. const expose = (exposed) => {
  8880. if (true) {
  8881. if (instance.exposed) {
  8882. warn2(`expose() should be called only once per setup().`);
  8883. }
  8884. if (exposed != null) {
  8885. let exposedType = typeof exposed;
  8886. if (exposedType === "object") {
  8887. if (isArray(exposed)) {
  8888. exposedType = "array";
  8889. } else if (isRef(exposed)) {
  8890. exposedType = "ref";
  8891. }
  8892. }
  8893. if (exposedType !== "object") {
  8894. warn2(
  8895. `expose() should be passed a plain object, received ${exposedType}.`
  8896. );
  8897. }
  8898. }
  8899. }
  8900. instance.exposed = exposed || {};
  8901. };
  8902. if (true) {
  8903. return Object.freeze({
  8904. get attrs() {
  8905. return getAttrsProxy(instance);
  8906. },
  8907. get slots() {
  8908. return getSlotsProxy(instance);
  8909. },
  8910. get emit() {
  8911. return (event, ...args) => instance.emit(event, ...args);
  8912. },
  8913. expose
  8914. });
  8915. } else {
  8916. return {
  8917. get attrs() {
  8918. return getAttrsProxy(instance);
  8919. },
  8920. slots: instance.slots,
  8921. emit: instance.emit,
  8922. expose
  8923. };
  8924. }
  8925. }
  8926. function getExposeProxy(instance) {
  8927. if (instance.exposed) {
  8928. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  8929. get(target, key) {
  8930. if (key in target) {
  8931. return target[key];
  8932. } else if (key in publicPropertiesMap) {
  8933. return publicPropertiesMap[key](instance);
  8934. }
  8935. },
  8936. has(target, key) {
  8937. return key in target || key in publicPropertiesMap;
  8938. }
  8939. }));
  8940. }
  8941. }
  8942. var classifyRE = /(?:^|[-_])(\w)/g;
  8943. var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  8944. function getComponentName(Component, includeInferred = true) {
  8945. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  8946. }
  8947. function formatComponentName(instance, Component, isRoot = false) {
  8948. let name = getComponentName(Component);
  8949. if (!name && Component.__file) {
  8950. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  8951. if (match) {
  8952. name = match[1];
  8953. }
  8954. }
  8955. if (!name && instance && instance.parent) {
  8956. const inferFromRegistry = (registry) => {
  8957. for (const key in registry) {
  8958. if (registry[key] === Component) {
  8959. return key;
  8960. }
  8961. }
  8962. };
  8963. name = inferFromRegistry(
  8964. instance.components || instance.parent.type.components
  8965. ) || inferFromRegistry(instance.appContext.components);
  8966. }
  8967. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  8968. }
  8969. function isClassComponent(value) {
  8970. return isFunction(value) && "__vccOpts" in value;
  8971. }
  8972. var computed2 = (getterOrOptions, debugOptions) => {
  8973. return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
  8974. };
  8975. function h(type, propsOrChildren, children) {
  8976. const l = arguments.length;
  8977. if (l === 2) {
  8978. if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  8979. if (isVNode(propsOrChildren)) {
  8980. return createVNode(type, null, [propsOrChildren]);
  8981. }
  8982. return createVNode(type, propsOrChildren);
  8983. } else {
  8984. return createVNode(type, null, propsOrChildren);
  8985. }
  8986. } else {
  8987. if (l > 3) {
  8988. children = Array.prototype.slice.call(arguments, 2);
  8989. } else if (l === 3 && isVNode(children)) {
  8990. children = [children];
  8991. }
  8992. return createVNode(type, propsOrChildren, children);
  8993. }
  8994. }
  8995. var ssrContextKey = Symbol.for("v-scx");
  8996. var useSSRContext = () => {
  8997. {
  8998. const ctx = inject(ssrContextKey);
  8999. if (!ctx) {
  9000. warn2(
  9001. `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
  9002. );
  9003. }
  9004. return ctx;
  9005. }
  9006. };
  9007. function isShallow2(value) {
  9008. return !!(value && value["__v_isShallow"]);
  9009. }
  9010. function initCustomFormatter() {
  9011. if (typeof window === "undefined") {
  9012. return;
  9013. }
  9014. const vueStyle = { style: "color:#3ba776" };
  9015. const numberStyle = { style: "color:#1677ff" };
  9016. const stringStyle = { style: "color:#f5222d" };
  9017. const keywordStyle = { style: "color:#eb2f96" };
  9018. const formatter = {
  9019. header(obj) {
  9020. if (!isObject(obj)) {
  9021. return null;
  9022. }
  9023. if (obj.__isVue) {
  9024. return ["div", vueStyle, `VueInstance`];
  9025. } else if (isRef(obj)) {
  9026. return [
  9027. "div",
  9028. {},
  9029. ["span", vueStyle, genRefFlag(obj)],
  9030. "<",
  9031. formatValue(obj.value),
  9032. `>`
  9033. ];
  9034. } else if (isReactive(obj)) {
  9035. return [
  9036. "div",
  9037. {},
  9038. ["span", vueStyle, isShallow2(obj) ? "ShallowReactive" : "Reactive"],
  9039. "<",
  9040. formatValue(obj),
  9041. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  9042. ];
  9043. } else if (isReadonly(obj)) {
  9044. return [
  9045. "div",
  9046. {},
  9047. ["span", vueStyle, isShallow2(obj) ? "ShallowReadonly" : "Readonly"],
  9048. "<",
  9049. formatValue(obj),
  9050. ">"
  9051. ];
  9052. }
  9053. return null;
  9054. },
  9055. hasBody(obj) {
  9056. return obj && obj.__isVue;
  9057. },
  9058. body(obj) {
  9059. if (obj && obj.__isVue) {
  9060. return [
  9061. "div",
  9062. {},
  9063. ...formatInstance(obj.$)
  9064. ];
  9065. }
  9066. }
  9067. };
  9068. function formatInstance(instance) {
  9069. const blocks = [];
  9070. if (instance.type.props && instance.props) {
  9071. blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  9072. }
  9073. if (instance.setupState !== EMPTY_OBJ) {
  9074. blocks.push(createInstanceBlock("setup", instance.setupState));
  9075. }
  9076. if (instance.data !== EMPTY_OBJ) {
  9077. blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  9078. }
  9079. const computed3 = extractKeys(instance, "computed");
  9080. if (computed3) {
  9081. blocks.push(createInstanceBlock("computed", computed3));
  9082. }
  9083. const injected = extractKeys(instance, "inject");
  9084. if (injected) {
  9085. blocks.push(createInstanceBlock("injected", injected));
  9086. }
  9087. blocks.push([
  9088. "div",
  9089. {},
  9090. [
  9091. "span",
  9092. {
  9093. style: keywordStyle.style + ";opacity:0.66"
  9094. },
  9095. "$ (internal): "
  9096. ],
  9097. ["object", { object: instance }]
  9098. ]);
  9099. return blocks;
  9100. }
  9101. function createInstanceBlock(type, target) {
  9102. target = extend({}, target);
  9103. if (!Object.keys(target).length) {
  9104. return ["span", {}];
  9105. }
  9106. return [
  9107. "div",
  9108. { style: "line-height:1.25em;margin-bottom:0.6em" },
  9109. [
  9110. "div",
  9111. {
  9112. style: "color:#476582"
  9113. },
  9114. type
  9115. ],
  9116. [
  9117. "div",
  9118. {
  9119. style: "padding-left:1.25em"
  9120. },
  9121. ...Object.keys(target).map((key) => {
  9122. return [
  9123. "div",
  9124. {},
  9125. ["span", keywordStyle, key + ": "],
  9126. formatValue(target[key], false)
  9127. ];
  9128. })
  9129. ]
  9130. ];
  9131. }
  9132. function formatValue(v, asRaw = true) {
  9133. if (typeof v === "number") {
  9134. return ["span", numberStyle, v];
  9135. } else if (typeof v === "string") {
  9136. return ["span", stringStyle, JSON.stringify(v)];
  9137. } else if (typeof v === "boolean") {
  9138. return ["span", keywordStyle, v];
  9139. } else if (isObject(v)) {
  9140. return ["object", { object: asRaw ? toRaw(v) : v }];
  9141. } else {
  9142. return ["span", stringStyle, String(v)];
  9143. }
  9144. }
  9145. function extractKeys(instance, type) {
  9146. const Comp = instance.type;
  9147. if (isFunction(Comp)) {
  9148. return;
  9149. }
  9150. const extracted = {};
  9151. for (const key in instance.ctx) {
  9152. if (isKeyOfType(Comp, key, type)) {
  9153. extracted[key] = instance.ctx[key];
  9154. }
  9155. }
  9156. return extracted;
  9157. }
  9158. function isKeyOfType(Comp, key, type) {
  9159. const opts = Comp[type];
  9160. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
  9161. return true;
  9162. }
  9163. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  9164. return true;
  9165. }
  9166. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
  9167. return true;
  9168. }
  9169. }
  9170. function genRefFlag(v) {
  9171. if (isShallow2(v)) {
  9172. return `ShallowRef`;
  9173. }
  9174. if (v.effect) {
  9175. return `ComputedRef`;
  9176. }
  9177. return `Ref`;
  9178. }
  9179. if (window.devtoolsFormatters) {
  9180. window.devtoolsFormatters.push(formatter);
  9181. } else {
  9182. window.devtoolsFormatters = [formatter];
  9183. }
  9184. }
  9185. function withMemo(memo, render2, cache, index) {
  9186. const cached = cache[index];
  9187. if (cached && isMemoSame(cached, memo)) {
  9188. return cached;
  9189. }
  9190. const ret = render2();
  9191. ret.memo = memo.slice();
  9192. return cache[index] = ret;
  9193. }
  9194. function isMemoSame(cached, memo) {
  9195. const prev = cached.memo;
  9196. if (prev.length != memo.length) {
  9197. return false;
  9198. }
  9199. for (let i = 0; i < prev.length; i++) {
  9200. if (hasChanged(prev[i], memo[i])) {
  9201. return false;
  9202. }
  9203. }
  9204. if (isBlockTreeEnabled > 0 && currentBlock) {
  9205. currentBlock.push(cached);
  9206. }
  9207. return true;
  9208. }
  9209. var version = "3.3.12";
  9210. var _ssrUtils = {
  9211. createComponentInstance,
  9212. setupComponent,
  9213. renderComponentRoot,
  9214. setCurrentRenderingInstance,
  9215. isVNode,
  9216. normalizeVNode
  9217. };
  9218. var ssrUtils = _ssrUtils;
  9219. var resolveFilter = null;
  9220. var compatUtils = null;
  9221. // node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
  9222. var svgNS = "http://www.w3.org/2000/svg";
  9223. var doc = typeof document !== "undefined" ? document : null;
  9224. var templateContainer = doc && doc.createElement("template");
  9225. var nodeOps = {
  9226. insert: (child, parent, anchor) => {
  9227. parent.insertBefore(child, anchor || null);
  9228. },
  9229. remove: (child) => {
  9230. const parent = child.parentNode;
  9231. if (parent) {
  9232. parent.removeChild(child);
  9233. }
  9234. },
  9235. createElement: (tag, isSVG, is, props) => {
  9236. const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0);
  9237. if (tag === "select" && props && props.multiple != null) {
  9238. el.setAttribute("multiple", props.multiple);
  9239. }
  9240. return el;
  9241. },
  9242. createText: (text) => doc.createTextNode(text),
  9243. createComment: (text) => doc.createComment(text),
  9244. setText: (node, text) => {
  9245. node.nodeValue = text;
  9246. },
  9247. setElementText: (el, text) => {
  9248. el.textContent = text;
  9249. },
  9250. parentNode: (node) => node.parentNode,
  9251. nextSibling: (node) => node.nextSibling,
  9252. querySelector: (selector) => doc.querySelector(selector),
  9253. setScopeId(el, id) {
  9254. el.setAttribute(id, "");
  9255. },
  9256. // __UNSAFE__
  9257. // Reason: innerHTML.
  9258. // Static content here can only come from compiled templates.
  9259. // As long as the user only uses trusted templates, this is safe.
  9260. insertStaticContent(content, parent, anchor, isSVG, start, end) {
  9261. const before = anchor ? anchor.previousSibling : parent.lastChild;
  9262. if (start && (start === end || start.nextSibling)) {
  9263. while (true) {
  9264. parent.insertBefore(start.cloneNode(true), anchor);
  9265. if (start === end || !(start = start.nextSibling))
  9266. break;
  9267. }
  9268. } else {
  9269. templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
  9270. const template = templateContainer.content;
  9271. if (isSVG) {
  9272. const wrapper = template.firstChild;
  9273. while (wrapper.firstChild) {
  9274. template.appendChild(wrapper.firstChild);
  9275. }
  9276. template.removeChild(wrapper);
  9277. }
  9278. parent.insertBefore(template, anchor);
  9279. }
  9280. return [
  9281. // first
  9282. before ? before.nextSibling : parent.firstChild,
  9283. // last
  9284. anchor ? anchor.previousSibling : parent.lastChild
  9285. ];
  9286. }
  9287. };
  9288. var TRANSITION = "transition";
  9289. var ANIMATION = "animation";
  9290. var vtcKey = Symbol("_vtc");
  9291. var Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
  9292. Transition.displayName = "Transition";
  9293. var DOMTransitionPropsValidators = {
  9294. name: String,
  9295. type: String,
  9296. css: {
  9297. type: Boolean,
  9298. default: true
  9299. },
  9300. duration: [String, Number, Object],
  9301. enterFromClass: String,
  9302. enterActiveClass: String,
  9303. enterToClass: String,
  9304. appearFromClass: String,
  9305. appearActiveClass: String,
  9306. appearToClass: String,
  9307. leaveFromClass: String,
  9308. leaveActiveClass: String,
  9309. leaveToClass: String
  9310. };
  9311. var TransitionPropsValidators = Transition.props = extend(
  9312. {},
  9313. BaseTransitionPropsValidators,
  9314. DOMTransitionPropsValidators
  9315. );
  9316. var callHook2 = (hook, args = []) => {
  9317. if (isArray(hook)) {
  9318. hook.forEach((h2) => h2(...args));
  9319. } else if (hook) {
  9320. hook(...args);
  9321. }
  9322. };
  9323. var hasExplicitCallback = (hook) => {
  9324. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  9325. };
  9326. function resolveTransitionProps(rawProps) {
  9327. const baseProps = {};
  9328. for (const key in rawProps) {
  9329. if (!(key in DOMTransitionPropsValidators)) {
  9330. baseProps[key] = rawProps[key];
  9331. }
  9332. }
  9333. if (rawProps.css === false) {
  9334. return baseProps;
  9335. }
  9336. const {
  9337. name = "v",
  9338. type,
  9339. duration,
  9340. enterFromClass = `${name}-enter-from`,
  9341. enterActiveClass = `${name}-enter-active`,
  9342. enterToClass = `${name}-enter-to`,
  9343. appearFromClass = enterFromClass,
  9344. appearActiveClass = enterActiveClass,
  9345. appearToClass = enterToClass,
  9346. leaveFromClass = `${name}-leave-from`,
  9347. leaveActiveClass = `${name}-leave-active`,
  9348. leaveToClass = `${name}-leave-to`
  9349. } = rawProps;
  9350. const durations = normalizeDuration(duration);
  9351. const enterDuration = durations && durations[0];
  9352. const leaveDuration = durations && durations[1];
  9353. const {
  9354. onBeforeEnter,
  9355. onEnter,
  9356. onEnterCancelled,
  9357. onLeave,
  9358. onLeaveCancelled,
  9359. onBeforeAppear = onBeforeEnter,
  9360. onAppear = onEnter,
  9361. onAppearCancelled = onEnterCancelled
  9362. } = baseProps;
  9363. const finishEnter = (el, isAppear, done) => {
  9364. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  9365. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  9366. done && done();
  9367. };
  9368. const finishLeave = (el, done) => {
  9369. el._isLeaving = false;
  9370. removeTransitionClass(el, leaveFromClass);
  9371. removeTransitionClass(el, leaveToClass);
  9372. removeTransitionClass(el, leaveActiveClass);
  9373. done && done();
  9374. };
  9375. const makeEnterHook = (isAppear) => {
  9376. return (el, done) => {
  9377. const hook = isAppear ? onAppear : onEnter;
  9378. const resolve2 = () => finishEnter(el, isAppear, done);
  9379. callHook2(hook, [el, resolve2]);
  9380. nextFrame(() => {
  9381. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  9382. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  9383. if (!hasExplicitCallback(hook)) {
  9384. whenTransitionEnds(el, type, enterDuration, resolve2);
  9385. }
  9386. });
  9387. };
  9388. };
  9389. return extend(baseProps, {
  9390. onBeforeEnter(el) {
  9391. callHook2(onBeforeEnter, [el]);
  9392. addTransitionClass(el, enterFromClass);
  9393. addTransitionClass(el, enterActiveClass);
  9394. },
  9395. onBeforeAppear(el) {
  9396. callHook2(onBeforeAppear, [el]);
  9397. addTransitionClass(el, appearFromClass);
  9398. addTransitionClass(el, appearActiveClass);
  9399. },
  9400. onEnter: makeEnterHook(false),
  9401. onAppear: makeEnterHook(true),
  9402. onLeave(el, done) {
  9403. el._isLeaving = true;
  9404. const resolve2 = () => finishLeave(el, done);
  9405. addTransitionClass(el, leaveFromClass);
  9406. forceReflow();
  9407. addTransitionClass(el, leaveActiveClass);
  9408. nextFrame(() => {
  9409. if (!el._isLeaving) {
  9410. return;
  9411. }
  9412. removeTransitionClass(el, leaveFromClass);
  9413. addTransitionClass(el, leaveToClass);
  9414. if (!hasExplicitCallback(onLeave)) {
  9415. whenTransitionEnds(el, type, leaveDuration, resolve2);
  9416. }
  9417. });
  9418. callHook2(onLeave, [el, resolve2]);
  9419. },
  9420. onEnterCancelled(el) {
  9421. finishEnter(el, false);
  9422. callHook2(onEnterCancelled, [el]);
  9423. },
  9424. onAppearCancelled(el) {
  9425. finishEnter(el, true);
  9426. callHook2(onAppearCancelled, [el]);
  9427. },
  9428. onLeaveCancelled(el) {
  9429. finishLeave(el);
  9430. callHook2(onLeaveCancelled, [el]);
  9431. }
  9432. });
  9433. }
  9434. function normalizeDuration(duration) {
  9435. if (duration == null) {
  9436. return null;
  9437. } else if (isObject(duration)) {
  9438. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  9439. } else {
  9440. const n = NumberOf(duration);
  9441. return [n, n];
  9442. }
  9443. }
  9444. function NumberOf(val) {
  9445. const res = toNumber(val);
  9446. if (true) {
  9447. assertNumber(res, "<transition> explicit duration");
  9448. }
  9449. return res;
  9450. }
  9451. function addTransitionClass(el, cls) {
  9452. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  9453. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  9454. }
  9455. function removeTransitionClass(el, cls) {
  9456. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  9457. const _vtc = el[vtcKey];
  9458. if (_vtc) {
  9459. _vtc.delete(cls);
  9460. if (!_vtc.size) {
  9461. el[vtcKey] = void 0;
  9462. }
  9463. }
  9464. }
  9465. function nextFrame(cb) {
  9466. requestAnimationFrame(() => {
  9467. requestAnimationFrame(cb);
  9468. });
  9469. }
  9470. var endId = 0;
  9471. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
  9472. const id = el._endId = ++endId;
  9473. const resolveIfNotStale = () => {
  9474. if (id === el._endId) {
  9475. resolve2();
  9476. }
  9477. };
  9478. if (explicitTimeout) {
  9479. return setTimeout(resolveIfNotStale, explicitTimeout);
  9480. }
  9481. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  9482. if (!type) {
  9483. return resolve2();
  9484. }
  9485. const endEvent = type + "end";
  9486. let ended = 0;
  9487. const end = () => {
  9488. el.removeEventListener(endEvent, onEnd);
  9489. resolveIfNotStale();
  9490. };
  9491. const onEnd = (e) => {
  9492. if (e.target === el && ++ended >= propCount) {
  9493. end();
  9494. }
  9495. };
  9496. setTimeout(() => {
  9497. if (ended < propCount) {
  9498. end();
  9499. }
  9500. }, timeout + 1);
  9501. el.addEventListener(endEvent, onEnd);
  9502. }
  9503. function getTransitionInfo(el, expectedType) {
  9504. const styles = window.getComputedStyle(el);
  9505. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  9506. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  9507. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  9508. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  9509. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  9510. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  9511. const animationTimeout = getTimeout(animationDelays, animationDurations);
  9512. let type = null;
  9513. let timeout = 0;
  9514. let propCount = 0;
  9515. if (expectedType === TRANSITION) {
  9516. if (transitionTimeout > 0) {
  9517. type = TRANSITION;
  9518. timeout = transitionTimeout;
  9519. propCount = transitionDurations.length;
  9520. }
  9521. } else if (expectedType === ANIMATION) {
  9522. if (animationTimeout > 0) {
  9523. type = ANIMATION;
  9524. timeout = animationTimeout;
  9525. propCount = animationDurations.length;
  9526. }
  9527. } else {
  9528. timeout = Math.max(transitionTimeout, animationTimeout);
  9529. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  9530. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  9531. }
  9532. const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
  9533. getStyleProperties(`${TRANSITION}Property`).toString()
  9534. );
  9535. return {
  9536. type,
  9537. timeout,
  9538. propCount,
  9539. hasTransform
  9540. };
  9541. }
  9542. function getTimeout(delays, durations) {
  9543. while (delays.length < durations.length) {
  9544. delays = delays.concat(delays);
  9545. }
  9546. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  9547. }
  9548. function toMs(s) {
  9549. if (s === "auto")
  9550. return 0;
  9551. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  9552. }
  9553. function forceReflow() {
  9554. return document.body.offsetHeight;
  9555. }
  9556. function patchClass(el, value, isSVG) {
  9557. const transitionClasses = el[vtcKey];
  9558. if (transitionClasses) {
  9559. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  9560. }
  9561. if (value == null) {
  9562. el.removeAttribute("class");
  9563. } else if (isSVG) {
  9564. el.setAttribute("class", value);
  9565. } else {
  9566. el.className = value;
  9567. }
  9568. }
  9569. var vShowOldKey = Symbol("_vod");
  9570. var vShow = {
  9571. beforeMount(el, { value }, { transition }) {
  9572. el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
  9573. if (transition && value) {
  9574. transition.beforeEnter(el);
  9575. } else {
  9576. setDisplay(el, value);
  9577. }
  9578. },
  9579. mounted(el, { value }, { transition }) {
  9580. if (transition && value) {
  9581. transition.enter(el);
  9582. }
  9583. },
  9584. updated(el, { value, oldValue }, { transition }) {
  9585. if (!value === !oldValue)
  9586. return;
  9587. if (transition) {
  9588. if (value) {
  9589. transition.beforeEnter(el);
  9590. setDisplay(el, true);
  9591. transition.enter(el);
  9592. } else {
  9593. transition.leave(el, () => {
  9594. setDisplay(el, false);
  9595. });
  9596. }
  9597. } else {
  9598. setDisplay(el, value);
  9599. }
  9600. },
  9601. beforeUnmount(el, { value }) {
  9602. setDisplay(el, value);
  9603. }
  9604. };
  9605. function setDisplay(el, value) {
  9606. el.style.display = value ? el[vShowOldKey] : "none";
  9607. }
  9608. function initVShowForSSR() {
  9609. vShow.getSSRProps = ({ value }) => {
  9610. if (!value) {
  9611. return { style: { display: "none" } };
  9612. }
  9613. };
  9614. }
  9615. var CSS_VAR_TEXT = Symbol(true ? "CSS_VAR_TEXT" : "");
  9616. function useCssVars(getter) {
  9617. const instance = getCurrentInstance();
  9618. if (!instance) {
  9619. warn2(`useCssVars is called without current active component instance.`);
  9620. return;
  9621. }
  9622. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  9623. Array.from(
  9624. document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
  9625. ).forEach((node) => setVarsOnNode(node, vars));
  9626. };
  9627. const setVars = () => {
  9628. const vars = getter(instance.proxy);
  9629. setVarsOnVNode(instance.subTree, vars);
  9630. updateTeleports(vars);
  9631. };
  9632. watchPostEffect(setVars);
  9633. onMounted(() => {
  9634. const ob = new MutationObserver(setVars);
  9635. ob.observe(instance.subTree.el.parentNode, { childList: true });
  9636. onUnmounted(() => ob.disconnect());
  9637. });
  9638. }
  9639. function setVarsOnVNode(vnode, vars) {
  9640. if (vnode.shapeFlag & 128) {
  9641. const suspense = vnode.suspense;
  9642. vnode = suspense.activeBranch;
  9643. if (suspense.pendingBranch && !suspense.isHydrating) {
  9644. suspense.effects.push(() => {
  9645. setVarsOnVNode(suspense.activeBranch, vars);
  9646. });
  9647. }
  9648. }
  9649. while (vnode.component) {
  9650. vnode = vnode.component.subTree;
  9651. }
  9652. if (vnode.shapeFlag & 1 && vnode.el) {
  9653. setVarsOnNode(vnode.el, vars);
  9654. } else if (vnode.type === Fragment) {
  9655. vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  9656. } else if (vnode.type === Static) {
  9657. let { el, anchor } = vnode;
  9658. while (el) {
  9659. setVarsOnNode(el, vars);
  9660. if (el === anchor)
  9661. break;
  9662. el = el.nextSibling;
  9663. }
  9664. }
  9665. }
  9666. function setVarsOnNode(el, vars) {
  9667. if (el.nodeType === 1) {
  9668. const style = el.style;
  9669. let cssText = "";
  9670. for (const key in vars) {
  9671. style.setProperty(`--${key}`, vars[key]);
  9672. cssText += `--${key}: ${vars[key]};`;
  9673. }
  9674. style[CSS_VAR_TEXT] = cssText;
  9675. }
  9676. }
  9677. function patchStyle(el, prev, next) {
  9678. const style = el.style;
  9679. const isCssString = isString(next);
  9680. if (next && !isCssString) {
  9681. if (prev && !isString(prev)) {
  9682. for (const key in prev) {
  9683. if (next[key] == null) {
  9684. setStyle(style, key, "");
  9685. }
  9686. }
  9687. }
  9688. for (const key in next) {
  9689. setStyle(style, key, next[key]);
  9690. }
  9691. } else {
  9692. const currentDisplay = style.display;
  9693. if (isCssString) {
  9694. if (prev !== next) {
  9695. const cssVarText = style[CSS_VAR_TEXT];
  9696. if (cssVarText) {
  9697. next += ";" + cssVarText;
  9698. }
  9699. style.cssText = next;
  9700. }
  9701. } else if (prev) {
  9702. el.removeAttribute("style");
  9703. }
  9704. if (vShowOldKey in el) {
  9705. style.display = currentDisplay;
  9706. }
  9707. }
  9708. }
  9709. var semicolonRE = /[^\\];\s*$/;
  9710. var importantRE = /\s*!important$/;
  9711. function setStyle(style, name, val) {
  9712. if (isArray(val)) {
  9713. val.forEach((v) => setStyle(style, name, v));
  9714. } else {
  9715. if (val == null)
  9716. val = "";
  9717. if (true) {
  9718. if (semicolonRE.test(val)) {
  9719. warn2(
  9720. `Unexpected semicolon at the end of '${name}' style value: '${val}'`
  9721. );
  9722. }
  9723. }
  9724. if (name.startsWith("--")) {
  9725. style.setProperty(name, val);
  9726. } else {
  9727. const prefixed = autoPrefix(style, name);
  9728. if (importantRE.test(val)) {
  9729. style.setProperty(
  9730. hyphenate(prefixed),
  9731. val.replace(importantRE, ""),
  9732. "important"
  9733. );
  9734. } else {
  9735. style[prefixed] = val;
  9736. }
  9737. }
  9738. }
  9739. }
  9740. var prefixes = ["Webkit", "Moz", "ms"];
  9741. var prefixCache = {};
  9742. function autoPrefix(style, rawName) {
  9743. const cached = prefixCache[rawName];
  9744. if (cached) {
  9745. return cached;
  9746. }
  9747. let name = camelize(rawName);
  9748. if (name !== "filter" && name in style) {
  9749. return prefixCache[rawName] = name;
  9750. }
  9751. name = capitalize(name);
  9752. for (let i = 0; i < prefixes.length; i++) {
  9753. const prefixed = prefixes[i] + name;
  9754. if (prefixed in style) {
  9755. return prefixCache[rawName] = prefixed;
  9756. }
  9757. }
  9758. return rawName;
  9759. }
  9760. var xlinkNS = "http://www.w3.org/1999/xlink";
  9761. function patchAttr(el, key, value, isSVG, instance) {
  9762. if (isSVG && key.startsWith("xlink:")) {
  9763. if (value == null) {
  9764. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  9765. } else {
  9766. el.setAttributeNS(xlinkNS, key, value);
  9767. }
  9768. } else {
  9769. const isBoolean2 = isSpecialBooleanAttr(key);
  9770. if (value == null || isBoolean2 && !includeBooleanAttr(value)) {
  9771. el.removeAttribute(key);
  9772. } else {
  9773. el.setAttribute(key, isBoolean2 ? "" : value);
  9774. }
  9775. }
  9776. }
  9777. function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
  9778. if (key === "innerHTML" || key === "textContent") {
  9779. if (prevChildren) {
  9780. unmountChildren(prevChildren, parentComponent, parentSuspense);
  9781. }
  9782. el[key] = value == null ? "" : value;
  9783. return;
  9784. }
  9785. const tag = el.tagName;
  9786. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  9787. !tag.includes("-")) {
  9788. el._value = value;
  9789. const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
  9790. const newValue = value == null ? "" : value;
  9791. if (oldValue !== newValue) {
  9792. el.value = newValue;
  9793. }
  9794. if (value == null) {
  9795. el.removeAttribute(key);
  9796. }
  9797. return;
  9798. }
  9799. let needRemove = false;
  9800. if (value === "" || value == null) {
  9801. const type = typeof el[key];
  9802. if (type === "boolean") {
  9803. value = includeBooleanAttr(value);
  9804. } else if (value == null && type === "string") {
  9805. value = "";
  9806. needRemove = true;
  9807. } else if (type === "number") {
  9808. value = 0;
  9809. needRemove = true;
  9810. }
  9811. }
  9812. try {
  9813. el[key] = value;
  9814. } catch (e) {
  9815. if (!needRemove) {
  9816. warn2(
  9817. `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
  9818. e
  9819. );
  9820. }
  9821. }
  9822. needRemove && el.removeAttribute(key);
  9823. }
  9824. function addEventListener(el, event, handler, options) {
  9825. el.addEventListener(event, handler, options);
  9826. }
  9827. function removeEventListener(el, event, handler, options) {
  9828. el.removeEventListener(event, handler, options);
  9829. }
  9830. var veiKey = Symbol("_vei");
  9831. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  9832. const invokers = el[veiKey] || (el[veiKey] = {});
  9833. const existingInvoker = invokers[rawName];
  9834. if (nextValue && existingInvoker) {
  9835. existingInvoker.value = nextValue;
  9836. } else {
  9837. const [name, options] = parseName(rawName);
  9838. if (nextValue) {
  9839. const invoker = invokers[rawName] = createInvoker(nextValue, instance);
  9840. addEventListener(el, name, invoker, options);
  9841. } else if (existingInvoker) {
  9842. removeEventListener(el, name, existingInvoker, options);
  9843. invokers[rawName] = void 0;
  9844. }
  9845. }
  9846. }
  9847. var optionsModifierRE = /(?:Once|Passive|Capture)$/;
  9848. function parseName(name) {
  9849. let options;
  9850. if (optionsModifierRE.test(name)) {
  9851. options = {};
  9852. let m;
  9853. while (m = name.match(optionsModifierRE)) {
  9854. name = name.slice(0, name.length - m[0].length);
  9855. options[m[0].toLowerCase()] = true;
  9856. }
  9857. }
  9858. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  9859. return [event, options];
  9860. }
  9861. var cachedNow = 0;
  9862. var p = Promise.resolve();
  9863. var getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  9864. function createInvoker(initialValue, instance) {
  9865. const invoker = (e) => {
  9866. if (!e._vts) {
  9867. e._vts = Date.now();
  9868. } else if (e._vts <= invoker.attached) {
  9869. return;
  9870. }
  9871. callWithAsyncErrorHandling(
  9872. patchStopImmediatePropagation(e, invoker.value),
  9873. instance,
  9874. 5,
  9875. [e]
  9876. );
  9877. };
  9878. invoker.value = initialValue;
  9879. invoker.attached = getNow();
  9880. return invoker;
  9881. }
  9882. function patchStopImmediatePropagation(e, value) {
  9883. if (isArray(value)) {
  9884. const originalStop = e.stopImmediatePropagation;
  9885. e.stopImmediatePropagation = () => {
  9886. originalStop.call(e);
  9887. e._stopped = true;
  9888. };
  9889. return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
  9890. } else {
  9891. return value;
  9892. }
  9893. }
  9894. var isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  9895. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  9896. var patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
  9897. if (key === "class") {
  9898. patchClass(el, nextValue, isSVG);
  9899. } else if (key === "style") {
  9900. patchStyle(el, prevValue, nextValue);
  9901. } else if (isOn(key)) {
  9902. if (!isModelListener(key)) {
  9903. patchEvent(el, key, prevValue, nextValue, parentComponent);
  9904. }
  9905. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  9906. patchDOMProp(
  9907. el,
  9908. key,
  9909. nextValue,
  9910. prevChildren,
  9911. parentComponent,
  9912. parentSuspense,
  9913. unmountChildren
  9914. );
  9915. } else {
  9916. if (key === "true-value") {
  9917. el._trueValue = nextValue;
  9918. } else if (key === "false-value") {
  9919. el._falseValue = nextValue;
  9920. }
  9921. patchAttr(el, key, nextValue, isSVG);
  9922. }
  9923. };
  9924. function shouldSetAsProp(el, key, value, isSVG) {
  9925. if (isSVG) {
  9926. if (key === "innerHTML" || key === "textContent") {
  9927. return true;
  9928. }
  9929. if (key in el && isNativeOn(key) && isFunction(value)) {
  9930. return true;
  9931. }
  9932. return false;
  9933. }
  9934. if (key === "spellcheck" || key === "draggable" || key === "translate") {
  9935. return false;
  9936. }
  9937. if (key === "form") {
  9938. return false;
  9939. }
  9940. if (key === "list" && el.tagName === "INPUT") {
  9941. return false;
  9942. }
  9943. if (key === "type" && el.tagName === "TEXTAREA") {
  9944. return false;
  9945. }
  9946. if (key === "width" || key === "height") {
  9947. const tag = el.tagName;
  9948. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  9949. return false;
  9950. }
  9951. }
  9952. if (isNativeOn(key) && isString(value)) {
  9953. return false;
  9954. }
  9955. return key in el;
  9956. }
  9957. function defineCustomElement(options, hydrate2) {
  9958. const Comp = defineComponent(options);
  9959. class VueCustomElement extends VueElement {
  9960. constructor(initialProps) {
  9961. super(Comp, initialProps, hydrate2);
  9962. }
  9963. }
  9964. VueCustomElement.def = Comp;
  9965. return VueCustomElement;
  9966. }
  9967. var defineSSRCustomElement = (
  9968. /* @__NO_SIDE_EFFECTS__ */
  9969. (options) => {
  9970. return defineCustomElement(options, hydrate);
  9971. }
  9972. );
  9973. var BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  9974. };
  9975. var VueElement = class extends BaseClass {
  9976. constructor(_def, _props = {}, hydrate2) {
  9977. super();
  9978. this._def = _def;
  9979. this._props = _props;
  9980. this._instance = null;
  9981. this._connected = false;
  9982. this._resolved = false;
  9983. this._numberProps = null;
  9984. this._ob = null;
  9985. if (this.shadowRoot && hydrate2) {
  9986. hydrate2(this._createVNode(), this.shadowRoot);
  9987. } else {
  9988. if (this.shadowRoot) {
  9989. warn2(
  9990. `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
  9991. );
  9992. }
  9993. this.attachShadow({ mode: "open" });
  9994. if (!this._def.__asyncLoader) {
  9995. this._resolveProps(this._def);
  9996. }
  9997. }
  9998. }
  9999. connectedCallback() {
  10000. this._connected = true;
  10001. if (!this._instance) {
  10002. if (this._resolved) {
  10003. this._update();
  10004. } else {
  10005. this._resolveDef();
  10006. }
  10007. }
  10008. }
  10009. disconnectedCallback() {
  10010. this._connected = false;
  10011. if (this._ob) {
  10012. this._ob.disconnect();
  10013. this._ob = null;
  10014. }
  10015. nextTick(() => {
  10016. if (!this._connected) {
  10017. render(null, this.shadowRoot);
  10018. this._instance = null;
  10019. }
  10020. });
  10021. }
  10022. /**
  10023. * resolve inner component definition (handle possible async component)
  10024. */
  10025. _resolveDef() {
  10026. this._resolved = true;
  10027. for (let i = 0; i < this.attributes.length; i++) {
  10028. this._setAttr(this.attributes[i].name);
  10029. }
  10030. this._ob = new MutationObserver((mutations) => {
  10031. for (const m of mutations) {
  10032. this._setAttr(m.attributeName);
  10033. }
  10034. });
  10035. this._ob.observe(this, { attributes: true });
  10036. const resolve2 = (def2, isAsync = false) => {
  10037. const { props, styles } = def2;
  10038. let numberProps;
  10039. if (props && !isArray(props)) {
  10040. for (const key in props) {
  10041. const opt = props[key];
  10042. if (opt === Number || opt && opt.type === Number) {
  10043. if (key in this._props) {
  10044. this._props[key] = toNumber(this._props[key]);
  10045. }
  10046. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
  10047. }
  10048. }
  10049. }
  10050. this._numberProps = numberProps;
  10051. if (isAsync) {
  10052. this._resolveProps(def2);
  10053. }
  10054. this._applyStyles(styles);
  10055. this._update();
  10056. };
  10057. const asyncDef = this._def.__asyncLoader;
  10058. if (asyncDef) {
  10059. asyncDef().then((def2) => resolve2(def2, true));
  10060. } else {
  10061. resolve2(this._def);
  10062. }
  10063. }
  10064. _resolveProps(def2) {
  10065. const { props } = def2;
  10066. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  10067. for (const key of Object.keys(this)) {
  10068. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  10069. this._setProp(key, this[key], true, false);
  10070. }
  10071. }
  10072. for (const key of declaredPropKeys.map(camelize)) {
  10073. Object.defineProperty(this, key, {
  10074. get() {
  10075. return this._getProp(key);
  10076. },
  10077. set(val) {
  10078. this._setProp(key, val);
  10079. }
  10080. });
  10081. }
  10082. }
  10083. _setAttr(key) {
  10084. let value = this.getAttribute(key);
  10085. const camelKey = camelize(key);
  10086. if (this._numberProps && this._numberProps[camelKey]) {
  10087. value = toNumber(value);
  10088. }
  10089. this._setProp(camelKey, value, false);
  10090. }
  10091. /**
  10092. * @internal
  10093. */
  10094. _getProp(key) {
  10095. return this._props[key];
  10096. }
  10097. /**
  10098. * @internal
  10099. */
  10100. _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
  10101. if (val !== this._props[key]) {
  10102. this._props[key] = val;
  10103. if (shouldUpdate && this._instance) {
  10104. this._update();
  10105. }
  10106. if (shouldReflect) {
  10107. if (val === true) {
  10108. this.setAttribute(hyphenate(key), "");
  10109. } else if (typeof val === "string" || typeof val === "number") {
  10110. this.setAttribute(hyphenate(key), val + "");
  10111. } else if (!val) {
  10112. this.removeAttribute(hyphenate(key));
  10113. }
  10114. }
  10115. }
  10116. }
  10117. _update() {
  10118. render(this._createVNode(), this.shadowRoot);
  10119. }
  10120. _createVNode() {
  10121. const vnode = createVNode(this._def, extend({}, this._props));
  10122. if (!this._instance) {
  10123. vnode.ce = (instance) => {
  10124. this._instance = instance;
  10125. instance.isCE = true;
  10126. if (true) {
  10127. instance.ceReload = (newStyles) => {
  10128. if (this._styles) {
  10129. this._styles.forEach((s) => this.shadowRoot.removeChild(s));
  10130. this._styles.length = 0;
  10131. }
  10132. this._applyStyles(newStyles);
  10133. this._instance = null;
  10134. this._update();
  10135. };
  10136. }
  10137. const dispatch = (event, args) => {
  10138. this.dispatchEvent(
  10139. new CustomEvent(event, {
  10140. detail: args
  10141. })
  10142. );
  10143. };
  10144. instance.emit = (event, ...args) => {
  10145. dispatch(event, args);
  10146. if (hyphenate(event) !== event) {
  10147. dispatch(hyphenate(event), args);
  10148. }
  10149. };
  10150. let parent = this;
  10151. while (parent = parent && (parent.parentNode || parent.host)) {
  10152. if (parent instanceof VueElement) {
  10153. instance.parent = parent._instance;
  10154. instance.provides = parent._instance.provides;
  10155. break;
  10156. }
  10157. }
  10158. };
  10159. }
  10160. return vnode;
  10161. }
  10162. _applyStyles(styles) {
  10163. if (styles) {
  10164. styles.forEach((css) => {
  10165. const s = document.createElement("style");
  10166. s.textContent = css;
  10167. this.shadowRoot.appendChild(s);
  10168. if (true) {
  10169. (this._styles || (this._styles = [])).push(s);
  10170. }
  10171. });
  10172. }
  10173. }
  10174. };
  10175. function useCssModule(name = "$style") {
  10176. {
  10177. const instance = getCurrentInstance();
  10178. if (!instance) {
  10179. warn2(`useCssModule must be called inside setup()`);
  10180. return EMPTY_OBJ;
  10181. }
  10182. const modules = instance.type.__cssModules;
  10183. if (!modules) {
  10184. warn2(`Current instance does not have CSS modules injected.`);
  10185. return EMPTY_OBJ;
  10186. }
  10187. const mod = modules[name];
  10188. if (!mod) {
  10189. warn2(`Current instance does not have CSS module named "${name}".`);
  10190. return EMPTY_OBJ;
  10191. }
  10192. return mod;
  10193. }
  10194. }
  10195. var positionMap = /* @__PURE__ */ new WeakMap();
  10196. var newPositionMap = /* @__PURE__ */ new WeakMap();
  10197. var moveCbKey = Symbol("_moveCb");
  10198. var enterCbKey2 = Symbol("_enterCb");
  10199. var TransitionGroupImpl = {
  10200. name: "TransitionGroup",
  10201. props: extend({}, TransitionPropsValidators, {
  10202. tag: String,
  10203. moveClass: String
  10204. }),
  10205. setup(props, { slots }) {
  10206. const instance = getCurrentInstance();
  10207. const state = useTransitionState();
  10208. let prevChildren;
  10209. let children;
  10210. onUpdated(() => {
  10211. if (!prevChildren.length) {
  10212. return;
  10213. }
  10214. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  10215. if (!hasCSSTransform(
  10216. prevChildren[0].el,
  10217. instance.vnode.el,
  10218. moveClass
  10219. )) {
  10220. return;
  10221. }
  10222. prevChildren.forEach(callPendingCbs);
  10223. prevChildren.forEach(recordPosition);
  10224. const movedChildren = prevChildren.filter(applyTranslation);
  10225. forceReflow();
  10226. movedChildren.forEach((c) => {
  10227. const el = c.el;
  10228. const style = el.style;
  10229. addTransitionClass(el, moveClass);
  10230. style.transform = style.webkitTransform = style.transitionDuration = "";
  10231. const cb = el[moveCbKey] = (e) => {
  10232. if (e && e.target !== el) {
  10233. return;
  10234. }
  10235. if (!e || /transform$/.test(e.propertyName)) {
  10236. el.removeEventListener("transitionend", cb);
  10237. el[moveCbKey] = null;
  10238. removeTransitionClass(el, moveClass);
  10239. }
  10240. };
  10241. el.addEventListener("transitionend", cb);
  10242. });
  10243. });
  10244. return () => {
  10245. const rawProps = toRaw(props);
  10246. const cssTransitionProps = resolveTransitionProps(rawProps);
  10247. let tag = rawProps.tag || Fragment;
  10248. prevChildren = children;
  10249. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  10250. for (let i = 0; i < children.length; i++) {
  10251. const child = children[i];
  10252. if (child.key != null) {
  10253. setTransitionHooks(
  10254. child,
  10255. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  10256. );
  10257. } else if (true) {
  10258. warn2(`<TransitionGroup> children must be keyed.`);
  10259. }
  10260. }
  10261. if (prevChildren) {
  10262. for (let i = 0; i < prevChildren.length; i++) {
  10263. const child = prevChildren[i];
  10264. setTransitionHooks(
  10265. child,
  10266. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  10267. );
  10268. positionMap.set(child, child.el.getBoundingClientRect());
  10269. }
  10270. }
  10271. return createVNode(tag, null, children);
  10272. };
  10273. }
  10274. };
  10275. var removeMode = (props) => delete props.mode;
  10276. removeMode(TransitionGroupImpl.props);
  10277. var TransitionGroup = TransitionGroupImpl;
  10278. function callPendingCbs(c) {
  10279. const el = c.el;
  10280. if (el[moveCbKey]) {
  10281. el[moveCbKey]();
  10282. }
  10283. if (el[enterCbKey2]) {
  10284. el[enterCbKey2]();
  10285. }
  10286. }
  10287. function recordPosition(c) {
  10288. newPositionMap.set(c, c.el.getBoundingClientRect());
  10289. }
  10290. function applyTranslation(c) {
  10291. const oldPos = positionMap.get(c);
  10292. const newPos = newPositionMap.get(c);
  10293. const dx = oldPos.left - newPos.left;
  10294. const dy = oldPos.top - newPos.top;
  10295. if (dx || dy) {
  10296. const s = c.el.style;
  10297. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  10298. s.transitionDuration = "0s";
  10299. return c;
  10300. }
  10301. }
  10302. function hasCSSTransform(el, root, moveClass) {
  10303. const clone = el.cloneNode();
  10304. const _vtc = el[vtcKey];
  10305. if (_vtc) {
  10306. _vtc.forEach((cls) => {
  10307. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  10308. });
  10309. }
  10310. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  10311. clone.style.display = "none";
  10312. const container = root.nodeType === 1 ? root : root.parentNode;
  10313. container.appendChild(clone);
  10314. const { hasTransform } = getTransitionInfo(clone);
  10315. container.removeChild(clone);
  10316. return hasTransform;
  10317. }
  10318. var getModelAssigner = (vnode) => {
  10319. const fn = vnode.props["onUpdate:modelValue"] || false;
  10320. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  10321. };
  10322. function onCompositionStart(e) {
  10323. e.target.composing = true;
  10324. }
  10325. function onCompositionEnd(e) {
  10326. const target = e.target;
  10327. if (target.composing) {
  10328. target.composing = false;
  10329. target.dispatchEvent(new Event("input"));
  10330. }
  10331. }
  10332. var assignKey = Symbol("_assign");
  10333. var vModelText = {
  10334. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  10335. el[assignKey] = getModelAssigner(vnode);
  10336. const castToNumber = number || vnode.props && vnode.props.type === "number";
  10337. addEventListener(el, lazy ? "change" : "input", (e) => {
  10338. if (e.target.composing)
  10339. return;
  10340. let domValue = el.value;
  10341. if (trim) {
  10342. domValue = domValue.trim();
  10343. }
  10344. if (castToNumber) {
  10345. domValue = looseToNumber(domValue);
  10346. }
  10347. el[assignKey](domValue);
  10348. });
  10349. if (trim) {
  10350. addEventListener(el, "change", () => {
  10351. el.value = el.value.trim();
  10352. });
  10353. }
  10354. if (!lazy) {
  10355. addEventListener(el, "compositionstart", onCompositionStart);
  10356. addEventListener(el, "compositionend", onCompositionEnd);
  10357. addEventListener(el, "change", onCompositionEnd);
  10358. }
  10359. },
  10360. // set value on mounted so it's after min/max for type="range"
  10361. mounted(el, { value }) {
  10362. el.value = value == null ? "" : value;
  10363. },
  10364. beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
  10365. el[assignKey] = getModelAssigner(vnode);
  10366. if (el.composing)
  10367. return;
  10368. const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
  10369. const newValue = value == null ? "" : value;
  10370. if (elValue === newValue) {
  10371. return;
  10372. }
  10373. if (document.activeElement === el && el.type !== "range") {
  10374. if (lazy) {
  10375. return;
  10376. }
  10377. if (trim && el.value.trim() === newValue) {
  10378. return;
  10379. }
  10380. }
  10381. el.value = newValue;
  10382. }
  10383. };
  10384. var vModelCheckbox = {
  10385. // #4096 array checkboxes need to be deep traversed
  10386. deep: true,
  10387. created(el, _, vnode) {
  10388. el[assignKey] = getModelAssigner(vnode);
  10389. addEventListener(el, "change", () => {
  10390. const modelValue = el._modelValue;
  10391. const elementValue = getValue(el);
  10392. const checked = el.checked;
  10393. const assign = el[assignKey];
  10394. if (isArray(modelValue)) {
  10395. const index = looseIndexOf(modelValue, elementValue);
  10396. const found = index !== -1;
  10397. if (checked && !found) {
  10398. assign(modelValue.concat(elementValue));
  10399. } else if (!checked && found) {
  10400. const filtered = [...modelValue];
  10401. filtered.splice(index, 1);
  10402. assign(filtered);
  10403. }
  10404. } else if (isSet(modelValue)) {
  10405. const cloned = new Set(modelValue);
  10406. if (checked) {
  10407. cloned.add(elementValue);
  10408. } else {
  10409. cloned.delete(elementValue);
  10410. }
  10411. assign(cloned);
  10412. } else {
  10413. assign(getCheckboxValue(el, checked));
  10414. }
  10415. });
  10416. },
  10417. // set initial checked on mount to wait for true-value/false-value
  10418. mounted: setChecked,
  10419. beforeUpdate(el, binding, vnode) {
  10420. el[assignKey] = getModelAssigner(vnode);
  10421. setChecked(el, binding, vnode);
  10422. }
  10423. };
  10424. function setChecked(el, { value, oldValue }, vnode) {
  10425. el._modelValue = value;
  10426. if (isArray(value)) {
  10427. el.checked = looseIndexOf(value, vnode.props.value) > -1;
  10428. } else if (isSet(value)) {
  10429. el.checked = value.has(vnode.props.value);
  10430. } else if (value !== oldValue) {
  10431. el.checked = looseEqual(value, getCheckboxValue(el, true));
  10432. }
  10433. }
  10434. var vModelRadio = {
  10435. created(el, { value }, vnode) {
  10436. el.checked = looseEqual(value, vnode.props.value);
  10437. el[assignKey] = getModelAssigner(vnode);
  10438. addEventListener(el, "change", () => {
  10439. el[assignKey](getValue(el));
  10440. });
  10441. },
  10442. beforeUpdate(el, { value, oldValue }, vnode) {
  10443. el[assignKey] = getModelAssigner(vnode);
  10444. if (value !== oldValue) {
  10445. el.checked = looseEqual(value, vnode.props.value);
  10446. }
  10447. }
  10448. };
  10449. var vModelSelect = {
  10450. // <select multiple> value need to be deep traversed
  10451. deep: true,
  10452. created(el, { value, modifiers: { number } }, vnode) {
  10453. const isSetModel = isSet(value);
  10454. addEventListener(el, "change", () => {
  10455. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  10456. (o) => number ? looseToNumber(getValue(o)) : getValue(o)
  10457. );
  10458. el[assignKey](
  10459. el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
  10460. );
  10461. });
  10462. el[assignKey] = getModelAssigner(vnode);
  10463. },
  10464. // set value in mounted & updated because <select> relies on its children
  10465. // <option>s.
  10466. mounted(el, { value }) {
  10467. setSelected(el, value);
  10468. },
  10469. beforeUpdate(el, _binding, vnode) {
  10470. el[assignKey] = getModelAssigner(vnode);
  10471. },
  10472. updated(el, { value }) {
  10473. setSelected(el, value);
  10474. }
  10475. };
  10476. function setSelected(el, value) {
  10477. const isMultiple = el.multiple;
  10478. if (isMultiple && !isArray(value) && !isSet(value)) {
  10479. warn2(
  10480. `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
  10481. );
  10482. return;
  10483. }
  10484. for (let i = 0, l = el.options.length; i < l; i++) {
  10485. const option = el.options[i];
  10486. const optionValue = getValue(option);
  10487. if (isMultiple) {
  10488. if (isArray(value)) {
  10489. option.selected = looseIndexOf(value, optionValue) > -1;
  10490. } else {
  10491. option.selected = value.has(optionValue);
  10492. }
  10493. } else {
  10494. if (looseEqual(getValue(option), value)) {
  10495. if (el.selectedIndex !== i)
  10496. el.selectedIndex = i;
  10497. return;
  10498. }
  10499. }
  10500. }
  10501. if (!isMultiple && el.selectedIndex !== -1) {
  10502. el.selectedIndex = -1;
  10503. }
  10504. }
  10505. function getValue(el) {
  10506. return "_value" in el ? el._value : el.value;
  10507. }
  10508. function getCheckboxValue(el, checked) {
  10509. const key = checked ? "_trueValue" : "_falseValue";
  10510. return key in el ? el[key] : checked;
  10511. }
  10512. var vModelDynamic = {
  10513. created(el, binding, vnode) {
  10514. callModelHook(el, binding, vnode, null, "created");
  10515. },
  10516. mounted(el, binding, vnode) {
  10517. callModelHook(el, binding, vnode, null, "mounted");
  10518. },
  10519. beforeUpdate(el, binding, vnode, prevVNode) {
  10520. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  10521. },
  10522. updated(el, binding, vnode, prevVNode) {
  10523. callModelHook(el, binding, vnode, prevVNode, "updated");
  10524. }
  10525. };
  10526. function resolveDynamicModel(tagName, type) {
  10527. switch (tagName) {
  10528. case "SELECT":
  10529. return vModelSelect;
  10530. case "TEXTAREA":
  10531. return vModelText;
  10532. default:
  10533. switch (type) {
  10534. case "checkbox":
  10535. return vModelCheckbox;
  10536. case "radio":
  10537. return vModelRadio;
  10538. default:
  10539. return vModelText;
  10540. }
  10541. }
  10542. }
  10543. function callModelHook(el, binding, vnode, prevVNode, hook) {
  10544. const modelToUse = resolveDynamicModel(
  10545. el.tagName,
  10546. vnode.props && vnode.props.type
  10547. );
  10548. const fn = modelToUse[hook];
  10549. fn && fn(el, binding, vnode, prevVNode);
  10550. }
  10551. function initVModelForSSR() {
  10552. vModelText.getSSRProps = ({ value }) => ({ value });
  10553. vModelRadio.getSSRProps = ({ value }, vnode) => {
  10554. if (vnode.props && looseEqual(vnode.props.value, value)) {
  10555. return { checked: true };
  10556. }
  10557. };
  10558. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  10559. if (isArray(value)) {
  10560. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
  10561. return { checked: true };
  10562. }
  10563. } else if (isSet(value)) {
  10564. if (vnode.props && value.has(vnode.props.value)) {
  10565. return { checked: true };
  10566. }
  10567. } else if (value) {
  10568. return { checked: true };
  10569. }
  10570. };
  10571. vModelDynamic.getSSRProps = (binding, vnode) => {
  10572. if (typeof vnode.type !== "string") {
  10573. return;
  10574. }
  10575. const modelToUse = resolveDynamicModel(
  10576. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  10577. vnode.type.toUpperCase(),
  10578. vnode.props && vnode.props.type
  10579. );
  10580. if (modelToUse.getSSRProps) {
  10581. return modelToUse.getSSRProps(binding, vnode);
  10582. }
  10583. };
  10584. }
  10585. var systemModifiers = ["ctrl", "shift", "alt", "meta"];
  10586. var modifierGuards = {
  10587. stop: (e) => e.stopPropagation(),
  10588. prevent: (e) => e.preventDefault(),
  10589. self: (e) => e.target !== e.currentTarget,
  10590. ctrl: (e) => !e.ctrlKey,
  10591. shift: (e) => !e.shiftKey,
  10592. alt: (e) => !e.altKey,
  10593. meta: (e) => !e.metaKey,
  10594. left: (e) => "button" in e && e.button !== 0,
  10595. middle: (e) => "button" in e && e.button !== 1,
  10596. right: (e) => "button" in e && e.button !== 2,
  10597. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  10598. };
  10599. var withModifiers = (fn, modifiers) => {
  10600. return fn._withMods || (fn._withMods = (event, ...args) => {
  10601. for (let i = 0; i < modifiers.length; i++) {
  10602. const guard = modifierGuards[modifiers[i]];
  10603. if (guard && guard(event, modifiers))
  10604. return;
  10605. }
  10606. return fn(event, ...args);
  10607. });
  10608. };
  10609. var keyNames = {
  10610. esc: "escape",
  10611. space: " ",
  10612. up: "arrow-up",
  10613. left: "arrow-left",
  10614. right: "arrow-right",
  10615. down: "arrow-down",
  10616. delete: "backspace"
  10617. };
  10618. var withKeys = (fn, modifiers) => {
  10619. return fn._withKeys || (fn._withKeys = (event) => {
  10620. if (!("key" in event)) {
  10621. return;
  10622. }
  10623. const eventKey = hyphenate(event.key);
  10624. if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) {
  10625. return fn(event);
  10626. }
  10627. });
  10628. };
  10629. var rendererOptions = extend({ patchProp }, nodeOps);
  10630. var renderer;
  10631. var enabledHydration = false;
  10632. function ensureRenderer() {
  10633. return renderer || (renderer = createRenderer(rendererOptions));
  10634. }
  10635. function ensureHydrationRenderer() {
  10636. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  10637. enabledHydration = true;
  10638. return renderer;
  10639. }
  10640. var render = (...args) => {
  10641. ensureRenderer().render(...args);
  10642. };
  10643. var hydrate = (...args) => {
  10644. ensureHydrationRenderer().hydrate(...args);
  10645. };
  10646. var createApp = (...args) => {
  10647. const app = ensureRenderer().createApp(...args);
  10648. if (true) {
  10649. injectNativeTagCheck(app);
  10650. injectCompilerOptionsCheck(app);
  10651. }
  10652. const { mount } = app;
  10653. app.mount = (containerOrSelector) => {
  10654. const container = normalizeContainer(containerOrSelector);
  10655. if (!container)
  10656. return;
  10657. const component = app._component;
  10658. if (!isFunction(component) && !component.render && !component.template) {
  10659. component.template = container.innerHTML;
  10660. }
  10661. container.innerHTML = "";
  10662. const proxy = mount(container, false, container instanceof SVGElement);
  10663. if (container instanceof Element) {
  10664. container.removeAttribute("v-cloak");
  10665. container.setAttribute("data-v-app", "");
  10666. }
  10667. return proxy;
  10668. };
  10669. return app;
  10670. };
  10671. var createSSRApp = (...args) => {
  10672. const app = ensureHydrationRenderer().createApp(...args);
  10673. if (true) {
  10674. injectNativeTagCheck(app);
  10675. injectCompilerOptionsCheck(app);
  10676. }
  10677. const { mount } = app;
  10678. app.mount = (containerOrSelector) => {
  10679. const container = normalizeContainer(containerOrSelector);
  10680. if (container) {
  10681. return mount(container, true, container instanceof SVGElement);
  10682. }
  10683. };
  10684. return app;
  10685. };
  10686. function injectNativeTagCheck(app) {
  10687. Object.defineProperty(app.config, "isNativeTag", {
  10688. value: (tag) => isHTMLTag(tag) || isSVGTag(tag),
  10689. writable: false
  10690. });
  10691. }
  10692. function injectCompilerOptionsCheck(app) {
  10693. if (isRuntimeOnly()) {
  10694. const isCustomElement = app.config.isCustomElement;
  10695. Object.defineProperty(app.config, "isCustomElement", {
  10696. get() {
  10697. return isCustomElement;
  10698. },
  10699. set() {
  10700. warn2(
  10701. `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
  10702. );
  10703. }
  10704. });
  10705. const compilerOptions = app.config.compilerOptions;
  10706. 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.
  10707. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  10708. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  10709. - 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`;
  10710. Object.defineProperty(app.config, "compilerOptions", {
  10711. get() {
  10712. warn2(msg);
  10713. return compilerOptions;
  10714. },
  10715. set() {
  10716. warn2(msg);
  10717. }
  10718. });
  10719. }
  10720. }
  10721. function normalizeContainer(container) {
  10722. if (isString(container)) {
  10723. const res = document.querySelector(container);
  10724. if (!res) {
  10725. warn2(
  10726. `Failed to mount app: mount target selector "${container}" returned null.`
  10727. );
  10728. }
  10729. return res;
  10730. }
  10731. if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
  10732. warn2(
  10733. `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
  10734. );
  10735. }
  10736. return container;
  10737. }
  10738. var ssrDirectiveInitialized = false;
  10739. var initDirectivesForSSR = () => {
  10740. if (!ssrDirectiveInitialized) {
  10741. ssrDirectiveInitialized = true;
  10742. initVModelForSSR();
  10743. initVShowForSSR();
  10744. }
  10745. };
  10746. // node_modules/vue/dist/vue.runtime.esm-bundler.js
  10747. function initDev() {
  10748. {
  10749. initCustomFormatter();
  10750. }
  10751. }
  10752. if (true) {
  10753. initDev();
  10754. }
  10755. var compile2 = () => {
  10756. if (true) {
  10757. warn2(
  10758. `Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  10759. /* should not happen */
  10760. );
  10761. }
  10762. };
  10763. export {
  10764. camelize,
  10765. capitalize,
  10766. toHandlerKey,
  10767. normalizeStyle,
  10768. normalizeClass,
  10769. normalizeProps,
  10770. toDisplayString,
  10771. EffectScope,
  10772. effectScope,
  10773. getCurrentScope,
  10774. onScopeDispose,
  10775. ReactiveEffect,
  10776. effect,
  10777. stop,
  10778. reactive,
  10779. shallowReactive,
  10780. readonly,
  10781. shallowReadonly,
  10782. isReactive,
  10783. isReadonly,
  10784. isShallow,
  10785. isProxy,
  10786. toRaw,
  10787. markRaw,
  10788. isRef,
  10789. ref,
  10790. shallowRef,
  10791. triggerRef,
  10792. unref,
  10793. toValue,
  10794. proxyRefs,
  10795. customRef,
  10796. toRefs,
  10797. toRef,
  10798. warn2 as warn,
  10799. assertNumber,
  10800. callWithErrorHandling,
  10801. callWithAsyncErrorHandling,
  10802. handleError,
  10803. nextTick,
  10804. queuePostFlushCb,
  10805. devtools,
  10806. setDevtoolsHook,
  10807. pushScopeId,
  10808. popScopeId,
  10809. withScopeId,
  10810. withCtx,
  10811. resolveComponent,
  10812. resolveDynamicComponent,
  10813. resolveDirective,
  10814. Suspense,
  10815. watchEffect,
  10816. watchPostEffect,
  10817. watchSyncEffect,
  10818. watch,
  10819. withDirectives,
  10820. useTransitionState,
  10821. BaseTransitionPropsValidators,
  10822. BaseTransition,
  10823. resolveTransitionHooks,
  10824. setTransitionHooks,
  10825. getTransitionRawChildren,
  10826. defineComponent,
  10827. defineAsyncComponent,
  10828. KeepAlive,
  10829. onActivated,
  10830. onDeactivated,
  10831. onBeforeMount,
  10832. onMounted,
  10833. onBeforeUpdate,
  10834. onUpdated,
  10835. onBeforeUnmount,
  10836. onUnmounted,
  10837. onServerPrefetch,
  10838. onRenderTriggered,
  10839. onRenderTracked,
  10840. onErrorCaptured,
  10841. renderList,
  10842. createSlots,
  10843. renderSlot,
  10844. toHandlers,
  10845. defineProps,
  10846. defineEmits,
  10847. defineExpose,
  10848. defineOptions,
  10849. defineSlots,
  10850. defineModel,
  10851. withDefaults,
  10852. useSlots,
  10853. useAttrs,
  10854. useModel,
  10855. mergeDefaults,
  10856. mergeModels,
  10857. createPropsRestProxy,
  10858. withAsyncContext,
  10859. provide,
  10860. inject,
  10861. hasInjectionContext,
  10862. createRenderer,
  10863. createHydrationRenderer,
  10864. Teleport,
  10865. Fragment,
  10866. Text,
  10867. Comment,
  10868. Static,
  10869. openBlock,
  10870. setBlockTracking,
  10871. createElementBlock,
  10872. createBlock,
  10873. isVNode,
  10874. transformVNodeArgs,
  10875. createBaseVNode,
  10876. createVNode,
  10877. guardReactiveProps,
  10878. cloneVNode,
  10879. createTextVNode,
  10880. createStaticVNode,
  10881. createCommentVNode,
  10882. mergeProps,
  10883. getCurrentInstance,
  10884. registerRuntimeCompiler,
  10885. isRuntimeOnly,
  10886. computed2 as computed,
  10887. h,
  10888. ssrContextKey,
  10889. useSSRContext,
  10890. initCustomFormatter,
  10891. withMemo,
  10892. isMemoSame,
  10893. version,
  10894. ssrUtils,
  10895. resolveFilter,
  10896. compatUtils,
  10897. Transition,
  10898. vShow,
  10899. useCssVars,
  10900. defineCustomElement,
  10901. defineSSRCustomElement,
  10902. VueElement,
  10903. useCssModule,
  10904. TransitionGroup,
  10905. vModelText,
  10906. vModelCheckbox,
  10907. vModelRadio,
  10908. vModelSelect,
  10909. vModelDynamic,
  10910. withModifiers,
  10911. withKeys,
  10912. render,
  10913. hydrate,
  10914. createApp,
  10915. createSSRApp,
  10916. initDirectivesForSSR,
  10917. compile2 as compile
  10918. };
  10919. /*! Bundled license information:
  10920. @vue/runtime-core/dist/runtime-core.esm-bundler.js:
  10921. (*! #__NO_SIDE_EFFECTS__ *)
  10922. @vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
  10923. (*! #__NO_SIDE_EFFECTS__ *)
  10924. */
  10925. //# sourceMappingURL=chunk-LJEY6MVM.js.map