chunk-4EPKHDIW.js 366 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683
  1. // node_modules/@vue/shared/dist/shared.esm-bundler.js
  2. function makeMap(str) {
  3. const map2 = /* @__PURE__ */ Object.create(null);
  4. for (const key of str.split(",")) map2[key] = 1;
  5. return (val) => val in map2;
  6. }
  7. var EMPTY_OBJ = true ? Object.freeze({}) : {};
  8. var EMPTY_ARR = true ? Object.freeze([]) : [];
  9. var NOOP = () => {
  10. };
  11. var NO = () => false;
  12. var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
  13. (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  14. var isModelListener = (key) => key.startsWith("onUpdate:");
  15. var extend = Object.assign;
  16. var remove = (arr, el) => {
  17. const i = arr.indexOf(el);
  18. if (i > -1) {
  19. arr.splice(i, 1);
  20. }
  21. };
  22. var hasOwnProperty = Object.prototype.hasOwnProperty;
  23. var hasOwn = (val, key) => hasOwnProperty.call(val, key);
  24. var isArray = Array.isArray;
  25. var isMap = (val) => toTypeString(val) === "[object Map]";
  26. var isSet = (val) => toTypeString(val) === "[object Set]";
  27. var isDate = (val) => toTypeString(val) === "[object Date]";
  28. var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  29. var isFunction = (val) => typeof val === "function";
  30. var isString = (val) => typeof val === "string";
  31. var isSymbol = (val) => typeof val === "symbol";
  32. var isObject = (val) => val !== null && typeof val === "object";
  33. var isPromise = (val) => {
  34. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  35. };
  36. var objectToString = Object.prototype.toString;
  37. var toTypeString = (value) => objectToString.call(value);
  38. var toRawType = (value) => {
  39. return toTypeString(value).slice(8, -1);
  40. };
  41. var isPlainObject = (val) => toTypeString(val) === "[object Object]";
  42. var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  43. var isReservedProp = makeMap(
  44. // the leading comma is intentional so empty string "" is also included
  45. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  46. );
  47. var isBuiltInDirective = makeMap(
  48. "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
  49. );
  50. var cacheStringFunction = (fn) => {
  51. const cache = /* @__PURE__ */ Object.create(null);
  52. return ((str) => {
  53. const hit = cache[str];
  54. return hit || (cache[str] = fn(str));
  55. });
  56. };
  57. var camelizeRE = /-\w/g;
  58. var camelize = cacheStringFunction(
  59. (str) => {
  60. return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
  61. }
  62. );
  63. var hyphenateRE = /\B([A-Z])/g;
  64. var hyphenate = cacheStringFunction(
  65. (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
  66. );
  67. var capitalize = cacheStringFunction((str) => {
  68. return str.charAt(0).toUpperCase() + str.slice(1);
  69. });
  70. var toHandlerKey = cacheStringFunction(
  71. (str) => {
  72. const s = str ? `on${capitalize(str)}` : ``;
  73. return s;
  74. }
  75. );
  76. var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  77. var invokeArrayFns = (fns, ...arg) => {
  78. for (let i = 0; i < fns.length; i++) {
  79. fns[i](...arg);
  80. }
  81. };
  82. var def = (obj, key, value, writable = false) => {
  83. Object.defineProperty(obj, key, {
  84. configurable: true,
  85. enumerable: false,
  86. writable,
  87. value
  88. });
  89. };
  90. var looseToNumber = (val) => {
  91. const n = parseFloat(val);
  92. return isNaN(n) ? val : n;
  93. };
  94. var toNumber = (val) => {
  95. const n = isString(val) ? Number(val) : NaN;
  96. return isNaN(n) ? val : n;
  97. };
  98. var _globalThis;
  99. var getGlobalThis = () => {
  100. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  101. };
  102. var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
  103. var isGloballyAllowed = makeMap(GLOBALS_ALLOWED);
  104. function normalizeStyle(value) {
  105. if (isArray(value)) {
  106. const res = {};
  107. for (let i = 0; i < value.length; i++) {
  108. const item = value[i];
  109. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  110. if (normalized) {
  111. for (const key in normalized) {
  112. res[key] = normalized[key];
  113. }
  114. }
  115. }
  116. return res;
  117. } else if (isString(value) || isObject(value)) {
  118. return value;
  119. }
  120. }
  121. var listDelimiterRE = /;(?![^(]*\))/g;
  122. var propertyDelimiterRE = /:([^]+)/;
  123. var styleCommentRE = /\/\*[^]*?\*\//g;
  124. function parseStringStyle(cssText) {
  125. const ret = {};
  126. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  127. if (item) {
  128. const tmp = item.split(propertyDelimiterRE);
  129. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  130. }
  131. });
  132. return ret;
  133. }
  134. function stringifyStyle(styles) {
  135. if (!styles) return "";
  136. if (isString(styles)) return styles;
  137. let ret = "";
  138. for (const key in styles) {
  139. const value = styles[key];
  140. if (isString(value) || typeof value === "number") {
  141. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  142. ret += `${normalizedKey}:${value};`;
  143. }
  144. }
  145. return ret;
  146. }
  147. function normalizeClass(value) {
  148. let res = "";
  149. if (isString(value)) {
  150. res = value;
  151. } else if (isArray(value)) {
  152. for (let i = 0; i < value.length; i++) {
  153. const normalized = normalizeClass(value[i]);
  154. if (normalized) {
  155. res += normalized + " ";
  156. }
  157. }
  158. } else if (isObject(value)) {
  159. for (const name in value) {
  160. if (value[name]) {
  161. res += name + " ";
  162. }
  163. }
  164. }
  165. return res.trim();
  166. }
  167. function normalizeProps(props) {
  168. if (!props) return null;
  169. let { class: klass, style } = props;
  170. if (klass && !isString(klass)) {
  171. props.class = normalizeClass(klass);
  172. }
  173. if (style) {
  174. props.style = normalizeStyle(style);
  175. }
  176. return props;
  177. }
  178. 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";
  179. 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";
  180. var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
  181. var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
  182. var isHTMLTag = makeMap(HTML_TAGS);
  183. var isSVGTag = makeMap(SVG_TAGS);
  184. var isMathMLTag = makeMap(MATH_TAGS);
  185. var isVoidTag = makeMap(VOID_TAGS);
  186. var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  187. var isSpecialBooleanAttr = makeMap(specialBooleanAttrs);
  188. var isBooleanAttr = makeMap(
  189. specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
  190. );
  191. function includeBooleanAttr(value) {
  192. return !!value || value === "";
  193. }
  194. var isKnownHtmlAttr = makeMap(
  195. `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`
  196. );
  197. var isKnownSvgAttr = makeMap(
  198. `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`
  199. );
  200. var isKnownMathMLAttr = makeMap(
  201. `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`
  202. );
  203. function isRenderableAttrValue(value) {
  204. if (value == null) {
  205. return false;
  206. }
  207. const type = typeof value;
  208. return type === "string" || type === "number" || type === "boolean";
  209. }
  210. var cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
  211. function getEscapedCssVarName(key, doubleEscape) {
  212. return key.replace(
  213. cssVarNameEscapeSymbolsRE,
  214. (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
  215. );
  216. }
  217. function looseCompareArrays(a, b) {
  218. if (a.length !== b.length) return false;
  219. let equal = true;
  220. for (let i = 0; equal && i < a.length; i++) {
  221. equal = looseEqual(a[i], b[i]);
  222. }
  223. return equal;
  224. }
  225. function looseEqual(a, b) {
  226. if (a === b) return true;
  227. let aValidType = isDate(a);
  228. let bValidType = isDate(b);
  229. if (aValidType || bValidType) {
  230. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  231. }
  232. aValidType = isSymbol(a);
  233. bValidType = isSymbol(b);
  234. if (aValidType || bValidType) {
  235. return a === b;
  236. }
  237. aValidType = isArray(a);
  238. bValidType = isArray(b);
  239. if (aValidType || bValidType) {
  240. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  241. }
  242. aValidType = isObject(a);
  243. bValidType = isObject(b);
  244. if (aValidType || bValidType) {
  245. if (!aValidType || !bValidType) {
  246. return false;
  247. }
  248. const aKeysCount = Object.keys(a).length;
  249. const bKeysCount = Object.keys(b).length;
  250. if (aKeysCount !== bKeysCount) {
  251. return false;
  252. }
  253. for (const key in a) {
  254. const aHasKey = a.hasOwnProperty(key);
  255. const bHasKey = b.hasOwnProperty(key);
  256. if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
  257. return false;
  258. }
  259. }
  260. }
  261. return String(a) === String(b);
  262. }
  263. function looseIndexOf(arr, val) {
  264. return arr.findIndex((item) => looseEqual(item, val));
  265. }
  266. var isRef = (val) => {
  267. return !!(val && val["__v_isRef"] === true);
  268. };
  269. var toDisplayString = (val) => {
  270. return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
  271. };
  272. var replacer = (_key, val) => {
  273. if (isRef(val)) {
  274. return replacer(_key, val.value);
  275. } else if (isMap(val)) {
  276. return {
  277. [`Map(${val.size})`]: [...val.entries()].reduce(
  278. (entries, [key, val2], i) => {
  279. entries[stringifySymbol(key, i) + " =>"] = val2;
  280. return entries;
  281. },
  282. {}
  283. )
  284. };
  285. } else if (isSet(val)) {
  286. return {
  287. [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
  288. };
  289. } else if (isSymbol(val)) {
  290. return stringifySymbol(val);
  291. } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  292. return String(val);
  293. }
  294. return val;
  295. };
  296. var stringifySymbol = (v, i = "") => {
  297. var _a;
  298. return (
  299. // Symbol.description in es2019+ so we need to cast here to pass
  300. // the lib: es2016 check
  301. isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
  302. );
  303. };
  304. function normalizeCssVarValue(value) {
  305. if (value == null) {
  306. return "initial";
  307. }
  308. if (typeof value === "string") {
  309. return value === "" ? " " : value;
  310. }
  311. if (typeof value !== "number" || !Number.isFinite(value)) {
  312. if (true) {
  313. console.warn(
  314. "[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
  315. value
  316. );
  317. }
  318. }
  319. return String(value);
  320. }
  321. // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  322. function warn(msg, ...args) {
  323. console.warn(`[Vue warn] ${msg}`, ...args);
  324. }
  325. var activeEffectScope;
  326. var EffectScope = class {
  327. constructor(detached = false) {
  328. this.detached = detached;
  329. this._active = true;
  330. this._on = 0;
  331. this.effects = [];
  332. this.cleanups = [];
  333. this._isPaused = false;
  334. this.parent = activeEffectScope;
  335. if (!detached && activeEffectScope) {
  336. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  337. this
  338. ) - 1;
  339. }
  340. }
  341. get active() {
  342. return this._active;
  343. }
  344. pause() {
  345. if (this._active) {
  346. this._isPaused = true;
  347. let i, l;
  348. if (this.scopes) {
  349. for (i = 0, l = this.scopes.length; i < l; i++) {
  350. this.scopes[i].pause();
  351. }
  352. }
  353. for (i = 0, l = this.effects.length; i < l; i++) {
  354. this.effects[i].pause();
  355. }
  356. }
  357. }
  358. /**
  359. * Resumes the effect scope, including all child scopes and effects.
  360. */
  361. resume() {
  362. if (this._active) {
  363. if (this._isPaused) {
  364. this._isPaused = false;
  365. let i, l;
  366. if (this.scopes) {
  367. for (i = 0, l = this.scopes.length; i < l; i++) {
  368. this.scopes[i].resume();
  369. }
  370. }
  371. for (i = 0, l = this.effects.length; i < l; i++) {
  372. this.effects[i].resume();
  373. }
  374. }
  375. }
  376. }
  377. run(fn) {
  378. if (this._active) {
  379. const currentEffectScope = activeEffectScope;
  380. try {
  381. activeEffectScope = this;
  382. return fn();
  383. } finally {
  384. activeEffectScope = currentEffectScope;
  385. }
  386. } else if (true) {
  387. warn(`cannot run an inactive effect scope.`);
  388. }
  389. }
  390. /**
  391. * This should only be called on non-detached scopes
  392. * @internal
  393. */
  394. on() {
  395. if (++this._on === 1) {
  396. this.prevScope = activeEffectScope;
  397. activeEffectScope = this;
  398. }
  399. }
  400. /**
  401. * This should only be called on non-detached scopes
  402. * @internal
  403. */
  404. off() {
  405. if (this._on > 0 && --this._on === 0) {
  406. activeEffectScope = this.prevScope;
  407. this.prevScope = void 0;
  408. }
  409. }
  410. stop(fromParent) {
  411. if (this._active) {
  412. this._active = false;
  413. let i, l;
  414. for (i = 0, l = this.effects.length; i < l; i++) {
  415. this.effects[i].stop();
  416. }
  417. this.effects.length = 0;
  418. for (i = 0, l = this.cleanups.length; i < l; i++) {
  419. this.cleanups[i]();
  420. }
  421. this.cleanups.length = 0;
  422. if (this.scopes) {
  423. for (i = 0, l = this.scopes.length; i < l; i++) {
  424. this.scopes[i].stop(true);
  425. }
  426. this.scopes.length = 0;
  427. }
  428. if (!this.detached && this.parent && !fromParent) {
  429. const last = this.parent.scopes.pop();
  430. if (last && last !== this) {
  431. this.parent.scopes[this.index] = last;
  432. last.index = this.index;
  433. }
  434. }
  435. this.parent = void 0;
  436. }
  437. }
  438. };
  439. function effectScope(detached) {
  440. return new EffectScope(detached);
  441. }
  442. function getCurrentScope() {
  443. return activeEffectScope;
  444. }
  445. function onScopeDispose(fn, failSilently = false) {
  446. if (activeEffectScope) {
  447. activeEffectScope.cleanups.push(fn);
  448. } else if (!failSilently) {
  449. warn(
  450. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  451. );
  452. }
  453. }
  454. var activeSub;
  455. var pausedQueueEffects = /* @__PURE__ */ new WeakSet();
  456. var ReactiveEffect = class {
  457. constructor(fn) {
  458. this.fn = fn;
  459. this.deps = void 0;
  460. this.depsTail = void 0;
  461. this.flags = 1 | 4;
  462. this.next = void 0;
  463. this.cleanup = void 0;
  464. this.scheduler = void 0;
  465. if (activeEffectScope && activeEffectScope.active) {
  466. activeEffectScope.effects.push(this);
  467. }
  468. }
  469. pause() {
  470. this.flags |= 64;
  471. }
  472. resume() {
  473. if (this.flags & 64) {
  474. this.flags &= -65;
  475. if (pausedQueueEffects.has(this)) {
  476. pausedQueueEffects.delete(this);
  477. this.trigger();
  478. }
  479. }
  480. }
  481. /**
  482. * @internal
  483. */
  484. notify() {
  485. if (this.flags & 2 && !(this.flags & 32)) {
  486. return;
  487. }
  488. if (!(this.flags & 8)) {
  489. batch(this);
  490. }
  491. }
  492. run() {
  493. if (!(this.flags & 1)) {
  494. return this.fn();
  495. }
  496. this.flags |= 2;
  497. cleanupEffect(this);
  498. prepareDeps(this);
  499. const prevEffect = activeSub;
  500. const prevShouldTrack = shouldTrack;
  501. activeSub = this;
  502. shouldTrack = true;
  503. try {
  504. return this.fn();
  505. } finally {
  506. if (activeSub !== this) {
  507. warn(
  508. "Active effect was not restored correctly - this is likely a Vue internal bug."
  509. );
  510. }
  511. cleanupDeps(this);
  512. activeSub = prevEffect;
  513. shouldTrack = prevShouldTrack;
  514. this.flags &= -3;
  515. }
  516. }
  517. stop() {
  518. if (this.flags & 1) {
  519. for (let link = this.deps; link; link = link.nextDep) {
  520. removeSub(link);
  521. }
  522. this.deps = this.depsTail = void 0;
  523. cleanupEffect(this);
  524. this.onStop && this.onStop();
  525. this.flags &= -2;
  526. }
  527. }
  528. trigger() {
  529. if (this.flags & 64) {
  530. pausedQueueEffects.add(this);
  531. } else if (this.scheduler) {
  532. this.scheduler();
  533. } else {
  534. this.runIfDirty();
  535. }
  536. }
  537. /**
  538. * @internal
  539. */
  540. runIfDirty() {
  541. if (isDirty(this)) {
  542. this.run();
  543. }
  544. }
  545. get dirty() {
  546. return isDirty(this);
  547. }
  548. };
  549. var batchDepth = 0;
  550. var batchedSub;
  551. var batchedComputed;
  552. function batch(sub, isComputed = false) {
  553. sub.flags |= 8;
  554. if (isComputed) {
  555. sub.next = batchedComputed;
  556. batchedComputed = sub;
  557. return;
  558. }
  559. sub.next = batchedSub;
  560. batchedSub = sub;
  561. }
  562. function startBatch() {
  563. batchDepth++;
  564. }
  565. function endBatch() {
  566. if (--batchDepth > 0) {
  567. return;
  568. }
  569. if (batchedComputed) {
  570. let e = batchedComputed;
  571. batchedComputed = void 0;
  572. while (e) {
  573. const next = e.next;
  574. e.next = void 0;
  575. e.flags &= -9;
  576. e = next;
  577. }
  578. }
  579. let error;
  580. while (batchedSub) {
  581. let e = batchedSub;
  582. batchedSub = void 0;
  583. while (e) {
  584. const next = e.next;
  585. e.next = void 0;
  586. e.flags &= -9;
  587. if (e.flags & 1) {
  588. try {
  589. ;
  590. e.trigger();
  591. } catch (err) {
  592. if (!error) error = err;
  593. }
  594. }
  595. e = next;
  596. }
  597. }
  598. if (error) throw error;
  599. }
  600. function prepareDeps(sub) {
  601. for (let link = sub.deps; link; link = link.nextDep) {
  602. link.version = -1;
  603. link.prevActiveLink = link.dep.activeLink;
  604. link.dep.activeLink = link;
  605. }
  606. }
  607. function cleanupDeps(sub) {
  608. let head;
  609. let tail = sub.depsTail;
  610. let link = tail;
  611. while (link) {
  612. const prev = link.prevDep;
  613. if (link.version === -1) {
  614. if (link === tail) tail = prev;
  615. removeSub(link);
  616. removeDep(link);
  617. } else {
  618. head = link;
  619. }
  620. link.dep.activeLink = link.prevActiveLink;
  621. link.prevActiveLink = void 0;
  622. link = prev;
  623. }
  624. sub.deps = head;
  625. sub.depsTail = tail;
  626. }
  627. function isDirty(sub) {
  628. for (let link = sub.deps; link; link = link.nextDep) {
  629. if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
  630. return true;
  631. }
  632. }
  633. if (sub._dirty) {
  634. return true;
  635. }
  636. return false;
  637. }
  638. function refreshComputed(computed3) {
  639. if (computed3.flags & 4 && !(computed3.flags & 16)) {
  640. return;
  641. }
  642. computed3.flags &= -17;
  643. if (computed3.globalVersion === globalVersion) {
  644. return;
  645. }
  646. computed3.globalVersion = globalVersion;
  647. if (!computed3.isSSR && computed3.flags & 128 && (!computed3.deps && !computed3._dirty || !isDirty(computed3))) {
  648. return;
  649. }
  650. computed3.flags |= 2;
  651. const dep = computed3.dep;
  652. const prevSub = activeSub;
  653. const prevShouldTrack = shouldTrack;
  654. activeSub = computed3;
  655. shouldTrack = true;
  656. try {
  657. prepareDeps(computed3);
  658. const value = computed3.fn(computed3._value);
  659. if (dep.version === 0 || hasChanged(value, computed3._value)) {
  660. computed3.flags |= 128;
  661. computed3._value = value;
  662. dep.version++;
  663. }
  664. } catch (err) {
  665. dep.version++;
  666. throw err;
  667. } finally {
  668. activeSub = prevSub;
  669. shouldTrack = prevShouldTrack;
  670. cleanupDeps(computed3);
  671. computed3.flags &= -3;
  672. }
  673. }
  674. function removeSub(link, soft = false) {
  675. const { dep, prevSub, nextSub } = link;
  676. if (prevSub) {
  677. prevSub.nextSub = nextSub;
  678. link.prevSub = void 0;
  679. }
  680. if (nextSub) {
  681. nextSub.prevSub = prevSub;
  682. link.nextSub = void 0;
  683. }
  684. if (dep.subsHead === link) {
  685. dep.subsHead = nextSub;
  686. }
  687. if (dep.subs === link) {
  688. dep.subs = prevSub;
  689. if (!prevSub && dep.computed) {
  690. dep.computed.flags &= -5;
  691. for (let l = dep.computed.deps; l; l = l.nextDep) {
  692. removeSub(l, true);
  693. }
  694. }
  695. }
  696. if (!soft && !--dep.sc && dep.map) {
  697. dep.map.delete(dep.key);
  698. }
  699. }
  700. function removeDep(link) {
  701. const { prevDep, nextDep } = link;
  702. if (prevDep) {
  703. prevDep.nextDep = nextDep;
  704. link.prevDep = void 0;
  705. }
  706. if (nextDep) {
  707. nextDep.prevDep = prevDep;
  708. link.nextDep = void 0;
  709. }
  710. }
  711. function effect(fn, options) {
  712. if (fn.effect instanceof ReactiveEffect) {
  713. fn = fn.effect.fn;
  714. }
  715. const e = new ReactiveEffect(fn);
  716. if (options) {
  717. extend(e, options);
  718. }
  719. try {
  720. e.run();
  721. } catch (err) {
  722. e.stop();
  723. throw err;
  724. }
  725. const runner = e.run.bind(e);
  726. runner.effect = e;
  727. return runner;
  728. }
  729. function stop(runner) {
  730. runner.effect.stop();
  731. }
  732. var shouldTrack = true;
  733. var trackStack = [];
  734. function pauseTracking() {
  735. trackStack.push(shouldTrack);
  736. shouldTrack = false;
  737. }
  738. function resetTracking() {
  739. const last = trackStack.pop();
  740. shouldTrack = last === void 0 ? true : last;
  741. }
  742. function cleanupEffect(e) {
  743. const { cleanup } = e;
  744. e.cleanup = void 0;
  745. if (cleanup) {
  746. const prevSub = activeSub;
  747. activeSub = void 0;
  748. try {
  749. cleanup();
  750. } finally {
  751. activeSub = prevSub;
  752. }
  753. }
  754. }
  755. var globalVersion = 0;
  756. var Link = class {
  757. constructor(sub, dep) {
  758. this.sub = sub;
  759. this.dep = dep;
  760. this.version = dep.version;
  761. this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  762. }
  763. };
  764. var Dep = class {
  765. // TODO isolatedDeclarations "__v_skip"
  766. constructor(computed3) {
  767. this.computed = computed3;
  768. this.version = 0;
  769. this.activeLink = void 0;
  770. this.subs = void 0;
  771. this.map = void 0;
  772. this.key = void 0;
  773. this.sc = 0;
  774. this.__v_skip = true;
  775. if (true) {
  776. this.subsHead = void 0;
  777. }
  778. }
  779. track(debugInfo) {
  780. if (!activeSub || !shouldTrack || activeSub === this.computed) {
  781. return;
  782. }
  783. let link = this.activeLink;
  784. if (link === void 0 || link.sub !== activeSub) {
  785. link = this.activeLink = new Link(activeSub, this);
  786. if (!activeSub.deps) {
  787. activeSub.deps = activeSub.depsTail = link;
  788. } else {
  789. link.prevDep = activeSub.depsTail;
  790. activeSub.depsTail.nextDep = link;
  791. activeSub.depsTail = link;
  792. }
  793. addSub(link);
  794. } else if (link.version === -1) {
  795. link.version = this.version;
  796. if (link.nextDep) {
  797. const next = link.nextDep;
  798. next.prevDep = link.prevDep;
  799. if (link.prevDep) {
  800. link.prevDep.nextDep = next;
  801. }
  802. link.prevDep = activeSub.depsTail;
  803. link.nextDep = void 0;
  804. activeSub.depsTail.nextDep = link;
  805. activeSub.depsTail = link;
  806. if (activeSub.deps === link) {
  807. activeSub.deps = next;
  808. }
  809. }
  810. }
  811. if (activeSub.onTrack) {
  812. activeSub.onTrack(
  813. extend(
  814. {
  815. effect: activeSub
  816. },
  817. debugInfo
  818. )
  819. );
  820. }
  821. return link;
  822. }
  823. trigger(debugInfo) {
  824. this.version++;
  825. globalVersion++;
  826. this.notify(debugInfo);
  827. }
  828. notify(debugInfo) {
  829. startBatch();
  830. try {
  831. if (true) {
  832. for (let head = this.subsHead; head; head = head.nextSub) {
  833. if (head.sub.onTrigger && !(head.sub.flags & 8)) {
  834. head.sub.onTrigger(
  835. extend(
  836. {
  837. effect: head.sub
  838. },
  839. debugInfo
  840. )
  841. );
  842. }
  843. }
  844. }
  845. for (let link = this.subs; link; link = link.prevSub) {
  846. if (link.sub.notify()) {
  847. ;
  848. link.sub.dep.notify();
  849. }
  850. }
  851. } finally {
  852. endBatch();
  853. }
  854. }
  855. };
  856. function addSub(link) {
  857. link.dep.sc++;
  858. if (link.sub.flags & 4) {
  859. const computed3 = link.dep.computed;
  860. if (computed3 && !link.dep.subs) {
  861. computed3.flags |= 4 | 16;
  862. for (let l = computed3.deps; l; l = l.nextDep) {
  863. addSub(l);
  864. }
  865. }
  866. const currentTail = link.dep.subs;
  867. if (currentTail !== link) {
  868. link.prevSub = currentTail;
  869. if (currentTail) currentTail.nextSub = link;
  870. }
  871. if (link.dep.subsHead === void 0) {
  872. link.dep.subsHead = link;
  873. }
  874. link.dep.subs = link;
  875. }
  876. }
  877. var targetMap = /* @__PURE__ */ new WeakMap();
  878. var ITERATE_KEY = Symbol(
  879. true ? "Object iterate" : ""
  880. );
  881. var MAP_KEY_ITERATE_KEY = Symbol(
  882. true ? "Map keys iterate" : ""
  883. );
  884. var ARRAY_ITERATE_KEY = Symbol(
  885. true ? "Array iterate" : ""
  886. );
  887. function track(target, type, key) {
  888. if (shouldTrack && activeSub) {
  889. let depsMap = targetMap.get(target);
  890. if (!depsMap) {
  891. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  892. }
  893. let dep = depsMap.get(key);
  894. if (!dep) {
  895. depsMap.set(key, dep = new Dep());
  896. dep.map = depsMap;
  897. dep.key = key;
  898. }
  899. if (true) {
  900. dep.track({
  901. target,
  902. type,
  903. key
  904. });
  905. } else {
  906. dep.track();
  907. }
  908. }
  909. }
  910. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  911. const depsMap = targetMap.get(target);
  912. if (!depsMap) {
  913. globalVersion++;
  914. return;
  915. }
  916. const run = (dep) => {
  917. if (dep) {
  918. if (true) {
  919. dep.trigger({
  920. target,
  921. type,
  922. key,
  923. newValue,
  924. oldValue,
  925. oldTarget
  926. });
  927. } else {
  928. dep.trigger();
  929. }
  930. }
  931. };
  932. startBatch();
  933. if (type === "clear") {
  934. depsMap.forEach(run);
  935. } else {
  936. const targetIsArray = isArray(target);
  937. const isArrayIndex = targetIsArray && isIntegerKey(key);
  938. if (targetIsArray && key === "length") {
  939. const newLength = Number(newValue);
  940. depsMap.forEach((dep, key2) => {
  941. if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
  942. run(dep);
  943. }
  944. });
  945. } else {
  946. if (key !== void 0 || depsMap.has(void 0)) {
  947. run(depsMap.get(key));
  948. }
  949. if (isArrayIndex) {
  950. run(depsMap.get(ARRAY_ITERATE_KEY));
  951. }
  952. switch (type) {
  953. case "add":
  954. if (!targetIsArray) {
  955. run(depsMap.get(ITERATE_KEY));
  956. if (isMap(target)) {
  957. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  958. }
  959. } else if (isArrayIndex) {
  960. run(depsMap.get("length"));
  961. }
  962. break;
  963. case "delete":
  964. if (!targetIsArray) {
  965. run(depsMap.get(ITERATE_KEY));
  966. if (isMap(target)) {
  967. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  968. }
  969. }
  970. break;
  971. case "set":
  972. if (isMap(target)) {
  973. run(depsMap.get(ITERATE_KEY));
  974. }
  975. break;
  976. }
  977. }
  978. }
  979. endBatch();
  980. }
  981. function getDepFromReactive(object, key) {
  982. const depMap = targetMap.get(object);
  983. return depMap && depMap.get(key);
  984. }
  985. function reactiveReadArray(array) {
  986. const raw = toRaw(array);
  987. if (raw === array) return raw;
  988. track(raw, "iterate", ARRAY_ITERATE_KEY);
  989. return isShallow(array) ? raw : raw.map(toReactive);
  990. }
  991. function shallowReadArray(arr) {
  992. track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
  993. return arr;
  994. }
  995. var arrayInstrumentations = {
  996. __proto__: null,
  997. [Symbol.iterator]() {
  998. return iterator(this, Symbol.iterator, toReactive);
  999. },
  1000. concat(...args) {
  1001. return reactiveReadArray(this).concat(
  1002. ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
  1003. );
  1004. },
  1005. entries() {
  1006. return iterator(this, "entries", (value) => {
  1007. value[1] = toReactive(value[1]);
  1008. return value;
  1009. });
  1010. },
  1011. every(fn, thisArg) {
  1012. return apply(this, "every", fn, thisArg, void 0, arguments);
  1013. },
  1014. filter(fn, thisArg) {
  1015. return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
  1016. },
  1017. find(fn, thisArg) {
  1018. return apply(this, "find", fn, thisArg, toReactive, arguments);
  1019. },
  1020. findIndex(fn, thisArg) {
  1021. return apply(this, "findIndex", fn, thisArg, void 0, arguments);
  1022. },
  1023. findLast(fn, thisArg) {
  1024. return apply(this, "findLast", fn, thisArg, toReactive, arguments);
  1025. },
  1026. findLastIndex(fn, thisArg) {
  1027. return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
  1028. },
  1029. // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  1030. forEach(fn, thisArg) {
  1031. return apply(this, "forEach", fn, thisArg, void 0, arguments);
  1032. },
  1033. includes(...args) {
  1034. return searchProxy(this, "includes", args);
  1035. },
  1036. indexOf(...args) {
  1037. return searchProxy(this, "indexOf", args);
  1038. },
  1039. join(separator) {
  1040. return reactiveReadArray(this).join(separator);
  1041. },
  1042. // keys() iterator only reads `length`, no optimization required
  1043. lastIndexOf(...args) {
  1044. return searchProxy(this, "lastIndexOf", args);
  1045. },
  1046. map(fn, thisArg) {
  1047. return apply(this, "map", fn, thisArg, void 0, arguments);
  1048. },
  1049. pop() {
  1050. return noTracking(this, "pop");
  1051. },
  1052. push(...args) {
  1053. return noTracking(this, "push", args);
  1054. },
  1055. reduce(fn, ...args) {
  1056. return reduce(this, "reduce", fn, args);
  1057. },
  1058. reduceRight(fn, ...args) {
  1059. return reduce(this, "reduceRight", fn, args);
  1060. },
  1061. shift() {
  1062. return noTracking(this, "shift");
  1063. },
  1064. // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  1065. some(fn, thisArg) {
  1066. return apply(this, "some", fn, thisArg, void 0, arguments);
  1067. },
  1068. splice(...args) {
  1069. return noTracking(this, "splice", args);
  1070. },
  1071. toReversed() {
  1072. return reactiveReadArray(this).toReversed();
  1073. },
  1074. toSorted(comparer) {
  1075. return reactiveReadArray(this).toSorted(comparer);
  1076. },
  1077. toSpliced(...args) {
  1078. return reactiveReadArray(this).toSpliced(...args);
  1079. },
  1080. unshift(...args) {
  1081. return noTracking(this, "unshift", args);
  1082. },
  1083. values() {
  1084. return iterator(this, "values", toReactive);
  1085. }
  1086. };
  1087. function iterator(self2, method, wrapValue) {
  1088. const arr = shallowReadArray(self2);
  1089. const iter = arr[method]();
  1090. if (arr !== self2 && !isShallow(self2)) {
  1091. iter._next = iter.next;
  1092. iter.next = () => {
  1093. const result = iter._next();
  1094. if (result.value) {
  1095. result.value = wrapValue(result.value);
  1096. }
  1097. return result;
  1098. };
  1099. }
  1100. return iter;
  1101. }
  1102. var arrayProto = Array.prototype;
  1103. function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
  1104. const arr = shallowReadArray(self2);
  1105. const needsWrap = arr !== self2 && !isShallow(self2);
  1106. const methodFn = arr[method];
  1107. if (methodFn !== arrayProto[method]) {
  1108. const result2 = methodFn.apply(self2, args);
  1109. return needsWrap ? toReactive(result2) : result2;
  1110. }
  1111. let wrappedFn = fn;
  1112. if (arr !== self2) {
  1113. if (needsWrap) {
  1114. wrappedFn = function(item, index) {
  1115. return fn.call(this, toReactive(item), index, self2);
  1116. };
  1117. } else if (fn.length > 2) {
  1118. wrappedFn = function(item, index) {
  1119. return fn.call(this, item, index, self2);
  1120. };
  1121. }
  1122. }
  1123. const result = methodFn.call(arr, wrappedFn, thisArg);
  1124. return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
  1125. }
  1126. function reduce(self2, method, fn, args) {
  1127. const arr = shallowReadArray(self2);
  1128. let wrappedFn = fn;
  1129. if (arr !== self2) {
  1130. if (!isShallow(self2)) {
  1131. wrappedFn = function(acc, item, index) {
  1132. return fn.call(this, acc, toReactive(item), index, self2);
  1133. };
  1134. } else if (fn.length > 3) {
  1135. wrappedFn = function(acc, item, index) {
  1136. return fn.call(this, acc, item, index, self2);
  1137. };
  1138. }
  1139. }
  1140. return arr[method](wrappedFn, ...args);
  1141. }
  1142. function searchProxy(self2, method, args) {
  1143. const arr = toRaw(self2);
  1144. track(arr, "iterate", ARRAY_ITERATE_KEY);
  1145. const res = arr[method](...args);
  1146. if ((res === -1 || res === false) && isProxy(args[0])) {
  1147. args[0] = toRaw(args[0]);
  1148. return arr[method](...args);
  1149. }
  1150. return res;
  1151. }
  1152. function noTracking(self2, method, args = []) {
  1153. pauseTracking();
  1154. startBatch();
  1155. const res = toRaw(self2)[method].apply(self2, args);
  1156. endBatch();
  1157. resetTracking();
  1158. return res;
  1159. }
  1160. var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
  1161. var builtInSymbols = new Set(
  1162. Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  1163. );
  1164. function hasOwnProperty2(key) {
  1165. if (!isSymbol(key)) key = String(key);
  1166. const obj = toRaw(this);
  1167. track(obj, "has", key);
  1168. return obj.hasOwnProperty(key);
  1169. }
  1170. var BaseReactiveHandler = class {
  1171. constructor(_isReadonly = false, _isShallow = false) {
  1172. this._isReadonly = _isReadonly;
  1173. this._isShallow = _isShallow;
  1174. }
  1175. get(target, key, receiver) {
  1176. if (key === "__v_skip") return target["__v_skip"];
  1177. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  1178. if (key === "__v_isReactive") {
  1179. return !isReadonly2;
  1180. } else if (key === "__v_isReadonly") {
  1181. return isReadonly2;
  1182. } else if (key === "__v_isShallow") {
  1183. return isShallow2;
  1184. } else if (key === "__v_raw") {
  1185. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  1186. // this means the receiver is a user proxy of the reactive proxy
  1187. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  1188. return target;
  1189. }
  1190. return;
  1191. }
  1192. const targetIsArray = isArray(target);
  1193. if (!isReadonly2) {
  1194. let fn;
  1195. if (targetIsArray && (fn = arrayInstrumentations[key])) {
  1196. return fn;
  1197. }
  1198. if (key === "hasOwnProperty") {
  1199. return hasOwnProperty2;
  1200. }
  1201. }
  1202. const res = Reflect.get(
  1203. target,
  1204. key,
  1205. // if this is a proxy wrapping a ref, return methods using the raw ref
  1206. // as receiver so that we don't have to call `toRaw` on the ref in all
  1207. // its class methods
  1208. isRef2(target) ? target : receiver
  1209. );
  1210. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1211. return res;
  1212. }
  1213. if (!isReadonly2) {
  1214. track(target, "get", key);
  1215. }
  1216. if (isShallow2) {
  1217. return res;
  1218. }
  1219. if (isRef2(res)) {
  1220. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1221. }
  1222. if (isObject(res)) {
  1223. return isReadonly2 ? readonly(res) : reactive(res);
  1224. }
  1225. return res;
  1226. }
  1227. };
  1228. var MutableReactiveHandler = class extends BaseReactiveHandler {
  1229. constructor(isShallow2 = false) {
  1230. super(false, isShallow2);
  1231. }
  1232. set(target, key, value, receiver) {
  1233. let oldValue = target[key];
  1234. if (!this._isShallow) {
  1235. const isOldValueReadonly = isReadonly(oldValue);
  1236. if (!isShallow(value) && !isReadonly(value)) {
  1237. oldValue = toRaw(oldValue);
  1238. value = toRaw(value);
  1239. }
  1240. if (!isArray(target) && isRef2(oldValue) && !isRef2(value)) {
  1241. if (isOldValueReadonly) {
  1242. if (true) {
  1243. warn(
  1244. `Set operation on key "${String(key)}" failed: target is readonly.`,
  1245. target[key]
  1246. );
  1247. }
  1248. return true;
  1249. } else {
  1250. oldValue.value = value;
  1251. return true;
  1252. }
  1253. }
  1254. }
  1255. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1256. const result = Reflect.set(
  1257. target,
  1258. key,
  1259. value,
  1260. isRef2(target) ? target : receiver
  1261. );
  1262. if (target === toRaw(receiver)) {
  1263. if (!hadKey) {
  1264. trigger(target, "add", key, value);
  1265. } else if (hasChanged(value, oldValue)) {
  1266. trigger(target, "set", key, value, oldValue);
  1267. }
  1268. }
  1269. return result;
  1270. }
  1271. deleteProperty(target, key) {
  1272. const hadKey = hasOwn(target, key);
  1273. const oldValue = target[key];
  1274. const result = Reflect.deleteProperty(target, key);
  1275. if (result && hadKey) {
  1276. trigger(target, "delete", key, void 0, oldValue);
  1277. }
  1278. return result;
  1279. }
  1280. has(target, key) {
  1281. const result = Reflect.has(target, key);
  1282. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  1283. track(target, "has", key);
  1284. }
  1285. return result;
  1286. }
  1287. ownKeys(target) {
  1288. track(
  1289. target,
  1290. "iterate",
  1291. isArray(target) ? "length" : ITERATE_KEY
  1292. );
  1293. return Reflect.ownKeys(target);
  1294. }
  1295. };
  1296. var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  1297. constructor(isShallow2 = false) {
  1298. super(true, isShallow2);
  1299. }
  1300. set(target, key) {
  1301. if (true) {
  1302. warn(
  1303. `Set operation on key "${String(key)}" failed: target is readonly.`,
  1304. target
  1305. );
  1306. }
  1307. return true;
  1308. }
  1309. deleteProperty(target, key) {
  1310. if (true) {
  1311. warn(
  1312. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  1313. target
  1314. );
  1315. }
  1316. return true;
  1317. }
  1318. };
  1319. var mutableHandlers = new MutableReactiveHandler();
  1320. var readonlyHandlers = new ReadonlyReactiveHandler();
  1321. var shallowReactiveHandlers = new MutableReactiveHandler(true);
  1322. var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
  1323. var toShallow = (value) => value;
  1324. var getProto = (v) => Reflect.getPrototypeOf(v);
  1325. function createIterableMethod(method, isReadonly2, isShallow2) {
  1326. return function(...args) {
  1327. const target = this["__v_raw"];
  1328. const rawTarget = toRaw(target);
  1329. const targetIsMap = isMap(rawTarget);
  1330. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  1331. const isKeyOnly = method === "keys" && targetIsMap;
  1332. const innerIterator = target[method](...args);
  1333. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1334. !isReadonly2 && track(
  1335. rawTarget,
  1336. "iterate",
  1337. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  1338. );
  1339. return {
  1340. // iterator protocol
  1341. next() {
  1342. const { value, done } = innerIterator.next();
  1343. return done ? { value, done } : {
  1344. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  1345. done
  1346. };
  1347. },
  1348. // iterable protocol
  1349. [Symbol.iterator]() {
  1350. return this;
  1351. }
  1352. };
  1353. };
  1354. }
  1355. function createReadonlyMethod(type) {
  1356. return function(...args) {
  1357. if (true) {
  1358. const key = args[0] ? `on key "${args[0]}" ` : ``;
  1359. warn(
  1360. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  1361. toRaw(this)
  1362. );
  1363. }
  1364. return type === "delete" ? false : type === "clear" ? void 0 : this;
  1365. };
  1366. }
  1367. function createInstrumentations(readonly2, shallow) {
  1368. const instrumentations = {
  1369. get(key) {
  1370. const target = this["__v_raw"];
  1371. const rawTarget = toRaw(target);
  1372. const rawKey = toRaw(key);
  1373. if (!readonly2) {
  1374. if (hasChanged(key, rawKey)) {
  1375. track(rawTarget, "get", key);
  1376. }
  1377. track(rawTarget, "get", rawKey);
  1378. }
  1379. const { has } = getProto(rawTarget);
  1380. const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
  1381. if (has.call(rawTarget, key)) {
  1382. return wrap(target.get(key));
  1383. } else if (has.call(rawTarget, rawKey)) {
  1384. return wrap(target.get(rawKey));
  1385. } else if (target !== rawTarget) {
  1386. target.get(key);
  1387. }
  1388. },
  1389. get size() {
  1390. const target = this["__v_raw"];
  1391. !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  1392. return target.size;
  1393. },
  1394. has(key) {
  1395. const target = this["__v_raw"];
  1396. const rawTarget = toRaw(target);
  1397. const rawKey = toRaw(key);
  1398. if (!readonly2) {
  1399. if (hasChanged(key, rawKey)) {
  1400. track(rawTarget, "has", key);
  1401. }
  1402. track(rawTarget, "has", rawKey);
  1403. }
  1404. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  1405. },
  1406. forEach(callback, thisArg) {
  1407. const observed = this;
  1408. const target = observed["__v_raw"];
  1409. const rawTarget = toRaw(target);
  1410. const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
  1411. !readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  1412. return target.forEach((value, key) => {
  1413. return callback.call(thisArg, wrap(value), wrap(key), observed);
  1414. });
  1415. }
  1416. };
  1417. extend(
  1418. instrumentations,
  1419. readonly2 ? {
  1420. add: createReadonlyMethod("add"),
  1421. set: createReadonlyMethod("set"),
  1422. delete: createReadonlyMethod("delete"),
  1423. clear: createReadonlyMethod("clear")
  1424. } : {
  1425. add(value) {
  1426. if (!shallow && !isShallow(value) && !isReadonly(value)) {
  1427. value = toRaw(value);
  1428. }
  1429. const target = toRaw(this);
  1430. const proto = getProto(target);
  1431. const hadKey = proto.has.call(target, value);
  1432. if (!hadKey) {
  1433. target.add(value);
  1434. trigger(target, "add", value, value);
  1435. }
  1436. return this;
  1437. },
  1438. set(key, value) {
  1439. if (!shallow && !isShallow(value) && !isReadonly(value)) {
  1440. value = toRaw(value);
  1441. }
  1442. const target = toRaw(this);
  1443. const { has, get } = getProto(target);
  1444. let hadKey = has.call(target, key);
  1445. if (!hadKey) {
  1446. key = toRaw(key);
  1447. hadKey = has.call(target, key);
  1448. } else if (true) {
  1449. checkIdentityKeys(target, has, key);
  1450. }
  1451. const oldValue = get.call(target, key);
  1452. target.set(key, value);
  1453. if (!hadKey) {
  1454. trigger(target, "add", key, value);
  1455. } else if (hasChanged(value, oldValue)) {
  1456. trigger(target, "set", key, value, oldValue);
  1457. }
  1458. return this;
  1459. },
  1460. delete(key) {
  1461. const target = toRaw(this);
  1462. const { has, get } = getProto(target);
  1463. let hadKey = has.call(target, key);
  1464. if (!hadKey) {
  1465. key = toRaw(key);
  1466. hadKey = has.call(target, key);
  1467. } else if (true) {
  1468. checkIdentityKeys(target, has, key);
  1469. }
  1470. const oldValue = get ? get.call(target, key) : void 0;
  1471. const result = target.delete(key);
  1472. if (hadKey) {
  1473. trigger(target, "delete", key, void 0, oldValue);
  1474. }
  1475. return result;
  1476. },
  1477. clear() {
  1478. const target = toRaw(this);
  1479. const hadItems = target.size !== 0;
  1480. const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
  1481. const result = target.clear();
  1482. if (hadItems) {
  1483. trigger(
  1484. target,
  1485. "clear",
  1486. void 0,
  1487. void 0,
  1488. oldTarget
  1489. );
  1490. }
  1491. return result;
  1492. }
  1493. }
  1494. );
  1495. const iteratorMethods = [
  1496. "keys",
  1497. "values",
  1498. "entries",
  1499. Symbol.iterator
  1500. ];
  1501. iteratorMethods.forEach((method) => {
  1502. instrumentations[method] = createIterableMethod(method, readonly2, shallow);
  1503. });
  1504. return instrumentations;
  1505. }
  1506. function createInstrumentationGetter(isReadonly2, shallow) {
  1507. const instrumentations = createInstrumentations(isReadonly2, shallow);
  1508. return (target, key, receiver) => {
  1509. if (key === "__v_isReactive") {
  1510. return !isReadonly2;
  1511. } else if (key === "__v_isReadonly") {
  1512. return isReadonly2;
  1513. } else if (key === "__v_raw") {
  1514. return target;
  1515. }
  1516. return Reflect.get(
  1517. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  1518. key,
  1519. receiver
  1520. );
  1521. };
  1522. }
  1523. var mutableCollectionHandlers = {
  1524. get: createInstrumentationGetter(false, false)
  1525. };
  1526. var shallowCollectionHandlers = {
  1527. get: createInstrumentationGetter(false, true)
  1528. };
  1529. var readonlyCollectionHandlers = {
  1530. get: createInstrumentationGetter(true, false)
  1531. };
  1532. var shallowReadonlyCollectionHandlers = {
  1533. get: createInstrumentationGetter(true, true)
  1534. };
  1535. function checkIdentityKeys(target, has, key) {
  1536. const rawKey = toRaw(key);
  1537. if (rawKey !== key && has.call(target, rawKey)) {
  1538. const type = toRawType(target);
  1539. warn(
  1540. `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.`
  1541. );
  1542. }
  1543. }
  1544. var reactiveMap = /* @__PURE__ */ new WeakMap();
  1545. var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1546. var readonlyMap = /* @__PURE__ */ new WeakMap();
  1547. var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1548. function targetTypeMap(rawType) {
  1549. switch (rawType) {
  1550. case "Object":
  1551. case "Array":
  1552. return 1;
  1553. case "Map":
  1554. case "Set":
  1555. case "WeakMap":
  1556. case "WeakSet":
  1557. return 2;
  1558. default:
  1559. return 0;
  1560. }
  1561. }
  1562. function getTargetType(value) {
  1563. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1564. }
  1565. function reactive(target) {
  1566. if (isReadonly(target)) {
  1567. return target;
  1568. }
  1569. return createReactiveObject(
  1570. target,
  1571. false,
  1572. mutableHandlers,
  1573. mutableCollectionHandlers,
  1574. reactiveMap
  1575. );
  1576. }
  1577. function shallowReactive(target) {
  1578. return createReactiveObject(
  1579. target,
  1580. false,
  1581. shallowReactiveHandlers,
  1582. shallowCollectionHandlers,
  1583. shallowReactiveMap
  1584. );
  1585. }
  1586. function readonly(target) {
  1587. return createReactiveObject(
  1588. target,
  1589. true,
  1590. readonlyHandlers,
  1591. readonlyCollectionHandlers,
  1592. readonlyMap
  1593. );
  1594. }
  1595. function shallowReadonly(target) {
  1596. return createReactiveObject(
  1597. target,
  1598. true,
  1599. shallowReadonlyHandlers,
  1600. shallowReadonlyCollectionHandlers,
  1601. shallowReadonlyMap
  1602. );
  1603. }
  1604. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1605. if (!isObject(target)) {
  1606. if (true) {
  1607. warn(
  1608. `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
  1609. target
  1610. )}`
  1611. );
  1612. }
  1613. return target;
  1614. }
  1615. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  1616. return target;
  1617. }
  1618. const targetType = getTargetType(target);
  1619. if (targetType === 0) {
  1620. return target;
  1621. }
  1622. const existingProxy = proxyMap.get(target);
  1623. if (existingProxy) {
  1624. return existingProxy;
  1625. }
  1626. const proxy = new Proxy(
  1627. target,
  1628. targetType === 2 ? collectionHandlers : baseHandlers
  1629. );
  1630. proxyMap.set(target, proxy);
  1631. return proxy;
  1632. }
  1633. function isReactive(value) {
  1634. if (isReadonly(value)) {
  1635. return isReactive(value["__v_raw"]);
  1636. }
  1637. return !!(value && value["__v_isReactive"]);
  1638. }
  1639. function isReadonly(value) {
  1640. return !!(value && value["__v_isReadonly"]);
  1641. }
  1642. function isShallow(value) {
  1643. return !!(value && value["__v_isShallow"]);
  1644. }
  1645. function isProxy(value) {
  1646. return value ? !!value["__v_raw"] : false;
  1647. }
  1648. function toRaw(observed) {
  1649. const raw = observed && observed["__v_raw"];
  1650. return raw ? toRaw(raw) : observed;
  1651. }
  1652. function markRaw(value) {
  1653. if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
  1654. def(value, "__v_skip", true);
  1655. }
  1656. return value;
  1657. }
  1658. var toReactive = (value) => isObject(value) ? reactive(value) : value;
  1659. var toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1660. function isRef2(r) {
  1661. return r ? r["__v_isRef"] === true : false;
  1662. }
  1663. function ref(value) {
  1664. return createRef(value, false);
  1665. }
  1666. function shallowRef(value) {
  1667. return createRef(value, true);
  1668. }
  1669. function createRef(rawValue, shallow) {
  1670. if (isRef2(rawValue)) {
  1671. return rawValue;
  1672. }
  1673. return new RefImpl(rawValue, shallow);
  1674. }
  1675. var RefImpl = class {
  1676. constructor(value, isShallow2) {
  1677. this.dep = new Dep();
  1678. this["__v_isRef"] = true;
  1679. this["__v_isShallow"] = false;
  1680. this._rawValue = isShallow2 ? value : toRaw(value);
  1681. this._value = isShallow2 ? value : toReactive(value);
  1682. this["__v_isShallow"] = isShallow2;
  1683. }
  1684. get value() {
  1685. if (true) {
  1686. this.dep.track({
  1687. target: this,
  1688. type: "get",
  1689. key: "value"
  1690. });
  1691. } else {
  1692. this.dep.track();
  1693. }
  1694. return this._value;
  1695. }
  1696. set value(newValue) {
  1697. const oldValue = this._rawValue;
  1698. const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
  1699. newValue = useDirectValue ? newValue : toRaw(newValue);
  1700. if (hasChanged(newValue, oldValue)) {
  1701. this._rawValue = newValue;
  1702. this._value = useDirectValue ? newValue : toReactive(newValue);
  1703. if (true) {
  1704. this.dep.trigger({
  1705. target: this,
  1706. type: "set",
  1707. key: "value",
  1708. newValue,
  1709. oldValue
  1710. });
  1711. } else {
  1712. this.dep.trigger();
  1713. }
  1714. }
  1715. }
  1716. };
  1717. function triggerRef(ref2) {
  1718. if (ref2.dep) {
  1719. if (true) {
  1720. ref2.dep.trigger({
  1721. target: ref2,
  1722. type: "set",
  1723. key: "value",
  1724. newValue: ref2._value
  1725. });
  1726. } else {
  1727. ref2.dep.trigger();
  1728. }
  1729. }
  1730. }
  1731. function unref(ref2) {
  1732. return isRef2(ref2) ? ref2.value : ref2;
  1733. }
  1734. function toValue(source) {
  1735. return isFunction(source) ? source() : unref(source);
  1736. }
  1737. var shallowUnwrapHandlers = {
  1738. get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
  1739. set: (target, key, value, receiver) => {
  1740. const oldValue = target[key];
  1741. if (isRef2(oldValue) && !isRef2(value)) {
  1742. oldValue.value = value;
  1743. return true;
  1744. } else {
  1745. return Reflect.set(target, key, value, receiver);
  1746. }
  1747. }
  1748. };
  1749. function proxyRefs(objectWithRefs) {
  1750. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1751. }
  1752. var CustomRefImpl = class {
  1753. constructor(factory) {
  1754. this["__v_isRef"] = true;
  1755. this._value = void 0;
  1756. const dep = this.dep = new Dep();
  1757. const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
  1758. this._get = get;
  1759. this._set = set;
  1760. }
  1761. get value() {
  1762. return this._value = this._get();
  1763. }
  1764. set value(newVal) {
  1765. this._set(newVal);
  1766. }
  1767. };
  1768. function customRef(factory) {
  1769. return new CustomRefImpl(factory);
  1770. }
  1771. function toRefs(object) {
  1772. if (!isProxy(object)) {
  1773. warn(`toRefs() expects a reactive object but received a plain one.`);
  1774. }
  1775. const ret = isArray(object) ? new Array(object.length) : {};
  1776. for (const key in object) {
  1777. ret[key] = propertyToRef(object, key);
  1778. }
  1779. return ret;
  1780. }
  1781. var ObjectRefImpl = class {
  1782. constructor(_object, _key, _defaultValue) {
  1783. this._object = _object;
  1784. this._key = _key;
  1785. this._defaultValue = _defaultValue;
  1786. this["__v_isRef"] = true;
  1787. this._value = void 0;
  1788. }
  1789. get value() {
  1790. const val = this._object[this._key];
  1791. return this._value = val === void 0 ? this._defaultValue : val;
  1792. }
  1793. set value(newVal) {
  1794. this._object[this._key] = newVal;
  1795. }
  1796. get dep() {
  1797. return getDepFromReactive(toRaw(this._object), this._key);
  1798. }
  1799. };
  1800. var GetterRefImpl = class {
  1801. constructor(_getter) {
  1802. this._getter = _getter;
  1803. this["__v_isRef"] = true;
  1804. this["__v_isReadonly"] = true;
  1805. this._value = void 0;
  1806. }
  1807. get value() {
  1808. return this._value = this._getter();
  1809. }
  1810. };
  1811. function toRef(source, key, defaultValue) {
  1812. if (isRef2(source)) {
  1813. return source;
  1814. } else if (isFunction(source)) {
  1815. return new GetterRefImpl(source);
  1816. } else if (isObject(source) && arguments.length > 1) {
  1817. return propertyToRef(source, key, defaultValue);
  1818. } else {
  1819. return ref(source);
  1820. }
  1821. }
  1822. function propertyToRef(source, key, defaultValue) {
  1823. const val = source[key];
  1824. return isRef2(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1825. }
  1826. var ComputedRefImpl = class {
  1827. constructor(fn, setter, isSSR) {
  1828. this.fn = fn;
  1829. this.setter = setter;
  1830. this._value = void 0;
  1831. this.dep = new Dep(this);
  1832. this.__v_isRef = true;
  1833. this.deps = void 0;
  1834. this.depsTail = void 0;
  1835. this.flags = 16;
  1836. this.globalVersion = globalVersion - 1;
  1837. this.next = void 0;
  1838. this.effect = this;
  1839. this["__v_isReadonly"] = !setter;
  1840. this.isSSR = isSSR;
  1841. }
  1842. /**
  1843. * @internal
  1844. */
  1845. notify() {
  1846. this.flags |= 16;
  1847. if (!(this.flags & 8) && // avoid infinite self recursion
  1848. activeSub !== this) {
  1849. batch(this, true);
  1850. return true;
  1851. } else if (true) ;
  1852. }
  1853. get value() {
  1854. const link = true ? this.dep.track({
  1855. target: this,
  1856. type: "get",
  1857. key: "value"
  1858. }) : this.dep.track();
  1859. refreshComputed(this);
  1860. if (link) {
  1861. link.version = this.dep.version;
  1862. }
  1863. return this._value;
  1864. }
  1865. set value(newValue) {
  1866. if (this.setter) {
  1867. this.setter(newValue);
  1868. } else if (true) {
  1869. warn("Write operation failed: computed value is readonly");
  1870. }
  1871. }
  1872. };
  1873. function computed(getterOrOptions, debugOptions, isSSR = false) {
  1874. let getter;
  1875. let setter;
  1876. if (isFunction(getterOrOptions)) {
  1877. getter = getterOrOptions;
  1878. } else {
  1879. getter = getterOrOptions.get;
  1880. setter = getterOrOptions.set;
  1881. }
  1882. const cRef = new ComputedRefImpl(getter, setter, isSSR);
  1883. if (debugOptions && !isSSR) {
  1884. cRef.onTrack = debugOptions.onTrack;
  1885. cRef.onTrigger = debugOptions.onTrigger;
  1886. }
  1887. return cRef;
  1888. }
  1889. var TrackOpTypes = {
  1890. "GET": "get",
  1891. "HAS": "has",
  1892. "ITERATE": "iterate"
  1893. };
  1894. var TriggerOpTypes = {
  1895. "SET": "set",
  1896. "ADD": "add",
  1897. "DELETE": "delete",
  1898. "CLEAR": "clear"
  1899. };
  1900. var INITIAL_WATCHER_VALUE = {};
  1901. var cleanupMap = /* @__PURE__ */ new WeakMap();
  1902. var activeWatcher = void 0;
  1903. function getCurrentWatcher() {
  1904. return activeWatcher;
  1905. }
  1906. function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
  1907. if (owner) {
  1908. let cleanups = cleanupMap.get(owner);
  1909. if (!cleanups) cleanupMap.set(owner, cleanups = []);
  1910. cleanups.push(cleanupFn);
  1911. } else if (!failSilently) {
  1912. warn(
  1913. `onWatcherCleanup() was called when there was no active watcher to associate with.`
  1914. );
  1915. }
  1916. }
  1917. function watch(source, cb, options = EMPTY_OBJ) {
  1918. const { immediate, deep, once, scheduler, augmentJob, call } = options;
  1919. const warnInvalidSource = (s) => {
  1920. (options.onWarn || warn)(
  1921. `Invalid watch source: `,
  1922. s,
  1923. `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
  1924. );
  1925. };
  1926. const reactiveGetter = (source2) => {
  1927. if (deep) return source2;
  1928. if (isShallow(source2) || deep === false || deep === 0)
  1929. return traverse(source2, 1);
  1930. return traverse(source2);
  1931. };
  1932. let effect2;
  1933. let getter;
  1934. let cleanup;
  1935. let boundCleanup;
  1936. let forceTrigger = false;
  1937. let isMultiSource = false;
  1938. if (isRef2(source)) {
  1939. getter = () => source.value;
  1940. forceTrigger = isShallow(source);
  1941. } else if (isReactive(source)) {
  1942. getter = () => reactiveGetter(source);
  1943. forceTrigger = true;
  1944. } else if (isArray(source)) {
  1945. isMultiSource = true;
  1946. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  1947. getter = () => source.map((s) => {
  1948. if (isRef2(s)) {
  1949. return s.value;
  1950. } else if (isReactive(s)) {
  1951. return reactiveGetter(s);
  1952. } else if (isFunction(s)) {
  1953. return call ? call(s, 2) : s();
  1954. } else {
  1955. warnInvalidSource(s);
  1956. }
  1957. });
  1958. } else if (isFunction(source)) {
  1959. if (cb) {
  1960. getter = call ? () => call(source, 2) : source;
  1961. } else {
  1962. getter = () => {
  1963. if (cleanup) {
  1964. pauseTracking();
  1965. try {
  1966. cleanup();
  1967. } finally {
  1968. resetTracking();
  1969. }
  1970. }
  1971. const currentEffect = activeWatcher;
  1972. activeWatcher = effect2;
  1973. try {
  1974. return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
  1975. } finally {
  1976. activeWatcher = currentEffect;
  1977. }
  1978. };
  1979. }
  1980. } else {
  1981. getter = NOOP;
  1982. warnInvalidSource(source);
  1983. }
  1984. if (cb && deep) {
  1985. const baseGetter = getter;
  1986. const depth = deep === true ? Infinity : deep;
  1987. getter = () => traverse(baseGetter(), depth);
  1988. }
  1989. const scope = getCurrentScope();
  1990. const watchHandle = () => {
  1991. effect2.stop();
  1992. if (scope && scope.active) {
  1993. remove(scope.effects, effect2);
  1994. }
  1995. };
  1996. if (once && cb) {
  1997. const _cb = cb;
  1998. cb = (...args) => {
  1999. _cb(...args);
  2000. watchHandle();
  2001. };
  2002. }
  2003. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  2004. const job = (immediateFirstRun) => {
  2005. if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) {
  2006. return;
  2007. }
  2008. if (cb) {
  2009. const newValue = effect2.run();
  2010. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
  2011. if (cleanup) {
  2012. cleanup();
  2013. }
  2014. const currentWatcher = activeWatcher;
  2015. activeWatcher = effect2;
  2016. try {
  2017. const args = [
  2018. newValue,
  2019. // pass undefined as the old value when it's changed for the first time
  2020. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  2021. boundCleanup
  2022. ];
  2023. oldValue = newValue;
  2024. call ? call(cb, 3, args) : (
  2025. // @ts-expect-error
  2026. cb(...args)
  2027. );
  2028. } finally {
  2029. activeWatcher = currentWatcher;
  2030. }
  2031. }
  2032. } else {
  2033. effect2.run();
  2034. }
  2035. };
  2036. if (augmentJob) {
  2037. augmentJob(job);
  2038. }
  2039. effect2 = new ReactiveEffect(getter);
  2040. effect2.scheduler = scheduler ? () => scheduler(job, false) : job;
  2041. boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2);
  2042. cleanup = effect2.onStop = () => {
  2043. const cleanups = cleanupMap.get(effect2);
  2044. if (cleanups) {
  2045. if (call) {
  2046. call(cleanups, 4);
  2047. } else {
  2048. for (const cleanup2 of cleanups) cleanup2();
  2049. }
  2050. cleanupMap.delete(effect2);
  2051. }
  2052. };
  2053. if (true) {
  2054. effect2.onTrack = options.onTrack;
  2055. effect2.onTrigger = options.onTrigger;
  2056. }
  2057. if (cb) {
  2058. if (immediate) {
  2059. job(true);
  2060. } else {
  2061. oldValue = effect2.run();
  2062. }
  2063. } else if (scheduler) {
  2064. scheduler(job.bind(null, true), true);
  2065. } else {
  2066. effect2.run();
  2067. }
  2068. watchHandle.pause = effect2.pause.bind(effect2);
  2069. watchHandle.resume = effect2.resume.bind(effect2);
  2070. watchHandle.stop = watchHandle;
  2071. return watchHandle;
  2072. }
  2073. function traverse(value, depth = Infinity, seen) {
  2074. if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
  2075. return value;
  2076. }
  2077. seen = seen || /* @__PURE__ */ new Map();
  2078. if ((seen.get(value) || 0) >= depth) {
  2079. return value;
  2080. }
  2081. seen.set(value, depth);
  2082. depth--;
  2083. if (isRef2(value)) {
  2084. traverse(value.value, depth, seen);
  2085. } else if (isArray(value)) {
  2086. for (let i = 0; i < value.length; i++) {
  2087. traverse(value[i], depth, seen);
  2088. }
  2089. } else if (isSet(value) || isMap(value)) {
  2090. value.forEach((v) => {
  2091. traverse(v, depth, seen);
  2092. });
  2093. } else if (isPlainObject(value)) {
  2094. for (const key in value) {
  2095. traverse(value[key], depth, seen);
  2096. }
  2097. for (const key of Object.getOwnPropertySymbols(value)) {
  2098. if (Object.prototype.propertyIsEnumerable.call(value, key)) {
  2099. traverse(value[key], depth, seen);
  2100. }
  2101. }
  2102. }
  2103. return value;
  2104. }
  2105. // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  2106. var stack = [];
  2107. function pushWarningContext(vnode) {
  2108. stack.push(vnode);
  2109. }
  2110. function popWarningContext() {
  2111. stack.pop();
  2112. }
  2113. var isWarning = false;
  2114. function warn$1(msg, ...args) {
  2115. if (isWarning) return;
  2116. isWarning = true;
  2117. pauseTracking();
  2118. const instance = stack.length ? stack[stack.length - 1].component : null;
  2119. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2120. const trace = getComponentTrace();
  2121. if (appWarnHandler) {
  2122. callWithErrorHandling(
  2123. appWarnHandler,
  2124. instance,
  2125. 11,
  2126. [
  2127. // eslint-disable-next-line no-restricted-syntax
  2128. msg + args.map((a) => {
  2129. var _a, _b;
  2130. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  2131. }).join(""),
  2132. instance && instance.proxy,
  2133. trace.map(
  2134. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  2135. ).join("\n"),
  2136. trace
  2137. ]
  2138. );
  2139. } else {
  2140. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2141. if (trace.length && // avoid spamming console during tests
  2142. true) {
  2143. warnArgs.push(`
  2144. `, ...formatTrace(trace));
  2145. }
  2146. console.warn(...warnArgs);
  2147. }
  2148. resetTracking();
  2149. isWarning = false;
  2150. }
  2151. function getComponentTrace() {
  2152. let currentVNode = stack[stack.length - 1];
  2153. if (!currentVNode) {
  2154. return [];
  2155. }
  2156. const normalizedStack = [];
  2157. while (currentVNode) {
  2158. const last = normalizedStack[0];
  2159. if (last && last.vnode === currentVNode) {
  2160. last.recurseCount++;
  2161. } else {
  2162. normalizedStack.push({
  2163. vnode: currentVNode,
  2164. recurseCount: 0
  2165. });
  2166. }
  2167. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2168. currentVNode = parentInstance && parentInstance.vnode;
  2169. }
  2170. return normalizedStack;
  2171. }
  2172. function formatTrace(trace) {
  2173. const logs = [];
  2174. trace.forEach((entry, i) => {
  2175. logs.push(...i === 0 ? [] : [`
  2176. `], ...formatTraceEntry(entry));
  2177. });
  2178. return logs;
  2179. }
  2180. function formatTraceEntry({ vnode, recurseCount }) {
  2181. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2182. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2183. const open = ` at <${formatComponentName(
  2184. vnode.component,
  2185. vnode.type,
  2186. isRoot
  2187. )}`;
  2188. const close = `>` + postfix;
  2189. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2190. }
  2191. function formatProps(props) {
  2192. const res = [];
  2193. const keys = Object.keys(props);
  2194. keys.slice(0, 3).forEach((key) => {
  2195. res.push(...formatProp(key, props[key]));
  2196. });
  2197. if (keys.length > 3) {
  2198. res.push(` ...`);
  2199. }
  2200. return res;
  2201. }
  2202. function formatProp(key, value, raw) {
  2203. if (isString(value)) {
  2204. value = JSON.stringify(value);
  2205. return raw ? value : [`${key}=${value}`];
  2206. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  2207. return raw ? value : [`${key}=${value}`];
  2208. } else if (isRef2(value)) {
  2209. value = formatProp(key, toRaw(value.value), true);
  2210. return raw ? value : [`${key}=Ref<`, value, `>`];
  2211. } else if (isFunction(value)) {
  2212. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  2213. } else {
  2214. value = toRaw(value);
  2215. return raw ? value : [`${key}=`, value];
  2216. }
  2217. }
  2218. function assertNumber(val, type) {
  2219. if (false) return;
  2220. if (val === void 0) {
  2221. return;
  2222. } else if (typeof val !== "number") {
  2223. warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  2224. } else if (isNaN(val)) {
  2225. warn$1(`${type} is NaN - the duration expression might be incorrect.`);
  2226. }
  2227. }
  2228. var ErrorCodes = {
  2229. "SETUP_FUNCTION": 0,
  2230. "0": "SETUP_FUNCTION",
  2231. "RENDER_FUNCTION": 1,
  2232. "1": "RENDER_FUNCTION",
  2233. "NATIVE_EVENT_HANDLER": 5,
  2234. "5": "NATIVE_EVENT_HANDLER",
  2235. "COMPONENT_EVENT_HANDLER": 6,
  2236. "6": "COMPONENT_EVENT_HANDLER",
  2237. "VNODE_HOOK": 7,
  2238. "7": "VNODE_HOOK",
  2239. "DIRECTIVE_HOOK": 8,
  2240. "8": "DIRECTIVE_HOOK",
  2241. "TRANSITION_HOOK": 9,
  2242. "9": "TRANSITION_HOOK",
  2243. "APP_ERROR_HANDLER": 10,
  2244. "10": "APP_ERROR_HANDLER",
  2245. "APP_WARN_HANDLER": 11,
  2246. "11": "APP_WARN_HANDLER",
  2247. "FUNCTION_REF": 12,
  2248. "12": "FUNCTION_REF",
  2249. "ASYNC_COMPONENT_LOADER": 13,
  2250. "13": "ASYNC_COMPONENT_LOADER",
  2251. "SCHEDULER": 14,
  2252. "14": "SCHEDULER",
  2253. "COMPONENT_UPDATE": 15,
  2254. "15": "COMPONENT_UPDATE",
  2255. "APP_UNMOUNT_CLEANUP": 16,
  2256. "16": "APP_UNMOUNT_CLEANUP"
  2257. };
  2258. var ErrorTypeStrings$1 = {
  2259. ["sp"]: "serverPrefetch hook",
  2260. ["bc"]: "beforeCreate hook",
  2261. ["c"]: "created hook",
  2262. ["bm"]: "beforeMount hook",
  2263. ["m"]: "mounted hook",
  2264. ["bu"]: "beforeUpdate hook",
  2265. ["u"]: "updated",
  2266. ["bum"]: "beforeUnmount hook",
  2267. ["um"]: "unmounted hook",
  2268. ["a"]: "activated hook",
  2269. ["da"]: "deactivated hook",
  2270. ["ec"]: "errorCaptured hook",
  2271. ["rtc"]: "renderTracked hook",
  2272. ["rtg"]: "renderTriggered hook",
  2273. [0]: "setup function",
  2274. [1]: "render function",
  2275. [2]: "watcher getter",
  2276. [3]: "watcher callback",
  2277. [4]: "watcher cleanup function",
  2278. [5]: "native event handler",
  2279. [6]: "component event handler",
  2280. [7]: "vnode hook",
  2281. [8]: "directive hook",
  2282. [9]: "transition hook",
  2283. [10]: "app errorHandler",
  2284. [11]: "app warnHandler",
  2285. [12]: "ref function",
  2286. [13]: "async component loader",
  2287. [14]: "scheduler flush",
  2288. [15]: "component update",
  2289. [16]: "app unmount cleanup function"
  2290. };
  2291. function callWithErrorHandling(fn, instance, type, args) {
  2292. try {
  2293. return args ? fn(...args) : fn();
  2294. } catch (err) {
  2295. handleError(err, instance, type);
  2296. }
  2297. }
  2298. function callWithAsyncErrorHandling(fn, instance, type, args) {
  2299. if (isFunction(fn)) {
  2300. const res = callWithErrorHandling(fn, instance, type, args);
  2301. if (res && isPromise(res)) {
  2302. res.catch((err) => {
  2303. handleError(err, instance, type);
  2304. });
  2305. }
  2306. return res;
  2307. }
  2308. if (isArray(fn)) {
  2309. const values = [];
  2310. for (let i = 0; i < fn.length; i++) {
  2311. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  2312. }
  2313. return values;
  2314. } else if (true) {
  2315. warn$1(
  2316. `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
  2317. );
  2318. }
  2319. }
  2320. function handleError(err, instance, type, throwInDev = true) {
  2321. const contextVNode = instance ? instance.vnode : null;
  2322. const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
  2323. if (instance) {
  2324. let cur = instance.parent;
  2325. const exposedInstance = instance.proxy;
  2326. const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
  2327. while (cur) {
  2328. const errorCapturedHooks = cur.ec;
  2329. if (errorCapturedHooks) {
  2330. for (let i = 0; i < errorCapturedHooks.length; i++) {
  2331. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  2332. return;
  2333. }
  2334. }
  2335. }
  2336. cur = cur.parent;
  2337. }
  2338. if (errorHandler) {
  2339. pauseTracking();
  2340. callWithErrorHandling(errorHandler, null, 10, [
  2341. err,
  2342. exposedInstance,
  2343. errorInfo
  2344. ]);
  2345. resetTracking();
  2346. return;
  2347. }
  2348. }
  2349. logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
  2350. }
  2351. function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
  2352. if (true) {
  2353. const info = ErrorTypeStrings$1[type];
  2354. if (contextVNode) {
  2355. pushWarningContext(contextVNode);
  2356. }
  2357. warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  2358. if (contextVNode) {
  2359. popWarningContext();
  2360. }
  2361. if (throwInDev) {
  2362. throw err;
  2363. } else {
  2364. console.error(err);
  2365. }
  2366. } else if (throwInProd) {
  2367. throw err;
  2368. } else {
  2369. console.error(err);
  2370. }
  2371. }
  2372. var queue = [];
  2373. var flushIndex = -1;
  2374. var pendingPostFlushCbs = [];
  2375. var activePostFlushCbs = null;
  2376. var postFlushIndex = 0;
  2377. var resolvedPromise = Promise.resolve();
  2378. var currentFlushPromise = null;
  2379. var RECURSION_LIMIT = 100;
  2380. function nextTick(fn) {
  2381. const p2 = currentFlushPromise || resolvedPromise;
  2382. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2383. }
  2384. function findInsertionIndex(id) {
  2385. let start = flushIndex + 1;
  2386. let end = queue.length;
  2387. while (start < end) {
  2388. const middle = start + end >>> 1;
  2389. const middleJob = queue[middle];
  2390. const middleJobId = getId(middleJob);
  2391. if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
  2392. start = middle + 1;
  2393. } else {
  2394. end = middle;
  2395. }
  2396. }
  2397. return start;
  2398. }
  2399. function queueJob(job) {
  2400. if (!(job.flags & 1)) {
  2401. const jobId = getId(job);
  2402. const lastJob = queue[queue.length - 1];
  2403. if (!lastJob || // fast path when the job id is larger than the tail
  2404. !(job.flags & 2) && jobId >= getId(lastJob)) {
  2405. queue.push(job);
  2406. } else {
  2407. queue.splice(findInsertionIndex(jobId), 0, job);
  2408. }
  2409. job.flags |= 1;
  2410. queueFlush();
  2411. }
  2412. }
  2413. function queueFlush() {
  2414. if (!currentFlushPromise) {
  2415. currentFlushPromise = resolvedPromise.then(flushJobs);
  2416. }
  2417. }
  2418. function queuePostFlushCb(cb) {
  2419. if (!isArray(cb)) {
  2420. if (activePostFlushCbs && cb.id === -1) {
  2421. activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
  2422. } else if (!(cb.flags & 1)) {
  2423. pendingPostFlushCbs.push(cb);
  2424. cb.flags |= 1;
  2425. }
  2426. } else {
  2427. pendingPostFlushCbs.push(...cb);
  2428. }
  2429. queueFlush();
  2430. }
  2431. function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
  2432. if (true) {
  2433. seen = seen || /* @__PURE__ */ new Map();
  2434. }
  2435. for (; i < queue.length; i++) {
  2436. const cb = queue[i];
  2437. if (cb && cb.flags & 2) {
  2438. if (instance && cb.id !== instance.uid) {
  2439. continue;
  2440. }
  2441. if (checkRecursiveUpdates(seen, cb)) {
  2442. continue;
  2443. }
  2444. queue.splice(i, 1);
  2445. i--;
  2446. if (cb.flags & 4) {
  2447. cb.flags &= -2;
  2448. }
  2449. cb();
  2450. if (!(cb.flags & 4)) {
  2451. cb.flags &= -2;
  2452. }
  2453. }
  2454. }
  2455. }
  2456. function flushPostFlushCbs(seen) {
  2457. if (pendingPostFlushCbs.length) {
  2458. const deduped = [...new Set(pendingPostFlushCbs)].sort(
  2459. (a, b) => getId(a) - getId(b)
  2460. );
  2461. pendingPostFlushCbs.length = 0;
  2462. if (activePostFlushCbs) {
  2463. activePostFlushCbs.push(...deduped);
  2464. return;
  2465. }
  2466. activePostFlushCbs = deduped;
  2467. if (true) {
  2468. seen = seen || /* @__PURE__ */ new Map();
  2469. }
  2470. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  2471. const cb = activePostFlushCbs[postFlushIndex];
  2472. if (checkRecursiveUpdates(seen, cb)) {
  2473. continue;
  2474. }
  2475. if (cb.flags & 4) {
  2476. cb.flags &= -2;
  2477. }
  2478. if (!(cb.flags & 8)) cb();
  2479. cb.flags &= -2;
  2480. }
  2481. activePostFlushCbs = null;
  2482. postFlushIndex = 0;
  2483. }
  2484. }
  2485. var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
  2486. function flushJobs(seen) {
  2487. if (true) {
  2488. seen = seen || /* @__PURE__ */ new Map();
  2489. }
  2490. const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
  2491. try {
  2492. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2493. const job = queue[flushIndex];
  2494. if (job && !(job.flags & 8)) {
  2495. if (check(job)) {
  2496. continue;
  2497. }
  2498. if (job.flags & 4) {
  2499. job.flags &= ~1;
  2500. }
  2501. callWithErrorHandling(
  2502. job,
  2503. job.i,
  2504. job.i ? 15 : 14
  2505. );
  2506. if (!(job.flags & 4)) {
  2507. job.flags &= ~1;
  2508. }
  2509. }
  2510. }
  2511. } finally {
  2512. for (; flushIndex < queue.length; flushIndex++) {
  2513. const job = queue[flushIndex];
  2514. if (job) {
  2515. job.flags &= -2;
  2516. }
  2517. }
  2518. flushIndex = -1;
  2519. queue.length = 0;
  2520. flushPostFlushCbs(seen);
  2521. currentFlushPromise = null;
  2522. if (queue.length || pendingPostFlushCbs.length) {
  2523. flushJobs(seen);
  2524. }
  2525. }
  2526. }
  2527. function checkRecursiveUpdates(seen, fn) {
  2528. const count = seen.get(fn) || 0;
  2529. if (count > RECURSION_LIMIT) {
  2530. const instance = fn.i;
  2531. const componentName = instance && getComponentName(instance.type);
  2532. handleError(
  2533. `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.`,
  2534. null,
  2535. 10
  2536. );
  2537. return true;
  2538. }
  2539. seen.set(fn, count + 1);
  2540. return false;
  2541. }
  2542. var isHmrUpdating = false;
  2543. var hmrDirtyComponents = /* @__PURE__ */ new Map();
  2544. if (true) {
  2545. const g = getGlobalThis();
  2546. if (!g.__VUE_HMR_RUNTIME__) {
  2547. g.__VUE_HMR_RUNTIME__ = {
  2548. createRecord: tryWrap(createRecord),
  2549. rerender: tryWrap(rerender),
  2550. reload: tryWrap(reload)
  2551. };
  2552. }
  2553. }
  2554. var map = /* @__PURE__ */ new Map();
  2555. function registerHMR(instance) {
  2556. const id = instance.type.__hmrId;
  2557. let record = map.get(id);
  2558. if (!record) {
  2559. createRecord(id, instance.type);
  2560. record = map.get(id);
  2561. }
  2562. record.instances.add(instance);
  2563. }
  2564. function unregisterHMR(instance) {
  2565. map.get(instance.type.__hmrId).instances.delete(instance);
  2566. }
  2567. function createRecord(id, initialDef) {
  2568. if (map.has(id)) {
  2569. return false;
  2570. }
  2571. map.set(id, {
  2572. initialDef: normalizeClassComponent(initialDef),
  2573. instances: /* @__PURE__ */ new Set()
  2574. });
  2575. return true;
  2576. }
  2577. function normalizeClassComponent(component) {
  2578. return isClassComponent(component) ? component.__vccOpts : component;
  2579. }
  2580. function rerender(id, newRender) {
  2581. const record = map.get(id);
  2582. if (!record) {
  2583. return;
  2584. }
  2585. record.initialDef.render = newRender;
  2586. [...record.instances].forEach((instance) => {
  2587. if (newRender) {
  2588. instance.render = newRender;
  2589. normalizeClassComponent(instance.type).render = newRender;
  2590. }
  2591. instance.renderCache = [];
  2592. isHmrUpdating = true;
  2593. if (!(instance.job.flags & 8)) {
  2594. instance.update();
  2595. }
  2596. isHmrUpdating = false;
  2597. });
  2598. }
  2599. function reload(id, newComp) {
  2600. const record = map.get(id);
  2601. if (!record) return;
  2602. newComp = normalizeClassComponent(newComp);
  2603. updateComponentDef(record.initialDef, newComp);
  2604. const instances = [...record.instances];
  2605. for (let i = 0; i < instances.length; i++) {
  2606. const instance = instances[i];
  2607. const oldComp = normalizeClassComponent(instance.type);
  2608. let dirtyInstances = hmrDirtyComponents.get(oldComp);
  2609. if (!dirtyInstances) {
  2610. if (oldComp !== record.initialDef) {
  2611. updateComponentDef(oldComp, newComp);
  2612. }
  2613. hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
  2614. }
  2615. dirtyInstances.add(instance);
  2616. instance.appContext.propsCache.delete(instance.type);
  2617. instance.appContext.emitsCache.delete(instance.type);
  2618. instance.appContext.optionsCache.delete(instance.type);
  2619. if (instance.ceReload) {
  2620. dirtyInstances.add(instance);
  2621. instance.ceReload(newComp.styles);
  2622. dirtyInstances.delete(instance);
  2623. } else if (instance.parent) {
  2624. queueJob(() => {
  2625. if (!(instance.job.flags & 8)) {
  2626. isHmrUpdating = true;
  2627. instance.parent.update();
  2628. isHmrUpdating = false;
  2629. dirtyInstances.delete(instance);
  2630. }
  2631. });
  2632. } else if (instance.appContext.reload) {
  2633. instance.appContext.reload();
  2634. } else if (typeof window !== "undefined") {
  2635. window.location.reload();
  2636. } else {
  2637. console.warn(
  2638. "[HMR] Root or manually mounted instance modified. Full reload required."
  2639. );
  2640. }
  2641. if (instance.root.ce && instance !== instance.root) {
  2642. instance.root.ce._removeChildStyle(oldComp);
  2643. }
  2644. }
  2645. queuePostFlushCb(() => {
  2646. hmrDirtyComponents.clear();
  2647. });
  2648. }
  2649. function updateComponentDef(oldComp, newComp) {
  2650. extend(oldComp, newComp);
  2651. for (const key in oldComp) {
  2652. if (key !== "__file" && !(key in newComp)) {
  2653. delete oldComp[key];
  2654. }
  2655. }
  2656. }
  2657. function tryWrap(fn) {
  2658. return (id, arg) => {
  2659. try {
  2660. return fn(id, arg);
  2661. } catch (e) {
  2662. console.error(e);
  2663. console.warn(
  2664. `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
  2665. );
  2666. }
  2667. };
  2668. }
  2669. var devtools$1;
  2670. var buffer = [];
  2671. var devtoolsNotInstalled = false;
  2672. function emit$1(event, ...args) {
  2673. if (devtools$1) {
  2674. devtools$1.emit(event, ...args);
  2675. } else if (!devtoolsNotInstalled) {
  2676. buffer.push({ event, args });
  2677. }
  2678. }
  2679. function setDevtoolsHook$1(hook, target) {
  2680. var _a, _b;
  2681. devtools$1 = hook;
  2682. if (devtools$1) {
  2683. devtools$1.enabled = true;
  2684. buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
  2685. buffer = [];
  2686. } else if (
  2687. // handle late devtools injection - only do this if we are in an actual
  2688. // browser environment to avoid the timer handle stalling test runner exit
  2689. // (#4815)
  2690. typeof window !== "undefined" && // some envs mock window but not fully
  2691. window.HTMLElement && // also exclude jsdom
  2692. // eslint-disable-next-line no-restricted-syntax
  2693. !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
  2694. ) {
  2695. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  2696. replay.push((newHook) => {
  2697. setDevtoolsHook$1(newHook, target);
  2698. });
  2699. setTimeout(() => {
  2700. if (!devtools$1) {
  2701. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  2702. devtoolsNotInstalled = true;
  2703. buffer = [];
  2704. }
  2705. }, 3e3);
  2706. } else {
  2707. devtoolsNotInstalled = true;
  2708. buffer = [];
  2709. }
  2710. }
  2711. function devtoolsInitApp(app, version2) {
  2712. emit$1("app:init", app, version2, {
  2713. Fragment,
  2714. Text,
  2715. Comment,
  2716. Static
  2717. });
  2718. }
  2719. function devtoolsUnmountApp(app) {
  2720. emit$1("app:unmount", app);
  2721. }
  2722. var devtoolsComponentAdded = createDevtoolsComponentHook(
  2723. "component:added"
  2724. /* COMPONENT_ADDED */
  2725. );
  2726. var devtoolsComponentUpdated = createDevtoolsComponentHook(
  2727. "component:updated"
  2728. /* COMPONENT_UPDATED */
  2729. );
  2730. var _devtoolsComponentRemoved = createDevtoolsComponentHook(
  2731. "component:removed"
  2732. /* COMPONENT_REMOVED */
  2733. );
  2734. var devtoolsComponentRemoved = (component) => {
  2735. if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  2736. !devtools$1.cleanupBuffer(component)) {
  2737. _devtoolsComponentRemoved(component);
  2738. }
  2739. };
  2740. function createDevtoolsComponentHook(hook) {
  2741. return (component) => {
  2742. emit$1(
  2743. hook,
  2744. component.appContext.app,
  2745. component.uid,
  2746. component.parent ? component.parent.uid : void 0,
  2747. component
  2748. );
  2749. };
  2750. }
  2751. var devtoolsPerfStart = createDevtoolsPerformanceHook(
  2752. "perf:start"
  2753. /* PERFORMANCE_START */
  2754. );
  2755. var devtoolsPerfEnd = createDevtoolsPerformanceHook(
  2756. "perf:end"
  2757. /* PERFORMANCE_END */
  2758. );
  2759. function createDevtoolsPerformanceHook(hook) {
  2760. return (component, type, time) => {
  2761. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  2762. };
  2763. }
  2764. function devtoolsComponentEmit(component, event, params) {
  2765. emit$1(
  2766. "component:emit",
  2767. component.appContext.app,
  2768. component,
  2769. event,
  2770. params
  2771. );
  2772. }
  2773. var currentRenderingInstance = null;
  2774. var currentScopeId = null;
  2775. function setCurrentRenderingInstance(instance) {
  2776. const prev = currentRenderingInstance;
  2777. currentRenderingInstance = instance;
  2778. currentScopeId = instance && instance.type.__scopeId || null;
  2779. return prev;
  2780. }
  2781. function pushScopeId(id) {
  2782. currentScopeId = id;
  2783. }
  2784. function popScopeId() {
  2785. currentScopeId = null;
  2786. }
  2787. var withScopeId = (_id) => withCtx;
  2788. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2789. if (!ctx) return fn;
  2790. if (fn._n) {
  2791. return fn;
  2792. }
  2793. const renderFnWithContext = (...args) => {
  2794. if (renderFnWithContext._d) {
  2795. setBlockTracking(-1);
  2796. }
  2797. const prevInstance = setCurrentRenderingInstance(ctx);
  2798. let res;
  2799. try {
  2800. res = fn(...args);
  2801. } finally {
  2802. setCurrentRenderingInstance(prevInstance);
  2803. if (renderFnWithContext._d) {
  2804. setBlockTracking(1);
  2805. }
  2806. }
  2807. if (true) {
  2808. devtoolsComponentUpdated(ctx);
  2809. }
  2810. return res;
  2811. };
  2812. renderFnWithContext._n = true;
  2813. renderFnWithContext._c = true;
  2814. renderFnWithContext._d = true;
  2815. return renderFnWithContext;
  2816. }
  2817. function validateDirectiveName(name) {
  2818. if (isBuiltInDirective(name)) {
  2819. warn$1("Do not use built-in directive ids as custom directive id: " + name);
  2820. }
  2821. }
  2822. function withDirectives(vnode, directives) {
  2823. if (currentRenderingInstance === null) {
  2824. warn$1(`withDirectives can only be used inside render functions.`);
  2825. return vnode;
  2826. }
  2827. const instance = getComponentPublicInstance(currentRenderingInstance);
  2828. const bindings = vnode.dirs || (vnode.dirs = []);
  2829. for (let i = 0; i < directives.length; i++) {
  2830. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  2831. if (dir) {
  2832. if (isFunction(dir)) {
  2833. dir = {
  2834. mounted: dir,
  2835. updated: dir
  2836. };
  2837. }
  2838. if (dir.deep) {
  2839. traverse(value);
  2840. }
  2841. bindings.push({
  2842. dir,
  2843. instance,
  2844. value,
  2845. oldValue: void 0,
  2846. arg,
  2847. modifiers
  2848. });
  2849. }
  2850. }
  2851. return vnode;
  2852. }
  2853. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  2854. const bindings = vnode.dirs;
  2855. const oldBindings = prevVNode && prevVNode.dirs;
  2856. for (let i = 0; i < bindings.length; i++) {
  2857. const binding = bindings[i];
  2858. if (oldBindings) {
  2859. binding.oldValue = oldBindings[i].value;
  2860. }
  2861. let hook = binding.dir[name];
  2862. if (hook) {
  2863. pauseTracking();
  2864. callWithAsyncErrorHandling(hook, instance, 8, [
  2865. vnode.el,
  2866. binding,
  2867. vnode,
  2868. prevVNode
  2869. ]);
  2870. resetTracking();
  2871. }
  2872. }
  2873. }
  2874. var TeleportEndKey = Symbol("_vte");
  2875. var isTeleport = (type) => type.__isTeleport;
  2876. var isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  2877. var isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
  2878. var isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  2879. var isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  2880. var resolveTarget = (props, select) => {
  2881. const targetSelector = props && props.to;
  2882. if (isString(targetSelector)) {
  2883. if (!select) {
  2884. warn$1(
  2885. `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
  2886. );
  2887. return null;
  2888. } else {
  2889. const target = select(targetSelector);
  2890. if (!target && !isTeleportDisabled(props)) {
  2891. warn$1(
  2892. `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.`
  2893. );
  2894. }
  2895. return target;
  2896. }
  2897. } else {
  2898. if (!targetSelector && !isTeleportDisabled(props)) {
  2899. warn$1(`Invalid Teleport target: ${targetSelector}`);
  2900. }
  2901. return targetSelector;
  2902. }
  2903. };
  2904. var TeleportImpl = {
  2905. name: "Teleport",
  2906. __isTeleport: true,
  2907. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  2908. const {
  2909. mc: mountChildren,
  2910. pc: patchChildren,
  2911. pbc: patchBlockChildren,
  2912. o: { insert, querySelector, createText, createComment }
  2913. } = internals;
  2914. const disabled = isTeleportDisabled(n2.props);
  2915. let { shapeFlag, children, dynamicChildren } = n2;
  2916. if (isHmrUpdating) {
  2917. optimized = false;
  2918. dynamicChildren = null;
  2919. }
  2920. if (n1 == null) {
  2921. const placeholder = n2.el = true ? createComment("teleport start") : createText("");
  2922. const mainAnchor = n2.anchor = true ? createComment("teleport end") : createText("");
  2923. insert(placeholder, container, anchor);
  2924. insert(mainAnchor, container, anchor);
  2925. const mount = (container2, anchor2) => {
  2926. if (shapeFlag & 16) {
  2927. if (parentComponent && parentComponent.isCE) {
  2928. parentComponent.ce._teleportTarget = container2;
  2929. }
  2930. mountChildren(
  2931. children,
  2932. container2,
  2933. anchor2,
  2934. parentComponent,
  2935. parentSuspense,
  2936. namespace,
  2937. slotScopeIds,
  2938. optimized
  2939. );
  2940. }
  2941. };
  2942. const mountToTarget = () => {
  2943. const target = n2.target = resolveTarget(n2.props, querySelector);
  2944. const targetAnchor = prepareAnchor(target, n2, createText, insert);
  2945. if (target) {
  2946. if (namespace !== "svg" && isTargetSVG(target)) {
  2947. namespace = "svg";
  2948. } else if (namespace !== "mathml" && isTargetMathML(target)) {
  2949. namespace = "mathml";
  2950. }
  2951. if (!disabled) {
  2952. mount(target, targetAnchor);
  2953. updateCssVars(n2, false);
  2954. }
  2955. } else if (!disabled) {
  2956. warn$1(
  2957. "Invalid Teleport target on mount:",
  2958. target,
  2959. `(${typeof target})`
  2960. );
  2961. }
  2962. };
  2963. if (disabled) {
  2964. mount(container, mainAnchor);
  2965. updateCssVars(n2, true);
  2966. }
  2967. if (isTeleportDeferred(n2.props)) {
  2968. n2.el.__isMounted = false;
  2969. queuePostRenderEffect(() => {
  2970. mountToTarget();
  2971. delete n2.el.__isMounted;
  2972. }, parentSuspense);
  2973. } else {
  2974. mountToTarget();
  2975. }
  2976. } else {
  2977. if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
  2978. queuePostRenderEffect(() => {
  2979. TeleportImpl.process(
  2980. n1,
  2981. n2,
  2982. container,
  2983. anchor,
  2984. parentComponent,
  2985. parentSuspense,
  2986. namespace,
  2987. slotScopeIds,
  2988. optimized,
  2989. internals
  2990. );
  2991. }, parentSuspense);
  2992. return;
  2993. }
  2994. n2.el = n1.el;
  2995. n2.targetStart = n1.targetStart;
  2996. const mainAnchor = n2.anchor = n1.anchor;
  2997. const target = n2.target = n1.target;
  2998. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  2999. const wasDisabled = isTeleportDisabled(n1.props);
  3000. const currentContainer = wasDisabled ? container : target;
  3001. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  3002. if (namespace === "svg" || isTargetSVG(target)) {
  3003. namespace = "svg";
  3004. } else if (namespace === "mathml" || isTargetMathML(target)) {
  3005. namespace = "mathml";
  3006. }
  3007. if (dynamicChildren) {
  3008. patchBlockChildren(
  3009. n1.dynamicChildren,
  3010. dynamicChildren,
  3011. currentContainer,
  3012. parentComponent,
  3013. parentSuspense,
  3014. namespace,
  3015. slotScopeIds
  3016. );
  3017. traverseStaticChildren(n1, n2, false);
  3018. } else if (!optimized) {
  3019. patchChildren(
  3020. n1,
  3021. n2,
  3022. currentContainer,
  3023. currentAnchor,
  3024. parentComponent,
  3025. parentSuspense,
  3026. namespace,
  3027. slotScopeIds,
  3028. false
  3029. );
  3030. }
  3031. if (disabled) {
  3032. if (!wasDisabled) {
  3033. moveTeleport(
  3034. n2,
  3035. container,
  3036. mainAnchor,
  3037. internals,
  3038. 1
  3039. );
  3040. } else {
  3041. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  3042. n2.props.to = n1.props.to;
  3043. }
  3044. }
  3045. } else {
  3046. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  3047. const nextTarget = n2.target = resolveTarget(
  3048. n2.props,
  3049. querySelector
  3050. );
  3051. if (nextTarget) {
  3052. moveTeleport(
  3053. n2,
  3054. nextTarget,
  3055. null,
  3056. internals,
  3057. 0
  3058. );
  3059. } else if (true) {
  3060. warn$1(
  3061. "Invalid Teleport target on update:",
  3062. target,
  3063. `(${typeof target})`
  3064. );
  3065. }
  3066. } else if (wasDisabled) {
  3067. moveTeleport(
  3068. n2,
  3069. target,
  3070. targetAnchor,
  3071. internals,
  3072. 1
  3073. );
  3074. }
  3075. }
  3076. updateCssVars(n2, disabled);
  3077. }
  3078. },
  3079. remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  3080. const {
  3081. shapeFlag,
  3082. children,
  3083. anchor,
  3084. targetStart,
  3085. targetAnchor,
  3086. target,
  3087. props
  3088. } = vnode;
  3089. if (target) {
  3090. hostRemove(targetStart);
  3091. hostRemove(targetAnchor);
  3092. }
  3093. doRemove && hostRemove(anchor);
  3094. if (shapeFlag & 16) {
  3095. const shouldRemove = doRemove || !isTeleportDisabled(props);
  3096. for (let i = 0; i < children.length; i++) {
  3097. const child = children[i];
  3098. unmount(
  3099. child,
  3100. parentComponent,
  3101. parentSuspense,
  3102. shouldRemove,
  3103. !!child.dynamicChildren
  3104. );
  3105. }
  3106. }
  3107. },
  3108. move: moveTeleport,
  3109. hydrate: hydrateTeleport
  3110. };
  3111. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  3112. if (moveType === 0) {
  3113. insert(vnode.targetAnchor, container, parentAnchor);
  3114. }
  3115. const { el, anchor, shapeFlag, children, props } = vnode;
  3116. const isReorder = moveType === 2;
  3117. if (isReorder) {
  3118. insert(el, container, parentAnchor);
  3119. }
  3120. if (!isReorder || isTeleportDisabled(props)) {
  3121. if (shapeFlag & 16) {
  3122. for (let i = 0; i < children.length; i++) {
  3123. move(
  3124. children[i],
  3125. container,
  3126. parentAnchor,
  3127. 2
  3128. );
  3129. }
  3130. }
  3131. }
  3132. if (isReorder) {
  3133. insert(anchor, container, parentAnchor);
  3134. }
  3135. }
  3136. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  3137. o: { nextSibling, parentNode, querySelector, insert, createText }
  3138. }, hydrateChildren) {
  3139. function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
  3140. vnode2.anchor = hydrateChildren(
  3141. nextSibling(node2),
  3142. vnode2,
  3143. parentNode(node2),
  3144. parentComponent,
  3145. parentSuspense,
  3146. slotScopeIds,
  3147. optimized
  3148. );
  3149. vnode2.targetStart = targetStart;
  3150. vnode2.targetAnchor = targetAnchor;
  3151. }
  3152. const target = vnode.target = resolveTarget(
  3153. vnode.props,
  3154. querySelector
  3155. );
  3156. const disabled = isTeleportDisabled(vnode.props);
  3157. if (target) {
  3158. const targetNode = target._lpa || target.firstChild;
  3159. if (vnode.shapeFlag & 16) {
  3160. if (disabled) {
  3161. hydrateDisabledTeleport(
  3162. node,
  3163. vnode,
  3164. targetNode,
  3165. targetNode && nextSibling(targetNode)
  3166. );
  3167. } else {
  3168. vnode.anchor = nextSibling(node);
  3169. let targetAnchor = targetNode;
  3170. while (targetAnchor) {
  3171. if (targetAnchor && targetAnchor.nodeType === 8) {
  3172. if (targetAnchor.data === "teleport start anchor") {
  3173. vnode.targetStart = targetAnchor;
  3174. } else if (targetAnchor.data === "teleport anchor") {
  3175. vnode.targetAnchor = targetAnchor;
  3176. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  3177. break;
  3178. }
  3179. }
  3180. targetAnchor = nextSibling(targetAnchor);
  3181. }
  3182. if (!vnode.targetAnchor) {
  3183. prepareAnchor(target, vnode, createText, insert);
  3184. }
  3185. hydrateChildren(
  3186. targetNode && nextSibling(targetNode),
  3187. vnode,
  3188. target,
  3189. parentComponent,
  3190. parentSuspense,
  3191. slotScopeIds,
  3192. optimized
  3193. );
  3194. }
  3195. }
  3196. updateCssVars(vnode, disabled);
  3197. } else if (disabled) {
  3198. if (vnode.shapeFlag & 16) {
  3199. hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
  3200. }
  3201. }
  3202. return vnode.anchor && nextSibling(vnode.anchor);
  3203. }
  3204. var Teleport = TeleportImpl;
  3205. function updateCssVars(vnode, isDisabled) {
  3206. const ctx = vnode.ctx;
  3207. if (ctx && ctx.ut) {
  3208. let node, anchor;
  3209. if (isDisabled) {
  3210. node = vnode.el;
  3211. anchor = vnode.anchor;
  3212. } else {
  3213. node = vnode.targetStart;
  3214. anchor = vnode.targetAnchor;
  3215. }
  3216. while (node && node !== anchor) {
  3217. if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
  3218. node = node.nextSibling;
  3219. }
  3220. ctx.ut();
  3221. }
  3222. }
  3223. function prepareAnchor(target, vnode, createText, insert) {
  3224. const targetStart = vnode.targetStart = createText("");
  3225. const targetAnchor = vnode.targetAnchor = createText("");
  3226. targetStart[TeleportEndKey] = targetAnchor;
  3227. if (target) {
  3228. insert(targetStart, target);
  3229. insert(targetAnchor, target);
  3230. }
  3231. return targetAnchor;
  3232. }
  3233. var leaveCbKey = Symbol("_leaveCb");
  3234. var enterCbKey = Symbol("_enterCb");
  3235. function useTransitionState() {
  3236. const state = {
  3237. isMounted: false,
  3238. isLeaving: false,
  3239. isUnmounting: false,
  3240. leavingVNodes: /* @__PURE__ */ new Map()
  3241. };
  3242. onMounted(() => {
  3243. state.isMounted = true;
  3244. });
  3245. onBeforeUnmount(() => {
  3246. state.isUnmounting = true;
  3247. });
  3248. return state;
  3249. }
  3250. var TransitionHookValidator = [Function, Array];
  3251. var BaseTransitionPropsValidators = {
  3252. mode: String,
  3253. appear: Boolean,
  3254. persisted: Boolean,
  3255. // enter
  3256. onBeforeEnter: TransitionHookValidator,
  3257. onEnter: TransitionHookValidator,
  3258. onAfterEnter: TransitionHookValidator,
  3259. onEnterCancelled: TransitionHookValidator,
  3260. // leave
  3261. onBeforeLeave: TransitionHookValidator,
  3262. onLeave: TransitionHookValidator,
  3263. onAfterLeave: TransitionHookValidator,
  3264. onLeaveCancelled: TransitionHookValidator,
  3265. // appear
  3266. onBeforeAppear: TransitionHookValidator,
  3267. onAppear: TransitionHookValidator,
  3268. onAfterAppear: TransitionHookValidator,
  3269. onAppearCancelled: TransitionHookValidator
  3270. };
  3271. var recursiveGetSubtree = (instance) => {
  3272. const subTree = instance.subTree;
  3273. return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
  3274. };
  3275. var BaseTransitionImpl = {
  3276. name: `BaseTransition`,
  3277. props: BaseTransitionPropsValidators,
  3278. setup(props, { slots }) {
  3279. const instance = getCurrentInstance();
  3280. const state = useTransitionState();
  3281. return () => {
  3282. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  3283. if (!children || !children.length) {
  3284. return;
  3285. }
  3286. const child = findNonCommentChild(children);
  3287. const rawProps = toRaw(props);
  3288. const { mode } = rawProps;
  3289. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
  3290. warn$1(`invalid <transition> mode: ${mode}`);
  3291. }
  3292. if (state.isLeaving) {
  3293. return emptyPlaceholder(child);
  3294. }
  3295. const innerChild = getInnerChild$1(child);
  3296. if (!innerChild) {
  3297. return emptyPlaceholder(child);
  3298. }
  3299. let enterHooks = resolveTransitionHooks(
  3300. innerChild,
  3301. rawProps,
  3302. state,
  3303. instance,
  3304. // #11061, ensure enterHooks is fresh after clone
  3305. (hooks) => enterHooks = hooks
  3306. );
  3307. if (innerChild.type !== Comment) {
  3308. setTransitionHooks(innerChild, enterHooks);
  3309. }
  3310. let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
  3311. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
  3312. let leavingHooks = resolveTransitionHooks(
  3313. oldInnerChild,
  3314. rawProps,
  3315. state,
  3316. instance
  3317. );
  3318. setTransitionHooks(oldInnerChild, leavingHooks);
  3319. if (mode === "out-in" && innerChild.type !== Comment) {
  3320. state.isLeaving = true;
  3321. leavingHooks.afterLeave = () => {
  3322. state.isLeaving = false;
  3323. if (!(instance.job.flags & 8)) {
  3324. instance.update();
  3325. }
  3326. delete leavingHooks.afterLeave;
  3327. oldInnerChild = void 0;
  3328. };
  3329. return emptyPlaceholder(child);
  3330. } else if (mode === "in-out" && innerChild.type !== Comment) {
  3331. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  3332. const leavingVNodesCache = getLeavingNodesForType(
  3333. state,
  3334. oldInnerChild
  3335. );
  3336. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  3337. el[leaveCbKey] = () => {
  3338. earlyRemove();
  3339. el[leaveCbKey] = void 0;
  3340. delete enterHooks.delayedLeave;
  3341. oldInnerChild = void 0;
  3342. };
  3343. enterHooks.delayedLeave = () => {
  3344. delayedLeave();
  3345. delete enterHooks.delayedLeave;
  3346. oldInnerChild = void 0;
  3347. };
  3348. };
  3349. } else {
  3350. oldInnerChild = void 0;
  3351. }
  3352. } else if (oldInnerChild) {
  3353. oldInnerChild = void 0;
  3354. }
  3355. return child;
  3356. };
  3357. }
  3358. };
  3359. function findNonCommentChild(children) {
  3360. let child = children[0];
  3361. if (children.length > 1) {
  3362. let hasFound = false;
  3363. for (const c of children) {
  3364. if (c.type !== Comment) {
  3365. if (hasFound) {
  3366. warn$1(
  3367. "<transition> can only be used on a single element or component. Use <transition-group> for lists."
  3368. );
  3369. break;
  3370. }
  3371. child = c;
  3372. hasFound = true;
  3373. if (false) break;
  3374. }
  3375. }
  3376. }
  3377. return child;
  3378. }
  3379. var BaseTransition = BaseTransitionImpl;
  3380. function getLeavingNodesForType(state, vnode) {
  3381. const { leavingVNodes } = state;
  3382. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  3383. if (!leavingVNodesCache) {
  3384. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  3385. leavingVNodes.set(vnode.type, leavingVNodesCache);
  3386. }
  3387. return leavingVNodesCache;
  3388. }
  3389. function resolveTransitionHooks(vnode, props, state, instance, postClone) {
  3390. const {
  3391. appear,
  3392. mode,
  3393. persisted = false,
  3394. onBeforeEnter,
  3395. onEnter,
  3396. onAfterEnter,
  3397. onEnterCancelled,
  3398. onBeforeLeave,
  3399. onLeave,
  3400. onAfterLeave,
  3401. onLeaveCancelled,
  3402. onBeforeAppear,
  3403. onAppear,
  3404. onAfterAppear,
  3405. onAppearCancelled
  3406. } = props;
  3407. const key = String(vnode.key);
  3408. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  3409. const callHook3 = (hook, args) => {
  3410. hook && callWithAsyncErrorHandling(
  3411. hook,
  3412. instance,
  3413. 9,
  3414. args
  3415. );
  3416. };
  3417. const callAsyncHook = (hook, args) => {
  3418. const done = args[1];
  3419. callHook3(hook, args);
  3420. if (isArray(hook)) {
  3421. if (hook.every((hook2) => hook2.length <= 1)) done();
  3422. } else if (hook.length <= 1) {
  3423. done();
  3424. }
  3425. };
  3426. const hooks = {
  3427. mode,
  3428. persisted,
  3429. beforeEnter(el) {
  3430. let hook = onBeforeEnter;
  3431. if (!state.isMounted) {
  3432. if (appear) {
  3433. hook = onBeforeAppear || onBeforeEnter;
  3434. } else {
  3435. return;
  3436. }
  3437. }
  3438. if (el[leaveCbKey]) {
  3439. el[leaveCbKey](
  3440. true
  3441. /* cancelled */
  3442. );
  3443. }
  3444. const leavingVNode = leavingVNodesCache[key];
  3445. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  3446. leavingVNode.el[leaveCbKey]();
  3447. }
  3448. callHook3(hook, [el]);
  3449. },
  3450. enter(el) {
  3451. let hook = onEnter;
  3452. let afterHook = onAfterEnter;
  3453. let cancelHook = onEnterCancelled;
  3454. if (!state.isMounted) {
  3455. if (appear) {
  3456. hook = onAppear || onEnter;
  3457. afterHook = onAfterAppear || onAfterEnter;
  3458. cancelHook = onAppearCancelled || onEnterCancelled;
  3459. } else {
  3460. return;
  3461. }
  3462. }
  3463. let called = false;
  3464. const done = el[enterCbKey] = (cancelled) => {
  3465. if (called) return;
  3466. called = true;
  3467. if (cancelled) {
  3468. callHook3(cancelHook, [el]);
  3469. } else {
  3470. callHook3(afterHook, [el]);
  3471. }
  3472. if (hooks.delayedLeave) {
  3473. hooks.delayedLeave();
  3474. }
  3475. el[enterCbKey] = void 0;
  3476. };
  3477. if (hook) {
  3478. callAsyncHook(hook, [el, done]);
  3479. } else {
  3480. done();
  3481. }
  3482. },
  3483. leave(el, remove2) {
  3484. const key2 = String(vnode.key);
  3485. if (el[enterCbKey]) {
  3486. el[enterCbKey](
  3487. true
  3488. /* cancelled */
  3489. );
  3490. }
  3491. if (state.isUnmounting) {
  3492. return remove2();
  3493. }
  3494. callHook3(onBeforeLeave, [el]);
  3495. let called = false;
  3496. const done = el[leaveCbKey] = (cancelled) => {
  3497. if (called) return;
  3498. called = true;
  3499. remove2();
  3500. if (cancelled) {
  3501. callHook3(onLeaveCancelled, [el]);
  3502. } else {
  3503. callHook3(onAfterLeave, [el]);
  3504. }
  3505. el[leaveCbKey] = void 0;
  3506. if (leavingVNodesCache[key2] === vnode) {
  3507. delete leavingVNodesCache[key2];
  3508. }
  3509. };
  3510. leavingVNodesCache[key2] = vnode;
  3511. if (onLeave) {
  3512. callAsyncHook(onLeave, [el, done]);
  3513. } else {
  3514. done();
  3515. }
  3516. },
  3517. clone(vnode2) {
  3518. const hooks2 = resolveTransitionHooks(
  3519. vnode2,
  3520. props,
  3521. state,
  3522. instance,
  3523. postClone
  3524. );
  3525. if (postClone) postClone(hooks2);
  3526. return hooks2;
  3527. }
  3528. };
  3529. return hooks;
  3530. }
  3531. function emptyPlaceholder(vnode) {
  3532. if (isKeepAlive(vnode)) {
  3533. vnode = cloneVNode(vnode);
  3534. vnode.children = null;
  3535. return vnode;
  3536. }
  3537. }
  3538. function getInnerChild$1(vnode) {
  3539. if (!isKeepAlive(vnode)) {
  3540. if (isTeleport(vnode.type) && vnode.children) {
  3541. return findNonCommentChild(vnode.children);
  3542. }
  3543. return vnode;
  3544. }
  3545. if (vnode.component) {
  3546. return vnode.component.subTree;
  3547. }
  3548. const { shapeFlag, children } = vnode;
  3549. if (children) {
  3550. if (shapeFlag & 16) {
  3551. return children[0];
  3552. }
  3553. if (shapeFlag & 32 && isFunction(children.default)) {
  3554. return children.default();
  3555. }
  3556. }
  3557. }
  3558. function setTransitionHooks(vnode, hooks) {
  3559. if (vnode.shapeFlag & 6 && vnode.component) {
  3560. vnode.transition = hooks;
  3561. setTransitionHooks(vnode.component.subTree, hooks);
  3562. } else if (vnode.shapeFlag & 128) {
  3563. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  3564. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  3565. } else {
  3566. vnode.transition = hooks;
  3567. }
  3568. }
  3569. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  3570. let ret = [];
  3571. let keyedFragmentCount = 0;
  3572. for (let i = 0; i < children.length; i++) {
  3573. let child = children[i];
  3574. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  3575. if (child.type === Fragment) {
  3576. if (child.patchFlag & 128) keyedFragmentCount++;
  3577. ret = ret.concat(
  3578. getTransitionRawChildren(child.children, keepComment, key)
  3579. );
  3580. } else if (keepComment || child.type !== Comment) {
  3581. ret.push(key != null ? cloneVNode(child, { key }) : child);
  3582. }
  3583. }
  3584. if (keyedFragmentCount > 1) {
  3585. for (let i = 0; i < ret.length; i++) {
  3586. ret[i].patchFlag = -2;
  3587. }
  3588. }
  3589. return ret;
  3590. }
  3591. function defineComponent(options, extraOptions) {
  3592. return isFunction(options) ? (
  3593. // #8236: extend call and options.name access are considered side-effects
  3594. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  3595. (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  3596. ) : options;
  3597. }
  3598. function useId() {
  3599. const i = getCurrentInstance();
  3600. if (i) {
  3601. return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
  3602. } else if (true) {
  3603. warn$1(
  3604. `useId() is called when there is no active component instance to be associated with.`
  3605. );
  3606. }
  3607. return "";
  3608. }
  3609. function markAsyncBoundary(instance) {
  3610. instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
  3611. }
  3612. var knownTemplateRefs = /* @__PURE__ */ new WeakSet();
  3613. function useTemplateRef(key) {
  3614. const i = getCurrentInstance();
  3615. const r = shallowRef(null);
  3616. if (i) {
  3617. const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
  3618. let desc;
  3619. if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
  3620. warn$1(`useTemplateRef('${key}') already exists.`);
  3621. } else {
  3622. Object.defineProperty(refs, key, {
  3623. enumerable: true,
  3624. get: () => r.value,
  3625. set: (val) => r.value = val
  3626. });
  3627. }
  3628. } else if (true) {
  3629. warn$1(
  3630. `useTemplateRef() is called when there is no active component instance to be associated with.`
  3631. );
  3632. }
  3633. const ret = true ? readonly(r) : r;
  3634. if (true) {
  3635. knownTemplateRefs.add(ret);
  3636. }
  3637. return ret;
  3638. }
  3639. var pendingSetRefMap = /* @__PURE__ */ new WeakMap();
  3640. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  3641. if (isArray(rawRef)) {
  3642. rawRef.forEach(
  3643. (r, i) => setRef(
  3644. r,
  3645. oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),
  3646. parentSuspense,
  3647. vnode,
  3648. isUnmount
  3649. )
  3650. );
  3651. return;
  3652. }
  3653. if (isAsyncWrapper(vnode) && !isUnmount) {
  3654. if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
  3655. setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
  3656. }
  3657. return;
  3658. }
  3659. const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
  3660. const value = isUnmount ? null : refValue;
  3661. const { i: owner, r: ref2 } = rawRef;
  3662. if (!owner) {
  3663. warn$1(
  3664. `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
  3665. );
  3666. return;
  3667. }
  3668. const oldRef = oldRawRef && oldRawRef.r;
  3669. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  3670. const setupState = owner.setupState;
  3671. const rawSetupState = toRaw(setupState);
  3672. const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
  3673. if (true) {
  3674. if (hasOwn(rawSetupState, key) && !isRef2(rawSetupState[key])) {
  3675. warn$1(
  3676. `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
  3677. );
  3678. }
  3679. if (knownTemplateRefs.has(rawSetupState[key])) {
  3680. return false;
  3681. }
  3682. }
  3683. return hasOwn(rawSetupState, key);
  3684. };
  3685. const canSetRef = (ref22) => {
  3686. return !knownTemplateRefs.has(ref22);
  3687. };
  3688. if (oldRef != null && oldRef !== ref2) {
  3689. invalidatePendingSetRef(oldRawRef);
  3690. if (isString(oldRef)) {
  3691. refs[oldRef] = null;
  3692. if (canSetSetupRef(oldRef)) {
  3693. setupState[oldRef] = null;
  3694. }
  3695. } else if (isRef2(oldRef)) {
  3696. if (canSetRef(oldRef)) {
  3697. oldRef.value = null;
  3698. }
  3699. const oldRawRefAtom = oldRawRef;
  3700. if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
  3701. }
  3702. }
  3703. if (isFunction(ref2)) {
  3704. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  3705. } else {
  3706. const _isString = isString(ref2);
  3707. const _isRef = isRef2(ref2);
  3708. if (_isString || _isRef) {
  3709. const doSet = () => {
  3710. if (rawRef.f) {
  3711. const existing = _isString ? canSetSetupRef(ref2) ? setupState[ref2] : refs[ref2] : canSetRef(ref2) || !rawRef.k ? ref2.value : refs[rawRef.k];
  3712. if (isUnmount) {
  3713. isArray(existing) && remove(existing, refValue);
  3714. } else {
  3715. if (!isArray(existing)) {
  3716. if (_isString) {
  3717. refs[ref2] = [refValue];
  3718. if (canSetSetupRef(ref2)) {
  3719. setupState[ref2] = refs[ref2];
  3720. }
  3721. } else {
  3722. const newVal = [refValue];
  3723. if (canSetRef(ref2)) {
  3724. ref2.value = newVal;
  3725. }
  3726. if (rawRef.k) refs[rawRef.k] = newVal;
  3727. }
  3728. } else if (!existing.includes(refValue)) {
  3729. existing.push(refValue);
  3730. }
  3731. }
  3732. } else if (_isString) {
  3733. refs[ref2] = value;
  3734. if (canSetSetupRef(ref2)) {
  3735. setupState[ref2] = value;
  3736. }
  3737. } else if (_isRef) {
  3738. if (canSetRef(ref2)) {
  3739. ref2.value = value;
  3740. }
  3741. if (rawRef.k) refs[rawRef.k] = value;
  3742. } else if (true) {
  3743. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  3744. }
  3745. };
  3746. if (value) {
  3747. const job = () => {
  3748. doSet();
  3749. pendingSetRefMap.delete(rawRef);
  3750. };
  3751. job.id = -1;
  3752. pendingSetRefMap.set(rawRef, job);
  3753. queuePostRenderEffect(job, parentSuspense);
  3754. } else {
  3755. invalidatePendingSetRef(rawRef);
  3756. doSet();
  3757. }
  3758. } else if (true) {
  3759. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  3760. }
  3761. }
  3762. }
  3763. function invalidatePendingSetRef(rawRef) {
  3764. const pendingSetRef = pendingSetRefMap.get(rawRef);
  3765. if (pendingSetRef) {
  3766. pendingSetRef.flags |= 8;
  3767. pendingSetRefMap.delete(rawRef);
  3768. }
  3769. }
  3770. var hasLoggedMismatchError = false;
  3771. var logMismatchError = () => {
  3772. if (hasLoggedMismatchError) {
  3773. return;
  3774. }
  3775. console.error("Hydration completed but contains mismatches.");
  3776. hasLoggedMismatchError = true;
  3777. };
  3778. var isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
  3779. var isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
  3780. var getContainerType = (container) => {
  3781. if (container.nodeType !== 1) return void 0;
  3782. if (isSVGContainer(container)) return "svg";
  3783. if (isMathMLContainer(container)) return "mathml";
  3784. return void 0;
  3785. };
  3786. var isComment = (node) => node.nodeType === 8;
  3787. function createHydrationFunctions(rendererInternals) {
  3788. const {
  3789. mt: mountComponent,
  3790. p: patch,
  3791. o: {
  3792. patchProp: patchProp2,
  3793. createText,
  3794. nextSibling,
  3795. parentNode,
  3796. remove: remove2,
  3797. insert,
  3798. createComment
  3799. }
  3800. } = rendererInternals;
  3801. const hydrate2 = (vnode, container) => {
  3802. if (!container.hasChildNodes()) {
  3803. warn$1(
  3804. `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
  3805. );
  3806. patch(null, vnode, container);
  3807. flushPostFlushCbs();
  3808. container._vnode = vnode;
  3809. return;
  3810. }
  3811. hydrateNode(container.firstChild, vnode, null, null, null);
  3812. flushPostFlushCbs();
  3813. container._vnode = vnode;
  3814. };
  3815. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  3816. optimized = optimized || !!vnode.dynamicChildren;
  3817. const isFragmentStart = isComment(node) && node.data === "[";
  3818. const onMismatch = () => handleMismatch(
  3819. node,
  3820. vnode,
  3821. parentComponent,
  3822. parentSuspense,
  3823. slotScopeIds,
  3824. isFragmentStart
  3825. );
  3826. const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
  3827. let domType = node.nodeType;
  3828. vnode.el = node;
  3829. if (true) {
  3830. def(node, "__vnode", vnode, true);
  3831. def(node, "__vueParentComponent", parentComponent, true);
  3832. }
  3833. if (patchFlag === -2) {
  3834. optimized = false;
  3835. vnode.dynamicChildren = null;
  3836. }
  3837. let nextNode = null;
  3838. switch (type) {
  3839. case Text:
  3840. if (domType !== 3) {
  3841. if (vnode.children === "") {
  3842. insert(vnode.el = createText(""), parentNode(node), node);
  3843. nextNode = node;
  3844. } else {
  3845. nextNode = onMismatch();
  3846. }
  3847. } else {
  3848. if (node.data !== vnode.children) {
  3849. warn$1(
  3850. `Hydration text mismatch in`,
  3851. node.parentNode,
  3852. `
  3853. - rendered on server: ${JSON.stringify(
  3854. node.data
  3855. )}
  3856. - expected on client: ${JSON.stringify(vnode.children)}`
  3857. );
  3858. logMismatchError();
  3859. node.data = vnode.children;
  3860. }
  3861. nextNode = nextSibling(node);
  3862. }
  3863. break;
  3864. case Comment:
  3865. if (isTemplateNode(node)) {
  3866. nextNode = nextSibling(node);
  3867. replaceNode(
  3868. vnode.el = node.content.firstChild,
  3869. node,
  3870. parentComponent
  3871. );
  3872. } else if (domType !== 8 || isFragmentStart) {
  3873. nextNode = onMismatch();
  3874. } else {
  3875. nextNode = nextSibling(node);
  3876. }
  3877. break;
  3878. case Static:
  3879. if (isFragmentStart) {
  3880. node = nextSibling(node);
  3881. domType = node.nodeType;
  3882. }
  3883. if (domType === 1 || domType === 3) {
  3884. nextNode = node;
  3885. const needToAdoptContent = !vnode.children.length;
  3886. for (let i = 0; i < vnode.staticCount; i++) {
  3887. if (needToAdoptContent)
  3888. vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  3889. if (i === vnode.staticCount - 1) {
  3890. vnode.anchor = nextNode;
  3891. }
  3892. nextNode = nextSibling(nextNode);
  3893. }
  3894. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  3895. } else {
  3896. onMismatch();
  3897. }
  3898. break;
  3899. case Fragment:
  3900. if (!isFragmentStart) {
  3901. nextNode = onMismatch();
  3902. } else {
  3903. nextNode = hydrateFragment(
  3904. node,
  3905. vnode,
  3906. parentComponent,
  3907. parentSuspense,
  3908. slotScopeIds,
  3909. optimized
  3910. );
  3911. }
  3912. break;
  3913. default:
  3914. if (shapeFlag & 1) {
  3915. if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
  3916. nextNode = onMismatch();
  3917. } else {
  3918. nextNode = hydrateElement(
  3919. node,
  3920. vnode,
  3921. parentComponent,
  3922. parentSuspense,
  3923. slotScopeIds,
  3924. optimized
  3925. );
  3926. }
  3927. } else if (shapeFlag & 6) {
  3928. vnode.slotScopeIds = slotScopeIds;
  3929. const container = parentNode(node);
  3930. if (isFragmentStart) {
  3931. nextNode = locateClosingAnchor(node);
  3932. } else if (isComment(node) && node.data === "teleport start") {
  3933. nextNode = locateClosingAnchor(node, node.data, "teleport end");
  3934. } else {
  3935. nextNode = nextSibling(node);
  3936. }
  3937. mountComponent(
  3938. vnode,
  3939. container,
  3940. null,
  3941. parentComponent,
  3942. parentSuspense,
  3943. getContainerType(container),
  3944. optimized
  3945. );
  3946. if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
  3947. let subTree;
  3948. if (isFragmentStart) {
  3949. subTree = createVNode(Fragment);
  3950. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  3951. } else {
  3952. subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  3953. }
  3954. subTree.el = node;
  3955. vnode.component.subTree = subTree;
  3956. }
  3957. } else if (shapeFlag & 64) {
  3958. if (domType !== 8) {
  3959. nextNode = onMismatch();
  3960. } else {
  3961. nextNode = vnode.type.hydrate(
  3962. node,
  3963. vnode,
  3964. parentComponent,
  3965. parentSuspense,
  3966. slotScopeIds,
  3967. optimized,
  3968. rendererInternals,
  3969. hydrateChildren
  3970. );
  3971. }
  3972. } else if (shapeFlag & 128) {
  3973. nextNode = vnode.type.hydrate(
  3974. node,
  3975. vnode,
  3976. parentComponent,
  3977. parentSuspense,
  3978. getContainerType(parentNode(node)),
  3979. slotScopeIds,
  3980. optimized,
  3981. rendererInternals,
  3982. hydrateNode
  3983. );
  3984. } else if (true) {
  3985. warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
  3986. }
  3987. }
  3988. if (ref2 != null) {
  3989. setRef(ref2, null, parentSuspense, vnode);
  3990. }
  3991. return nextNode;
  3992. };
  3993. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  3994. optimized = optimized || !!vnode.dynamicChildren;
  3995. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  3996. const forcePatch = type === "input" || type === "option";
  3997. if (true) {
  3998. if (dirs) {
  3999. invokeDirectiveHook(vnode, null, parentComponent, "created");
  4000. }
  4001. let needCallTransitionHooks = false;
  4002. if (isTemplateNode(el)) {
  4003. needCallTransitionHooks = needTransition(
  4004. null,
  4005. // no need check parentSuspense in hydration
  4006. transition
  4007. ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  4008. const content = el.content.firstChild;
  4009. if (needCallTransitionHooks) {
  4010. const cls = content.getAttribute("class");
  4011. if (cls) content.$cls = cls;
  4012. transition.beforeEnter(content);
  4013. }
  4014. replaceNode(content, el, parentComponent);
  4015. vnode.el = el = content;
  4016. }
  4017. if (shapeFlag & 16 && // skip if element has innerHTML / textContent
  4018. !(props && (props.innerHTML || props.textContent))) {
  4019. let next = hydrateChildren(
  4020. el.firstChild,
  4021. vnode,
  4022. el,
  4023. parentComponent,
  4024. parentSuspense,
  4025. slotScopeIds,
  4026. optimized
  4027. );
  4028. let hasWarned2 = false;
  4029. while (next) {
  4030. if (!isMismatchAllowed(
  4031. el,
  4032. 1
  4033. /* CHILDREN */
  4034. )) {
  4035. if (!hasWarned2) {
  4036. warn$1(
  4037. `Hydration children mismatch on`,
  4038. el,
  4039. `
  4040. Server rendered element contains more child nodes than client vdom.`
  4041. );
  4042. hasWarned2 = true;
  4043. }
  4044. logMismatchError();
  4045. }
  4046. const cur = next;
  4047. next = next.nextSibling;
  4048. remove2(cur);
  4049. }
  4050. } else if (shapeFlag & 8) {
  4051. let clientText = vnode.children;
  4052. if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
  4053. clientText = clientText.slice(1);
  4054. }
  4055. if (el.textContent !== clientText) {
  4056. if (!isMismatchAllowed(
  4057. el,
  4058. 0
  4059. /* TEXT */
  4060. )) {
  4061. warn$1(
  4062. `Hydration text content mismatch on`,
  4063. el,
  4064. `
  4065. - rendered on server: ${el.textContent}
  4066. - expected on client: ${vnode.children}`
  4067. );
  4068. logMismatchError();
  4069. }
  4070. el.textContent = vnode.children;
  4071. }
  4072. }
  4073. if (props) {
  4074. if (true) {
  4075. const isCustomElement = el.tagName.includes("-");
  4076. for (const key in props) {
  4077. if (// #11189 skip if this node has directives that have created hooks
  4078. // as it could have mutated the DOM in any possible way
  4079. !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
  4080. logMismatchError();
  4081. }
  4082. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
  4083. key[0] === "." || isCustomElement) {
  4084. patchProp2(el, key, null, props[key], void 0, parentComponent);
  4085. }
  4086. }
  4087. } else if (props.onClick) {
  4088. patchProp2(
  4089. el,
  4090. "onClick",
  4091. null,
  4092. props.onClick,
  4093. void 0,
  4094. parentComponent
  4095. );
  4096. } else if (patchFlag & 4 && isReactive(props.style)) {
  4097. for (const key in props.style) props.style[key];
  4098. }
  4099. }
  4100. let vnodeHooks;
  4101. if (vnodeHooks = props && props.onVnodeBeforeMount) {
  4102. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  4103. }
  4104. if (dirs) {
  4105. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  4106. }
  4107. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
  4108. queueEffectWithSuspense(() => {
  4109. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  4110. needCallTransitionHooks && transition.enter(el);
  4111. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  4112. }, parentSuspense);
  4113. }
  4114. }
  4115. return el.nextSibling;
  4116. };
  4117. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  4118. optimized = optimized || !!parentVNode.dynamicChildren;
  4119. const children = parentVNode.children;
  4120. const l = children.length;
  4121. let hasWarned2 = false;
  4122. for (let i = 0; i < l; i++) {
  4123. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  4124. const isText = vnode.type === Text;
  4125. if (node) {
  4126. if (isText && !optimized) {
  4127. if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
  4128. insert(
  4129. createText(
  4130. node.data.slice(vnode.children.length)
  4131. ),
  4132. container,
  4133. nextSibling(node)
  4134. );
  4135. node.data = vnode.children;
  4136. }
  4137. }
  4138. node = hydrateNode(
  4139. node,
  4140. vnode,
  4141. parentComponent,
  4142. parentSuspense,
  4143. slotScopeIds,
  4144. optimized
  4145. );
  4146. } else if (isText && !vnode.children) {
  4147. insert(vnode.el = createText(""), container);
  4148. } else {
  4149. if (!isMismatchAllowed(
  4150. container,
  4151. 1
  4152. /* CHILDREN */
  4153. )) {
  4154. if (!hasWarned2) {
  4155. warn$1(
  4156. `Hydration children mismatch on`,
  4157. container,
  4158. `
  4159. Server rendered element contains fewer child nodes than client vdom.`
  4160. );
  4161. hasWarned2 = true;
  4162. }
  4163. logMismatchError();
  4164. }
  4165. patch(
  4166. null,
  4167. vnode,
  4168. container,
  4169. null,
  4170. parentComponent,
  4171. parentSuspense,
  4172. getContainerType(container),
  4173. slotScopeIds
  4174. );
  4175. }
  4176. }
  4177. return node;
  4178. };
  4179. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  4180. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  4181. if (fragmentSlotScopeIds) {
  4182. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  4183. }
  4184. const container = parentNode(node);
  4185. const next = hydrateChildren(
  4186. nextSibling(node),
  4187. vnode,
  4188. container,
  4189. parentComponent,
  4190. parentSuspense,
  4191. slotScopeIds,
  4192. optimized
  4193. );
  4194. if (next && isComment(next) && next.data === "]") {
  4195. return nextSibling(vnode.anchor = next);
  4196. } else {
  4197. logMismatchError();
  4198. insert(vnode.anchor = createComment(`]`), container, next);
  4199. return next;
  4200. }
  4201. };
  4202. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  4203. if (!isMismatchAllowed(
  4204. node.parentElement,
  4205. 1
  4206. /* CHILDREN */
  4207. )) {
  4208. warn$1(
  4209. `Hydration node mismatch:
  4210. - rendered on server:`,
  4211. node,
  4212. node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
  4213. `
  4214. - expected on client:`,
  4215. vnode.type
  4216. );
  4217. logMismatchError();
  4218. }
  4219. vnode.el = null;
  4220. if (isFragment) {
  4221. const end = locateClosingAnchor(node);
  4222. while (true) {
  4223. const next2 = nextSibling(node);
  4224. if (next2 && next2 !== end) {
  4225. remove2(next2);
  4226. } else {
  4227. break;
  4228. }
  4229. }
  4230. }
  4231. const next = nextSibling(node);
  4232. const container = parentNode(node);
  4233. remove2(node);
  4234. patch(
  4235. null,
  4236. vnode,
  4237. container,
  4238. next,
  4239. parentComponent,
  4240. parentSuspense,
  4241. getContainerType(container),
  4242. slotScopeIds
  4243. );
  4244. if (parentComponent) {
  4245. parentComponent.vnode.el = vnode.el;
  4246. updateHOCHostEl(parentComponent, vnode.el);
  4247. }
  4248. return next;
  4249. };
  4250. const locateClosingAnchor = (node, open = "[", close = "]") => {
  4251. let match = 0;
  4252. while (node) {
  4253. node = nextSibling(node);
  4254. if (node && isComment(node)) {
  4255. if (node.data === open) match++;
  4256. if (node.data === close) {
  4257. if (match === 0) {
  4258. return nextSibling(node);
  4259. } else {
  4260. match--;
  4261. }
  4262. }
  4263. }
  4264. }
  4265. return node;
  4266. };
  4267. const replaceNode = (newNode, oldNode, parentComponent) => {
  4268. const parentNode2 = oldNode.parentNode;
  4269. if (parentNode2) {
  4270. parentNode2.replaceChild(newNode, oldNode);
  4271. }
  4272. let parent = parentComponent;
  4273. while (parent) {
  4274. if (parent.vnode.el === oldNode) {
  4275. parent.vnode.el = parent.subTree.el = newNode;
  4276. }
  4277. parent = parent.parent;
  4278. }
  4279. };
  4280. const isTemplateNode = (node) => {
  4281. return node.nodeType === 1 && node.tagName === "TEMPLATE";
  4282. };
  4283. return [hydrate2, hydrateNode];
  4284. }
  4285. function propHasMismatch(el, key, clientValue, vnode, instance) {
  4286. let mismatchType;
  4287. let mismatchKey;
  4288. let actual;
  4289. let expected;
  4290. if (key === "class") {
  4291. if (el.$cls) {
  4292. actual = el.$cls;
  4293. delete el.$cls;
  4294. } else {
  4295. actual = el.getAttribute("class");
  4296. }
  4297. expected = normalizeClass(clientValue);
  4298. if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
  4299. mismatchType = 2;
  4300. mismatchKey = `class`;
  4301. }
  4302. } else if (key === "style") {
  4303. actual = el.getAttribute("style") || "";
  4304. expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
  4305. const actualMap = toStyleMap(actual);
  4306. const expectedMap = toStyleMap(expected);
  4307. if (vnode.dirs) {
  4308. for (const { dir, value } of vnode.dirs) {
  4309. if (dir.name === "show" && !value) {
  4310. expectedMap.set("display", "none");
  4311. }
  4312. }
  4313. }
  4314. if (instance) {
  4315. resolveCssVars(instance, vnode, expectedMap);
  4316. }
  4317. if (!isMapEqual(actualMap, expectedMap)) {
  4318. mismatchType = 3;
  4319. mismatchKey = "style";
  4320. }
  4321. } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
  4322. if (isBooleanAttr(key)) {
  4323. actual = el.hasAttribute(key);
  4324. expected = includeBooleanAttr(clientValue);
  4325. } else if (clientValue == null) {
  4326. actual = el.hasAttribute(key);
  4327. expected = false;
  4328. } else {
  4329. if (el.hasAttribute(key)) {
  4330. actual = el.getAttribute(key);
  4331. } else if (key === "value" && el.tagName === "TEXTAREA") {
  4332. actual = el.value;
  4333. } else {
  4334. actual = false;
  4335. }
  4336. expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
  4337. }
  4338. if (actual !== expected) {
  4339. mismatchType = 4;
  4340. mismatchKey = key;
  4341. }
  4342. }
  4343. if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
  4344. const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
  4345. const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;
  4346. const postSegment = `
  4347. - rendered on server: ${format(actual)}
  4348. - expected on client: ${format(expected)}
  4349. Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  4350. You should fix the source of the mismatch.`;
  4351. {
  4352. warn$1(preSegment, el, postSegment);
  4353. }
  4354. return true;
  4355. }
  4356. return false;
  4357. }
  4358. function toClassSet(str) {
  4359. return new Set(str.trim().split(/\s+/));
  4360. }
  4361. function isSetEqual(a, b) {
  4362. if (a.size !== b.size) {
  4363. return false;
  4364. }
  4365. for (const s of a) {
  4366. if (!b.has(s)) {
  4367. return false;
  4368. }
  4369. }
  4370. return true;
  4371. }
  4372. function toStyleMap(str) {
  4373. const styleMap = /* @__PURE__ */ new Map();
  4374. for (const item of str.split(";")) {
  4375. let [key, value] = item.split(":");
  4376. key = key.trim();
  4377. value = value && value.trim();
  4378. if (key && value) {
  4379. styleMap.set(key, value);
  4380. }
  4381. }
  4382. return styleMap;
  4383. }
  4384. function isMapEqual(a, b) {
  4385. if (a.size !== b.size) {
  4386. return false;
  4387. }
  4388. for (const [key, value] of a) {
  4389. if (value !== b.get(key)) {
  4390. return false;
  4391. }
  4392. }
  4393. return true;
  4394. }
  4395. function resolveCssVars(instance, vnode, expectedMap) {
  4396. const root = instance.subTree;
  4397. if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
  4398. const cssVars = instance.getCssVars();
  4399. for (const key in cssVars) {
  4400. const value = normalizeCssVarValue(cssVars[key]);
  4401. expectedMap.set(`--${getEscapedCssVarName(key, false)}`, value);
  4402. }
  4403. }
  4404. if (vnode === root && instance.parent) {
  4405. resolveCssVars(instance.parent, instance.vnode, expectedMap);
  4406. }
  4407. }
  4408. var allowMismatchAttr = "data-allow-mismatch";
  4409. var MismatchTypeString = {
  4410. [
  4411. 0
  4412. /* TEXT */
  4413. ]: "text",
  4414. [
  4415. 1
  4416. /* CHILDREN */
  4417. ]: "children",
  4418. [
  4419. 2
  4420. /* CLASS */
  4421. ]: "class",
  4422. [
  4423. 3
  4424. /* STYLE */
  4425. ]: "style",
  4426. [
  4427. 4
  4428. /* ATTRIBUTE */
  4429. ]: "attribute"
  4430. };
  4431. function isMismatchAllowed(el, allowedType) {
  4432. if (allowedType === 0 || allowedType === 1) {
  4433. while (el && !el.hasAttribute(allowMismatchAttr)) {
  4434. el = el.parentElement;
  4435. }
  4436. }
  4437. const allowedAttr = el && el.getAttribute(allowMismatchAttr);
  4438. if (allowedAttr == null) {
  4439. return false;
  4440. } else if (allowedAttr === "") {
  4441. return true;
  4442. } else {
  4443. const list = allowedAttr.split(",");
  4444. if (allowedType === 0 && list.includes("children")) {
  4445. return true;
  4446. }
  4447. return list.includes(MismatchTypeString[allowedType]);
  4448. }
  4449. }
  4450. var requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
  4451. var cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
  4452. var hydrateOnIdle = (timeout = 1e4) => (hydrate2) => {
  4453. const id = requestIdleCallback(hydrate2, { timeout });
  4454. return () => cancelIdleCallback(id);
  4455. };
  4456. function elementIsVisibleInViewport(el) {
  4457. const { top, left, bottom, right } = el.getBoundingClientRect();
  4458. const { innerHeight, innerWidth } = window;
  4459. return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
  4460. }
  4461. var hydrateOnVisible = (opts) => (hydrate2, forEach) => {
  4462. const ob = new IntersectionObserver((entries) => {
  4463. for (const e of entries) {
  4464. if (!e.isIntersecting) continue;
  4465. ob.disconnect();
  4466. hydrate2();
  4467. break;
  4468. }
  4469. }, opts);
  4470. forEach((el) => {
  4471. if (!(el instanceof Element)) return;
  4472. if (elementIsVisibleInViewport(el)) {
  4473. hydrate2();
  4474. ob.disconnect();
  4475. return false;
  4476. }
  4477. ob.observe(el);
  4478. });
  4479. return () => ob.disconnect();
  4480. };
  4481. var hydrateOnMediaQuery = (query) => (hydrate2) => {
  4482. if (query) {
  4483. const mql = matchMedia(query);
  4484. if (mql.matches) {
  4485. hydrate2();
  4486. } else {
  4487. mql.addEventListener("change", hydrate2, { once: true });
  4488. return () => mql.removeEventListener("change", hydrate2);
  4489. }
  4490. }
  4491. };
  4492. var hydrateOnInteraction = (interactions = []) => (hydrate2, forEach) => {
  4493. if (isString(interactions)) interactions = [interactions];
  4494. let hasHydrated = false;
  4495. const doHydrate = (e) => {
  4496. if (!hasHydrated) {
  4497. hasHydrated = true;
  4498. teardown();
  4499. hydrate2();
  4500. e.target.dispatchEvent(new e.constructor(e.type, e));
  4501. }
  4502. };
  4503. const teardown = () => {
  4504. forEach((el) => {
  4505. for (const i of interactions) {
  4506. el.removeEventListener(i, doHydrate);
  4507. }
  4508. });
  4509. };
  4510. forEach((el) => {
  4511. for (const i of interactions) {
  4512. el.addEventListener(i, doHydrate, { once: true });
  4513. }
  4514. });
  4515. return teardown;
  4516. };
  4517. function forEachElement(node, cb) {
  4518. if (isComment(node) && node.data === "[") {
  4519. let depth = 1;
  4520. let next = node.nextSibling;
  4521. while (next) {
  4522. if (next.nodeType === 1) {
  4523. const result = cb(next);
  4524. if (result === false) {
  4525. break;
  4526. }
  4527. } else if (isComment(next)) {
  4528. if (next.data === "]") {
  4529. if (--depth === 0) break;
  4530. } else if (next.data === "[") {
  4531. depth++;
  4532. }
  4533. }
  4534. next = next.nextSibling;
  4535. }
  4536. } else {
  4537. cb(node);
  4538. }
  4539. }
  4540. var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  4541. function defineAsyncComponent(source) {
  4542. if (isFunction(source)) {
  4543. source = { loader: source };
  4544. }
  4545. const {
  4546. loader,
  4547. loadingComponent,
  4548. errorComponent,
  4549. delay = 200,
  4550. hydrate: hydrateStrategy,
  4551. timeout,
  4552. // undefined = never times out
  4553. suspensible = true,
  4554. onError: userOnError
  4555. } = source;
  4556. let pendingRequest = null;
  4557. let resolvedComp;
  4558. let retries = 0;
  4559. const retry = () => {
  4560. retries++;
  4561. pendingRequest = null;
  4562. return load();
  4563. };
  4564. const load = () => {
  4565. let thisRequest;
  4566. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  4567. err = err instanceof Error ? err : new Error(String(err));
  4568. if (userOnError) {
  4569. return new Promise((resolve2, reject) => {
  4570. const userRetry = () => resolve2(retry());
  4571. const userFail = () => reject(err);
  4572. userOnError(err, userRetry, userFail, retries + 1);
  4573. });
  4574. } else {
  4575. throw err;
  4576. }
  4577. }).then((comp) => {
  4578. if (thisRequest !== pendingRequest && pendingRequest) {
  4579. return pendingRequest;
  4580. }
  4581. if (!comp) {
  4582. warn$1(
  4583. `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
  4584. );
  4585. }
  4586. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
  4587. comp = comp.default;
  4588. }
  4589. if (comp && !isObject(comp) && !isFunction(comp)) {
  4590. throw new Error(`Invalid async component load result: ${comp}`);
  4591. }
  4592. resolvedComp = comp;
  4593. return comp;
  4594. }));
  4595. };
  4596. return defineComponent({
  4597. name: "AsyncComponentWrapper",
  4598. __asyncLoader: load,
  4599. __asyncHydrate(el, instance, hydrate2) {
  4600. let patched = false;
  4601. (instance.bu || (instance.bu = [])).push(() => patched = true);
  4602. const performHydrate = () => {
  4603. if (patched) {
  4604. if (true) {
  4605. warn$1(
  4606. `Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
  4607. );
  4608. }
  4609. return;
  4610. }
  4611. hydrate2();
  4612. };
  4613. const doHydrate = hydrateStrategy ? () => {
  4614. const teardown = hydrateStrategy(
  4615. performHydrate,
  4616. (cb) => forEachElement(el, cb)
  4617. );
  4618. if (teardown) {
  4619. (instance.bum || (instance.bum = [])).push(teardown);
  4620. }
  4621. } : performHydrate;
  4622. if (resolvedComp) {
  4623. doHydrate();
  4624. } else {
  4625. load().then(() => !instance.isUnmounted && doHydrate());
  4626. }
  4627. },
  4628. get __asyncResolved() {
  4629. return resolvedComp;
  4630. },
  4631. setup() {
  4632. const instance = currentInstance;
  4633. markAsyncBoundary(instance);
  4634. if (resolvedComp) {
  4635. return () => createInnerComp(resolvedComp, instance);
  4636. }
  4637. const onError = (err) => {
  4638. pendingRequest = null;
  4639. handleError(
  4640. err,
  4641. instance,
  4642. 13,
  4643. !errorComponent
  4644. );
  4645. };
  4646. if (suspensible && instance.suspense || isInSSRComponentSetup) {
  4647. return load().then((comp) => {
  4648. return () => createInnerComp(comp, instance);
  4649. }).catch((err) => {
  4650. onError(err);
  4651. return () => errorComponent ? createVNode(errorComponent, {
  4652. error: err
  4653. }) : null;
  4654. });
  4655. }
  4656. const loaded = ref(false);
  4657. const error = ref();
  4658. const delayed = ref(!!delay);
  4659. if (delay) {
  4660. setTimeout(() => {
  4661. delayed.value = false;
  4662. }, delay);
  4663. }
  4664. if (timeout != null) {
  4665. setTimeout(() => {
  4666. if (!loaded.value && !error.value) {
  4667. const err = new Error(
  4668. `Async component timed out after ${timeout}ms.`
  4669. );
  4670. onError(err);
  4671. error.value = err;
  4672. }
  4673. }, timeout);
  4674. }
  4675. load().then(() => {
  4676. loaded.value = true;
  4677. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  4678. instance.parent.update();
  4679. }
  4680. }).catch((err) => {
  4681. onError(err);
  4682. error.value = err;
  4683. });
  4684. return () => {
  4685. if (loaded.value && resolvedComp) {
  4686. return createInnerComp(resolvedComp, instance);
  4687. } else if (error.value && errorComponent) {
  4688. return createVNode(errorComponent, {
  4689. error: error.value
  4690. });
  4691. } else if (loadingComponent && !delayed.value) {
  4692. return createVNode(loadingComponent);
  4693. }
  4694. };
  4695. }
  4696. });
  4697. }
  4698. function createInnerComp(comp, parent) {
  4699. const { ref: ref2, props, children, ce } = parent.vnode;
  4700. const vnode = createVNode(comp, props, children);
  4701. vnode.ref = ref2;
  4702. vnode.ce = ce;
  4703. delete parent.vnode.ce;
  4704. return vnode;
  4705. }
  4706. var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  4707. var KeepAliveImpl = {
  4708. name: `KeepAlive`,
  4709. // Marker for special handling inside the renderer. We are not using a ===
  4710. // check directly on KeepAlive in the renderer, because importing it directly
  4711. // would prevent it from being tree-shaken.
  4712. __isKeepAlive: true,
  4713. props: {
  4714. include: [String, RegExp, Array],
  4715. exclude: [String, RegExp, Array],
  4716. max: [String, Number]
  4717. },
  4718. setup(props, { slots }) {
  4719. const instance = getCurrentInstance();
  4720. const sharedContext = instance.ctx;
  4721. if (!sharedContext.renderer) {
  4722. return () => {
  4723. const children = slots.default && slots.default();
  4724. return children && children.length === 1 ? children[0] : children;
  4725. };
  4726. }
  4727. const cache = /* @__PURE__ */ new Map();
  4728. const keys = /* @__PURE__ */ new Set();
  4729. let current = null;
  4730. if (true) {
  4731. instance.__v_cache = cache;
  4732. }
  4733. const parentSuspense = instance.suspense;
  4734. const {
  4735. renderer: {
  4736. p: patch,
  4737. m: move,
  4738. um: _unmount,
  4739. o: { createElement }
  4740. }
  4741. } = sharedContext;
  4742. const storageContainer = createElement("div");
  4743. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  4744. const instance2 = vnode.component;
  4745. move(vnode, container, anchor, 0, parentSuspense);
  4746. patch(
  4747. instance2.vnode,
  4748. vnode,
  4749. container,
  4750. anchor,
  4751. instance2,
  4752. parentSuspense,
  4753. namespace,
  4754. vnode.slotScopeIds,
  4755. optimized
  4756. );
  4757. queuePostRenderEffect(() => {
  4758. instance2.isDeactivated = false;
  4759. if (instance2.a) {
  4760. invokeArrayFns(instance2.a);
  4761. }
  4762. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  4763. if (vnodeHook) {
  4764. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4765. }
  4766. }, parentSuspense);
  4767. if (true) {
  4768. devtoolsComponentAdded(instance2);
  4769. }
  4770. };
  4771. sharedContext.deactivate = (vnode) => {
  4772. const instance2 = vnode.component;
  4773. invalidateMount(instance2.m);
  4774. invalidateMount(instance2.a);
  4775. move(vnode, storageContainer, null, 1, parentSuspense);
  4776. queuePostRenderEffect(() => {
  4777. if (instance2.da) {
  4778. invokeArrayFns(instance2.da);
  4779. }
  4780. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  4781. if (vnodeHook) {
  4782. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4783. }
  4784. instance2.isDeactivated = true;
  4785. }, parentSuspense);
  4786. if (true) {
  4787. devtoolsComponentAdded(instance2);
  4788. }
  4789. if (true) {
  4790. instance2.__keepAliveStorageContainer = storageContainer;
  4791. }
  4792. };
  4793. function unmount(vnode) {
  4794. resetShapeFlag(vnode);
  4795. _unmount(vnode, instance, parentSuspense, true);
  4796. }
  4797. function pruneCache(filter) {
  4798. cache.forEach((vnode, key) => {
  4799. const name = getComponentName(vnode.type);
  4800. if (name && !filter(name)) {
  4801. pruneCacheEntry(key);
  4802. }
  4803. });
  4804. }
  4805. function pruneCacheEntry(key) {
  4806. const cached = cache.get(key);
  4807. if (cached && (!current || !isSameVNodeType(cached, current))) {
  4808. unmount(cached);
  4809. } else if (current) {
  4810. resetShapeFlag(current);
  4811. }
  4812. cache.delete(key);
  4813. keys.delete(key);
  4814. }
  4815. watch2(
  4816. () => [props.include, props.exclude],
  4817. ([include, exclude]) => {
  4818. include && pruneCache((name) => matches(include, name));
  4819. exclude && pruneCache((name) => !matches(exclude, name));
  4820. },
  4821. // prune post-render after `current` has been updated
  4822. { flush: "post", deep: true }
  4823. );
  4824. let pendingCacheKey = null;
  4825. const cacheSubtree = () => {
  4826. if (pendingCacheKey != null) {
  4827. if (isSuspense(instance.subTree.type)) {
  4828. queuePostRenderEffect(() => {
  4829. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4830. }, instance.subTree.suspense);
  4831. } else {
  4832. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4833. }
  4834. }
  4835. };
  4836. onMounted(cacheSubtree);
  4837. onUpdated(cacheSubtree);
  4838. onBeforeUnmount(() => {
  4839. cache.forEach((cached) => {
  4840. const { subTree, suspense } = instance;
  4841. const vnode = getInnerChild(subTree);
  4842. if (cached.type === vnode.type && cached.key === vnode.key) {
  4843. resetShapeFlag(vnode);
  4844. const da = vnode.component.da;
  4845. da && queuePostRenderEffect(da, suspense);
  4846. return;
  4847. }
  4848. unmount(cached);
  4849. });
  4850. });
  4851. return () => {
  4852. pendingCacheKey = null;
  4853. if (!slots.default) {
  4854. return current = null;
  4855. }
  4856. const children = slots.default();
  4857. const rawVNode = children[0];
  4858. if (children.length > 1) {
  4859. if (true) {
  4860. warn$1(`KeepAlive should contain exactly one component child.`);
  4861. }
  4862. current = null;
  4863. return children;
  4864. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  4865. current = null;
  4866. return rawVNode;
  4867. }
  4868. let vnode = getInnerChild(rawVNode);
  4869. if (vnode.type === Comment) {
  4870. current = null;
  4871. return vnode;
  4872. }
  4873. const comp = vnode.type;
  4874. const name = getComponentName(
  4875. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  4876. );
  4877. const { include, exclude, max } = props;
  4878. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  4879. vnode.shapeFlag &= -257;
  4880. current = vnode;
  4881. return rawVNode;
  4882. }
  4883. const key = vnode.key == null ? comp : vnode.key;
  4884. const cachedVNode = cache.get(key);
  4885. if (vnode.el) {
  4886. vnode = cloneVNode(vnode);
  4887. if (rawVNode.shapeFlag & 128) {
  4888. rawVNode.ssContent = vnode;
  4889. }
  4890. }
  4891. pendingCacheKey = key;
  4892. if (cachedVNode) {
  4893. vnode.el = cachedVNode.el;
  4894. vnode.component = cachedVNode.component;
  4895. if (vnode.transition) {
  4896. setTransitionHooks(vnode, vnode.transition);
  4897. }
  4898. vnode.shapeFlag |= 512;
  4899. keys.delete(key);
  4900. keys.add(key);
  4901. } else {
  4902. keys.add(key);
  4903. if (max && keys.size > parseInt(max, 10)) {
  4904. pruneCacheEntry(keys.values().next().value);
  4905. }
  4906. }
  4907. vnode.shapeFlag |= 256;
  4908. current = vnode;
  4909. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  4910. };
  4911. }
  4912. };
  4913. var KeepAlive = KeepAliveImpl;
  4914. function matches(pattern, name) {
  4915. if (isArray(pattern)) {
  4916. return pattern.some((p2) => matches(p2, name));
  4917. } else if (isString(pattern)) {
  4918. return pattern.split(",").includes(name);
  4919. } else if (isRegExp(pattern)) {
  4920. pattern.lastIndex = 0;
  4921. return pattern.test(name);
  4922. }
  4923. return false;
  4924. }
  4925. function onActivated(hook, target) {
  4926. registerKeepAliveHook(hook, "a", target);
  4927. }
  4928. function onDeactivated(hook, target) {
  4929. registerKeepAliveHook(hook, "da", target);
  4930. }
  4931. function registerKeepAliveHook(hook, type, target = currentInstance) {
  4932. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  4933. let current = target;
  4934. while (current) {
  4935. if (current.isDeactivated) {
  4936. return;
  4937. }
  4938. current = current.parent;
  4939. }
  4940. return hook();
  4941. });
  4942. injectHook(type, wrappedHook, target);
  4943. if (target) {
  4944. let current = target.parent;
  4945. while (current && current.parent) {
  4946. if (isKeepAlive(current.parent.vnode)) {
  4947. injectToKeepAliveRoot(wrappedHook, type, target, current);
  4948. }
  4949. current = current.parent;
  4950. }
  4951. }
  4952. }
  4953. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  4954. const injected = injectHook(
  4955. type,
  4956. hook,
  4957. keepAliveRoot,
  4958. true
  4959. /* prepend */
  4960. );
  4961. onUnmounted(() => {
  4962. remove(keepAliveRoot[type], injected);
  4963. }, target);
  4964. }
  4965. function resetShapeFlag(vnode) {
  4966. vnode.shapeFlag &= -257;
  4967. vnode.shapeFlag &= -513;
  4968. }
  4969. function getInnerChild(vnode) {
  4970. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  4971. }
  4972. function injectHook(type, hook, target = currentInstance, prepend = false) {
  4973. if (target) {
  4974. const hooks = target[type] || (target[type] = []);
  4975. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  4976. pauseTracking();
  4977. const reset = setCurrentInstance(target);
  4978. const res = callWithAsyncErrorHandling(hook, target, type, args);
  4979. reset();
  4980. resetTracking();
  4981. return res;
  4982. });
  4983. if (prepend) {
  4984. hooks.unshift(wrappedHook);
  4985. } else {
  4986. hooks.push(wrappedHook);
  4987. }
  4988. return wrappedHook;
  4989. } else if (true) {
  4990. const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
  4991. warn$1(
  4992. `${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.`
  4993. );
  4994. }
  4995. }
  4996. var createHook = (lifecycle) => (hook, target = currentInstance) => {
  4997. if (!isInSSRComponentSetup || lifecycle === "sp") {
  4998. injectHook(lifecycle, (...args) => hook(...args), target);
  4999. }
  5000. };
  5001. var onBeforeMount = createHook("bm");
  5002. var onMounted = createHook("m");
  5003. var onBeforeUpdate = createHook(
  5004. "bu"
  5005. );
  5006. var onUpdated = createHook("u");
  5007. var onBeforeUnmount = createHook(
  5008. "bum"
  5009. );
  5010. var onUnmounted = createHook("um");
  5011. var onServerPrefetch = createHook(
  5012. "sp"
  5013. );
  5014. var onRenderTriggered = createHook("rtg");
  5015. var onRenderTracked = createHook("rtc");
  5016. function onErrorCaptured(hook, target = currentInstance) {
  5017. injectHook("ec", hook, target);
  5018. }
  5019. var COMPONENTS = "components";
  5020. var DIRECTIVES = "directives";
  5021. function resolveComponent(name, maybeSelfReference) {
  5022. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  5023. }
  5024. var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  5025. function resolveDynamicComponent(component) {
  5026. if (isString(component)) {
  5027. return resolveAsset(COMPONENTS, component, false) || component;
  5028. } else {
  5029. return component || NULL_DYNAMIC_COMPONENT;
  5030. }
  5031. }
  5032. function resolveDirective(name) {
  5033. return resolveAsset(DIRECTIVES, name);
  5034. }
  5035. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  5036. const instance = currentRenderingInstance || currentInstance;
  5037. if (instance) {
  5038. const Component = instance.type;
  5039. if (type === COMPONENTS) {
  5040. const selfName = getComponentName(
  5041. Component,
  5042. false
  5043. );
  5044. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  5045. return Component;
  5046. }
  5047. }
  5048. const res = (
  5049. // local registration
  5050. // check instance[type] first which is resolved for options API
  5051. resolve(instance[type] || Component[type], name) || // global registration
  5052. resolve(instance.appContext[type], name)
  5053. );
  5054. if (!res && maybeSelfReference) {
  5055. return Component;
  5056. }
  5057. if (warnMissing && !res) {
  5058. const extra = type === COMPONENTS ? `
  5059. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  5060. warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  5061. }
  5062. return res;
  5063. } else if (true) {
  5064. warn$1(
  5065. `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
  5066. );
  5067. }
  5068. }
  5069. function resolve(registry, name) {
  5070. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  5071. }
  5072. function renderList(source, renderItem, cache, index) {
  5073. let ret;
  5074. const cached = cache && cache[index];
  5075. const sourceIsArray = isArray(source);
  5076. if (sourceIsArray || isString(source)) {
  5077. const sourceIsReactiveArray = sourceIsArray && isReactive(source);
  5078. let needsWrap = false;
  5079. let isReadonlySource = false;
  5080. if (sourceIsReactiveArray) {
  5081. needsWrap = !isShallow(source);
  5082. isReadonlySource = isReadonly(source);
  5083. source = shallowReadArray(source);
  5084. }
  5085. ret = new Array(source.length);
  5086. for (let i = 0, l = source.length; i < l; i++) {
  5087. ret[i] = renderItem(
  5088. needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
  5089. i,
  5090. void 0,
  5091. cached && cached[i]
  5092. );
  5093. }
  5094. } else if (typeof source === "number") {
  5095. if (!Number.isInteger(source)) {
  5096. warn$1(`The v-for range expect an integer value but got ${source}.`);
  5097. }
  5098. ret = new Array(source);
  5099. for (let i = 0; i < source; i++) {
  5100. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  5101. }
  5102. } else if (isObject(source)) {
  5103. if (source[Symbol.iterator]) {
  5104. ret = Array.from(
  5105. source,
  5106. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  5107. );
  5108. } else {
  5109. const keys = Object.keys(source);
  5110. ret = new Array(keys.length);
  5111. for (let i = 0, l = keys.length; i < l; i++) {
  5112. const key = keys[i];
  5113. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  5114. }
  5115. }
  5116. } else {
  5117. ret = [];
  5118. }
  5119. if (cache) {
  5120. cache[index] = ret;
  5121. }
  5122. return ret;
  5123. }
  5124. function createSlots(slots, dynamicSlots) {
  5125. for (let i = 0; i < dynamicSlots.length; i++) {
  5126. const slot = dynamicSlots[i];
  5127. if (isArray(slot)) {
  5128. for (let j = 0; j < slot.length; j++) {
  5129. slots[slot[j].name] = slot[j].fn;
  5130. }
  5131. } else if (slot) {
  5132. slots[slot.name] = slot.key ? (...args) => {
  5133. const res = slot.fn(...args);
  5134. if (res) res.key = slot.key;
  5135. return res;
  5136. } : slot.fn;
  5137. }
  5138. }
  5139. return slots;
  5140. }
  5141. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  5142. if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
  5143. if (name !== "default") props.name = name;
  5144. return openBlock(), createBlock(
  5145. Fragment,
  5146. null,
  5147. [createVNode("slot", props, fallback && fallback())],
  5148. 64
  5149. );
  5150. }
  5151. let slot = slots[name];
  5152. if (slot && slot.length > 1) {
  5153. warn$1(
  5154. `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.`
  5155. );
  5156. slot = () => [];
  5157. }
  5158. if (slot && slot._c) {
  5159. slot._d = false;
  5160. }
  5161. openBlock();
  5162. const validSlotContent = slot && ensureValidVNode(slot(props));
  5163. const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
  5164. // key attached in the `createSlots` helper, respect that
  5165. validSlotContent && validSlotContent.key;
  5166. const rendered = createBlock(
  5167. Fragment,
  5168. {
  5169. key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
  5170. (!validSlotContent && fallback ? "_fb" : "")
  5171. },
  5172. validSlotContent || (fallback ? fallback() : []),
  5173. validSlotContent && slots._ === 1 ? 64 : -2
  5174. );
  5175. if (!noSlotted && rendered.scopeId) {
  5176. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  5177. }
  5178. if (slot && slot._c) {
  5179. slot._d = true;
  5180. }
  5181. return rendered;
  5182. }
  5183. function ensureValidVNode(vnodes) {
  5184. return vnodes.some((child) => {
  5185. if (!isVNode(child)) return true;
  5186. if (child.type === Comment) return false;
  5187. if (child.type === Fragment && !ensureValidVNode(child.children))
  5188. return false;
  5189. return true;
  5190. }) ? vnodes : null;
  5191. }
  5192. function toHandlers(obj, preserveCaseIfNecessary) {
  5193. const ret = {};
  5194. if (!isObject(obj)) {
  5195. warn$1(`v-on with no argument expects an object value.`);
  5196. return ret;
  5197. }
  5198. for (const key in obj) {
  5199. ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  5200. }
  5201. return ret;
  5202. }
  5203. var getPublicInstance = (i) => {
  5204. if (!i) return null;
  5205. if (isStatefulComponent(i)) return getComponentPublicInstance(i);
  5206. return getPublicInstance(i.parent);
  5207. };
  5208. var publicPropertiesMap = (
  5209. // Move PURE marker to new line to workaround compiler discarding it
  5210. // due to type annotation
  5211. extend(/* @__PURE__ */ Object.create(null), {
  5212. $: (i) => i,
  5213. $el: (i) => i.vnode.el,
  5214. $data: (i) => i.data,
  5215. $props: (i) => true ? shallowReadonly(i.props) : i.props,
  5216. $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
  5217. $slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
  5218. $refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
  5219. $parent: (i) => getPublicInstance(i.parent),
  5220. $root: (i) => getPublicInstance(i.root),
  5221. $host: (i) => i.ce,
  5222. $emit: (i) => i.emit,
  5223. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  5224. $forceUpdate: (i) => i.f || (i.f = () => {
  5225. queueJob(i.update);
  5226. }),
  5227. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  5228. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  5229. })
  5230. );
  5231. var isReservedPrefix = (key) => key === "_" || key === "$";
  5232. var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  5233. var PublicInstanceProxyHandlers = {
  5234. get({ _: instance }, key) {
  5235. if (key === "__v_skip") {
  5236. return true;
  5237. }
  5238. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  5239. if (key === "__isVue") {
  5240. return true;
  5241. }
  5242. let normalizedProps;
  5243. if (key[0] !== "$") {
  5244. const n = accessCache[key];
  5245. if (n !== void 0) {
  5246. switch (n) {
  5247. case 1:
  5248. return setupState[key];
  5249. case 2:
  5250. return data[key];
  5251. case 4:
  5252. return ctx[key];
  5253. case 3:
  5254. return props[key];
  5255. }
  5256. } else if (hasSetupBinding(setupState, key)) {
  5257. accessCache[key] = 1;
  5258. return setupState[key];
  5259. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  5260. accessCache[key] = 2;
  5261. return data[key];
  5262. } else if (
  5263. // only cache other properties when instance has declared (thus stable)
  5264. // props
  5265. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  5266. ) {
  5267. accessCache[key] = 3;
  5268. return props[key];
  5269. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  5270. accessCache[key] = 4;
  5271. return ctx[key];
  5272. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
  5273. accessCache[key] = 0;
  5274. }
  5275. }
  5276. const publicGetter = publicPropertiesMap[key];
  5277. let cssModule, globalProperties;
  5278. if (publicGetter) {
  5279. if (key === "$attrs") {
  5280. track(instance.attrs, "get", "");
  5281. markAttrsAccessed();
  5282. } else if (key === "$slots") {
  5283. track(instance, "get", key);
  5284. }
  5285. return publicGetter(instance);
  5286. } else if (
  5287. // css module (injected by vue-loader)
  5288. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  5289. ) {
  5290. return cssModule;
  5291. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  5292. accessCache[key] = 4;
  5293. return ctx[key];
  5294. } else if (
  5295. // global properties
  5296. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  5297. ) {
  5298. {
  5299. return globalProperties[key];
  5300. }
  5301. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  5302. // to infinite warning loop
  5303. key.indexOf("__v") !== 0)) {
  5304. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  5305. warn$1(
  5306. `Property ${JSON.stringify(
  5307. key
  5308. )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
  5309. );
  5310. } else if (instance === currentRenderingInstance) {
  5311. warn$1(
  5312. `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
  5313. );
  5314. }
  5315. }
  5316. },
  5317. set({ _: instance }, key, value) {
  5318. const { data, setupState, ctx } = instance;
  5319. if (hasSetupBinding(setupState, key)) {
  5320. setupState[key] = value;
  5321. return true;
  5322. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  5323. warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  5324. return false;
  5325. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  5326. data[key] = value;
  5327. return true;
  5328. } else if (hasOwn(instance.props, key)) {
  5329. warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
  5330. return false;
  5331. }
  5332. if (key[0] === "$" && key.slice(1) in instance) {
  5333. warn$1(
  5334. `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
  5335. );
  5336. return false;
  5337. } else {
  5338. if (key in instance.appContext.config.globalProperties) {
  5339. Object.defineProperty(ctx, key, {
  5340. enumerable: true,
  5341. configurable: true,
  5342. value
  5343. });
  5344. } else {
  5345. ctx[key] = value;
  5346. }
  5347. }
  5348. return true;
  5349. },
  5350. has({
  5351. _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
  5352. }, key) {
  5353. let normalizedProps, cssModules;
  5354. return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
  5355. },
  5356. defineProperty(target, key, descriptor) {
  5357. if (descriptor.get != null) {
  5358. target._.accessCache[key] = 0;
  5359. } else if (hasOwn(descriptor, "value")) {
  5360. this.set(target, key, descriptor.value, null);
  5361. }
  5362. return Reflect.defineProperty(target, key, descriptor);
  5363. }
  5364. };
  5365. if (true) {
  5366. PublicInstanceProxyHandlers.ownKeys = (target) => {
  5367. warn$1(
  5368. `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
  5369. );
  5370. return Reflect.ownKeys(target);
  5371. };
  5372. }
  5373. var RuntimeCompiledPublicInstanceProxyHandlers = extend({}, PublicInstanceProxyHandlers, {
  5374. get(target, key) {
  5375. if (key === Symbol.unscopables) {
  5376. return;
  5377. }
  5378. return PublicInstanceProxyHandlers.get(target, key, target);
  5379. },
  5380. has(_, key) {
  5381. const has = key[0] !== "_" && !isGloballyAllowed(key);
  5382. if (!has && PublicInstanceProxyHandlers.has(_, key)) {
  5383. warn$1(
  5384. `Property ${JSON.stringify(
  5385. key
  5386. )} should not start with _ which is a reserved prefix for Vue internals.`
  5387. );
  5388. }
  5389. return has;
  5390. }
  5391. });
  5392. function createDevRenderContext(instance) {
  5393. const target = {};
  5394. Object.defineProperty(target, `_`, {
  5395. configurable: true,
  5396. enumerable: false,
  5397. get: () => instance
  5398. });
  5399. Object.keys(publicPropertiesMap).forEach((key) => {
  5400. Object.defineProperty(target, key, {
  5401. configurable: true,
  5402. enumerable: false,
  5403. get: () => publicPropertiesMap[key](instance),
  5404. // intercepted by the proxy so no need for implementation,
  5405. // but needed to prevent set errors
  5406. set: NOOP
  5407. });
  5408. });
  5409. return target;
  5410. }
  5411. function exposePropsOnRenderContext(instance) {
  5412. const {
  5413. ctx,
  5414. propsOptions: [propsOptions]
  5415. } = instance;
  5416. if (propsOptions) {
  5417. Object.keys(propsOptions).forEach((key) => {
  5418. Object.defineProperty(ctx, key, {
  5419. enumerable: true,
  5420. configurable: true,
  5421. get: () => instance.props[key],
  5422. set: NOOP
  5423. });
  5424. });
  5425. }
  5426. }
  5427. function exposeSetupStateOnRenderContext(instance) {
  5428. const { ctx, setupState } = instance;
  5429. Object.keys(toRaw(setupState)).forEach((key) => {
  5430. if (!setupState.__isScriptSetup) {
  5431. if (isReservedPrefix(key[0])) {
  5432. warn$1(
  5433. `setup() return property ${JSON.stringify(
  5434. key
  5435. )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
  5436. );
  5437. return;
  5438. }
  5439. Object.defineProperty(ctx, key, {
  5440. enumerable: true,
  5441. configurable: true,
  5442. get: () => setupState[key],
  5443. set: NOOP
  5444. });
  5445. }
  5446. });
  5447. }
  5448. var warnRuntimeUsage = (method) => warn$1(
  5449. `${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.`
  5450. );
  5451. function defineProps() {
  5452. if (true) {
  5453. warnRuntimeUsage(`defineProps`);
  5454. }
  5455. return null;
  5456. }
  5457. function defineEmits() {
  5458. if (true) {
  5459. warnRuntimeUsage(`defineEmits`);
  5460. }
  5461. return null;
  5462. }
  5463. function defineExpose(exposed) {
  5464. if (true) {
  5465. warnRuntimeUsage(`defineExpose`);
  5466. }
  5467. }
  5468. function defineOptions(options) {
  5469. if (true) {
  5470. warnRuntimeUsage(`defineOptions`);
  5471. }
  5472. }
  5473. function defineSlots() {
  5474. if (true) {
  5475. warnRuntimeUsage(`defineSlots`);
  5476. }
  5477. return null;
  5478. }
  5479. function defineModel() {
  5480. if (true) {
  5481. warnRuntimeUsage("defineModel");
  5482. }
  5483. }
  5484. function withDefaults(props, defaults) {
  5485. if (true) {
  5486. warnRuntimeUsage(`withDefaults`);
  5487. }
  5488. return null;
  5489. }
  5490. function useSlots() {
  5491. return getContext("useSlots").slots;
  5492. }
  5493. function useAttrs() {
  5494. return getContext("useAttrs").attrs;
  5495. }
  5496. function getContext(calledFunctionName) {
  5497. const i = getCurrentInstance();
  5498. if (!i) {
  5499. warn$1(`${calledFunctionName}() called without active instance.`);
  5500. }
  5501. return i.setupContext || (i.setupContext = createSetupContext(i));
  5502. }
  5503. function normalizePropsOrEmits(props) {
  5504. return isArray(props) ? props.reduce(
  5505. (normalized, p2) => (normalized[p2] = null, normalized),
  5506. {}
  5507. ) : props;
  5508. }
  5509. function mergeDefaults(raw, defaults) {
  5510. const props = normalizePropsOrEmits(raw);
  5511. for (const key in defaults) {
  5512. if (key.startsWith("__skip")) continue;
  5513. let opt = props[key];
  5514. if (opt) {
  5515. if (isArray(opt) || isFunction(opt)) {
  5516. opt = props[key] = { type: opt, default: defaults[key] };
  5517. } else {
  5518. opt.default = defaults[key];
  5519. }
  5520. } else if (opt === null) {
  5521. opt = props[key] = { default: defaults[key] };
  5522. } else if (true) {
  5523. warn$1(`props default key "${key}" has no corresponding declaration.`);
  5524. }
  5525. if (opt && defaults[`__skip_${key}`]) {
  5526. opt.skipFactory = true;
  5527. }
  5528. }
  5529. return props;
  5530. }
  5531. function mergeModels(a, b) {
  5532. if (!a || !b) return a || b;
  5533. if (isArray(a) && isArray(b)) return a.concat(b);
  5534. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  5535. }
  5536. function createPropsRestProxy(props, excludedKeys) {
  5537. const ret = {};
  5538. for (const key in props) {
  5539. if (!excludedKeys.includes(key)) {
  5540. Object.defineProperty(ret, key, {
  5541. enumerable: true,
  5542. get: () => props[key]
  5543. });
  5544. }
  5545. }
  5546. return ret;
  5547. }
  5548. function withAsyncContext(getAwaitable) {
  5549. const ctx = getCurrentInstance();
  5550. if (!ctx) {
  5551. warn$1(
  5552. `withAsyncContext called without active current instance. This is likely a bug.`
  5553. );
  5554. }
  5555. let awaitable = getAwaitable();
  5556. unsetCurrentInstance();
  5557. if (isPromise(awaitable)) {
  5558. awaitable = awaitable.catch((e) => {
  5559. setCurrentInstance(ctx);
  5560. throw e;
  5561. });
  5562. }
  5563. return [awaitable, () => setCurrentInstance(ctx)];
  5564. }
  5565. function createDuplicateChecker() {
  5566. const cache = /* @__PURE__ */ Object.create(null);
  5567. return (type, key) => {
  5568. if (cache[key]) {
  5569. warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
  5570. } else {
  5571. cache[key] = type;
  5572. }
  5573. };
  5574. }
  5575. var shouldCacheAccess = true;
  5576. function applyOptions(instance) {
  5577. const options = resolveMergedOptions(instance);
  5578. const publicThis = instance.proxy;
  5579. const ctx = instance.ctx;
  5580. shouldCacheAccess = false;
  5581. if (options.beforeCreate) {
  5582. callHook(options.beforeCreate, instance, "bc");
  5583. }
  5584. const {
  5585. // state
  5586. data: dataOptions,
  5587. computed: computedOptions,
  5588. methods,
  5589. watch: watchOptions,
  5590. provide: provideOptions,
  5591. inject: injectOptions,
  5592. // lifecycle
  5593. created,
  5594. beforeMount,
  5595. mounted,
  5596. beforeUpdate,
  5597. updated,
  5598. activated,
  5599. deactivated,
  5600. beforeDestroy,
  5601. beforeUnmount,
  5602. destroyed,
  5603. unmounted,
  5604. render: render2,
  5605. renderTracked,
  5606. renderTriggered,
  5607. errorCaptured,
  5608. serverPrefetch,
  5609. // public API
  5610. expose,
  5611. inheritAttrs,
  5612. // assets
  5613. components,
  5614. directives,
  5615. filters
  5616. } = options;
  5617. const checkDuplicateProperties = true ? createDuplicateChecker() : null;
  5618. if (true) {
  5619. const [propsOptions] = instance.propsOptions;
  5620. if (propsOptions) {
  5621. for (const key in propsOptions) {
  5622. checkDuplicateProperties("Props", key);
  5623. }
  5624. }
  5625. }
  5626. if (injectOptions) {
  5627. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  5628. }
  5629. if (methods) {
  5630. for (const key in methods) {
  5631. const methodHandler = methods[key];
  5632. if (isFunction(methodHandler)) {
  5633. if (true) {
  5634. Object.defineProperty(ctx, key, {
  5635. value: methodHandler.bind(publicThis),
  5636. configurable: true,
  5637. enumerable: true,
  5638. writable: true
  5639. });
  5640. } else {
  5641. ctx[key] = methodHandler.bind(publicThis);
  5642. }
  5643. if (true) {
  5644. checkDuplicateProperties("Methods", key);
  5645. }
  5646. } else if (true) {
  5647. warn$1(
  5648. `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
  5649. );
  5650. }
  5651. }
  5652. }
  5653. if (dataOptions) {
  5654. if (!isFunction(dataOptions)) {
  5655. warn$1(
  5656. `The data option must be a function. Plain object usage is no longer supported.`
  5657. );
  5658. }
  5659. const data = dataOptions.call(publicThis, publicThis);
  5660. if (isPromise(data)) {
  5661. warn$1(
  5662. `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
  5663. );
  5664. }
  5665. if (!isObject(data)) {
  5666. warn$1(`data() should return an object.`);
  5667. } else {
  5668. instance.data = reactive(data);
  5669. if (true) {
  5670. for (const key in data) {
  5671. checkDuplicateProperties("Data", key);
  5672. if (!isReservedPrefix(key[0])) {
  5673. Object.defineProperty(ctx, key, {
  5674. configurable: true,
  5675. enumerable: true,
  5676. get: () => data[key],
  5677. set: NOOP
  5678. });
  5679. }
  5680. }
  5681. }
  5682. }
  5683. }
  5684. shouldCacheAccess = true;
  5685. if (computedOptions) {
  5686. for (const key in computedOptions) {
  5687. const opt = computedOptions[key];
  5688. const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  5689. if (get === NOOP) {
  5690. warn$1(`Computed property "${key}" has no getter.`);
  5691. }
  5692. const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : true ? () => {
  5693. warn$1(
  5694. `Write operation failed: computed property "${key}" is readonly.`
  5695. );
  5696. } : NOOP;
  5697. const c = computed2({
  5698. get,
  5699. set
  5700. });
  5701. Object.defineProperty(ctx, key, {
  5702. enumerable: true,
  5703. configurable: true,
  5704. get: () => c.value,
  5705. set: (v) => c.value = v
  5706. });
  5707. if (true) {
  5708. checkDuplicateProperties("Computed", key);
  5709. }
  5710. }
  5711. }
  5712. if (watchOptions) {
  5713. for (const key in watchOptions) {
  5714. createWatcher(watchOptions[key], ctx, publicThis, key);
  5715. }
  5716. }
  5717. if (provideOptions) {
  5718. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  5719. Reflect.ownKeys(provides).forEach((key) => {
  5720. provide(key, provides[key]);
  5721. });
  5722. }
  5723. if (created) {
  5724. callHook(created, instance, "c");
  5725. }
  5726. function registerLifecycleHook(register, hook) {
  5727. if (isArray(hook)) {
  5728. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  5729. } else if (hook) {
  5730. register(hook.bind(publicThis));
  5731. }
  5732. }
  5733. registerLifecycleHook(onBeforeMount, beforeMount);
  5734. registerLifecycleHook(onMounted, mounted);
  5735. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  5736. registerLifecycleHook(onUpdated, updated);
  5737. registerLifecycleHook(onActivated, activated);
  5738. registerLifecycleHook(onDeactivated, deactivated);
  5739. registerLifecycleHook(onErrorCaptured, errorCaptured);
  5740. registerLifecycleHook(onRenderTracked, renderTracked);
  5741. registerLifecycleHook(onRenderTriggered, renderTriggered);
  5742. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  5743. registerLifecycleHook(onUnmounted, unmounted);
  5744. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  5745. if (isArray(expose)) {
  5746. if (expose.length) {
  5747. const exposed = instance.exposed || (instance.exposed = {});
  5748. expose.forEach((key) => {
  5749. Object.defineProperty(exposed, key, {
  5750. get: () => publicThis[key],
  5751. set: (val) => publicThis[key] = val,
  5752. enumerable: true
  5753. });
  5754. });
  5755. } else if (!instance.exposed) {
  5756. instance.exposed = {};
  5757. }
  5758. }
  5759. if (render2 && instance.render === NOOP) {
  5760. instance.render = render2;
  5761. }
  5762. if (inheritAttrs != null) {
  5763. instance.inheritAttrs = inheritAttrs;
  5764. }
  5765. if (components) instance.components = components;
  5766. if (directives) instance.directives = directives;
  5767. if (serverPrefetch) {
  5768. markAsyncBoundary(instance);
  5769. }
  5770. }
  5771. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  5772. if (isArray(injectOptions)) {
  5773. injectOptions = normalizeInject(injectOptions);
  5774. }
  5775. for (const key in injectOptions) {
  5776. const opt = injectOptions[key];
  5777. let injected;
  5778. if (isObject(opt)) {
  5779. if ("default" in opt) {
  5780. injected = inject(
  5781. opt.from || key,
  5782. opt.default,
  5783. true
  5784. );
  5785. } else {
  5786. injected = inject(opt.from || key);
  5787. }
  5788. } else {
  5789. injected = inject(opt);
  5790. }
  5791. if (isRef2(injected)) {
  5792. Object.defineProperty(ctx, key, {
  5793. enumerable: true,
  5794. configurable: true,
  5795. get: () => injected.value,
  5796. set: (v) => injected.value = v
  5797. });
  5798. } else {
  5799. ctx[key] = injected;
  5800. }
  5801. if (true) {
  5802. checkDuplicateProperties("Inject", key);
  5803. }
  5804. }
  5805. }
  5806. function callHook(hook, instance, type) {
  5807. callWithAsyncErrorHandling(
  5808. isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  5809. instance,
  5810. type
  5811. );
  5812. }
  5813. function createWatcher(raw, ctx, publicThis, key) {
  5814. let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  5815. if (isString(raw)) {
  5816. const handler = ctx[raw];
  5817. if (isFunction(handler)) {
  5818. {
  5819. watch2(getter, handler);
  5820. }
  5821. } else if (true) {
  5822. warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
  5823. }
  5824. } else if (isFunction(raw)) {
  5825. {
  5826. watch2(getter, raw.bind(publicThis));
  5827. }
  5828. } else if (isObject(raw)) {
  5829. if (isArray(raw)) {
  5830. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  5831. } else {
  5832. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  5833. if (isFunction(handler)) {
  5834. watch2(getter, handler, raw);
  5835. } else if (true) {
  5836. warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  5837. }
  5838. }
  5839. } else if (true) {
  5840. warn$1(`Invalid watch option: "${key}"`, raw);
  5841. }
  5842. }
  5843. function resolveMergedOptions(instance) {
  5844. const base = instance.type;
  5845. const { mixins, extends: extendsOptions } = base;
  5846. const {
  5847. mixins: globalMixins,
  5848. optionsCache: cache,
  5849. config: { optionMergeStrategies }
  5850. } = instance.appContext;
  5851. const cached = cache.get(base);
  5852. let resolved;
  5853. if (cached) {
  5854. resolved = cached;
  5855. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  5856. {
  5857. resolved = base;
  5858. }
  5859. } else {
  5860. resolved = {};
  5861. if (globalMixins.length) {
  5862. globalMixins.forEach(
  5863. (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
  5864. );
  5865. }
  5866. mergeOptions(resolved, base, optionMergeStrategies);
  5867. }
  5868. if (isObject(base)) {
  5869. cache.set(base, resolved);
  5870. }
  5871. return resolved;
  5872. }
  5873. function mergeOptions(to, from, strats, asMixin = false) {
  5874. const { mixins, extends: extendsOptions } = from;
  5875. if (extendsOptions) {
  5876. mergeOptions(to, extendsOptions, strats, true);
  5877. }
  5878. if (mixins) {
  5879. mixins.forEach(
  5880. (m) => mergeOptions(to, m, strats, true)
  5881. );
  5882. }
  5883. for (const key in from) {
  5884. if (asMixin && key === "expose") {
  5885. warn$1(
  5886. `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
  5887. );
  5888. } else {
  5889. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  5890. to[key] = strat ? strat(to[key], from[key]) : from[key];
  5891. }
  5892. }
  5893. return to;
  5894. }
  5895. var internalOptionMergeStrats = {
  5896. data: mergeDataFn,
  5897. props: mergeEmitsOrPropsOptions,
  5898. emits: mergeEmitsOrPropsOptions,
  5899. // objects
  5900. methods: mergeObjectOptions,
  5901. computed: mergeObjectOptions,
  5902. // lifecycle
  5903. beforeCreate: mergeAsArray,
  5904. created: mergeAsArray,
  5905. beforeMount: mergeAsArray,
  5906. mounted: mergeAsArray,
  5907. beforeUpdate: mergeAsArray,
  5908. updated: mergeAsArray,
  5909. beforeDestroy: mergeAsArray,
  5910. beforeUnmount: mergeAsArray,
  5911. destroyed: mergeAsArray,
  5912. unmounted: mergeAsArray,
  5913. activated: mergeAsArray,
  5914. deactivated: mergeAsArray,
  5915. errorCaptured: mergeAsArray,
  5916. serverPrefetch: mergeAsArray,
  5917. // assets
  5918. components: mergeObjectOptions,
  5919. directives: mergeObjectOptions,
  5920. // watch
  5921. watch: mergeWatchOptions,
  5922. // provide / inject
  5923. provide: mergeDataFn,
  5924. inject: mergeInject
  5925. };
  5926. function mergeDataFn(to, from) {
  5927. if (!from) {
  5928. return to;
  5929. }
  5930. if (!to) {
  5931. return from;
  5932. }
  5933. return function mergedDataFn() {
  5934. return extend(
  5935. isFunction(to) ? to.call(this, this) : to,
  5936. isFunction(from) ? from.call(this, this) : from
  5937. );
  5938. };
  5939. }
  5940. function mergeInject(to, from) {
  5941. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  5942. }
  5943. function normalizeInject(raw) {
  5944. if (isArray(raw)) {
  5945. const res = {};
  5946. for (let i = 0; i < raw.length; i++) {
  5947. res[raw[i]] = raw[i];
  5948. }
  5949. return res;
  5950. }
  5951. return raw;
  5952. }
  5953. function mergeAsArray(to, from) {
  5954. return to ? [...new Set([].concat(to, from))] : from;
  5955. }
  5956. function mergeObjectOptions(to, from) {
  5957. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  5958. }
  5959. function mergeEmitsOrPropsOptions(to, from) {
  5960. if (to) {
  5961. if (isArray(to) && isArray(from)) {
  5962. return [.../* @__PURE__ */ new Set([...to, ...from])];
  5963. }
  5964. return extend(
  5965. /* @__PURE__ */ Object.create(null),
  5966. normalizePropsOrEmits(to),
  5967. normalizePropsOrEmits(from != null ? from : {})
  5968. );
  5969. } else {
  5970. return from;
  5971. }
  5972. }
  5973. function mergeWatchOptions(to, from) {
  5974. if (!to) return from;
  5975. if (!from) return to;
  5976. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  5977. for (const key in from) {
  5978. merged[key] = mergeAsArray(to[key], from[key]);
  5979. }
  5980. return merged;
  5981. }
  5982. function createAppContext() {
  5983. return {
  5984. app: null,
  5985. config: {
  5986. isNativeTag: NO,
  5987. performance: false,
  5988. globalProperties: {},
  5989. optionMergeStrategies: {},
  5990. errorHandler: void 0,
  5991. warnHandler: void 0,
  5992. compilerOptions: {}
  5993. },
  5994. mixins: [],
  5995. components: {},
  5996. directives: {},
  5997. provides: /* @__PURE__ */ Object.create(null),
  5998. optionsCache: /* @__PURE__ */ new WeakMap(),
  5999. propsCache: /* @__PURE__ */ new WeakMap(),
  6000. emitsCache: /* @__PURE__ */ new WeakMap()
  6001. };
  6002. }
  6003. var uid$1 = 0;
  6004. function createAppAPI(render2, hydrate2) {
  6005. return function createApp2(rootComponent, rootProps = null) {
  6006. if (!isFunction(rootComponent)) {
  6007. rootComponent = extend({}, rootComponent);
  6008. }
  6009. if (rootProps != null && !isObject(rootProps)) {
  6010. warn$1(`root props passed to app.mount() must be an object.`);
  6011. rootProps = null;
  6012. }
  6013. const context = createAppContext();
  6014. const installedPlugins = /* @__PURE__ */ new WeakSet();
  6015. const pluginCleanupFns = [];
  6016. let isMounted = false;
  6017. const app = context.app = {
  6018. _uid: uid$1++,
  6019. _component: rootComponent,
  6020. _props: rootProps,
  6021. _container: null,
  6022. _context: context,
  6023. _instance: null,
  6024. version,
  6025. get config() {
  6026. return context.config;
  6027. },
  6028. set config(v) {
  6029. if (true) {
  6030. warn$1(
  6031. `app.config cannot be replaced. Modify individual options instead.`
  6032. );
  6033. }
  6034. },
  6035. use(plugin, ...options) {
  6036. if (installedPlugins.has(plugin)) {
  6037. warn$1(`Plugin has already been applied to target app.`);
  6038. } else if (plugin && isFunction(plugin.install)) {
  6039. installedPlugins.add(plugin);
  6040. plugin.install(app, ...options);
  6041. } else if (isFunction(plugin)) {
  6042. installedPlugins.add(plugin);
  6043. plugin(app, ...options);
  6044. } else if (true) {
  6045. warn$1(
  6046. `A plugin must either be a function or an object with an "install" function.`
  6047. );
  6048. }
  6049. return app;
  6050. },
  6051. mixin(mixin) {
  6052. if (__VUE_OPTIONS_API__) {
  6053. if (!context.mixins.includes(mixin)) {
  6054. context.mixins.push(mixin);
  6055. } else if (true) {
  6056. warn$1(
  6057. "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
  6058. );
  6059. }
  6060. } else if (true) {
  6061. warn$1("Mixins are only available in builds supporting Options API");
  6062. }
  6063. return app;
  6064. },
  6065. component(name, component) {
  6066. if (true) {
  6067. validateComponentName(name, context.config);
  6068. }
  6069. if (!component) {
  6070. return context.components[name];
  6071. }
  6072. if (context.components[name]) {
  6073. warn$1(`Component "${name}" has already been registered in target app.`);
  6074. }
  6075. context.components[name] = component;
  6076. return app;
  6077. },
  6078. directive(name, directive) {
  6079. if (true) {
  6080. validateDirectiveName(name);
  6081. }
  6082. if (!directive) {
  6083. return context.directives[name];
  6084. }
  6085. if (context.directives[name]) {
  6086. warn$1(`Directive "${name}" has already been registered in target app.`);
  6087. }
  6088. context.directives[name] = directive;
  6089. return app;
  6090. },
  6091. mount(rootContainer, isHydrate, namespace) {
  6092. if (!isMounted) {
  6093. if (rootContainer.__vue_app__) {
  6094. warn$1(
  6095. `There is already an app instance mounted on the host container.
  6096. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
  6097. );
  6098. }
  6099. const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
  6100. vnode.appContext = context;
  6101. if (namespace === true) {
  6102. namespace = "svg";
  6103. } else if (namespace === false) {
  6104. namespace = void 0;
  6105. }
  6106. if (true) {
  6107. context.reload = () => {
  6108. const cloned = cloneVNode(vnode);
  6109. cloned.el = null;
  6110. render2(cloned, rootContainer, namespace);
  6111. };
  6112. }
  6113. if (isHydrate && hydrate2) {
  6114. hydrate2(vnode, rootContainer);
  6115. } else {
  6116. render2(vnode, rootContainer, namespace);
  6117. }
  6118. isMounted = true;
  6119. app._container = rootContainer;
  6120. rootContainer.__vue_app__ = app;
  6121. if (true) {
  6122. app._instance = vnode.component;
  6123. devtoolsInitApp(app, version);
  6124. }
  6125. return getComponentPublicInstance(vnode.component);
  6126. } else if (true) {
  6127. warn$1(
  6128. `App has already been mounted.
  6129. 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)\``
  6130. );
  6131. }
  6132. },
  6133. onUnmount(cleanupFn) {
  6134. if (typeof cleanupFn !== "function") {
  6135. warn$1(
  6136. `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
  6137. );
  6138. }
  6139. pluginCleanupFns.push(cleanupFn);
  6140. },
  6141. unmount() {
  6142. if (isMounted) {
  6143. callWithAsyncErrorHandling(
  6144. pluginCleanupFns,
  6145. app._instance,
  6146. 16
  6147. );
  6148. render2(null, app._container);
  6149. if (true) {
  6150. app._instance = null;
  6151. devtoolsUnmountApp(app);
  6152. }
  6153. delete app._container.__vue_app__;
  6154. } else if (true) {
  6155. warn$1(`Cannot unmount an app that is not mounted.`);
  6156. }
  6157. },
  6158. provide(key, value) {
  6159. if (key in context.provides) {
  6160. if (hasOwn(context.provides, key)) {
  6161. warn$1(
  6162. `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
  6163. );
  6164. } else {
  6165. warn$1(
  6166. `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
  6167. );
  6168. }
  6169. }
  6170. context.provides[key] = value;
  6171. return app;
  6172. },
  6173. runWithContext(fn) {
  6174. const lastApp = currentApp;
  6175. currentApp = app;
  6176. try {
  6177. return fn();
  6178. } finally {
  6179. currentApp = lastApp;
  6180. }
  6181. }
  6182. };
  6183. return app;
  6184. };
  6185. }
  6186. var currentApp = null;
  6187. function provide(key, value) {
  6188. if (!currentInstance) {
  6189. if (true) {
  6190. warn$1(`provide() can only be used inside setup().`);
  6191. }
  6192. } else {
  6193. let provides = currentInstance.provides;
  6194. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  6195. if (parentProvides === provides) {
  6196. provides = currentInstance.provides = Object.create(parentProvides);
  6197. }
  6198. provides[key] = value;
  6199. }
  6200. }
  6201. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  6202. const instance = getCurrentInstance();
  6203. if (instance || currentApp) {
  6204. let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
  6205. if (provides && key in provides) {
  6206. return provides[key];
  6207. } else if (arguments.length > 1) {
  6208. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  6209. } else if (true) {
  6210. warn$1(`injection "${String(key)}" not found.`);
  6211. }
  6212. } else if (true) {
  6213. warn$1(`inject() can only be used inside setup() or functional components.`);
  6214. }
  6215. }
  6216. function hasInjectionContext() {
  6217. return !!(getCurrentInstance() || currentApp);
  6218. }
  6219. var internalObjectProto = {};
  6220. var createInternalObject = () => Object.create(internalObjectProto);
  6221. var isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  6222. function initProps(instance, rawProps, isStateful, isSSR = false) {
  6223. const props = {};
  6224. const attrs = createInternalObject();
  6225. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  6226. setFullProps(instance, rawProps, props, attrs);
  6227. for (const key in instance.propsOptions[0]) {
  6228. if (!(key in props)) {
  6229. props[key] = void 0;
  6230. }
  6231. }
  6232. if (true) {
  6233. validateProps(rawProps || {}, props, instance);
  6234. }
  6235. if (isStateful) {
  6236. instance.props = isSSR ? props : shallowReactive(props);
  6237. } else {
  6238. if (!instance.type.props) {
  6239. instance.props = attrs;
  6240. } else {
  6241. instance.props = props;
  6242. }
  6243. }
  6244. instance.attrs = attrs;
  6245. }
  6246. function isInHmrContext(instance) {
  6247. while (instance) {
  6248. if (instance.type.__hmrId) return true;
  6249. instance = instance.parent;
  6250. }
  6251. }
  6252. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  6253. const {
  6254. props,
  6255. attrs,
  6256. vnode: { patchFlag }
  6257. } = instance;
  6258. const rawCurrentProps = toRaw(props);
  6259. const [options] = instance.propsOptions;
  6260. let hasAttrsChanged = false;
  6261. if (
  6262. // always force full diff in dev
  6263. // - #1942 if hmr is enabled with sfc component
  6264. // - vite#872 non-sfc component used by sfc component
  6265. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  6266. ) {
  6267. if (patchFlag & 8) {
  6268. const propsToUpdate = instance.vnode.dynamicProps;
  6269. for (let i = 0; i < propsToUpdate.length; i++) {
  6270. let key = propsToUpdate[i];
  6271. if (isEmitListener(instance.emitsOptions, key)) {
  6272. continue;
  6273. }
  6274. const value = rawProps[key];
  6275. if (options) {
  6276. if (hasOwn(attrs, key)) {
  6277. if (value !== attrs[key]) {
  6278. attrs[key] = value;
  6279. hasAttrsChanged = true;
  6280. }
  6281. } else {
  6282. const camelizedKey = camelize(key);
  6283. props[camelizedKey] = resolvePropValue(
  6284. options,
  6285. rawCurrentProps,
  6286. camelizedKey,
  6287. value,
  6288. instance,
  6289. false
  6290. );
  6291. }
  6292. } else {
  6293. if (value !== attrs[key]) {
  6294. attrs[key] = value;
  6295. hasAttrsChanged = true;
  6296. }
  6297. }
  6298. }
  6299. }
  6300. } else {
  6301. if (setFullProps(instance, rawProps, props, attrs)) {
  6302. hasAttrsChanged = true;
  6303. }
  6304. let kebabKey;
  6305. for (const key in rawCurrentProps) {
  6306. if (!rawProps || // for camelCase
  6307. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  6308. // and converted to camelCase (#955)
  6309. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  6310. if (options) {
  6311. if (rawPrevProps && // for camelCase
  6312. (rawPrevProps[key] !== void 0 || // for kebab-case
  6313. rawPrevProps[kebabKey] !== void 0)) {
  6314. props[key] = resolvePropValue(
  6315. options,
  6316. rawCurrentProps,
  6317. key,
  6318. void 0,
  6319. instance,
  6320. true
  6321. );
  6322. }
  6323. } else {
  6324. delete props[key];
  6325. }
  6326. }
  6327. }
  6328. if (attrs !== rawCurrentProps) {
  6329. for (const key in attrs) {
  6330. if (!rawProps || !hasOwn(rawProps, key) && true) {
  6331. delete attrs[key];
  6332. hasAttrsChanged = true;
  6333. }
  6334. }
  6335. }
  6336. }
  6337. if (hasAttrsChanged) {
  6338. trigger(instance.attrs, "set", "");
  6339. }
  6340. if (true) {
  6341. validateProps(rawProps || {}, props, instance);
  6342. }
  6343. }
  6344. function setFullProps(instance, rawProps, props, attrs) {
  6345. const [options, needCastKeys] = instance.propsOptions;
  6346. let hasAttrsChanged = false;
  6347. let rawCastValues;
  6348. if (rawProps) {
  6349. for (let key in rawProps) {
  6350. if (isReservedProp(key)) {
  6351. continue;
  6352. }
  6353. const value = rawProps[key];
  6354. let camelKey;
  6355. if (options && hasOwn(options, camelKey = camelize(key))) {
  6356. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  6357. props[camelKey] = value;
  6358. } else {
  6359. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  6360. }
  6361. } else if (!isEmitListener(instance.emitsOptions, key)) {
  6362. if (!(key in attrs) || value !== attrs[key]) {
  6363. attrs[key] = value;
  6364. hasAttrsChanged = true;
  6365. }
  6366. }
  6367. }
  6368. }
  6369. if (needCastKeys) {
  6370. const rawCurrentProps = toRaw(props);
  6371. const castValues = rawCastValues || EMPTY_OBJ;
  6372. for (let i = 0; i < needCastKeys.length; i++) {
  6373. const key = needCastKeys[i];
  6374. props[key] = resolvePropValue(
  6375. options,
  6376. rawCurrentProps,
  6377. key,
  6378. castValues[key],
  6379. instance,
  6380. !hasOwn(castValues, key)
  6381. );
  6382. }
  6383. }
  6384. return hasAttrsChanged;
  6385. }
  6386. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  6387. const opt = options[key];
  6388. if (opt != null) {
  6389. const hasDefault = hasOwn(opt, "default");
  6390. if (hasDefault && value === void 0) {
  6391. const defaultValue = opt.default;
  6392. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  6393. const { propsDefaults } = instance;
  6394. if (key in propsDefaults) {
  6395. value = propsDefaults[key];
  6396. } else {
  6397. const reset = setCurrentInstance(instance);
  6398. value = propsDefaults[key] = defaultValue.call(
  6399. null,
  6400. props
  6401. );
  6402. reset();
  6403. }
  6404. } else {
  6405. value = defaultValue;
  6406. }
  6407. if (instance.ce) {
  6408. instance.ce._setProp(key, value);
  6409. }
  6410. }
  6411. if (opt[
  6412. 0
  6413. /* shouldCast */
  6414. ]) {
  6415. if (isAbsent && !hasDefault) {
  6416. value = false;
  6417. } else if (opt[
  6418. 1
  6419. /* shouldCastTrue */
  6420. ] && (value === "" || value === hyphenate(key))) {
  6421. value = true;
  6422. }
  6423. }
  6424. }
  6425. return value;
  6426. }
  6427. var mixinPropsCache = /* @__PURE__ */ new WeakMap();
  6428. function normalizePropsOptions(comp, appContext, asMixin = false) {
  6429. const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
  6430. const cached = cache.get(comp);
  6431. if (cached) {
  6432. return cached;
  6433. }
  6434. const raw = comp.props;
  6435. const normalized = {};
  6436. const needCastKeys = [];
  6437. let hasExtends = false;
  6438. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  6439. const extendProps = (raw2) => {
  6440. hasExtends = true;
  6441. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  6442. extend(normalized, props);
  6443. if (keys) needCastKeys.push(...keys);
  6444. };
  6445. if (!asMixin && appContext.mixins.length) {
  6446. appContext.mixins.forEach(extendProps);
  6447. }
  6448. if (comp.extends) {
  6449. extendProps(comp.extends);
  6450. }
  6451. if (comp.mixins) {
  6452. comp.mixins.forEach(extendProps);
  6453. }
  6454. }
  6455. if (!raw && !hasExtends) {
  6456. if (isObject(comp)) {
  6457. cache.set(comp, EMPTY_ARR);
  6458. }
  6459. return EMPTY_ARR;
  6460. }
  6461. if (isArray(raw)) {
  6462. for (let i = 0; i < raw.length; i++) {
  6463. if (!isString(raw[i])) {
  6464. warn$1(`props must be strings when using array syntax.`, raw[i]);
  6465. }
  6466. const normalizedKey = camelize(raw[i]);
  6467. if (validatePropName(normalizedKey)) {
  6468. normalized[normalizedKey] = EMPTY_OBJ;
  6469. }
  6470. }
  6471. } else if (raw) {
  6472. if (!isObject(raw)) {
  6473. warn$1(`invalid props options`, raw);
  6474. }
  6475. for (const key in raw) {
  6476. const normalizedKey = camelize(key);
  6477. if (validatePropName(normalizedKey)) {
  6478. const opt = raw[key];
  6479. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  6480. const propType = prop.type;
  6481. let shouldCast = false;
  6482. let shouldCastTrue = true;
  6483. if (isArray(propType)) {
  6484. for (let index = 0; index < propType.length; ++index) {
  6485. const type = propType[index];
  6486. const typeName = isFunction(type) && type.name;
  6487. if (typeName === "Boolean") {
  6488. shouldCast = true;
  6489. break;
  6490. } else if (typeName === "String") {
  6491. shouldCastTrue = false;
  6492. }
  6493. }
  6494. } else {
  6495. shouldCast = isFunction(propType) && propType.name === "Boolean";
  6496. }
  6497. prop[
  6498. 0
  6499. /* shouldCast */
  6500. ] = shouldCast;
  6501. prop[
  6502. 1
  6503. /* shouldCastTrue */
  6504. ] = shouldCastTrue;
  6505. if (shouldCast || hasOwn(prop, "default")) {
  6506. needCastKeys.push(normalizedKey);
  6507. }
  6508. }
  6509. }
  6510. }
  6511. const res = [normalized, needCastKeys];
  6512. if (isObject(comp)) {
  6513. cache.set(comp, res);
  6514. }
  6515. return res;
  6516. }
  6517. function validatePropName(key) {
  6518. if (key[0] !== "$" && !isReservedProp(key)) {
  6519. return true;
  6520. } else if (true) {
  6521. warn$1(`Invalid prop name: "${key}" is a reserved property.`);
  6522. }
  6523. return false;
  6524. }
  6525. function getType(ctor) {
  6526. if (ctor === null) {
  6527. return "null";
  6528. }
  6529. if (typeof ctor === "function") {
  6530. return ctor.name || "";
  6531. } else if (typeof ctor === "object") {
  6532. const name = ctor.constructor && ctor.constructor.name;
  6533. return name || "";
  6534. }
  6535. return "";
  6536. }
  6537. function validateProps(rawProps, props, instance) {
  6538. const resolvedValues = toRaw(props);
  6539. const options = instance.propsOptions[0];
  6540. const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
  6541. for (const key in options) {
  6542. let opt = options[key];
  6543. if (opt == null) continue;
  6544. validateProp(
  6545. key,
  6546. resolvedValues[key],
  6547. opt,
  6548. true ? shallowReadonly(resolvedValues) : resolvedValues,
  6549. !camelizePropsKey.includes(key)
  6550. );
  6551. }
  6552. }
  6553. function validateProp(name, value, prop, props, isAbsent) {
  6554. const { type, required, validator, skipCheck } = prop;
  6555. if (required && isAbsent) {
  6556. warn$1('Missing required prop: "' + name + '"');
  6557. return;
  6558. }
  6559. if (value == null && !required) {
  6560. return;
  6561. }
  6562. if (type != null && type !== true && !skipCheck) {
  6563. let isValid = false;
  6564. const types = isArray(type) ? type : [type];
  6565. const expectedTypes = [];
  6566. for (let i = 0; i < types.length && !isValid; i++) {
  6567. const { valid, expectedType } = assertType(value, types[i]);
  6568. expectedTypes.push(expectedType || "");
  6569. isValid = valid;
  6570. }
  6571. if (!isValid) {
  6572. warn$1(getInvalidTypeMessage(name, value, expectedTypes));
  6573. return;
  6574. }
  6575. }
  6576. if (validator && !validator(value, props)) {
  6577. warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
  6578. }
  6579. }
  6580. var isSimpleType = makeMap(
  6581. "String,Number,Boolean,Function,Symbol,BigInt"
  6582. );
  6583. function assertType(value, type) {
  6584. let valid;
  6585. const expectedType = getType(type);
  6586. if (expectedType === "null") {
  6587. valid = value === null;
  6588. } else if (isSimpleType(expectedType)) {
  6589. const t = typeof value;
  6590. valid = t === expectedType.toLowerCase();
  6591. if (!valid && t === "object") {
  6592. valid = value instanceof type;
  6593. }
  6594. } else if (expectedType === "Object") {
  6595. valid = isObject(value);
  6596. } else if (expectedType === "Array") {
  6597. valid = isArray(value);
  6598. } else {
  6599. valid = value instanceof type;
  6600. }
  6601. return {
  6602. valid,
  6603. expectedType
  6604. };
  6605. }
  6606. function getInvalidTypeMessage(name, value, expectedTypes) {
  6607. if (expectedTypes.length === 0) {
  6608. return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  6609. }
  6610. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  6611. const expectedType = expectedTypes[0];
  6612. const receivedType = toRawType(value);
  6613. const expectedValue = styleValue(value, expectedType);
  6614. const receivedValue = styleValue(value, receivedType);
  6615. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  6616. message += ` with value ${expectedValue}`;
  6617. }
  6618. message += `, got ${receivedType} `;
  6619. if (isExplicable(receivedType)) {
  6620. message += `with value ${receivedValue}.`;
  6621. }
  6622. return message;
  6623. }
  6624. function styleValue(value, type) {
  6625. if (type === "String") {
  6626. return `"${value}"`;
  6627. } else if (type === "Number") {
  6628. return `${Number(value)}`;
  6629. } else {
  6630. return `${value}`;
  6631. }
  6632. }
  6633. function isExplicable(type) {
  6634. const explicitTypes = ["string", "number", "boolean"];
  6635. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  6636. }
  6637. function isBoolean(...args) {
  6638. return args.some((elem) => elem.toLowerCase() === "boolean");
  6639. }
  6640. var isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
  6641. var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  6642. var normalizeSlot = (key, rawSlot, ctx) => {
  6643. if (rawSlot._n) {
  6644. return rawSlot;
  6645. }
  6646. const normalized = withCtx((...args) => {
  6647. if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
  6648. warn$1(
  6649. `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.`
  6650. );
  6651. }
  6652. return normalizeSlotValue(rawSlot(...args));
  6653. }, ctx);
  6654. normalized._c = false;
  6655. return normalized;
  6656. };
  6657. var normalizeObjectSlots = (rawSlots, slots, instance) => {
  6658. const ctx = rawSlots._ctx;
  6659. for (const key in rawSlots) {
  6660. if (isInternalKey(key)) continue;
  6661. const value = rawSlots[key];
  6662. if (isFunction(value)) {
  6663. slots[key] = normalizeSlot(key, value, ctx);
  6664. } else if (value != null) {
  6665. if (true) {
  6666. warn$1(
  6667. `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
  6668. );
  6669. }
  6670. const normalized = normalizeSlotValue(value);
  6671. slots[key] = () => normalized;
  6672. }
  6673. }
  6674. };
  6675. var normalizeVNodeSlots = (instance, children) => {
  6676. if (!isKeepAlive(instance.vnode) && true) {
  6677. warn$1(
  6678. `Non-function value encountered for default slot. Prefer function slots for better performance.`
  6679. );
  6680. }
  6681. const normalized = normalizeSlotValue(children);
  6682. instance.slots.default = () => normalized;
  6683. };
  6684. var assignSlots = (slots, children, optimized) => {
  6685. for (const key in children) {
  6686. if (optimized || !isInternalKey(key)) {
  6687. slots[key] = children[key];
  6688. }
  6689. }
  6690. };
  6691. var initSlots = (instance, children, optimized) => {
  6692. const slots = instance.slots = createInternalObject();
  6693. if (instance.vnode.shapeFlag & 32) {
  6694. const type = children._;
  6695. if (type) {
  6696. assignSlots(slots, children, optimized);
  6697. if (optimized) {
  6698. def(slots, "_", type, true);
  6699. }
  6700. } else {
  6701. normalizeObjectSlots(children, slots);
  6702. }
  6703. } else if (children) {
  6704. normalizeVNodeSlots(instance, children);
  6705. }
  6706. };
  6707. var updateSlots = (instance, children, optimized) => {
  6708. const { vnode, slots } = instance;
  6709. let needDeletionCheck = true;
  6710. let deletionComparisonTarget = EMPTY_OBJ;
  6711. if (vnode.shapeFlag & 32) {
  6712. const type = children._;
  6713. if (type) {
  6714. if (isHmrUpdating) {
  6715. assignSlots(slots, children, optimized);
  6716. trigger(instance, "set", "$slots");
  6717. } else if (optimized && type === 1) {
  6718. needDeletionCheck = false;
  6719. } else {
  6720. assignSlots(slots, children, optimized);
  6721. }
  6722. } else {
  6723. needDeletionCheck = !children.$stable;
  6724. normalizeObjectSlots(children, slots);
  6725. }
  6726. deletionComparisonTarget = children;
  6727. } else if (children) {
  6728. normalizeVNodeSlots(instance, children);
  6729. deletionComparisonTarget = { default: 1 };
  6730. }
  6731. if (needDeletionCheck) {
  6732. for (const key in slots) {
  6733. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  6734. delete slots[key];
  6735. }
  6736. }
  6737. }
  6738. };
  6739. var supported;
  6740. var perf;
  6741. function startMeasure(instance, type) {
  6742. if (instance.appContext.config.performance && isSupported()) {
  6743. perf.mark(`vue-${type}-${instance.uid}`);
  6744. }
  6745. if (true) {
  6746. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  6747. }
  6748. }
  6749. function endMeasure(instance, type) {
  6750. if (instance.appContext.config.performance && isSupported()) {
  6751. const startTag = `vue-${type}-${instance.uid}`;
  6752. const endTag = startTag + `:end`;
  6753. const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
  6754. perf.mark(endTag);
  6755. perf.measure(measureName, startTag, endTag);
  6756. perf.clearMeasures(measureName);
  6757. perf.clearMarks(startTag);
  6758. perf.clearMarks(endTag);
  6759. }
  6760. if (true) {
  6761. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  6762. }
  6763. }
  6764. function isSupported() {
  6765. if (supported !== void 0) {
  6766. return supported;
  6767. }
  6768. if (typeof window !== "undefined" && window.performance) {
  6769. supported = true;
  6770. perf = window.performance;
  6771. } else {
  6772. supported = false;
  6773. }
  6774. return supported;
  6775. }
  6776. function initFeatureFlags() {
  6777. const needWarn = [];
  6778. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  6779. needWarn.push(`__VUE_OPTIONS_API__`);
  6780. getGlobalThis().__VUE_OPTIONS_API__ = true;
  6781. }
  6782. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  6783. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  6784. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  6785. }
  6786. if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
  6787. needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
  6788. getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
  6789. }
  6790. if (needWarn.length) {
  6791. const multi = needWarn.length > 1;
  6792. console.warn(
  6793. `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.
  6794. For more details, see https://link.vuejs.org/feature-flags.`
  6795. );
  6796. }
  6797. }
  6798. var queuePostRenderEffect = queueEffectWithSuspense;
  6799. function createRenderer(options) {
  6800. return baseCreateRenderer(options);
  6801. }
  6802. function createHydrationRenderer(options) {
  6803. return baseCreateRenderer(options, createHydrationFunctions);
  6804. }
  6805. function baseCreateRenderer(options, createHydrationFns) {
  6806. {
  6807. initFeatureFlags();
  6808. }
  6809. const target = getGlobalThis();
  6810. target.__VUE__ = true;
  6811. if (true) {
  6812. setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  6813. }
  6814. const {
  6815. insert: hostInsert,
  6816. remove: hostRemove,
  6817. patchProp: hostPatchProp,
  6818. createElement: hostCreateElement,
  6819. createText: hostCreateText,
  6820. createComment: hostCreateComment,
  6821. setText: hostSetText,
  6822. setElementText: hostSetElementText,
  6823. parentNode: hostParentNode,
  6824. nextSibling: hostNextSibling,
  6825. setScopeId: hostSetScopeId = NOOP,
  6826. insertStaticContent: hostInsertStaticContent
  6827. } = options;
  6828. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  6829. if (n1 === n2) {
  6830. return;
  6831. }
  6832. if (n1 && !isSameVNodeType(n1, n2)) {
  6833. anchor = getNextHostNode(n1);
  6834. unmount(n1, parentComponent, parentSuspense, true);
  6835. n1 = null;
  6836. }
  6837. if (n2.patchFlag === -2) {
  6838. optimized = false;
  6839. n2.dynamicChildren = null;
  6840. }
  6841. const { type, ref: ref2, shapeFlag } = n2;
  6842. switch (type) {
  6843. case Text:
  6844. processText(n1, n2, container, anchor);
  6845. break;
  6846. case Comment:
  6847. processCommentNode(n1, n2, container, anchor);
  6848. break;
  6849. case Static:
  6850. if (n1 == null) {
  6851. mountStaticNode(n2, container, anchor, namespace);
  6852. } else if (true) {
  6853. patchStaticNode(n1, n2, container, namespace);
  6854. }
  6855. break;
  6856. case Fragment:
  6857. processFragment(
  6858. n1,
  6859. n2,
  6860. container,
  6861. anchor,
  6862. parentComponent,
  6863. parentSuspense,
  6864. namespace,
  6865. slotScopeIds,
  6866. optimized
  6867. );
  6868. break;
  6869. default:
  6870. if (shapeFlag & 1) {
  6871. processElement(
  6872. n1,
  6873. n2,
  6874. container,
  6875. anchor,
  6876. parentComponent,
  6877. parentSuspense,
  6878. namespace,
  6879. slotScopeIds,
  6880. optimized
  6881. );
  6882. } else if (shapeFlag & 6) {
  6883. processComponent(
  6884. n1,
  6885. n2,
  6886. container,
  6887. anchor,
  6888. parentComponent,
  6889. parentSuspense,
  6890. namespace,
  6891. slotScopeIds,
  6892. optimized
  6893. );
  6894. } else if (shapeFlag & 64) {
  6895. type.process(
  6896. n1,
  6897. n2,
  6898. container,
  6899. anchor,
  6900. parentComponent,
  6901. parentSuspense,
  6902. namespace,
  6903. slotScopeIds,
  6904. optimized,
  6905. internals
  6906. );
  6907. } else if (shapeFlag & 128) {
  6908. type.process(
  6909. n1,
  6910. n2,
  6911. container,
  6912. anchor,
  6913. parentComponent,
  6914. parentSuspense,
  6915. namespace,
  6916. slotScopeIds,
  6917. optimized,
  6918. internals
  6919. );
  6920. } else if (true) {
  6921. warn$1("Invalid VNode type:", type, `(${typeof type})`);
  6922. }
  6923. }
  6924. if (ref2 != null && parentComponent) {
  6925. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  6926. } else if (ref2 == null && n1 && n1.ref != null) {
  6927. setRef(n1.ref, null, parentSuspense, n1, true);
  6928. }
  6929. };
  6930. const processText = (n1, n2, container, anchor) => {
  6931. if (n1 == null) {
  6932. hostInsert(
  6933. n2.el = hostCreateText(n2.children),
  6934. container,
  6935. anchor
  6936. );
  6937. } else {
  6938. const el = n2.el = n1.el;
  6939. if (n2.children !== n1.children) {
  6940. hostSetText(el, n2.children);
  6941. }
  6942. }
  6943. };
  6944. const processCommentNode = (n1, n2, container, anchor) => {
  6945. if (n1 == null) {
  6946. hostInsert(
  6947. n2.el = hostCreateComment(n2.children || ""),
  6948. container,
  6949. anchor
  6950. );
  6951. } else {
  6952. n2.el = n1.el;
  6953. }
  6954. };
  6955. const mountStaticNode = (n2, container, anchor, namespace) => {
  6956. [n2.el, n2.anchor] = hostInsertStaticContent(
  6957. n2.children,
  6958. container,
  6959. anchor,
  6960. namespace,
  6961. n2.el,
  6962. n2.anchor
  6963. );
  6964. };
  6965. const patchStaticNode = (n1, n2, container, namespace) => {
  6966. if (n2.children !== n1.children) {
  6967. const anchor = hostNextSibling(n1.anchor);
  6968. removeStaticNode(n1);
  6969. [n2.el, n2.anchor] = hostInsertStaticContent(
  6970. n2.children,
  6971. container,
  6972. anchor,
  6973. namespace
  6974. );
  6975. } else {
  6976. n2.el = n1.el;
  6977. n2.anchor = n1.anchor;
  6978. }
  6979. };
  6980. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  6981. let next;
  6982. while (el && el !== anchor) {
  6983. next = hostNextSibling(el);
  6984. hostInsert(el, container, nextSibling);
  6985. el = next;
  6986. }
  6987. hostInsert(anchor, container, nextSibling);
  6988. };
  6989. const removeStaticNode = ({ el, anchor }) => {
  6990. let next;
  6991. while (el && el !== anchor) {
  6992. next = hostNextSibling(el);
  6993. hostRemove(el);
  6994. el = next;
  6995. }
  6996. hostRemove(anchor);
  6997. };
  6998. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6999. if (n2.type === "svg") {
  7000. namespace = "svg";
  7001. } else if (n2.type === "math") {
  7002. namespace = "mathml";
  7003. }
  7004. if (n1 == null) {
  7005. mountElement(
  7006. n2,
  7007. container,
  7008. anchor,
  7009. parentComponent,
  7010. parentSuspense,
  7011. namespace,
  7012. slotScopeIds,
  7013. optimized
  7014. );
  7015. } else {
  7016. patchElement(
  7017. n1,
  7018. n2,
  7019. parentComponent,
  7020. parentSuspense,
  7021. namespace,
  7022. slotScopeIds,
  7023. optimized
  7024. );
  7025. }
  7026. };
  7027. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7028. let el;
  7029. let vnodeHook;
  7030. const { props, shapeFlag, transition, dirs } = vnode;
  7031. el = vnode.el = hostCreateElement(
  7032. vnode.type,
  7033. namespace,
  7034. props && props.is,
  7035. props
  7036. );
  7037. if (shapeFlag & 8) {
  7038. hostSetElementText(el, vnode.children);
  7039. } else if (shapeFlag & 16) {
  7040. mountChildren(
  7041. vnode.children,
  7042. el,
  7043. null,
  7044. parentComponent,
  7045. parentSuspense,
  7046. resolveChildrenNamespace(vnode, namespace),
  7047. slotScopeIds,
  7048. optimized
  7049. );
  7050. }
  7051. if (dirs) {
  7052. invokeDirectiveHook(vnode, null, parentComponent, "created");
  7053. }
  7054. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  7055. if (props) {
  7056. for (const key in props) {
  7057. if (key !== "value" && !isReservedProp(key)) {
  7058. hostPatchProp(el, key, null, props[key], namespace, parentComponent);
  7059. }
  7060. }
  7061. if ("value" in props) {
  7062. hostPatchProp(el, "value", null, props.value, namespace);
  7063. }
  7064. if (vnodeHook = props.onVnodeBeforeMount) {
  7065. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7066. }
  7067. }
  7068. if (true) {
  7069. def(el, "__vnode", vnode, true);
  7070. def(el, "__vueParentComponent", parentComponent, true);
  7071. }
  7072. if (dirs) {
  7073. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  7074. }
  7075. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  7076. if (needCallTransitionHooks) {
  7077. transition.beforeEnter(el);
  7078. }
  7079. hostInsert(el, container, anchor);
  7080. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  7081. queuePostRenderEffect(() => {
  7082. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7083. needCallTransitionHooks && transition.enter(el);
  7084. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  7085. }, parentSuspense);
  7086. }
  7087. };
  7088. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  7089. if (scopeId) {
  7090. hostSetScopeId(el, scopeId);
  7091. }
  7092. if (slotScopeIds) {
  7093. for (let i = 0; i < slotScopeIds.length; i++) {
  7094. hostSetScopeId(el, slotScopeIds[i]);
  7095. }
  7096. }
  7097. if (parentComponent) {
  7098. let subTree = parentComponent.subTree;
  7099. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
  7100. subTree = filterSingleRoot(subTree.children) || subTree;
  7101. }
  7102. if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
  7103. const parentVNode = parentComponent.vnode;
  7104. setScopeId(
  7105. el,
  7106. parentVNode,
  7107. parentVNode.scopeId,
  7108. parentVNode.slotScopeIds,
  7109. parentComponent.parent
  7110. );
  7111. }
  7112. }
  7113. };
  7114. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  7115. for (let i = start; i < children.length; i++) {
  7116. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  7117. patch(
  7118. null,
  7119. child,
  7120. container,
  7121. anchor,
  7122. parentComponent,
  7123. parentSuspense,
  7124. namespace,
  7125. slotScopeIds,
  7126. optimized
  7127. );
  7128. }
  7129. };
  7130. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7131. const el = n2.el = n1.el;
  7132. if (true) {
  7133. el.__vnode = n2;
  7134. }
  7135. let { patchFlag, dynamicChildren, dirs } = n2;
  7136. patchFlag |= n1.patchFlag & 16;
  7137. const oldProps = n1.props || EMPTY_OBJ;
  7138. const newProps = n2.props || EMPTY_OBJ;
  7139. let vnodeHook;
  7140. parentComponent && toggleRecurse(parentComponent, false);
  7141. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  7142. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7143. }
  7144. if (dirs) {
  7145. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  7146. }
  7147. parentComponent && toggleRecurse(parentComponent, true);
  7148. if (isHmrUpdating) {
  7149. patchFlag = 0;
  7150. optimized = false;
  7151. dynamicChildren = null;
  7152. }
  7153. if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
  7154. hostSetElementText(el, "");
  7155. }
  7156. if (dynamicChildren) {
  7157. patchBlockChildren(
  7158. n1.dynamicChildren,
  7159. dynamicChildren,
  7160. el,
  7161. parentComponent,
  7162. parentSuspense,
  7163. resolveChildrenNamespace(n2, namespace),
  7164. slotScopeIds
  7165. );
  7166. if (true) {
  7167. traverseStaticChildren(n1, n2);
  7168. }
  7169. } else if (!optimized) {
  7170. patchChildren(
  7171. n1,
  7172. n2,
  7173. el,
  7174. null,
  7175. parentComponent,
  7176. parentSuspense,
  7177. resolveChildrenNamespace(n2, namespace),
  7178. slotScopeIds,
  7179. false
  7180. );
  7181. }
  7182. if (patchFlag > 0) {
  7183. if (patchFlag & 16) {
  7184. patchProps(el, oldProps, newProps, parentComponent, namespace);
  7185. } else {
  7186. if (patchFlag & 2) {
  7187. if (oldProps.class !== newProps.class) {
  7188. hostPatchProp(el, "class", null, newProps.class, namespace);
  7189. }
  7190. }
  7191. if (patchFlag & 4) {
  7192. hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  7193. }
  7194. if (patchFlag & 8) {
  7195. const propsToUpdate = n2.dynamicProps;
  7196. for (let i = 0; i < propsToUpdate.length; i++) {
  7197. const key = propsToUpdate[i];
  7198. const prev = oldProps[key];
  7199. const next = newProps[key];
  7200. if (next !== prev || key === "value") {
  7201. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  7202. }
  7203. }
  7204. }
  7205. }
  7206. if (patchFlag & 1) {
  7207. if (n1.children !== n2.children) {
  7208. hostSetElementText(el, n2.children);
  7209. }
  7210. }
  7211. } else if (!optimized && dynamicChildren == null) {
  7212. patchProps(el, oldProps, newProps, parentComponent, namespace);
  7213. }
  7214. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  7215. queuePostRenderEffect(() => {
  7216. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7217. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  7218. }, parentSuspense);
  7219. }
  7220. };
  7221. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  7222. for (let i = 0; i < newChildren.length; i++) {
  7223. const oldVNode = oldChildren[i];
  7224. const newVNode = newChildren[i];
  7225. const container = (
  7226. // oldVNode may be an errored async setup() component inside Suspense
  7227. // which will not have a mounted element
  7228. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  7229. // of the Fragment itself so it can move its children.
  7230. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  7231. // which also requires the correct parent container
  7232. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  7233. oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
  7234. // In other cases, the parent container is not actually used so we
  7235. // just pass the block element here to avoid a DOM parentNode call.
  7236. fallbackContainer
  7237. )
  7238. );
  7239. patch(
  7240. oldVNode,
  7241. newVNode,
  7242. container,
  7243. null,
  7244. parentComponent,
  7245. parentSuspense,
  7246. namespace,
  7247. slotScopeIds,
  7248. true
  7249. );
  7250. }
  7251. };
  7252. const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
  7253. if (oldProps !== newProps) {
  7254. if (oldProps !== EMPTY_OBJ) {
  7255. for (const key in oldProps) {
  7256. if (!isReservedProp(key) && !(key in newProps)) {
  7257. hostPatchProp(
  7258. el,
  7259. key,
  7260. oldProps[key],
  7261. null,
  7262. namespace,
  7263. parentComponent
  7264. );
  7265. }
  7266. }
  7267. }
  7268. for (const key in newProps) {
  7269. if (isReservedProp(key)) continue;
  7270. const next = newProps[key];
  7271. const prev = oldProps[key];
  7272. if (next !== prev && key !== "value") {
  7273. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  7274. }
  7275. }
  7276. if ("value" in newProps) {
  7277. hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  7278. }
  7279. }
  7280. };
  7281. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7282. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  7283. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  7284. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  7285. if (
  7286. // #5523 dev root fragment may inherit directives
  7287. isHmrUpdating || patchFlag & 2048
  7288. ) {
  7289. patchFlag = 0;
  7290. optimized = false;
  7291. dynamicChildren = null;
  7292. }
  7293. if (fragmentSlotScopeIds) {
  7294. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  7295. }
  7296. if (n1 == null) {
  7297. hostInsert(fragmentStartAnchor, container, anchor);
  7298. hostInsert(fragmentEndAnchor, container, anchor);
  7299. mountChildren(
  7300. // #10007
  7301. // such fragment like `<></>` will be compiled into
  7302. // a fragment which doesn't have a children.
  7303. // In this case fallback to an empty array
  7304. n2.children || [],
  7305. container,
  7306. fragmentEndAnchor,
  7307. parentComponent,
  7308. parentSuspense,
  7309. namespace,
  7310. slotScopeIds,
  7311. optimized
  7312. );
  7313. } else {
  7314. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  7315. // of renderSlot() with no valid children
  7316. n1.dynamicChildren) {
  7317. patchBlockChildren(
  7318. n1.dynamicChildren,
  7319. dynamicChildren,
  7320. container,
  7321. parentComponent,
  7322. parentSuspense,
  7323. namespace,
  7324. slotScopeIds
  7325. );
  7326. if (true) {
  7327. traverseStaticChildren(n1, n2);
  7328. } else if (
  7329. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  7330. // get moved around. Make sure all root level vnodes inherit el.
  7331. // #2134 or if it's a component root, it may also get moved around
  7332. // as the component is being moved.
  7333. n2.key != null || parentComponent && n2 === parentComponent.subTree
  7334. ) {
  7335. traverseStaticChildren(
  7336. n1,
  7337. n2,
  7338. true
  7339. /* shallow */
  7340. );
  7341. }
  7342. } else {
  7343. patchChildren(
  7344. n1,
  7345. n2,
  7346. container,
  7347. fragmentEndAnchor,
  7348. parentComponent,
  7349. parentSuspense,
  7350. namespace,
  7351. slotScopeIds,
  7352. optimized
  7353. );
  7354. }
  7355. }
  7356. };
  7357. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7358. n2.slotScopeIds = slotScopeIds;
  7359. if (n1 == null) {
  7360. if (n2.shapeFlag & 512) {
  7361. parentComponent.ctx.activate(
  7362. n2,
  7363. container,
  7364. anchor,
  7365. namespace,
  7366. optimized
  7367. );
  7368. } else {
  7369. mountComponent(
  7370. n2,
  7371. container,
  7372. anchor,
  7373. parentComponent,
  7374. parentSuspense,
  7375. namespace,
  7376. optimized
  7377. );
  7378. }
  7379. } else {
  7380. updateComponent(n1, n2, optimized);
  7381. }
  7382. };
  7383. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  7384. const instance = initialVNode.component = createComponentInstance(
  7385. initialVNode,
  7386. parentComponent,
  7387. parentSuspense
  7388. );
  7389. if (instance.type.__hmrId) {
  7390. registerHMR(instance);
  7391. }
  7392. if (true) {
  7393. pushWarningContext(initialVNode);
  7394. startMeasure(instance, `mount`);
  7395. }
  7396. if (isKeepAlive(initialVNode)) {
  7397. instance.ctx.renderer = internals;
  7398. }
  7399. {
  7400. if (true) {
  7401. startMeasure(instance, `init`);
  7402. }
  7403. setupComponent(instance, false, optimized);
  7404. if (true) {
  7405. endMeasure(instance, `init`);
  7406. }
  7407. }
  7408. if (isHmrUpdating) initialVNode.el = null;
  7409. if (instance.asyncDep) {
  7410. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
  7411. if (!initialVNode.el) {
  7412. const placeholder = instance.subTree = createVNode(Comment);
  7413. processCommentNode(null, placeholder, container, anchor);
  7414. initialVNode.placeholder = placeholder.el;
  7415. }
  7416. } else {
  7417. setupRenderEffect(
  7418. instance,
  7419. initialVNode,
  7420. container,
  7421. anchor,
  7422. parentSuspense,
  7423. namespace,
  7424. optimized
  7425. );
  7426. }
  7427. if (true) {
  7428. popWarningContext();
  7429. endMeasure(instance, `mount`);
  7430. }
  7431. };
  7432. const updateComponent = (n1, n2, optimized) => {
  7433. const instance = n2.component = n1.component;
  7434. if (shouldUpdateComponent(n1, n2, optimized)) {
  7435. if (instance.asyncDep && !instance.asyncResolved) {
  7436. if (true) {
  7437. pushWarningContext(n2);
  7438. }
  7439. updateComponentPreRender(instance, n2, optimized);
  7440. if (true) {
  7441. popWarningContext();
  7442. }
  7443. return;
  7444. } else {
  7445. instance.next = n2;
  7446. instance.update();
  7447. }
  7448. } else {
  7449. n2.el = n1.el;
  7450. instance.vnode = n2;
  7451. }
  7452. };
  7453. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  7454. const componentUpdateFn = () => {
  7455. if (!instance.isMounted) {
  7456. let vnodeHook;
  7457. const { el, props } = initialVNode;
  7458. const { bm, m, parent, root, type } = instance;
  7459. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  7460. toggleRecurse(instance, false);
  7461. if (bm) {
  7462. invokeArrayFns(bm);
  7463. }
  7464. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  7465. invokeVNodeHook(vnodeHook, parent, initialVNode);
  7466. }
  7467. toggleRecurse(instance, true);
  7468. if (el && hydrateNode) {
  7469. const hydrateSubTree = () => {
  7470. if (true) {
  7471. startMeasure(instance, `render`);
  7472. }
  7473. instance.subTree = renderComponentRoot(instance);
  7474. if (true) {
  7475. endMeasure(instance, `render`);
  7476. }
  7477. if (true) {
  7478. startMeasure(instance, `hydrate`);
  7479. }
  7480. hydrateNode(
  7481. el,
  7482. instance.subTree,
  7483. instance,
  7484. parentSuspense,
  7485. null
  7486. );
  7487. if (true) {
  7488. endMeasure(instance, `hydrate`);
  7489. }
  7490. };
  7491. if (isAsyncWrapperVNode && type.__asyncHydrate) {
  7492. type.__asyncHydrate(
  7493. el,
  7494. instance,
  7495. hydrateSubTree
  7496. );
  7497. } else {
  7498. hydrateSubTree();
  7499. }
  7500. } else {
  7501. if (root.ce && // @ts-expect-error _def is private
  7502. root.ce._def.shadowRoot !== false) {
  7503. root.ce._injectChildStyle(type);
  7504. }
  7505. if (true) {
  7506. startMeasure(instance, `render`);
  7507. }
  7508. const subTree = instance.subTree = renderComponentRoot(instance);
  7509. if (true) {
  7510. endMeasure(instance, `render`);
  7511. }
  7512. if (true) {
  7513. startMeasure(instance, `patch`);
  7514. }
  7515. patch(
  7516. null,
  7517. subTree,
  7518. container,
  7519. anchor,
  7520. instance,
  7521. parentSuspense,
  7522. namespace
  7523. );
  7524. if (true) {
  7525. endMeasure(instance, `patch`);
  7526. }
  7527. initialVNode.el = subTree.el;
  7528. }
  7529. if (m) {
  7530. queuePostRenderEffect(m, parentSuspense);
  7531. }
  7532. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  7533. const scopedInitialVNode = initialVNode;
  7534. queuePostRenderEffect(
  7535. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  7536. parentSuspense
  7537. );
  7538. }
  7539. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  7540. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  7541. }
  7542. instance.isMounted = true;
  7543. if (true) {
  7544. devtoolsComponentAdded(instance);
  7545. }
  7546. initialVNode = container = anchor = null;
  7547. } else {
  7548. let { next, bu, u, parent, vnode } = instance;
  7549. {
  7550. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  7551. if (nonHydratedAsyncRoot) {
  7552. if (next) {
  7553. next.el = vnode.el;
  7554. updateComponentPreRender(instance, next, optimized);
  7555. }
  7556. nonHydratedAsyncRoot.asyncDep.then(() => {
  7557. if (!instance.isUnmounted) {
  7558. componentUpdateFn();
  7559. }
  7560. });
  7561. return;
  7562. }
  7563. }
  7564. let originNext = next;
  7565. let vnodeHook;
  7566. if (true) {
  7567. pushWarningContext(next || instance.vnode);
  7568. }
  7569. toggleRecurse(instance, false);
  7570. if (next) {
  7571. next.el = vnode.el;
  7572. updateComponentPreRender(instance, next, optimized);
  7573. } else {
  7574. next = vnode;
  7575. }
  7576. if (bu) {
  7577. invokeArrayFns(bu);
  7578. }
  7579. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  7580. invokeVNodeHook(vnodeHook, parent, next, vnode);
  7581. }
  7582. toggleRecurse(instance, true);
  7583. if (true) {
  7584. startMeasure(instance, `render`);
  7585. }
  7586. const nextTree = renderComponentRoot(instance);
  7587. if (true) {
  7588. endMeasure(instance, `render`);
  7589. }
  7590. const prevTree = instance.subTree;
  7591. instance.subTree = nextTree;
  7592. if (true) {
  7593. startMeasure(instance, `patch`);
  7594. }
  7595. patch(
  7596. prevTree,
  7597. nextTree,
  7598. // parent may have changed if it's in a teleport
  7599. hostParentNode(prevTree.el),
  7600. // anchor may have changed if it's in a fragment
  7601. getNextHostNode(prevTree),
  7602. instance,
  7603. parentSuspense,
  7604. namespace
  7605. );
  7606. if (true) {
  7607. endMeasure(instance, `patch`);
  7608. }
  7609. next.el = nextTree.el;
  7610. if (originNext === null) {
  7611. updateHOCHostEl(instance, nextTree.el);
  7612. }
  7613. if (u) {
  7614. queuePostRenderEffect(u, parentSuspense);
  7615. }
  7616. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  7617. queuePostRenderEffect(
  7618. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  7619. parentSuspense
  7620. );
  7621. }
  7622. if (true) {
  7623. devtoolsComponentUpdated(instance);
  7624. }
  7625. if (true) {
  7626. popWarningContext();
  7627. }
  7628. }
  7629. };
  7630. instance.scope.on();
  7631. const effect2 = instance.effect = new ReactiveEffect(componentUpdateFn);
  7632. instance.scope.off();
  7633. const update = instance.update = effect2.run.bind(effect2);
  7634. const job = instance.job = effect2.runIfDirty.bind(effect2);
  7635. job.i = instance;
  7636. job.id = instance.uid;
  7637. effect2.scheduler = () => queueJob(job);
  7638. toggleRecurse(instance, true);
  7639. if (true) {
  7640. effect2.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  7641. effect2.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  7642. }
  7643. update();
  7644. };
  7645. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  7646. nextVNode.component = instance;
  7647. const prevProps = instance.vnode.props;
  7648. instance.vnode = nextVNode;
  7649. instance.next = null;
  7650. updateProps(instance, nextVNode.props, prevProps, optimized);
  7651. updateSlots(instance, nextVNode.children, optimized);
  7652. pauseTracking();
  7653. flushPreFlushCbs(instance);
  7654. resetTracking();
  7655. };
  7656. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  7657. const c1 = n1 && n1.children;
  7658. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  7659. const c2 = n2.children;
  7660. const { patchFlag, shapeFlag } = n2;
  7661. if (patchFlag > 0) {
  7662. if (patchFlag & 128) {
  7663. patchKeyedChildren(
  7664. c1,
  7665. c2,
  7666. container,
  7667. anchor,
  7668. parentComponent,
  7669. parentSuspense,
  7670. namespace,
  7671. slotScopeIds,
  7672. optimized
  7673. );
  7674. return;
  7675. } else if (patchFlag & 256) {
  7676. patchUnkeyedChildren(
  7677. c1,
  7678. c2,
  7679. container,
  7680. anchor,
  7681. parentComponent,
  7682. parentSuspense,
  7683. namespace,
  7684. slotScopeIds,
  7685. optimized
  7686. );
  7687. return;
  7688. }
  7689. }
  7690. if (shapeFlag & 8) {
  7691. if (prevShapeFlag & 16) {
  7692. unmountChildren(c1, parentComponent, parentSuspense);
  7693. }
  7694. if (c2 !== c1) {
  7695. hostSetElementText(container, c2);
  7696. }
  7697. } else {
  7698. if (prevShapeFlag & 16) {
  7699. if (shapeFlag & 16) {
  7700. patchKeyedChildren(
  7701. c1,
  7702. c2,
  7703. container,
  7704. anchor,
  7705. parentComponent,
  7706. parentSuspense,
  7707. namespace,
  7708. slotScopeIds,
  7709. optimized
  7710. );
  7711. } else {
  7712. unmountChildren(c1, parentComponent, parentSuspense, true);
  7713. }
  7714. } else {
  7715. if (prevShapeFlag & 8) {
  7716. hostSetElementText(container, "");
  7717. }
  7718. if (shapeFlag & 16) {
  7719. mountChildren(
  7720. c2,
  7721. container,
  7722. anchor,
  7723. parentComponent,
  7724. parentSuspense,
  7725. namespace,
  7726. slotScopeIds,
  7727. optimized
  7728. );
  7729. }
  7730. }
  7731. }
  7732. };
  7733. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7734. c1 = c1 || EMPTY_ARR;
  7735. c2 = c2 || EMPTY_ARR;
  7736. const oldLength = c1.length;
  7737. const newLength = c2.length;
  7738. const commonLength = Math.min(oldLength, newLength);
  7739. let i;
  7740. for (i = 0; i < commonLength; i++) {
  7741. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7742. patch(
  7743. c1[i],
  7744. nextChild,
  7745. container,
  7746. null,
  7747. parentComponent,
  7748. parentSuspense,
  7749. namespace,
  7750. slotScopeIds,
  7751. optimized
  7752. );
  7753. }
  7754. if (oldLength > newLength) {
  7755. unmountChildren(
  7756. c1,
  7757. parentComponent,
  7758. parentSuspense,
  7759. true,
  7760. false,
  7761. commonLength
  7762. );
  7763. } else {
  7764. mountChildren(
  7765. c2,
  7766. container,
  7767. anchor,
  7768. parentComponent,
  7769. parentSuspense,
  7770. namespace,
  7771. slotScopeIds,
  7772. optimized,
  7773. commonLength
  7774. );
  7775. }
  7776. };
  7777. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7778. let i = 0;
  7779. const l2 = c2.length;
  7780. let e1 = c1.length - 1;
  7781. let e2 = l2 - 1;
  7782. while (i <= e1 && i <= e2) {
  7783. const n1 = c1[i];
  7784. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7785. if (isSameVNodeType(n1, n2)) {
  7786. patch(
  7787. n1,
  7788. n2,
  7789. container,
  7790. null,
  7791. parentComponent,
  7792. parentSuspense,
  7793. namespace,
  7794. slotScopeIds,
  7795. optimized
  7796. );
  7797. } else {
  7798. break;
  7799. }
  7800. i++;
  7801. }
  7802. while (i <= e1 && i <= e2) {
  7803. const n1 = c1[e1];
  7804. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  7805. if (isSameVNodeType(n1, n2)) {
  7806. patch(
  7807. n1,
  7808. n2,
  7809. container,
  7810. null,
  7811. parentComponent,
  7812. parentSuspense,
  7813. namespace,
  7814. slotScopeIds,
  7815. optimized
  7816. );
  7817. } else {
  7818. break;
  7819. }
  7820. e1--;
  7821. e2--;
  7822. }
  7823. if (i > e1) {
  7824. if (i <= e2) {
  7825. const nextPos = e2 + 1;
  7826. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  7827. while (i <= e2) {
  7828. patch(
  7829. null,
  7830. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  7831. container,
  7832. anchor,
  7833. parentComponent,
  7834. parentSuspense,
  7835. namespace,
  7836. slotScopeIds,
  7837. optimized
  7838. );
  7839. i++;
  7840. }
  7841. }
  7842. } else if (i > e2) {
  7843. while (i <= e1) {
  7844. unmount(c1[i], parentComponent, parentSuspense, true);
  7845. i++;
  7846. }
  7847. } else {
  7848. const s1 = i;
  7849. const s2 = i;
  7850. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  7851. for (i = s2; i <= e2; i++) {
  7852. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7853. if (nextChild.key != null) {
  7854. if (keyToNewIndexMap.has(nextChild.key)) {
  7855. warn$1(
  7856. `Duplicate keys found during update:`,
  7857. JSON.stringify(nextChild.key),
  7858. `Make sure keys are unique.`
  7859. );
  7860. }
  7861. keyToNewIndexMap.set(nextChild.key, i);
  7862. }
  7863. }
  7864. let j;
  7865. let patched = 0;
  7866. const toBePatched = e2 - s2 + 1;
  7867. let moved = false;
  7868. let maxNewIndexSoFar = 0;
  7869. const newIndexToOldIndexMap = new Array(toBePatched);
  7870. for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
  7871. for (i = s1; i <= e1; i++) {
  7872. const prevChild = c1[i];
  7873. if (patched >= toBePatched) {
  7874. unmount(prevChild, parentComponent, parentSuspense, true);
  7875. continue;
  7876. }
  7877. let newIndex;
  7878. if (prevChild.key != null) {
  7879. newIndex = keyToNewIndexMap.get(prevChild.key);
  7880. } else {
  7881. for (j = s2; j <= e2; j++) {
  7882. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  7883. newIndex = j;
  7884. break;
  7885. }
  7886. }
  7887. }
  7888. if (newIndex === void 0) {
  7889. unmount(prevChild, parentComponent, parentSuspense, true);
  7890. } else {
  7891. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  7892. if (newIndex >= maxNewIndexSoFar) {
  7893. maxNewIndexSoFar = newIndex;
  7894. } else {
  7895. moved = true;
  7896. }
  7897. patch(
  7898. prevChild,
  7899. c2[newIndex],
  7900. container,
  7901. null,
  7902. parentComponent,
  7903. parentSuspense,
  7904. namespace,
  7905. slotScopeIds,
  7906. optimized
  7907. );
  7908. patched++;
  7909. }
  7910. }
  7911. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  7912. j = increasingNewIndexSequence.length - 1;
  7913. for (i = toBePatched - 1; i >= 0; i--) {
  7914. const nextIndex = s2 + i;
  7915. const nextChild = c2[nextIndex];
  7916. const anchorVNode = c2[nextIndex + 1];
  7917. const anchor = nextIndex + 1 < l2 ? (
  7918. // #13559, fallback to el placeholder for unresolved async component
  7919. anchorVNode.el || anchorVNode.placeholder
  7920. ) : parentAnchor;
  7921. if (newIndexToOldIndexMap[i] === 0) {
  7922. patch(
  7923. null,
  7924. nextChild,
  7925. container,
  7926. anchor,
  7927. parentComponent,
  7928. parentSuspense,
  7929. namespace,
  7930. slotScopeIds,
  7931. optimized
  7932. );
  7933. } else if (moved) {
  7934. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  7935. move(nextChild, container, anchor, 2);
  7936. } else {
  7937. j--;
  7938. }
  7939. }
  7940. }
  7941. }
  7942. };
  7943. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  7944. const { el, type, transition, children, shapeFlag } = vnode;
  7945. if (shapeFlag & 6) {
  7946. move(vnode.component.subTree, container, anchor, moveType);
  7947. return;
  7948. }
  7949. if (shapeFlag & 128) {
  7950. vnode.suspense.move(container, anchor, moveType);
  7951. return;
  7952. }
  7953. if (shapeFlag & 64) {
  7954. type.move(vnode, container, anchor, internals);
  7955. return;
  7956. }
  7957. if (type === Fragment) {
  7958. hostInsert(el, container, anchor);
  7959. for (let i = 0; i < children.length; i++) {
  7960. move(children[i], container, anchor, moveType);
  7961. }
  7962. hostInsert(vnode.anchor, container, anchor);
  7963. return;
  7964. }
  7965. if (type === Static) {
  7966. moveStaticNode(vnode, container, anchor);
  7967. return;
  7968. }
  7969. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  7970. if (needTransition2) {
  7971. if (moveType === 0) {
  7972. transition.beforeEnter(el);
  7973. hostInsert(el, container, anchor);
  7974. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  7975. } else {
  7976. const { leave, delayLeave, afterLeave } = transition;
  7977. const remove22 = () => {
  7978. if (vnode.ctx.isUnmounted) {
  7979. hostRemove(el);
  7980. } else {
  7981. hostInsert(el, container, anchor);
  7982. }
  7983. };
  7984. const performLeave = () => {
  7985. if (el._isLeaving) {
  7986. el[leaveCbKey](
  7987. true
  7988. /* cancelled */
  7989. );
  7990. }
  7991. leave(el, () => {
  7992. remove22();
  7993. afterLeave && afterLeave();
  7994. });
  7995. };
  7996. if (delayLeave) {
  7997. delayLeave(el, remove22, performLeave);
  7998. } else {
  7999. performLeave();
  8000. }
  8001. }
  8002. } else {
  8003. hostInsert(el, container, anchor);
  8004. }
  8005. };
  8006. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  8007. const {
  8008. type,
  8009. props,
  8010. ref: ref2,
  8011. children,
  8012. dynamicChildren,
  8013. shapeFlag,
  8014. patchFlag,
  8015. dirs,
  8016. cacheIndex
  8017. } = vnode;
  8018. if (patchFlag === -2) {
  8019. optimized = false;
  8020. }
  8021. if (ref2 != null) {
  8022. pauseTracking();
  8023. setRef(ref2, null, parentSuspense, vnode, true);
  8024. resetTracking();
  8025. }
  8026. if (cacheIndex != null) {
  8027. parentComponent.renderCache[cacheIndex] = void 0;
  8028. }
  8029. if (shapeFlag & 256) {
  8030. parentComponent.ctx.deactivate(vnode);
  8031. return;
  8032. }
  8033. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  8034. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  8035. let vnodeHook;
  8036. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  8037. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  8038. }
  8039. if (shapeFlag & 6) {
  8040. unmountComponent(vnode.component, parentSuspense, doRemove);
  8041. } else {
  8042. if (shapeFlag & 128) {
  8043. vnode.suspense.unmount(parentSuspense, doRemove);
  8044. return;
  8045. }
  8046. if (shouldInvokeDirs) {
  8047. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  8048. }
  8049. if (shapeFlag & 64) {
  8050. vnode.type.remove(
  8051. vnode,
  8052. parentComponent,
  8053. parentSuspense,
  8054. internals,
  8055. doRemove
  8056. );
  8057. } else if (dynamicChildren && // #5154
  8058. // when v-once is used inside a block, setBlockTracking(-1) marks the
  8059. // parent block with hasOnce: true
  8060. // so that it doesn't take the fast path during unmount - otherwise
  8061. // components nested in v-once are never unmounted.
  8062. !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
  8063. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  8064. unmountChildren(
  8065. dynamicChildren,
  8066. parentComponent,
  8067. parentSuspense,
  8068. false,
  8069. true
  8070. );
  8071. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  8072. unmountChildren(children, parentComponent, parentSuspense);
  8073. }
  8074. if (doRemove) {
  8075. remove2(vnode);
  8076. }
  8077. }
  8078. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  8079. queuePostRenderEffect(() => {
  8080. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  8081. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  8082. }, parentSuspense);
  8083. }
  8084. };
  8085. const remove2 = (vnode) => {
  8086. const { type, el, anchor, transition } = vnode;
  8087. if (type === Fragment) {
  8088. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
  8089. vnode.children.forEach((child) => {
  8090. if (child.type === Comment) {
  8091. hostRemove(child.el);
  8092. } else {
  8093. remove2(child);
  8094. }
  8095. });
  8096. } else {
  8097. removeFragment(el, anchor);
  8098. }
  8099. return;
  8100. }
  8101. if (type === Static) {
  8102. removeStaticNode(vnode);
  8103. return;
  8104. }
  8105. const performRemove = () => {
  8106. hostRemove(el);
  8107. if (transition && !transition.persisted && transition.afterLeave) {
  8108. transition.afterLeave();
  8109. }
  8110. };
  8111. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  8112. const { leave, delayLeave } = transition;
  8113. const performLeave = () => leave(el, performRemove);
  8114. if (delayLeave) {
  8115. delayLeave(vnode.el, performRemove, performLeave);
  8116. } else {
  8117. performLeave();
  8118. }
  8119. } else {
  8120. performRemove();
  8121. }
  8122. };
  8123. const removeFragment = (cur, end) => {
  8124. let next;
  8125. while (cur !== end) {
  8126. next = hostNextSibling(cur);
  8127. hostRemove(cur);
  8128. cur = next;
  8129. }
  8130. hostRemove(end);
  8131. };
  8132. const unmountComponent = (instance, parentSuspense, doRemove) => {
  8133. if (instance.type.__hmrId) {
  8134. unregisterHMR(instance);
  8135. }
  8136. const { bum, scope, job, subTree, um, m, a } = instance;
  8137. invalidateMount(m);
  8138. invalidateMount(a);
  8139. if (bum) {
  8140. invokeArrayFns(bum);
  8141. }
  8142. scope.stop();
  8143. if (job) {
  8144. job.flags |= 8;
  8145. unmount(subTree, instance, parentSuspense, doRemove);
  8146. }
  8147. if (um) {
  8148. queuePostRenderEffect(um, parentSuspense);
  8149. }
  8150. queuePostRenderEffect(() => {
  8151. instance.isUnmounted = true;
  8152. }, parentSuspense);
  8153. if (true) {
  8154. devtoolsComponentRemoved(instance);
  8155. }
  8156. };
  8157. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  8158. for (let i = start; i < children.length; i++) {
  8159. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  8160. }
  8161. };
  8162. const getNextHostNode = (vnode) => {
  8163. if (vnode.shapeFlag & 6) {
  8164. return getNextHostNode(vnode.component.subTree);
  8165. }
  8166. if (vnode.shapeFlag & 128) {
  8167. return vnode.suspense.next();
  8168. }
  8169. const el = hostNextSibling(vnode.anchor || vnode.el);
  8170. const teleportEnd = el && el[TeleportEndKey];
  8171. return teleportEnd ? hostNextSibling(teleportEnd) : el;
  8172. };
  8173. let isFlushing = false;
  8174. const render2 = (vnode, container, namespace) => {
  8175. if (vnode == null) {
  8176. if (container._vnode) {
  8177. unmount(container._vnode, null, null, true);
  8178. }
  8179. } else {
  8180. patch(
  8181. container._vnode || null,
  8182. vnode,
  8183. container,
  8184. null,
  8185. null,
  8186. null,
  8187. namespace
  8188. );
  8189. }
  8190. container._vnode = vnode;
  8191. if (!isFlushing) {
  8192. isFlushing = true;
  8193. flushPreFlushCbs();
  8194. flushPostFlushCbs();
  8195. isFlushing = false;
  8196. }
  8197. };
  8198. const internals = {
  8199. p: patch,
  8200. um: unmount,
  8201. m: move,
  8202. r: remove2,
  8203. mt: mountComponent,
  8204. mc: mountChildren,
  8205. pc: patchChildren,
  8206. pbc: patchBlockChildren,
  8207. n: getNextHostNode,
  8208. o: options
  8209. };
  8210. let hydrate2;
  8211. let hydrateNode;
  8212. if (createHydrationFns) {
  8213. [hydrate2, hydrateNode] = createHydrationFns(
  8214. internals
  8215. );
  8216. }
  8217. return {
  8218. render: render2,
  8219. hydrate: hydrate2,
  8220. createApp: createAppAPI(render2, hydrate2)
  8221. };
  8222. }
  8223. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  8224. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  8225. }
  8226. function toggleRecurse({ effect: effect2, job }, allowed) {
  8227. if (allowed) {
  8228. effect2.flags |= 32;
  8229. job.flags |= 4;
  8230. } else {
  8231. effect2.flags &= -33;
  8232. job.flags &= -5;
  8233. }
  8234. }
  8235. function needTransition(parentSuspense, transition) {
  8236. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  8237. }
  8238. function traverseStaticChildren(n1, n2, shallow = false) {
  8239. const ch1 = n1.children;
  8240. const ch2 = n2.children;
  8241. if (isArray(ch1) && isArray(ch2)) {
  8242. for (let i = 0; i < ch1.length; i++) {
  8243. const c1 = ch1[i];
  8244. let c2 = ch2[i];
  8245. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  8246. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  8247. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  8248. c2.el = c1.el;
  8249. }
  8250. if (!shallow && c2.patchFlag !== -2)
  8251. traverseStaticChildren(c1, c2);
  8252. }
  8253. if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
  8254. c2.patchFlag !== -1) {
  8255. c2.el = c1.el;
  8256. }
  8257. if (c2.type === Comment && !c2.el) {
  8258. c2.el = c1.el;
  8259. }
  8260. if (true) {
  8261. c2.el && (c2.el.__vnode = c2);
  8262. }
  8263. }
  8264. }
  8265. }
  8266. function getSequence(arr) {
  8267. const p2 = arr.slice();
  8268. const result = [0];
  8269. let i, j, u, v, c;
  8270. const len = arr.length;
  8271. for (i = 0; i < len; i++) {
  8272. const arrI = arr[i];
  8273. if (arrI !== 0) {
  8274. j = result[result.length - 1];
  8275. if (arr[j] < arrI) {
  8276. p2[i] = j;
  8277. result.push(i);
  8278. continue;
  8279. }
  8280. u = 0;
  8281. v = result.length - 1;
  8282. while (u < v) {
  8283. c = u + v >> 1;
  8284. if (arr[result[c]] < arrI) {
  8285. u = c + 1;
  8286. } else {
  8287. v = c;
  8288. }
  8289. }
  8290. if (arrI < arr[result[u]]) {
  8291. if (u > 0) {
  8292. p2[i] = result[u - 1];
  8293. }
  8294. result[u] = i;
  8295. }
  8296. }
  8297. }
  8298. u = result.length;
  8299. v = result[u - 1];
  8300. while (u-- > 0) {
  8301. result[u] = v;
  8302. v = p2[v];
  8303. }
  8304. return result;
  8305. }
  8306. function locateNonHydratedAsyncRoot(instance) {
  8307. const subComponent = instance.subTree.component;
  8308. if (subComponent) {
  8309. if (subComponent.asyncDep && !subComponent.asyncResolved) {
  8310. return subComponent;
  8311. } else {
  8312. return locateNonHydratedAsyncRoot(subComponent);
  8313. }
  8314. }
  8315. }
  8316. function invalidateMount(hooks) {
  8317. if (hooks) {
  8318. for (let i = 0; i < hooks.length; i++)
  8319. hooks[i].flags |= 8;
  8320. }
  8321. }
  8322. var ssrContextKey = Symbol.for("v-scx");
  8323. var useSSRContext = () => {
  8324. {
  8325. const ctx = inject(ssrContextKey);
  8326. if (!ctx) {
  8327. warn$1(
  8328. `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
  8329. );
  8330. }
  8331. return ctx;
  8332. }
  8333. };
  8334. function watchEffect(effect2, options) {
  8335. return doWatch(effect2, null, options);
  8336. }
  8337. function watchPostEffect(effect2, options) {
  8338. return doWatch(
  8339. effect2,
  8340. null,
  8341. true ? extend({}, options, { flush: "post" }) : { flush: "post" }
  8342. );
  8343. }
  8344. function watchSyncEffect(effect2, options) {
  8345. return doWatch(
  8346. effect2,
  8347. null,
  8348. true ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
  8349. );
  8350. }
  8351. function watch2(source, cb, options) {
  8352. if (!isFunction(cb)) {
  8353. warn$1(
  8354. `\`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.`
  8355. );
  8356. }
  8357. return doWatch(source, cb, options);
  8358. }
  8359. function doWatch(source, cb, options = EMPTY_OBJ) {
  8360. const { immediate, deep, flush, once } = options;
  8361. if (!cb) {
  8362. if (immediate !== void 0) {
  8363. warn$1(
  8364. `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
  8365. );
  8366. }
  8367. if (deep !== void 0) {
  8368. warn$1(
  8369. `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
  8370. );
  8371. }
  8372. if (once !== void 0) {
  8373. warn$1(
  8374. `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
  8375. );
  8376. }
  8377. }
  8378. const baseWatchOptions = extend({}, options);
  8379. if (true) baseWatchOptions.onWarn = warn$1;
  8380. const runsImmediately = cb && immediate || !cb && flush !== "post";
  8381. let ssrCleanup;
  8382. if (isInSSRComponentSetup) {
  8383. if (flush === "sync") {
  8384. const ctx = useSSRContext();
  8385. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  8386. } else if (!runsImmediately) {
  8387. const watchStopHandle = () => {
  8388. };
  8389. watchStopHandle.stop = NOOP;
  8390. watchStopHandle.resume = NOOP;
  8391. watchStopHandle.pause = NOOP;
  8392. return watchStopHandle;
  8393. }
  8394. }
  8395. const instance = currentInstance;
  8396. baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
  8397. let isPre = false;
  8398. if (flush === "post") {
  8399. baseWatchOptions.scheduler = (job) => {
  8400. queuePostRenderEffect(job, instance && instance.suspense);
  8401. };
  8402. } else if (flush !== "sync") {
  8403. isPre = true;
  8404. baseWatchOptions.scheduler = (job, isFirstRun) => {
  8405. if (isFirstRun) {
  8406. job();
  8407. } else {
  8408. queueJob(job);
  8409. }
  8410. };
  8411. }
  8412. baseWatchOptions.augmentJob = (job) => {
  8413. if (cb) {
  8414. job.flags |= 4;
  8415. }
  8416. if (isPre) {
  8417. job.flags |= 2;
  8418. if (instance) {
  8419. job.id = instance.uid;
  8420. job.i = instance;
  8421. }
  8422. }
  8423. };
  8424. const watchHandle = watch(source, cb, baseWatchOptions);
  8425. if (isInSSRComponentSetup) {
  8426. if (ssrCleanup) {
  8427. ssrCleanup.push(watchHandle);
  8428. } else if (runsImmediately) {
  8429. watchHandle();
  8430. }
  8431. }
  8432. return watchHandle;
  8433. }
  8434. function instanceWatch(source, value, options) {
  8435. const publicThis = this.proxy;
  8436. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  8437. let cb;
  8438. if (isFunction(value)) {
  8439. cb = value;
  8440. } else {
  8441. cb = value.handler;
  8442. options = value;
  8443. }
  8444. const reset = setCurrentInstance(this);
  8445. const res = doWatch(getter, cb.bind(publicThis), options);
  8446. reset();
  8447. return res;
  8448. }
  8449. function createPathGetter(ctx, path) {
  8450. const segments = path.split(".");
  8451. return () => {
  8452. let cur = ctx;
  8453. for (let i = 0; i < segments.length && cur; i++) {
  8454. cur = cur[segments[i]];
  8455. }
  8456. return cur;
  8457. };
  8458. }
  8459. function useModel(props, name, options = EMPTY_OBJ) {
  8460. const i = getCurrentInstance();
  8461. if (!i) {
  8462. warn$1(`useModel() called without active instance.`);
  8463. return ref();
  8464. }
  8465. const camelizedName = camelize(name);
  8466. if (!i.propsOptions[0][camelizedName]) {
  8467. warn$1(`useModel() called with prop "${name}" which is not declared.`);
  8468. return ref();
  8469. }
  8470. const hyphenatedName = hyphenate(name);
  8471. const modifiers = getModelModifiers(props, camelizedName);
  8472. const res = customRef((track2, trigger2) => {
  8473. let localValue;
  8474. let prevSetValue = EMPTY_OBJ;
  8475. let prevEmittedValue;
  8476. watchSyncEffect(() => {
  8477. const propValue = props[camelizedName];
  8478. if (hasChanged(localValue, propValue)) {
  8479. localValue = propValue;
  8480. trigger2();
  8481. }
  8482. });
  8483. return {
  8484. get() {
  8485. track2();
  8486. return options.get ? options.get(localValue) : localValue;
  8487. },
  8488. set(value) {
  8489. const emittedValue = options.set ? options.set(value) : value;
  8490. if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
  8491. return;
  8492. }
  8493. const rawProps = i.vnode.props;
  8494. if (!(rawProps && // check if parent has passed v-model
  8495. (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
  8496. localValue = value;
  8497. trigger2();
  8498. }
  8499. i.emit(`update:${name}`, emittedValue);
  8500. if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
  8501. trigger2();
  8502. }
  8503. prevSetValue = value;
  8504. prevEmittedValue = emittedValue;
  8505. }
  8506. };
  8507. });
  8508. res[Symbol.iterator] = () => {
  8509. let i2 = 0;
  8510. return {
  8511. next() {
  8512. if (i2 < 2) {
  8513. return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };
  8514. } else {
  8515. return { done: true };
  8516. }
  8517. }
  8518. };
  8519. };
  8520. return res;
  8521. }
  8522. var getModelModifiers = (props, modelName) => {
  8523. return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
  8524. };
  8525. function emit(instance, event, ...rawArgs) {
  8526. if (instance.isUnmounted) return;
  8527. const props = instance.vnode.props || EMPTY_OBJ;
  8528. if (true) {
  8529. const {
  8530. emitsOptions,
  8531. propsOptions: [propsOptions]
  8532. } = instance;
  8533. if (emitsOptions) {
  8534. if (!(event in emitsOptions) && true) {
  8535. if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
  8536. warn$1(
  8537. `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
  8538. );
  8539. }
  8540. } else {
  8541. const validator = emitsOptions[event];
  8542. if (isFunction(validator)) {
  8543. const isValid = validator(...rawArgs);
  8544. if (!isValid) {
  8545. warn$1(
  8546. `Invalid event arguments: event validation failed for event "${event}".`
  8547. );
  8548. }
  8549. }
  8550. }
  8551. }
  8552. }
  8553. let args = rawArgs;
  8554. const isModelListener2 = event.startsWith("update:");
  8555. const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
  8556. if (modifiers) {
  8557. if (modifiers.trim) {
  8558. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  8559. }
  8560. if (modifiers.number) {
  8561. args = rawArgs.map(looseToNumber);
  8562. }
  8563. }
  8564. if (true) {
  8565. devtoolsComponentEmit(instance, event, args);
  8566. }
  8567. if (true) {
  8568. const lowerCaseEvent = event.toLowerCase();
  8569. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
  8570. warn$1(
  8571. `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
  8572. instance,
  8573. instance.type
  8574. )} 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(
  8575. event
  8576. )}" instead of "${event}".`
  8577. );
  8578. }
  8579. }
  8580. let handlerName;
  8581. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  8582. props[handlerName = toHandlerKey(camelize(event))];
  8583. if (!handler && isModelListener2) {
  8584. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  8585. }
  8586. if (handler) {
  8587. callWithAsyncErrorHandling(
  8588. handler,
  8589. instance,
  8590. 6,
  8591. args
  8592. );
  8593. }
  8594. const onceHandler = props[handlerName + `Once`];
  8595. if (onceHandler) {
  8596. if (!instance.emitted) {
  8597. instance.emitted = {};
  8598. } else if (instance.emitted[handlerName]) {
  8599. return;
  8600. }
  8601. instance.emitted[handlerName] = true;
  8602. callWithAsyncErrorHandling(
  8603. onceHandler,
  8604. instance,
  8605. 6,
  8606. args
  8607. );
  8608. }
  8609. }
  8610. var mixinEmitsCache = /* @__PURE__ */ new WeakMap();
  8611. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  8612. const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
  8613. const cached = cache.get(comp);
  8614. if (cached !== void 0) {
  8615. return cached;
  8616. }
  8617. const raw = comp.emits;
  8618. let normalized = {};
  8619. let hasExtends = false;
  8620. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  8621. const extendEmits = (raw2) => {
  8622. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  8623. if (normalizedFromExtend) {
  8624. hasExtends = true;
  8625. extend(normalized, normalizedFromExtend);
  8626. }
  8627. };
  8628. if (!asMixin && appContext.mixins.length) {
  8629. appContext.mixins.forEach(extendEmits);
  8630. }
  8631. if (comp.extends) {
  8632. extendEmits(comp.extends);
  8633. }
  8634. if (comp.mixins) {
  8635. comp.mixins.forEach(extendEmits);
  8636. }
  8637. }
  8638. if (!raw && !hasExtends) {
  8639. if (isObject(comp)) {
  8640. cache.set(comp, null);
  8641. }
  8642. return null;
  8643. }
  8644. if (isArray(raw)) {
  8645. raw.forEach((key) => normalized[key] = null);
  8646. } else {
  8647. extend(normalized, raw);
  8648. }
  8649. if (isObject(comp)) {
  8650. cache.set(comp, normalized);
  8651. }
  8652. return normalized;
  8653. }
  8654. function isEmitListener(options, key) {
  8655. if (!options || !isOn(key)) {
  8656. return false;
  8657. }
  8658. key = key.slice(2).replace(/Once$/, "");
  8659. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  8660. }
  8661. var accessedAttrs = false;
  8662. function markAttrsAccessed() {
  8663. accessedAttrs = true;
  8664. }
  8665. function renderComponentRoot(instance) {
  8666. const {
  8667. type: Component,
  8668. vnode,
  8669. proxy,
  8670. withProxy,
  8671. propsOptions: [propsOptions],
  8672. slots,
  8673. attrs,
  8674. emit: emit2,
  8675. render: render2,
  8676. renderCache,
  8677. props,
  8678. data,
  8679. setupState,
  8680. ctx,
  8681. inheritAttrs
  8682. } = instance;
  8683. const prev = setCurrentRenderingInstance(instance);
  8684. let result;
  8685. let fallthroughAttrs;
  8686. if (true) {
  8687. accessedAttrs = false;
  8688. }
  8689. try {
  8690. if (vnode.shapeFlag & 4) {
  8691. const proxyToUse = withProxy || proxy;
  8692. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
  8693. get(target, key, receiver) {
  8694. warn$1(
  8695. `Property '${String(
  8696. key
  8697. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  8698. );
  8699. return Reflect.get(target, key, receiver);
  8700. }
  8701. }) : proxyToUse;
  8702. result = normalizeVNode(
  8703. render2.call(
  8704. thisProxy,
  8705. proxyToUse,
  8706. renderCache,
  8707. true ? shallowReadonly(props) : props,
  8708. setupState,
  8709. data,
  8710. ctx
  8711. )
  8712. );
  8713. fallthroughAttrs = attrs;
  8714. } else {
  8715. const render22 = Component;
  8716. if (attrs === props) {
  8717. markAttrsAccessed();
  8718. }
  8719. result = normalizeVNode(
  8720. render22.length > 1 ? render22(
  8721. true ? shallowReadonly(props) : props,
  8722. true ? {
  8723. get attrs() {
  8724. markAttrsAccessed();
  8725. return shallowReadonly(attrs);
  8726. },
  8727. slots,
  8728. emit: emit2
  8729. } : { attrs, slots, emit: emit2 }
  8730. ) : render22(
  8731. true ? shallowReadonly(props) : props,
  8732. null
  8733. )
  8734. );
  8735. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  8736. }
  8737. } catch (err) {
  8738. blockStack.length = 0;
  8739. handleError(err, instance, 1);
  8740. result = createVNode(Comment);
  8741. }
  8742. let root = result;
  8743. let setRoot = void 0;
  8744. if (result.patchFlag > 0 && result.patchFlag & 2048) {
  8745. [root, setRoot] = getChildRoot(result);
  8746. }
  8747. if (fallthroughAttrs && inheritAttrs !== false) {
  8748. const keys = Object.keys(fallthroughAttrs);
  8749. const { shapeFlag } = root;
  8750. if (keys.length) {
  8751. if (shapeFlag & (1 | 6)) {
  8752. if (propsOptions && keys.some(isModelListener)) {
  8753. fallthroughAttrs = filterModelListeners(
  8754. fallthroughAttrs,
  8755. propsOptions
  8756. );
  8757. }
  8758. root = cloneVNode(root, fallthroughAttrs, false, true);
  8759. } else if (!accessedAttrs && root.type !== Comment) {
  8760. const allAttrs = Object.keys(attrs);
  8761. const eventAttrs = [];
  8762. const extraAttrs = [];
  8763. for (let i = 0, l = allAttrs.length; i < l; i++) {
  8764. const key = allAttrs[i];
  8765. if (isOn(key)) {
  8766. if (!isModelListener(key)) {
  8767. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  8768. }
  8769. } else {
  8770. extraAttrs.push(key);
  8771. }
  8772. }
  8773. if (extraAttrs.length) {
  8774. warn$1(
  8775. `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
  8776. );
  8777. }
  8778. if (eventAttrs.length) {
  8779. warn$1(
  8780. `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.`
  8781. );
  8782. }
  8783. }
  8784. }
  8785. }
  8786. if (vnode.dirs) {
  8787. if (!isElementRoot(root)) {
  8788. warn$1(
  8789. `Runtime directive used on component with non-element root node. The directives will not function as intended.`
  8790. );
  8791. }
  8792. root = cloneVNode(root, null, false, true);
  8793. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  8794. }
  8795. if (vnode.transition) {
  8796. if (!isElementRoot(root)) {
  8797. warn$1(
  8798. `Component inside <Transition> renders non-element root node that cannot be animated.`
  8799. );
  8800. }
  8801. setTransitionHooks(root, vnode.transition);
  8802. }
  8803. if (setRoot) {
  8804. setRoot(root);
  8805. } else {
  8806. result = root;
  8807. }
  8808. setCurrentRenderingInstance(prev);
  8809. return result;
  8810. }
  8811. var getChildRoot = (vnode) => {
  8812. const rawChildren = vnode.children;
  8813. const dynamicChildren = vnode.dynamicChildren;
  8814. const childRoot = filterSingleRoot(rawChildren, false);
  8815. if (!childRoot) {
  8816. return [vnode, void 0];
  8817. } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
  8818. return getChildRoot(childRoot);
  8819. }
  8820. const index = rawChildren.indexOf(childRoot);
  8821. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  8822. const setRoot = (updatedRoot) => {
  8823. rawChildren[index] = updatedRoot;
  8824. if (dynamicChildren) {
  8825. if (dynamicIndex > -1) {
  8826. dynamicChildren[dynamicIndex] = updatedRoot;
  8827. } else if (updatedRoot.patchFlag > 0) {
  8828. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  8829. }
  8830. }
  8831. };
  8832. return [normalizeVNode(childRoot), setRoot];
  8833. };
  8834. function filterSingleRoot(children, recurse = true) {
  8835. let singleRoot;
  8836. for (let i = 0; i < children.length; i++) {
  8837. const child = children[i];
  8838. if (isVNode(child)) {
  8839. if (child.type !== Comment || child.children === "v-if") {
  8840. if (singleRoot) {
  8841. return;
  8842. } else {
  8843. singleRoot = child;
  8844. if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
  8845. return filterSingleRoot(singleRoot.children);
  8846. }
  8847. }
  8848. }
  8849. } else {
  8850. return;
  8851. }
  8852. }
  8853. return singleRoot;
  8854. }
  8855. var getFunctionalFallthrough = (attrs) => {
  8856. let res;
  8857. for (const key in attrs) {
  8858. if (key === "class" || key === "style" || isOn(key)) {
  8859. (res || (res = {}))[key] = attrs[key];
  8860. }
  8861. }
  8862. return res;
  8863. };
  8864. var filterModelListeners = (attrs, props) => {
  8865. const res = {};
  8866. for (const key in attrs) {
  8867. if (!isModelListener(key) || !(key.slice(9) in props)) {
  8868. res[key] = attrs[key];
  8869. }
  8870. }
  8871. return res;
  8872. };
  8873. var isElementRoot = (vnode) => {
  8874. return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
  8875. };
  8876. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  8877. const { props: prevProps, children: prevChildren, component } = prevVNode;
  8878. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  8879. const emits = component.emitsOptions;
  8880. if ((prevChildren || nextChildren) && isHmrUpdating) {
  8881. return true;
  8882. }
  8883. if (nextVNode.dirs || nextVNode.transition) {
  8884. return true;
  8885. }
  8886. if (optimized && patchFlag >= 0) {
  8887. if (patchFlag & 1024) {
  8888. return true;
  8889. }
  8890. if (patchFlag & 16) {
  8891. if (!prevProps) {
  8892. return !!nextProps;
  8893. }
  8894. return hasPropsChanged(prevProps, nextProps, emits);
  8895. } else if (patchFlag & 8) {
  8896. const dynamicProps = nextVNode.dynamicProps;
  8897. for (let i = 0; i < dynamicProps.length; i++) {
  8898. const key = dynamicProps[i];
  8899. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  8900. return true;
  8901. }
  8902. }
  8903. }
  8904. } else {
  8905. if (prevChildren || nextChildren) {
  8906. if (!nextChildren || !nextChildren.$stable) {
  8907. return true;
  8908. }
  8909. }
  8910. if (prevProps === nextProps) {
  8911. return false;
  8912. }
  8913. if (!prevProps) {
  8914. return !!nextProps;
  8915. }
  8916. if (!nextProps) {
  8917. return true;
  8918. }
  8919. return hasPropsChanged(prevProps, nextProps, emits);
  8920. }
  8921. return false;
  8922. }
  8923. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  8924. const nextKeys = Object.keys(nextProps);
  8925. if (nextKeys.length !== Object.keys(prevProps).length) {
  8926. return true;
  8927. }
  8928. for (let i = 0; i < nextKeys.length; i++) {
  8929. const key = nextKeys[i];
  8930. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  8931. return true;
  8932. }
  8933. }
  8934. return false;
  8935. }
  8936. function updateHOCHostEl({ vnode, parent }, el) {
  8937. while (parent) {
  8938. const root = parent.subTree;
  8939. if (root.suspense && root.suspense.activeBranch === vnode) {
  8940. root.el = vnode.el;
  8941. }
  8942. if (root === vnode) {
  8943. (vnode = parent.vnode).el = el;
  8944. parent = parent.parent;
  8945. } else {
  8946. break;
  8947. }
  8948. }
  8949. }
  8950. var isSuspense = (type) => type.__isSuspense;
  8951. var suspenseId = 0;
  8952. var SuspenseImpl = {
  8953. name: "Suspense",
  8954. // In order to make Suspense tree-shakable, we need to avoid importing it
  8955. // directly in the renderer. The renderer checks for the __isSuspense flag
  8956. // on a vnode's type and calls the `process` method, passing in renderer
  8957. // internals.
  8958. __isSuspense: true,
  8959. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  8960. if (n1 == null) {
  8961. mountSuspense(
  8962. n2,
  8963. container,
  8964. anchor,
  8965. parentComponent,
  8966. parentSuspense,
  8967. namespace,
  8968. slotScopeIds,
  8969. optimized,
  8970. rendererInternals
  8971. );
  8972. } else {
  8973. if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
  8974. n2.suspense = n1.suspense;
  8975. n2.suspense.vnode = n2;
  8976. n2.el = n1.el;
  8977. return;
  8978. }
  8979. patchSuspense(
  8980. n1,
  8981. n2,
  8982. container,
  8983. anchor,
  8984. parentComponent,
  8985. namespace,
  8986. slotScopeIds,
  8987. optimized,
  8988. rendererInternals
  8989. );
  8990. }
  8991. },
  8992. hydrate: hydrateSuspense,
  8993. normalize: normalizeSuspenseChildren
  8994. };
  8995. var Suspense = SuspenseImpl;
  8996. function triggerEvent(vnode, name) {
  8997. const eventListener = vnode.props && vnode.props[name];
  8998. if (isFunction(eventListener)) {
  8999. eventListener();
  9000. }
  9001. }
  9002. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  9003. const {
  9004. p: patch,
  9005. o: { createElement }
  9006. } = rendererInternals;
  9007. const hiddenContainer = createElement("div");
  9008. const suspense = vnode.suspense = createSuspenseBoundary(
  9009. vnode,
  9010. parentSuspense,
  9011. parentComponent,
  9012. container,
  9013. hiddenContainer,
  9014. anchor,
  9015. namespace,
  9016. slotScopeIds,
  9017. optimized,
  9018. rendererInternals
  9019. );
  9020. patch(
  9021. null,
  9022. suspense.pendingBranch = vnode.ssContent,
  9023. hiddenContainer,
  9024. null,
  9025. parentComponent,
  9026. suspense,
  9027. namespace,
  9028. slotScopeIds
  9029. );
  9030. if (suspense.deps > 0) {
  9031. triggerEvent(vnode, "onPending");
  9032. triggerEvent(vnode, "onFallback");
  9033. patch(
  9034. null,
  9035. vnode.ssFallback,
  9036. container,
  9037. anchor,
  9038. parentComponent,
  9039. null,
  9040. // fallback tree will not have suspense context
  9041. namespace,
  9042. slotScopeIds
  9043. );
  9044. setActiveBranch(suspense, vnode.ssFallback);
  9045. } else {
  9046. suspense.resolve(false, true);
  9047. }
  9048. }
  9049. function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  9050. const suspense = n2.suspense = n1.suspense;
  9051. suspense.vnode = n2;
  9052. n2.el = n1.el;
  9053. const newBranch = n2.ssContent;
  9054. const newFallback = n2.ssFallback;
  9055. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  9056. if (pendingBranch) {
  9057. suspense.pendingBranch = newBranch;
  9058. if (isSameVNodeType(pendingBranch, newBranch)) {
  9059. patch(
  9060. pendingBranch,
  9061. newBranch,
  9062. suspense.hiddenContainer,
  9063. null,
  9064. parentComponent,
  9065. suspense,
  9066. namespace,
  9067. slotScopeIds,
  9068. optimized
  9069. );
  9070. if (suspense.deps <= 0) {
  9071. suspense.resolve();
  9072. } else if (isInFallback) {
  9073. if (!isHydrating) {
  9074. patch(
  9075. activeBranch,
  9076. newFallback,
  9077. container,
  9078. anchor,
  9079. parentComponent,
  9080. null,
  9081. // fallback tree will not have suspense context
  9082. namespace,
  9083. slotScopeIds,
  9084. optimized
  9085. );
  9086. setActiveBranch(suspense, newFallback);
  9087. }
  9088. }
  9089. } else {
  9090. suspense.pendingId = suspenseId++;
  9091. if (isHydrating) {
  9092. suspense.isHydrating = false;
  9093. suspense.activeBranch = pendingBranch;
  9094. } else {
  9095. unmount(pendingBranch, parentComponent, suspense);
  9096. }
  9097. suspense.deps = 0;
  9098. suspense.effects.length = 0;
  9099. suspense.hiddenContainer = createElement("div");
  9100. if (isInFallback) {
  9101. patch(
  9102. null,
  9103. newBranch,
  9104. suspense.hiddenContainer,
  9105. null,
  9106. parentComponent,
  9107. suspense,
  9108. namespace,
  9109. slotScopeIds,
  9110. optimized
  9111. );
  9112. if (suspense.deps <= 0) {
  9113. suspense.resolve();
  9114. } else {
  9115. patch(
  9116. activeBranch,
  9117. newFallback,
  9118. container,
  9119. anchor,
  9120. parentComponent,
  9121. null,
  9122. // fallback tree will not have suspense context
  9123. namespace,
  9124. slotScopeIds,
  9125. optimized
  9126. );
  9127. setActiveBranch(suspense, newFallback);
  9128. }
  9129. } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
  9130. patch(
  9131. activeBranch,
  9132. newBranch,
  9133. container,
  9134. anchor,
  9135. parentComponent,
  9136. suspense,
  9137. namespace,
  9138. slotScopeIds,
  9139. optimized
  9140. );
  9141. suspense.resolve(true);
  9142. } else {
  9143. patch(
  9144. null,
  9145. newBranch,
  9146. suspense.hiddenContainer,
  9147. null,
  9148. parentComponent,
  9149. suspense,
  9150. namespace,
  9151. slotScopeIds,
  9152. optimized
  9153. );
  9154. if (suspense.deps <= 0) {
  9155. suspense.resolve();
  9156. }
  9157. }
  9158. }
  9159. } else {
  9160. if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
  9161. patch(
  9162. activeBranch,
  9163. newBranch,
  9164. container,
  9165. anchor,
  9166. parentComponent,
  9167. suspense,
  9168. namespace,
  9169. slotScopeIds,
  9170. optimized
  9171. );
  9172. setActiveBranch(suspense, newBranch);
  9173. } else {
  9174. triggerEvent(n2, "onPending");
  9175. suspense.pendingBranch = newBranch;
  9176. if (newBranch.shapeFlag & 512) {
  9177. suspense.pendingId = newBranch.component.suspenseId;
  9178. } else {
  9179. suspense.pendingId = suspenseId++;
  9180. }
  9181. patch(
  9182. null,
  9183. newBranch,
  9184. suspense.hiddenContainer,
  9185. null,
  9186. parentComponent,
  9187. suspense,
  9188. namespace,
  9189. slotScopeIds,
  9190. optimized
  9191. );
  9192. if (suspense.deps <= 0) {
  9193. suspense.resolve();
  9194. } else {
  9195. const { timeout, pendingId } = suspense;
  9196. if (timeout > 0) {
  9197. setTimeout(() => {
  9198. if (suspense.pendingId === pendingId) {
  9199. suspense.fallback(newFallback);
  9200. }
  9201. }, timeout);
  9202. } else if (timeout === 0) {
  9203. suspense.fallback(newFallback);
  9204. }
  9205. }
  9206. }
  9207. }
  9208. }
  9209. var hasWarned = false;
  9210. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  9211. if (!hasWarned) {
  9212. hasWarned = true;
  9213. console[console.info ? "info" : "log"](
  9214. `<Suspense> is an experimental feature and its API will likely change.`
  9215. );
  9216. }
  9217. const {
  9218. p: patch,
  9219. m: move,
  9220. um: unmount,
  9221. n: next,
  9222. o: { parentNode, remove: remove2 }
  9223. } = rendererInternals;
  9224. let parentSuspenseId;
  9225. const isSuspensible = isVNodeSuspensible(vnode);
  9226. if (isSuspensible) {
  9227. if (parentSuspense && parentSuspense.pendingBranch) {
  9228. parentSuspenseId = parentSuspense.pendingId;
  9229. parentSuspense.deps++;
  9230. }
  9231. }
  9232. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  9233. if (true) {
  9234. assertNumber(timeout, `Suspense timeout`);
  9235. }
  9236. const initialAnchor = anchor;
  9237. const suspense = {
  9238. vnode,
  9239. parent: parentSuspense,
  9240. parentComponent,
  9241. namespace,
  9242. container,
  9243. hiddenContainer,
  9244. deps: 0,
  9245. pendingId: suspenseId++,
  9246. timeout: typeof timeout === "number" ? timeout : -1,
  9247. activeBranch: null,
  9248. pendingBranch: null,
  9249. isInFallback: !isHydrating,
  9250. isHydrating,
  9251. isUnmounted: false,
  9252. effects: [],
  9253. resolve(resume = false, sync = false) {
  9254. if (true) {
  9255. if (!resume && !suspense.pendingBranch) {
  9256. throw new Error(
  9257. `suspense.resolve() is called without a pending branch.`
  9258. );
  9259. }
  9260. if (suspense.isUnmounted) {
  9261. throw new Error(
  9262. `suspense.resolve() is called on an already unmounted suspense boundary.`
  9263. );
  9264. }
  9265. }
  9266. const {
  9267. vnode: vnode2,
  9268. activeBranch,
  9269. pendingBranch,
  9270. pendingId,
  9271. effects,
  9272. parentComponent: parentComponent2,
  9273. container: container2
  9274. } = suspense;
  9275. let delayEnter = false;
  9276. if (suspense.isHydrating) {
  9277. suspense.isHydrating = false;
  9278. } else if (!resume) {
  9279. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  9280. if (delayEnter) {
  9281. activeBranch.transition.afterLeave = () => {
  9282. if (pendingId === suspense.pendingId) {
  9283. move(
  9284. pendingBranch,
  9285. container2,
  9286. anchor === initialAnchor ? next(activeBranch) : anchor,
  9287. 0
  9288. );
  9289. queuePostFlushCb(effects);
  9290. }
  9291. };
  9292. }
  9293. if (activeBranch) {
  9294. if (parentNode(activeBranch.el) === container2) {
  9295. anchor = next(activeBranch);
  9296. }
  9297. unmount(activeBranch, parentComponent2, suspense, true);
  9298. }
  9299. if (!delayEnter) {
  9300. move(pendingBranch, container2, anchor, 0);
  9301. }
  9302. }
  9303. setActiveBranch(suspense, pendingBranch);
  9304. suspense.pendingBranch = null;
  9305. suspense.isInFallback = false;
  9306. let parent = suspense.parent;
  9307. let hasUnresolvedAncestor = false;
  9308. while (parent) {
  9309. if (parent.pendingBranch) {
  9310. parent.effects.push(...effects);
  9311. hasUnresolvedAncestor = true;
  9312. break;
  9313. }
  9314. parent = parent.parent;
  9315. }
  9316. if (!hasUnresolvedAncestor && !delayEnter) {
  9317. queuePostFlushCb(effects);
  9318. }
  9319. suspense.effects = [];
  9320. if (isSuspensible) {
  9321. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  9322. parentSuspense.deps--;
  9323. if (parentSuspense.deps === 0 && !sync) {
  9324. parentSuspense.resolve();
  9325. }
  9326. }
  9327. }
  9328. triggerEvent(vnode2, "onResolve");
  9329. },
  9330. fallback(fallbackVNode) {
  9331. if (!suspense.pendingBranch) {
  9332. return;
  9333. }
  9334. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
  9335. triggerEvent(vnode2, "onFallback");
  9336. const anchor2 = next(activeBranch);
  9337. const mountFallback = () => {
  9338. if (!suspense.isInFallback) {
  9339. return;
  9340. }
  9341. patch(
  9342. null,
  9343. fallbackVNode,
  9344. container2,
  9345. anchor2,
  9346. parentComponent2,
  9347. null,
  9348. // fallback tree will not have suspense context
  9349. namespace2,
  9350. slotScopeIds,
  9351. optimized
  9352. );
  9353. setActiveBranch(suspense, fallbackVNode);
  9354. };
  9355. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  9356. if (delayEnter) {
  9357. activeBranch.transition.afterLeave = mountFallback;
  9358. }
  9359. suspense.isInFallback = true;
  9360. unmount(
  9361. activeBranch,
  9362. parentComponent2,
  9363. null,
  9364. // no suspense so unmount hooks fire now
  9365. true
  9366. // shouldRemove
  9367. );
  9368. if (!delayEnter) {
  9369. mountFallback();
  9370. }
  9371. },
  9372. move(container2, anchor2, type) {
  9373. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  9374. suspense.container = container2;
  9375. },
  9376. next() {
  9377. return suspense.activeBranch && next(suspense.activeBranch);
  9378. },
  9379. registerDep(instance, setupRenderEffect, optimized2) {
  9380. const isInPendingSuspense = !!suspense.pendingBranch;
  9381. if (isInPendingSuspense) {
  9382. suspense.deps++;
  9383. }
  9384. const hydratedEl = instance.vnode.el;
  9385. instance.asyncDep.catch((err) => {
  9386. handleError(err, instance, 0);
  9387. }).then((asyncSetupResult) => {
  9388. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
  9389. return;
  9390. }
  9391. instance.asyncResolved = true;
  9392. const { vnode: vnode2 } = instance;
  9393. if (true) {
  9394. pushWarningContext(vnode2);
  9395. }
  9396. handleSetupResult(instance, asyncSetupResult, false);
  9397. if (hydratedEl) {
  9398. vnode2.el = hydratedEl;
  9399. }
  9400. const placeholder = !hydratedEl && instance.subTree.el;
  9401. setupRenderEffect(
  9402. instance,
  9403. vnode2,
  9404. // component may have been moved before resolve.
  9405. // if this is not a hydration, instance.subTree will be the comment
  9406. // placeholder.
  9407. parentNode(hydratedEl || instance.subTree.el),
  9408. // anchor will not be used if this is hydration, so only need to
  9409. // consider the comment placeholder case.
  9410. hydratedEl ? null : next(instance.subTree),
  9411. suspense,
  9412. namespace,
  9413. optimized2
  9414. );
  9415. if (placeholder) {
  9416. remove2(placeholder);
  9417. }
  9418. updateHOCHostEl(instance, vnode2.el);
  9419. if (true) {
  9420. popWarningContext();
  9421. }
  9422. if (isInPendingSuspense && --suspense.deps === 0) {
  9423. suspense.resolve();
  9424. }
  9425. });
  9426. },
  9427. unmount(parentSuspense2, doRemove) {
  9428. suspense.isUnmounted = true;
  9429. if (suspense.activeBranch) {
  9430. unmount(
  9431. suspense.activeBranch,
  9432. parentComponent,
  9433. parentSuspense2,
  9434. doRemove
  9435. );
  9436. }
  9437. if (suspense.pendingBranch) {
  9438. unmount(
  9439. suspense.pendingBranch,
  9440. parentComponent,
  9441. parentSuspense2,
  9442. doRemove
  9443. );
  9444. }
  9445. }
  9446. };
  9447. return suspense;
  9448. }
  9449. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  9450. const suspense = vnode.suspense = createSuspenseBoundary(
  9451. vnode,
  9452. parentSuspense,
  9453. parentComponent,
  9454. node.parentNode,
  9455. // eslint-disable-next-line no-restricted-globals
  9456. document.createElement("div"),
  9457. null,
  9458. namespace,
  9459. slotScopeIds,
  9460. optimized,
  9461. rendererInternals,
  9462. true
  9463. );
  9464. const result = hydrateNode(
  9465. node,
  9466. suspense.pendingBranch = vnode.ssContent,
  9467. parentComponent,
  9468. suspense,
  9469. slotScopeIds,
  9470. optimized
  9471. );
  9472. if (suspense.deps === 0) {
  9473. suspense.resolve(false, true);
  9474. }
  9475. return result;
  9476. }
  9477. function normalizeSuspenseChildren(vnode) {
  9478. const { shapeFlag, children } = vnode;
  9479. const isSlotChildren = shapeFlag & 32;
  9480. vnode.ssContent = normalizeSuspenseSlot(
  9481. isSlotChildren ? children.default : children
  9482. );
  9483. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  9484. }
  9485. function normalizeSuspenseSlot(s) {
  9486. let block;
  9487. if (isFunction(s)) {
  9488. const trackBlock = isBlockTreeEnabled && s._c;
  9489. if (trackBlock) {
  9490. s._d = false;
  9491. openBlock();
  9492. }
  9493. s = s();
  9494. if (trackBlock) {
  9495. s._d = true;
  9496. block = currentBlock;
  9497. closeBlock();
  9498. }
  9499. }
  9500. if (isArray(s)) {
  9501. const singleChild = filterSingleRoot(s);
  9502. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
  9503. warn$1(`<Suspense> slots expect a single root node.`);
  9504. }
  9505. s = singleChild;
  9506. }
  9507. s = normalizeVNode(s);
  9508. if (block && !s.dynamicChildren) {
  9509. s.dynamicChildren = block.filter((c) => c !== s);
  9510. }
  9511. return s;
  9512. }
  9513. function queueEffectWithSuspense(fn, suspense) {
  9514. if (suspense && suspense.pendingBranch) {
  9515. if (isArray(fn)) {
  9516. suspense.effects.push(...fn);
  9517. } else {
  9518. suspense.effects.push(fn);
  9519. }
  9520. } else {
  9521. queuePostFlushCb(fn);
  9522. }
  9523. }
  9524. function setActiveBranch(suspense, branch) {
  9525. suspense.activeBranch = branch;
  9526. const { vnode, parentComponent } = suspense;
  9527. let el = branch.el;
  9528. while (!el && branch.component) {
  9529. branch = branch.component.subTree;
  9530. el = branch.el;
  9531. }
  9532. vnode.el = el;
  9533. if (parentComponent && parentComponent.subTree === vnode) {
  9534. parentComponent.vnode.el = el;
  9535. updateHOCHostEl(parentComponent, el);
  9536. }
  9537. }
  9538. function isVNodeSuspensible(vnode) {
  9539. const suspensible = vnode.props && vnode.props.suspensible;
  9540. return suspensible != null && suspensible !== false;
  9541. }
  9542. var Fragment = Symbol.for("v-fgt");
  9543. var Text = Symbol.for("v-txt");
  9544. var Comment = Symbol.for("v-cmt");
  9545. var Static = Symbol.for("v-stc");
  9546. var blockStack = [];
  9547. var currentBlock = null;
  9548. function openBlock(disableTracking = false) {
  9549. blockStack.push(currentBlock = disableTracking ? null : []);
  9550. }
  9551. function closeBlock() {
  9552. blockStack.pop();
  9553. currentBlock = blockStack[blockStack.length - 1] || null;
  9554. }
  9555. var isBlockTreeEnabled = 1;
  9556. function setBlockTracking(value, inVOnce = false) {
  9557. isBlockTreeEnabled += value;
  9558. if (value < 0 && currentBlock && inVOnce) {
  9559. currentBlock.hasOnce = true;
  9560. }
  9561. }
  9562. function setupBlock(vnode) {
  9563. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  9564. closeBlock();
  9565. if (isBlockTreeEnabled > 0 && currentBlock) {
  9566. currentBlock.push(vnode);
  9567. }
  9568. return vnode;
  9569. }
  9570. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  9571. return setupBlock(
  9572. createBaseVNode(
  9573. type,
  9574. props,
  9575. children,
  9576. patchFlag,
  9577. dynamicProps,
  9578. shapeFlag,
  9579. true
  9580. )
  9581. );
  9582. }
  9583. function createBlock(type, props, children, patchFlag, dynamicProps) {
  9584. return setupBlock(
  9585. createVNode(
  9586. type,
  9587. props,
  9588. children,
  9589. patchFlag,
  9590. dynamicProps,
  9591. true
  9592. )
  9593. );
  9594. }
  9595. function isVNode(value) {
  9596. return value ? value.__v_isVNode === true : false;
  9597. }
  9598. function isSameVNodeType(n1, n2) {
  9599. if (n2.shapeFlag & 6 && n1.component) {
  9600. const dirtyInstances = hmrDirtyComponents.get(n2.type);
  9601. if (dirtyInstances && dirtyInstances.has(n1.component)) {
  9602. n1.shapeFlag &= -257;
  9603. n2.shapeFlag &= -513;
  9604. return false;
  9605. }
  9606. }
  9607. return n1.type === n2.type && n1.key === n2.key;
  9608. }
  9609. var vnodeArgsTransformer;
  9610. function transformVNodeArgs(transformer) {
  9611. vnodeArgsTransformer = transformer;
  9612. }
  9613. var createVNodeWithArgsTransform = (...args) => {
  9614. return _createVNode(
  9615. ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
  9616. );
  9617. };
  9618. var normalizeKey = ({ key }) => key != null ? key : null;
  9619. var normalizeRef = ({
  9620. ref: ref2,
  9621. ref_key,
  9622. ref_for
  9623. }) => {
  9624. if (typeof ref2 === "number") {
  9625. ref2 = "" + ref2;
  9626. }
  9627. return ref2 != null ? isString(ref2) || isRef2(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  9628. };
  9629. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  9630. const vnode = {
  9631. __v_isVNode: true,
  9632. __v_skip: true,
  9633. type,
  9634. props,
  9635. key: props && normalizeKey(props),
  9636. ref: props && normalizeRef(props),
  9637. scopeId: currentScopeId,
  9638. slotScopeIds: null,
  9639. children,
  9640. component: null,
  9641. suspense: null,
  9642. ssContent: null,
  9643. ssFallback: null,
  9644. dirs: null,
  9645. transition: null,
  9646. el: null,
  9647. anchor: null,
  9648. target: null,
  9649. targetStart: null,
  9650. targetAnchor: null,
  9651. staticCount: 0,
  9652. shapeFlag,
  9653. patchFlag,
  9654. dynamicProps,
  9655. dynamicChildren: null,
  9656. appContext: null,
  9657. ctx: currentRenderingInstance
  9658. };
  9659. if (needFullChildrenNormalization) {
  9660. normalizeChildren(vnode, children);
  9661. if (shapeFlag & 128) {
  9662. type.normalize(vnode);
  9663. }
  9664. } else if (children) {
  9665. vnode.shapeFlag |= isString(children) ? 8 : 16;
  9666. }
  9667. if (vnode.key !== vnode.key) {
  9668. warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  9669. }
  9670. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  9671. !isBlockNode && // has current parent block
  9672. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  9673. // component nodes also should always be patched, because even if the
  9674. // component doesn't need to update, it needs to persist the instance on to
  9675. // the next vnode so that it can be properly unmounted later.
  9676. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  9677. // vnode should not be considered dynamic due to handler caching.
  9678. vnode.patchFlag !== 32) {
  9679. currentBlock.push(vnode);
  9680. }
  9681. return vnode;
  9682. }
  9683. var createVNode = true ? createVNodeWithArgsTransform : _createVNode;
  9684. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  9685. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  9686. if (!type) {
  9687. warn$1(`Invalid vnode type when creating vnode: ${type}.`);
  9688. }
  9689. type = Comment;
  9690. }
  9691. if (isVNode(type)) {
  9692. const cloned = cloneVNode(
  9693. type,
  9694. props,
  9695. true
  9696. /* mergeRef: true */
  9697. );
  9698. if (children) {
  9699. normalizeChildren(cloned, children);
  9700. }
  9701. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  9702. if (cloned.shapeFlag & 6) {
  9703. currentBlock[currentBlock.indexOf(type)] = cloned;
  9704. } else {
  9705. currentBlock.push(cloned);
  9706. }
  9707. }
  9708. cloned.patchFlag = -2;
  9709. return cloned;
  9710. }
  9711. if (isClassComponent(type)) {
  9712. type = type.__vccOpts;
  9713. }
  9714. if (props) {
  9715. props = guardReactiveProps(props);
  9716. let { class: klass, style } = props;
  9717. if (klass && !isString(klass)) {
  9718. props.class = normalizeClass(klass);
  9719. }
  9720. if (isObject(style)) {
  9721. if (isProxy(style) && !isArray(style)) {
  9722. style = extend({}, style);
  9723. }
  9724. props.style = normalizeStyle(style);
  9725. }
  9726. }
  9727. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  9728. if (shapeFlag & 4 && isProxy(type)) {
  9729. type = toRaw(type);
  9730. warn$1(
  9731. `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\`.`,
  9732. `
  9733. Component that was made reactive: `,
  9734. type
  9735. );
  9736. }
  9737. return createBaseVNode(
  9738. type,
  9739. props,
  9740. children,
  9741. patchFlag,
  9742. dynamicProps,
  9743. shapeFlag,
  9744. isBlockNode,
  9745. true
  9746. );
  9747. }
  9748. function guardReactiveProps(props) {
  9749. if (!props) return null;
  9750. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  9751. }
  9752. function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
  9753. const { props, ref: ref2, patchFlag, children, transition } = vnode;
  9754. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  9755. const cloned = {
  9756. __v_isVNode: true,
  9757. __v_skip: true,
  9758. type: vnode.type,
  9759. props: mergedProps,
  9760. key: mergedProps && normalizeKey(mergedProps),
  9761. ref: extraProps && extraProps.ref ? (
  9762. // #2078 in the case of <component :is="vnode" ref="extra"/>
  9763. // if the vnode itself already has a ref, cloneVNode will need to merge
  9764. // the refs so the single vnode can be set on multiple refs
  9765. mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  9766. ) : ref2,
  9767. scopeId: vnode.scopeId,
  9768. slotScopeIds: vnode.slotScopeIds,
  9769. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  9770. target: vnode.target,
  9771. targetStart: vnode.targetStart,
  9772. targetAnchor: vnode.targetAnchor,
  9773. staticCount: vnode.staticCount,
  9774. shapeFlag: vnode.shapeFlag,
  9775. // if the vnode is cloned with extra props, we can no longer assume its
  9776. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  9777. // note: preserve flag for fragments since they use the flag for children
  9778. // fast paths only.
  9779. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  9780. dynamicProps: vnode.dynamicProps,
  9781. dynamicChildren: vnode.dynamicChildren,
  9782. appContext: vnode.appContext,
  9783. dirs: vnode.dirs,
  9784. transition,
  9785. // These should technically only be non-null on mounted VNodes. However,
  9786. // they *should* be copied for kept-alive vnodes. So we just always copy
  9787. // them since them being non-null during a mount doesn't affect the logic as
  9788. // they will simply be overwritten.
  9789. component: vnode.component,
  9790. suspense: vnode.suspense,
  9791. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  9792. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  9793. placeholder: vnode.placeholder,
  9794. el: vnode.el,
  9795. anchor: vnode.anchor,
  9796. ctx: vnode.ctx,
  9797. ce: vnode.ce
  9798. };
  9799. if (transition && cloneTransition) {
  9800. setTransitionHooks(
  9801. cloned,
  9802. transition.clone(cloned)
  9803. );
  9804. }
  9805. return cloned;
  9806. }
  9807. function deepCloneVNode(vnode) {
  9808. const cloned = cloneVNode(vnode);
  9809. if (isArray(vnode.children)) {
  9810. cloned.children = vnode.children.map(deepCloneVNode);
  9811. }
  9812. return cloned;
  9813. }
  9814. function createTextVNode(text = " ", flag = 0) {
  9815. return createVNode(Text, null, text, flag);
  9816. }
  9817. function createStaticVNode(content, numberOfNodes) {
  9818. const vnode = createVNode(Static, null, content);
  9819. vnode.staticCount = numberOfNodes;
  9820. return vnode;
  9821. }
  9822. function createCommentVNode(text = "", asBlock = false) {
  9823. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  9824. }
  9825. function normalizeVNode(child) {
  9826. if (child == null || typeof child === "boolean") {
  9827. return createVNode(Comment);
  9828. } else if (isArray(child)) {
  9829. return createVNode(
  9830. Fragment,
  9831. null,
  9832. // #3666, avoid reference pollution when reusing vnode
  9833. child.slice()
  9834. );
  9835. } else if (isVNode(child)) {
  9836. return cloneIfMounted(child);
  9837. } else {
  9838. return createVNode(Text, null, String(child));
  9839. }
  9840. }
  9841. function cloneIfMounted(child) {
  9842. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  9843. }
  9844. function normalizeChildren(vnode, children) {
  9845. let type = 0;
  9846. const { shapeFlag } = vnode;
  9847. if (children == null) {
  9848. children = null;
  9849. } else if (isArray(children)) {
  9850. type = 16;
  9851. } else if (typeof children === "object") {
  9852. if (shapeFlag & (1 | 64)) {
  9853. const slot = children.default;
  9854. if (slot) {
  9855. slot._c && (slot._d = false);
  9856. normalizeChildren(vnode, slot());
  9857. slot._c && (slot._d = true);
  9858. }
  9859. return;
  9860. } else {
  9861. type = 32;
  9862. const slotFlag = children._;
  9863. if (!slotFlag && !isInternalObject(children)) {
  9864. children._ctx = currentRenderingInstance;
  9865. } else if (slotFlag === 3 && currentRenderingInstance) {
  9866. if (currentRenderingInstance.slots._ === 1) {
  9867. children._ = 1;
  9868. } else {
  9869. children._ = 2;
  9870. vnode.patchFlag |= 1024;
  9871. }
  9872. }
  9873. }
  9874. } else if (isFunction(children)) {
  9875. children = { default: children, _ctx: currentRenderingInstance };
  9876. type = 32;
  9877. } else {
  9878. children = String(children);
  9879. if (shapeFlag & 64) {
  9880. type = 16;
  9881. children = [createTextVNode(children)];
  9882. } else {
  9883. type = 8;
  9884. }
  9885. }
  9886. vnode.children = children;
  9887. vnode.shapeFlag |= type;
  9888. }
  9889. function mergeProps(...args) {
  9890. const ret = {};
  9891. for (let i = 0; i < args.length; i++) {
  9892. const toMerge = args[i];
  9893. for (const key in toMerge) {
  9894. if (key === "class") {
  9895. if (ret.class !== toMerge.class) {
  9896. ret.class = normalizeClass([ret.class, toMerge.class]);
  9897. }
  9898. } else if (key === "style") {
  9899. ret.style = normalizeStyle([ret.style, toMerge.style]);
  9900. } else if (isOn(key)) {
  9901. const existing = ret[key];
  9902. const incoming = toMerge[key];
  9903. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
  9904. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  9905. }
  9906. } else if (key !== "") {
  9907. ret[key] = toMerge[key];
  9908. }
  9909. }
  9910. }
  9911. return ret;
  9912. }
  9913. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  9914. callWithAsyncErrorHandling(hook, instance, 7, [
  9915. vnode,
  9916. prevVNode
  9917. ]);
  9918. }
  9919. var emptyAppContext = createAppContext();
  9920. var uid = 0;
  9921. function createComponentInstance(vnode, parent, suspense) {
  9922. const type = vnode.type;
  9923. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  9924. const instance = {
  9925. uid: uid++,
  9926. vnode,
  9927. type,
  9928. parent,
  9929. appContext,
  9930. root: null,
  9931. // to be immediately set
  9932. next: null,
  9933. subTree: null,
  9934. // will be set synchronously right after creation
  9935. effect: null,
  9936. update: null,
  9937. // will be set synchronously right after creation
  9938. job: null,
  9939. scope: new EffectScope(
  9940. true
  9941. /* detached */
  9942. ),
  9943. render: null,
  9944. proxy: null,
  9945. exposed: null,
  9946. exposeProxy: null,
  9947. withProxy: null,
  9948. provides: parent ? parent.provides : Object.create(appContext.provides),
  9949. ids: parent ? parent.ids : ["", 0, 0],
  9950. accessCache: null,
  9951. renderCache: [],
  9952. // local resolved assets
  9953. components: null,
  9954. directives: null,
  9955. // resolved props and emits options
  9956. propsOptions: normalizePropsOptions(type, appContext),
  9957. emitsOptions: normalizeEmitsOptions(type, appContext),
  9958. // emit
  9959. emit: null,
  9960. // to be set immediately
  9961. emitted: null,
  9962. // props default value
  9963. propsDefaults: EMPTY_OBJ,
  9964. // inheritAttrs
  9965. inheritAttrs: type.inheritAttrs,
  9966. // state
  9967. ctx: EMPTY_OBJ,
  9968. data: EMPTY_OBJ,
  9969. props: EMPTY_OBJ,
  9970. attrs: EMPTY_OBJ,
  9971. slots: EMPTY_OBJ,
  9972. refs: EMPTY_OBJ,
  9973. setupState: EMPTY_OBJ,
  9974. setupContext: null,
  9975. // suspense related
  9976. suspense,
  9977. suspenseId: suspense ? suspense.pendingId : 0,
  9978. asyncDep: null,
  9979. asyncResolved: false,
  9980. // lifecycle hooks
  9981. // not using enums here because it results in computed properties
  9982. isMounted: false,
  9983. isUnmounted: false,
  9984. isDeactivated: false,
  9985. bc: null,
  9986. c: null,
  9987. bm: null,
  9988. m: null,
  9989. bu: null,
  9990. u: null,
  9991. um: null,
  9992. bum: null,
  9993. da: null,
  9994. a: null,
  9995. rtg: null,
  9996. rtc: null,
  9997. ec: null,
  9998. sp: null
  9999. };
  10000. if (true) {
  10001. instance.ctx = createDevRenderContext(instance);
  10002. } else {
  10003. instance.ctx = { _: instance };
  10004. }
  10005. instance.root = parent ? parent.root : instance;
  10006. instance.emit = emit.bind(null, instance);
  10007. if (vnode.ce) {
  10008. vnode.ce(instance);
  10009. }
  10010. return instance;
  10011. }
  10012. var currentInstance = null;
  10013. var getCurrentInstance = () => currentInstance || currentRenderingInstance;
  10014. var internalSetCurrentInstance;
  10015. var setInSSRSetupState;
  10016. {
  10017. const g = getGlobalThis();
  10018. const registerGlobalSetter = (key, setter) => {
  10019. let setters;
  10020. if (!(setters = g[key])) setters = g[key] = [];
  10021. setters.push(setter);
  10022. return (v) => {
  10023. if (setters.length > 1) setters.forEach((set) => set(v));
  10024. else setters[0](v);
  10025. };
  10026. };
  10027. internalSetCurrentInstance = registerGlobalSetter(
  10028. `__VUE_INSTANCE_SETTERS__`,
  10029. (v) => currentInstance = v
  10030. );
  10031. setInSSRSetupState = registerGlobalSetter(
  10032. `__VUE_SSR_SETTERS__`,
  10033. (v) => isInSSRComponentSetup = v
  10034. );
  10035. }
  10036. var setCurrentInstance = (instance) => {
  10037. const prev = currentInstance;
  10038. internalSetCurrentInstance(instance);
  10039. instance.scope.on();
  10040. return () => {
  10041. instance.scope.off();
  10042. internalSetCurrentInstance(prev);
  10043. };
  10044. };
  10045. var unsetCurrentInstance = () => {
  10046. currentInstance && currentInstance.scope.off();
  10047. internalSetCurrentInstance(null);
  10048. };
  10049. var isBuiltInTag = makeMap("slot,component");
  10050. function validateComponentName(name, { isNativeTag }) {
  10051. if (isBuiltInTag(name) || isNativeTag(name)) {
  10052. warn$1(
  10053. "Do not use built-in or reserved HTML elements as component id: " + name
  10054. );
  10055. }
  10056. }
  10057. function isStatefulComponent(instance) {
  10058. return instance.vnode.shapeFlag & 4;
  10059. }
  10060. var isInSSRComponentSetup = false;
  10061. function setupComponent(instance, isSSR = false, optimized = false) {
  10062. isSSR && setInSSRSetupState(isSSR);
  10063. const { props, children } = instance.vnode;
  10064. const isStateful = isStatefulComponent(instance);
  10065. initProps(instance, props, isStateful, isSSR);
  10066. initSlots(instance, children, optimized || isSSR);
  10067. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  10068. isSSR && setInSSRSetupState(false);
  10069. return setupResult;
  10070. }
  10071. function setupStatefulComponent(instance, isSSR) {
  10072. var _a;
  10073. const Component = instance.type;
  10074. if (true) {
  10075. if (Component.name) {
  10076. validateComponentName(Component.name, instance.appContext.config);
  10077. }
  10078. if (Component.components) {
  10079. const names = Object.keys(Component.components);
  10080. for (let i = 0; i < names.length; i++) {
  10081. validateComponentName(names[i], instance.appContext.config);
  10082. }
  10083. }
  10084. if (Component.directives) {
  10085. const names = Object.keys(Component.directives);
  10086. for (let i = 0; i < names.length; i++) {
  10087. validateDirectiveName(names[i]);
  10088. }
  10089. }
  10090. if (Component.compilerOptions && isRuntimeOnly()) {
  10091. warn$1(
  10092. `"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.`
  10093. );
  10094. }
  10095. }
  10096. instance.accessCache = /* @__PURE__ */ Object.create(null);
  10097. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  10098. if (true) {
  10099. exposePropsOnRenderContext(instance);
  10100. }
  10101. const { setup } = Component;
  10102. if (setup) {
  10103. pauseTracking();
  10104. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  10105. const reset = setCurrentInstance(instance);
  10106. const setupResult = callWithErrorHandling(
  10107. setup,
  10108. instance,
  10109. 0,
  10110. [
  10111. true ? shallowReadonly(instance.props) : instance.props,
  10112. setupContext
  10113. ]
  10114. );
  10115. const isAsyncSetup = isPromise(setupResult);
  10116. resetTracking();
  10117. reset();
  10118. if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
  10119. markAsyncBoundary(instance);
  10120. }
  10121. if (isAsyncSetup) {
  10122. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  10123. if (isSSR) {
  10124. return setupResult.then((resolvedResult) => {
  10125. handleSetupResult(instance, resolvedResult, isSSR);
  10126. }).catch((e) => {
  10127. handleError(e, instance, 0);
  10128. });
  10129. } else {
  10130. instance.asyncDep = setupResult;
  10131. if (!instance.suspense) {
  10132. const name = (_a = Component.name) != null ? _a : "Anonymous";
  10133. warn$1(
  10134. `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.`
  10135. );
  10136. }
  10137. }
  10138. } else {
  10139. handleSetupResult(instance, setupResult, isSSR);
  10140. }
  10141. } else {
  10142. finishComponentSetup(instance, isSSR);
  10143. }
  10144. }
  10145. function handleSetupResult(instance, setupResult, isSSR) {
  10146. if (isFunction(setupResult)) {
  10147. if (instance.type.__ssrInlineRender) {
  10148. instance.ssrRender = setupResult;
  10149. } else {
  10150. instance.render = setupResult;
  10151. }
  10152. } else if (isObject(setupResult)) {
  10153. if (isVNode(setupResult)) {
  10154. warn$1(
  10155. `setup() should not return VNodes directly - return a render function instead.`
  10156. );
  10157. }
  10158. if (true) {
  10159. instance.devtoolsRawSetupState = setupResult;
  10160. }
  10161. instance.setupState = proxyRefs(setupResult);
  10162. if (true) {
  10163. exposeSetupStateOnRenderContext(instance);
  10164. }
  10165. } else if (setupResult !== void 0) {
  10166. warn$1(
  10167. `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
  10168. );
  10169. }
  10170. finishComponentSetup(instance, isSSR);
  10171. }
  10172. var compile;
  10173. var installWithProxy;
  10174. function registerRuntimeCompiler(_compile) {
  10175. compile = _compile;
  10176. installWithProxy = (i) => {
  10177. if (i.render._rc) {
  10178. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  10179. }
  10180. };
  10181. }
  10182. var isRuntimeOnly = () => !compile;
  10183. function finishComponentSetup(instance, isSSR, skipOptions) {
  10184. const Component = instance.type;
  10185. if (!instance.render) {
  10186. if (!isSSR && compile && !Component.render) {
  10187. const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;
  10188. if (template) {
  10189. if (true) {
  10190. startMeasure(instance, `compile`);
  10191. }
  10192. const { isCustomElement, compilerOptions } = instance.appContext.config;
  10193. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  10194. const finalCompilerOptions = extend(
  10195. extend(
  10196. {
  10197. isCustomElement,
  10198. delimiters
  10199. },
  10200. compilerOptions
  10201. ),
  10202. componentCompilerOptions
  10203. );
  10204. Component.render = compile(template, finalCompilerOptions);
  10205. if (true) {
  10206. endMeasure(instance, `compile`);
  10207. }
  10208. }
  10209. }
  10210. instance.render = Component.render || NOOP;
  10211. if (installWithProxy) {
  10212. installWithProxy(instance);
  10213. }
  10214. }
  10215. if (__VUE_OPTIONS_API__ && true) {
  10216. const reset = setCurrentInstance(instance);
  10217. pauseTracking();
  10218. try {
  10219. applyOptions(instance);
  10220. } finally {
  10221. resetTracking();
  10222. reset();
  10223. }
  10224. }
  10225. if (!Component.render && instance.render === NOOP && !isSSR) {
  10226. if (!compile && Component.template) {
  10227. warn$1(
  10228. `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".`
  10229. );
  10230. } else {
  10231. warn$1(`Component is missing template or render function: `, Component);
  10232. }
  10233. }
  10234. }
  10235. var attrsProxyHandlers = true ? {
  10236. get(target, key) {
  10237. markAttrsAccessed();
  10238. track(target, "get", "");
  10239. return target[key];
  10240. },
  10241. set() {
  10242. warn$1(`setupContext.attrs is readonly.`);
  10243. return false;
  10244. },
  10245. deleteProperty() {
  10246. warn$1(`setupContext.attrs is readonly.`);
  10247. return false;
  10248. }
  10249. } : {
  10250. get(target, key) {
  10251. track(target, "get", "");
  10252. return target[key];
  10253. }
  10254. };
  10255. function getSlotsProxy(instance) {
  10256. return new Proxy(instance.slots, {
  10257. get(target, key) {
  10258. track(instance, "get", "$slots");
  10259. return target[key];
  10260. }
  10261. });
  10262. }
  10263. function createSetupContext(instance) {
  10264. const expose = (exposed) => {
  10265. if (true) {
  10266. if (instance.exposed) {
  10267. warn$1(`expose() should be called only once per setup().`);
  10268. }
  10269. if (exposed != null) {
  10270. let exposedType = typeof exposed;
  10271. if (exposedType === "object") {
  10272. if (isArray(exposed)) {
  10273. exposedType = "array";
  10274. } else if (isRef2(exposed)) {
  10275. exposedType = "ref";
  10276. }
  10277. }
  10278. if (exposedType !== "object") {
  10279. warn$1(
  10280. `expose() should be passed a plain object, received ${exposedType}.`
  10281. );
  10282. }
  10283. }
  10284. }
  10285. instance.exposed = exposed || {};
  10286. };
  10287. if (true) {
  10288. let attrsProxy;
  10289. let slotsProxy;
  10290. return Object.freeze({
  10291. get attrs() {
  10292. return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
  10293. },
  10294. get slots() {
  10295. return slotsProxy || (slotsProxy = getSlotsProxy(instance));
  10296. },
  10297. get emit() {
  10298. return (event, ...args) => instance.emit(event, ...args);
  10299. },
  10300. expose
  10301. });
  10302. } else {
  10303. return {
  10304. attrs: new Proxy(instance.attrs, attrsProxyHandlers),
  10305. slots: instance.slots,
  10306. emit: instance.emit,
  10307. expose
  10308. };
  10309. }
  10310. }
  10311. function getComponentPublicInstance(instance) {
  10312. if (instance.exposed) {
  10313. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  10314. get(target, key) {
  10315. if (key in target) {
  10316. return target[key];
  10317. } else if (key in publicPropertiesMap) {
  10318. return publicPropertiesMap[key](instance);
  10319. }
  10320. },
  10321. has(target, key) {
  10322. return key in target || key in publicPropertiesMap;
  10323. }
  10324. }));
  10325. } else {
  10326. return instance.proxy;
  10327. }
  10328. }
  10329. var classifyRE = /(?:^|[-_])\w/g;
  10330. var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  10331. function getComponentName(Component, includeInferred = true) {
  10332. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  10333. }
  10334. function formatComponentName(instance, Component, isRoot = false) {
  10335. let name = getComponentName(Component);
  10336. if (!name && Component.__file) {
  10337. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  10338. if (match) {
  10339. name = match[1];
  10340. }
  10341. }
  10342. if (!name && instance && instance.parent) {
  10343. const inferFromRegistry = (registry) => {
  10344. for (const key in registry) {
  10345. if (registry[key] === Component) {
  10346. return key;
  10347. }
  10348. }
  10349. };
  10350. name = inferFromRegistry(
  10351. instance.components || instance.parent.type.components
  10352. ) || inferFromRegistry(instance.appContext.components);
  10353. }
  10354. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  10355. }
  10356. function isClassComponent(value) {
  10357. return isFunction(value) && "__vccOpts" in value;
  10358. }
  10359. var computed2 = (getterOrOptions, debugOptions) => {
  10360. const c = computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
  10361. if (true) {
  10362. const i = getCurrentInstance();
  10363. if (i && i.appContext.config.warnRecursiveComputed) {
  10364. c._warnRecursive = true;
  10365. }
  10366. }
  10367. return c;
  10368. };
  10369. function h(type, propsOrChildren, children) {
  10370. const doCreateVNode = (type2, props, children2) => {
  10371. setBlockTracking(-1);
  10372. try {
  10373. return createVNode(type2, props, children2);
  10374. } finally {
  10375. setBlockTracking(1);
  10376. }
  10377. };
  10378. const l = arguments.length;
  10379. if (l === 2) {
  10380. if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  10381. if (isVNode(propsOrChildren)) {
  10382. return doCreateVNode(type, null, [propsOrChildren]);
  10383. }
  10384. return doCreateVNode(type, propsOrChildren);
  10385. } else {
  10386. return doCreateVNode(type, null, propsOrChildren);
  10387. }
  10388. } else {
  10389. if (l > 3) {
  10390. children = Array.prototype.slice.call(arguments, 2);
  10391. } else if (l === 3 && isVNode(children)) {
  10392. children = [children];
  10393. }
  10394. return doCreateVNode(type, propsOrChildren, children);
  10395. }
  10396. }
  10397. function initCustomFormatter() {
  10398. if (typeof window === "undefined") {
  10399. return;
  10400. }
  10401. const vueStyle = { style: "color:#3ba776" };
  10402. const numberStyle = { style: "color:#1677ff" };
  10403. const stringStyle = { style: "color:#f5222d" };
  10404. const keywordStyle = { style: "color:#eb2f96" };
  10405. const formatter = {
  10406. __vue_custom_formatter: true,
  10407. header(obj) {
  10408. if (!isObject(obj)) {
  10409. return null;
  10410. }
  10411. if (obj.__isVue) {
  10412. return ["div", vueStyle, `VueInstance`];
  10413. } else if (isRef2(obj)) {
  10414. pauseTracking();
  10415. const value = obj.value;
  10416. resetTracking();
  10417. return [
  10418. "div",
  10419. {},
  10420. ["span", vueStyle, genRefFlag(obj)],
  10421. "<",
  10422. formatValue(value),
  10423. `>`
  10424. ];
  10425. } else if (isReactive(obj)) {
  10426. return [
  10427. "div",
  10428. {},
  10429. ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
  10430. "<",
  10431. formatValue(obj),
  10432. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  10433. ];
  10434. } else if (isReadonly(obj)) {
  10435. return [
  10436. "div",
  10437. {},
  10438. ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
  10439. "<",
  10440. formatValue(obj),
  10441. ">"
  10442. ];
  10443. }
  10444. return null;
  10445. },
  10446. hasBody(obj) {
  10447. return obj && obj.__isVue;
  10448. },
  10449. body(obj) {
  10450. if (obj && obj.__isVue) {
  10451. return [
  10452. "div",
  10453. {},
  10454. ...formatInstance(obj.$)
  10455. ];
  10456. }
  10457. }
  10458. };
  10459. function formatInstance(instance) {
  10460. const blocks = [];
  10461. if (instance.type.props && instance.props) {
  10462. blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  10463. }
  10464. if (instance.setupState !== EMPTY_OBJ) {
  10465. blocks.push(createInstanceBlock("setup", instance.setupState));
  10466. }
  10467. if (instance.data !== EMPTY_OBJ) {
  10468. blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  10469. }
  10470. const computed3 = extractKeys(instance, "computed");
  10471. if (computed3) {
  10472. blocks.push(createInstanceBlock("computed", computed3));
  10473. }
  10474. const injected = extractKeys(instance, "inject");
  10475. if (injected) {
  10476. blocks.push(createInstanceBlock("injected", injected));
  10477. }
  10478. blocks.push([
  10479. "div",
  10480. {},
  10481. [
  10482. "span",
  10483. {
  10484. style: keywordStyle.style + ";opacity:0.66"
  10485. },
  10486. "$ (internal): "
  10487. ],
  10488. ["object", { object: instance }]
  10489. ]);
  10490. return blocks;
  10491. }
  10492. function createInstanceBlock(type, target) {
  10493. target = extend({}, target);
  10494. if (!Object.keys(target).length) {
  10495. return ["span", {}];
  10496. }
  10497. return [
  10498. "div",
  10499. { style: "line-height:1.25em;margin-bottom:0.6em" },
  10500. [
  10501. "div",
  10502. {
  10503. style: "color:#476582"
  10504. },
  10505. type
  10506. ],
  10507. [
  10508. "div",
  10509. {
  10510. style: "padding-left:1.25em"
  10511. },
  10512. ...Object.keys(target).map((key) => {
  10513. return [
  10514. "div",
  10515. {},
  10516. ["span", keywordStyle, key + ": "],
  10517. formatValue(target[key], false)
  10518. ];
  10519. })
  10520. ]
  10521. ];
  10522. }
  10523. function formatValue(v, asRaw = true) {
  10524. if (typeof v === "number") {
  10525. return ["span", numberStyle, v];
  10526. } else if (typeof v === "string") {
  10527. return ["span", stringStyle, JSON.stringify(v)];
  10528. } else if (typeof v === "boolean") {
  10529. return ["span", keywordStyle, v];
  10530. } else if (isObject(v)) {
  10531. return ["object", { object: asRaw ? toRaw(v) : v }];
  10532. } else {
  10533. return ["span", stringStyle, String(v)];
  10534. }
  10535. }
  10536. function extractKeys(instance, type) {
  10537. const Comp = instance.type;
  10538. if (isFunction(Comp)) {
  10539. return;
  10540. }
  10541. const extracted = {};
  10542. for (const key in instance.ctx) {
  10543. if (isKeyOfType(Comp, key, type)) {
  10544. extracted[key] = instance.ctx[key];
  10545. }
  10546. }
  10547. return extracted;
  10548. }
  10549. function isKeyOfType(Comp, key, type) {
  10550. const opts = Comp[type];
  10551. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
  10552. return true;
  10553. }
  10554. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  10555. return true;
  10556. }
  10557. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
  10558. return true;
  10559. }
  10560. }
  10561. function genRefFlag(v) {
  10562. if (isShallow(v)) {
  10563. return `ShallowRef`;
  10564. }
  10565. if (v.effect) {
  10566. return `ComputedRef`;
  10567. }
  10568. return `Ref`;
  10569. }
  10570. if (window.devtoolsFormatters) {
  10571. window.devtoolsFormatters.push(formatter);
  10572. } else {
  10573. window.devtoolsFormatters = [formatter];
  10574. }
  10575. }
  10576. function withMemo(memo, render2, cache, index) {
  10577. const cached = cache[index];
  10578. if (cached && isMemoSame(cached, memo)) {
  10579. return cached;
  10580. }
  10581. const ret = render2();
  10582. ret.memo = memo.slice();
  10583. ret.cacheIndex = index;
  10584. return cache[index] = ret;
  10585. }
  10586. function isMemoSame(cached, memo) {
  10587. const prev = cached.memo;
  10588. if (prev.length != memo.length) {
  10589. return false;
  10590. }
  10591. for (let i = 0; i < prev.length; i++) {
  10592. if (hasChanged(prev[i], memo[i])) {
  10593. return false;
  10594. }
  10595. }
  10596. if (isBlockTreeEnabled > 0 && currentBlock) {
  10597. currentBlock.push(cached);
  10598. }
  10599. return true;
  10600. }
  10601. var version = "3.5.21";
  10602. var warn2 = true ? warn$1 : NOOP;
  10603. var ErrorTypeStrings = ErrorTypeStrings$1;
  10604. var devtools = true ? devtools$1 : void 0;
  10605. var setDevtoolsHook = true ? setDevtoolsHook$1 : NOOP;
  10606. var _ssrUtils = {
  10607. createComponentInstance,
  10608. setupComponent,
  10609. renderComponentRoot,
  10610. setCurrentRenderingInstance,
  10611. isVNode,
  10612. normalizeVNode,
  10613. getComponentPublicInstance,
  10614. ensureValidVNode,
  10615. pushWarningContext,
  10616. popWarningContext
  10617. };
  10618. var ssrUtils = _ssrUtils;
  10619. var resolveFilter = null;
  10620. var compatUtils = null;
  10621. var DeprecationTypes = null;
  10622. // node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
  10623. var policy = void 0;
  10624. var tt = typeof window !== "undefined" && window.trustedTypes;
  10625. if (tt) {
  10626. try {
  10627. policy = tt.createPolicy("vue", {
  10628. createHTML: (val) => val
  10629. });
  10630. } catch (e) {
  10631. warn2(`Error creating trusted types policy: ${e}`);
  10632. }
  10633. }
  10634. var unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  10635. var svgNS = "http://www.w3.org/2000/svg";
  10636. var mathmlNS = "http://www.w3.org/1998/Math/MathML";
  10637. var doc = typeof document !== "undefined" ? document : null;
  10638. var templateContainer = doc && doc.createElement("template");
  10639. var nodeOps = {
  10640. insert: (child, parent, anchor) => {
  10641. parent.insertBefore(child, anchor || null);
  10642. },
  10643. remove: (child) => {
  10644. const parent = child.parentNode;
  10645. if (parent) {
  10646. parent.removeChild(child);
  10647. }
  10648. },
  10649. createElement: (tag, namespace, is, props) => {
  10650. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  10651. if (tag === "select" && props && props.multiple != null) {
  10652. el.setAttribute("multiple", props.multiple);
  10653. }
  10654. return el;
  10655. },
  10656. createText: (text) => doc.createTextNode(text),
  10657. createComment: (text) => doc.createComment(text),
  10658. setText: (node, text) => {
  10659. node.nodeValue = text;
  10660. },
  10661. setElementText: (el, text) => {
  10662. el.textContent = text;
  10663. },
  10664. parentNode: (node) => node.parentNode,
  10665. nextSibling: (node) => node.nextSibling,
  10666. querySelector: (selector) => doc.querySelector(selector),
  10667. setScopeId(el, id) {
  10668. el.setAttribute(id, "");
  10669. },
  10670. // __UNSAFE__
  10671. // Reason: innerHTML.
  10672. // Static content here can only come from compiled templates.
  10673. // As long as the user only uses trusted templates, this is safe.
  10674. insertStaticContent(content, parent, anchor, namespace, start, end) {
  10675. const before = anchor ? anchor.previousSibling : parent.lastChild;
  10676. if (start && (start === end || start.nextSibling)) {
  10677. while (true) {
  10678. parent.insertBefore(start.cloneNode(true), anchor);
  10679. if (start === end || !(start = start.nextSibling)) break;
  10680. }
  10681. } else {
  10682. templateContainer.innerHTML = unsafeToTrustedHTML(
  10683. namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
  10684. );
  10685. const template = templateContainer.content;
  10686. if (namespace === "svg" || namespace === "mathml") {
  10687. const wrapper = template.firstChild;
  10688. while (wrapper.firstChild) {
  10689. template.appendChild(wrapper.firstChild);
  10690. }
  10691. template.removeChild(wrapper);
  10692. }
  10693. parent.insertBefore(template, anchor);
  10694. }
  10695. return [
  10696. // first
  10697. before ? before.nextSibling : parent.firstChild,
  10698. // last
  10699. anchor ? anchor.previousSibling : parent.lastChild
  10700. ];
  10701. }
  10702. };
  10703. var TRANSITION = "transition";
  10704. var ANIMATION = "animation";
  10705. var vtcKey = Symbol("_vtc");
  10706. var DOMTransitionPropsValidators = {
  10707. name: String,
  10708. type: String,
  10709. css: {
  10710. type: Boolean,
  10711. default: true
  10712. },
  10713. duration: [String, Number, Object],
  10714. enterFromClass: String,
  10715. enterActiveClass: String,
  10716. enterToClass: String,
  10717. appearFromClass: String,
  10718. appearActiveClass: String,
  10719. appearToClass: String,
  10720. leaveFromClass: String,
  10721. leaveActiveClass: String,
  10722. leaveToClass: String
  10723. };
  10724. var TransitionPropsValidators = extend(
  10725. {},
  10726. BaseTransitionPropsValidators,
  10727. DOMTransitionPropsValidators
  10728. );
  10729. var decorate$1 = (t) => {
  10730. t.displayName = "Transition";
  10731. t.props = TransitionPropsValidators;
  10732. return t;
  10733. };
  10734. var Transition = decorate$1(
  10735. (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
  10736. );
  10737. var callHook2 = (hook, args = []) => {
  10738. if (isArray(hook)) {
  10739. hook.forEach((h2) => h2(...args));
  10740. } else if (hook) {
  10741. hook(...args);
  10742. }
  10743. };
  10744. var hasExplicitCallback = (hook) => {
  10745. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  10746. };
  10747. function resolveTransitionProps(rawProps) {
  10748. const baseProps = {};
  10749. for (const key in rawProps) {
  10750. if (!(key in DOMTransitionPropsValidators)) {
  10751. baseProps[key] = rawProps[key];
  10752. }
  10753. }
  10754. if (rawProps.css === false) {
  10755. return baseProps;
  10756. }
  10757. const {
  10758. name = "v",
  10759. type,
  10760. duration,
  10761. enterFromClass = `${name}-enter-from`,
  10762. enterActiveClass = `${name}-enter-active`,
  10763. enterToClass = `${name}-enter-to`,
  10764. appearFromClass = enterFromClass,
  10765. appearActiveClass = enterActiveClass,
  10766. appearToClass = enterToClass,
  10767. leaveFromClass = `${name}-leave-from`,
  10768. leaveActiveClass = `${name}-leave-active`,
  10769. leaveToClass = `${name}-leave-to`
  10770. } = rawProps;
  10771. const durations = normalizeDuration(duration);
  10772. const enterDuration = durations && durations[0];
  10773. const leaveDuration = durations && durations[1];
  10774. const {
  10775. onBeforeEnter,
  10776. onEnter,
  10777. onEnterCancelled,
  10778. onLeave,
  10779. onLeaveCancelled,
  10780. onBeforeAppear = onBeforeEnter,
  10781. onAppear = onEnter,
  10782. onAppearCancelled = onEnterCancelled
  10783. } = baseProps;
  10784. const finishEnter = (el, isAppear, done, isCancelled) => {
  10785. el._enterCancelled = isCancelled;
  10786. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  10787. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  10788. done && done();
  10789. };
  10790. const finishLeave = (el, done) => {
  10791. el._isLeaving = false;
  10792. removeTransitionClass(el, leaveFromClass);
  10793. removeTransitionClass(el, leaveToClass);
  10794. removeTransitionClass(el, leaveActiveClass);
  10795. done && done();
  10796. };
  10797. const makeEnterHook = (isAppear) => {
  10798. return (el, done) => {
  10799. const hook = isAppear ? onAppear : onEnter;
  10800. const resolve2 = () => finishEnter(el, isAppear, done);
  10801. callHook2(hook, [el, resolve2]);
  10802. nextFrame(() => {
  10803. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  10804. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  10805. if (!hasExplicitCallback(hook)) {
  10806. whenTransitionEnds(el, type, enterDuration, resolve2);
  10807. }
  10808. });
  10809. };
  10810. };
  10811. return extend(baseProps, {
  10812. onBeforeEnter(el) {
  10813. callHook2(onBeforeEnter, [el]);
  10814. addTransitionClass(el, enterFromClass);
  10815. addTransitionClass(el, enterActiveClass);
  10816. },
  10817. onBeforeAppear(el) {
  10818. callHook2(onBeforeAppear, [el]);
  10819. addTransitionClass(el, appearFromClass);
  10820. addTransitionClass(el, appearActiveClass);
  10821. },
  10822. onEnter: makeEnterHook(false),
  10823. onAppear: makeEnterHook(true),
  10824. onLeave(el, done) {
  10825. el._isLeaving = true;
  10826. const resolve2 = () => finishLeave(el, done);
  10827. addTransitionClass(el, leaveFromClass);
  10828. if (!el._enterCancelled) {
  10829. forceReflow();
  10830. addTransitionClass(el, leaveActiveClass);
  10831. } else {
  10832. addTransitionClass(el, leaveActiveClass);
  10833. forceReflow();
  10834. }
  10835. nextFrame(() => {
  10836. if (!el._isLeaving) {
  10837. return;
  10838. }
  10839. removeTransitionClass(el, leaveFromClass);
  10840. addTransitionClass(el, leaveToClass);
  10841. if (!hasExplicitCallback(onLeave)) {
  10842. whenTransitionEnds(el, type, leaveDuration, resolve2);
  10843. }
  10844. });
  10845. callHook2(onLeave, [el, resolve2]);
  10846. },
  10847. onEnterCancelled(el) {
  10848. finishEnter(el, false, void 0, true);
  10849. callHook2(onEnterCancelled, [el]);
  10850. },
  10851. onAppearCancelled(el) {
  10852. finishEnter(el, true, void 0, true);
  10853. callHook2(onAppearCancelled, [el]);
  10854. },
  10855. onLeaveCancelled(el) {
  10856. finishLeave(el);
  10857. callHook2(onLeaveCancelled, [el]);
  10858. }
  10859. });
  10860. }
  10861. function normalizeDuration(duration) {
  10862. if (duration == null) {
  10863. return null;
  10864. } else if (isObject(duration)) {
  10865. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  10866. } else {
  10867. const n = NumberOf(duration);
  10868. return [n, n];
  10869. }
  10870. }
  10871. function NumberOf(val) {
  10872. const res = toNumber(val);
  10873. if (true) {
  10874. assertNumber(res, "<transition> explicit duration");
  10875. }
  10876. return res;
  10877. }
  10878. function addTransitionClass(el, cls) {
  10879. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  10880. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  10881. }
  10882. function removeTransitionClass(el, cls) {
  10883. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  10884. const _vtc = el[vtcKey];
  10885. if (_vtc) {
  10886. _vtc.delete(cls);
  10887. if (!_vtc.size) {
  10888. el[vtcKey] = void 0;
  10889. }
  10890. }
  10891. }
  10892. function nextFrame(cb) {
  10893. requestAnimationFrame(() => {
  10894. requestAnimationFrame(cb);
  10895. });
  10896. }
  10897. var endId = 0;
  10898. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
  10899. const id = el._endId = ++endId;
  10900. const resolveIfNotStale = () => {
  10901. if (id === el._endId) {
  10902. resolve2();
  10903. }
  10904. };
  10905. if (explicitTimeout != null) {
  10906. return setTimeout(resolveIfNotStale, explicitTimeout);
  10907. }
  10908. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  10909. if (!type) {
  10910. return resolve2();
  10911. }
  10912. const endEvent = type + "end";
  10913. let ended = 0;
  10914. const end = () => {
  10915. el.removeEventListener(endEvent, onEnd);
  10916. resolveIfNotStale();
  10917. };
  10918. const onEnd = (e) => {
  10919. if (e.target === el && ++ended >= propCount) {
  10920. end();
  10921. }
  10922. };
  10923. setTimeout(() => {
  10924. if (ended < propCount) {
  10925. end();
  10926. }
  10927. }, timeout + 1);
  10928. el.addEventListener(endEvent, onEnd);
  10929. }
  10930. function getTransitionInfo(el, expectedType) {
  10931. const styles = window.getComputedStyle(el);
  10932. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  10933. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  10934. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  10935. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  10936. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  10937. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  10938. const animationTimeout = getTimeout(animationDelays, animationDurations);
  10939. let type = null;
  10940. let timeout = 0;
  10941. let propCount = 0;
  10942. if (expectedType === TRANSITION) {
  10943. if (transitionTimeout > 0) {
  10944. type = TRANSITION;
  10945. timeout = transitionTimeout;
  10946. propCount = transitionDurations.length;
  10947. }
  10948. } else if (expectedType === ANIMATION) {
  10949. if (animationTimeout > 0) {
  10950. type = ANIMATION;
  10951. timeout = animationTimeout;
  10952. propCount = animationDurations.length;
  10953. }
  10954. } else {
  10955. timeout = Math.max(transitionTimeout, animationTimeout);
  10956. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  10957. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  10958. }
  10959. const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(
  10960. getStyleProperties(`${TRANSITION}Property`).toString()
  10961. );
  10962. return {
  10963. type,
  10964. timeout,
  10965. propCount,
  10966. hasTransform
  10967. };
  10968. }
  10969. function getTimeout(delays, durations) {
  10970. while (delays.length < durations.length) {
  10971. delays = delays.concat(delays);
  10972. }
  10973. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  10974. }
  10975. function toMs(s) {
  10976. if (s === "auto") return 0;
  10977. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  10978. }
  10979. function forceReflow() {
  10980. return document.body.offsetHeight;
  10981. }
  10982. function patchClass(el, value, isSVG) {
  10983. const transitionClasses = el[vtcKey];
  10984. if (transitionClasses) {
  10985. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  10986. }
  10987. if (value == null) {
  10988. el.removeAttribute("class");
  10989. } else if (isSVG) {
  10990. el.setAttribute("class", value);
  10991. } else {
  10992. el.className = value;
  10993. }
  10994. }
  10995. var vShowOriginalDisplay = Symbol("_vod");
  10996. var vShowHidden = Symbol("_vsh");
  10997. var vShow = {
  10998. // used for prop mismatch check during hydration
  10999. name: "show",
  11000. beforeMount(el, { value }, { transition }) {
  11001. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  11002. if (transition && value) {
  11003. transition.beforeEnter(el);
  11004. } else {
  11005. setDisplay(el, value);
  11006. }
  11007. },
  11008. mounted(el, { value }, { transition }) {
  11009. if (transition && value) {
  11010. transition.enter(el);
  11011. }
  11012. },
  11013. updated(el, { value, oldValue }, { transition }) {
  11014. if (!value === !oldValue) return;
  11015. if (transition) {
  11016. if (value) {
  11017. transition.beforeEnter(el);
  11018. setDisplay(el, true);
  11019. transition.enter(el);
  11020. } else {
  11021. transition.leave(el, () => {
  11022. setDisplay(el, false);
  11023. });
  11024. }
  11025. } else {
  11026. setDisplay(el, value);
  11027. }
  11028. },
  11029. beforeUnmount(el, { value }) {
  11030. setDisplay(el, value);
  11031. }
  11032. };
  11033. function setDisplay(el, value) {
  11034. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  11035. el[vShowHidden] = !value;
  11036. }
  11037. function initVShowForSSR() {
  11038. vShow.getSSRProps = ({ value }) => {
  11039. if (!value) {
  11040. return { style: { display: "none" } };
  11041. }
  11042. };
  11043. }
  11044. var CSS_VAR_TEXT = Symbol(true ? "CSS_VAR_TEXT" : "");
  11045. function useCssVars(getter) {
  11046. const instance = getCurrentInstance();
  11047. if (!instance) {
  11048. warn2(`useCssVars is called without current active component instance.`);
  11049. return;
  11050. }
  11051. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  11052. Array.from(
  11053. document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
  11054. ).forEach((node) => setVarsOnNode(node, vars));
  11055. };
  11056. if (true) {
  11057. instance.getCssVars = () => getter(instance.proxy);
  11058. }
  11059. const setVars = () => {
  11060. const vars = getter(instance.proxy);
  11061. if (instance.ce) {
  11062. setVarsOnNode(instance.ce, vars);
  11063. } else {
  11064. setVarsOnVNode(instance.subTree, vars);
  11065. }
  11066. updateTeleports(vars);
  11067. };
  11068. onBeforeUpdate(() => {
  11069. queuePostFlushCb(setVars);
  11070. });
  11071. onMounted(() => {
  11072. watch2(setVars, NOOP, { flush: "post" });
  11073. const ob = new MutationObserver(setVars);
  11074. ob.observe(instance.subTree.el.parentNode, { childList: true });
  11075. onUnmounted(() => ob.disconnect());
  11076. });
  11077. }
  11078. function setVarsOnVNode(vnode, vars) {
  11079. if (vnode.shapeFlag & 128) {
  11080. const suspense = vnode.suspense;
  11081. vnode = suspense.activeBranch;
  11082. if (suspense.pendingBranch && !suspense.isHydrating) {
  11083. suspense.effects.push(() => {
  11084. setVarsOnVNode(suspense.activeBranch, vars);
  11085. });
  11086. }
  11087. }
  11088. while (vnode.component) {
  11089. vnode = vnode.component.subTree;
  11090. }
  11091. if (vnode.shapeFlag & 1 && vnode.el) {
  11092. setVarsOnNode(vnode.el, vars);
  11093. } else if (vnode.type === Fragment) {
  11094. vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  11095. } else if (vnode.type === Static) {
  11096. let { el, anchor } = vnode;
  11097. while (el) {
  11098. setVarsOnNode(el, vars);
  11099. if (el === anchor) break;
  11100. el = el.nextSibling;
  11101. }
  11102. }
  11103. }
  11104. function setVarsOnNode(el, vars) {
  11105. if (el.nodeType === 1) {
  11106. const style = el.style;
  11107. let cssText = "";
  11108. for (const key in vars) {
  11109. const value = normalizeCssVarValue(vars[key]);
  11110. style.setProperty(`--${key}`, value);
  11111. cssText += `--${key}: ${value};`;
  11112. }
  11113. style[CSS_VAR_TEXT] = cssText;
  11114. }
  11115. }
  11116. var displayRE = /(?:^|;)\s*display\s*:/;
  11117. function patchStyle(el, prev, next) {
  11118. const style = el.style;
  11119. const isCssString = isString(next);
  11120. let hasControlledDisplay = false;
  11121. if (next && !isCssString) {
  11122. if (prev) {
  11123. if (!isString(prev)) {
  11124. for (const key in prev) {
  11125. if (next[key] == null) {
  11126. setStyle(style, key, "");
  11127. }
  11128. }
  11129. } else {
  11130. for (const prevStyle of prev.split(";")) {
  11131. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  11132. if (next[key] == null) {
  11133. setStyle(style, key, "");
  11134. }
  11135. }
  11136. }
  11137. }
  11138. for (const key in next) {
  11139. if (key === "display") {
  11140. hasControlledDisplay = true;
  11141. }
  11142. setStyle(style, key, next[key]);
  11143. }
  11144. } else {
  11145. if (isCssString) {
  11146. if (prev !== next) {
  11147. const cssVarText = style[CSS_VAR_TEXT];
  11148. if (cssVarText) {
  11149. next += ";" + cssVarText;
  11150. }
  11151. style.cssText = next;
  11152. hasControlledDisplay = displayRE.test(next);
  11153. }
  11154. } else if (prev) {
  11155. el.removeAttribute("style");
  11156. }
  11157. }
  11158. if (vShowOriginalDisplay in el) {
  11159. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  11160. if (el[vShowHidden]) {
  11161. style.display = "none";
  11162. }
  11163. }
  11164. }
  11165. var semicolonRE = /[^\\];\s*$/;
  11166. var importantRE = /\s*!important$/;
  11167. function setStyle(style, name, val) {
  11168. if (isArray(val)) {
  11169. val.forEach((v) => setStyle(style, name, v));
  11170. } else {
  11171. if (val == null) val = "";
  11172. if (true) {
  11173. if (semicolonRE.test(val)) {
  11174. warn2(
  11175. `Unexpected semicolon at the end of '${name}' style value: '${val}'`
  11176. );
  11177. }
  11178. }
  11179. if (name.startsWith("--")) {
  11180. style.setProperty(name, val);
  11181. } else {
  11182. const prefixed = autoPrefix(style, name);
  11183. if (importantRE.test(val)) {
  11184. style.setProperty(
  11185. hyphenate(prefixed),
  11186. val.replace(importantRE, ""),
  11187. "important"
  11188. );
  11189. } else {
  11190. style[prefixed] = val;
  11191. }
  11192. }
  11193. }
  11194. }
  11195. var prefixes = ["Webkit", "Moz", "ms"];
  11196. var prefixCache = {};
  11197. function autoPrefix(style, rawName) {
  11198. const cached = prefixCache[rawName];
  11199. if (cached) {
  11200. return cached;
  11201. }
  11202. let name = camelize(rawName);
  11203. if (name !== "filter" && name in style) {
  11204. return prefixCache[rawName] = name;
  11205. }
  11206. name = capitalize(name);
  11207. for (let i = 0; i < prefixes.length; i++) {
  11208. const prefixed = prefixes[i] + name;
  11209. if (prefixed in style) {
  11210. return prefixCache[rawName] = prefixed;
  11211. }
  11212. }
  11213. return rawName;
  11214. }
  11215. var xlinkNS = "http://www.w3.org/1999/xlink";
  11216. function patchAttr(el, key, value, isSVG, instance, isBoolean2 = isSpecialBooleanAttr(key)) {
  11217. if (isSVG && key.startsWith("xlink:")) {
  11218. if (value == null) {
  11219. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  11220. } else {
  11221. el.setAttributeNS(xlinkNS, key, value);
  11222. }
  11223. } else {
  11224. if (value == null || isBoolean2 && !includeBooleanAttr(value)) {
  11225. el.removeAttribute(key);
  11226. } else {
  11227. el.setAttribute(
  11228. key,
  11229. isBoolean2 ? "" : isSymbol(value) ? String(value) : value
  11230. );
  11231. }
  11232. }
  11233. }
  11234. function patchDOMProp(el, key, value, parentComponent, attrName) {
  11235. if (key === "innerHTML" || key === "textContent") {
  11236. if (value != null) {
  11237. el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  11238. }
  11239. return;
  11240. }
  11241. const tag = el.tagName;
  11242. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  11243. !tag.includes("-")) {
  11244. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  11245. const newValue = value == null ? (
  11246. // #11647: value should be set as empty string for null and undefined,
  11247. // but <input type="checkbox"> should be set as 'on'.
  11248. el.type === "checkbox" ? "on" : ""
  11249. ) : String(value);
  11250. if (oldValue !== newValue || !("_value" in el)) {
  11251. el.value = newValue;
  11252. }
  11253. if (value == null) {
  11254. el.removeAttribute(key);
  11255. }
  11256. el._value = value;
  11257. return;
  11258. }
  11259. let needRemove = false;
  11260. if (value === "" || value == null) {
  11261. const type = typeof el[key];
  11262. if (type === "boolean") {
  11263. value = includeBooleanAttr(value);
  11264. } else if (value == null && type === "string") {
  11265. value = "";
  11266. needRemove = true;
  11267. } else if (type === "number") {
  11268. value = 0;
  11269. needRemove = true;
  11270. }
  11271. }
  11272. try {
  11273. el[key] = value;
  11274. } catch (e) {
  11275. if (!needRemove) {
  11276. warn2(
  11277. `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
  11278. e
  11279. );
  11280. }
  11281. }
  11282. needRemove && el.removeAttribute(attrName || key);
  11283. }
  11284. function addEventListener(el, event, handler, options) {
  11285. el.addEventListener(event, handler, options);
  11286. }
  11287. function removeEventListener(el, event, handler, options) {
  11288. el.removeEventListener(event, handler, options);
  11289. }
  11290. var veiKey = Symbol("_vei");
  11291. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  11292. const invokers = el[veiKey] || (el[veiKey] = {});
  11293. const existingInvoker = invokers[rawName];
  11294. if (nextValue && existingInvoker) {
  11295. existingInvoker.value = true ? sanitizeEventValue(nextValue, rawName) : nextValue;
  11296. } else {
  11297. const [name, options] = parseName(rawName);
  11298. if (nextValue) {
  11299. const invoker = invokers[rawName] = createInvoker(
  11300. true ? sanitizeEventValue(nextValue, rawName) : nextValue,
  11301. instance
  11302. );
  11303. addEventListener(el, name, invoker, options);
  11304. } else if (existingInvoker) {
  11305. removeEventListener(el, name, existingInvoker, options);
  11306. invokers[rawName] = void 0;
  11307. }
  11308. }
  11309. }
  11310. var optionsModifierRE = /(?:Once|Passive|Capture)$/;
  11311. function parseName(name) {
  11312. let options;
  11313. if (optionsModifierRE.test(name)) {
  11314. options = {};
  11315. let m;
  11316. while (m = name.match(optionsModifierRE)) {
  11317. name = name.slice(0, name.length - m[0].length);
  11318. options[m[0].toLowerCase()] = true;
  11319. }
  11320. }
  11321. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  11322. return [event, options];
  11323. }
  11324. var cachedNow = 0;
  11325. var p = Promise.resolve();
  11326. var getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  11327. function createInvoker(initialValue, instance) {
  11328. const invoker = (e) => {
  11329. if (!e._vts) {
  11330. e._vts = Date.now();
  11331. } else if (e._vts <= invoker.attached) {
  11332. return;
  11333. }
  11334. callWithAsyncErrorHandling(
  11335. patchStopImmediatePropagation(e, invoker.value),
  11336. instance,
  11337. 5,
  11338. [e]
  11339. );
  11340. };
  11341. invoker.value = initialValue;
  11342. invoker.attached = getNow();
  11343. return invoker;
  11344. }
  11345. function sanitizeEventValue(value, propName) {
  11346. if (isFunction(value) || isArray(value)) {
  11347. return value;
  11348. }
  11349. warn2(
  11350. `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
  11351. Expected function or array of functions, received type ${typeof value}.`
  11352. );
  11353. return NOOP;
  11354. }
  11355. function patchStopImmediatePropagation(e, value) {
  11356. if (isArray(value)) {
  11357. const originalStop = e.stopImmediatePropagation;
  11358. e.stopImmediatePropagation = () => {
  11359. originalStop.call(e);
  11360. e._stopped = true;
  11361. };
  11362. return value.map(
  11363. (fn) => (e2) => !e2._stopped && fn && fn(e2)
  11364. );
  11365. } else {
  11366. return value;
  11367. }
  11368. }
  11369. var isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  11370. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  11371. var patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  11372. const isSVG = namespace === "svg";
  11373. if (key === "class") {
  11374. patchClass(el, nextValue, isSVG);
  11375. } else if (key === "style") {
  11376. patchStyle(el, prevValue, nextValue);
  11377. } else if (isOn(key)) {
  11378. if (!isModelListener(key)) {
  11379. patchEvent(el, key, prevValue, nextValue, parentComponent);
  11380. }
  11381. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  11382. patchDOMProp(el, key, nextValue);
  11383. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
  11384. patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  11385. }
  11386. } else if (
  11387. // #11081 force set props for possible async custom element
  11388. el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
  11389. ) {
  11390. patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
  11391. } else {
  11392. if (key === "true-value") {
  11393. el._trueValue = nextValue;
  11394. } else if (key === "false-value") {
  11395. el._falseValue = nextValue;
  11396. }
  11397. patchAttr(el, key, nextValue, isSVG);
  11398. }
  11399. };
  11400. function shouldSetAsProp(el, key, value, isSVG) {
  11401. if (isSVG) {
  11402. if (key === "innerHTML" || key === "textContent") {
  11403. return true;
  11404. }
  11405. if (key in el && isNativeOn(key) && isFunction(value)) {
  11406. return true;
  11407. }
  11408. return false;
  11409. }
  11410. if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
  11411. return false;
  11412. }
  11413. if (key === "form") {
  11414. return false;
  11415. }
  11416. if (key === "list" && el.tagName === "INPUT") {
  11417. return false;
  11418. }
  11419. if (key === "type" && el.tagName === "TEXTAREA") {
  11420. return false;
  11421. }
  11422. if (key === "width" || key === "height") {
  11423. const tag = el.tagName;
  11424. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  11425. return false;
  11426. }
  11427. }
  11428. if (isNativeOn(key) && isString(value)) {
  11429. return false;
  11430. }
  11431. return key in el;
  11432. }
  11433. var REMOVAL = {};
  11434. function defineCustomElement(options, extraOptions, _createApp) {
  11435. let Comp = defineComponent(options, extraOptions);
  11436. if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
  11437. class VueCustomElement extends VueElement {
  11438. constructor(initialProps) {
  11439. super(Comp, initialProps, _createApp);
  11440. }
  11441. }
  11442. VueCustomElement.def = Comp;
  11443. return VueCustomElement;
  11444. }
  11445. var defineSSRCustomElement = ((options, extraOptions) => {
  11446. return defineCustomElement(options, extraOptions, createSSRApp);
  11447. });
  11448. var BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  11449. };
  11450. var VueElement = class _VueElement extends BaseClass {
  11451. constructor(_def, _props = {}, _createApp = createApp) {
  11452. super();
  11453. this._def = _def;
  11454. this._props = _props;
  11455. this._createApp = _createApp;
  11456. this._isVueCE = true;
  11457. this._instance = null;
  11458. this._app = null;
  11459. this._nonce = this._def.nonce;
  11460. this._connected = false;
  11461. this._resolved = false;
  11462. this._numberProps = null;
  11463. this._styleChildren = /* @__PURE__ */ new WeakSet();
  11464. this._ob = null;
  11465. if (this.shadowRoot && _createApp !== createApp) {
  11466. this._root = this.shadowRoot;
  11467. } else {
  11468. if (this.shadowRoot) {
  11469. warn2(
  11470. `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
  11471. );
  11472. }
  11473. if (_def.shadowRoot !== false) {
  11474. this.attachShadow({ mode: "open" });
  11475. this._root = this.shadowRoot;
  11476. } else {
  11477. this._root = this;
  11478. }
  11479. }
  11480. }
  11481. connectedCallback() {
  11482. if (!this.isConnected) return;
  11483. if (!this.shadowRoot && !this._resolved) {
  11484. this._parseSlots();
  11485. }
  11486. this._connected = true;
  11487. let parent = this;
  11488. while (parent = parent && (parent.parentNode || parent.host)) {
  11489. if (parent instanceof _VueElement) {
  11490. this._parent = parent;
  11491. break;
  11492. }
  11493. }
  11494. if (!this._instance) {
  11495. if (this._resolved) {
  11496. this._mount(this._def);
  11497. } else {
  11498. if (parent && parent._pendingResolve) {
  11499. this._pendingResolve = parent._pendingResolve.then(() => {
  11500. this._pendingResolve = void 0;
  11501. this._resolveDef();
  11502. });
  11503. } else {
  11504. this._resolveDef();
  11505. }
  11506. }
  11507. }
  11508. }
  11509. _setParent(parent = this._parent) {
  11510. if (parent) {
  11511. this._instance.parent = parent._instance;
  11512. this._inheritParentContext(parent);
  11513. }
  11514. }
  11515. _inheritParentContext(parent = this._parent) {
  11516. if (parent && this._app) {
  11517. Object.setPrototypeOf(
  11518. this._app._context.provides,
  11519. parent._instance.provides
  11520. );
  11521. }
  11522. }
  11523. disconnectedCallback() {
  11524. this._connected = false;
  11525. nextTick(() => {
  11526. if (!this._connected) {
  11527. if (this._ob) {
  11528. this._ob.disconnect();
  11529. this._ob = null;
  11530. }
  11531. this._app && this._app.unmount();
  11532. if (this._instance) this._instance.ce = void 0;
  11533. this._app = this._instance = null;
  11534. }
  11535. });
  11536. }
  11537. /**
  11538. * resolve inner component definition (handle possible async component)
  11539. */
  11540. _resolveDef() {
  11541. if (this._pendingResolve) {
  11542. return;
  11543. }
  11544. for (let i = 0; i < this.attributes.length; i++) {
  11545. this._setAttr(this.attributes[i].name);
  11546. }
  11547. this._ob = new MutationObserver((mutations) => {
  11548. for (const m of mutations) {
  11549. this._setAttr(m.attributeName);
  11550. }
  11551. });
  11552. this._ob.observe(this, { attributes: true });
  11553. const resolve2 = (def2, isAsync = false) => {
  11554. this._resolved = true;
  11555. this._pendingResolve = void 0;
  11556. const { props, styles } = def2;
  11557. let numberProps;
  11558. if (props && !isArray(props)) {
  11559. for (const key in props) {
  11560. const opt = props[key];
  11561. if (opt === Number || opt && opt.type === Number) {
  11562. if (key in this._props) {
  11563. this._props[key] = toNumber(this._props[key]);
  11564. }
  11565. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
  11566. }
  11567. }
  11568. }
  11569. this._numberProps = numberProps;
  11570. this._resolveProps(def2);
  11571. if (this.shadowRoot) {
  11572. this._applyStyles(styles);
  11573. } else if (styles) {
  11574. warn2(
  11575. "Custom element style injection is not supported when using shadowRoot: false"
  11576. );
  11577. }
  11578. this._mount(def2);
  11579. };
  11580. const asyncDef = this._def.__asyncLoader;
  11581. if (asyncDef) {
  11582. this._pendingResolve = asyncDef().then((def2) => {
  11583. def2.configureApp = this._def.configureApp;
  11584. resolve2(this._def = def2, true);
  11585. });
  11586. } else {
  11587. resolve2(this._def);
  11588. }
  11589. }
  11590. _mount(def2) {
  11591. if (!def2.name) {
  11592. def2.name = "VueElement";
  11593. }
  11594. this._app = this._createApp(def2);
  11595. this._inheritParentContext();
  11596. if (def2.configureApp) {
  11597. def2.configureApp(this._app);
  11598. }
  11599. this._app._ceVNode = this._createVNode();
  11600. this._app.mount(this._root);
  11601. const exposed = this._instance && this._instance.exposed;
  11602. if (!exposed) return;
  11603. for (const key in exposed) {
  11604. if (!hasOwn(this, key)) {
  11605. Object.defineProperty(this, key, {
  11606. // unwrap ref to be consistent with public instance behavior
  11607. get: () => unref(exposed[key])
  11608. });
  11609. } else if (true) {
  11610. warn2(`Exposed property "${key}" already exists on custom element.`);
  11611. }
  11612. }
  11613. }
  11614. _resolveProps(def2) {
  11615. const { props } = def2;
  11616. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  11617. for (const key of Object.keys(this)) {
  11618. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  11619. this._setProp(key, this[key]);
  11620. }
  11621. }
  11622. for (const key of declaredPropKeys.map(camelize)) {
  11623. Object.defineProperty(this, key, {
  11624. get() {
  11625. return this._getProp(key);
  11626. },
  11627. set(val) {
  11628. this._setProp(key, val, true, true);
  11629. }
  11630. });
  11631. }
  11632. }
  11633. _setAttr(key) {
  11634. if (key.startsWith("data-v-")) return;
  11635. const has = this.hasAttribute(key);
  11636. let value = has ? this.getAttribute(key) : REMOVAL;
  11637. const camelKey = camelize(key);
  11638. if (has && this._numberProps && this._numberProps[camelKey]) {
  11639. value = toNumber(value);
  11640. }
  11641. this._setProp(camelKey, value, false, true);
  11642. }
  11643. /**
  11644. * @internal
  11645. */
  11646. _getProp(key) {
  11647. return this._props[key];
  11648. }
  11649. /**
  11650. * @internal
  11651. */
  11652. _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
  11653. if (val !== this._props[key]) {
  11654. if (val === REMOVAL) {
  11655. delete this._props[key];
  11656. } else {
  11657. this._props[key] = val;
  11658. if (key === "key" && this._app) {
  11659. this._app._ceVNode.key = val;
  11660. }
  11661. }
  11662. if (shouldUpdate && this._instance) {
  11663. this._update();
  11664. }
  11665. if (shouldReflect) {
  11666. const ob = this._ob;
  11667. ob && ob.disconnect();
  11668. if (val === true) {
  11669. this.setAttribute(hyphenate(key), "");
  11670. } else if (typeof val === "string" || typeof val === "number") {
  11671. this.setAttribute(hyphenate(key), val + "");
  11672. } else if (!val) {
  11673. this.removeAttribute(hyphenate(key));
  11674. }
  11675. ob && ob.observe(this, { attributes: true });
  11676. }
  11677. }
  11678. }
  11679. _update() {
  11680. const vnode = this._createVNode();
  11681. if (this._app) vnode.appContext = this._app._context;
  11682. render(vnode, this._root);
  11683. }
  11684. _createVNode() {
  11685. const baseProps = {};
  11686. if (!this.shadowRoot) {
  11687. baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
  11688. }
  11689. const vnode = createVNode(this._def, extend(baseProps, this._props));
  11690. if (!this._instance) {
  11691. vnode.ce = (instance) => {
  11692. this._instance = instance;
  11693. instance.ce = this;
  11694. instance.isCE = true;
  11695. if (true) {
  11696. instance.ceReload = (newStyles) => {
  11697. if (this._styles) {
  11698. this._styles.forEach((s) => this._root.removeChild(s));
  11699. this._styles.length = 0;
  11700. }
  11701. this._applyStyles(newStyles);
  11702. this._instance = null;
  11703. this._update();
  11704. };
  11705. }
  11706. const dispatch = (event, args) => {
  11707. this.dispatchEvent(
  11708. new CustomEvent(
  11709. event,
  11710. isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
  11711. )
  11712. );
  11713. };
  11714. instance.emit = (event, ...args) => {
  11715. dispatch(event, args);
  11716. if (hyphenate(event) !== event) {
  11717. dispatch(hyphenate(event), args);
  11718. }
  11719. };
  11720. this._setParent();
  11721. };
  11722. }
  11723. return vnode;
  11724. }
  11725. _applyStyles(styles, owner) {
  11726. if (!styles) return;
  11727. if (owner) {
  11728. if (owner === this._def || this._styleChildren.has(owner)) {
  11729. return;
  11730. }
  11731. this._styleChildren.add(owner);
  11732. }
  11733. const nonce = this._nonce;
  11734. for (let i = styles.length - 1; i >= 0; i--) {
  11735. const s = document.createElement("style");
  11736. if (nonce) s.setAttribute("nonce", nonce);
  11737. s.textContent = styles[i];
  11738. this.shadowRoot.prepend(s);
  11739. if (true) {
  11740. if (owner) {
  11741. if (owner.__hmrId) {
  11742. if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
  11743. let entry = this._childStyles.get(owner.__hmrId);
  11744. if (!entry) {
  11745. this._childStyles.set(owner.__hmrId, entry = []);
  11746. }
  11747. entry.push(s);
  11748. }
  11749. } else {
  11750. (this._styles || (this._styles = [])).push(s);
  11751. }
  11752. }
  11753. }
  11754. }
  11755. /**
  11756. * Only called when shadowRoot is false
  11757. */
  11758. _parseSlots() {
  11759. const slots = this._slots = {};
  11760. let n;
  11761. while (n = this.firstChild) {
  11762. const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
  11763. (slots[slotName] || (slots[slotName] = [])).push(n);
  11764. this.removeChild(n);
  11765. }
  11766. }
  11767. /**
  11768. * Only called when shadowRoot is false
  11769. */
  11770. _renderSlots() {
  11771. const outlets = (this._teleportTarget || this).querySelectorAll("slot");
  11772. const scopeId = this._instance.type.__scopeId;
  11773. for (let i = 0; i < outlets.length; i++) {
  11774. const o = outlets[i];
  11775. const slotName = o.getAttribute("name") || "default";
  11776. const content = this._slots[slotName];
  11777. const parent = o.parentNode;
  11778. if (content) {
  11779. for (const n of content) {
  11780. if (scopeId && n.nodeType === 1) {
  11781. const id = scopeId + "-s";
  11782. const walker = document.createTreeWalker(n, 1);
  11783. n.setAttribute(id, "");
  11784. let child;
  11785. while (child = walker.nextNode()) {
  11786. child.setAttribute(id, "");
  11787. }
  11788. }
  11789. parent.insertBefore(n, o);
  11790. }
  11791. } else {
  11792. while (o.firstChild) parent.insertBefore(o.firstChild, o);
  11793. }
  11794. parent.removeChild(o);
  11795. }
  11796. }
  11797. /**
  11798. * @internal
  11799. */
  11800. _injectChildStyle(comp) {
  11801. this._applyStyles(comp.styles, comp);
  11802. }
  11803. /**
  11804. * @internal
  11805. */
  11806. _removeChildStyle(comp) {
  11807. if (true) {
  11808. this._styleChildren.delete(comp);
  11809. if (this._childStyles && comp.__hmrId) {
  11810. const oldStyles = this._childStyles.get(comp.__hmrId);
  11811. if (oldStyles) {
  11812. oldStyles.forEach((s) => this._root.removeChild(s));
  11813. oldStyles.length = 0;
  11814. }
  11815. }
  11816. }
  11817. }
  11818. };
  11819. function useHost(caller) {
  11820. const instance = getCurrentInstance();
  11821. const el = instance && instance.ce;
  11822. if (el) {
  11823. return el;
  11824. } else if (true) {
  11825. if (!instance) {
  11826. warn2(
  11827. `${caller || "useHost"} called without an active component instance.`
  11828. );
  11829. } else {
  11830. warn2(
  11831. `${caller || "useHost"} can only be used in components defined via defineCustomElement.`
  11832. );
  11833. }
  11834. }
  11835. return null;
  11836. }
  11837. function useShadowRoot() {
  11838. const el = true ? useHost("useShadowRoot") : useHost();
  11839. return el && el.shadowRoot;
  11840. }
  11841. function useCssModule(name = "$style") {
  11842. {
  11843. const instance = getCurrentInstance();
  11844. if (!instance) {
  11845. warn2(`useCssModule must be called inside setup()`);
  11846. return EMPTY_OBJ;
  11847. }
  11848. const modules = instance.type.__cssModules;
  11849. if (!modules) {
  11850. warn2(`Current instance does not have CSS modules injected.`);
  11851. return EMPTY_OBJ;
  11852. }
  11853. const mod = modules[name];
  11854. if (!mod) {
  11855. warn2(`Current instance does not have CSS module named "${name}".`);
  11856. return EMPTY_OBJ;
  11857. }
  11858. return mod;
  11859. }
  11860. }
  11861. var positionMap = /* @__PURE__ */ new WeakMap();
  11862. var newPositionMap = /* @__PURE__ */ new WeakMap();
  11863. var moveCbKey = Symbol("_moveCb");
  11864. var enterCbKey2 = Symbol("_enterCb");
  11865. var decorate = (t) => {
  11866. delete t.props.mode;
  11867. return t;
  11868. };
  11869. var TransitionGroupImpl = decorate({
  11870. name: "TransitionGroup",
  11871. props: extend({}, TransitionPropsValidators, {
  11872. tag: String,
  11873. moveClass: String
  11874. }),
  11875. setup(props, { slots }) {
  11876. const instance = getCurrentInstance();
  11877. const state = useTransitionState();
  11878. let prevChildren;
  11879. let children;
  11880. onUpdated(() => {
  11881. if (!prevChildren.length) {
  11882. return;
  11883. }
  11884. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  11885. if (!hasCSSTransform(
  11886. prevChildren[0].el,
  11887. instance.vnode.el,
  11888. moveClass
  11889. )) {
  11890. prevChildren = [];
  11891. return;
  11892. }
  11893. prevChildren.forEach(callPendingCbs);
  11894. prevChildren.forEach(recordPosition);
  11895. const movedChildren = prevChildren.filter(applyTranslation);
  11896. forceReflow();
  11897. movedChildren.forEach((c) => {
  11898. const el = c.el;
  11899. const style = el.style;
  11900. addTransitionClass(el, moveClass);
  11901. style.transform = style.webkitTransform = style.transitionDuration = "";
  11902. const cb = el[moveCbKey] = (e) => {
  11903. if (e && e.target !== el) {
  11904. return;
  11905. }
  11906. if (!e || e.propertyName.endsWith("transform")) {
  11907. el.removeEventListener("transitionend", cb);
  11908. el[moveCbKey] = null;
  11909. removeTransitionClass(el, moveClass);
  11910. }
  11911. };
  11912. el.addEventListener("transitionend", cb);
  11913. });
  11914. prevChildren = [];
  11915. });
  11916. return () => {
  11917. const rawProps = toRaw(props);
  11918. const cssTransitionProps = resolveTransitionProps(rawProps);
  11919. let tag = rawProps.tag || Fragment;
  11920. prevChildren = [];
  11921. if (children) {
  11922. for (let i = 0; i < children.length; i++) {
  11923. const child = children[i];
  11924. if (child.el && child.el instanceof Element) {
  11925. prevChildren.push(child);
  11926. setTransitionHooks(
  11927. child,
  11928. resolveTransitionHooks(
  11929. child,
  11930. cssTransitionProps,
  11931. state,
  11932. instance
  11933. )
  11934. );
  11935. positionMap.set(
  11936. child,
  11937. child.el.getBoundingClientRect()
  11938. );
  11939. }
  11940. }
  11941. }
  11942. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  11943. for (let i = 0; i < children.length; i++) {
  11944. const child = children[i];
  11945. if (child.key != null) {
  11946. setTransitionHooks(
  11947. child,
  11948. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  11949. );
  11950. } else if (child.type !== Text) {
  11951. warn2(`<TransitionGroup> children must be keyed.`);
  11952. }
  11953. }
  11954. return createVNode(tag, null, children);
  11955. };
  11956. }
  11957. });
  11958. var TransitionGroup = TransitionGroupImpl;
  11959. function callPendingCbs(c) {
  11960. const el = c.el;
  11961. if (el[moveCbKey]) {
  11962. el[moveCbKey]();
  11963. }
  11964. if (el[enterCbKey2]) {
  11965. el[enterCbKey2]();
  11966. }
  11967. }
  11968. function recordPosition(c) {
  11969. newPositionMap.set(c, c.el.getBoundingClientRect());
  11970. }
  11971. function applyTranslation(c) {
  11972. const oldPos = positionMap.get(c);
  11973. const newPos = newPositionMap.get(c);
  11974. const dx = oldPos.left - newPos.left;
  11975. const dy = oldPos.top - newPos.top;
  11976. if (dx || dy) {
  11977. const s = c.el.style;
  11978. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  11979. s.transitionDuration = "0s";
  11980. return c;
  11981. }
  11982. }
  11983. function hasCSSTransform(el, root, moveClass) {
  11984. const clone = el.cloneNode();
  11985. const _vtc = el[vtcKey];
  11986. if (_vtc) {
  11987. _vtc.forEach((cls) => {
  11988. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  11989. });
  11990. }
  11991. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  11992. clone.style.display = "none";
  11993. const container = root.nodeType === 1 ? root : root.parentNode;
  11994. container.appendChild(clone);
  11995. const { hasTransform } = getTransitionInfo(clone);
  11996. container.removeChild(clone);
  11997. return hasTransform;
  11998. }
  11999. var getModelAssigner = (vnode) => {
  12000. const fn = vnode.props["onUpdate:modelValue"] || false;
  12001. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  12002. };
  12003. function onCompositionStart(e) {
  12004. e.target.composing = true;
  12005. }
  12006. function onCompositionEnd(e) {
  12007. const target = e.target;
  12008. if (target.composing) {
  12009. target.composing = false;
  12010. target.dispatchEvent(new Event("input"));
  12011. }
  12012. }
  12013. var assignKey = Symbol("_assign");
  12014. var vModelText = {
  12015. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  12016. el[assignKey] = getModelAssigner(vnode);
  12017. const castToNumber = number || vnode.props && vnode.props.type === "number";
  12018. addEventListener(el, lazy ? "change" : "input", (e) => {
  12019. if (e.target.composing) return;
  12020. let domValue = el.value;
  12021. if (trim) {
  12022. domValue = domValue.trim();
  12023. }
  12024. if (castToNumber) {
  12025. domValue = looseToNumber(domValue);
  12026. }
  12027. el[assignKey](domValue);
  12028. });
  12029. if (trim) {
  12030. addEventListener(el, "change", () => {
  12031. el.value = el.value.trim();
  12032. });
  12033. }
  12034. if (!lazy) {
  12035. addEventListener(el, "compositionstart", onCompositionStart);
  12036. addEventListener(el, "compositionend", onCompositionEnd);
  12037. addEventListener(el, "change", onCompositionEnd);
  12038. }
  12039. },
  12040. // set value on mounted so it's after min/max for type="range"
  12041. mounted(el, { value }) {
  12042. el.value = value == null ? "" : value;
  12043. },
  12044. beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
  12045. el[assignKey] = getModelAssigner(vnode);
  12046. if (el.composing) return;
  12047. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
  12048. const newValue = value == null ? "" : value;
  12049. if (elValue === newValue) {
  12050. return;
  12051. }
  12052. if (document.activeElement === el && el.type !== "range") {
  12053. if (lazy && value === oldValue) {
  12054. return;
  12055. }
  12056. if (trim && el.value.trim() === newValue) {
  12057. return;
  12058. }
  12059. }
  12060. el.value = newValue;
  12061. }
  12062. };
  12063. var vModelCheckbox = {
  12064. // #4096 array checkboxes need to be deep traversed
  12065. deep: true,
  12066. created(el, _, vnode) {
  12067. el[assignKey] = getModelAssigner(vnode);
  12068. addEventListener(el, "change", () => {
  12069. const modelValue = el._modelValue;
  12070. const elementValue = getValue(el);
  12071. const checked = el.checked;
  12072. const assign = el[assignKey];
  12073. if (isArray(modelValue)) {
  12074. const index = looseIndexOf(modelValue, elementValue);
  12075. const found = index !== -1;
  12076. if (checked && !found) {
  12077. assign(modelValue.concat(elementValue));
  12078. } else if (!checked && found) {
  12079. const filtered = [...modelValue];
  12080. filtered.splice(index, 1);
  12081. assign(filtered);
  12082. }
  12083. } else if (isSet(modelValue)) {
  12084. const cloned = new Set(modelValue);
  12085. if (checked) {
  12086. cloned.add(elementValue);
  12087. } else {
  12088. cloned.delete(elementValue);
  12089. }
  12090. assign(cloned);
  12091. } else {
  12092. assign(getCheckboxValue(el, checked));
  12093. }
  12094. });
  12095. },
  12096. // set initial checked on mount to wait for true-value/false-value
  12097. mounted: setChecked,
  12098. beforeUpdate(el, binding, vnode) {
  12099. el[assignKey] = getModelAssigner(vnode);
  12100. setChecked(el, binding, vnode);
  12101. }
  12102. };
  12103. function setChecked(el, { value, oldValue }, vnode) {
  12104. el._modelValue = value;
  12105. let checked;
  12106. if (isArray(value)) {
  12107. checked = looseIndexOf(value, vnode.props.value) > -1;
  12108. } else if (isSet(value)) {
  12109. checked = value.has(vnode.props.value);
  12110. } else {
  12111. if (value === oldValue) return;
  12112. checked = looseEqual(value, getCheckboxValue(el, true));
  12113. }
  12114. if (el.checked !== checked) {
  12115. el.checked = checked;
  12116. }
  12117. }
  12118. var vModelRadio = {
  12119. created(el, { value }, vnode) {
  12120. el.checked = looseEqual(value, vnode.props.value);
  12121. el[assignKey] = getModelAssigner(vnode);
  12122. addEventListener(el, "change", () => {
  12123. el[assignKey](getValue(el));
  12124. });
  12125. },
  12126. beforeUpdate(el, { value, oldValue }, vnode) {
  12127. el[assignKey] = getModelAssigner(vnode);
  12128. if (value !== oldValue) {
  12129. el.checked = looseEqual(value, vnode.props.value);
  12130. }
  12131. }
  12132. };
  12133. var vModelSelect = {
  12134. // <select multiple> value need to be deep traversed
  12135. deep: true,
  12136. created(el, { value, modifiers: { number } }, vnode) {
  12137. const isSetModel = isSet(value);
  12138. addEventListener(el, "change", () => {
  12139. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  12140. (o) => number ? looseToNumber(getValue(o)) : getValue(o)
  12141. );
  12142. el[assignKey](
  12143. el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
  12144. );
  12145. el._assigning = true;
  12146. nextTick(() => {
  12147. el._assigning = false;
  12148. });
  12149. });
  12150. el[assignKey] = getModelAssigner(vnode);
  12151. },
  12152. // set value in mounted & updated because <select> relies on its children
  12153. // <option>s.
  12154. mounted(el, { value }) {
  12155. setSelected(el, value);
  12156. },
  12157. beforeUpdate(el, _binding, vnode) {
  12158. el[assignKey] = getModelAssigner(vnode);
  12159. },
  12160. updated(el, { value }) {
  12161. if (!el._assigning) {
  12162. setSelected(el, value);
  12163. }
  12164. }
  12165. };
  12166. function setSelected(el, value) {
  12167. const isMultiple = el.multiple;
  12168. const isArrayValue = isArray(value);
  12169. if (isMultiple && !isArrayValue && !isSet(value)) {
  12170. warn2(
  12171. `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
  12172. );
  12173. return;
  12174. }
  12175. for (let i = 0, l = el.options.length; i < l; i++) {
  12176. const option = el.options[i];
  12177. const optionValue = getValue(option);
  12178. if (isMultiple) {
  12179. if (isArrayValue) {
  12180. const optionType = typeof optionValue;
  12181. if (optionType === "string" || optionType === "number") {
  12182. option.selected = value.some((v) => String(v) === String(optionValue));
  12183. } else {
  12184. option.selected = looseIndexOf(value, optionValue) > -1;
  12185. }
  12186. } else {
  12187. option.selected = value.has(optionValue);
  12188. }
  12189. } else if (looseEqual(getValue(option), value)) {
  12190. if (el.selectedIndex !== i) el.selectedIndex = i;
  12191. return;
  12192. }
  12193. }
  12194. if (!isMultiple && el.selectedIndex !== -1) {
  12195. el.selectedIndex = -1;
  12196. }
  12197. }
  12198. function getValue(el) {
  12199. return "_value" in el ? el._value : el.value;
  12200. }
  12201. function getCheckboxValue(el, checked) {
  12202. const key = checked ? "_trueValue" : "_falseValue";
  12203. return key in el ? el[key] : checked;
  12204. }
  12205. var vModelDynamic = {
  12206. created(el, binding, vnode) {
  12207. callModelHook(el, binding, vnode, null, "created");
  12208. },
  12209. mounted(el, binding, vnode) {
  12210. callModelHook(el, binding, vnode, null, "mounted");
  12211. },
  12212. beforeUpdate(el, binding, vnode, prevVNode) {
  12213. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  12214. },
  12215. updated(el, binding, vnode, prevVNode) {
  12216. callModelHook(el, binding, vnode, prevVNode, "updated");
  12217. }
  12218. };
  12219. function resolveDynamicModel(tagName, type) {
  12220. switch (tagName) {
  12221. case "SELECT":
  12222. return vModelSelect;
  12223. case "TEXTAREA":
  12224. return vModelText;
  12225. default:
  12226. switch (type) {
  12227. case "checkbox":
  12228. return vModelCheckbox;
  12229. case "radio":
  12230. return vModelRadio;
  12231. default:
  12232. return vModelText;
  12233. }
  12234. }
  12235. }
  12236. function callModelHook(el, binding, vnode, prevVNode, hook) {
  12237. const modelToUse = resolveDynamicModel(
  12238. el.tagName,
  12239. vnode.props && vnode.props.type
  12240. );
  12241. const fn = modelToUse[hook];
  12242. fn && fn(el, binding, vnode, prevVNode);
  12243. }
  12244. function initVModelForSSR() {
  12245. vModelText.getSSRProps = ({ value }) => ({ value });
  12246. vModelRadio.getSSRProps = ({ value }, vnode) => {
  12247. if (vnode.props && looseEqual(vnode.props.value, value)) {
  12248. return { checked: true };
  12249. }
  12250. };
  12251. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  12252. if (isArray(value)) {
  12253. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
  12254. return { checked: true };
  12255. }
  12256. } else if (isSet(value)) {
  12257. if (vnode.props && value.has(vnode.props.value)) {
  12258. return { checked: true };
  12259. }
  12260. } else if (value) {
  12261. return { checked: true };
  12262. }
  12263. };
  12264. vModelDynamic.getSSRProps = (binding, vnode) => {
  12265. if (typeof vnode.type !== "string") {
  12266. return;
  12267. }
  12268. const modelToUse = resolveDynamicModel(
  12269. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  12270. vnode.type.toUpperCase(),
  12271. vnode.props && vnode.props.type
  12272. );
  12273. if (modelToUse.getSSRProps) {
  12274. return modelToUse.getSSRProps(binding, vnode);
  12275. }
  12276. };
  12277. }
  12278. var systemModifiers = ["ctrl", "shift", "alt", "meta"];
  12279. var modifierGuards = {
  12280. stop: (e) => e.stopPropagation(),
  12281. prevent: (e) => e.preventDefault(),
  12282. self: (e) => e.target !== e.currentTarget,
  12283. ctrl: (e) => !e.ctrlKey,
  12284. shift: (e) => !e.shiftKey,
  12285. alt: (e) => !e.altKey,
  12286. meta: (e) => !e.metaKey,
  12287. left: (e) => "button" in e && e.button !== 0,
  12288. middle: (e) => "button" in e && e.button !== 1,
  12289. right: (e) => "button" in e && e.button !== 2,
  12290. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  12291. };
  12292. var withModifiers = (fn, modifiers) => {
  12293. const cache = fn._withMods || (fn._withMods = {});
  12294. const cacheKey = modifiers.join(".");
  12295. return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
  12296. for (let i = 0; i < modifiers.length; i++) {
  12297. const guard = modifierGuards[modifiers[i]];
  12298. if (guard && guard(event, modifiers)) return;
  12299. }
  12300. return fn(event, ...args);
  12301. }));
  12302. };
  12303. var keyNames = {
  12304. esc: "escape",
  12305. space: " ",
  12306. up: "arrow-up",
  12307. left: "arrow-left",
  12308. right: "arrow-right",
  12309. down: "arrow-down",
  12310. delete: "backspace"
  12311. };
  12312. var withKeys = (fn, modifiers) => {
  12313. const cache = fn._withKeys || (fn._withKeys = {});
  12314. const cacheKey = modifiers.join(".");
  12315. return cache[cacheKey] || (cache[cacheKey] = ((event) => {
  12316. if (!("key" in event)) {
  12317. return;
  12318. }
  12319. const eventKey = hyphenate(event.key);
  12320. if (modifiers.some(
  12321. (k) => k === eventKey || keyNames[k] === eventKey
  12322. )) {
  12323. return fn(event);
  12324. }
  12325. }));
  12326. };
  12327. var rendererOptions = extend({ patchProp }, nodeOps);
  12328. var renderer;
  12329. var enabledHydration = false;
  12330. function ensureRenderer() {
  12331. return renderer || (renderer = createRenderer(rendererOptions));
  12332. }
  12333. function ensureHydrationRenderer() {
  12334. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  12335. enabledHydration = true;
  12336. return renderer;
  12337. }
  12338. var render = ((...args) => {
  12339. ensureRenderer().render(...args);
  12340. });
  12341. var hydrate = ((...args) => {
  12342. ensureHydrationRenderer().hydrate(...args);
  12343. });
  12344. var createApp = ((...args) => {
  12345. const app = ensureRenderer().createApp(...args);
  12346. if (true) {
  12347. injectNativeTagCheck(app);
  12348. injectCompilerOptionsCheck(app);
  12349. }
  12350. const { mount } = app;
  12351. app.mount = (containerOrSelector) => {
  12352. const container = normalizeContainer(containerOrSelector);
  12353. if (!container) return;
  12354. const component = app._component;
  12355. if (!isFunction(component) && !component.render && !component.template) {
  12356. component.template = container.innerHTML;
  12357. }
  12358. if (container.nodeType === 1) {
  12359. container.textContent = "";
  12360. }
  12361. const proxy = mount(container, false, resolveRootNamespace(container));
  12362. if (container instanceof Element) {
  12363. container.removeAttribute("v-cloak");
  12364. container.setAttribute("data-v-app", "");
  12365. }
  12366. return proxy;
  12367. };
  12368. return app;
  12369. });
  12370. var createSSRApp = ((...args) => {
  12371. const app = ensureHydrationRenderer().createApp(...args);
  12372. if (true) {
  12373. injectNativeTagCheck(app);
  12374. injectCompilerOptionsCheck(app);
  12375. }
  12376. const { mount } = app;
  12377. app.mount = (containerOrSelector) => {
  12378. const container = normalizeContainer(containerOrSelector);
  12379. if (container) {
  12380. return mount(container, true, resolveRootNamespace(container));
  12381. }
  12382. };
  12383. return app;
  12384. });
  12385. function resolveRootNamespace(container) {
  12386. if (container instanceof SVGElement) {
  12387. return "svg";
  12388. }
  12389. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  12390. return "mathml";
  12391. }
  12392. }
  12393. function injectNativeTagCheck(app) {
  12394. Object.defineProperty(app.config, "isNativeTag", {
  12395. value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
  12396. writable: false
  12397. });
  12398. }
  12399. function injectCompilerOptionsCheck(app) {
  12400. if (isRuntimeOnly()) {
  12401. const isCustomElement = app.config.isCustomElement;
  12402. Object.defineProperty(app.config, "isCustomElement", {
  12403. get() {
  12404. return isCustomElement;
  12405. },
  12406. set() {
  12407. warn2(
  12408. `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
  12409. );
  12410. }
  12411. });
  12412. const compilerOptions = app.config.compilerOptions;
  12413. 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.
  12414. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  12415. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  12416. - 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`;
  12417. Object.defineProperty(app.config, "compilerOptions", {
  12418. get() {
  12419. warn2(msg);
  12420. return compilerOptions;
  12421. },
  12422. set() {
  12423. warn2(msg);
  12424. }
  12425. });
  12426. }
  12427. }
  12428. function normalizeContainer(container) {
  12429. if (isString(container)) {
  12430. const res = document.querySelector(container);
  12431. if (!res) {
  12432. warn2(
  12433. `Failed to mount app: mount target selector "${container}" returned null.`
  12434. );
  12435. }
  12436. return res;
  12437. }
  12438. if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
  12439. warn2(
  12440. `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
  12441. );
  12442. }
  12443. return container;
  12444. }
  12445. var ssrDirectiveInitialized = false;
  12446. var initDirectivesForSSR = () => {
  12447. if (!ssrDirectiveInitialized) {
  12448. ssrDirectiveInitialized = true;
  12449. initVModelForSSR();
  12450. initVShowForSSR();
  12451. }
  12452. };
  12453. // node_modules/vue/dist/vue.runtime.esm-bundler.js
  12454. function initDev() {
  12455. {
  12456. initCustomFormatter();
  12457. }
  12458. }
  12459. if (true) {
  12460. initDev();
  12461. }
  12462. var compile2 = () => {
  12463. if (true) {
  12464. warn2(
  12465. `Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  12466. );
  12467. }
  12468. };
  12469. export {
  12470. camelize,
  12471. capitalize,
  12472. toHandlerKey,
  12473. normalizeStyle,
  12474. normalizeClass,
  12475. normalizeProps,
  12476. toDisplayString,
  12477. EffectScope,
  12478. effectScope,
  12479. getCurrentScope,
  12480. onScopeDispose,
  12481. ReactiveEffect,
  12482. effect,
  12483. stop,
  12484. reactive,
  12485. shallowReactive,
  12486. readonly,
  12487. shallowReadonly,
  12488. isReactive,
  12489. isReadonly,
  12490. isShallow,
  12491. isProxy,
  12492. toRaw,
  12493. markRaw,
  12494. isRef2 as isRef,
  12495. ref,
  12496. shallowRef,
  12497. triggerRef,
  12498. unref,
  12499. toValue,
  12500. proxyRefs,
  12501. customRef,
  12502. toRefs,
  12503. toRef,
  12504. TrackOpTypes,
  12505. TriggerOpTypes,
  12506. getCurrentWatcher,
  12507. onWatcherCleanup,
  12508. assertNumber,
  12509. ErrorCodes,
  12510. callWithErrorHandling,
  12511. callWithAsyncErrorHandling,
  12512. handleError,
  12513. nextTick,
  12514. queuePostFlushCb,
  12515. pushScopeId,
  12516. popScopeId,
  12517. withScopeId,
  12518. withCtx,
  12519. withDirectives,
  12520. Teleport,
  12521. useTransitionState,
  12522. BaseTransitionPropsValidators,
  12523. BaseTransition,
  12524. resolveTransitionHooks,
  12525. setTransitionHooks,
  12526. getTransitionRawChildren,
  12527. defineComponent,
  12528. useId,
  12529. useTemplateRef,
  12530. hydrateOnIdle,
  12531. hydrateOnVisible,
  12532. hydrateOnMediaQuery,
  12533. hydrateOnInteraction,
  12534. defineAsyncComponent,
  12535. KeepAlive,
  12536. onActivated,
  12537. onDeactivated,
  12538. onBeforeMount,
  12539. onMounted,
  12540. onBeforeUpdate,
  12541. onUpdated,
  12542. onBeforeUnmount,
  12543. onUnmounted,
  12544. onServerPrefetch,
  12545. onRenderTriggered,
  12546. onRenderTracked,
  12547. onErrorCaptured,
  12548. resolveComponent,
  12549. resolveDynamicComponent,
  12550. resolveDirective,
  12551. renderList,
  12552. createSlots,
  12553. renderSlot,
  12554. toHandlers,
  12555. defineProps,
  12556. defineEmits,
  12557. defineExpose,
  12558. defineOptions,
  12559. defineSlots,
  12560. defineModel,
  12561. withDefaults,
  12562. useSlots,
  12563. useAttrs,
  12564. mergeDefaults,
  12565. mergeModels,
  12566. createPropsRestProxy,
  12567. withAsyncContext,
  12568. provide,
  12569. inject,
  12570. hasInjectionContext,
  12571. createRenderer,
  12572. createHydrationRenderer,
  12573. ssrContextKey,
  12574. useSSRContext,
  12575. watchEffect,
  12576. watchPostEffect,
  12577. watchSyncEffect,
  12578. watch2 as watch,
  12579. useModel,
  12580. Suspense,
  12581. Fragment,
  12582. Text,
  12583. Comment,
  12584. Static,
  12585. openBlock,
  12586. setBlockTracking,
  12587. createElementBlock,
  12588. createBlock,
  12589. isVNode,
  12590. transformVNodeArgs,
  12591. createBaseVNode,
  12592. createVNode,
  12593. guardReactiveProps,
  12594. cloneVNode,
  12595. createTextVNode,
  12596. createStaticVNode,
  12597. createCommentVNode,
  12598. mergeProps,
  12599. getCurrentInstance,
  12600. registerRuntimeCompiler,
  12601. isRuntimeOnly,
  12602. computed2 as computed,
  12603. h,
  12604. initCustomFormatter,
  12605. withMemo,
  12606. isMemoSame,
  12607. version,
  12608. warn2 as warn,
  12609. ErrorTypeStrings,
  12610. devtools,
  12611. setDevtoolsHook,
  12612. ssrUtils,
  12613. resolveFilter,
  12614. compatUtils,
  12615. DeprecationTypes,
  12616. Transition,
  12617. vShow,
  12618. useCssVars,
  12619. defineCustomElement,
  12620. defineSSRCustomElement,
  12621. VueElement,
  12622. useHost,
  12623. useShadowRoot,
  12624. useCssModule,
  12625. TransitionGroup,
  12626. vModelText,
  12627. vModelCheckbox,
  12628. vModelRadio,
  12629. vModelSelect,
  12630. vModelDynamic,
  12631. withModifiers,
  12632. withKeys,
  12633. render,
  12634. hydrate,
  12635. createApp,
  12636. createSSRApp,
  12637. initDirectivesForSSR,
  12638. compile2 as compile
  12639. };
  12640. /*! Bundled license information:
  12641. @vue/shared/dist/shared.esm-bundler.js:
  12642. (**
  12643. * @vue/shared v3.5.21
  12644. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12645. * @license MIT
  12646. **)
  12647. @vue/reactivity/dist/reactivity.esm-bundler.js:
  12648. (**
  12649. * @vue/reactivity v3.5.21
  12650. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12651. * @license MIT
  12652. **)
  12653. @vue/runtime-core/dist/runtime-core.esm-bundler.js:
  12654. (**
  12655. * @vue/runtime-core v3.5.21
  12656. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12657. * @license MIT
  12658. **)
  12659. @vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
  12660. (**
  12661. * @vue/runtime-dom v3.5.21
  12662. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12663. * @license MIT
  12664. **)
  12665. vue/dist/vue.runtime.esm-bundler.js:
  12666. (**
  12667. * vue v3.5.21
  12668. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12669. * @license MIT
  12670. **)
  12671. */
  12672. //# sourceMappingURL=chunk-4EPKHDIW.js.map