vue.js 308 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434
  1. //#region node_modules/@vue/shared/dist/shared.esm-bundler.js
  2. /**
  3. * @vue/shared v3.5.27
  4. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  5. * @license MIT
  6. **/
  7. /* @__NO_SIDE_EFFECTS__ */
  8. function makeMap(str) {
  9. const map$1 = /* @__PURE__ */ Object.create(null);
  10. for (const key of str.split(",")) map$1[key] = 1;
  11. return (val) => val in map$1;
  12. }
  13. var EMPTY_OBJ = Object.freeze({});
  14. var EMPTY_ARR = Object.freeze([]);
  15. var NOOP = () => {};
  16. var NO = () => false;
  17. var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  18. var isModelListener = (key) => key.startsWith("onUpdate:");
  19. var extend = Object.assign;
  20. var remove = (arr, el) => {
  21. const i = arr.indexOf(el);
  22. if (i > -1) arr.splice(i, 1);
  23. };
  24. var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  25. var hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  26. var isArray = Array.isArray;
  27. var isMap = (val) => toTypeString(val) === "[object Map]";
  28. var isSet = (val) => toTypeString(val) === "[object Set]";
  29. var isDate = (val) => toTypeString(val) === "[object Date]";
  30. var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  31. var isFunction = (val) => typeof val === "function";
  32. var isString = (val) => typeof val === "string";
  33. var isSymbol = (val) => typeof val === "symbol";
  34. var isObject = (val) => val !== null && typeof val === "object";
  35. var isPromise = (val) => {
  36. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  37. };
  38. var objectToString = Object.prototype.toString;
  39. var toTypeString = (value) => objectToString.call(value);
  40. var toRawType = (value) => {
  41. return toTypeString(value).slice(8, -1);
  42. };
  43. var isPlainObject = (val) => toTypeString(val) === "[object Object]";
  44. var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  45. var isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
  46. var isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
  47. var cacheStringFunction = (fn) => {
  48. const cache = /* @__PURE__ */ Object.create(null);
  49. return ((str) => {
  50. return cache[str] || (cache[str] = fn(str));
  51. });
  52. };
  53. var camelizeRE = /-\w/g;
  54. var camelize = cacheStringFunction((str) => {
  55. return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
  56. });
  57. var hyphenateRE = /\B([A-Z])/g;
  58. var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
  59. var capitalize = cacheStringFunction((str) => {
  60. return str.charAt(0).toUpperCase() + str.slice(1);
  61. });
  62. var toHandlerKey = cacheStringFunction((str) => {
  63. return str ? `on${capitalize(str)}` : ``;
  64. });
  65. var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  66. var invokeArrayFns = (fns, ...arg) => {
  67. for (let i = 0; i < fns.length; i++) fns[i](...arg);
  68. };
  69. var def = (obj, key, value, writable = false) => {
  70. Object.defineProperty(obj, key, {
  71. configurable: true,
  72. enumerable: false,
  73. writable,
  74. value
  75. });
  76. };
  77. var looseToNumber = (val) => {
  78. const n = parseFloat(val);
  79. return isNaN(n) ? val : n;
  80. };
  81. var toNumber = (val) => {
  82. const n = isString(val) ? Number(val) : NaN;
  83. return isNaN(n) ? val : n;
  84. };
  85. var _globalThis;
  86. var getGlobalThis = () => {
  87. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  88. };
  89. var isGloballyAllowed = /* @__PURE__ */ makeMap("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");
  90. function normalizeStyle(value) {
  91. if (isArray(value)) {
  92. const res = {};
  93. for (let i = 0; i < value.length; i++) {
  94. const item = value[i];
  95. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  96. if (normalized) for (const key in normalized) res[key] = normalized[key];
  97. }
  98. return res;
  99. } else if (isString(value) || isObject(value)) return value;
  100. }
  101. var listDelimiterRE = /;(?![^(]*\))/g;
  102. var propertyDelimiterRE = /:([^]+)/;
  103. var styleCommentRE = /\/\*[^]*?\*\//g;
  104. function parseStringStyle(cssText) {
  105. const ret = {};
  106. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  107. if (item) {
  108. const tmp = item.split(propertyDelimiterRE);
  109. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  110. }
  111. });
  112. return ret;
  113. }
  114. function stringifyStyle(styles) {
  115. if (!styles) return "";
  116. if (isString(styles)) return styles;
  117. let ret = "";
  118. for (const key in styles) {
  119. const value = styles[key];
  120. if (isString(value) || typeof value === "number") {
  121. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  122. ret += `${normalizedKey}:${value};`;
  123. }
  124. }
  125. return ret;
  126. }
  127. function normalizeClass(value) {
  128. let res = "";
  129. if (isString(value)) res = value;
  130. else if (isArray(value)) for (let i = 0; i < value.length; i++) {
  131. const normalized = normalizeClass(value[i]);
  132. if (normalized) res += normalized + " ";
  133. }
  134. else if (isObject(value)) {
  135. for (const name in value) if (value[name]) res += name + " ";
  136. }
  137. return res.trim();
  138. }
  139. function normalizeProps(props) {
  140. if (!props) return null;
  141. let { class: klass, style } = props;
  142. if (klass && !isString(klass)) props.class = normalizeClass(klass);
  143. if (style) props.style = normalizeStyle(style);
  144. return props;
  145. }
  146. 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";
  147. 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";
  148. 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";
  149. var isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
  150. var isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
  151. var isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
  152. var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  153. var isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
  154. var isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
  155. function includeBooleanAttr(value) {
  156. return !!value || value === "";
  157. }
  158. var isKnownHtmlAttr = /* @__PURE__ */ makeMap(`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`);
  159. var isKnownSvgAttr = /* @__PURE__ */ makeMap(`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`);
  160. function isRenderableAttrValue(value) {
  161. if (value == null) return false;
  162. const type = typeof value;
  163. return type === "string" || type === "number" || type === "boolean";
  164. }
  165. var cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
  166. function getEscapedCssVarName(key, doubleEscape) {
  167. return key.replace(cssVarNameEscapeSymbolsRE, (s) => doubleEscape ? s === "\"" ? "\\\\\\\"" : `\\\\${s}` : `\\${s}`);
  168. }
  169. function looseCompareArrays(a, b) {
  170. if (a.length !== b.length) return false;
  171. let equal = true;
  172. for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
  173. return equal;
  174. }
  175. function looseEqual(a, b) {
  176. if (a === b) return true;
  177. let aValidType = isDate(a);
  178. let bValidType = isDate(b);
  179. if (aValidType || bValidType) return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  180. aValidType = isSymbol(a);
  181. bValidType = isSymbol(b);
  182. if (aValidType || bValidType) return a === b;
  183. aValidType = isArray(a);
  184. bValidType = isArray(b);
  185. if (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  186. aValidType = isObject(a);
  187. bValidType = isObject(b);
  188. if (aValidType || bValidType) {
  189. if (!aValidType || !bValidType) return false;
  190. if (Object.keys(a).length !== Object.keys(b).length) return false;
  191. for (const key in a) {
  192. const aHasKey = a.hasOwnProperty(key);
  193. const bHasKey = b.hasOwnProperty(key);
  194. if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
  195. }
  196. }
  197. return String(a) === String(b);
  198. }
  199. function looseIndexOf(arr, val) {
  200. return arr.findIndex((item) => looseEqual(item, val));
  201. }
  202. var isRef$1 = (val) => {
  203. return !!(val && val["__v_isRef"] === true);
  204. };
  205. var toDisplayString = (val) => {
  206. return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
  207. };
  208. var replacer = (_key, val) => {
  209. if (isRef$1(val)) return replacer(_key, val.value);
  210. else if (isMap(val)) return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2], i) => {
  211. entries[stringifySymbol(key, i) + " =>"] = val2;
  212. return entries;
  213. }, {}) };
  214. else if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) };
  215. else if (isSymbol(val)) return stringifySymbol(val);
  216. else if (isObject(val) && !isArray(val) && !isPlainObject(val)) return String(val);
  217. return val;
  218. };
  219. var stringifySymbol = (v, i = "") => {
  220. var _a;
  221. return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
  222. };
  223. function normalizeCssVarValue(value) {
  224. if (value == null) return "initial";
  225. if (typeof value === "string") return value === "" ? " " : value;
  226. if (typeof value !== "number" || !Number.isFinite(value)) console.warn("[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:", value);
  227. return String(value);
  228. }
  229. //#endregion
  230. //#region node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  231. /**
  232. * @vue/reactivity v3.5.27
  233. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  234. * @license MIT
  235. **/
  236. function warn$2(msg, ...args) {
  237. console.warn(`[Vue warn] ${msg}`, ...args);
  238. }
  239. var activeEffectScope;
  240. var EffectScope = class {
  241. constructor(detached = false) {
  242. this.detached = detached;
  243. /**
  244. * @internal
  245. */
  246. this._active = true;
  247. /**
  248. * @internal track `on` calls, allow `on` call multiple times
  249. */
  250. this._on = 0;
  251. /**
  252. * @internal
  253. */
  254. this.effects = [];
  255. /**
  256. * @internal
  257. */
  258. this.cleanups = [];
  259. this._isPaused = false;
  260. this.parent = activeEffectScope;
  261. if (!detached && activeEffectScope) this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
  262. }
  263. get active() {
  264. return this._active;
  265. }
  266. pause() {
  267. if (this._active) {
  268. this._isPaused = true;
  269. let i, l;
  270. if (this.scopes) for (i = 0, l = this.scopes.length; i < l; i++) this.scopes[i].pause();
  271. for (i = 0, l = this.effects.length; i < l; i++) this.effects[i].pause();
  272. }
  273. }
  274. /**
  275. * Resumes the effect scope, including all child scopes and effects.
  276. */
  277. resume() {
  278. if (this._active) {
  279. if (this._isPaused) {
  280. this._isPaused = false;
  281. let i, l;
  282. if (this.scopes) for (i = 0, l = this.scopes.length; i < l; i++) this.scopes[i].resume();
  283. for (i = 0, l = this.effects.length; i < l; i++) this.effects[i].resume();
  284. }
  285. }
  286. }
  287. run(fn) {
  288. if (this._active) {
  289. const currentEffectScope = activeEffectScope;
  290. try {
  291. activeEffectScope = this;
  292. return fn();
  293. } finally {
  294. activeEffectScope = currentEffectScope;
  295. }
  296. } else warn$2(`cannot run an inactive effect scope.`);
  297. }
  298. /**
  299. * This should only be called on non-detached scopes
  300. * @internal
  301. */
  302. on() {
  303. if (++this._on === 1) {
  304. this.prevScope = activeEffectScope;
  305. activeEffectScope = this;
  306. }
  307. }
  308. /**
  309. * This should only be called on non-detached scopes
  310. * @internal
  311. */
  312. off() {
  313. if (this._on > 0 && --this._on === 0) {
  314. activeEffectScope = this.prevScope;
  315. this.prevScope = void 0;
  316. }
  317. }
  318. stop(fromParent) {
  319. if (this._active) {
  320. this._active = false;
  321. let i, l;
  322. for (i = 0, l = this.effects.length; i < l; i++) this.effects[i].stop();
  323. this.effects.length = 0;
  324. for (i = 0, l = this.cleanups.length; i < l; i++) this.cleanups[i]();
  325. this.cleanups.length = 0;
  326. if (this.scopes) {
  327. for (i = 0, l = this.scopes.length; i < l; i++) this.scopes[i].stop(true);
  328. this.scopes.length = 0;
  329. }
  330. if (!this.detached && this.parent && !fromParent) {
  331. const last = this.parent.scopes.pop();
  332. if (last && last !== this) {
  333. this.parent.scopes[this.index] = last;
  334. last.index = this.index;
  335. }
  336. }
  337. this.parent = void 0;
  338. }
  339. }
  340. };
  341. function effectScope(detached) {
  342. return new EffectScope(detached);
  343. }
  344. function getCurrentScope() {
  345. return activeEffectScope;
  346. }
  347. function onScopeDispose(fn, failSilently = false) {
  348. if (activeEffectScope) activeEffectScope.cleanups.push(fn);
  349. else if (!failSilently) warn$2(`onScopeDispose() is called when there is no active effect scope to be associated with.`);
  350. }
  351. var activeSub;
  352. var pausedQueueEffects = /* @__PURE__ */ new WeakSet();
  353. var ReactiveEffect = class {
  354. constructor(fn) {
  355. this.fn = fn;
  356. /**
  357. * @internal
  358. */
  359. this.deps = void 0;
  360. /**
  361. * @internal
  362. */
  363. this.depsTail = void 0;
  364. /**
  365. * @internal
  366. */
  367. this.flags = 5;
  368. /**
  369. * @internal
  370. */
  371. this.next = void 0;
  372. /**
  373. * @internal
  374. */
  375. this.cleanup = void 0;
  376. this.scheduler = void 0;
  377. if (activeEffectScope && activeEffectScope.active) activeEffectScope.effects.push(this);
  378. }
  379. pause() {
  380. this.flags |= 64;
  381. }
  382. resume() {
  383. if (this.flags & 64) {
  384. this.flags &= -65;
  385. if (pausedQueueEffects.has(this)) {
  386. pausedQueueEffects.delete(this);
  387. this.trigger();
  388. }
  389. }
  390. }
  391. /**
  392. * @internal
  393. */
  394. notify() {
  395. if (this.flags & 2 && !(this.flags & 32)) return;
  396. if (!(this.flags & 8)) batch(this);
  397. }
  398. run() {
  399. if (!(this.flags & 1)) return this.fn();
  400. this.flags |= 2;
  401. cleanupEffect(this);
  402. prepareDeps(this);
  403. const prevEffect = activeSub;
  404. const prevShouldTrack = shouldTrack;
  405. activeSub = this;
  406. shouldTrack = true;
  407. try {
  408. return this.fn();
  409. } finally {
  410. if (activeSub !== this) warn$2("Active effect was not restored correctly - this is likely a Vue internal bug.");
  411. cleanupDeps(this);
  412. activeSub = prevEffect;
  413. shouldTrack = prevShouldTrack;
  414. this.flags &= -3;
  415. }
  416. }
  417. stop() {
  418. if (this.flags & 1) {
  419. for (let link = this.deps; link; link = link.nextDep) removeSub(link);
  420. this.deps = this.depsTail = void 0;
  421. cleanupEffect(this);
  422. this.onStop && this.onStop();
  423. this.flags &= -2;
  424. }
  425. }
  426. trigger() {
  427. if (this.flags & 64) pausedQueueEffects.add(this);
  428. else if (this.scheduler) this.scheduler();
  429. else this.runIfDirty();
  430. }
  431. /**
  432. * @internal
  433. */
  434. runIfDirty() {
  435. if (isDirty(this)) this.run();
  436. }
  437. get dirty() {
  438. return isDirty(this);
  439. }
  440. };
  441. var batchDepth = 0;
  442. var batchedSub;
  443. var batchedComputed;
  444. function batch(sub, isComputed = false) {
  445. sub.flags |= 8;
  446. if (isComputed) {
  447. sub.next = batchedComputed;
  448. batchedComputed = sub;
  449. return;
  450. }
  451. sub.next = batchedSub;
  452. batchedSub = sub;
  453. }
  454. function startBatch() {
  455. batchDepth++;
  456. }
  457. function endBatch() {
  458. if (--batchDepth > 0) return;
  459. if (batchedComputed) {
  460. let e = batchedComputed;
  461. batchedComputed = void 0;
  462. while (e) {
  463. const next = e.next;
  464. e.next = void 0;
  465. e.flags &= -9;
  466. e = next;
  467. }
  468. }
  469. let error;
  470. while (batchedSub) {
  471. let e = batchedSub;
  472. batchedSub = void 0;
  473. while (e) {
  474. const next = e.next;
  475. e.next = void 0;
  476. e.flags &= -9;
  477. if (e.flags & 1) try {
  478. e.trigger();
  479. } catch (err) {
  480. if (!error) error = err;
  481. }
  482. e = next;
  483. }
  484. }
  485. if (error) throw error;
  486. }
  487. function prepareDeps(sub) {
  488. for (let link = sub.deps; link; link = link.nextDep) {
  489. link.version = -1;
  490. link.prevActiveLink = link.dep.activeLink;
  491. link.dep.activeLink = link;
  492. }
  493. }
  494. function cleanupDeps(sub) {
  495. let head;
  496. let tail = sub.depsTail;
  497. let link = tail;
  498. while (link) {
  499. const prev = link.prevDep;
  500. if (link.version === -1) {
  501. if (link === tail) tail = prev;
  502. removeSub(link);
  503. removeDep(link);
  504. } else head = link;
  505. link.dep.activeLink = link.prevActiveLink;
  506. link.prevActiveLink = void 0;
  507. link = prev;
  508. }
  509. sub.deps = head;
  510. sub.depsTail = tail;
  511. }
  512. function isDirty(sub) {
  513. for (let link = sub.deps; link; link = link.nextDep) if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) return true;
  514. if (sub._dirty) return true;
  515. return false;
  516. }
  517. function refreshComputed(computed$2) {
  518. if (computed$2.flags & 4 && !(computed$2.flags & 16)) return;
  519. computed$2.flags &= -17;
  520. if (computed$2.globalVersion === globalVersion) return;
  521. computed$2.globalVersion = globalVersion;
  522. if (!computed$2.isSSR && computed$2.flags & 128 && (!computed$2.deps && !computed$2._dirty || !isDirty(computed$2))) return;
  523. computed$2.flags |= 2;
  524. const dep = computed$2.dep;
  525. const prevSub = activeSub;
  526. const prevShouldTrack = shouldTrack;
  527. activeSub = computed$2;
  528. shouldTrack = true;
  529. try {
  530. prepareDeps(computed$2);
  531. const value = computed$2.fn(computed$2._value);
  532. if (dep.version === 0 || hasChanged(value, computed$2._value)) {
  533. computed$2.flags |= 128;
  534. computed$2._value = value;
  535. dep.version++;
  536. }
  537. } catch (err) {
  538. dep.version++;
  539. throw err;
  540. } finally {
  541. activeSub = prevSub;
  542. shouldTrack = prevShouldTrack;
  543. cleanupDeps(computed$2);
  544. computed$2.flags &= -3;
  545. }
  546. }
  547. function removeSub(link, soft = false) {
  548. const { dep, prevSub, nextSub } = link;
  549. if (prevSub) {
  550. prevSub.nextSub = nextSub;
  551. link.prevSub = void 0;
  552. }
  553. if (nextSub) {
  554. nextSub.prevSub = prevSub;
  555. link.nextSub = void 0;
  556. }
  557. if (dep.subsHead === link) dep.subsHead = nextSub;
  558. if (dep.subs === link) {
  559. dep.subs = prevSub;
  560. if (!prevSub && dep.computed) {
  561. dep.computed.flags &= -5;
  562. for (let l = dep.computed.deps; l; l = l.nextDep) removeSub(l, true);
  563. }
  564. }
  565. if (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);
  566. }
  567. function removeDep(link) {
  568. const { prevDep, nextDep } = link;
  569. if (prevDep) {
  570. prevDep.nextDep = nextDep;
  571. link.prevDep = void 0;
  572. }
  573. if (nextDep) {
  574. nextDep.prevDep = prevDep;
  575. link.nextDep = void 0;
  576. }
  577. }
  578. function effect(fn, options) {
  579. if (fn.effect instanceof ReactiveEffect) fn = fn.effect.fn;
  580. const e = new ReactiveEffect(fn);
  581. if (options) extend(e, options);
  582. try {
  583. e.run();
  584. } catch (err) {
  585. e.stop();
  586. throw err;
  587. }
  588. const runner = e.run.bind(e);
  589. runner.effect = e;
  590. return runner;
  591. }
  592. function stop(runner) {
  593. runner.effect.stop();
  594. }
  595. var shouldTrack = true;
  596. var trackStack = [];
  597. function pauseTracking() {
  598. trackStack.push(shouldTrack);
  599. shouldTrack = false;
  600. }
  601. function resetTracking() {
  602. const last = trackStack.pop();
  603. shouldTrack = last === void 0 ? true : last;
  604. }
  605. function cleanupEffect(e) {
  606. const { cleanup } = e;
  607. e.cleanup = void 0;
  608. if (cleanup) {
  609. const prevSub = activeSub;
  610. activeSub = void 0;
  611. try {
  612. cleanup();
  613. } finally {
  614. activeSub = prevSub;
  615. }
  616. }
  617. }
  618. var globalVersion = 0;
  619. var Link = class {
  620. constructor(sub, dep) {
  621. this.sub = sub;
  622. this.dep = dep;
  623. this.version = dep.version;
  624. this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  625. }
  626. };
  627. var Dep = class {
  628. constructor(computed$2) {
  629. this.computed = computed$2;
  630. this.version = 0;
  631. /**
  632. * Link between this dep and the current active effect
  633. */
  634. this.activeLink = void 0;
  635. /**
  636. * Doubly linked list representing the subscribing effects (tail)
  637. */
  638. this.subs = void 0;
  639. /**
  640. * For object property deps cleanup
  641. */
  642. this.map = void 0;
  643. this.key = void 0;
  644. /**
  645. * Subscriber counter
  646. */
  647. this.sc = 0;
  648. /**
  649. * @internal
  650. */
  651. this.__v_skip = true;
  652. this.subsHead = void 0;
  653. }
  654. track(debugInfo) {
  655. if (!activeSub || !shouldTrack || activeSub === this.computed) return;
  656. let link = this.activeLink;
  657. if (link === void 0 || link.sub !== activeSub) {
  658. link = this.activeLink = new Link(activeSub, this);
  659. if (!activeSub.deps) activeSub.deps = activeSub.depsTail = link;
  660. else {
  661. link.prevDep = activeSub.depsTail;
  662. activeSub.depsTail.nextDep = link;
  663. activeSub.depsTail = link;
  664. }
  665. addSub(link);
  666. } else if (link.version === -1) {
  667. link.version = this.version;
  668. if (link.nextDep) {
  669. const next = link.nextDep;
  670. next.prevDep = link.prevDep;
  671. if (link.prevDep) link.prevDep.nextDep = next;
  672. link.prevDep = activeSub.depsTail;
  673. link.nextDep = void 0;
  674. activeSub.depsTail.nextDep = link;
  675. activeSub.depsTail = link;
  676. if (activeSub.deps === link) activeSub.deps = next;
  677. }
  678. }
  679. if (activeSub.onTrack) activeSub.onTrack(extend({ effect: activeSub }, debugInfo));
  680. return link;
  681. }
  682. trigger(debugInfo) {
  683. this.version++;
  684. globalVersion++;
  685. this.notify(debugInfo);
  686. }
  687. notify(debugInfo) {
  688. startBatch();
  689. try {
  690. for (let head = this.subsHead; head; head = head.nextSub) if (head.sub.onTrigger && !(head.sub.flags & 8)) head.sub.onTrigger(extend({ effect: head.sub }, debugInfo));
  691. for (let link = this.subs; link; link = link.prevSub) if (link.sub.notify()) link.sub.dep.notify();
  692. } finally {
  693. endBatch();
  694. }
  695. }
  696. };
  697. function addSub(link) {
  698. link.dep.sc++;
  699. if (link.sub.flags & 4) {
  700. const computed$2 = link.dep.computed;
  701. if (computed$2 && !link.dep.subs) {
  702. computed$2.flags |= 20;
  703. for (let l = computed$2.deps; l; l = l.nextDep) addSub(l);
  704. }
  705. const currentTail = link.dep.subs;
  706. if (currentTail !== link) {
  707. link.prevSub = currentTail;
  708. if (currentTail) currentTail.nextSub = link;
  709. }
  710. if (link.dep.subsHead === void 0) link.dep.subsHead = link;
  711. link.dep.subs = link;
  712. }
  713. }
  714. var targetMap = /* @__PURE__ */ new WeakMap();
  715. var ITERATE_KEY = /* @__PURE__ */ Symbol("Object iterate");
  716. var MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol("Map keys iterate");
  717. var ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol("Array iterate");
  718. function track(target, type, key) {
  719. if (shouldTrack && activeSub) {
  720. let depsMap = targetMap.get(target);
  721. if (!depsMap) targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  722. let dep = depsMap.get(key);
  723. if (!dep) {
  724. depsMap.set(key, dep = new Dep());
  725. dep.map = depsMap;
  726. dep.key = key;
  727. }
  728. dep.track({
  729. target,
  730. type,
  731. key
  732. });
  733. }
  734. }
  735. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  736. const depsMap = targetMap.get(target);
  737. if (!depsMap) {
  738. globalVersion++;
  739. return;
  740. }
  741. const run = (dep) => {
  742. if (dep) dep.trigger({
  743. target,
  744. type,
  745. key,
  746. newValue,
  747. oldValue,
  748. oldTarget
  749. });
  750. };
  751. startBatch();
  752. if (type === "clear") depsMap.forEach(run);
  753. else {
  754. const targetIsArray = isArray(target);
  755. const isArrayIndex = targetIsArray && isIntegerKey(key);
  756. if (targetIsArray && key === "length") {
  757. const newLength = Number(newValue);
  758. depsMap.forEach((dep, key2) => {
  759. if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) run(dep);
  760. });
  761. } else {
  762. if (key !== void 0 || depsMap.has(void 0)) run(depsMap.get(key));
  763. if (isArrayIndex) run(depsMap.get(ARRAY_ITERATE_KEY));
  764. switch (type) {
  765. case "add":
  766. if (!targetIsArray) {
  767. run(depsMap.get(ITERATE_KEY));
  768. if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
  769. } else if (isArrayIndex) run(depsMap.get("length"));
  770. break;
  771. case "delete":
  772. if (!targetIsArray) {
  773. run(depsMap.get(ITERATE_KEY));
  774. if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
  775. }
  776. break;
  777. case "set":
  778. if (isMap(target)) run(depsMap.get(ITERATE_KEY));
  779. break;
  780. }
  781. }
  782. }
  783. endBatch();
  784. }
  785. function getDepFromReactive(object, key) {
  786. const depMap = targetMap.get(object);
  787. return depMap && depMap.get(key);
  788. }
  789. function reactiveReadArray(array) {
  790. const raw = /* @__PURE__ */ toRaw(array);
  791. if (raw === array) return raw;
  792. track(raw, "iterate", ARRAY_ITERATE_KEY);
  793. return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
  794. }
  795. function shallowReadArray(arr) {
  796. track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
  797. return arr;
  798. }
  799. function toWrapped(target, item) {
  800. if (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
  801. return toReactive(item);
  802. }
  803. var arrayInstrumentations = {
  804. __proto__: null,
  805. [Symbol.iterator]() {
  806. return iterator(this, Symbol.iterator, (item) => toWrapped(this, item));
  807. },
  808. concat(...args) {
  809. return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
  810. },
  811. entries() {
  812. return iterator(this, "entries", (value) => {
  813. value[1] = toWrapped(this, value[1]);
  814. return value;
  815. });
  816. },
  817. every(fn, thisArg) {
  818. return apply(this, "every", fn, thisArg, void 0, arguments);
  819. },
  820. filter(fn, thisArg) {
  821. return apply(this, "filter", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);
  822. },
  823. find(fn, thisArg) {
  824. return apply(this, "find", fn, thisArg, (item) => toWrapped(this, item), arguments);
  825. },
  826. findIndex(fn, thisArg) {
  827. return apply(this, "findIndex", fn, thisArg, void 0, arguments);
  828. },
  829. findLast(fn, thisArg) {
  830. return apply(this, "findLast", fn, thisArg, (item) => toWrapped(this, item), arguments);
  831. },
  832. findLastIndex(fn, thisArg) {
  833. return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
  834. },
  835. forEach(fn, thisArg) {
  836. return apply(this, "forEach", fn, thisArg, void 0, arguments);
  837. },
  838. includes(...args) {
  839. return searchProxy(this, "includes", args);
  840. },
  841. indexOf(...args) {
  842. return searchProxy(this, "indexOf", args);
  843. },
  844. join(separator) {
  845. return reactiveReadArray(this).join(separator);
  846. },
  847. lastIndexOf(...args) {
  848. return searchProxy(this, "lastIndexOf", args);
  849. },
  850. map(fn, thisArg) {
  851. return apply(this, "map", fn, thisArg, void 0, arguments);
  852. },
  853. pop() {
  854. return noTracking(this, "pop");
  855. },
  856. push(...args) {
  857. return noTracking(this, "push", args);
  858. },
  859. reduce(fn, ...args) {
  860. return reduce(this, "reduce", fn, args);
  861. },
  862. reduceRight(fn, ...args) {
  863. return reduce(this, "reduceRight", fn, args);
  864. },
  865. shift() {
  866. return noTracking(this, "shift");
  867. },
  868. some(fn, thisArg) {
  869. return apply(this, "some", fn, thisArg, void 0, arguments);
  870. },
  871. splice(...args) {
  872. return noTracking(this, "splice", args);
  873. },
  874. toReversed() {
  875. return reactiveReadArray(this).toReversed();
  876. },
  877. toSorted(comparer) {
  878. return reactiveReadArray(this).toSorted(comparer);
  879. },
  880. toSpliced(...args) {
  881. return reactiveReadArray(this).toSpliced(...args);
  882. },
  883. unshift(...args) {
  884. return noTracking(this, "unshift", args);
  885. },
  886. values() {
  887. return iterator(this, "values", (item) => toWrapped(this, item));
  888. }
  889. };
  890. function iterator(self$1, method, wrapValue) {
  891. const arr = shallowReadArray(self$1);
  892. const iter = arr[method]();
  893. if (arr !== self$1 && !/* @__PURE__ */ isShallow(self$1)) {
  894. iter._next = iter.next;
  895. iter.next = () => {
  896. const result = iter._next();
  897. if (!result.done) result.value = wrapValue(result.value);
  898. return result;
  899. };
  900. }
  901. return iter;
  902. }
  903. var arrayProto = Array.prototype;
  904. function apply(self$1, method, fn, thisArg, wrappedRetFn, args) {
  905. const arr = shallowReadArray(self$1);
  906. const needsWrap = arr !== self$1 && !/* @__PURE__ */ isShallow(self$1);
  907. const methodFn = arr[method];
  908. if (methodFn !== arrayProto[method]) {
  909. const result2 = methodFn.apply(self$1, args);
  910. return needsWrap ? toReactive(result2) : result2;
  911. }
  912. let wrappedFn = fn;
  913. if (arr !== self$1) {
  914. if (needsWrap) wrappedFn = function(item, index) {
  915. return fn.call(this, toWrapped(self$1, item), index, self$1);
  916. };
  917. else if (fn.length > 2) wrappedFn = function(item, index) {
  918. return fn.call(this, item, index, self$1);
  919. };
  920. }
  921. const result = methodFn.call(arr, wrappedFn, thisArg);
  922. return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
  923. }
  924. function reduce(self$1, method, fn, args) {
  925. const arr = shallowReadArray(self$1);
  926. let wrappedFn = fn;
  927. if (arr !== self$1) {
  928. if (!/* @__PURE__ */ isShallow(self$1)) wrappedFn = function(acc, item, index) {
  929. return fn.call(this, acc, toWrapped(self$1, item), index, self$1);
  930. };
  931. else if (fn.length > 3) wrappedFn = function(acc, item, index) {
  932. return fn.call(this, acc, item, index, self$1);
  933. };
  934. }
  935. return arr[method](wrappedFn, ...args);
  936. }
  937. function searchProxy(self$1, method, args) {
  938. const arr = /* @__PURE__ */ toRaw(self$1);
  939. track(arr, "iterate", ARRAY_ITERATE_KEY);
  940. const res = arr[method](...args);
  941. if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
  942. args[0] = /* @__PURE__ */ toRaw(args[0]);
  943. return arr[method](...args);
  944. }
  945. return res;
  946. }
  947. function noTracking(self$1, method, args = []) {
  948. pauseTracking();
  949. startBatch();
  950. const res = (/* @__PURE__ */ toRaw(self$1))[method].apply(self$1, args);
  951. endBatch();
  952. resetTracking();
  953. return res;
  954. }
  955. var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  956. var builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
  957. function hasOwnProperty(key) {
  958. if (!isSymbol(key)) key = String(key);
  959. const obj = /* @__PURE__ */ toRaw(this);
  960. track(obj, "has", key);
  961. return obj.hasOwnProperty(key);
  962. }
  963. var BaseReactiveHandler = class {
  964. constructor(_isReadonly = false, _isShallow = false) {
  965. this._isReadonly = _isReadonly;
  966. this._isShallow = _isShallow;
  967. }
  968. get(target, key, receiver) {
  969. if (key === "__v_skip") return target["__v_skip"];
  970. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  971. if (key === "__v_isReactive") return !isReadonly2;
  972. else if (key === "__v_isReadonly") return isReadonly2;
  973. else if (key === "__v_isShallow") return isShallow2;
  974. else if (key === "__v_raw") {
  975. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) return target;
  976. return;
  977. }
  978. const targetIsArray = isArray(target);
  979. if (!isReadonly2) {
  980. let fn;
  981. if (targetIsArray && (fn = arrayInstrumentations[key])) return fn;
  982. if (key === "hasOwnProperty") return hasOwnProperty;
  983. }
  984. const res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);
  985. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;
  986. if (!isReadonly2) track(target, "get", key);
  987. if (isShallow2) return res;
  988. if (/* @__PURE__ */ isRef(res)) {
  989. const value = targetIsArray && isIntegerKey(key) ? res : res.value;
  990. return isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;
  991. }
  992. if (isObject(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
  993. return res;
  994. }
  995. };
  996. var MutableReactiveHandler = class extends BaseReactiveHandler {
  997. constructor(isShallow2 = false) {
  998. super(false, isShallow2);
  999. }
  1000. set(target, key, value, receiver) {
  1001. let oldValue = target[key];
  1002. const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
  1003. if (!this._isShallow) {
  1004. const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
  1005. if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
  1006. oldValue = /* @__PURE__ */ toRaw(oldValue);
  1007. value = /* @__PURE__ */ toRaw(value);
  1008. }
  1009. if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) {
  1010. warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
  1011. return true;
  1012. } else {
  1013. oldValue.value = value;
  1014. return true;
  1015. }
  1016. }
  1017. const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
  1018. const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
  1019. if (target === /* @__PURE__ */ toRaw(receiver)) {
  1020. if (!hadKey) trigger(target, "add", key, value);
  1021. else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
  1022. }
  1023. return result;
  1024. }
  1025. deleteProperty(target, key) {
  1026. const hadKey = hasOwn(target, key);
  1027. const oldValue = target[key];
  1028. const result = Reflect.deleteProperty(target, key);
  1029. if (result && hadKey) trigger(target, "delete", key, void 0, oldValue);
  1030. return result;
  1031. }
  1032. has(target, key) {
  1033. const result = Reflect.has(target, key);
  1034. if (!isSymbol(key) || !builtInSymbols.has(key)) track(target, "has", key);
  1035. return result;
  1036. }
  1037. ownKeys(target) {
  1038. track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
  1039. return Reflect.ownKeys(target);
  1040. }
  1041. };
  1042. var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  1043. constructor(isShallow2 = false) {
  1044. super(true, isShallow2);
  1045. }
  1046. set(target, key) {
  1047. warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
  1048. return true;
  1049. }
  1050. deleteProperty(target, key) {
  1051. warn$2(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
  1052. return true;
  1053. }
  1054. };
  1055. var mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
  1056. var readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
  1057. var shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
  1058. var shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
  1059. var toShallow = (value) => value;
  1060. var getProto = (v) => Reflect.getPrototypeOf(v);
  1061. function createIterableMethod(method, isReadonly2, isShallow2) {
  1062. return function(...args) {
  1063. const target = this["__v_raw"];
  1064. const rawTarget = /* @__PURE__ */ toRaw(target);
  1065. const targetIsMap = isMap(rawTarget);
  1066. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  1067. const isKeyOnly = method === "keys" && targetIsMap;
  1068. const innerIterator = target[method](...args);
  1069. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1070. !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
  1071. return extend(Object.create(innerIterator), { next() {
  1072. const { value, done } = innerIterator.next();
  1073. return done ? {
  1074. value,
  1075. done
  1076. } : {
  1077. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  1078. done
  1079. };
  1080. } });
  1081. };
  1082. }
  1083. function createReadonlyMethod(type) {
  1084. return function(...args) {
  1085. {
  1086. const key = args[0] ? `on key "${args[0]}" ` : ``;
  1087. warn$2(`${capitalize(type)} operation ${key}failed: target is readonly.`, /* @__PURE__ */ toRaw(this));
  1088. }
  1089. return type === "delete" ? false : type === "clear" ? void 0 : this;
  1090. };
  1091. }
  1092. function createInstrumentations(readonly$1, shallow) {
  1093. const instrumentations = {
  1094. get(key) {
  1095. const target = this["__v_raw"];
  1096. const rawTarget = /* @__PURE__ */ toRaw(target);
  1097. const rawKey = /* @__PURE__ */ toRaw(key);
  1098. if (!readonly$1) {
  1099. if (hasChanged(key, rawKey)) track(rawTarget, "get", key);
  1100. track(rawTarget, "get", rawKey);
  1101. }
  1102. const { has } = getProto(rawTarget);
  1103. const wrap = shallow ? toShallow : readonly$1 ? toReadonly : toReactive;
  1104. if (has.call(rawTarget, key)) return wrap(target.get(key));
  1105. else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));
  1106. else if (target !== rawTarget) target.get(key);
  1107. },
  1108. get size() {
  1109. const target = this["__v_raw"];
  1110. !readonly$1 && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
  1111. return target.size;
  1112. },
  1113. has(key) {
  1114. const target = this["__v_raw"];
  1115. const rawTarget = /* @__PURE__ */ toRaw(target);
  1116. const rawKey = /* @__PURE__ */ toRaw(key);
  1117. if (!readonly$1) {
  1118. if (hasChanged(key, rawKey)) track(rawTarget, "has", key);
  1119. track(rawTarget, "has", rawKey);
  1120. }
  1121. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  1122. },
  1123. forEach(callback, thisArg) {
  1124. const observed = this;
  1125. const target = observed["__v_raw"];
  1126. const rawTarget = /* @__PURE__ */ toRaw(target);
  1127. const wrap = shallow ? toShallow : readonly$1 ? toReadonly : toReactive;
  1128. !readonly$1 && track(rawTarget, "iterate", ITERATE_KEY);
  1129. return target.forEach((value, key) => {
  1130. return callback.call(thisArg, wrap(value), wrap(key), observed);
  1131. });
  1132. }
  1133. };
  1134. extend(instrumentations, readonly$1 ? {
  1135. add: createReadonlyMethod("add"),
  1136. set: createReadonlyMethod("set"),
  1137. delete: createReadonlyMethod("delete"),
  1138. clear: createReadonlyMethod("clear")
  1139. } : {
  1140. add(value) {
  1141. if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
  1142. const target = /* @__PURE__ */ toRaw(this);
  1143. if (!getProto(target).has.call(target, value)) {
  1144. target.add(value);
  1145. trigger(target, "add", value, value);
  1146. }
  1147. return this;
  1148. },
  1149. set(key, value) {
  1150. if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);
  1151. const target = /* @__PURE__ */ toRaw(this);
  1152. const { has, get } = getProto(target);
  1153. let hadKey = has.call(target, key);
  1154. if (!hadKey) {
  1155. key = /* @__PURE__ */ toRaw(key);
  1156. hadKey = has.call(target, key);
  1157. } else checkIdentityKeys(target, has, key);
  1158. const oldValue = get.call(target, key);
  1159. target.set(key, value);
  1160. if (!hadKey) trigger(target, "add", key, value);
  1161. else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
  1162. return this;
  1163. },
  1164. delete(key) {
  1165. const target = /* @__PURE__ */ toRaw(this);
  1166. const { has, get } = getProto(target);
  1167. let hadKey = has.call(target, key);
  1168. if (!hadKey) {
  1169. key = /* @__PURE__ */ toRaw(key);
  1170. hadKey = has.call(target, key);
  1171. } else checkIdentityKeys(target, has, key);
  1172. const oldValue = get ? get.call(target, key) : void 0;
  1173. const result = target.delete(key);
  1174. if (hadKey) trigger(target, "delete", key, void 0, oldValue);
  1175. return result;
  1176. },
  1177. clear() {
  1178. const target = /* @__PURE__ */ toRaw(this);
  1179. const hadItems = target.size !== 0;
  1180. const oldTarget = isMap(target) ? new Map(target) : new Set(target);
  1181. const result = target.clear();
  1182. if (hadItems) trigger(target, "clear", void 0, void 0, oldTarget);
  1183. return result;
  1184. }
  1185. });
  1186. [
  1187. "keys",
  1188. "values",
  1189. "entries",
  1190. Symbol.iterator
  1191. ].forEach((method) => {
  1192. instrumentations[method] = createIterableMethod(method, readonly$1, shallow);
  1193. });
  1194. return instrumentations;
  1195. }
  1196. function createInstrumentationGetter(isReadonly2, shallow) {
  1197. const instrumentations = createInstrumentations(isReadonly2, shallow);
  1198. return (target, key, receiver) => {
  1199. if (key === "__v_isReactive") return !isReadonly2;
  1200. else if (key === "__v_isReadonly") return isReadonly2;
  1201. else if (key === "__v_raw") return target;
  1202. return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
  1203. };
  1204. }
  1205. var mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };
  1206. var shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) };
  1207. var readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
  1208. var shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) };
  1209. function checkIdentityKeys(target, has, key) {
  1210. const rawKey = /* @__PURE__ */ toRaw(key);
  1211. if (rawKey !== key && has.call(target, rawKey)) {
  1212. const type = toRawType(target);
  1213. warn$2(`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.`);
  1214. }
  1215. }
  1216. var reactiveMap = /* @__PURE__ */ new WeakMap();
  1217. var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1218. var readonlyMap = /* @__PURE__ */ new WeakMap();
  1219. var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1220. function targetTypeMap(rawType) {
  1221. switch (rawType) {
  1222. case "Object":
  1223. case "Array": return 1;
  1224. case "Map":
  1225. case "Set":
  1226. case "WeakMap":
  1227. case "WeakSet": return 2;
  1228. default: return 0;
  1229. }
  1230. }
  1231. function getTargetType(value) {
  1232. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1233. }
  1234. /* @__NO_SIDE_EFFECTS__ */
  1235. function reactive(target) {
  1236. if (/* @__PURE__ */ isReadonly(target)) return target;
  1237. return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
  1238. }
  1239. /* @__NO_SIDE_EFFECTS__ */
  1240. function shallowReactive(target) {
  1241. return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
  1242. }
  1243. /* @__NO_SIDE_EFFECTS__ */
  1244. function readonly(target) {
  1245. return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
  1246. }
  1247. /* @__NO_SIDE_EFFECTS__ */
  1248. function shallowReadonly(target) {
  1249. return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
  1250. }
  1251. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1252. if (!isObject(target)) {
  1253. warn$2(`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(target)}`);
  1254. return target;
  1255. }
  1256. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) return target;
  1257. const targetType = getTargetType(target);
  1258. if (targetType === 0) return target;
  1259. const existingProxy = proxyMap.get(target);
  1260. if (existingProxy) return existingProxy;
  1261. const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
  1262. proxyMap.set(target, proxy);
  1263. return proxy;
  1264. }
  1265. /* @__NO_SIDE_EFFECTS__ */
  1266. function isReactive(value) {
  1267. if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
  1268. return !!(value && value["__v_isReactive"]);
  1269. }
  1270. /* @__NO_SIDE_EFFECTS__ */
  1271. function isReadonly(value) {
  1272. return !!(value && value["__v_isReadonly"]);
  1273. }
  1274. /* @__NO_SIDE_EFFECTS__ */
  1275. function isShallow(value) {
  1276. return !!(value && value["__v_isShallow"]);
  1277. }
  1278. /* @__NO_SIDE_EFFECTS__ */
  1279. function isProxy(value) {
  1280. return value ? !!value["__v_raw"] : false;
  1281. }
  1282. /* @__NO_SIDE_EFFECTS__ */
  1283. function toRaw(observed) {
  1284. const raw = observed && observed["__v_raw"];
  1285. return raw ? /* @__PURE__ */ toRaw(raw) : observed;
  1286. }
  1287. function markRaw(value) {
  1288. if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) def(value, "__v_skip", true);
  1289. return value;
  1290. }
  1291. var toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
  1292. var toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
  1293. /* @__NO_SIDE_EFFECTS__ */
  1294. function isRef(r) {
  1295. return r ? r["__v_isRef"] === true : false;
  1296. }
  1297. /* @__NO_SIDE_EFFECTS__ */
  1298. function ref(value) {
  1299. return createRef(value, false);
  1300. }
  1301. /* @__NO_SIDE_EFFECTS__ */
  1302. function shallowRef(value) {
  1303. return createRef(value, true);
  1304. }
  1305. function createRef(rawValue, shallow) {
  1306. if (/* @__PURE__ */ isRef(rawValue)) return rawValue;
  1307. return new RefImpl(rawValue, shallow);
  1308. }
  1309. var RefImpl = class {
  1310. constructor(value, isShallow2) {
  1311. this.dep = new Dep();
  1312. this["__v_isRef"] = true;
  1313. this["__v_isShallow"] = false;
  1314. this._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);
  1315. this._value = isShallow2 ? value : toReactive(value);
  1316. this["__v_isShallow"] = isShallow2;
  1317. }
  1318. get value() {
  1319. this.dep.track({
  1320. target: this,
  1321. type: "get",
  1322. key: "value"
  1323. });
  1324. return this._value;
  1325. }
  1326. set value(newValue) {
  1327. const oldValue = this._rawValue;
  1328. const useDirectValue = this["__v_isShallow"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);
  1329. newValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);
  1330. if (hasChanged(newValue, oldValue)) {
  1331. this._rawValue = newValue;
  1332. this._value = useDirectValue ? newValue : toReactive(newValue);
  1333. this.dep.trigger({
  1334. target: this,
  1335. type: "set",
  1336. key: "value",
  1337. newValue,
  1338. oldValue
  1339. });
  1340. }
  1341. }
  1342. };
  1343. function triggerRef(ref2) {
  1344. if (ref2.dep) ref2.dep.trigger({
  1345. target: ref2,
  1346. type: "set",
  1347. key: "value",
  1348. newValue: ref2._value
  1349. });
  1350. }
  1351. function unref(ref2) {
  1352. return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
  1353. }
  1354. function toValue(source) {
  1355. return isFunction(source) ? source() : unref(source);
  1356. }
  1357. var shallowUnwrapHandlers = {
  1358. get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
  1359. set: (target, key, value, receiver) => {
  1360. const oldValue = target[key];
  1361. if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
  1362. oldValue.value = value;
  1363. return true;
  1364. } else return Reflect.set(target, key, value, receiver);
  1365. }
  1366. };
  1367. function proxyRefs(objectWithRefs) {
  1368. return /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1369. }
  1370. var CustomRefImpl = class {
  1371. constructor(factory) {
  1372. this["__v_isRef"] = true;
  1373. this._value = void 0;
  1374. const dep = this.dep = new Dep();
  1375. const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
  1376. this._get = get;
  1377. this._set = set;
  1378. }
  1379. get value() {
  1380. return this._value = this._get();
  1381. }
  1382. set value(newVal) {
  1383. this._set(newVal);
  1384. }
  1385. };
  1386. function customRef(factory) {
  1387. return new CustomRefImpl(factory);
  1388. }
  1389. /* @__NO_SIDE_EFFECTS__ */
  1390. function toRefs(object) {
  1391. if (!/* @__PURE__ */ isProxy(object)) warn$2(`toRefs() expects a reactive object but received a plain one.`);
  1392. const ret = isArray(object) ? new Array(object.length) : {};
  1393. for (const key in object) ret[key] = propertyToRef(object, key);
  1394. return ret;
  1395. }
  1396. var ObjectRefImpl = class {
  1397. constructor(_object, _key, _defaultValue) {
  1398. this._object = _object;
  1399. this._key = _key;
  1400. this._defaultValue = _defaultValue;
  1401. this["__v_isRef"] = true;
  1402. this._value = void 0;
  1403. this._raw = /* @__PURE__ */ toRaw(_object);
  1404. let shallow = true;
  1405. let obj = _object;
  1406. if (!isArray(_object) || !isIntegerKey(String(_key))) do
  1407. shallow = !/* @__PURE__ */ isProxy(obj) || /* @__PURE__ */ isShallow(obj);
  1408. while (shallow && (obj = obj["__v_raw"]));
  1409. this._shallow = shallow;
  1410. }
  1411. get value() {
  1412. let val = this._object[this._key];
  1413. if (this._shallow) val = unref(val);
  1414. return this._value = val === void 0 ? this._defaultValue : val;
  1415. }
  1416. set value(newVal) {
  1417. if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
  1418. const nestedRef = this._object[this._key];
  1419. if (/* @__PURE__ */ isRef(nestedRef)) {
  1420. nestedRef.value = newVal;
  1421. return;
  1422. }
  1423. }
  1424. this._object[this._key] = newVal;
  1425. }
  1426. get dep() {
  1427. return getDepFromReactive(this._raw, this._key);
  1428. }
  1429. };
  1430. var GetterRefImpl = class {
  1431. constructor(_getter) {
  1432. this._getter = _getter;
  1433. this["__v_isRef"] = true;
  1434. this["__v_isReadonly"] = true;
  1435. this._value = void 0;
  1436. }
  1437. get value() {
  1438. return this._value = this._getter();
  1439. }
  1440. };
  1441. /* @__NO_SIDE_EFFECTS__ */
  1442. function toRef(source, key, defaultValue) {
  1443. if (/* @__PURE__ */ isRef(source)) return source;
  1444. else if (isFunction(source)) return new GetterRefImpl(source);
  1445. else if (isObject(source) && arguments.length > 1) return propertyToRef(source, key, defaultValue);
  1446. else return /* @__PURE__ */ ref(source);
  1447. }
  1448. function propertyToRef(source, key, defaultValue) {
  1449. return new ObjectRefImpl(source, key, defaultValue);
  1450. }
  1451. var ComputedRefImpl = class {
  1452. constructor(fn, setter, isSSR) {
  1453. this.fn = fn;
  1454. this.setter = setter;
  1455. /**
  1456. * @internal
  1457. */
  1458. this._value = void 0;
  1459. /**
  1460. * @internal
  1461. */
  1462. this.dep = new Dep(this);
  1463. /**
  1464. * @internal
  1465. */
  1466. this.__v_isRef = true;
  1467. /**
  1468. * @internal
  1469. */
  1470. this.deps = void 0;
  1471. /**
  1472. * @internal
  1473. */
  1474. this.depsTail = void 0;
  1475. /**
  1476. * @internal
  1477. */
  1478. this.flags = 16;
  1479. /**
  1480. * @internal
  1481. */
  1482. this.globalVersion = globalVersion - 1;
  1483. /**
  1484. * @internal
  1485. */
  1486. this.next = void 0;
  1487. this.effect = this;
  1488. this["__v_isReadonly"] = !setter;
  1489. this.isSSR = isSSR;
  1490. }
  1491. /**
  1492. * @internal
  1493. */
  1494. notify() {
  1495. this.flags |= 16;
  1496. if (!(this.flags & 8) && activeSub !== this) {
  1497. batch(this, true);
  1498. return true;
  1499. }
  1500. }
  1501. get value() {
  1502. const link = this.dep.track({
  1503. target: this,
  1504. type: "get",
  1505. key: "value"
  1506. });
  1507. refreshComputed(this);
  1508. if (link) link.version = this.dep.version;
  1509. return this._value;
  1510. }
  1511. set value(newValue) {
  1512. if (this.setter) this.setter(newValue);
  1513. else warn$2("Write operation failed: computed value is readonly");
  1514. }
  1515. };
  1516. /* @__NO_SIDE_EFFECTS__ */
  1517. function computed$1(getterOrOptions, debugOptions, isSSR = false) {
  1518. let getter;
  1519. let setter;
  1520. if (isFunction(getterOrOptions)) getter = getterOrOptions;
  1521. else {
  1522. getter = getterOrOptions.get;
  1523. setter = getterOrOptions.set;
  1524. }
  1525. const cRef = new ComputedRefImpl(getter, setter, isSSR);
  1526. if (debugOptions && !isSSR) {
  1527. cRef.onTrack = debugOptions.onTrack;
  1528. cRef.onTrigger = debugOptions.onTrigger;
  1529. }
  1530. return cRef;
  1531. }
  1532. var TrackOpTypes = {
  1533. "GET": "get",
  1534. "HAS": "has",
  1535. "ITERATE": "iterate"
  1536. };
  1537. var TriggerOpTypes = {
  1538. "SET": "set",
  1539. "ADD": "add",
  1540. "DELETE": "delete",
  1541. "CLEAR": "clear"
  1542. };
  1543. var INITIAL_WATCHER_VALUE = {};
  1544. var cleanupMap = /* @__PURE__ */ new WeakMap();
  1545. var activeWatcher = void 0;
  1546. function getCurrentWatcher() {
  1547. return activeWatcher;
  1548. }
  1549. function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
  1550. if (owner) {
  1551. let cleanups = cleanupMap.get(owner);
  1552. if (!cleanups) cleanupMap.set(owner, cleanups = []);
  1553. cleanups.push(cleanupFn);
  1554. } else if (!failSilently) warn$2(`onWatcherCleanup() was called when there was no active watcher to associate with.`);
  1555. }
  1556. function watch$1(source, cb, options = EMPTY_OBJ) {
  1557. const { immediate, deep, once, scheduler, augmentJob, call } = options;
  1558. const warnInvalidSource = (s) => {
  1559. (options.onWarn || warn$2)(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
  1560. };
  1561. const reactiveGetter = (source2) => {
  1562. if (deep) return source2;
  1563. if (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);
  1564. return traverse(source2);
  1565. };
  1566. let effect$1;
  1567. let getter;
  1568. let cleanup;
  1569. let boundCleanup;
  1570. let forceTrigger = false;
  1571. let isMultiSource = false;
  1572. if (/* @__PURE__ */ isRef(source)) {
  1573. getter = () => source.value;
  1574. forceTrigger = /* @__PURE__ */ isShallow(source);
  1575. } else if (/* @__PURE__ */ isReactive(source)) {
  1576. getter = () => reactiveGetter(source);
  1577. forceTrigger = true;
  1578. } else if (isArray(source)) {
  1579. isMultiSource = true;
  1580. forceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));
  1581. getter = () => source.map((s) => {
  1582. if (/* @__PURE__ */ isRef(s)) return s.value;
  1583. else if (/* @__PURE__ */ isReactive(s)) return reactiveGetter(s);
  1584. else if (isFunction(s)) return call ? call(s, 2) : s();
  1585. else warnInvalidSource(s);
  1586. });
  1587. } else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;
  1588. else getter = () => {
  1589. if (cleanup) {
  1590. pauseTracking();
  1591. try {
  1592. cleanup();
  1593. } finally {
  1594. resetTracking();
  1595. }
  1596. }
  1597. const currentEffect = activeWatcher;
  1598. activeWatcher = effect$1;
  1599. try {
  1600. return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
  1601. } finally {
  1602. activeWatcher = currentEffect;
  1603. }
  1604. };
  1605. else {
  1606. getter = NOOP;
  1607. warnInvalidSource(source);
  1608. }
  1609. if (cb && deep) {
  1610. const baseGetter = getter;
  1611. const depth = deep === true ? Infinity : deep;
  1612. getter = () => traverse(baseGetter(), depth);
  1613. }
  1614. const scope = getCurrentScope();
  1615. const watchHandle = () => {
  1616. effect$1.stop();
  1617. if (scope && scope.active) remove(scope.effects, effect$1);
  1618. };
  1619. if (once && cb) {
  1620. const _cb = cb;
  1621. cb = (...args) => {
  1622. _cb(...args);
  1623. watchHandle();
  1624. };
  1625. }
  1626. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  1627. const job = (immediateFirstRun) => {
  1628. if (!(effect$1.flags & 1) || !effect$1.dirty && !immediateFirstRun) return;
  1629. if (cb) {
  1630. const newValue = effect$1.run();
  1631. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
  1632. if (cleanup) cleanup();
  1633. const currentWatcher = activeWatcher;
  1634. activeWatcher = effect$1;
  1635. try {
  1636. const args = [
  1637. newValue,
  1638. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  1639. boundCleanup
  1640. ];
  1641. oldValue = newValue;
  1642. call ? call(cb, 3, args) : cb(...args);
  1643. } finally {
  1644. activeWatcher = currentWatcher;
  1645. }
  1646. }
  1647. } else effect$1.run();
  1648. };
  1649. if (augmentJob) augmentJob(job);
  1650. effect$1 = new ReactiveEffect(getter);
  1651. effect$1.scheduler = scheduler ? () => scheduler(job, false) : job;
  1652. boundCleanup = (fn) => onWatcherCleanup(fn, false, effect$1);
  1653. cleanup = effect$1.onStop = () => {
  1654. const cleanups = cleanupMap.get(effect$1);
  1655. if (cleanups) {
  1656. if (call) call(cleanups, 4);
  1657. else for (const cleanup2 of cleanups) cleanup2();
  1658. cleanupMap.delete(effect$1);
  1659. }
  1660. };
  1661. effect$1.onTrack = options.onTrack;
  1662. effect$1.onTrigger = options.onTrigger;
  1663. if (cb) if (immediate) job(true);
  1664. else oldValue = effect$1.run();
  1665. else if (scheduler) scheduler(job.bind(null, true), true);
  1666. else effect$1.run();
  1667. watchHandle.pause = effect$1.pause.bind(effect$1);
  1668. watchHandle.resume = effect$1.resume.bind(effect$1);
  1669. watchHandle.stop = watchHandle;
  1670. return watchHandle;
  1671. }
  1672. function traverse(value, depth = Infinity, seen) {
  1673. if (depth <= 0 || !isObject(value) || value["__v_skip"]) return value;
  1674. seen = seen || /* @__PURE__ */ new Map();
  1675. if ((seen.get(value) || 0) >= depth) return value;
  1676. seen.set(value, depth);
  1677. depth--;
  1678. if (/* @__PURE__ */ isRef(value)) traverse(value.value, depth, seen);
  1679. else if (isArray(value)) for (let i = 0; i < value.length; i++) traverse(value[i], depth, seen);
  1680. else if (isSet(value) || isMap(value)) value.forEach((v) => {
  1681. traverse(v, depth, seen);
  1682. });
  1683. else if (isPlainObject(value)) {
  1684. for (const key in value) traverse(value[key], depth, seen);
  1685. for (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) traverse(value[key], depth, seen);
  1686. }
  1687. return value;
  1688. }
  1689. //#endregion
  1690. //#region node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  1691. /**
  1692. * @vue/runtime-core v3.5.27
  1693. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  1694. * @license MIT
  1695. **/
  1696. var stack = [];
  1697. function pushWarningContext(vnode) {
  1698. stack.push(vnode);
  1699. }
  1700. function popWarningContext() {
  1701. stack.pop();
  1702. }
  1703. var isWarning = false;
  1704. function warn$1(msg, ...args) {
  1705. if (isWarning) return;
  1706. isWarning = true;
  1707. pauseTracking();
  1708. const instance = stack.length ? stack[stack.length - 1].component : null;
  1709. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  1710. const trace = getComponentTrace();
  1711. if (appWarnHandler) callWithErrorHandling(appWarnHandler, instance, 11, [
  1712. msg + args.map((a) => {
  1713. var _a, _b;
  1714. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  1715. }).join(""),
  1716. instance && instance.proxy,
  1717. trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
  1718. trace
  1719. ]);
  1720. else {
  1721. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  1722. if (trace.length && true) warnArgs.push(`
  1723. `, ...formatTrace(trace));
  1724. console.warn(...warnArgs);
  1725. }
  1726. resetTracking();
  1727. isWarning = false;
  1728. }
  1729. function getComponentTrace() {
  1730. let currentVNode = stack[stack.length - 1];
  1731. if (!currentVNode) return [];
  1732. const normalizedStack = [];
  1733. while (currentVNode) {
  1734. const last = normalizedStack[0];
  1735. if (last && last.vnode === currentVNode) last.recurseCount++;
  1736. else normalizedStack.push({
  1737. vnode: currentVNode,
  1738. recurseCount: 0
  1739. });
  1740. const parentInstance = currentVNode.component && currentVNode.component.parent;
  1741. currentVNode = parentInstance && parentInstance.vnode;
  1742. }
  1743. return normalizedStack;
  1744. }
  1745. function formatTrace(trace) {
  1746. const logs = [];
  1747. trace.forEach((entry, i) => {
  1748. logs.push(...i === 0 ? [] : [`
  1749. `], ...formatTraceEntry(entry));
  1750. });
  1751. return logs;
  1752. }
  1753. function formatTraceEntry({ vnode, recurseCount }) {
  1754. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  1755. const isRoot = vnode.component ? vnode.component.parent == null : false;
  1756. const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
  1757. const close = `>` + postfix;
  1758. return vnode.props ? [
  1759. open,
  1760. ...formatProps(vnode.props),
  1761. close
  1762. ] : [open + close];
  1763. }
  1764. function formatProps(props) {
  1765. const res = [];
  1766. const keys = Object.keys(props);
  1767. keys.slice(0, 3).forEach((key) => {
  1768. res.push(...formatProp(key, props[key]));
  1769. });
  1770. if (keys.length > 3) res.push(` ...`);
  1771. return res;
  1772. }
  1773. function formatProp(key, value, raw) {
  1774. if (isString(value)) {
  1775. value = JSON.stringify(value);
  1776. return raw ? value : [`${key}=${value}`];
  1777. } else if (typeof value === "number" || typeof value === "boolean" || value == null) return raw ? value : [`${key}=${value}`];
  1778. else if (isRef(value)) {
  1779. value = formatProp(key, toRaw(value.value), true);
  1780. return raw ? value : [
  1781. `${key}=Ref<`,
  1782. value,
  1783. `>`
  1784. ];
  1785. } else if (isFunction(value)) return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  1786. else {
  1787. value = toRaw(value);
  1788. return raw ? value : [`${key}=`, value];
  1789. }
  1790. }
  1791. function assertNumber(val, type) {
  1792. if (val === void 0) return;
  1793. else if (typeof val !== "number") warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  1794. else if (isNaN(val)) warn$1(`${type} is NaN - the duration expression might be incorrect.`);
  1795. }
  1796. var ErrorCodes = {
  1797. "SETUP_FUNCTION": 0,
  1798. "0": "SETUP_FUNCTION",
  1799. "RENDER_FUNCTION": 1,
  1800. "1": "RENDER_FUNCTION",
  1801. "NATIVE_EVENT_HANDLER": 5,
  1802. "5": "NATIVE_EVENT_HANDLER",
  1803. "COMPONENT_EVENT_HANDLER": 6,
  1804. "6": "COMPONENT_EVENT_HANDLER",
  1805. "VNODE_HOOK": 7,
  1806. "7": "VNODE_HOOK",
  1807. "DIRECTIVE_HOOK": 8,
  1808. "8": "DIRECTIVE_HOOK",
  1809. "TRANSITION_HOOK": 9,
  1810. "9": "TRANSITION_HOOK",
  1811. "APP_ERROR_HANDLER": 10,
  1812. "10": "APP_ERROR_HANDLER",
  1813. "APP_WARN_HANDLER": 11,
  1814. "11": "APP_WARN_HANDLER",
  1815. "FUNCTION_REF": 12,
  1816. "12": "FUNCTION_REF",
  1817. "ASYNC_COMPONENT_LOADER": 13,
  1818. "13": "ASYNC_COMPONENT_LOADER",
  1819. "SCHEDULER": 14,
  1820. "14": "SCHEDULER",
  1821. "COMPONENT_UPDATE": 15,
  1822. "15": "COMPONENT_UPDATE",
  1823. "APP_UNMOUNT_CLEANUP": 16,
  1824. "16": "APP_UNMOUNT_CLEANUP"
  1825. };
  1826. var ErrorTypeStrings$1 = {
  1827. ["sp"]: "serverPrefetch hook",
  1828. ["bc"]: "beforeCreate hook",
  1829. ["c"]: "created hook",
  1830. ["bm"]: "beforeMount hook",
  1831. ["m"]: "mounted hook",
  1832. ["bu"]: "beforeUpdate hook",
  1833. ["u"]: "updated",
  1834. ["bum"]: "beforeUnmount hook",
  1835. ["um"]: "unmounted hook",
  1836. ["a"]: "activated hook",
  1837. ["da"]: "deactivated hook",
  1838. ["ec"]: "errorCaptured hook",
  1839. ["rtc"]: "renderTracked hook",
  1840. ["rtg"]: "renderTriggered hook",
  1841. [0]: "setup function",
  1842. [1]: "render function",
  1843. [2]: "watcher getter",
  1844. [3]: "watcher callback",
  1845. [4]: "watcher cleanup function",
  1846. [5]: "native event handler",
  1847. [6]: "component event handler",
  1848. [7]: "vnode hook",
  1849. [8]: "directive hook",
  1850. [9]: "transition hook",
  1851. [10]: "app errorHandler",
  1852. [11]: "app warnHandler",
  1853. [12]: "ref function",
  1854. [13]: "async component loader",
  1855. [14]: "scheduler flush",
  1856. [15]: "component update",
  1857. [16]: "app unmount cleanup function"
  1858. };
  1859. function callWithErrorHandling(fn, instance, type, args) {
  1860. try {
  1861. return args ? fn(...args) : fn();
  1862. } catch (err) {
  1863. handleError(err, instance, type);
  1864. }
  1865. }
  1866. function callWithAsyncErrorHandling(fn, instance, type, args) {
  1867. if (isFunction(fn)) {
  1868. const res = callWithErrorHandling(fn, instance, type, args);
  1869. if (res && isPromise(res)) res.catch((err) => {
  1870. handleError(err, instance, type);
  1871. });
  1872. return res;
  1873. }
  1874. if (isArray(fn)) {
  1875. const values = [];
  1876. for (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  1877. return values;
  1878. } else warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
  1879. }
  1880. function handleError(err, instance, type, throwInDev = true) {
  1881. const contextVNode = instance ? instance.vnode : null;
  1882. const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
  1883. if (instance) {
  1884. let cur = instance.parent;
  1885. const exposedInstance = instance.proxy;
  1886. const errorInfo = ErrorTypeStrings$1[type];
  1887. while (cur) {
  1888. const errorCapturedHooks = cur.ec;
  1889. if (errorCapturedHooks) {
  1890. for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
  1891. }
  1892. cur = cur.parent;
  1893. }
  1894. if (errorHandler) {
  1895. pauseTracking();
  1896. callWithErrorHandling(errorHandler, null, 10, [
  1897. err,
  1898. exposedInstance,
  1899. errorInfo
  1900. ]);
  1901. resetTracking();
  1902. return;
  1903. }
  1904. }
  1905. logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
  1906. }
  1907. function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
  1908. {
  1909. const info = ErrorTypeStrings$1[type];
  1910. if (contextVNode) pushWarningContext(contextVNode);
  1911. warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  1912. if (contextVNode) popWarningContext();
  1913. if (throwInDev) throw err;
  1914. else console.error(err);
  1915. }
  1916. }
  1917. var queue = [];
  1918. var flushIndex = -1;
  1919. var pendingPostFlushCbs = [];
  1920. var activePostFlushCbs = null;
  1921. var postFlushIndex = 0;
  1922. var resolvedPromise = /* @__PURE__ */ Promise.resolve();
  1923. var currentFlushPromise = null;
  1924. var RECURSION_LIMIT = 100;
  1925. function nextTick(fn) {
  1926. const p$1 = currentFlushPromise || resolvedPromise;
  1927. return fn ? p$1.then(this ? fn.bind(this) : fn) : p$1;
  1928. }
  1929. function findInsertionIndex(id) {
  1930. let start = flushIndex + 1;
  1931. let end = queue.length;
  1932. while (start < end) {
  1933. const middle = start + end >>> 1;
  1934. const middleJob = queue[middle];
  1935. const middleJobId = getId(middleJob);
  1936. if (middleJobId < id || middleJobId === id && middleJob.flags & 2) start = middle + 1;
  1937. else end = middle;
  1938. }
  1939. return start;
  1940. }
  1941. function queueJob(job) {
  1942. if (!(job.flags & 1)) {
  1943. const jobId = getId(job);
  1944. const lastJob = queue[queue.length - 1];
  1945. if (!lastJob || !(job.flags & 2) && jobId >= getId(lastJob)) queue.push(job);
  1946. else queue.splice(findInsertionIndex(jobId), 0, job);
  1947. job.flags |= 1;
  1948. queueFlush();
  1949. }
  1950. }
  1951. function queueFlush() {
  1952. if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(flushJobs);
  1953. }
  1954. function queuePostFlushCb(cb) {
  1955. if (!isArray(cb)) {
  1956. if (activePostFlushCbs && cb.id === -1) activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
  1957. else if (!(cb.flags & 1)) {
  1958. pendingPostFlushCbs.push(cb);
  1959. cb.flags |= 1;
  1960. }
  1961. } else pendingPostFlushCbs.push(...cb);
  1962. queueFlush();
  1963. }
  1964. function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
  1965. seen = seen || /* @__PURE__ */ new Map();
  1966. for (; i < queue.length; i++) {
  1967. const cb = queue[i];
  1968. if (cb && cb.flags & 2) {
  1969. if (instance && cb.id !== instance.uid) continue;
  1970. if (checkRecursiveUpdates(seen, cb)) continue;
  1971. queue.splice(i, 1);
  1972. i--;
  1973. if (cb.flags & 4) cb.flags &= -2;
  1974. cb();
  1975. if (!(cb.flags & 4)) cb.flags &= -2;
  1976. }
  1977. }
  1978. }
  1979. function flushPostFlushCbs(seen) {
  1980. if (pendingPostFlushCbs.length) {
  1981. const deduped = [...new Set(pendingPostFlushCbs)].sort((a, b) => getId(a) - getId(b));
  1982. pendingPostFlushCbs.length = 0;
  1983. if (activePostFlushCbs) {
  1984. activePostFlushCbs.push(...deduped);
  1985. return;
  1986. }
  1987. activePostFlushCbs = deduped;
  1988. seen = seen || /* @__PURE__ */ new Map();
  1989. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  1990. const cb = activePostFlushCbs[postFlushIndex];
  1991. if (checkRecursiveUpdates(seen, cb)) continue;
  1992. if (cb.flags & 4) cb.flags &= -2;
  1993. if (!(cb.flags & 8)) cb();
  1994. cb.flags &= -2;
  1995. }
  1996. activePostFlushCbs = null;
  1997. postFlushIndex = 0;
  1998. }
  1999. }
  2000. var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
  2001. function flushJobs(seen) {
  2002. seen = seen || /* @__PURE__ */ new Map();
  2003. const check = (job) => checkRecursiveUpdates(seen, job);
  2004. try {
  2005. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2006. const job = queue[flushIndex];
  2007. if (job && !(job.flags & 8)) {
  2008. if (check(job)) continue;
  2009. if (job.flags & 4) job.flags &= -2;
  2010. callWithErrorHandling(job, job.i, job.i ? 15 : 14);
  2011. if (!(job.flags & 4)) job.flags &= -2;
  2012. }
  2013. }
  2014. } finally {
  2015. for (; flushIndex < queue.length; flushIndex++) {
  2016. const job = queue[flushIndex];
  2017. if (job) job.flags &= -2;
  2018. }
  2019. flushIndex = -1;
  2020. queue.length = 0;
  2021. flushPostFlushCbs(seen);
  2022. currentFlushPromise = null;
  2023. if (queue.length || pendingPostFlushCbs.length) flushJobs(seen);
  2024. }
  2025. }
  2026. function checkRecursiveUpdates(seen, fn) {
  2027. const count = seen.get(fn) || 0;
  2028. if (count > RECURSION_LIMIT) {
  2029. const instance = fn.i;
  2030. const componentName = instance && getComponentName(instance.type);
  2031. handleError(`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.`, null, 10);
  2032. return true;
  2033. }
  2034. seen.set(fn, count + 1);
  2035. return false;
  2036. }
  2037. var isHmrUpdating = false;
  2038. var hmrDirtyComponents = /* @__PURE__ */ new Map();
  2039. getGlobalThis().__VUE_HMR_RUNTIME__ = {
  2040. createRecord: tryWrap(createRecord),
  2041. rerender: tryWrap(rerender),
  2042. reload: tryWrap(reload)
  2043. };
  2044. var map = /* @__PURE__ */ new Map();
  2045. function registerHMR(instance) {
  2046. const id = instance.type.__hmrId;
  2047. let record = map.get(id);
  2048. if (!record) {
  2049. createRecord(id, instance.type);
  2050. record = map.get(id);
  2051. }
  2052. record.instances.add(instance);
  2053. }
  2054. function unregisterHMR(instance) {
  2055. map.get(instance.type.__hmrId).instances.delete(instance);
  2056. }
  2057. function createRecord(id, initialDef) {
  2058. if (map.has(id)) return false;
  2059. map.set(id, {
  2060. initialDef: normalizeClassComponent(initialDef),
  2061. instances: /* @__PURE__ */ new Set()
  2062. });
  2063. return true;
  2064. }
  2065. function normalizeClassComponent(component) {
  2066. return isClassComponent(component) ? component.__vccOpts : component;
  2067. }
  2068. function rerender(id, newRender) {
  2069. const record = map.get(id);
  2070. if (!record) return;
  2071. record.initialDef.render = newRender;
  2072. [...record.instances].forEach((instance) => {
  2073. if (newRender) {
  2074. instance.render = newRender;
  2075. normalizeClassComponent(instance.type).render = newRender;
  2076. }
  2077. instance.renderCache = [];
  2078. isHmrUpdating = true;
  2079. if (!(instance.job.flags & 8)) instance.update();
  2080. isHmrUpdating = false;
  2081. });
  2082. }
  2083. function reload(id, newComp) {
  2084. const record = map.get(id);
  2085. if (!record) return;
  2086. newComp = normalizeClassComponent(newComp);
  2087. updateComponentDef(record.initialDef, newComp);
  2088. const instances = [...record.instances];
  2089. for (let i = 0; i < instances.length; i++) {
  2090. const instance = instances[i];
  2091. const oldComp = normalizeClassComponent(instance.type);
  2092. let dirtyInstances = hmrDirtyComponents.get(oldComp);
  2093. if (!dirtyInstances) {
  2094. if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
  2095. hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
  2096. }
  2097. dirtyInstances.add(instance);
  2098. instance.appContext.propsCache.delete(instance.type);
  2099. instance.appContext.emitsCache.delete(instance.type);
  2100. instance.appContext.optionsCache.delete(instance.type);
  2101. if (instance.ceReload) {
  2102. dirtyInstances.add(instance);
  2103. instance.ceReload(newComp.styles);
  2104. dirtyInstances.delete(instance);
  2105. } else if (instance.parent) queueJob(() => {
  2106. if (!(instance.job.flags & 8)) {
  2107. isHmrUpdating = true;
  2108. instance.parent.update();
  2109. isHmrUpdating = false;
  2110. dirtyInstances.delete(instance);
  2111. }
  2112. });
  2113. else if (instance.appContext.reload) instance.appContext.reload();
  2114. else if (typeof window !== "undefined") window.location.reload();
  2115. else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
  2116. if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
  2117. }
  2118. queuePostFlushCb(() => {
  2119. hmrDirtyComponents.clear();
  2120. });
  2121. }
  2122. function updateComponentDef(oldComp, newComp) {
  2123. extend(oldComp, newComp);
  2124. for (const key in oldComp) if (key !== "__file" && !(key in newComp)) delete oldComp[key];
  2125. }
  2126. function tryWrap(fn) {
  2127. return (id, arg) => {
  2128. try {
  2129. return fn(id, arg);
  2130. } catch (e) {
  2131. console.error(e);
  2132. console.warn(`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`);
  2133. }
  2134. };
  2135. }
  2136. var devtools$1;
  2137. var buffer = [];
  2138. var devtoolsNotInstalled = false;
  2139. function emit$1(event, ...args) {
  2140. if (devtools$1) devtools$1.emit(event, ...args);
  2141. else if (!devtoolsNotInstalled) buffer.push({
  2142. event,
  2143. args
  2144. });
  2145. }
  2146. function setDevtoolsHook$1(hook, target) {
  2147. var _a, _b;
  2148. devtools$1 = hook;
  2149. if (devtools$1) {
  2150. devtools$1.enabled = true;
  2151. buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
  2152. buffer = [];
  2153. } else if (typeof window !== "undefined" && window.HTMLElement && !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))) {
  2154. (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((newHook) => {
  2155. setDevtoolsHook$1(newHook, target);
  2156. });
  2157. setTimeout(() => {
  2158. if (!devtools$1) {
  2159. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  2160. devtoolsNotInstalled = true;
  2161. buffer = [];
  2162. }
  2163. }, 3e3);
  2164. } else {
  2165. devtoolsNotInstalled = true;
  2166. buffer = [];
  2167. }
  2168. }
  2169. function devtoolsInitApp(app, version$1) {
  2170. emit$1("app:init", app, version$1, {
  2171. Fragment,
  2172. Text,
  2173. Comment,
  2174. Static
  2175. });
  2176. }
  2177. function devtoolsUnmountApp(app) {
  2178. emit$1("app:unmount", app);
  2179. }
  2180. var devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added");
  2181. var devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
  2182. var _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook("component:removed");
  2183. var devtoolsComponentRemoved = (component) => {
  2184. if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
  2185. };
  2186. /* @__NO_SIDE_EFFECTS__ */
  2187. function createDevtoolsComponentHook(hook) {
  2188. return (component) => {
  2189. emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
  2190. };
  2191. }
  2192. var devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start");
  2193. var devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end");
  2194. function createDevtoolsPerformanceHook(hook) {
  2195. return (component, type, time) => {
  2196. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  2197. };
  2198. }
  2199. function devtoolsComponentEmit(component, event, params) {
  2200. emit$1("component:emit", component.appContext.app, component, event, params);
  2201. }
  2202. var currentRenderingInstance = null;
  2203. var currentScopeId = null;
  2204. function setCurrentRenderingInstance(instance) {
  2205. const prev = currentRenderingInstance;
  2206. currentRenderingInstance = instance;
  2207. currentScopeId = instance && instance.type.__scopeId || null;
  2208. return prev;
  2209. }
  2210. function pushScopeId(id) {
  2211. currentScopeId = id;
  2212. }
  2213. function popScopeId() {
  2214. currentScopeId = null;
  2215. }
  2216. var withScopeId = (_id) => withCtx;
  2217. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2218. if (!ctx) return fn;
  2219. if (fn._n) return fn;
  2220. const renderFnWithContext = (...args) => {
  2221. if (renderFnWithContext._d) setBlockTracking(-1);
  2222. const prevInstance = setCurrentRenderingInstance(ctx);
  2223. let res;
  2224. try {
  2225. res = fn(...args);
  2226. } finally {
  2227. setCurrentRenderingInstance(prevInstance);
  2228. if (renderFnWithContext._d) setBlockTracking(1);
  2229. }
  2230. devtoolsComponentUpdated(ctx);
  2231. return res;
  2232. };
  2233. renderFnWithContext._n = true;
  2234. renderFnWithContext._c = true;
  2235. renderFnWithContext._d = true;
  2236. return renderFnWithContext;
  2237. }
  2238. function validateDirectiveName(name) {
  2239. if (isBuiltInDirective(name)) warn$1("Do not use built-in directive ids as custom directive id: " + name);
  2240. }
  2241. function withDirectives(vnode, directives) {
  2242. if (currentRenderingInstance === null) {
  2243. warn$1(`withDirectives can only be used inside render functions.`);
  2244. return vnode;
  2245. }
  2246. const instance = getComponentPublicInstance(currentRenderingInstance);
  2247. const bindings = vnode.dirs || (vnode.dirs = []);
  2248. for (let i = 0; i < directives.length; i++) {
  2249. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  2250. if (dir) {
  2251. if (isFunction(dir)) dir = {
  2252. mounted: dir,
  2253. updated: dir
  2254. };
  2255. if (dir.deep) traverse(value);
  2256. bindings.push({
  2257. dir,
  2258. instance,
  2259. value,
  2260. oldValue: void 0,
  2261. arg,
  2262. modifiers
  2263. });
  2264. }
  2265. }
  2266. return vnode;
  2267. }
  2268. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  2269. const bindings = vnode.dirs;
  2270. const oldBindings = prevVNode && prevVNode.dirs;
  2271. for (let i = 0; i < bindings.length; i++) {
  2272. const binding = bindings[i];
  2273. if (oldBindings) binding.oldValue = oldBindings[i].value;
  2274. let hook = binding.dir[name];
  2275. if (hook) {
  2276. pauseTracking();
  2277. callWithAsyncErrorHandling(hook, instance, 8, [
  2278. vnode.el,
  2279. binding,
  2280. vnode,
  2281. prevVNode
  2282. ]);
  2283. resetTracking();
  2284. }
  2285. }
  2286. }
  2287. function provide(key, value) {
  2288. if (!currentInstance || currentInstance.isMounted) warn$1(`provide() can only be used inside setup().`);
  2289. if (currentInstance) {
  2290. let provides = currentInstance.provides;
  2291. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  2292. if (parentProvides === provides) provides = currentInstance.provides = Object.create(parentProvides);
  2293. provides[key] = value;
  2294. }
  2295. }
  2296. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  2297. const instance = getCurrentInstance();
  2298. if (instance || currentApp) {
  2299. let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
  2300. if (provides && key in provides) return provides[key];
  2301. else if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  2302. else warn$1(`injection "${String(key)}" not found.`);
  2303. } else warn$1(`inject() can only be used inside setup() or functional components.`);
  2304. }
  2305. function hasInjectionContext() {
  2306. return !!(getCurrentInstance() || currentApp);
  2307. }
  2308. var ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
  2309. var useSSRContext = () => {
  2310. {
  2311. const ctx = inject(ssrContextKey);
  2312. if (!ctx) warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
  2313. return ctx;
  2314. }
  2315. };
  2316. function watchEffect(effect$1, options) {
  2317. return doWatch(effect$1, null, options);
  2318. }
  2319. function watchPostEffect(effect$1, options) {
  2320. return doWatch(effect$1, null, extend({}, options, { flush: "post" }));
  2321. }
  2322. function watchSyncEffect(effect$1, options) {
  2323. return doWatch(effect$1, null, extend({}, options, { flush: "sync" }));
  2324. }
  2325. function watch(source, cb, options) {
  2326. if (!isFunction(cb)) warn$1(`\`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.`);
  2327. return doWatch(source, cb, options);
  2328. }
  2329. function doWatch(source, cb, options = EMPTY_OBJ) {
  2330. const { immediate, deep, flush, once } = options;
  2331. if (!cb) {
  2332. if (immediate !== void 0) warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
  2333. if (deep !== void 0) warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
  2334. if (once !== void 0) warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
  2335. }
  2336. const baseWatchOptions = extend({}, options);
  2337. baseWatchOptions.onWarn = warn$1;
  2338. const runsImmediately = cb && immediate || !cb && flush !== "post";
  2339. let ssrCleanup;
  2340. if (isInSSRComponentSetup) {
  2341. if (flush === "sync") {
  2342. const ctx = useSSRContext();
  2343. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  2344. } else if (!runsImmediately) {
  2345. const watchStopHandle = () => {};
  2346. watchStopHandle.stop = NOOP;
  2347. watchStopHandle.resume = NOOP;
  2348. watchStopHandle.pause = NOOP;
  2349. return watchStopHandle;
  2350. }
  2351. }
  2352. const instance = currentInstance;
  2353. baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
  2354. let isPre = false;
  2355. if (flush === "post") baseWatchOptions.scheduler = (job) => {
  2356. queuePostRenderEffect(job, instance && instance.suspense);
  2357. };
  2358. else if (flush !== "sync") {
  2359. isPre = true;
  2360. baseWatchOptions.scheduler = (job, isFirstRun) => {
  2361. if (isFirstRun) job();
  2362. else queueJob(job);
  2363. };
  2364. }
  2365. baseWatchOptions.augmentJob = (job) => {
  2366. if (cb) job.flags |= 4;
  2367. if (isPre) {
  2368. job.flags |= 2;
  2369. if (instance) {
  2370. job.id = instance.uid;
  2371. job.i = instance;
  2372. }
  2373. }
  2374. };
  2375. const watchHandle = watch$1(source, cb, baseWatchOptions);
  2376. if (isInSSRComponentSetup) {
  2377. if (ssrCleanup) ssrCleanup.push(watchHandle);
  2378. else if (runsImmediately) watchHandle();
  2379. }
  2380. return watchHandle;
  2381. }
  2382. function instanceWatch(source, value, options) {
  2383. const publicThis = this.proxy;
  2384. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  2385. let cb;
  2386. if (isFunction(value)) cb = value;
  2387. else {
  2388. cb = value.handler;
  2389. options = value;
  2390. }
  2391. const reset = setCurrentInstance(this);
  2392. const res = doWatch(getter, cb.bind(publicThis), options);
  2393. reset();
  2394. return res;
  2395. }
  2396. function createPathGetter(ctx, path) {
  2397. const segments = path.split(".");
  2398. return () => {
  2399. let cur = ctx;
  2400. for (let i = 0; i < segments.length && cur; i++) cur = cur[segments[i]];
  2401. return cur;
  2402. };
  2403. }
  2404. var TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
  2405. var isTeleport = (type) => type.__isTeleport;
  2406. var isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  2407. var isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
  2408. var isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  2409. var isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  2410. var resolveTarget = (props, select) => {
  2411. const targetSelector = props && props.to;
  2412. if (isString(targetSelector)) if (!select) {
  2413. warn$1(`Current renderer does not support string target for Teleports. (missing querySelector renderer option)`);
  2414. return null;
  2415. } else {
  2416. const target = select(targetSelector);
  2417. if (!target && !isTeleportDisabled(props)) warn$1(`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.`);
  2418. return target;
  2419. }
  2420. else {
  2421. if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
  2422. return targetSelector;
  2423. }
  2424. };
  2425. var TeleportImpl = {
  2426. name: "Teleport",
  2427. __isTeleport: true,
  2428. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  2429. const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
  2430. const disabled = isTeleportDisabled(n2.props);
  2431. let { shapeFlag, children, dynamicChildren } = n2;
  2432. if (isHmrUpdating) {
  2433. optimized = false;
  2434. dynamicChildren = null;
  2435. }
  2436. if (n1 == null) {
  2437. const placeholder = n2.el = createComment("teleport start");
  2438. const mainAnchor = n2.anchor = createComment("teleport end");
  2439. insert(placeholder, container, anchor);
  2440. insert(mainAnchor, container, anchor);
  2441. const mount = (container2, anchor2) => {
  2442. if (shapeFlag & 16) mountChildren(children, container2, anchor2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  2443. };
  2444. const mountToTarget = () => {
  2445. const target = n2.target = resolveTarget(n2.props, querySelector);
  2446. const targetAnchor = prepareAnchor(target, n2, createText, insert);
  2447. if (target) {
  2448. if (namespace !== "svg" && isTargetSVG(target)) namespace = "svg";
  2449. else if (namespace !== "mathml" && isTargetMathML(target)) namespace = "mathml";
  2450. if (parentComponent && parentComponent.isCE) (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
  2451. if (!disabled) {
  2452. mount(target, targetAnchor);
  2453. updateCssVars(n2, false);
  2454. }
  2455. } else if (!disabled) warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
  2456. };
  2457. if (disabled) {
  2458. mount(container, mainAnchor);
  2459. updateCssVars(n2, true);
  2460. }
  2461. if (isTeleportDeferred(n2.props)) {
  2462. n2.el.__isMounted = false;
  2463. queuePostRenderEffect(() => {
  2464. mountToTarget();
  2465. delete n2.el.__isMounted;
  2466. }, parentSuspense);
  2467. } else mountToTarget();
  2468. } else {
  2469. if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
  2470. queuePostRenderEffect(() => {
  2471. TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
  2472. }, parentSuspense);
  2473. return;
  2474. }
  2475. n2.el = n1.el;
  2476. n2.targetStart = n1.targetStart;
  2477. const mainAnchor = n2.anchor = n1.anchor;
  2478. const target = n2.target = n1.target;
  2479. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  2480. const wasDisabled = isTeleportDisabled(n1.props);
  2481. const currentContainer = wasDisabled ? container : target;
  2482. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  2483. if (namespace === "svg" || isTargetSVG(target)) namespace = "svg";
  2484. else if (namespace === "mathml" || isTargetMathML(target)) namespace = "mathml";
  2485. if (dynamicChildren) {
  2486. patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, namespace, slotScopeIds);
  2487. traverseStaticChildren(n1, n2, false);
  2488. } else if (!optimized) patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, false);
  2489. if (disabled) {
  2490. if (!wasDisabled) moveTeleport(n2, container, mainAnchor, internals, 1);
  2491. else if (n2.props && n1.props && n2.props.to !== n1.props.to) n2.props.to = n1.props.to;
  2492. } else if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  2493. const nextTarget = n2.target = resolveTarget(n2.props, querySelector);
  2494. if (nextTarget) moveTeleport(n2, nextTarget, null, internals, 0);
  2495. else warn$1("Invalid Teleport target on update:", target, `(${typeof target})`);
  2496. } else if (wasDisabled) moveTeleport(n2, target, targetAnchor, internals, 1);
  2497. updateCssVars(n2, disabled);
  2498. }
  2499. },
  2500. remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  2501. const { shapeFlag, children, anchor, targetStart, targetAnchor, target, props } = vnode;
  2502. if (target) {
  2503. hostRemove(targetStart);
  2504. hostRemove(targetAnchor);
  2505. }
  2506. doRemove && hostRemove(anchor);
  2507. if (shapeFlag & 16) {
  2508. const shouldRemove = doRemove || !isTeleportDisabled(props);
  2509. for (let i = 0; i < children.length; i++) {
  2510. const child = children[i];
  2511. unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
  2512. }
  2513. }
  2514. },
  2515. move: moveTeleport,
  2516. hydrate: hydrateTeleport
  2517. };
  2518. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  2519. if (moveType === 0) insert(vnode.targetAnchor, container, parentAnchor);
  2520. const { el, anchor, shapeFlag, children, props } = vnode;
  2521. const isReorder = moveType === 2;
  2522. if (isReorder) insert(el, container, parentAnchor);
  2523. if (!isReorder || isTeleportDisabled(props)) {
  2524. if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2);
  2525. }
  2526. if (isReorder) insert(anchor, container, parentAnchor);
  2527. }
  2528. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector, insert, createText } }, hydrateChildren) {
  2529. function hydrateDisabledTeleport(node2, vnode2, targetStart, targetAnchor) {
  2530. vnode2.anchor = hydrateChildren(nextSibling(node2), vnode2, parentNode(node2), parentComponent, parentSuspense, slotScopeIds, optimized);
  2531. vnode2.targetStart = targetStart;
  2532. vnode2.targetAnchor = targetAnchor;
  2533. }
  2534. const target = vnode.target = resolveTarget(vnode.props, querySelector);
  2535. const disabled = isTeleportDisabled(vnode.props);
  2536. if (target) {
  2537. const targetNode = target._lpa || target.firstChild;
  2538. if (vnode.shapeFlag & 16) if (disabled) hydrateDisabledTeleport(node, vnode, targetNode, targetNode && nextSibling(targetNode));
  2539. else {
  2540. vnode.anchor = nextSibling(node);
  2541. let targetAnchor = targetNode;
  2542. while (targetAnchor) {
  2543. if (targetAnchor && targetAnchor.nodeType === 8) {
  2544. if (targetAnchor.data === "teleport start anchor") vnode.targetStart = targetAnchor;
  2545. else if (targetAnchor.data === "teleport anchor") {
  2546. vnode.targetAnchor = targetAnchor;
  2547. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  2548. break;
  2549. }
  2550. }
  2551. targetAnchor = nextSibling(targetAnchor);
  2552. }
  2553. if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
  2554. hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
  2555. }
  2556. updateCssVars(vnode, disabled);
  2557. } else if (disabled) {
  2558. if (vnode.shapeFlag & 16) hydrateDisabledTeleport(node, vnode, node, nextSibling(node));
  2559. }
  2560. return vnode.anchor && nextSibling(vnode.anchor);
  2561. }
  2562. var Teleport = TeleportImpl;
  2563. function updateCssVars(vnode, isDisabled) {
  2564. const ctx = vnode.ctx;
  2565. if (ctx && ctx.ut) {
  2566. let node, anchor;
  2567. if (isDisabled) {
  2568. node = vnode.el;
  2569. anchor = vnode.anchor;
  2570. } else {
  2571. node = vnode.targetStart;
  2572. anchor = vnode.targetAnchor;
  2573. }
  2574. while (node && node !== anchor) {
  2575. if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
  2576. node = node.nextSibling;
  2577. }
  2578. ctx.ut();
  2579. }
  2580. }
  2581. function prepareAnchor(target, vnode, createText, insert) {
  2582. const targetStart = vnode.targetStart = createText("");
  2583. const targetAnchor = vnode.targetAnchor = createText("");
  2584. targetStart[TeleportEndKey] = targetAnchor;
  2585. if (target) {
  2586. insert(targetStart, target);
  2587. insert(targetAnchor, target);
  2588. }
  2589. return targetAnchor;
  2590. }
  2591. var leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
  2592. var enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
  2593. function useTransitionState() {
  2594. const state = {
  2595. isMounted: false,
  2596. isLeaving: false,
  2597. isUnmounting: false,
  2598. leavingVNodes: /* @__PURE__ */ new Map()
  2599. };
  2600. onMounted(() => {
  2601. state.isMounted = true;
  2602. });
  2603. onBeforeUnmount(() => {
  2604. state.isUnmounting = true;
  2605. });
  2606. return state;
  2607. }
  2608. var TransitionHookValidator = [Function, Array];
  2609. var BaseTransitionPropsValidators = {
  2610. mode: String,
  2611. appear: Boolean,
  2612. persisted: Boolean,
  2613. onBeforeEnter: TransitionHookValidator,
  2614. onEnter: TransitionHookValidator,
  2615. onAfterEnter: TransitionHookValidator,
  2616. onEnterCancelled: TransitionHookValidator,
  2617. onBeforeLeave: TransitionHookValidator,
  2618. onLeave: TransitionHookValidator,
  2619. onAfterLeave: TransitionHookValidator,
  2620. onLeaveCancelled: TransitionHookValidator,
  2621. onBeforeAppear: TransitionHookValidator,
  2622. onAppear: TransitionHookValidator,
  2623. onAfterAppear: TransitionHookValidator,
  2624. onAppearCancelled: TransitionHookValidator
  2625. };
  2626. var recursiveGetSubtree = (instance) => {
  2627. const subTree = instance.subTree;
  2628. return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
  2629. };
  2630. var BaseTransitionImpl = {
  2631. name: `BaseTransition`,
  2632. props: BaseTransitionPropsValidators,
  2633. setup(props, { slots }) {
  2634. const instance = getCurrentInstance();
  2635. const state = useTransitionState();
  2636. return () => {
  2637. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  2638. if (!children || !children.length) return;
  2639. const child = findNonCommentChild(children);
  2640. const rawProps = toRaw(props);
  2641. const { mode } = rawProps;
  2642. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
  2643. if (state.isLeaving) return emptyPlaceholder(child);
  2644. const innerChild = getInnerChild$1(child);
  2645. if (!innerChild) return emptyPlaceholder(child);
  2646. let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
  2647. if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
  2648. let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
  2649. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
  2650. let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
  2651. setTransitionHooks(oldInnerChild, leavingHooks);
  2652. if (mode === "out-in" && innerChild.type !== Comment) {
  2653. state.isLeaving = true;
  2654. leavingHooks.afterLeave = () => {
  2655. state.isLeaving = false;
  2656. if (!(instance.job.flags & 8)) instance.update();
  2657. delete leavingHooks.afterLeave;
  2658. oldInnerChild = void 0;
  2659. };
  2660. return emptyPlaceholder(child);
  2661. } else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  2662. const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
  2663. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  2664. el[leaveCbKey] = () => {
  2665. earlyRemove();
  2666. el[leaveCbKey] = void 0;
  2667. delete enterHooks.delayedLeave;
  2668. oldInnerChild = void 0;
  2669. };
  2670. enterHooks.delayedLeave = () => {
  2671. delayedLeave();
  2672. delete enterHooks.delayedLeave;
  2673. oldInnerChild = void 0;
  2674. };
  2675. };
  2676. else oldInnerChild = void 0;
  2677. } else if (oldInnerChild) oldInnerChild = void 0;
  2678. return child;
  2679. };
  2680. }
  2681. };
  2682. function findNonCommentChild(children) {
  2683. let child = children[0];
  2684. if (children.length > 1) {
  2685. let hasFound = false;
  2686. for (const c of children) if (c.type !== Comment) {
  2687. if (hasFound) {
  2688. warn$1("<transition> can only be used on a single element or component. Use <transition-group> for lists.");
  2689. break;
  2690. }
  2691. child = c;
  2692. hasFound = true;
  2693. }
  2694. }
  2695. return child;
  2696. }
  2697. var BaseTransition = BaseTransitionImpl;
  2698. function getLeavingNodesForType(state, vnode) {
  2699. const { leavingVNodes } = state;
  2700. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  2701. if (!leavingVNodesCache) {
  2702. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  2703. leavingVNodes.set(vnode.type, leavingVNodesCache);
  2704. }
  2705. return leavingVNodesCache;
  2706. }
  2707. function resolveTransitionHooks(vnode, props, state, instance, postClone) {
  2708. const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
  2709. const key = String(vnode.key);
  2710. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  2711. const callHook$2 = (hook, args) => {
  2712. hook && callWithAsyncErrorHandling(hook, instance, 9, args);
  2713. };
  2714. const callAsyncHook = (hook, args) => {
  2715. const done = args[1];
  2716. callHook$2(hook, args);
  2717. if (isArray(hook)) {
  2718. if (hook.every((hook2) => hook2.length <= 1)) done();
  2719. } else if (hook.length <= 1) done();
  2720. };
  2721. const hooks = {
  2722. mode,
  2723. persisted,
  2724. beforeEnter(el) {
  2725. let hook = onBeforeEnter;
  2726. if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
  2727. else return;
  2728. if (el[leaveCbKey]) el[leaveCbKey](true);
  2729. const leavingVNode = leavingVNodesCache[key];
  2730. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) leavingVNode.el[leaveCbKey]();
  2731. callHook$2(hook, [el]);
  2732. },
  2733. enter(el) {
  2734. let hook = onEnter;
  2735. let afterHook = onAfterEnter;
  2736. let cancelHook = onEnterCancelled;
  2737. if (!state.isMounted) if (appear) {
  2738. hook = onAppear || onEnter;
  2739. afterHook = onAfterAppear || onAfterEnter;
  2740. cancelHook = onAppearCancelled || onEnterCancelled;
  2741. } else return;
  2742. let called = false;
  2743. const done = el[enterCbKey$1] = (cancelled) => {
  2744. if (called) return;
  2745. called = true;
  2746. if (cancelled) callHook$2(cancelHook, [el]);
  2747. else callHook$2(afterHook, [el]);
  2748. if (hooks.delayedLeave) hooks.delayedLeave();
  2749. el[enterCbKey$1] = void 0;
  2750. };
  2751. if (hook) callAsyncHook(hook, [el, done]);
  2752. else done();
  2753. },
  2754. leave(el, remove$1) {
  2755. const key2 = String(vnode.key);
  2756. if (el[enterCbKey$1]) el[enterCbKey$1](true);
  2757. if (state.isUnmounting) return remove$1();
  2758. callHook$2(onBeforeLeave, [el]);
  2759. let called = false;
  2760. const done = el[leaveCbKey] = (cancelled) => {
  2761. if (called) return;
  2762. called = true;
  2763. remove$1();
  2764. if (cancelled) callHook$2(onLeaveCancelled, [el]);
  2765. else callHook$2(onAfterLeave, [el]);
  2766. el[leaveCbKey] = void 0;
  2767. if (leavingVNodesCache[key2] === vnode) delete leavingVNodesCache[key2];
  2768. };
  2769. leavingVNodesCache[key2] = vnode;
  2770. if (onLeave) callAsyncHook(onLeave, [el, done]);
  2771. else done();
  2772. },
  2773. clone(vnode2) {
  2774. const hooks2 = resolveTransitionHooks(vnode2, props, state, instance, postClone);
  2775. if (postClone) postClone(hooks2);
  2776. return hooks2;
  2777. }
  2778. };
  2779. return hooks;
  2780. }
  2781. function emptyPlaceholder(vnode) {
  2782. if (isKeepAlive(vnode)) {
  2783. vnode = cloneVNode(vnode);
  2784. vnode.children = null;
  2785. return vnode;
  2786. }
  2787. }
  2788. function getInnerChild$1(vnode) {
  2789. if (!isKeepAlive(vnode)) {
  2790. if (isTeleport(vnode.type) && vnode.children) return findNonCommentChild(vnode.children);
  2791. return vnode;
  2792. }
  2793. if (vnode.component) return vnode.component.subTree;
  2794. const { shapeFlag, children } = vnode;
  2795. if (children) {
  2796. if (shapeFlag & 16) return children[0];
  2797. if (shapeFlag & 32 && isFunction(children.default)) return children.default();
  2798. }
  2799. }
  2800. function setTransitionHooks(vnode, hooks) {
  2801. if (vnode.shapeFlag & 6 && vnode.component) {
  2802. vnode.transition = hooks;
  2803. setTransitionHooks(vnode.component.subTree, hooks);
  2804. } else if (vnode.shapeFlag & 128) {
  2805. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  2806. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  2807. } else vnode.transition = hooks;
  2808. }
  2809. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  2810. let ret = [];
  2811. let keyedFragmentCount = 0;
  2812. for (let i = 0; i < children.length; i++) {
  2813. let child = children[i];
  2814. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  2815. if (child.type === Fragment) {
  2816. if (child.patchFlag & 128) keyedFragmentCount++;
  2817. ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
  2818. } else if (keepComment || child.type !== Comment) ret.push(key != null ? cloneVNode(child, { key }) : child);
  2819. }
  2820. if (keyedFragmentCount > 1) for (let i = 0; i < ret.length; i++) ret[i].patchFlag = -2;
  2821. return ret;
  2822. }
  2823. /* @__NO_SIDE_EFFECTS__ */
  2824. function defineComponent(options, extraOptions) {
  2825. return isFunction(options) ? /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
  2826. }
  2827. function useId() {
  2828. const i = getCurrentInstance();
  2829. if (i) return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
  2830. else warn$1(`useId() is called when there is no active component instance to be associated with.`);
  2831. return "";
  2832. }
  2833. function markAsyncBoundary(instance) {
  2834. instance.ids = [
  2835. instance.ids[0] + instance.ids[2]++ + "-",
  2836. 0,
  2837. 0
  2838. ];
  2839. }
  2840. var knownTemplateRefs = /* @__PURE__ */ new WeakSet();
  2841. function useTemplateRef(key) {
  2842. const i = getCurrentInstance();
  2843. const r = shallowRef(null);
  2844. if (i) {
  2845. const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
  2846. let desc;
  2847. if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) warn$1(`useTemplateRef('${key}') already exists.`);
  2848. else Object.defineProperty(refs, key, {
  2849. enumerable: true,
  2850. get: () => r.value,
  2851. set: (val) => r.value = val
  2852. });
  2853. } else warn$1(`useTemplateRef() is called when there is no active component instance to be associated with.`);
  2854. const ret = readonly(r);
  2855. knownTemplateRefs.add(ret);
  2856. return ret;
  2857. }
  2858. var pendingSetRefMap = /* @__PURE__ */ new WeakMap();
  2859. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  2860. if (isArray(rawRef)) {
  2861. rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
  2862. return;
  2863. }
  2864. if (isAsyncWrapper(vnode) && !isUnmount) {
  2865. if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
  2866. return;
  2867. }
  2868. const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
  2869. const value = isUnmount ? null : refValue;
  2870. const { i: owner, r: ref$1 } = rawRef;
  2871. if (!owner) {
  2872. warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`);
  2873. return;
  2874. }
  2875. const oldRef = oldRawRef && oldRawRef.r;
  2876. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  2877. const setupState = owner.setupState;
  2878. const rawSetupState = toRaw(setupState);
  2879. const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
  2880. if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) warn$1(`Template ref "${key}" used on a non-ref value. It will not work in the production build.`);
  2881. if (knownTemplateRefs.has(rawSetupState[key])) return false;
  2882. return hasOwn(rawSetupState, key);
  2883. };
  2884. const canSetRef = (ref2) => {
  2885. return !knownTemplateRefs.has(ref2);
  2886. };
  2887. if (oldRef != null && oldRef !== ref$1) {
  2888. invalidatePendingSetRef(oldRawRef);
  2889. if (isString(oldRef)) {
  2890. refs[oldRef] = null;
  2891. if (canSetSetupRef(oldRef)) setupState[oldRef] = null;
  2892. } else if (isRef(oldRef)) {
  2893. if (canSetRef(oldRef)) oldRef.value = null;
  2894. const oldRawRefAtom = oldRawRef;
  2895. if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
  2896. }
  2897. }
  2898. if (isFunction(ref$1)) callWithErrorHandling(ref$1, owner, 12, [value, refs]);
  2899. else {
  2900. const _isString = isString(ref$1);
  2901. const _isRef = isRef(ref$1);
  2902. if (_isString || _isRef) {
  2903. const doSet = () => {
  2904. if (rawRef.f) {
  2905. const existing = _isString ? canSetSetupRef(ref$1) ? setupState[ref$1] : refs[ref$1] : canSetRef(ref$1) || !rawRef.k ? ref$1.value : refs[rawRef.k];
  2906. if (isUnmount) isArray(existing) && remove(existing, refValue);
  2907. else if (!isArray(existing)) if (_isString) {
  2908. refs[ref$1] = [refValue];
  2909. if (canSetSetupRef(ref$1)) setupState[ref$1] = refs[ref$1];
  2910. } else {
  2911. const newVal = [refValue];
  2912. if (canSetRef(ref$1)) ref$1.value = newVal;
  2913. if (rawRef.k) refs[rawRef.k] = newVal;
  2914. }
  2915. else if (!existing.includes(refValue)) existing.push(refValue);
  2916. } else if (_isString) {
  2917. refs[ref$1] = value;
  2918. if (canSetSetupRef(ref$1)) setupState[ref$1] = value;
  2919. } else if (_isRef) {
  2920. if (canSetRef(ref$1)) ref$1.value = value;
  2921. if (rawRef.k) refs[rawRef.k] = value;
  2922. } else warn$1("Invalid template ref type:", ref$1, `(${typeof ref$1})`);
  2923. };
  2924. if (value) {
  2925. const job = () => {
  2926. doSet();
  2927. pendingSetRefMap.delete(rawRef);
  2928. };
  2929. job.id = -1;
  2930. pendingSetRefMap.set(rawRef, job);
  2931. queuePostRenderEffect(job, parentSuspense);
  2932. } else {
  2933. invalidatePendingSetRef(rawRef);
  2934. doSet();
  2935. }
  2936. } else warn$1("Invalid template ref type:", ref$1, `(${typeof ref$1})`);
  2937. }
  2938. }
  2939. function invalidatePendingSetRef(rawRef) {
  2940. const pendingSetRef = pendingSetRefMap.get(rawRef);
  2941. if (pendingSetRef) {
  2942. pendingSetRef.flags |= 8;
  2943. pendingSetRefMap.delete(rawRef);
  2944. }
  2945. }
  2946. var hasLoggedMismatchError = false;
  2947. var logMismatchError = () => {
  2948. if (hasLoggedMismatchError) return;
  2949. console.error("Hydration completed but contains mismatches.");
  2950. hasLoggedMismatchError = true;
  2951. };
  2952. var isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
  2953. var isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
  2954. var getContainerType = (container) => {
  2955. if (container.nodeType !== 1) return void 0;
  2956. if (isSVGContainer(container)) return "svg";
  2957. if (isMathMLContainer(container)) return "mathml";
  2958. };
  2959. var isComment = (node) => node.nodeType === 8;
  2960. function createHydrationFunctions(rendererInternals) {
  2961. const { mt: mountComponent, p: patch, o: { patchProp: patchProp$1, createText, nextSibling, parentNode, remove: remove$1, insert, createComment } } = rendererInternals;
  2962. const hydrate$1 = (vnode, container) => {
  2963. if (!container.hasChildNodes()) {
  2964. warn$1(`Attempting to hydrate existing markup but container is empty. Performing full mount instead.`);
  2965. patch(null, vnode, container);
  2966. flushPostFlushCbs();
  2967. container._vnode = vnode;
  2968. return;
  2969. }
  2970. hydrateNode(container.firstChild, vnode, null, null, null);
  2971. flushPostFlushCbs();
  2972. container._vnode = vnode;
  2973. };
  2974. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  2975. optimized = optimized || !!vnode.dynamicChildren;
  2976. const isFragmentStart = isComment(node) && node.data === "[";
  2977. const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
  2978. const { type, ref: ref$1, shapeFlag, patchFlag } = vnode;
  2979. let domType = node.nodeType;
  2980. vnode.el = node;
  2981. def(node, "__vnode", vnode, true);
  2982. def(node, "__vueParentComponent", parentComponent, true);
  2983. if (patchFlag === -2) {
  2984. optimized = false;
  2985. vnode.dynamicChildren = null;
  2986. }
  2987. let nextNode = null;
  2988. switch (type) {
  2989. case Text:
  2990. if (domType !== 3) if (vnode.children === "") {
  2991. insert(vnode.el = createText(""), parentNode(node), node);
  2992. nextNode = node;
  2993. } else nextNode = onMismatch();
  2994. else {
  2995. if (node.data !== vnode.children) {
  2996. warn$1(`Hydration text mismatch in`, node.parentNode, `
  2997. - rendered on server: ${JSON.stringify(node.data)}
  2998. - expected on client: ${JSON.stringify(vnode.children)}`);
  2999. logMismatchError();
  3000. node.data = vnode.children;
  3001. }
  3002. nextNode = nextSibling(node);
  3003. }
  3004. break;
  3005. case Comment:
  3006. if (isTemplateNode(node)) {
  3007. nextNode = nextSibling(node);
  3008. replaceNode(vnode.el = node.content.firstChild, node, parentComponent);
  3009. } else if (domType !== 8 || isFragmentStart) nextNode = onMismatch();
  3010. else nextNode = nextSibling(node);
  3011. break;
  3012. case Static:
  3013. if (isFragmentStart) {
  3014. node = nextSibling(node);
  3015. domType = node.nodeType;
  3016. }
  3017. if (domType === 1 || domType === 3) {
  3018. nextNode = node;
  3019. const needToAdoptContent = !vnode.children.length;
  3020. for (let i = 0; i < vnode.staticCount; i++) {
  3021. if (needToAdoptContent) vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  3022. if (i === vnode.staticCount - 1) vnode.anchor = nextNode;
  3023. nextNode = nextSibling(nextNode);
  3024. }
  3025. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  3026. } else onMismatch();
  3027. break;
  3028. case Fragment:
  3029. if (!isFragmentStart) nextNode = onMismatch();
  3030. else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
  3031. break;
  3032. default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
  3033. else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
  3034. else if (shapeFlag & 6) {
  3035. vnode.slotScopeIds = slotScopeIds;
  3036. const container = parentNode(node);
  3037. if (isFragmentStart) nextNode = locateClosingAnchor(node);
  3038. else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
  3039. else nextNode = nextSibling(node);
  3040. mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
  3041. if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
  3042. let subTree;
  3043. if (isFragmentStart) {
  3044. subTree = createVNode(Fragment);
  3045. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  3046. } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  3047. subTree.el = node;
  3048. vnode.component.subTree = subTree;
  3049. }
  3050. } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
  3051. else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
  3052. else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
  3053. else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
  3054. }
  3055. if (ref$1 != null) setRef(ref$1, null, parentSuspense, vnode);
  3056. return nextNode;
  3057. };
  3058. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  3059. optimized = optimized || !!vnode.dynamicChildren;
  3060. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  3061. const forcePatch = type === "input" || type === "option";
  3062. {
  3063. if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
  3064. let needCallTransitionHooks = false;
  3065. if (isTemplateNode(el)) {
  3066. needCallTransitionHooks = needTransition(null, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  3067. const content = el.content.firstChild;
  3068. if (needCallTransitionHooks) {
  3069. const cls = content.getAttribute("class");
  3070. if (cls) content.$cls = cls;
  3071. transition.beforeEnter(content);
  3072. }
  3073. replaceNode(content, el, parentComponent);
  3074. vnode.el = el = content;
  3075. }
  3076. if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
  3077. let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
  3078. let hasWarned$1 = false;
  3079. while (next) {
  3080. if (!isMismatchAllowed(el, 1)) {
  3081. if (!hasWarned$1) {
  3082. warn$1(`Hydration children mismatch on`, el, `
  3083. Server rendered element contains more child nodes than client vdom.`);
  3084. hasWarned$1 = true;
  3085. }
  3086. logMismatchError();
  3087. }
  3088. const cur = next;
  3089. next = next.nextSibling;
  3090. remove$1(cur);
  3091. }
  3092. } else if (shapeFlag & 8) {
  3093. let clientText = vnode.children;
  3094. if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) clientText = clientText.slice(1);
  3095. const { textContent } = el;
  3096. if (textContent !== clientText && textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
  3097. if (!isMismatchAllowed(el, 0)) {
  3098. warn$1(`Hydration text content mismatch on`, el, `
  3099. - rendered on server: ${textContent}
  3100. - expected on client: ${clientText}`);
  3101. logMismatchError();
  3102. }
  3103. el.textContent = vnode.children;
  3104. }
  3105. }
  3106. if (props) {
  3107. const isCustomElement = el.tagName.includes("-");
  3108. for (const key in props) {
  3109. if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
  3110. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key)) patchProp$1(el, key, null, props[key], void 0, parentComponent);
  3111. }
  3112. }
  3113. let vnodeHooks;
  3114. if (vnodeHooks = props && props.onVnodeBeforeMount) invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  3115. if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  3116. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) queueEffectWithSuspense(() => {
  3117. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  3118. needCallTransitionHooks && transition.enter(el);
  3119. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  3120. }, parentSuspense);
  3121. }
  3122. return el.nextSibling;
  3123. };
  3124. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  3125. optimized = optimized || !!parentVNode.dynamicChildren;
  3126. const children = parentVNode.children;
  3127. const l = children.length;
  3128. let hasWarned$1 = false;
  3129. for (let i = 0; i < l; i++) {
  3130. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  3131. const isText = vnode.type === Text;
  3132. if (node) {
  3133. if (isText && !optimized) {
  3134. if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
  3135. insert(createText(node.data.slice(vnode.children.length)), container, nextSibling(node));
  3136. node.data = vnode.children;
  3137. }
  3138. }
  3139. node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
  3140. } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
  3141. else {
  3142. if (!isMismatchAllowed(container, 1)) {
  3143. if (!hasWarned$1) {
  3144. warn$1(`Hydration children mismatch on`, container, `
  3145. Server rendered element contains fewer child nodes than client vdom.`);
  3146. hasWarned$1 = true;
  3147. }
  3148. logMismatchError();
  3149. }
  3150. patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
  3151. }
  3152. }
  3153. return node;
  3154. };
  3155. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  3156. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  3157. if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  3158. const container = parentNode(node);
  3159. const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
  3160. if (next && isComment(next) && next.data === "]") return nextSibling(vnode.anchor = next);
  3161. else {
  3162. logMismatchError();
  3163. insert(vnode.anchor = createComment(`]`), container, next);
  3164. return next;
  3165. }
  3166. };
  3167. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  3168. if (!isMismatchAllowed(node.parentElement, 1)) {
  3169. warn$1(`Hydration node mismatch:
  3170. - rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `
  3171. - expected on client:`, vnode.type);
  3172. logMismatchError();
  3173. }
  3174. vnode.el = null;
  3175. if (isFragment) {
  3176. const end = locateClosingAnchor(node);
  3177. while (true) {
  3178. const next2 = nextSibling(node);
  3179. if (next2 && next2 !== end) remove$1(next2);
  3180. else break;
  3181. }
  3182. }
  3183. const next = nextSibling(node);
  3184. const container = parentNode(node);
  3185. remove$1(node);
  3186. patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
  3187. if (parentComponent) {
  3188. parentComponent.vnode.el = vnode.el;
  3189. updateHOCHostEl(parentComponent, vnode.el);
  3190. }
  3191. return next;
  3192. };
  3193. const locateClosingAnchor = (node, open = "[", close = "]") => {
  3194. let match = 0;
  3195. while (node) {
  3196. node = nextSibling(node);
  3197. if (node && isComment(node)) {
  3198. if (node.data === open) match++;
  3199. if (node.data === close) if (match === 0) return nextSibling(node);
  3200. else match--;
  3201. }
  3202. }
  3203. return node;
  3204. };
  3205. const replaceNode = (newNode, oldNode, parentComponent) => {
  3206. const parentNode2 = oldNode.parentNode;
  3207. if (parentNode2) parentNode2.replaceChild(newNode, oldNode);
  3208. let parent = parentComponent;
  3209. while (parent) {
  3210. if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
  3211. parent = parent.parent;
  3212. }
  3213. };
  3214. const isTemplateNode = (node) => {
  3215. return node.nodeType === 1 && node.tagName === "TEMPLATE";
  3216. };
  3217. return [hydrate$1, hydrateNode];
  3218. }
  3219. function propHasMismatch(el, key, clientValue, vnode, instance) {
  3220. let mismatchType;
  3221. let mismatchKey;
  3222. let actual;
  3223. let expected;
  3224. if (key === "class") {
  3225. if (el.$cls) {
  3226. actual = el.$cls;
  3227. delete el.$cls;
  3228. } else actual = el.getAttribute("class");
  3229. expected = normalizeClass(clientValue);
  3230. if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
  3231. mismatchType = 2;
  3232. mismatchKey = `class`;
  3233. }
  3234. } else if (key === "style") {
  3235. actual = el.getAttribute("style") || "";
  3236. expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
  3237. const actualMap = toStyleMap(actual);
  3238. const expectedMap = toStyleMap(expected);
  3239. if (vnode.dirs) {
  3240. for (const { dir, value } of vnode.dirs) if (dir.name === "show" && !value) expectedMap.set("display", "none");
  3241. }
  3242. if (instance) resolveCssVars(instance, vnode, expectedMap);
  3243. if (!isMapEqual(actualMap, expectedMap)) {
  3244. mismatchType = 3;
  3245. mismatchKey = "style";
  3246. }
  3247. } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
  3248. if (isBooleanAttr(key)) {
  3249. actual = el.hasAttribute(key);
  3250. expected = includeBooleanAttr(clientValue);
  3251. } else if (clientValue == null) {
  3252. actual = el.hasAttribute(key);
  3253. expected = false;
  3254. } else {
  3255. if (el.hasAttribute(key)) actual = el.getAttribute(key);
  3256. else if (key === "value" && el.tagName === "TEXTAREA") actual = el.value;
  3257. else actual = false;
  3258. expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
  3259. }
  3260. if (actual !== expected) {
  3261. mismatchType = 4;
  3262. mismatchKey = key;
  3263. }
  3264. }
  3265. if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
  3266. const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
  3267. warn$1(`Hydration ${MismatchTypeString[mismatchType]} mismatch on`, el, `
  3268. - rendered on server: ${format(actual)}
  3269. - expected on client: ${format(expected)}
  3270. Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  3271. You should fix the source of the mismatch.`);
  3272. return true;
  3273. }
  3274. return false;
  3275. }
  3276. function toClassSet(str) {
  3277. return new Set(str.trim().split(/\s+/));
  3278. }
  3279. function isSetEqual(a, b) {
  3280. if (a.size !== b.size) return false;
  3281. for (const s of a) if (!b.has(s)) return false;
  3282. return true;
  3283. }
  3284. function toStyleMap(str) {
  3285. const styleMap = /* @__PURE__ */ new Map();
  3286. for (const item of str.split(";")) {
  3287. let [key, value] = item.split(":");
  3288. key = key.trim();
  3289. value = value && value.trim();
  3290. if (key && value) styleMap.set(key, value);
  3291. }
  3292. return styleMap;
  3293. }
  3294. function isMapEqual(a, b) {
  3295. if (a.size !== b.size) return false;
  3296. for (const [key, value] of a) if (value !== b.get(key)) return false;
  3297. return true;
  3298. }
  3299. function resolveCssVars(instance, vnode, expectedMap) {
  3300. const root = instance.subTree;
  3301. if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
  3302. const cssVars = instance.getCssVars();
  3303. for (const key in cssVars) {
  3304. const value = normalizeCssVarValue(cssVars[key]);
  3305. expectedMap.set(`--${getEscapedCssVarName(key, false)}`, value);
  3306. }
  3307. }
  3308. if (vnode === root && instance.parent) resolveCssVars(instance.parent, instance.vnode, expectedMap);
  3309. }
  3310. var allowMismatchAttr = "data-allow-mismatch";
  3311. var MismatchTypeString = {
  3312. [0]: "text",
  3313. [1]: "children",
  3314. [2]: "class",
  3315. [3]: "style",
  3316. [4]: "attribute"
  3317. };
  3318. function isMismatchAllowed(el, allowedType) {
  3319. if (allowedType === 0 || allowedType === 1) while (el && !el.hasAttribute(allowMismatchAttr)) el = el.parentElement;
  3320. const allowedAttr = el && el.getAttribute(allowMismatchAttr);
  3321. if (allowedAttr == null) return false;
  3322. else if (allowedAttr === "") return true;
  3323. else {
  3324. const list = allowedAttr.split(",");
  3325. if (allowedType === 0 && list.includes("children")) return true;
  3326. return list.includes(MismatchTypeString[allowedType]);
  3327. }
  3328. }
  3329. var requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
  3330. var cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
  3331. var hydrateOnIdle = (timeout = 1e4) => (hydrate$1) => {
  3332. const id = requestIdleCallback(hydrate$1, { timeout });
  3333. return () => cancelIdleCallback(id);
  3334. };
  3335. function elementIsVisibleInViewport(el) {
  3336. const { top, left, bottom, right } = el.getBoundingClientRect();
  3337. const { innerHeight, innerWidth } = window;
  3338. return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
  3339. }
  3340. var hydrateOnVisible = (opts) => (hydrate$1, forEach) => {
  3341. const ob = new IntersectionObserver((entries) => {
  3342. for (const e of entries) {
  3343. if (!e.isIntersecting) continue;
  3344. ob.disconnect();
  3345. hydrate$1();
  3346. break;
  3347. }
  3348. }, opts);
  3349. forEach((el) => {
  3350. if (!(el instanceof Element)) return;
  3351. if (elementIsVisibleInViewport(el)) {
  3352. hydrate$1();
  3353. ob.disconnect();
  3354. return false;
  3355. }
  3356. ob.observe(el);
  3357. });
  3358. return () => ob.disconnect();
  3359. };
  3360. var hydrateOnMediaQuery = (query) => (hydrate$1) => {
  3361. if (query) {
  3362. const mql = matchMedia(query);
  3363. if (mql.matches) hydrate$1();
  3364. else {
  3365. mql.addEventListener("change", hydrate$1, { once: true });
  3366. return () => mql.removeEventListener("change", hydrate$1);
  3367. }
  3368. }
  3369. };
  3370. var hydrateOnInteraction = (interactions = []) => (hydrate$1, forEach) => {
  3371. if (isString(interactions)) interactions = [interactions];
  3372. let hasHydrated = false;
  3373. const doHydrate = (e) => {
  3374. if (!hasHydrated) {
  3375. hasHydrated = true;
  3376. teardown();
  3377. hydrate$1();
  3378. e.target.dispatchEvent(new e.constructor(e.type, e));
  3379. }
  3380. };
  3381. const teardown = () => {
  3382. forEach((el) => {
  3383. for (const i of interactions) el.removeEventListener(i, doHydrate);
  3384. });
  3385. };
  3386. forEach((el) => {
  3387. for (const i of interactions) el.addEventListener(i, doHydrate, { once: true });
  3388. });
  3389. return teardown;
  3390. };
  3391. function forEachElement(node, cb) {
  3392. if (isComment(node) && node.data === "[") {
  3393. let depth = 1;
  3394. let next = node.nextSibling;
  3395. while (next) {
  3396. if (next.nodeType === 1) {
  3397. if (cb(next) === false) break;
  3398. } else if (isComment(next)) {
  3399. if (next.data === "]") {
  3400. if (--depth === 0) break;
  3401. } else if (next.data === "[") depth++;
  3402. }
  3403. next = next.nextSibling;
  3404. }
  3405. } else cb(node);
  3406. }
  3407. var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  3408. /* @__NO_SIDE_EFFECTS__ */
  3409. function defineAsyncComponent(source) {
  3410. if (isFunction(source)) source = { loader: source };
  3411. const { loader, loadingComponent, errorComponent, delay = 200, hydrate: hydrateStrategy, timeout, suspensible = true, onError: userOnError } = source;
  3412. let pendingRequest = null;
  3413. let resolvedComp;
  3414. let retries = 0;
  3415. const retry = () => {
  3416. retries++;
  3417. pendingRequest = null;
  3418. return load();
  3419. };
  3420. const load = () => {
  3421. let thisRequest;
  3422. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  3423. err = err instanceof Error ? err : new Error(String(err));
  3424. if (userOnError) return new Promise((resolve$1, reject) => {
  3425. const userRetry = () => resolve$1(retry());
  3426. const userFail = () => reject(err);
  3427. userOnError(err, userRetry, userFail, retries + 1);
  3428. });
  3429. else throw err;
  3430. }).then((comp) => {
  3431. if (thisRequest !== pendingRequest && pendingRequest) return pendingRequest;
  3432. if (!comp) warn$1(`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`);
  3433. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) comp = comp.default;
  3434. if (comp && !isObject(comp) && !isFunction(comp)) throw new Error(`Invalid async component load result: ${comp}`);
  3435. resolvedComp = comp;
  3436. return comp;
  3437. }));
  3438. };
  3439. return /* @__PURE__ */ defineComponent({
  3440. name: "AsyncComponentWrapper",
  3441. __asyncLoader: load,
  3442. __asyncHydrate(el, instance, hydrate$1) {
  3443. let patched = false;
  3444. (instance.bu || (instance.bu = [])).push(() => patched = true);
  3445. const performHydrate = () => {
  3446. if (patched) {
  3447. warn$1(`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`);
  3448. return;
  3449. }
  3450. hydrate$1();
  3451. };
  3452. const doHydrate = hydrateStrategy ? () => {
  3453. const teardown = hydrateStrategy(performHydrate, (cb) => forEachElement(el, cb));
  3454. if (teardown) (instance.bum || (instance.bum = [])).push(teardown);
  3455. } : performHydrate;
  3456. if (resolvedComp) doHydrate();
  3457. else load().then(() => !instance.isUnmounted && doHydrate());
  3458. },
  3459. get __asyncResolved() {
  3460. return resolvedComp;
  3461. },
  3462. setup() {
  3463. const instance = currentInstance;
  3464. markAsyncBoundary(instance);
  3465. if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
  3466. const onError = (err) => {
  3467. pendingRequest = null;
  3468. handleError(err, instance, 13, !errorComponent);
  3469. };
  3470. if (suspensible && instance.suspense || isInSSRComponentSetup) return load().then((comp) => {
  3471. return () => createInnerComp(comp, instance);
  3472. }).catch((err) => {
  3473. onError(err);
  3474. return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
  3475. });
  3476. const loaded = ref(false);
  3477. const error = ref();
  3478. const delayed = ref(!!delay);
  3479. if (delay) setTimeout(() => {
  3480. delayed.value = false;
  3481. }, delay);
  3482. if (timeout != null) setTimeout(() => {
  3483. if (!loaded.value && !error.value) {
  3484. const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
  3485. onError(err);
  3486. error.value = err;
  3487. }
  3488. }, timeout);
  3489. load().then(() => {
  3490. loaded.value = true;
  3491. if (instance.parent && isKeepAlive(instance.parent.vnode)) instance.parent.update();
  3492. }).catch((err) => {
  3493. onError(err);
  3494. error.value = err;
  3495. });
  3496. return () => {
  3497. if (loaded.value && resolvedComp) return createInnerComp(resolvedComp, instance);
  3498. else if (error.value && errorComponent) return createVNode(errorComponent, { error: error.value });
  3499. else if (loadingComponent && !delayed.value) return createInnerComp(loadingComponent, instance);
  3500. };
  3501. }
  3502. });
  3503. }
  3504. function createInnerComp(comp, parent) {
  3505. const { ref: ref2, props, children, ce } = parent.vnode;
  3506. const vnode = createVNode(comp, props, children);
  3507. vnode.ref = ref2;
  3508. vnode.ce = ce;
  3509. delete parent.vnode.ce;
  3510. return vnode;
  3511. }
  3512. var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  3513. var KeepAlive = {
  3514. name: `KeepAlive`,
  3515. __isKeepAlive: true,
  3516. props: {
  3517. include: [
  3518. String,
  3519. RegExp,
  3520. Array
  3521. ],
  3522. exclude: [
  3523. String,
  3524. RegExp,
  3525. Array
  3526. ],
  3527. max: [String, Number]
  3528. },
  3529. setup(props, { slots }) {
  3530. const instance = getCurrentInstance();
  3531. const sharedContext = instance.ctx;
  3532. if (!sharedContext.renderer) return () => {
  3533. const children = slots.default && slots.default();
  3534. return children && children.length === 1 ? children[0] : children;
  3535. };
  3536. const cache = /* @__PURE__ */ new Map();
  3537. const keys = /* @__PURE__ */ new Set();
  3538. let current = null;
  3539. instance.__v_cache = cache;
  3540. const parentSuspense = instance.suspense;
  3541. const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;
  3542. const storageContainer = createElement("div");
  3543. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  3544. const instance2 = vnode.component;
  3545. move(vnode, container, anchor, 0, parentSuspense);
  3546. patch(instance2.vnode, vnode, container, anchor, instance2, parentSuspense, namespace, vnode.slotScopeIds, optimized);
  3547. queuePostRenderEffect(() => {
  3548. instance2.isDeactivated = false;
  3549. if (instance2.a) invokeArrayFns(instance2.a);
  3550. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  3551. if (vnodeHook) invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  3552. }, parentSuspense);
  3553. devtoolsComponentAdded(instance2);
  3554. };
  3555. sharedContext.deactivate = (vnode) => {
  3556. const instance2 = vnode.component;
  3557. invalidateMount(instance2.m);
  3558. invalidateMount(instance2.a);
  3559. move(vnode, storageContainer, null, 1, parentSuspense);
  3560. queuePostRenderEffect(() => {
  3561. if (instance2.da) invokeArrayFns(instance2.da);
  3562. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  3563. if (vnodeHook) invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  3564. instance2.isDeactivated = true;
  3565. }, parentSuspense);
  3566. devtoolsComponentAdded(instance2);
  3567. instance2.__keepAliveStorageContainer = storageContainer;
  3568. };
  3569. function unmount(vnode) {
  3570. resetShapeFlag(vnode);
  3571. _unmount(vnode, instance, parentSuspense, true);
  3572. }
  3573. function pruneCache(filter) {
  3574. cache.forEach((vnode, key) => {
  3575. const name = getComponentName(isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type);
  3576. if (name && !filter(name)) pruneCacheEntry(key);
  3577. });
  3578. }
  3579. function pruneCacheEntry(key) {
  3580. const cached = cache.get(key);
  3581. if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
  3582. else if (current) resetShapeFlag(current);
  3583. cache.delete(key);
  3584. keys.delete(key);
  3585. }
  3586. watch(() => [props.include, props.exclude], ([include, exclude]) => {
  3587. include && pruneCache((name) => matches(include, name));
  3588. exclude && pruneCache((name) => !matches(exclude, name));
  3589. }, {
  3590. flush: "post",
  3591. deep: true
  3592. });
  3593. let pendingCacheKey = null;
  3594. const cacheSubtree = () => {
  3595. if (pendingCacheKey != null) if (isSuspense(instance.subTree.type)) queuePostRenderEffect(() => {
  3596. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  3597. }, instance.subTree.suspense);
  3598. else cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  3599. };
  3600. onMounted(cacheSubtree);
  3601. onUpdated(cacheSubtree);
  3602. onBeforeUnmount(() => {
  3603. cache.forEach((cached) => {
  3604. const { subTree, suspense } = instance;
  3605. const vnode = getInnerChild(subTree);
  3606. if (cached.type === vnode.type && cached.key === vnode.key) {
  3607. resetShapeFlag(vnode);
  3608. const da = vnode.component.da;
  3609. da && queuePostRenderEffect(da, suspense);
  3610. return;
  3611. }
  3612. unmount(cached);
  3613. });
  3614. });
  3615. return () => {
  3616. pendingCacheKey = null;
  3617. if (!slots.default) return current = null;
  3618. const children = slots.default();
  3619. const rawVNode = children[0];
  3620. if (children.length > 1) {
  3621. warn$1(`KeepAlive should contain exactly one component child.`);
  3622. current = null;
  3623. return children;
  3624. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  3625. current = null;
  3626. return rawVNode;
  3627. }
  3628. let vnode = getInnerChild(rawVNode);
  3629. if (vnode.type === Comment) {
  3630. current = null;
  3631. return vnode;
  3632. }
  3633. const comp = vnode.type;
  3634. const name = getComponentName(isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp);
  3635. const { include, exclude, max } = props;
  3636. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  3637. vnode.shapeFlag &= -257;
  3638. current = vnode;
  3639. return rawVNode;
  3640. }
  3641. const key = vnode.key == null ? comp : vnode.key;
  3642. const cachedVNode = cache.get(key);
  3643. if (vnode.el) {
  3644. vnode = cloneVNode(vnode);
  3645. if (rawVNode.shapeFlag & 128) rawVNode.ssContent = vnode;
  3646. }
  3647. pendingCacheKey = key;
  3648. if (cachedVNode) {
  3649. vnode.el = cachedVNode.el;
  3650. vnode.component = cachedVNode.component;
  3651. if (vnode.transition) setTransitionHooks(vnode, vnode.transition);
  3652. vnode.shapeFlag |= 512;
  3653. keys.delete(key);
  3654. keys.add(key);
  3655. } else {
  3656. keys.add(key);
  3657. if (max && keys.size > parseInt(max, 10)) pruneCacheEntry(keys.values().next().value);
  3658. }
  3659. vnode.shapeFlag |= 256;
  3660. current = vnode;
  3661. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  3662. };
  3663. }
  3664. };
  3665. function matches(pattern, name) {
  3666. if (isArray(pattern)) return pattern.some((p$1) => matches(p$1, name));
  3667. else if (isString(pattern)) return pattern.split(",").includes(name);
  3668. else if (isRegExp(pattern)) {
  3669. pattern.lastIndex = 0;
  3670. return pattern.test(name);
  3671. }
  3672. return false;
  3673. }
  3674. function onActivated(hook, target) {
  3675. registerKeepAliveHook(hook, "a", target);
  3676. }
  3677. function onDeactivated(hook, target) {
  3678. registerKeepAliveHook(hook, "da", target);
  3679. }
  3680. function registerKeepAliveHook(hook, type, target = currentInstance) {
  3681. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3682. let current = target;
  3683. while (current) {
  3684. if (current.isDeactivated) return;
  3685. current = current.parent;
  3686. }
  3687. return hook();
  3688. });
  3689. injectHook(type, wrappedHook, target);
  3690. if (target) {
  3691. let current = target.parent;
  3692. while (current && current.parent) {
  3693. if (isKeepAlive(current.parent.vnode)) injectToKeepAliveRoot(wrappedHook, type, target, current);
  3694. current = current.parent;
  3695. }
  3696. }
  3697. }
  3698. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  3699. const injected = injectHook(type, hook, keepAliveRoot, true);
  3700. onUnmounted(() => {
  3701. remove(keepAliveRoot[type], injected);
  3702. }, target);
  3703. }
  3704. function resetShapeFlag(vnode) {
  3705. vnode.shapeFlag &= -257;
  3706. vnode.shapeFlag &= -513;
  3707. }
  3708. function getInnerChild(vnode) {
  3709. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  3710. }
  3711. function injectHook(type, hook, target = currentInstance, prepend = false) {
  3712. if (target) {
  3713. const hooks = target[type] || (target[type] = []);
  3714. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3715. pauseTracking();
  3716. const reset = setCurrentInstance(target);
  3717. const res = callWithAsyncErrorHandling(hook, target, type, args);
  3718. reset();
  3719. resetTracking();
  3720. return res;
  3721. });
  3722. if (prepend) hooks.unshift(wrappedHook);
  3723. else hooks.push(wrappedHook);
  3724. return wrappedHook;
  3725. } else warn$1(`${toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""))} 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.`);
  3726. }
  3727. var createHook = (lifecycle) => (hook, target = currentInstance) => {
  3728. if (!isInSSRComponentSetup || lifecycle === "sp") injectHook(lifecycle, (...args) => hook(...args), target);
  3729. };
  3730. var onBeforeMount = createHook("bm");
  3731. var onMounted = createHook("m");
  3732. var onBeforeUpdate = createHook("bu");
  3733. var onUpdated = createHook("u");
  3734. var onBeforeUnmount = createHook("bum");
  3735. var onUnmounted = createHook("um");
  3736. var onServerPrefetch = createHook("sp");
  3737. var onRenderTriggered = createHook("rtg");
  3738. var onRenderTracked = createHook("rtc");
  3739. function onErrorCaptured(hook, target = currentInstance) {
  3740. injectHook("ec", hook, target);
  3741. }
  3742. var COMPONENTS = "components";
  3743. var DIRECTIVES = "directives";
  3744. function resolveComponent(name, maybeSelfReference) {
  3745. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  3746. }
  3747. var NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
  3748. function resolveDynamicComponent(component) {
  3749. if (isString(component)) return resolveAsset(COMPONENTS, component, false) || component;
  3750. else return component || NULL_DYNAMIC_COMPONENT;
  3751. }
  3752. function resolveDirective(name) {
  3753. return resolveAsset(DIRECTIVES, name);
  3754. }
  3755. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  3756. const instance = currentRenderingInstance || currentInstance;
  3757. if (instance) {
  3758. const Component = instance.type;
  3759. if (type === COMPONENTS) {
  3760. const selfName = getComponentName(Component, false);
  3761. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) return Component;
  3762. }
  3763. const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
  3764. if (!res && maybeSelfReference) return Component;
  3765. if (warnMissing && !res) {
  3766. const extra = type === COMPONENTS ? `
  3767. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  3768. warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  3769. }
  3770. return res;
  3771. } else warn$1(`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`);
  3772. }
  3773. function resolve(registry, name) {
  3774. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  3775. }
  3776. function renderList(source, renderItem, cache, index) {
  3777. let ret;
  3778. const cached = cache && cache[index];
  3779. const sourceIsArray = isArray(source);
  3780. if (sourceIsArray || isString(source)) {
  3781. const sourceIsReactiveArray = sourceIsArray && isReactive(source);
  3782. let needsWrap = false;
  3783. let isReadonlySource = false;
  3784. if (sourceIsReactiveArray) {
  3785. needsWrap = !isShallow(source);
  3786. isReadonlySource = isReadonly(source);
  3787. source = shallowReadArray(source);
  3788. }
  3789. ret = new Array(source.length);
  3790. for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
  3791. } else if (typeof source === "number") {
  3792. if (!Number.isInteger(source)) warn$1(`The v-for range expect an integer value but got ${source}.`);
  3793. ret = new Array(source);
  3794. for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  3795. } else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
  3796. else {
  3797. const keys = Object.keys(source);
  3798. ret = new Array(keys.length);
  3799. for (let i = 0, l = keys.length; i < l; i++) {
  3800. const key = keys[i];
  3801. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  3802. }
  3803. }
  3804. else ret = [];
  3805. if (cache) cache[index] = ret;
  3806. return ret;
  3807. }
  3808. function createSlots(slots, dynamicSlots) {
  3809. for (let i = 0; i < dynamicSlots.length; i++) {
  3810. const slot = dynamicSlots[i];
  3811. if (isArray(slot)) for (let j = 0; j < slot.length; j++) slots[slot[j].name] = slot[j].fn;
  3812. else if (slot) slots[slot.name] = slot.key ? (...args) => {
  3813. const res = slot.fn(...args);
  3814. if (res) res.key = slot.key;
  3815. return res;
  3816. } : slot.fn;
  3817. }
  3818. return slots;
  3819. }
  3820. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  3821. if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
  3822. const hasProps = Object.keys(props).length > 0;
  3823. if (name !== "default") props.name = name;
  3824. return openBlock(), createBlock(Fragment, null, [createVNode("slot", props, fallback && fallback())], hasProps ? -2 : 64);
  3825. }
  3826. let slot = slots[name];
  3827. if (slot && slot.length > 1) {
  3828. warn$1(`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.`);
  3829. slot = () => [];
  3830. }
  3831. if (slot && slot._c) slot._d = false;
  3832. openBlock();
  3833. const validSlotContent = slot && ensureValidVNode(slot(props));
  3834. const slotKey = props.key || validSlotContent && validSlotContent.key;
  3835. const rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
  3836. if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
  3837. if (slot && slot._c) slot._d = true;
  3838. return rendered;
  3839. }
  3840. function ensureValidVNode(vnodes) {
  3841. return vnodes.some((child) => {
  3842. if (!isVNode(child)) return true;
  3843. if (child.type === Comment) return false;
  3844. if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
  3845. return true;
  3846. }) ? vnodes : null;
  3847. }
  3848. function toHandlers(obj, preserveCaseIfNecessary) {
  3849. const ret = {};
  3850. if (!isObject(obj)) {
  3851. warn$1(`v-on with no argument expects an object value.`);
  3852. return ret;
  3853. }
  3854. for (const key in obj) ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  3855. return ret;
  3856. }
  3857. var getPublicInstance = (i) => {
  3858. if (!i) return null;
  3859. if (isStatefulComponent(i)) return getComponentPublicInstance(i);
  3860. return getPublicInstance(i.parent);
  3861. };
  3862. var publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
  3863. $: (i) => i,
  3864. $el: (i) => i.vnode.el,
  3865. $data: (i) => i.data,
  3866. $props: (i) => shallowReadonly(i.props),
  3867. $attrs: (i) => shallowReadonly(i.attrs),
  3868. $slots: (i) => shallowReadonly(i.slots),
  3869. $refs: (i) => shallowReadonly(i.refs),
  3870. $parent: (i) => getPublicInstance(i.parent),
  3871. $root: (i) => getPublicInstance(i.root),
  3872. $host: (i) => i.ce,
  3873. $emit: (i) => i.emit,
  3874. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  3875. $forceUpdate: (i) => i.f || (i.f = () => {
  3876. queueJob(i.update);
  3877. }),
  3878. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  3879. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  3880. });
  3881. var isReservedPrefix = (key) => key === "_" || key === "$";
  3882. var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  3883. var PublicInstanceProxyHandlers = {
  3884. get({ _: instance }, key) {
  3885. if (key === "__v_skip") return true;
  3886. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  3887. if (key === "__isVue") return true;
  3888. if (key[0] !== "$") {
  3889. const n = accessCache[key];
  3890. if (n !== void 0) switch (n) {
  3891. case 1: return setupState[key];
  3892. case 2: return data[key];
  3893. case 4: return ctx[key];
  3894. case 3: return props[key];
  3895. }
  3896. else if (hasSetupBinding(setupState, key)) {
  3897. accessCache[key] = 1;
  3898. return setupState[key];
  3899. } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
  3900. accessCache[key] = 2;
  3901. return data[key];
  3902. } else if (hasOwn(props, key)) {
  3903. accessCache[key] = 3;
  3904. return props[key];
  3905. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3906. accessCache[key] = 4;
  3907. return ctx[key];
  3908. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) accessCache[key] = 0;
  3909. }
  3910. const publicGetter = publicPropertiesMap[key];
  3911. let cssModule, globalProperties;
  3912. if (publicGetter) {
  3913. if (key === "$attrs") {
  3914. track(instance.attrs, "get", "");
  3915. markAttrsAccessed();
  3916. } else if (key === "$slots") track(instance, "get", key);
  3917. return publicGetter(instance);
  3918. } else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) return cssModule;
  3919. else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3920. accessCache[key] = 4;
  3921. return ctx[key];
  3922. } else if (globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) return globalProperties[key];
  3923. else if (currentRenderingInstance && (!isString(key) || key.indexOf("__v") !== 0)) {
  3924. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);
  3925. else if (instance === currentRenderingInstance) warn$1(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
  3926. }
  3927. },
  3928. set({ _: instance }, key, value) {
  3929. const { data, setupState, ctx } = instance;
  3930. if (hasSetupBinding(setupState, key)) {
  3931. setupState[key] = value;
  3932. return true;
  3933. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  3934. warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  3935. return false;
  3936. } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
  3937. data[key] = value;
  3938. return true;
  3939. } else if (hasOwn(instance.props, key)) {
  3940. warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
  3941. return false;
  3942. }
  3943. if (key[0] === "$" && key.slice(1) in instance) {
  3944. warn$1(`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`);
  3945. return false;
  3946. } else if (key in instance.appContext.config.globalProperties) Object.defineProperty(ctx, key, {
  3947. enumerable: true,
  3948. configurable: true,
  3949. value
  3950. });
  3951. else ctx[key] = value;
  3952. return true;
  3953. },
  3954. has({ _: { data, setupState, accessCache, ctx, appContext, props, type } }, key) {
  3955. let cssModules;
  3956. return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || hasOwn(props, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
  3957. },
  3958. defineProperty(target, key, descriptor) {
  3959. if (descriptor.get != null) target._.accessCache[key] = 0;
  3960. else if (hasOwn(descriptor, "value")) this.set(target, key, descriptor.value, null);
  3961. return Reflect.defineProperty(target, key, descriptor);
  3962. }
  3963. };
  3964. PublicInstanceProxyHandlers.ownKeys = (target) => {
  3965. warn$1(`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`);
  3966. return Reflect.ownKeys(target);
  3967. };
  3968. var RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
  3969. get(target, key) {
  3970. if (key === Symbol.unscopables) return;
  3971. return PublicInstanceProxyHandlers.get(target, key, target);
  3972. },
  3973. has(_, key) {
  3974. const has = key[0] !== "_" && !isGloballyAllowed(key);
  3975. if (!has && PublicInstanceProxyHandlers.has(_, key)) warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
  3976. return has;
  3977. }
  3978. });
  3979. function createDevRenderContext(instance) {
  3980. const target = {};
  3981. Object.defineProperty(target, `_`, {
  3982. configurable: true,
  3983. enumerable: false,
  3984. get: () => instance
  3985. });
  3986. Object.keys(publicPropertiesMap).forEach((key) => {
  3987. Object.defineProperty(target, key, {
  3988. configurable: true,
  3989. enumerable: false,
  3990. get: () => publicPropertiesMap[key](instance),
  3991. set: NOOP
  3992. });
  3993. });
  3994. return target;
  3995. }
  3996. function exposePropsOnRenderContext(instance) {
  3997. const { ctx, propsOptions: [propsOptions] } = instance;
  3998. if (propsOptions) Object.keys(propsOptions).forEach((key) => {
  3999. Object.defineProperty(ctx, key, {
  4000. enumerable: true,
  4001. configurable: true,
  4002. get: () => instance.props[key],
  4003. set: NOOP
  4004. });
  4005. });
  4006. }
  4007. function exposeSetupStateOnRenderContext(instance) {
  4008. const { ctx, setupState } = instance;
  4009. Object.keys(toRaw(setupState)).forEach((key) => {
  4010. if (!setupState.__isScriptSetup) {
  4011. if (isReservedPrefix(key[0])) {
  4012. warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
  4013. return;
  4014. }
  4015. Object.defineProperty(ctx, key, {
  4016. enumerable: true,
  4017. configurable: true,
  4018. get: () => setupState[key],
  4019. set: NOOP
  4020. });
  4021. }
  4022. });
  4023. }
  4024. var warnRuntimeUsage = (method) => warn$1(`${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.`);
  4025. function defineProps() {
  4026. warnRuntimeUsage(`defineProps`);
  4027. return null;
  4028. }
  4029. function defineEmits() {
  4030. warnRuntimeUsage(`defineEmits`);
  4031. return null;
  4032. }
  4033. function defineExpose(exposed) {
  4034. warnRuntimeUsage(`defineExpose`);
  4035. }
  4036. function defineOptions(options) {
  4037. warnRuntimeUsage(`defineOptions`);
  4038. }
  4039. function defineSlots() {
  4040. warnRuntimeUsage(`defineSlots`);
  4041. return null;
  4042. }
  4043. function defineModel() {
  4044. warnRuntimeUsage("defineModel");
  4045. }
  4046. function withDefaults(props, defaults) {
  4047. warnRuntimeUsage(`withDefaults`);
  4048. return null;
  4049. }
  4050. function useSlots() {
  4051. return getContext("useSlots").slots;
  4052. }
  4053. function useAttrs() {
  4054. return getContext("useAttrs").attrs;
  4055. }
  4056. function getContext(calledFunctionName) {
  4057. const i = getCurrentInstance();
  4058. if (!i) warn$1(`${calledFunctionName}() called without active instance.`);
  4059. return i.setupContext || (i.setupContext = createSetupContext(i));
  4060. }
  4061. function normalizePropsOrEmits(props) {
  4062. return isArray(props) ? props.reduce((normalized, p$1) => (normalized[p$1] = null, normalized), {}) : props;
  4063. }
  4064. function mergeDefaults(raw, defaults) {
  4065. const props = normalizePropsOrEmits(raw);
  4066. for (const key in defaults) {
  4067. if (key.startsWith("__skip")) continue;
  4068. let opt = props[key];
  4069. if (opt) if (isArray(opt) || isFunction(opt)) opt = props[key] = {
  4070. type: opt,
  4071. default: defaults[key]
  4072. };
  4073. else opt.default = defaults[key];
  4074. else if (opt === null) opt = props[key] = { default: defaults[key] };
  4075. else warn$1(`props default key "${key}" has no corresponding declaration.`);
  4076. if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
  4077. }
  4078. return props;
  4079. }
  4080. function mergeModels(a, b) {
  4081. if (!a || !b) return a || b;
  4082. if (isArray(a) && isArray(b)) return a.concat(b);
  4083. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  4084. }
  4085. function createPropsRestProxy(props, excludedKeys) {
  4086. const ret = {};
  4087. for (const key in props) if (!excludedKeys.includes(key)) Object.defineProperty(ret, key, {
  4088. enumerable: true,
  4089. get: () => props[key]
  4090. });
  4091. return ret;
  4092. }
  4093. function withAsyncContext(getAwaitable) {
  4094. const ctx = getCurrentInstance();
  4095. if (!ctx) warn$1(`withAsyncContext called without active current instance. This is likely a bug.`);
  4096. let awaitable = getAwaitable();
  4097. unsetCurrentInstance();
  4098. if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
  4099. setCurrentInstance(ctx);
  4100. throw e;
  4101. });
  4102. return [awaitable, () => setCurrentInstance(ctx)];
  4103. }
  4104. function createDuplicateChecker() {
  4105. const cache = /* @__PURE__ */ Object.create(null);
  4106. return (type, key) => {
  4107. if (cache[key]) warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
  4108. else cache[key] = type;
  4109. };
  4110. }
  4111. var shouldCacheAccess = true;
  4112. function applyOptions(instance) {
  4113. const options = resolveMergedOptions(instance);
  4114. const publicThis = instance.proxy;
  4115. const ctx = instance.ctx;
  4116. shouldCacheAccess = false;
  4117. if (options.beforeCreate) callHook$1(options.beforeCreate, instance, "bc");
  4118. const { data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render: render$1, renderTracked, renderTriggered, errorCaptured, serverPrefetch, expose, inheritAttrs, components, directives, filters } = options;
  4119. const checkDuplicateProperties = createDuplicateChecker();
  4120. {
  4121. const [propsOptions] = instance.propsOptions;
  4122. if (propsOptions) for (const key in propsOptions) checkDuplicateProperties("Props", key);
  4123. }
  4124. if (injectOptions) resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  4125. if (methods) for (const key in methods) {
  4126. const methodHandler = methods[key];
  4127. if (isFunction(methodHandler)) {
  4128. Object.defineProperty(ctx, key, {
  4129. value: methodHandler.bind(publicThis),
  4130. configurable: true,
  4131. enumerable: true,
  4132. writable: true
  4133. });
  4134. checkDuplicateProperties("Methods", key);
  4135. } else warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`);
  4136. }
  4137. if (dataOptions) {
  4138. if (!isFunction(dataOptions)) warn$1(`The data option must be a function. Plain object usage is no longer supported.`);
  4139. const data = dataOptions.call(publicThis, publicThis);
  4140. if (isPromise(data)) warn$1(`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`);
  4141. if (!isObject(data)) warn$1(`data() should return an object.`);
  4142. else {
  4143. instance.data = reactive(data);
  4144. for (const key in data) {
  4145. checkDuplicateProperties("Data", key);
  4146. if (!isReservedPrefix(key[0])) Object.defineProperty(ctx, key, {
  4147. configurable: true,
  4148. enumerable: true,
  4149. get: () => data[key],
  4150. set: NOOP
  4151. });
  4152. }
  4153. }
  4154. }
  4155. shouldCacheAccess = true;
  4156. if (computedOptions) for (const key in computedOptions) {
  4157. const opt = computedOptions[key];
  4158. const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  4159. if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
  4160. const c = computed({
  4161. get,
  4162. set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
  4163. warn$1(`Write operation failed: computed property "${key}" is readonly.`);
  4164. }
  4165. });
  4166. Object.defineProperty(ctx, key, {
  4167. enumerable: true,
  4168. configurable: true,
  4169. get: () => c.value,
  4170. set: (v) => c.value = v
  4171. });
  4172. checkDuplicateProperties("Computed", key);
  4173. }
  4174. if (watchOptions) for (const key in watchOptions) createWatcher(watchOptions[key], ctx, publicThis, key);
  4175. if (provideOptions) {
  4176. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  4177. Reflect.ownKeys(provides).forEach((key) => {
  4178. provide(key, provides[key]);
  4179. });
  4180. }
  4181. if (created) callHook$1(created, instance, "c");
  4182. function registerLifecycleHook(register, hook) {
  4183. if (isArray(hook)) hook.forEach((_hook) => register(_hook.bind(publicThis)));
  4184. else if (hook) register(hook.bind(publicThis));
  4185. }
  4186. registerLifecycleHook(onBeforeMount, beforeMount);
  4187. registerLifecycleHook(onMounted, mounted);
  4188. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4189. registerLifecycleHook(onUpdated, updated);
  4190. registerLifecycleHook(onActivated, activated);
  4191. registerLifecycleHook(onDeactivated, deactivated);
  4192. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4193. registerLifecycleHook(onRenderTracked, renderTracked);
  4194. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4195. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4196. registerLifecycleHook(onUnmounted, unmounted);
  4197. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4198. if (isArray(expose)) {
  4199. if (expose.length) {
  4200. const exposed = instance.exposed || (instance.exposed = {});
  4201. expose.forEach((key) => {
  4202. Object.defineProperty(exposed, key, {
  4203. get: () => publicThis[key],
  4204. set: (val) => publicThis[key] = val,
  4205. enumerable: true
  4206. });
  4207. });
  4208. } else if (!instance.exposed) instance.exposed = {};
  4209. }
  4210. if (render$1 && instance.render === NOOP) instance.render = render$1;
  4211. if (inheritAttrs != null) instance.inheritAttrs = inheritAttrs;
  4212. if (components) instance.components = components;
  4213. if (directives) instance.directives = directives;
  4214. if (serverPrefetch) markAsyncBoundary(instance);
  4215. }
  4216. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  4217. if (isArray(injectOptions)) injectOptions = normalizeInject(injectOptions);
  4218. for (const key in injectOptions) {
  4219. const opt = injectOptions[key];
  4220. let injected;
  4221. if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
  4222. else injected = inject(opt.from || key);
  4223. else injected = inject(opt);
  4224. if (isRef(injected)) Object.defineProperty(ctx, key, {
  4225. enumerable: true,
  4226. configurable: true,
  4227. get: () => injected.value,
  4228. set: (v) => injected.value = v
  4229. });
  4230. else ctx[key] = injected;
  4231. checkDuplicateProperties("Inject", key);
  4232. }
  4233. }
  4234. function callHook$1(hook, instance, type) {
  4235. callWithAsyncErrorHandling(isArray(hook) ? hook.map((h$1) => h$1.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
  4236. }
  4237. function createWatcher(raw, ctx, publicThis, key) {
  4238. let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4239. if (isString(raw)) {
  4240. const handler = ctx[raw];
  4241. if (isFunction(handler)) watch(getter, handler);
  4242. else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
  4243. } else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
  4244. else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  4245. else {
  4246. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4247. if (isFunction(handler)) watch(getter, handler, raw);
  4248. else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4249. }
  4250. else warn$1(`Invalid watch option: "${key}"`, raw);
  4251. }
  4252. function resolveMergedOptions(instance) {
  4253. const base = instance.type;
  4254. const { mixins, extends: extendsOptions } = base;
  4255. const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
  4256. const cached = cache.get(base);
  4257. let resolved;
  4258. if (cached) resolved = cached;
  4259. else if (!globalMixins.length && !mixins && !extendsOptions) resolved = base;
  4260. else {
  4261. resolved = {};
  4262. if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
  4263. mergeOptions(resolved, base, optionMergeStrategies);
  4264. }
  4265. if (isObject(base)) cache.set(base, resolved);
  4266. return resolved;
  4267. }
  4268. function mergeOptions(to, from, strats, asMixin = false) {
  4269. const { mixins, extends: extendsOptions } = from;
  4270. if (extendsOptions) mergeOptions(to, extendsOptions, strats, true);
  4271. if (mixins) mixins.forEach((m) => mergeOptions(to, m, strats, true));
  4272. for (const key in from) if (asMixin && key === "expose") warn$1(`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`);
  4273. else {
  4274. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  4275. to[key] = strat ? strat(to[key], from[key]) : from[key];
  4276. }
  4277. return to;
  4278. }
  4279. var internalOptionMergeStrats = {
  4280. data: mergeDataFn,
  4281. props: mergeEmitsOrPropsOptions,
  4282. emits: mergeEmitsOrPropsOptions,
  4283. methods: mergeObjectOptions,
  4284. computed: mergeObjectOptions,
  4285. beforeCreate: mergeAsArray,
  4286. created: mergeAsArray,
  4287. beforeMount: mergeAsArray,
  4288. mounted: mergeAsArray,
  4289. beforeUpdate: mergeAsArray,
  4290. updated: mergeAsArray,
  4291. beforeDestroy: mergeAsArray,
  4292. beforeUnmount: mergeAsArray,
  4293. destroyed: mergeAsArray,
  4294. unmounted: mergeAsArray,
  4295. activated: mergeAsArray,
  4296. deactivated: mergeAsArray,
  4297. errorCaptured: mergeAsArray,
  4298. serverPrefetch: mergeAsArray,
  4299. components: mergeObjectOptions,
  4300. directives: mergeObjectOptions,
  4301. watch: mergeWatchOptions,
  4302. provide: mergeDataFn,
  4303. inject: mergeInject
  4304. };
  4305. function mergeDataFn(to, from) {
  4306. if (!from) return to;
  4307. if (!to) return from;
  4308. return function mergedDataFn() {
  4309. return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
  4310. };
  4311. }
  4312. function mergeInject(to, from) {
  4313. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  4314. }
  4315. function normalizeInject(raw) {
  4316. if (isArray(raw)) {
  4317. const res = {};
  4318. for (let i = 0; i < raw.length; i++) res[raw[i]] = raw[i];
  4319. return res;
  4320. }
  4321. return raw;
  4322. }
  4323. function mergeAsArray(to, from) {
  4324. return to ? [...new Set([].concat(to, from))] : from;
  4325. }
  4326. function mergeObjectOptions(to, from) {
  4327. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  4328. }
  4329. function mergeEmitsOrPropsOptions(to, from) {
  4330. if (to) {
  4331. if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
  4332. return extend(/* @__PURE__ */ Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from != null ? from : {}));
  4333. } else return from;
  4334. }
  4335. function mergeWatchOptions(to, from) {
  4336. if (!to) return from;
  4337. if (!from) return to;
  4338. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  4339. for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
  4340. return merged;
  4341. }
  4342. function createAppContext() {
  4343. return {
  4344. app: null,
  4345. config: {
  4346. isNativeTag: NO,
  4347. performance: false,
  4348. globalProperties: {},
  4349. optionMergeStrategies: {},
  4350. errorHandler: void 0,
  4351. warnHandler: void 0,
  4352. compilerOptions: {}
  4353. },
  4354. mixins: [],
  4355. components: {},
  4356. directives: {},
  4357. provides: /* @__PURE__ */ Object.create(null),
  4358. optionsCache: /* @__PURE__ */ new WeakMap(),
  4359. propsCache: /* @__PURE__ */ new WeakMap(),
  4360. emitsCache: /* @__PURE__ */ new WeakMap()
  4361. };
  4362. }
  4363. var uid$1 = 0;
  4364. function createAppAPI(render$1, hydrate$1) {
  4365. return function createApp$1(rootComponent, rootProps = null) {
  4366. if (!isFunction(rootComponent)) rootComponent = extend({}, rootComponent);
  4367. if (rootProps != null && !isObject(rootProps)) {
  4368. warn$1(`root props passed to app.mount() must be an object.`);
  4369. rootProps = null;
  4370. }
  4371. const context = createAppContext();
  4372. const installedPlugins = /* @__PURE__ */ new WeakSet();
  4373. const pluginCleanupFns = [];
  4374. let isMounted = false;
  4375. const app = context.app = {
  4376. _uid: uid$1++,
  4377. _component: rootComponent,
  4378. _props: rootProps,
  4379. _container: null,
  4380. _context: context,
  4381. _instance: null,
  4382. version,
  4383. get config() {
  4384. return context.config;
  4385. },
  4386. set config(v) {
  4387. warn$1(`app.config cannot be replaced. Modify individual options instead.`);
  4388. },
  4389. use(plugin, ...options) {
  4390. if (installedPlugins.has(plugin)) warn$1(`Plugin has already been applied to target app.`);
  4391. else if (plugin && isFunction(plugin.install)) {
  4392. installedPlugins.add(plugin);
  4393. plugin.install(app, ...options);
  4394. } else if (isFunction(plugin)) {
  4395. installedPlugins.add(plugin);
  4396. plugin(app, ...options);
  4397. } else warn$1(`A plugin must either be a function or an object with an "install" function.`);
  4398. return app;
  4399. },
  4400. mixin(mixin) {
  4401. if (__VUE_OPTIONS_API__) if (!context.mixins.includes(mixin)) context.mixins.push(mixin);
  4402. else warn$1("Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : ""));
  4403. else warn$1("Mixins are only available in builds supporting Options API");
  4404. return app;
  4405. },
  4406. component(name, component) {
  4407. validateComponentName(name, context.config);
  4408. if (!component) return context.components[name];
  4409. if (context.components[name]) warn$1(`Component "${name}" has already been registered in target app.`);
  4410. context.components[name] = component;
  4411. return app;
  4412. },
  4413. directive(name, directive) {
  4414. validateDirectiveName(name);
  4415. if (!directive) return context.directives[name];
  4416. if (context.directives[name]) warn$1(`Directive "${name}" has already been registered in target app.`);
  4417. context.directives[name] = directive;
  4418. return app;
  4419. },
  4420. mount(rootContainer, isHydrate, namespace) {
  4421. if (!isMounted) {
  4422. if (rootContainer.__vue_app__) warn$1(`There is already an app instance mounted on the host container.
  4423. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`);
  4424. const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
  4425. vnode.appContext = context;
  4426. if (namespace === true) namespace = "svg";
  4427. else if (namespace === false) namespace = void 0;
  4428. context.reload = () => {
  4429. const cloned = cloneVNode(vnode);
  4430. cloned.el = null;
  4431. render$1(cloned, rootContainer, namespace);
  4432. };
  4433. if (isHydrate && hydrate$1) hydrate$1(vnode, rootContainer);
  4434. else render$1(vnode, rootContainer, namespace);
  4435. isMounted = true;
  4436. app._container = rootContainer;
  4437. rootContainer.__vue_app__ = app;
  4438. app._instance = vnode.component;
  4439. devtoolsInitApp(app, version);
  4440. return getComponentPublicInstance(vnode.component);
  4441. } else warn$1(`App has already been mounted.
  4442. 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)\``);
  4443. },
  4444. onUnmount(cleanupFn) {
  4445. if (typeof cleanupFn !== "function") warn$1(`Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`);
  4446. pluginCleanupFns.push(cleanupFn);
  4447. },
  4448. unmount() {
  4449. if (isMounted) {
  4450. callWithAsyncErrorHandling(pluginCleanupFns, app._instance, 16);
  4451. render$1(null, app._container);
  4452. app._instance = null;
  4453. devtoolsUnmountApp(app);
  4454. delete app._container.__vue_app__;
  4455. } else warn$1(`Cannot unmount an app that is not mounted.`);
  4456. },
  4457. provide(key, value) {
  4458. if (key in context.provides) if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
  4459. else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
  4460. context.provides[key] = value;
  4461. return app;
  4462. },
  4463. runWithContext(fn) {
  4464. const lastApp = currentApp;
  4465. currentApp = app;
  4466. try {
  4467. return fn();
  4468. } finally {
  4469. currentApp = lastApp;
  4470. }
  4471. }
  4472. };
  4473. return app;
  4474. };
  4475. }
  4476. var currentApp = null;
  4477. function useModel(props, name, options = EMPTY_OBJ) {
  4478. const i = getCurrentInstance();
  4479. if (!i) {
  4480. warn$1(`useModel() called without active instance.`);
  4481. return ref();
  4482. }
  4483. const camelizedName = camelize(name);
  4484. if (!i.propsOptions[0][camelizedName]) {
  4485. warn$1(`useModel() called with prop "${name}" which is not declared.`);
  4486. return ref();
  4487. }
  4488. const hyphenatedName = hyphenate(name);
  4489. const modifiers = getModelModifiers(props, camelizedName);
  4490. const res = customRef((track$1, trigger$1) => {
  4491. let localValue;
  4492. let prevSetValue = EMPTY_OBJ;
  4493. let prevEmittedValue;
  4494. watchSyncEffect(() => {
  4495. const propValue = props[camelizedName];
  4496. if (hasChanged(localValue, propValue)) {
  4497. localValue = propValue;
  4498. trigger$1();
  4499. }
  4500. });
  4501. return {
  4502. get() {
  4503. track$1();
  4504. return options.get ? options.get(localValue) : localValue;
  4505. },
  4506. set(value) {
  4507. const emittedValue = options.set ? options.set(value) : value;
  4508. if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) return;
  4509. const rawProps = i.vnode.props;
  4510. if (!(rawProps && (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
  4511. localValue = value;
  4512. trigger$1();
  4513. }
  4514. i.emit(`update:${name}`, emittedValue);
  4515. if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) trigger$1();
  4516. prevSetValue = value;
  4517. prevEmittedValue = emittedValue;
  4518. }
  4519. };
  4520. });
  4521. res[Symbol.iterator] = () => {
  4522. let i2 = 0;
  4523. return { next() {
  4524. if (i2 < 2) return {
  4525. value: i2++ ? modifiers || EMPTY_OBJ : res,
  4526. done: false
  4527. };
  4528. else return { done: true };
  4529. } };
  4530. };
  4531. return res;
  4532. }
  4533. var getModelModifiers = (props, modelName) => {
  4534. return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
  4535. };
  4536. function emit(instance, event, ...rawArgs) {
  4537. if (instance.isUnmounted) return;
  4538. const props = instance.vnode.props || EMPTY_OBJ;
  4539. {
  4540. const { emitsOptions, propsOptions: [propsOptions] } = instance;
  4541. if (emitsOptions) if (!(event in emitsOptions) && true) {
  4542. if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
  4543. } else {
  4544. const validator = emitsOptions[event];
  4545. if (isFunction(validator)) {
  4546. if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
  4547. }
  4548. }
  4549. }
  4550. let args = rawArgs;
  4551. const isModelListener$1 = event.startsWith("update:");
  4552. const modifiers = isModelListener$1 && getModelModifiers(props, event.slice(7));
  4553. if (modifiers) {
  4554. if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  4555. if (modifiers.number) args = rawArgs.map(looseToNumber);
  4556. }
  4557. devtoolsComponentEmit(instance, event, args);
  4558. {
  4559. const lowerCaseEvent = event.toLowerCase();
  4560. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) warn$1(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`);
  4561. }
  4562. let handlerName;
  4563. let handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))];
  4564. if (!handler && isModelListener$1) handler = props[handlerName = toHandlerKey(hyphenate(event))];
  4565. if (handler) callWithAsyncErrorHandling(handler, instance, 6, args);
  4566. const onceHandler = props[handlerName + `Once`];
  4567. if (onceHandler) {
  4568. if (!instance.emitted) instance.emitted = {};
  4569. else if (instance.emitted[handlerName]) return;
  4570. instance.emitted[handlerName] = true;
  4571. callWithAsyncErrorHandling(onceHandler, instance, 6, args);
  4572. }
  4573. }
  4574. var mixinEmitsCache = /* @__PURE__ */ new WeakMap();
  4575. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  4576. const cache = __VUE_OPTIONS_API__ && asMixin ? mixinEmitsCache : appContext.emitsCache;
  4577. const cached = cache.get(comp);
  4578. if (cached !== void 0) return cached;
  4579. const raw = comp.emits;
  4580. let normalized = {};
  4581. let hasExtends = false;
  4582. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  4583. const extendEmits = (raw2) => {
  4584. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  4585. if (normalizedFromExtend) {
  4586. hasExtends = true;
  4587. extend(normalized, normalizedFromExtend);
  4588. }
  4589. };
  4590. if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendEmits);
  4591. if (comp.extends) extendEmits(comp.extends);
  4592. if (comp.mixins) comp.mixins.forEach(extendEmits);
  4593. }
  4594. if (!raw && !hasExtends) {
  4595. if (isObject(comp)) cache.set(comp, null);
  4596. return null;
  4597. }
  4598. if (isArray(raw)) raw.forEach((key) => normalized[key] = null);
  4599. else extend(normalized, raw);
  4600. if (isObject(comp)) cache.set(comp, normalized);
  4601. return normalized;
  4602. }
  4603. function isEmitListener(options, key) {
  4604. if (!options || !isOn(key)) return false;
  4605. key = key.slice(2).replace(/Once$/, "");
  4606. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  4607. }
  4608. var accessedAttrs = false;
  4609. function markAttrsAccessed() {
  4610. accessedAttrs = true;
  4611. }
  4612. function renderComponentRoot(instance) {
  4613. const { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit: emit$2, render: render$1, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;
  4614. const prev = setCurrentRenderingInstance(instance);
  4615. let result;
  4616. let fallthroughAttrs;
  4617. accessedAttrs = false;
  4618. try {
  4619. if (vnode.shapeFlag & 4) {
  4620. const proxyToUse = withProxy || proxy;
  4621. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { get(target, key, receiver) {
  4622. warn$1(`Property '${String(key)}' was accessed via 'this'. Avoid using 'this' in templates.`);
  4623. return Reflect.get(target, key, receiver);
  4624. } }) : proxyToUse;
  4625. result = normalizeVNode(render$1.call(thisProxy, proxyToUse, renderCache, shallowReadonly(props), setupState, data, ctx));
  4626. fallthroughAttrs = attrs;
  4627. } else {
  4628. const render2 = Component;
  4629. if (attrs === props) markAttrsAccessed();
  4630. result = normalizeVNode(render2.length > 1 ? render2(shallowReadonly(props), {
  4631. get attrs() {
  4632. markAttrsAccessed();
  4633. return shallowReadonly(attrs);
  4634. },
  4635. slots,
  4636. emit: emit$2
  4637. }) : render2(shallowReadonly(props), null));
  4638. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  4639. }
  4640. } catch (err) {
  4641. blockStack.length = 0;
  4642. handleError(err, instance, 1);
  4643. result = createVNode(Comment);
  4644. }
  4645. let root = result;
  4646. let setRoot = void 0;
  4647. if (result.patchFlag > 0 && result.patchFlag & 2048) [root, setRoot] = getChildRoot(result);
  4648. if (fallthroughAttrs && inheritAttrs !== false) {
  4649. const keys = Object.keys(fallthroughAttrs);
  4650. const { shapeFlag } = root;
  4651. if (keys.length) {
  4652. if (shapeFlag & 7) {
  4653. if (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
  4654. root = cloneVNode(root, fallthroughAttrs, false, true);
  4655. } else if (!accessedAttrs && root.type !== Comment) {
  4656. const allAttrs = Object.keys(attrs);
  4657. const eventAttrs = [];
  4658. const extraAttrs = [];
  4659. for (let i = 0, l = allAttrs.length; i < l; i++) {
  4660. const key = allAttrs[i];
  4661. if (isOn(key)) {
  4662. if (!isModelListener(key)) eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  4663. } else extraAttrs.push(key);
  4664. }
  4665. if (extraAttrs.length) warn$1(`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.`);
  4666. if (eventAttrs.length) warn$1(`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.`);
  4667. }
  4668. }
  4669. }
  4670. if (vnode.dirs) {
  4671. if (!isElementRoot(root)) warn$1(`Runtime directive used on component with non-element root node. The directives will not function as intended.`);
  4672. root = cloneVNode(root, null, false, true);
  4673. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  4674. }
  4675. if (vnode.transition) {
  4676. if (!isElementRoot(root)) warn$1(`Component inside <Transition> renders non-element root node that cannot be animated.`);
  4677. setTransitionHooks(root, vnode.transition);
  4678. }
  4679. if (setRoot) setRoot(root);
  4680. else result = root;
  4681. setCurrentRenderingInstance(prev);
  4682. return result;
  4683. }
  4684. var getChildRoot = (vnode) => {
  4685. const rawChildren = vnode.children;
  4686. const dynamicChildren = vnode.dynamicChildren;
  4687. const childRoot = filterSingleRoot(rawChildren, false);
  4688. if (!childRoot) return [vnode, void 0];
  4689. else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) return getChildRoot(childRoot);
  4690. const index = rawChildren.indexOf(childRoot);
  4691. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  4692. const setRoot = (updatedRoot) => {
  4693. rawChildren[index] = updatedRoot;
  4694. if (dynamicChildren) {
  4695. if (dynamicIndex > -1) dynamicChildren[dynamicIndex] = updatedRoot;
  4696. else if (updatedRoot.patchFlag > 0) vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  4697. }
  4698. };
  4699. return [normalizeVNode(childRoot), setRoot];
  4700. };
  4701. function filterSingleRoot(children, recurse = true) {
  4702. let singleRoot;
  4703. for (let i = 0; i < children.length; i++) {
  4704. const child = children[i];
  4705. if (isVNode(child)) {
  4706. if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
  4707. else {
  4708. singleRoot = child;
  4709. if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
  4710. }
  4711. } else return;
  4712. }
  4713. return singleRoot;
  4714. }
  4715. var getFunctionalFallthrough = (attrs) => {
  4716. let res;
  4717. for (const key in attrs) if (key === "class" || key === "style" || isOn(key)) (res || (res = {}))[key] = attrs[key];
  4718. return res;
  4719. };
  4720. var filterModelListeners = (attrs, props) => {
  4721. const res = {};
  4722. for (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];
  4723. return res;
  4724. };
  4725. var isElementRoot = (vnode) => {
  4726. return vnode.shapeFlag & 7 || vnode.type === Comment;
  4727. };
  4728. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  4729. const { props: prevProps, children: prevChildren, component } = prevVNode;
  4730. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  4731. const emits = component.emitsOptions;
  4732. if ((prevChildren || nextChildren) && isHmrUpdating) return true;
  4733. if (nextVNode.dirs || nextVNode.transition) return true;
  4734. if (optimized && patchFlag >= 0) {
  4735. if (patchFlag & 1024) return true;
  4736. if (patchFlag & 16) {
  4737. if (!prevProps) return !!nextProps;
  4738. return hasPropsChanged(prevProps, nextProps, emits);
  4739. } else if (patchFlag & 8) {
  4740. const dynamicProps = nextVNode.dynamicProps;
  4741. for (let i = 0; i < dynamicProps.length; i++) {
  4742. const key = dynamicProps[i];
  4743. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) return true;
  4744. }
  4745. }
  4746. } else {
  4747. if (prevChildren || nextChildren) {
  4748. if (!nextChildren || !nextChildren.$stable) return true;
  4749. }
  4750. if (prevProps === nextProps) return false;
  4751. if (!prevProps) return !!nextProps;
  4752. if (!nextProps) return true;
  4753. return hasPropsChanged(prevProps, nextProps, emits);
  4754. }
  4755. return false;
  4756. }
  4757. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  4758. const nextKeys = Object.keys(nextProps);
  4759. if (nextKeys.length !== Object.keys(prevProps).length) return true;
  4760. for (let i = 0; i < nextKeys.length; i++) {
  4761. const key = nextKeys[i];
  4762. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) return true;
  4763. }
  4764. return false;
  4765. }
  4766. function updateHOCHostEl({ vnode, parent }, el) {
  4767. while (parent) {
  4768. const root = parent.subTree;
  4769. if (root.suspense && root.suspense.activeBranch === vnode) root.el = vnode.el;
  4770. if (root === vnode) {
  4771. (vnode = parent.vnode).el = el;
  4772. parent = parent.parent;
  4773. } else break;
  4774. }
  4775. }
  4776. var internalObjectProto = {};
  4777. var createInternalObject = () => Object.create(internalObjectProto);
  4778. var isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  4779. function initProps(instance, rawProps, isStateful, isSSR = false) {
  4780. const props = {};
  4781. const attrs = createInternalObject();
  4782. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4783. setFullProps(instance, rawProps, props, attrs);
  4784. for (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;
  4785. validateProps(rawProps || {}, props, instance);
  4786. if (isStateful) instance.props = isSSR ? props : shallowReactive(props);
  4787. else if (!instance.type.props) instance.props = attrs;
  4788. else instance.props = props;
  4789. instance.attrs = attrs;
  4790. }
  4791. function isInHmrContext(instance) {
  4792. while (instance) {
  4793. if (instance.type.__hmrId) return true;
  4794. instance = instance.parent;
  4795. }
  4796. }
  4797. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4798. const { props, attrs, vnode: { patchFlag } } = instance;
  4799. const rawCurrentProps = toRaw(props);
  4800. const [options] = instance.propsOptions;
  4801. let hasAttrsChanged = false;
  4802. if (!isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)) {
  4803. if (patchFlag & 8) {
  4804. const propsToUpdate = instance.vnode.dynamicProps;
  4805. for (let i = 0; i < propsToUpdate.length; i++) {
  4806. let key = propsToUpdate[i];
  4807. if (isEmitListener(instance.emitsOptions, key)) continue;
  4808. const value = rawProps[key];
  4809. if (options) if (hasOwn(attrs, key)) {
  4810. if (value !== attrs[key]) {
  4811. attrs[key] = value;
  4812. hasAttrsChanged = true;
  4813. }
  4814. } else {
  4815. const camelizedKey = camelize(key);
  4816. props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);
  4817. }
  4818. else if (value !== attrs[key]) {
  4819. attrs[key] = value;
  4820. hasAttrsChanged = true;
  4821. }
  4822. }
  4823. }
  4824. } else {
  4825. if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
  4826. let kebabKey;
  4827. for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
  4828. if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);
  4829. } else delete props[key];
  4830. if (attrs !== rawCurrentProps) {
  4831. for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
  4832. delete attrs[key];
  4833. hasAttrsChanged = true;
  4834. }
  4835. }
  4836. }
  4837. if (hasAttrsChanged) trigger(instance.attrs, "set", "");
  4838. validateProps(rawProps || {}, props, instance);
  4839. }
  4840. function setFullProps(instance, rawProps, props, attrs) {
  4841. const [options, needCastKeys] = instance.propsOptions;
  4842. let hasAttrsChanged = false;
  4843. let rawCastValues;
  4844. if (rawProps) for (let key in rawProps) {
  4845. if (isReservedProp(key)) continue;
  4846. const value = rawProps[key];
  4847. let camelKey;
  4848. if (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
  4849. else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  4850. else if (!isEmitListener(instance.emitsOptions, key)) {
  4851. if (!(key in attrs) || value !== attrs[key]) {
  4852. attrs[key] = value;
  4853. hasAttrsChanged = true;
  4854. }
  4855. }
  4856. }
  4857. if (needCastKeys) {
  4858. const rawCurrentProps = toRaw(props);
  4859. const castValues = rawCastValues || EMPTY_OBJ;
  4860. for (let i = 0; i < needCastKeys.length; i++) {
  4861. const key = needCastKeys[i];
  4862. props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
  4863. }
  4864. }
  4865. return hasAttrsChanged;
  4866. }
  4867. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  4868. const opt = options[key];
  4869. if (opt != null) {
  4870. const hasDefault = hasOwn(opt, "default");
  4871. if (hasDefault && value === void 0) {
  4872. const defaultValue = opt.default;
  4873. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  4874. const { propsDefaults } = instance;
  4875. if (key in propsDefaults) value = propsDefaults[key];
  4876. else {
  4877. const reset = setCurrentInstance(instance);
  4878. value = propsDefaults[key] = defaultValue.call(null, props);
  4879. reset();
  4880. }
  4881. } else value = defaultValue;
  4882. if (instance.ce) instance.ce._setProp(key, value);
  4883. }
  4884. if (opt[0]) {
  4885. if (isAbsent && !hasDefault) value = false;
  4886. else if (opt[1] && (value === "" || value === hyphenate(key))) value = true;
  4887. }
  4888. }
  4889. return value;
  4890. }
  4891. var mixinPropsCache = /* @__PURE__ */ new WeakMap();
  4892. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4893. const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
  4894. const cached = cache.get(comp);
  4895. if (cached) return cached;
  4896. const raw = comp.props;
  4897. const normalized = {};
  4898. const needCastKeys = [];
  4899. let hasExtends = false;
  4900. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  4901. const extendProps = (raw2) => {
  4902. hasExtends = true;
  4903. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  4904. extend(normalized, props);
  4905. if (keys) needCastKeys.push(...keys);
  4906. };
  4907. if (!asMixin && appContext.mixins.length) appContext.mixins.forEach(extendProps);
  4908. if (comp.extends) extendProps(comp.extends);
  4909. if (comp.mixins) comp.mixins.forEach(extendProps);
  4910. }
  4911. if (!raw && !hasExtends) {
  4912. if (isObject(comp)) cache.set(comp, EMPTY_ARR);
  4913. return EMPTY_ARR;
  4914. }
  4915. if (isArray(raw)) for (let i = 0; i < raw.length; i++) {
  4916. if (!isString(raw[i])) warn$1(`props must be strings when using array syntax.`, raw[i]);
  4917. const normalizedKey = camelize(raw[i]);
  4918. if (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;
  4919. }
  4920. else if (raw) {
  4921. if (!isObject(raw)) warn$1(`invalid props options`, raw);
  4922. for (const key in raw) {
  4923. const normalizedKey = camelize(key);
  4924. if (validatePropName(normalizedKey)) {
  4925. const opt = raw[key];
  4926. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  4927. const propType = prop.type;
  4928. let shouldCast = false;
  4929. let shouldCastTrue = true;
  4930. if (isArray(propType)) for (let index = 0; index < propType.length; ++index) {
  4931. const type = propType[index];
  4932. const typeName = isFunction(type) && type.name;
  4933. if (typeName === "Boolean") {
  4934. shouldCast = true;
  4935. break;
  4936. } else if (typeName === "String") shouldCastTrue = false;
  4937. }
  4938. else shouldCast = isFunction(propType) && propType.name === "Boolean";
  4939. prop[0] = shouldCast;
  4940. prop[1] = shouldCastTrue;
  4941. if (shouldCast || hasOwn(prop, "default")) needCastKeys.push(normalizedKey);
  4942. }
  4943. }
  4944. }
  4945. const res = [normalized, needCastKeys];
  4946. if (isObject(comp)) cache.set(comp, res);
  4947. return res;
  4948. }
  4949. function validatePropName(key) {
  4950. if (key[0] !== "$" && !isReservedProp(key)) return true;
  4951. else warn$1(`Invalid prop name: "${key}" is a reserved property.`);
  4952. return false;
  4953. }
  4954. function getType(ctor) {
  4955. if (ctor === null) return "null";
  4956. if (typeof ctor === "function") return ctor.name || "";
  4957. else if (typeof ctor === "object") return ctor.constructor && ctor.constructor.name || "";
  4958. return "";
  4959. }
  4960. function validateProps(rawProps, props, instance) {
  4961. const resolvedValues = toRaw(props);
  4962. const options = instance.propsOptions[0];
  4963. const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
  4964. for (const key in options) {
  4965. let opt = options[key];
  4966. if (opt == null) continue;
  4967. validateProp(key, resolvedValues[key], opt, shallowReadonly(resolvedValues), !camelizePropsKey.includes(key));
  4968. }
  4969. }
  4970. function validateProp(name, value, prop, props, isAbsent) {
  4971. const { type, required, validator, skipCheck } = prop;
  4972. if (required && isAbsent) {
  4973. warn$1("Missing required prop: \"" + name + "\"");
  4974. return;
  4975. }
  4976. if (value == null && !required) return;
  4977. if (type != null && type !== true && !skipCheck) {
  4978. let isValid = false;
  4979. const types = isArray(type) ? type : [type];
  4980. const expectedTypes = [];
  4981. for (let i = 0; i < types.length && !isValid; i++) {
  4982. const { valid, expectedType } = assertType(value, types[i]);
  4983. expectedTypes.push(expectedType || "");
  4984. isValid = valid;
  4985. }
  4986. if (!isValid) {
  4987. warn$1(getInvalidTypeMessage(name, value, expectedTypes));
  4988. return;
  4989. }
  4990. }
  4991. if (validator && !validator(value, props)) warn$1("Invalid prop: custom validator check failed for prop \"" + name + "\".");
  4992. }
  4993. var isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
  4994. function assertType(value, type) {
  4995. let valid;
  4996. const expectedType = getType(type);
  4997. if (expectedType === "null") valid = value === null;
  4998. else if (isSimpleType(expectedType)) {
  4999. const t = typeof value;
  5000. valid = t === expectedType.toLowerCase();
  5001. if (!valid && t === "object") valid = value instanceof type;
  5002. } else if (expectedType === "Object") valid = isObject(value);
  5003. else if (expectedType === "Array") valid = isArray(value);
  5004. else valid = value instanceof type;
  5005. return {
  5006. valid,
  5007. expectedType
  5008. };
  5009. }
  5010. function getInvalidTypeMessage(name, value, expectedTypes) {
  5011. if (expectedTypes.length === 0) return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  5012. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  5013. const expectedType = expectedTypes[0];
  5014. const receivedType = toRawType(value);
  5015. const expectedValue = styleValue(value, expectedType);
  5016. const receivedValue = styleValue(value, receivedType);
  5017. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) message += ` with value ${expectedValue}`;
  5018. message += `, got ${receivedType} `;
  5019. if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
  5020. return message;
  5021. }
  5022. function styleValue(value, type) {
  5023. if (type === "String") return `"${value}"`;
  5024. else if (type === "Number") return `${Number(value)}`;
  5025. else return `${value}`;
  5026. }
  5027. function isExplicable(type) {
  5028. return [
  5029. "string",
  5030. "number",
  5031. "boolean"
  5032. ].some((elem) => type.toLowerCase() === elem);
  5033. }
  5034. function isBoolean(...args) {
  5035. return args.some((elem) => elem.toLowerCase() === "boolean");
  5036. }
  5037. var isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
  5038. var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  5039. var normalizeSlot = (key, rawSlot, ctx) => {
  5040. if (rawSlot._n) return rawSlot;
  5041. const normalized = withCtx((...args) => {
  5042. if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) warn$1(`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.`);
  5043. return normalizeSlotValue(rawSlot(...args));
  5044. }, ctx);
  5045. normalized._c = false;
  5046. return normalized;
  5047. };
  5048. var normalizeObjectSlots = (rawSlots, slots, instance) => {
  5049. const ctx = rawSlots._ctx;
  5050. for (const key in rawSlots) {
  5051. if (isInternalKey(key)) continue;
  5052. const value = rawSlots[key];
  5053. if (isFunction(value)) slots[key] = normalizeSlot(key, value, ctx);
  5054. else if (value != null) {
  5055. warn$1(`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`);
  5056. const normalized = normalizeSlotValue(value);
  5057. slots[key] = () => normalized;
  5058. }
  5059. }
  5060. };
  5061. var normalizeVNodeSlots = (instance, children) => {
  5062. if (!isKeepAlive(instance.vnode) && true) warn$1(`Non-function value encountered for default slot. Prefer function slots for better performance.`);
  5063. const normalized = normalizeSlotValue(children);
  5064. instance.slots.default = () => normalized;
  5065. };
  5066. var assignSlots = (slots, children, optimized) => {
  5067. for (const key in children) if (optimized || !isInternalKey(key)) slots[key] = children[key];
  5068. };
  5069. var initSlots = (instance, children, optimized) => {
  5070. const slots = instance.slots = createInternalObject();
  5071. if (instance.vnode.shapeFlag & 32) {
  5072. const type = children._;
  5073. if (type) {
  5074. assignSlots(slots, children, optimized);
  5075. if (optimized) def(slots, "_", type, true);
  5076. } else normalizeObjectSlots(children, slots);
  5077. } else if (children) normalizeVNodeSlots(instance, children);
  5078. };
  5079. var updateSlots = (instance, children, optimized) => {
  5080. const { vnode, slots } = instance;
  5081. let needDeletionCheck = true;
  5082. let deletionComparisonTarget = EMPTY_OBJ;
  5083. if (vnode.shapeFlag & 32) {
  5084. const type = children._;
  5085. if (type) if (isHmrUpdating) {
  5086. assignSlots(slots, children, optimized);
  5087. trigger(instance, "set", "$slots");
  5088. } else if (optimized && type === 1) needDeletionCheck = false;
  5089. else assignSlots(slots, children, optimized);
  5090. else {
  5091. needDeletionCheck = !children.$stable;
  5092. normalizeObjectSlots(children, slots);
  5093. }
  5094. deletionComparisonTarget = children;
  5095. } else if (children) {
  5096. normalizeVNodeSlots(instance, children);
  5097. deletionComparisonTarget = { default: 1 };
  5098. }
  5099. if (needDeletionCheck) {
  5100. for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
  5101. }
  5102. };
  5103. var supported;
  5104. var perf;
  5105. function startMeasure(instance, type) {
  5106. if (instance.appContext.config.performance && isSupported()) perf.mark(`vue-${type}-${instance.uid}`);
  5107. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  5108. }
  5109. function endMeasure(instance, type) {
  5110. if (instance.appContext.config.performance && isSupported()) {
  5111. const startTag = `vue-${type}-${instance.uid}`;
  5112. const endTag = startTag + `:end`;
  5113. const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
  5114. perf.mark(endTag);
  5115. perf.measure(measureName, startTag, endTag);
  5116. perf.clearMeasures(measureName);
  5117. perf.clearMarks(startTag);
  5118. perf.clearMarks(endTag);
  5119. }
  5120. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  5121. }
  5122. function isSupported() {
  5123. if (supported !== void 0) return supported;
  5124. if (typeof window !== "undefined" && window.performance) {
  5125. supported = true;
  5126. perf = window.performance;
  5127. } else supported = false;
  5128. return supported;
  5129. }
  5130. function initFeatureFlags() {
  5131. const needWarn = [];
  5132. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  5133. needWarn.push(`__VUE_OPTIONS_API__`);
  5134. getGlobalThis().__VUE_OPTIONS_API__ = true;
  5135. }
  5136. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  5137. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  5138. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  5139. }
  5140. if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
  5141. needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
  5142. getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
  5143. }
  5144. if (needWarn.length) {
  5145. const multi = needWarn.length > 1;
  5146. console.warn(`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.
  5147. For more details, see https://link.vuejs.org/feature-flags.`);
  5148. }
  5149. }
  5150. var queuePostRenderEffect = queueEffectWithSuspense;
  5151. function createRenderer(options) {
  5152. return baseCreateRenderer(options);
  5153. }
  5154. function createHydrationRenderer(options) {
  5155. return baseCreateRenderer(options, createHydrationFunctions);
  5156. }
  5157. function baseCreateRenderer(options, createHydrationFns) {
  5158. initFeatureFlags();
  5159. const target = getGlobalThis();
  5160. target.__VUE__ = true;
  5161. setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  5162. const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, insertStaticContent: hostInsertStaticContent } = options;
  5163. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  5164. if (n1 === n2) return;
  5165. if (n1 && !isSameVNodeType(n1, n2)) {
  5166. anchor = getNextHostNode(n1);
  5167. unmount(n1, parentComponent, parentSuspense, true);
  5168. n1 = null;
  5169. }
  5170. if (n2.patchFlag === -2) {
  5171. optimized = false;
  5172. n2.dynamicChildren = null;
  5173. }
  5174. const { type, ref: ref$1, shapeFlag } = n2;
  5175. switch (type) {
  5176. case Text:
  5177. processText(n1, n2, container, anchor);
  5178. break;
  5179. case Comment:
  5180. processCommentNode(n1, n2, container, anchor);
  5181. break;
  5182. case Static:
  5183. if (n1 == null) mountStaticNode(n2, container, anchor, namespace);
  5184. else patchStaticNode(n1, n2, container, namespace);
  5185. break;
  5186. case Fragment:
  5187. processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5188. break;
  5189. default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5190. else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5191. else if (shapeFlag & 64) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
  5192. else if (shapeFlag & 128) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
  5193. else warn$1("Invalid VNode type:", type, `(${typeof type})`);
  5194. }
  5195. if (ref$1 != null && parentComponent) setRef(ref$1, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  5196. else if (ref$1 == null && n1 && n1.ref != null) setRef(n1.ref, null, parentSuspense, n1, true);
  5197. };
  5198. const processText = (n1, n2, container, anchor) => {
  5199. if (n1 == null) hostInsert(n2.el = hostCreateText(n2.children), container, anchor);
  5200. else {
  5201. const el = n2.el = n1.el;
  5202. if (n2.children !== n1.children) if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
  5203. const childNodes = container.childNodes;
  5204. const newChild = hostCreateText(n2.children);
  5205. const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
  5206. hostInsert(newChild, container, oldChild);
  5207. hostRemove(oldChild);
  5208. } else hostSetText(el, n2.children);
  5209. }
  5210. };
  5211. const processCommentNode = (n1, n2, container, anchor) => {
  5212. if (n1 == null) hostInsert(n2.el = hostCreateComment(n2.children || ""), container, anchor);
  5213. else n2.el = n1.el;
  5214. };
  5215. const mountStaticNode = (n2, container, anchor, namespace) => {
  5216. [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, namespace, n2.el, n2.anchor);
  5217. };
  5218. const patchStaticNode = (n1, n2, container, namespace) => {
  5219. if (n2.children !== n1.children) {
  5220. const anchor = hostNextSibling(n1.anchor);
  5221. removeStaticNode(n1);
  5222. [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, namespace);
  5223. } else {
  5224. n2.el = n1.el;
  5225. n2.anchor = n1.anchor;
  5226. }
  5227. };
  5228. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  5229. let next;
  5230. while (el && el !== anchor) {
  5231. next = hostNextSibling(el);
  5232. hostInsert(el, container, nextSibling);
  5233. el = next;
  5234. }
  5235. hostInsert(anchor, container, nextSibling);
  5236. };
  5237. const removeStaticNode = ({ el, anchor }) => {
  5238. let next;
  5239. while (el && el !== anchor) {
  5240. next = hostNextSibling(el);
  5241. hostRemove(el);
  5242. el = next;
  5243. }
  5244. hostRemove(anchor);
  5245. };
  5246. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5247. if (n2.type === "svg") namespace = "svg";
  5248. else if (n2.type === "math") namespace = "mathml";
  5249. if (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5250. else {
  5251. const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
  5252. try {
  5253. if (customElement) customElement._beginPatch();
  5254. patchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5255. } finally {
  5256. if (customElement) customElement._endPatch();
  5257. }
  5258. }
  5259. };
  5260. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5261. let el;
  5262. let vnodeHook;
  5263. const { props, shapeFlag, transition, dirs } = vnode;
  5264. el = vnode.el = hostCreateElement(vnode.type, namespace, props && props.is, props);
  5265. if (shapeFlag & 8) hostSetElementText(el, vnode.children);
  5266. else if (shapeFlag & 16) mountChildren(vnode.children, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(vnode, namespace), slotScopeIds, optimized);
  5267. if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
  5268. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  5269. if (props) {
  5270. for (const key in props) if (key !== "value" && !isReservedProp(key)) hostPatchProp(el, key, null, props[key], namespace, parentComponent);
  5271. if ("value" in props) hostPatchProp(el, "value", null, props.value, namespace);
  5272. if (vnodeHook = props.onVnodeBeforeMount) invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5273. }
  5274. def(el, "__vnode", vnode, true);
  5275. def(el, "__vueParentComponent", parentComponent, true);
  5276. if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  5277. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  5278. if (needCallTransitionHooks) transition.beforeEnter(el);
  5279. hostInsert(el, container, anchor);
  5280. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) queuePostRenderEffect(() => {
  5281. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5282. needCallTransitionHooks && transition.enter(el);
  5283. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  5284. }, parentSuspense);
  5285. };
  5286. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  5287. if (scopeId) hostSetScopeId(el, scopeId);
  5288. if (slotScopeIds) for (let i = 0; i < slotScopeIds.length; i++) hostSetScopeId(el, slotScopeIds[i]);
  5289. if (parentComponent) {
  5290. let subTree = parentComponent.subTree;
  5291. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) subTree = filterSingleRoot(subTree.children) || subTree;
  5292. if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
  5293. const parentVNode = parentComponent.vnode;
  5294. setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);
  5295. }
  5296. }
  5297. };
  5298. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  5299. for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5300. };
  5301. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5302. const el = n2.el = n1.el;
  5303. el.__vnode = n2;
  5304. let { patchFlag, dynamicChildren, dirs } = n2;
  5305. patchFlag |= n1.patchFlag & 16;
  5306. const oldProps = n1.props || EMPTY_OBJ;
  5307. const newProps = n2.props || EMPTY_OBJ;
  5308. let vnodeHook;
  5309. parentComponent && toggleRecurse(parentComponent, false);
  5310. if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  5311. if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  5312. parentComponent && toggleRecurse(parentComponent, true);
  5313. if (isHmrUpdating) {
  5314. patchFlag = 0;
  5315. optimized = false;
  5316. dynamicChildren = null;
  5317. }
  5318. if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) hostSetElementText(el, "");
  5319. if (dynamicChildren) {
  5320. patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds);
  5321. traverseStaticChildren(n1, n2);
  5322. } else if (!optimized) patchChildren(n1, n2, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds, false);
  5323. if (patchFlag > 0) {
  5324. if (patchFlag & 16) patchProps(el, oldProps, newProps, parentComponent, namespace);
  5325. else {
  5326. if (patchFlag & 2) {
  5327. if (oldProps.class !== newProps.class) hostPatchProp(el, "class", null, newProps.class, namespace);
  5328. }
  5329. if (patchFlag & 4) hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  5330. if (patchFlag & 8) {
  5331. const propsToUpdate = n2.dynamicProps;
  5332. for (let i = 0; i < propsToUpdate.length; i++) {
  5333. const key = propsToUpdate[i];
  5334. const prev = oldProps[key];
  5335. const next = newProps[key];
  5336. if (next !== prev || key === "value") hostPatchProp(el, key, prev, next, namespace, parentComponent);
  5337. }
  5338. }
  5339. }
  5340. if (patchFlag & 1) {
  5341. if (n1.children !== n2.children) hostSetElementText(el, n2.children);
  5342. }
  5343. } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
  5344. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
  5345. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  5346. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  5347. }, parentSuspense);
  5348. };
  5349. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  5350. for (let i = 0; i < newChildren.length; i++) {
  5351. const oldVNode = oldChildren[i];
  5352. const newVNode = newChildren[i];
  5353. patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
  5354. }
  5355. };
  5356. const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
  5357. if (oldProps !== newProps) {
  5358. if (oldProps !== EMPTY_OBJ) {
  5359. for (const key in oldProps) if (!isReservedProp(key) && !(key in newProps)) hostPatchProp(el, key, oldProps[key], null, namespace, parentComponent);
  5360. }
  5361. for (const key in newProps) {
  5362. if (isReservedProp(key)) continue;
  5363. const next = newProps[key];
  5364. const prev = oldProps[key];
  5365. if (next !== prev && key !== "value") hostPatchProp(el, key, prev, next, namespace, parentComponent);
  5366. }
  5367. if ("value" in newProps) hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  5368. }
  5369. };
  5370. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5371. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  5372. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  5373. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  5374. if (isHmrUpdating || patchFlag & 2048) {
  5375. patchFlag = 0;
  5376. optimized = false;
  5377. dynamicChildren = null;
  5378. }
  5379. if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  5380. if (n1 == null) {
  5381. hostInsert(fragmentStartAnchor, container, anchor);
  5382. hostInsert(fragmentEndAnchor, container, anchor);
  5383. mountChildren(n2.children || [], container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5384. } else if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
  5385. patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, namespace, slotScopeIds);
  5386. traverseStaticChildren(n1, n2);
  5387. } else patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5388. };
  5389. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5390. n2.slotScopeIds = slotScopeIds;
  5391. if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
  5392. else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
  5393. else updateComponent(n1, n2, optimized);
  5394. };
  5395. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  5396. const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
  5397. if (instance.type.__hmrId) registerHMR(instance);
  5398. pushWarningContext(initialVNode);
  5399. startMeasure(instance, `mount`);
  5400. if (isKeepAlive(initialVNode)) instance.ctx.renderer = internals;
  5401. startMeasure(instance, `init`);
  5402. setupComponent(instance, false, optimized);
  5403. endMeasure(instance, `init`);
  5404. if (isHmrUpdating) initialVNode.el = null;
  5405. if (instance.asyncDep) {
  5406. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
  5407. if (!initialVNode.el) {
  5408. const placeholder = instance.subTree = createVNode(Comment);
  5409. processCommentNode(null, placeholder, container, anchor);
  5410. initialVNode.placeholder = placeholder.el;
  5411. }
  5412. } else setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, namespace, optimized);
  5413. popWarningContext();
  5414. endMeasure(instance, `mount`);
  5415. };
  5416. const updateComponent = (n1, n2, optimized) => {
  5417. const instance = n2.component = n1.component;
  5418. if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
  5419. pushWarningContext(n2);
  5420. updateComponentPreRender(instance, n2, optimized);
  5421. popWarningContext();
  5422. return;
  5423. } else {
  5424. instance.next = n2;
  5425. instance.update();
  5426. }
  5427. else {
  5428. n2.el = n1.el;
  5429. instance.vnode = n2;
  5430. }
  5431. };
  5432. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  5433. const componentUpdateFn = () => {
  5434. if (!instance.isMounted) {
  5435. let vnodeHook;
  5436. const { el, props } = initialVNode;
  5437. const { bm, m, parent, root, type } = instance;
  5438. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  5439. toggleRecurse(instance, false);
  5440. if (bm) invokeArrayFns(bm);
  5441. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) invokeVNodeHook(vnodeHook, parent, initialVNode);
  5442. toggleRecurse(instance, true);
  5443. if (el && hydrateNode) {
  5444. const hydrateSubTree = () => {
  5445. startMeasure(instance, `render`);
  5446. instance.subTree = renderComponentRoot(instance);
  5447. endMeasure(instance, `render`);
  5448. startMeasure(instance, `hydrate`);
  5449. hydrateNode(el, instance.subTree, instance, parentSuspense, null);
  5450. endMeasure(instance, `hydrate`);
  5451. };
  5452. if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
  5453. else hydrateSubTree();
  5454. } else {
  5455. if (root.ce && root.ce._def.shadowRoot !== false) root.ce._injectChildStyle(type);
  5456. startMeasure(instance, `render`);
  5457. const subTree = instance.subTree = renderComponentRoot(instance);
  5458. endMeasure(instance, `render`);
  5459. startMeasure(instance, `patch`);
  5460. patch(null, subTree, container, anchor, instance, parentSuspense, namespace);
  5461. endMeasure(instance, `patch`);
  5462. initialVNode.el = subTree.el;
  5463. }
  5464. if (m) queuePostRenderEffect(m, parentSuspense);
  5465. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  5466. const scopedInitialVNode = initialVNode;
  5467. queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
  5468. }
  5469. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  5470. instance.isMounted = true;
  5471. devtoolsComponentAdded(instance);
  5472. initialVNode = container = anchor = null;
  5473. } else {
  5474. let { next, bu, u, parent, vnode } = instance;
  5475. {
  5476. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  5477. if (nonHydratedAsyncRoot) {
  5478. if (next) {
  5479. next.el = vnode.el;
  5480. updateComponentPreRender(instance, next, optimized);
  5481. }
  5482. nonHydratedAsyncRoot.asyncDep.then(() => {
  5483. if (!instance.isUnmounted) componentUpdateFn();
  5484. });
  5485. return;
  5486. }
  5487. }
  5488. let originNext = next;
  5489. let vnodeHook;
  5490. pushWarningContext(next || instance.vnode);
  5491. toggleRecurse(instance, false);
  5492. if (next) {
  5493. next.el = vnode.el;
  5494. updateComponentPreRender(instance, next, optimized);
  5495. } else next = vnode;
  5496. if (bu) invokeArrayFns(bu);
  5497. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
  5498. toggleRecurse(instance, true);
  5499. startMeasure(instance, `render`);
  5500. const nextTree = renderComponentRoot(instance);
  5501. endMeasure(instance, `render`);
  5502. const prevTree = instance.subTree;
  5503. instance.subTree = nextTree;
  5504. startMeasure(instance, `patch`);
  5505. patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
  5506. endMeasure(instance, `patch`);
  5507. next.el = nextTree.el;
  5508. if (originNext === null) updateHOCHostEl(instance, nextTree.el);
  5509. if (u) queuePostRenderEffect(u, parentSuspense);
  5510. if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
  5511. devtoolsComponentUpdated(instance);
  5512. popWarningContext();
  5513. }
  5514. };
  5515. instance.scope.on();
  5516. const effect$1 = instance.effect = new ReactiveEffect(componentUpdateFn);
  5517. instance.scope.off();
  5518. const update = instance.update = effect$1.run.bind(effect$1);
  5519. const job = instance.job = effect$1.runIfDirty.bind(effect$1);
  5520. job.i = instance;
  5521. job.id = instance.uid;
  5522. effect$1.scheduler = () => queueJob(job);
  5523. toggleRecurse(instance, true);
  5524. effect$1.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  5525. effect$1.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  5526. update();
  5527. };
  5528. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  5529. nextVNode.component = instance;
  5530. const prevProps = instance.vnode.props;
  5531. instance.vnode = nextVNode;
  5532. instance.next = null;
  5533. updateProps(instance, nextVNode.props, prevProps, optimized);
  5534. updateSlots(instance, nextVNode.children, optimized);
  5535. pauseTracking();
  5536. flushPreFlushCbs(instance);
  5537. resetTracking();
  5538. };
  5539. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  5540. const c1 = n1 && n1.children;
  5541. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  5542. const c2 = n2.children;
  5543. const { patchFlag, shapeFlag } = n2;
  5544. if (patchFlag > 0) {
  5545. if (patchFlag & 128) {
  5546. patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5547. return;
  5548. } else if (patchFlag & 256) {
  5549. patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5550. return;
  5551. }
  5552. }
  5553. if (shapeFlag & 8) {
  5554. if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
  5555. if (c2 !== c1) hostSetElementText(container, c2);
  5556. } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5557. else unmountChildren(c1, parentComponent, parentSuspense, true);
  5558. else {
  5559. if (prevShapeFlag & 8) hostSetElementText(container, "");
  5560. if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5561. }
  5562. };
  5563. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5564. c1 = c1 || EMPTY_ARR;
  5565. c2 = c2 || EMPTY_ARR;
  5566. const oldLength = c1.length;
  5567. const newLength = c2.length;
  5568. const commonLength = Math.min(oldLength, newLength);
  5569. let i;
  5570. for (i = 0; i < commonLength; i++) {
  5571. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  5572. patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5573. }
  5574. if (oldLength > newLength) unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);
  5575. else mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, commonLength);
  5576. };
  5577. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  5578. let i = 0;
  5579. const l2 = c2.length;
  5580. let e1 = c1.length - 1;
  5581. let e2 = l2 - 1;
  5582. while (i <= e1 && i <= e2) {
  5583. const n1 = c1[i];
  5584. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  5585. if (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5586. else break;
  5587. i++;
  5588. }
  5589. while (i <= e1 && i <= e2) {
  5590. const n1 = c1[e1];
  5591. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  5592. if (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5593. else break;
  5594. e1--;
  5595. e2--;
  5596. }
  5597. if (i > e1) {
  5598. if (i <= e2) {
  5599. const nextPos = e2 + 1;
  5600. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  5601. while (i <= e2) {
  5602. patch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5603. i++;
  5604. }
  5605. }
  5606. } else if (i > e2) while (i <= e1) {
  5607. unmount(c1[i], parentComponent, parentSuspense, true);
  5608. i++;
  5609. }
  5610. else {
  5611. const s1 = i;
  5612. const s2 = i;
  5613. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  5614. for (i = s2; i <= e2; i++) {
  5615. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  5616. if (nextChild.key != null) {
  5617. if (keyToNewIndexMap.has(nextChild.key)) warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
  5618. keyToNewIndexMap.set(nextChild.key, i);
  5619. }
  5620. }
  5621. let j;
  5622. let patched = 0;
  5623. const toBePatched = e2 - s2 + 1;
  5624. let moved = false;
  5625. let maxNewIndexSoFar = 0;
  5626. const newIndexToOldIndexMap = new Array(toBePatched);
  5627. for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
  5628. for (i = s1; i <= e1; i++) {
  5629. const prevChild = c1[i];
  5630. if (patched >= toBePatched) {
  5631. unmount(prevChild, parentComponent, parentSuspense, true);
  5632. continue;
  5633. }
  5634. let newIndex;
  5635. if (prevChild.key != null) newIndex = keyToNewIndexMap.get(prevChild.key);
  5636. else for (j = s2; j <= e2; j++) if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  5637. newIndex = j;
  5638. break;
  5639. }
  5640. if (newIndex === void 0) unmount(prevChild, parentComponent, parentSuspense, true);
  5641. else {
  5642. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  5643. if (newIndex >= maxNewIndexSoFar) maxNewIndexSoFar = newIndex;
  5644. else moved = true;
  5645. patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5646. patched++;
  5647. }
  5648. }
  5649. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  5650. j = increasingNewIndexSequence.length - 1;
  5651. for (i = toBePatched - 1; i >= 0; i--) {
  5652. const nextIndex = s2 + i;
  5653. const nextChild = c2[nextIndex];
  5654. const anchorVNode = c2[nextIndex + 1];
  5655. const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
  5656. if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
  5657. else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2);
  5658. else j--;
  5659. }
  5660. }
  5661. };
  5662. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  5663. const { el, type, transition, children, shapeFlag } = vnode;
  5664. if (shapeFlag & 6) {
  5665. move(vnode.component.subTree, container, anchor, moveType);
  5666. return;
  5667. }
  5668. if (shapeFlag & 128) {
  5669. vnode.suspense.move(container, anchor, moveType);
  5670. return;
  5671. }
  5672. if (shapeFlag & 64) {
  5673. type.move(vnode, container, anchor, internals);
  5674. return;
  5675. }
  5676. if (type === Fragment) {
  5677. hostInsert(el, container, anchor);
  5678. for (let i = 0; i < children.length; i++) move(children[i], container, anchor, moveType);
  5679. hostInsert(vnode.anchor, container, anchor);
  5680. return;
  5681. }
  5682. if (type === Static) {
  5683. moveStaticNode(vnode, container, anchor);
  5684. return;
  5685. }
  5686. if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) {
  5687. transition.beforeEnter(el);
  5688. hostInsert(el, container, anchor);
  5689. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  5690. } else {
  5691. const { leave, delayLeave, afterLeave } = transition;
  5692. const remove2 = () => {
  5693. if (vnode.ctx.isUnmounted) hostRemove(el);
  5694. else hostInsert(el, container, anchor);
  5695. };
  5696. const performLeave = () => {
  5697. if (el._isLeaving) el[leaveCbKey](true);
  5698. leave(el, () => {
  5699. remove2();
  5700. afterLeave && afterLeave();
  5701. });
  5702. };
  5703. if (delayLeave) delayLeave(el, remove2, performLeave);
  5704. else performLeave();
  5705. }
  5706. else hostInsert(el, container, anchor);
  5707. };
  5708. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  5709. const { type, props, ref: ref$1, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex } = vnode;
  5710. if (patchFlag === -2) optimized = false;
  5711. if (ref$1 != null) {
  5712. pauseTracking();
  5713. setRef(ref$1, null, parentSuspense, vnode, true);
  5714. resetTracking();
  5715. }
  5716. if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
  5717. if (shapeFlag & 256) {
  5718. parentComponent.ctx.deactivate(vnode);
  5719. return;
  5720. }
  5721. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  5722. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  5723. let vnodeHook;
  5724. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5725. if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
  5726. else {
  5727. if (shapeFlag & 128) {
  5728. vnode.suspense.unmount(parentSuspense, doRemove);
  5729. return;
  5730. }
  5731. if (shouldInvokeDirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  5732. if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
  5733. else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
  5734. else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
  5735. if (doRemove) remove$1(vnode);
  5736. }
  5737. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) queuePostRenderEffect(() => {
  5738. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  5739. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  5740. }, parentSuspense);
  5741. };
  5742. const remove$1 = (vnode) => {
  5743. const { type, el, anchor, transition } = vnode;
  5744. if (type === Fragment) {
  5745. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) vnode.children.forEach((child) => {
  5746. if (child.type === Comment) hostRemove(child.el);
  5747. else remove$1(child);
  5748. });
  5749. else removeFragment(el, anchor);
  5750. return;
  5751. }
  5752. if (type === Static) {
  5753. removeStaticNode(vnode);
  5754. return;
  5755. }
  5756. const performRemove = () => {
  5757. hostRemove(el);
  5758. if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
  5759. };
  5760. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  5761. const { leave, delayLeave } = transition;
  5762. const performLeave = () => leave(el, performRemove);
  5763. if (delayLeave) delayLeave(vnode.el, performRemove, performLeave);
  5764. else performLeave();
  5765. } else performRemove();
  5766. };
  5767. const removeFragment = (cur, end) => {
  5768. let next;
  5769. while (cur !== end) {
  5770. next = hostNextSibling(cur);
  5771. hostRemove(cur);
  5772. cur = next;
  5773. }
  5774. hostRemove(end);
  5775. };
  5776. const unmountComponent = (instance, parentSuspense, doRemove) => {
  5777. if (instance.type.__hmrId) unregisterHMR(instance);
  5778. const { bum, scope, job, subTree, um, m, a } = instance;
  5779. invalidateMount(m);
  5780. invalidateMount(a);
  5781. if (bum) invokeArrayFns(bum);
  5782. scope.stop();
  5783. if (job) {
  5784. job.flags |= 8;
  5785. unmount(subTree, instance, parentSuspense, doRemove);
  5786. }
  5787. if (um) queuePostRenderEffect(um, parentSuspense);
  5788. queuePostRenderEffect(() => {
  5789. instance.isUnmounted = true;
  5790. }, parentSuspense);
  5791. devtoolsComponentRemoved(instance);
  5792. };
  5793. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  5794. for (let i = start; i < children.length; i++) unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  5795. };
  5796. const getNextHostNode = (vnode) => {
  5797. if (vnode.shapeFlag & 6) return getNextHostNode(vnode.component.subTree);
  5798. if (vnode.shapeFlag & 128) return vnode.suspense.next();
  5799. const el = hostNextSibling(vnode.anchor || vnode.el);
  5800. const teleportEnd = el && el[TeleportEndKey];
  5801. return teleportEnd ? hostNextSibling(teleportEnd) : el;
  5802. };
  5803. let isFlushing = false;
  5804. const render$1 = (vnode, container, namespace) => {
  5805. let instance;
  5806. if (vnode == null) {
  5807. if (container._vnode) {
  5808. unmount(container._vnode, null, null, true);
  5809. instance = container._vnode.component;
  5810. }
  5811. } else patch(container._vnode || null, vnode, container, null, null, null, namespace);
  5812. container._vnode = vnode;
  5813. if (!isFlushing) {
  5814. isFlushing = true;
  5815. flushPreFlushCbs(instance);
  5816. flushPostFlushCbs();
  5817. isFlushing = false;
  5818. }
  5819. };
  5820. const internals = {
  5821. p: patch,
  5822. um: unmount,
  5823. m: move,
  5824. r: remove$1,
  5825. mt: mountComponent,
  5826. mc: mountChildren,
  5827. pc: patchChildren,
  5828. pbc: patchBlockChildren,
  5829. n: getNextHostNode,
  5830. o: options
  5831. };
  5832. let hydrate$1;
  5833. let hydrateNode;
  5834. if (createHydrationFns) [hydrate$1, hydrateNode] = createHydrationFns(internals);
  5835. return {
  5836. render: render$1,
  5837. hydrate: hydrate$1,
  5838. createApp: createAppAPI(render$1, hydrate$1)
  5839. };
  5840. }
  5841. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  5842. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  5843. }
  5844. function toggleRecurse({ effect: effect$1, job }, allowed) {
  5845. if (allowed) {
  5846. effect$1.flags |= 32;
  5847. job.flags |= 4;
  5848. } else {
  5849. effect$1.flags &= -33;
  5850. job.flags &= -5;
  5851. }
  5852. }
  5853. function needTransition(parentSuspense, transition) {
  5854. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  5855. }
  5856. function traverseStaticChildren(n1, n2, shallow = false) {
  5857. const ch1 = n1.children;
  5858. const ch2 = n2.children;
  5859. if (isArray(ch1) && isArray(ch2)) for (let i = 0; i < ch1.length; i++) {
  5860. const c1 = ch1[i];
  5861. let c2 = ch2[i];
  5862. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  5863. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  5864. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  5865. c2.el = c1.el;
  5866. }
  5867. if (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);
  5868. }
  5869. if (c2.type === Text) if (c2.patchFlag !== -1) c2.el = c1.el;
  5870. else c2.__elIndex = i + (n1.type === Fragment ? 1 : 0);
  5871. if (c2.type === Comment && !c2.el) c2.el = c1.el;
  5872. c2.el && (c2.el.__vnode = c2);
  5873. }
  5874. }
  5875. function getSequence(arr) {
  5876. const p$1 = arr.slice();
  5877. const result = [0];
  5878. let i, j, u, v, c;
  5879. const len = arr.length;
  5880. for (i = 0; i < len; i++) {
  5881. const arrI = arr[i];
  5882. if (arrI !== 0) {
  5883. j = result[result.length - 1];
  5884. if (arr[j] < arrI) {
  5885. p$1[i] = j;
  5886. result.push(i);
  5887. continue;
  5888. }
  5889. u = 0;
  5890. v = result.length - 1;
  5891. while (u < v) {
  5892. c = u + v >> 1;
  5893. if (arr[result[c]] < arrI) u = c + 1;
  5894. else v = c;
  5895. }
  5896. if (arrI < arr[result[u]]) {
  5897. if (u > 0) p$1[i] = result[u - 1];
  5898. result[u] = i;
  5899. }
  5900. }
  5901. }
  5902. u = result.length;
  5903. v = result[u - 1];
  5904. while (u-- > 0) {
  5905. result[u] = v;
  5906. v = p$1[v];
  5907. }
  5908. return result;
  5909. }
  5910. function locateNonHydratedAsyncRoot(instance) {
  5911. const subComponent = instance.subTree.component;
  5912. if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
  5913. else return locateNonHydratedAsyncRoot(subComponent);
  5914. }
  5915. function invalidateMount(hooks) {
  5916. if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;
  5917. }
  5918. function resolveAsyncComponentPlaceholder(anchorVnode) {
  5919. if (anchorVnode.placeholder) return anchorVnode.placeholder;
  5920. const instance = anchorVnode.component;
  5921. if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
  5922. return null;
  5923. }
  5924. var isSuspense = (type) => type.__isSuspense;
  5925. var suspenseId = 0;
  5926. var Suspense = {
  5927. name: "Suspense",
  5928. __isSuspense: true,
  5929. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  5930. if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
  5931. else {
  5932. if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
  5933. n2.suspense = n1.suspense;
  5934. n2.suspense.vnode = n2;
  5935. n2.el = n1.el;
  5936. return;
  5937. }
  5938. patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
  5939. }
  5940. },
  5941. hydrate: hydrateSuspense,
  5942. normalize: normalizeSuspenseChildren
  5943. };
  5944. function triggerEvent(vnode, name) {
  5945. const eventListener = vnode.props && vnode.props[name];
  5946. if (isFunction(eventListener)) eventListener();
  5947. }
  5948. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  5949. const { p: patch, o: { createElement } } = rendererInternals;
  5950. const hiddenContainer = createElement("div");
  5951. const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals);
  5952. patch(null, suspense.pendingBranch = vnode.ssContent, hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds);
  5953. if (suspense.deps > 0) {
  5954. triggerEvent(vnode, "onPending");
  5955. triggerEvent(vnode, "onFallback");
  5956. patch(null, vnode.ssFallback, container, anchor, parentComponent, null, namespace, slotScopeIds);
  5957. setActiveBranch(suspense, vnode.ssFallback);
  5958. } else suspense.resolve(false, true);
  5959. }
  5960. function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  5961. const suspense = n2.suspense = n1.suspense;
  5962. suspense.vnode = n2;
  5963. n2.el = n1.el;
  5964. const newBranch = n2.ssContent;
  5965. const newFallback = n2.ssFallback;
  5966. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  5967. if (pendingBranch) {
  5968. suspense.pendingBranch = newBranch;
  5969. if (isSameVNodeType(pendingBranch, newBranch)) {
  5970. patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
  5971. if (suspense.deps <= 0) suspense.resolve();
  5972. else if (isInFallback) {
  5973. if (!isHydrating) {
  5974. patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
  5975. setActiveBranch(suspense, newFallback);
  5976. }
  5977. }
  5978. } else {
  5979. suspense.pendingId = suspenseId++;
  5980. if (isHydrating) {
  5981. suspense.isHydrating = false;
  5982. suspense.activeBranch = pendingBranch;
  5983. } else unmount(pendingBranch, parentComponent, suspense);
  5984. suspense.deps = 0;
  5985. suspense.effects.length = 0;
  5986. suspense.hiddenContainer = createElement("div");
  5987. if (isInFallback) {
  5988. patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
  5989. if (suspense.deps <= 0) suspense.resolve();
  5990. else {
  5991. patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
  5992. setActiveBranch(suspense, newFallback);
  5993. }
  5994. } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
  5995. patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, namespace, slotScopeIds, optimized);
  5996. suspense.resolve(true);
  5997. } else {
  5998. patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
  5999. if (suspense.deps <= 0) suspense.resolve();
  6000. }
  6001. }
  6002. } else if (activeBranch && isSameVNodeType(activeBranch, newBranch)) {
  6003. patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, namespace, slotScopeIds, optimized);
  6004. setActiveBranch(suspense, newBranch);
  6005. } else {
  6006. triggerEvent(n2, "onPending");
  6007. suspense.pendingBranch = newBranch;
  6008. if (newBranch.shapeFlag & 512) suspense.pendingId = newBranch.component.suspenseId;
  6009. else suspense.pendingId = suspenseId++;
  6010. patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
  6011. if (suspense.deps <= 0) suspense.resolve();
  6012. else {
  6013. const { timeout, pendingId } = suspense;
  6014. if (timeout > 0) setTimeout(() => {
  6015. if (suspense.pendingId === pendingId) suspense.fallback(newFallback);
  6016. }, timeout);
  6017. else if (timeout === 0) suspense.fallback(newFallback);
  6018. }
  6019. }
  6020. }
  6021. var hasWarned = false;
  6022. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  6023. if (!hasWarned) {
  6024. hasWarned = true;
  6025. console[console.info ? "info" : "log"](`<Suspense> is an experimental feature and its API will likely change.`);
  6026. }
  6027. const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove: remove$1 } } = rendererInternals;
  6028. let parentSuspenseId;
  6029. const isSuspensible = isVNodeSuspensible(vnode);
  6030. if (isSuspensible) {
  6031. if (parentSuspense && parentSuspense.pendingBranch) {
  6032. parentSuspenseId = parentSuspense.pendingId;
  6033. parentSuspense.deps++;
  6034. }
  6035. }
  6036. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  6037. assertNumber(timeout, `Suspense timeout`);
  6038. const initialAnchor = anchor;
  6039. const suspense = {
  6040. vnode,
  6041. parent: parentSuspense,
  6042. parentComponent,
  6043. namespace,
  6044. container,
  6045. hiddenContainer,
  6046. deps: 0,
  6047. pendingId: suspenseId++,
  6048. timeout: typeof timeout === "number" ? timeout : -1,
  6049. activeBranch: null,
  6050. pendingBranch: null,
  6051. isInFallback: !isHydrating,
  6052. isHydrating,
  6053. isUnmounted: false,
  6054. effects: [],
  6055. resolve(resume = false, sync = false) {
  6056. if (!resume && !suspense.pendingBranch) throw new Error(`suspense.resolve() is called without a pending branch.`);
  6057. if (suspense.isUnmounted) throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);
  6058. const { vnode: vnode2, activeBranch, pendingBranch, pendingId, effects, parentComponent: parentComponent2, container: container2, isInFallback } = suspense;
  6059. let delayEnter = false;
  6060. if (suspense.isHydrating) suspense.isHydrating = false;
  6061. else if (!resume) {
  6062. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  6063. if (delayEnter) activeBranch.transition.afterLeave = () => {
  6064. if (pendingId === suspense.pendingId) {
  6065. move(pendingBranch, container2, anchor === initialAnchor ? next(activeBranch) : anchor, 0);
  6066. queuePostFlushCb(effects);
  6067. if (isInFallback && vnode2.ssFallback) vnode2.ssFallback.el = null;
  6068. }
  6069. };
  6070. if (activeBranch) {
  6071. if (parentNode(activeBranch.el) === container2) anchor = next(activeBranch);
  6072. unmount(activeBranch, parentComponent2, suspense, true);
  6073. if (!delayEnter && isInFallback && vnode2.ssFallback) queuePostRenderEffect(() => vnode2.ssFallback.el = null, suspense);
  6074. }
  6075. if (!delayEnter) move(pendingBranch, container2, anchor, 0);
  6076. }
  6077. setActiveBranch(suspense, pendingBranch);
  6078. suspense.pendingBranch = null;
  6079. suspense.isInFallback = false;
  6080. let parent = suspense.parent;
  6081. let hasUnresolvedAncestor = false;
  6082. while (parent) {
  6083. if (parent.pendingBranch) {
  6084. parent.effects.push(...effects);
  6085. hasUnresolvedAncestor = true;
  6086. break;
  6087. }
  6088. parent = parent.parent;
  6089. }
  6090. if (!hasUnresolvedAncestor && !delayEnter) queuePostFlushCb(effects);
  6091. suspense.effects = [];
  6092. if (isSuspensible) {
  6093. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  6094. parentSuspense.deps--;
  6095. if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
  6096. }
  6097. }
  6098. triggerEvent(vnode2, "onResolve");
  6099. },
  6100. fallback(fallbackVNode) {
  6101. if (!suspense.pendingBranch) return;
  6102. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
  6103. triggerEvent(vnode2, "onFallback");
  6104. const anchor2 = next(activeBranch);
  6105. const mountFallback = () => {
  6106. if (!suspense.isInFallback) return;
  6107. patch(null, fallbackVNode, container2, anchor2, parentComponent2, null, namespace2, slotScopeIds, optimized);
  6108. setActiveBranch(suspense, fallbackVNode);
  6109. };
  6110. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  6111. if (delayEnter) activeBranch.transition.afterLeave = mountFallback;
  6112. suspense.isInFallback = true;
  6113. unmount(activeBranch, parentComponent2, null, true);
  6114. if (!delayEnter) mountFallback();
  6115. },
  6116. move(container2, anchor2, type) {
  6117. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  6118. suspense.container = container2;
  6119. },
  6120. next() {
  6121. return suspense.activeBranch && next(suspense.activeBranch);
  6122. },
  6123. registerDep(instance, setupRenderEffect, optimized2) {
  6124. const isInPendingSuspense = !!suspense.pendingBranch;
  6125. if (isInPendingSuspense) suspense.deps++;
  6126. const hydratedEl = instance.vnode.el;
  6127. instance.asyncDep.catch((err) => {
  6128. handleError(err, instance, 0);
  6129. }).then((asyncSetupResult) => {
  6130. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
  6131. instance.asyncResolved = true;
  6132. const { vnode: vnode2 } = instance;
  6133. pushWarningContext(vnode2);
  6134. handleSetupResult(instance, asyncSetupResult, false);
  6135. if (hydratedEl) vnode2.el = hydratedEl;
  6136. const placeholder = !hydratedEl && instance.subTree.el;
  6137. setupRenderEffect(instance, vnode2, parentNode(hydratedEl || instance.subTree.el), hydratedEl ? null : next(instance.subTree), suspense, namespace, optimized2);
  6138. if (placeholder) {
  6139. vnode2.placeholder = null;
  6140. remove$1(placeholder);
  6141. }
  6142. updateHOCHostEl(instance, vnode2.el);
  6143. popWarningContext();
  6144. if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
  6145. });
  6146. },
  6147. unmount(parentSuspense2, doRemove) {
  6148. suspense.isUnmounted = true;
  6149. if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense2, doRemove);
  6150. if (suspense.pendingBranch) unmount(suspense.pendingBranch, parentComponent, parentSuspense2, doRemove);
  6151. }
  6152. };
  6153. return suspense;
  6154. }
  6155. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  6156. const suspense = vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement("div"), null, namespace, slotScopeIds, optimized, rendererInternals, true);
  6157. const result = hydrateNode(node, suspense.pendingBranch = vnode.ssContent, parentComponent, suspense, slotScopeIds, optimized);
  6158. if (suspense.deps === 0) suspense.resolve(false, true);
  6159. return result;
  6160. }
  6161. function normalizeSuspenseChildren(vnode) {
  6162. const { shapeFlag, children } = vnode;
  6163. const isSlotChildren = shapeFlag & 32;
  6164. vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
  6165. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  6166. }
  6167. function normalizeSuspenseSlot(s) {
  6168. let block;
  6169. if (isFunction(s)) {
  6170. const trackBlock = isBlockTreeEnabled && s._c;
  6171. if (trackBlock) {
  6172. s._d = false;
  6173. openBlock();
  6174. }
  6175. s = s();
  6176. if (trackBlock) {
  6177. s._d = true;
  6178. block = currentBlock;
  6179. closeBlock();
  6180. }
  6181. }
  6182. if (isArray(s)) {
  6183. const singleChild = filterSingleRoot(s);
  6184. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) warn$1(`<Suspense> slots expect a single root node.`);
  6185. s = singleChild;
  6186. }
  6187. s = normalizeVNode(s);
  6188. if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
  6189. return s;
  6190. }
  6191. function queueEffectWithSuspense(fn, suspense) {
  6192. if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
  6193. else suspense.effects.push(fn);
  6194. else queuePostFlushCb(fn);
  6195. }
  6196. function setActiveBranch(suspense, branch) {
  6197. suspense.activeBranch = branch;
  6198. const { vnode, parentComponent } = suspense;
  6199. let el = branch.el;
  6200. while (!el && branch.component) {
  6201. branch = branch.component.subTree;
  6202. el = branch.el;
  6203. }
  6204. vnode.el = el;
  6205. if (parentComponent && parentComponent.subTree === vnode) {
  6206. parentComponent.vnode.el = el;
  6207. updateHOCHostEl(parentComponent, el);
  6208. }
  6209. }
  6210. function isVNodeSuspensible(vnode) {
  6211. const suspensible = vnode.props && vnode.props.suspensible;
  6212. return suspensible != null && suspensible !== false;
  6213. }
  6214. var Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
  6215. var Text = /* @__PURE__ */ Symbol.for("v-txt");
  6216. var Comment = /* @__PURE__ */ Symbol.for("v-cmt");
  6217. var Static = /* @__PURE__ */ Symbol.for("v-stc");
  6218. var blockStack = [];
  6219. var currentBlock = null;
  6220. function openBlock(disableTracking = false) {
  6221. blockStack.push(currentBlock = disableTracking ? null : []);
  6222. }
  6223. function closeBlock() {
  6224. blockStack.pop();
  6225. currentBlock = blockStack[blockStack.length - 1] || null;
  6226. }
  6227. var isBlockTreeEnabled = 1;
  6228. function setBlockTracking(value, inVOnce = false) {
  6229. isBlockTreeEnabled += value;
  6230. if (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;
  6231. }
  6232. function setupBlock(vnode) {
  6233. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  6234. closeBlock();
  6235. if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(vnode);
  6236. return vnode;
  6237. }
  6238. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  6239. return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));
  6240. }
  6241. function createBlock(type, props, children, patchFlag, dynamicProps) {
  6242. return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));
  6243. }
  6244. function isVNode(value) {
  6245. return value ? value.__v_isVNode === true : false;
  6246. }
  6247. function isSameVNodeType(n1, n2) {
  6248. if (n2.shapeFlag & 6 && n1.component) {
  6249. const dirtyInstances = hmrDirtyComponents.get(n2.type);
  6250. if (dirtyInstances && dirtyInstances.has(n1.component)) {
  6251. n1.shapeFlag &= -257;
  6252. n2.shapeFlag &= -513;
  6253. return false;
  6254. }
  6255. }
  6256. return n1.type === n2.type && n1.key === n2.key;
  6257. }
  6258. var vnodeArgsTransformer;
  6259. function transformVNodeArgs(transformer) {
  6260. vnodeArgsTransformer = transformer;
  6261. }
  6262. var createVNodeWithArgsTransform = (...args) => {
  6263. return _createVNode(...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args);
  6264. };
  6265. var normalizeKey = ({ key }) => key != null ? key : null;
  6266. var normalizeRef = ({ ref: ref$1, ref_key, ref_for }) => {
  6267. if (typeof ref$1 === "number") ref$1 = "" + ref$1;
  6268. return ref$1 != null ? isString(ref$1) || isRef(ref$1) || isFunction(ref$1) ? {
  6269. i: currentRenderingInstance,
  6270. r: ref$1,
  6271. k: ref_key,
  6272. f: !!ref_for
  6273. } : ref$1 : null;
  6274. };
  6275. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  6276. const vnode = {
  6277. __v_isVNode: true,
  6278. __v_skip: true,
  6279. type,
  6280. props,
  6281. key: props && normalizeKey(props),
  6282. ref: props && normalizeRef(props),
  6283. scopeId: currentScopeId,
  6284. slotScopeIds: null,
  6285. children,
  6286. component: null,
  6287. suspense: null,
  6288. ssContent: null,
  6289. ssFallback: null,
  6290. dirs: null,
  6291. transition: null,
  6292. el: null,
  6293. anchor: null,
  6294. target: null,
  6295. targetStart: null,
  6296. targetAnchor: null,
  6297. staticCount: 0,
  6298. shapeFlag,
  6299. patchFlag,
  6300. dynamicProps,
  6301. dynamicChildren: null,
  6302. appContext: null,
  6303. ctx: currentRenderingInstance
  6304. };
  6305. if (needFullChildrenNormalization) {
  6306. normalizeChildren(vnode, children);
  6307. if (shapeFlag & 128) type.normalize(vnode);
  6308. } else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
  6309. if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  6310. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
  6311. return vnode;
  6312. }
  6313. var createVNode = createVNodeWithArgsTransform;
  6314. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  6315. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  6316. if (!type) warn$1(`Invalid vnode type when creating vnode: ${type}.`);
  6317. type = Comment;
  6318. }
  6319. if (isVNode(type)) {
  6320. const cloned = cloneVNode(type, props, true);
  6321. if (children) normalizeChildren(cloned, children);
  6322. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
  6323. else currentBlock.push(cloned);
  6324. cloned.patchFlag = -2;
  6325. return cloned;
  6326. }
  6327. if (isClassComponent(type)) type = type.__vccOpts;
  6328. if (props) {
  6329. props = guardReactiveProps(props);
  6330. let { class: klass, style } = props;
  6331. if (klass && !isString(klass)) props.class = normalizeClass(klass);
  6332. if (isObject(style)) {
  6333. if (isProxy(style) && !isArray(style)) style = extend({}, style);
  6334. props.style = normalizeStyle(style);
  6335. }
  6336. }
  6337. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  6338. if (shapeFlag & 4 && isProxy(type)) {
  6339. type = toRaw(type);
  6340. warn$1(`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\`.`, `
  6341. Component that was made reactive: `, type);
  6342. }
  6343. return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
  6344. }
  6345. function guardReactiveProps(props) {
  6346. if (!props) return null;
  6347. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  6348. }
  6349. function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
  6350. const { props, ref: ref$1, patchFlag, children, transition } = vnode;
  6351. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  6352. const cloned = {
  6353. __v_isVNode: true,
  6354. __v_skip: true,
  6355. type: vnode.type,
  6356. props: mergedProps,
  6357. key: mergedProps && normalizeKey(mergedProps),
  6358. ref: extraProps && extraProps.ref ? mergeRef && ref$1 ? isArray(ref$1) ? ref$1.concat(normalizeRef(extraProps)) : [ref$1, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref$1,
  6359. scopeId: vnode.scopeId,
  6360. slotScopeIds: vnode.slotScopeIds,
  6361. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  6362. target: vnode.target,
  6363. targetStart: vnode.targetStart,
  6364. targetAnchor: vnode.targetAnchor,
  6365. staticCount: vnode.staticCount,
  6366. shapeFlag: vnode.shapeFlag,
  6367. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  6368. dynamicProps: vnode.dynamicProps,
  6369. dynamicChildren: vnode.dynamicChildren,
  6370. appContext: vnode.appContext,
  6371. dirs: vnode.dirs,
  6372. transition,
  6373. component: vnode.component,
  6374. suspense: vnode.suspense,
  6375. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  6376. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  6377. placeholder: vnode.placeholder,
  6378. el: vnode.el,
  6379. anchor: vnode.anchor,
  6380. ctx: vnode.ctx,
  6381. ce: vnode.ce
  6382. };
  6383. if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
  6384. return cloned;
  6385. }
  6386. function deepCloneVNode(vnode) {
  6387. const cloned = cloneVNode(vnode);
  6388. if (isArray(vnode.children)) cloned.children = vnode.children.map(deepCloneVNode);
  6389. return cloned;
  6390. }
  6391. function createTextVNode(text = " ", flag = 0) {
  6392. return createVNode(Text, null, text, flag);
  6393. }
  6394. function createStaticVNode(content, numberOfNodes) {
  6395. const vnode = createVNode(Static, null, content);
  6396. vnode.staticCount = numberOfNodes;
  6397. return vnode;
  6398. }
  6399. function createCommentVNode(text = "", asBlock = false) {
  6400. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  6401. }
  6402. function normalizeVNode(child) {
  6403. if (child == null || typeof child === "boolean") return createVNode(Comment);
  6404. else if (isArray(child)) return createVNode(Fragment, null, child.slice());
  6405. else if (isVNode(child)) return cloneIfMounted(child);
  6406. else return createVNode(Text, null, String(child));
  6407. }
  6408. function cloneIfMounted(child) {
  6409. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  6410. }
  6411. function normalizeChildren(vnode, children) {
  6412. let type = 0;
  6413. const { shapeFlag } = vnode;
  6414. if (children == null) children = null;
  6415. else if (isArray(children)) type = 16;
  6416. else if (typeof children === "object") if (shapeFlag & 65) {
  6417. const slot = children.default;
  6418. if (slot) {
  6419. slot._c && (slot._d = false);
  6420. normalizeChildren(vnode, slot());
  6421. slot._c && (slot._d = true);
  6422. }
  6423. return;
  6424. } else {
  6425. type = 32;
  6426. const slotFlag = children._;
  6427. if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
  6428. else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
  6429. else {
  6430. children._ = 2;
  6431. vnode.patchFlag |= 1024;
  6432. }
  6433. }
  6434. else if (isFunction(children)) {
  6435. children = {
  6436. default: children,
  6437. _ctx: currentRenderingInstance
  6438. };
  6439. type = 32;
  6440. } else {
  6441. children = String(children);
  6442. if (shapeFlag & 64) {
  6443. type = 16;
  6444. children = [createTextVNode(children)];
  6445. } else type = 8;
  6446. }
  6447. vnode.children = children;
  6448. vnode.shapeFlag |= type;
  6449. }
  6450. function mergeProps(...args) {
  6451. const ret = {};
  6452. for (let i = 0; i < args.length; i++) {
  6453. const toMerge = args[i];
  6454. for (const key in toMerge) if (key === "class") {
  6455. if (ret.class !== toMerge.class) ret.class = normalizeClass([ret.class, toMerge.class]);
  6456. } else if (key === "style") ret.style = normalizeStyle([ret.style, toMerge.style]);
  6457. else if (isOn(key)) {
  6458. const existing = ret[key];
  6459. const incoming = toMerge[key];
  6460. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
  6461. } else if (key !== "") ret[key] = toMerge[key];
  6462. }
  6463. return ret;
  6464. }
  6465. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  6466. callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
  6467. }
  6468. var emptyAppContext = createAppContext();
  6469. var uid = 0;
  6470. function createComponentInstance(vnode, parent, suspense) {
  6471. const type = vnode.type;
  6472. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  6473. const instance = {
  6474. uid: uid++,
  6475. vnode,
  6476. type,
  6477. parent,
  6478. appContext,
  6479. root: null,
  6480. next: null,
  6481. subTree: null,
  6482. effect: null,
  6483. update: null,
  6484. job: null,
  6485. scope: new EffectScope(true),
  6486. render: null,
  6487. proxy: null,
  6488. exposed: null,
  6489. exposeProxy: null,
  6490. withProxy: null,
  6491. provides: parent ? parent.provides : Object.create(appContext.provides),
  6492. ids: parent ? parent.ids : [
  6493. "",
  6494. 0,
  6495. 0
  6496. ],
  6497. accessCache: null,
  6498. renderCache: [],
  6499. components: null,
  6500. directives: null,
  6501. propsOptions: normalizePropsOptions(type, appContext),
  6502. emitsOptions: normalizeEmitsOptions(type, appContext),
  6503. emit: null,
  6504. emitted: null,
  6505. propsDefaults: EMPTY_OBJ,
  6506. inheritAttrs: type.inheritAttrs,
  6507. ctx: EMPTY_OBJ,
  6508. data: EMPTY_OBJ,
  6509. props: EMPTY_OBJ,
  6510. attrs: EMPTY_OBJ,
  6511. slots: EMPTY_OBJ,
  6512. refs: EMPTY_OBJ,
  6513. setupState: EMPTY_OBJ,
  6514. setupContext: null,
  6515. suspense,
  6516. suspenseId: suspense ? suspense.pendingId : 0,
  6517. asyncDep: null,
  6518. asyncResolved: false,
  6519. isMounted: false,
  6520. isUnmounted: false,
  6521. isDeactivated: false,
  6522. bc: null,
  6523. c: null,
  6524. bm: null,
  6525. m: null,
  6526. bu: null,
  6527. u: null,
  6528. um: null,
  6529. bum: null,
  6530. da: null,
  6531. a: null,
  6532. rtg: null,
  6533. rtc: null,
  6534. ec: null,
  6535. sp: null
  6536. };
  6537. instance.ctx = createDevRenderContext(instance);
  6538. instance.root = parent ? parent.root : instance;
  6539. instance.emit = emit.bind(null, instance);
  6540. if (vnode.ce) vnode.ce(instance);
  6541. return instance;
  6542. }
  6543. var currentInstance = null;
  6544. var getCurrentInstance = () => currentInstance || currentRenderingInstance;
  6545. var internalSetCurrentInstance;
  6546. var setInSSRSetupState;
  6547. {
  6548. const g = getGlobalThis();
  6549. const registerGlobalSetter = (key, setter) => {
  6550. let setters;
  6551. if (!(setters = g[key])) setters = g[key] = [];
  6552. setters.push(setter);
  6553. return (v) => {
  6554. if (setters.length > 1) setters.forEach((set) => set(v));
  6555. else setters[0](v);
  6556. };
  6557. };
  6558. internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);
  6559. setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);
  6560. }
  6561. var setCurrentInstance = (instance) => {
  6562. const prev = currentInstance;
  6563. internalSetCurrentInstance(instance);
  6564. instance.scope.on();
  6565. return () => {
  6566. instance.scope.off();
  6567. internalSetCurrentInstance(prev);
  6568. };
  6569. };
  6570. var unsetCurrentInstance = () => {
  6571. currentInstance && currentInstance.scope.off();
  6572. internalSetCurrentInstance(null);
  6573. };
  6574. var isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
  6575. function validateComponentName(name, { isNativeTag }) {
  6576. if (isBuiltInTag(name) || isNativeTag(name)) warn$1("Do not use built-in or reserved HTML elements as component id: " + name);
  6577. }
  6578. function isStatefulComponent(instance) {
  6579. return instance.vnode.shapeFlag & 4;
  6580. }
  6581. var isInSSRComponentSetup = false;
  6582. function setupComponent(instance, isSSR = false, optimized = false) {
  6583. isSSR && setInSSRSetupState(isSSR);
  6584. const { props, children } = instance.vnode;
  6585. const isStateful = isStatefulComponent(instance);
  6586. initProps(instance, props, isStateful, isSSR);
  6587. initSlots(instance, children, optimized || isSSR);
  6588. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  6589. isSSR && setInSSRSetupState(false);
  6590. return setupResult;
  6591. }
  6592. function setupStatefulComponent(instance, isSSR) {
  6593. const Component = instance.type;
  6594. if (Component.name) validateComponentName(Component.name, instance.appContext.config);
  6595. if (Component.components) {
  6596. const names = Object.keys(Component.components);
  6597. for (let i = 0; i < names.length; i++) validateComponentName(names[i], instance.appContext.config);
  6598. }
  6599. if (Component.directives) {
  6600. const names = Object.keys(Component.directives);
  6601. for (let i = 0; i < names.length; i++) validateDirectiveName(names[i]);
  6602. }
  6603. if (Component.compilerOptions && isRuntimeOnly()) warn$1(`"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.`);
  6604. instance.accessCache = /* @__PURE__ */ Object.create(null);
  6605. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  6606. exposePropsOnRenderContext(instance);
  6607. const { setup } = Component;
  6608. if (setup) {
  6609. pauseTracking();
  6610. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  6611. const reset = setCurrentInstance(instance);
  6612. const setupResult = callWithErrorHandling(setup, instance, 0, [shallowReadonly(instance.props), setupContext]);
  6613. const isAsyncSetup = isPromise(setupResult);
  6614. resetTracking();
  6615. reset();
  6616. if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
  6617. if (isAsyncSetup) {
  6618. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  6619. if (isSSR) return setupResult.then((resolvedResult) => {
  6620. handleSetupResult(instance, resolvedResult, isSSR);
  6621. }).catch((e) => {
  6622. handleError(e, instance, 0);
  6623. });
  6624. else {
  6625. instance.asyncDep = setupResult;
  6626. if (!instance.suspense) warn$1(`Component <${formatComponentName(instance, Component)}>: 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.`);
  6627. }
  6628. } else handleSetupResult(instance, setupResult, isSSR);
  6629. } else finishComponentSetup(instance, isSSR);
  6630. }
  6631. function handleSetupResult(instance, setupResult, isSSR) {
  6632. if (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
  6633. else instance.render = setupResult;
  6634. else if (isObject(setupResult)) {
  6635. if (isVNode(setupResult)) warn$1(`setup() should not return VNodes directly - return a render function instead.`);
  6636. instance.devtoolsRawSetupState = setupResult;
  6637. instance.setupState = proxyRefs(setupResult);
  6638. exposeSetupStateOnRenderContext(instance);
  6639. } else if (setupResult !== void 0) warn$1(`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`);
  6640. finishComponentSetup(instance, isSSR);
  6641. }
  6642. var compile$1;
  6643. var installWithProxy;
  6644. function registerRuntimeCompiler(_compile) {
  6645. compile$1 = _compile;
  6646. installWithProxy = (i) => {
  6647. if (i.render._rc) i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  6648. };
  6649. }
  6650. var isRuntimeOnly = () => !compile$1;
  6651. function finishComponentSetup(instance, isSSR, skipOptions) {
  6652. const Component = instance.type;
  6653. if (!instance.render) {
  6654. if (!isSSR && compile$1 && !Component.render) {
  6655. const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;
  6656. if (template) {
  6657. startMeasure(instance, `compile`);
  6658. const { isCustomElement, compilerOptions } = instance.appContext.config;
  6659. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  6660. const finalCompilerOptions = extend(extend({
  6661. isCustomElement,
  6662. delimiters
  6663. }, compilerOptions), componentCompilerOptions);
  6664. Component.render = compile$1(template, finalCompilerOptions);
  6665. endMeasure(instance, `compile`);
  6666. }
  6667. }
  6668. instance.render = Component.render || NOOP;
  6669. if (installWithProxy) installWithProxy(instance);
  6670. }
  6671. if (__VUE_OPTIONS_API__ && true) {
  6672. const reset = setCurrentInstance(instance);
  6673. pauseTracking();
  6674. try {
  6675. applyOptions(instance);
  6676. } finally {
  6677. resetTracking();
  6678. reset();
  6679. }
  6680. }
  6681. if (!Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template) warn$1("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\".");
  6682. else warn$1(`Component is missing template or render function: `, Component);
  6683. }
  6684. var attrsProxyHandlers = {
  6685. get(target, key) {
  6686. markAttrsAccessed();
  6687. track(target, "get", "");
  6688. return target[key];
  6689. },
  6690. set() {
  6691. warn$1(`setupContext.attrs is readonly.`);
  6692. return false;
  6693. },
  6694. deleteProperty() {
  6695. warn$1(`setupContext.attrs is readonly.`);
  6696. return false;
  6697. }
  6698. };
  6699. function getSlotsProxy(instance) {
  6700. return new Proxy(instance.slots, { get(target, key) {
  6701. track(instance, "get", "$slots");
  6702. return target[key];
  6703. } });
  6704. }
  6705. function createSetupContext(instance) {
  6706. const expose = (exposed) => {
  6707. if (instance.exposed) warn$1(`expose() should be called only once per setup().`);
  6708. if (exposed != null) {
  6709. let exposedType = typeof exposed;
  6710. if (exposedType === "object") {
  6711. if (isArray(exposed)) exposedType = "array";
  6712. else if (isRef(exposed)) exposedType = "ref";
  6713. }
  6714. if (exposedType !== "object") warn$1(`expose() should be passed a plain object, received ${exposedType}.`);
  6715. }
  6716. instance.exposed = exposed || {};
  6717. };
  6718. {
  6719. let attrsProxy;
  6720. let slotsProxy;
  6721. return Object.freeze({
  6722. get attrs() {
  6723. return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
  6724. },
  6725. get slots() {
  6726. return slotsProxy || (slotsProxy = getSlotsProxy(instance));
  6727. },
  6728. get emit() {
  6729. return (event, ...args) => instance.emit(event, ...args);
  6730. },
  6731. expose
  6732. });
  6733. }
  6734. }
  6735. function getComponentPublicInstance(instance) {
  6736. if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  6737. get(target, key) {
  6738. if (key in target) return target[key];
  6739. else if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
  6740. },
  6741. has(target, key) {
  6742. return key in target || key in publicPropertiesMap;
  6743. }
  6744. }));
  6745. else return instance.proxy;
  6746. }
  6747. var classifyRE = /(?:^|[-_])\w/g;
  6748. var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  6749. function getComponentName(Component, includeInferred = true) {
  6750. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  6751. }
  6752. function formatComponentName(instance, Component, isRoot = false) {
  6753. let name = getComponentName(Component);
  6754. if (!name && Component.__file) {
  6755. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  6756. if (match) name = match[1];
  6757. }
  6758. if (!name && instance) {
  6759. const inferFromRegistry = (registry) => {
  6760. for (const key in registry) if (registry[key] === Component) return key;
  6761. };
  6762. name = inferFromRegistry(instance.components) || instance.parent && inferFromRegistry(instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
  6763. }
  6764. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  6765. }
  6766. function isClassComponent(value) {
  6767. return isFunction(value) && "__vccOpts" in value;
  6768. }
  6769. var computed = (getterOrOptions, debugOptions) => {
  6770. const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
  6771. {
  6772. const i = getCurrentInstance();
  6773. if (i && i.appContext.config.warnRecursiveComputed) c._warnRecursive = true;
  6774. }
  6775. return c;
  6776. };
  6777. function h(type, propsOrChildren, children) {
  6778. try {
  6779. setBlockTracking(-1);
  6780. const l = arguments.length;
  6781. if (l === 2) if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  6782. if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
  6783. return createVNode(type, propsOrChildren);
  6784. } else return createVNode(type, null, propsOrChildren);
  6785. else {
  6786. if (l > 3) children = Array.prototype.slice.call(arguments, 2);
  6787. else if (l === 3 && isVNode(children)) children = [children];
  6788. return createVNode(type, propsOrChildren, children);
  6789. }
  6790. } finally {
  6791. setBlockTracking(1);
  6792. }
  6793. }
  6794. function initCustomFormatter() {
  6795. if (typeof window === "undefined") return;
  6796. const vueStyle = { style: "color:#3ba776" };
  6797. const numberStyle = { style: "color:#1677ff" };
  6798. const stringStyle = { style: "color:#f5222d" };
  6799. const keywordStyle = { style: "color:#eb2f96" };
  6800. const formatter = {
  6801. __vue_custom_formatter: true,
  6802. header(obj) {
  6803. if (!isObject(obj)) return null;
  6804. if (obj.__isVue) return [
  6805. "div",
  6806. vueStyle,
  6807. `VueInstance`
  6808. ];
  6809. else if (isRef(obj)) {
  6810. pauseTracking();
  6811. const value = obj.value;
  6812. resetTracking();
  6813. return [
  6814. "div",
  6815. {},
  6816. [
  6817. "span",
  6818. vueStyle,
  6819. genRefFlag(obj)
  6820. ],
  6821. "<",
  6822. formatValue(value),
  6823. `>`
  6824. ];
  6825. } else if (isReactive(obj)) return [
  6826. "div",
  6827. {},
  6828. [
  6829. "span",
  6830. vueStyle,
  6831. isShallow(obj) ? "ShallowReactive" : "Reactive"
  6832. ],
  6833. "<",
  6834. formatValue(obj),
  6835. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  6836. ];
  6837. else if (isReadonly(obj)) return [
  6838. "div",
  6839. {},
  6840. [
  6841. "span",
  6842. vueStyle,
  6843. isShallow(obj) ? "ShallowReadonly" : "Readonly"
  6844. ],
  6845. "<",
  6846. formatValue(obj),
  6847. ">"
  6848. ];
  6849. return null;
  6850. },
  6851. hasBody(obj) {
  6852. return obj && obj.__isVue;
  6853. },
  6854. body(obj) {
  6855. if (obj && obj.__isVue) return [
  6856. "div",
  6857. {},
  6858. ...formatInstance(obj.$)
  6859. ];
  6860. }
  6861. };
  6862. function formatInstance(instance) {
  6863. const blocks = [];
  6864. if (instance.type.props && instance.props) blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  6865. if (instance.setupState !== EMPTY_OBJ) blocks.push(createInstanceBlock("setup", instance.setupState));
  6866. if (instance.data !== EMPTY_OBJ) blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  6867. const computed$2 = extractKeys(instance, "computed");
  6868. if (computed$2) blocks.push(createInstanceBlock("computed", computed$2));
  6869. const injected = extractKeys(instance, "inject");
  6870. if (injected) blocks.push(createInstanceBlock("injected", injected));
  6871. blocks.push([
  6872. "div",
  6873. {},
  6874. [
  6875. "span",
  6876. { style: keywordStyle.style + ";opacity:0.66" },
  6877. "$ (internal): "
  6878. ],
  6879. ["object", { object: instance }]
  6880. ]);
  6881. return blocks;
  6882. }
  6883. function createInstanceBlock(type, target) {
  6884. target = extend({}, target);
  6885. if (!Object.keys(target).length) return ["span", {}];
  6886. return [
  6887. "div",
  6888. { style: "line-height:1.25em;margin-bottom:0.6em" },
  6889. [
  6890. "div",
  6891. { style: "color:#476582" },
  6892. type
  6893. ],
  6894. [
  6895. "div",
  6896. { style: "padding-left:1.25em" },
  6897. ...Object.keys(target).map((key) => {
  6898. return [
  6899. "div",
  6900. {},
  6901. [
  6902. "span",
  6903. keywordStyle,
  6904. key + ": "
  6905. ],
  6906. formatValue(target[key], false)
  6907. ];
  6908. })
  6909. ]
  6910. ];
  6911. }
  6912. function formatValue(v, asRaw = true) {
  6913. if (typeof v === "number") return [
  6914. "span",
  6915. numberStyle,
  6916. v
  6917. ];
  6918. else if (typeof v === "string") return [
  6919. "span",
  6920. stringStyle,
  6921. JSON.stringify(v)
  6922. ];
  6923. else if (typeof v === "boolean") return [
  6924. "span",
  6925. keywordStyle,
  6926. v
  6927. ];
  6928. else if (isObject(v)) return ["object", { object: asRaw ? toRaw(v) : v }];
  6929. else return [
  6930. "span",
  6931. stringStyle,
  6932. String(v)
  6933. ];
  6934. }
  6935. function extractKeys(instance, type) {
  6936. const Comp = instance.type;
  6937. if (isFunction(Comp)) return;
  6938. const extracted = {};
  6939. for (const key in instance.ctx) if (isKeyOfType(Comp, key, type)) extracted[key] = instance.ctx[key];
  6940. return extracted;
  6941. }
  6942. function isKeyOfType(Comp, key, type) {
  6943. const opts = Comp[type];
  6944. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) return true;
  6945. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) return true;
  6946. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) return true;
  6947. }
  6948. function genRefFlag(v) {
  6949. if (isShallow(v)) return `ShallowRef`;
  6950. if (v.effect) return `ComputedRef`;
  6951. return `Ref`;
  6952. }
  6953. if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
  6954. else window.devtoolsFormatters = [formatter];
  6955. }
  6956. function withMemo(memo, render$1, cache, index) {
  6957. const cached = cache[index];
  6958. if (cached && isMemoSame(cached, memo)) return cached;
  6959. const ret = render$1();
  6960. ret.memo = memo.slice();
  6961. ret.cacheIndex = index;
  6962. return cache[index] = ret;
  6963. }
  6964. function isMemoSame(cached, memo) {
  6965. const prev = cached.memo;
  6966. if (prev.length != memo.length) return false;
  6967. for (let i = 0; i < prev.length; i++) if (hasChanged(prev[i], memo[i])) return false;
  6968. if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(cached);
  6969. return true;
  6970. }
  6971. var version = "3.5.27";
  6972. var warn = warn$1;
  6973. var ErrorTypeStrings = ErrorTypeStrings$1;
  6974. var devtools = devtools$1;
  6975. var setDevtoolsHook = setDevtoolsHook$1;
  6976. var ssrUtils = {
  6977. createComponentInstance,
  6978. setupComponent,
  6979. renderComponentRoot,
  6980. setCurrentRenderingInstance,
  6981. isVNode,
  6982. normalizeVNode,
  6983. getComponentPublicInstance,
  6984. ensureValidVNode,
  6985. pushWarningContext,
  6986. popWarningContext
  6987. };
  6988. var resolveFilter = null;
  6989. var compatUtils = null;
  6990. var DeprecationTypes = null;
  6991. //#endregion
  6992. //#region node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
  6993. /**
  6994. * @vue/runtime-dom v3.5.27
  6995. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  6996. * @license MIT
  6997. **/
  6998. var policy = void 0;
  6999. var tt = typeof window !== "undefined" && window.trustedTypes;
  7000. if (tt) try {
  7001. policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
  7002. } catch (e) {
  7003. warn(`Error creating trusted types policy: ${e}`);
  7004. }
  7005. var unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  7006. var svgNS = "http://www.w3.org/2000/svg";
  7007. var mathmlNS = "http://www.w3.org/1998/Math/MathML";
  7008. var doc = typeof document !== "undefined" ? document : null;
  7009. var templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
  7010. var nodeOps = {
  7011. insert: (child, parent, anchor) => {
  7012. parent.insertBefore(child, anchor || null);
  7013. },
  7014. remove: (child) => {
  7015. const parent = child.parentNode;
  7016. if (parent) parent.removeChild(child);
  7017. },
  7018. createElement: (tag, namespace, is, props) => {
  7019. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  7020. if (tag === "select" && props && props.multiple != null) el.setAttribute("multiple", props.multiple);
  7021. return el;
  7022. },
  7023. createText: (text) => doc.createTextNode(text),
  7024. createComment: (text) => doc.createComment(text),
  7025. setText: (node, text) => {
  7026. node.nodeValue = text;
  7027. },
  7028. setElementText: (el, text) => {
  7029. el.textContent = text;
  7030. },
  7031. parentNode: (node) => node.parentNode,
  7032. nextSibling: (node) => node.nextSibling,
  7033. querySelector: (selector) => doc.querySelector(selector),
  7034. setScopeId(el, id) {
  7035. el.setAttribute(id, "");
  7036. },
  7037. insertStaticContent(content, parent, anchor, namespace, start, end) {
  7038. const before = anchor ? anchor.previousSibling : parent.lastChild;
  7039. if (start && (start === end || start.nextSibling)) while (true) {
  7040. parent.insertBefore(start.cloneNode(true), anchor);
  7041. if (start === end || !(start = start.nextSibling)) break;
  7042. }
  7043. else {
  7044. templateContainer.innerHTML = unsafeToTrustedHTML(namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content);
  7045. const template = templateContainer.content;
  7046. if (namespace === "svg" || namespace === "mathml") {
  7047. const wrapper = template.firstChild;
  7048. while (wrapper.firstChild) template.appendChild(wrapper.firstChild);
  7049. template.removeChild(wrapper);
  7050. }
  7051. parent.insertBefore(template, anchor);
  7052. }
  7053. return [before ? before.nextSibling : parent.firstChild, anchor ? anchor.previousSibling : parent.lastChild];
  7054. }
  7055. };
  7056. var TRANSITION = "transition";
  7057. var ANIMATION = "animation";
  7058. var vtcKey = /* @__PURE__ */ Symbol("_vtc");
  7059. var DOMTransitionPropsValidators = {
  7060. name: String,
  7061. type: String,
  7062. css: {
  7063. type: Boolean,
  7064. default: true
  7065. },
  7066. duration: [
  7067. String,
  7068. Number,
  7069. Object
  7070. ],
  7071. enterFromClass: String,
  7072. enterActiveClass: String,
  7073. enterToClass: String,
  7074. appearFromClass: String,
  7075. appearActiveClass: String,
  7076. appearToClass: String,
  7077. leaveFromClass: String,
  7078. leaveActiveClass: String,
  7079. leaveToClass: String
  7080. };
  7081. var TransitionPropsValidators = /* @__PURE__ */ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
  7082. var decorate$1 = (t) => {
  7083. t.displayName = "Transition";
  7084. t.props = TransitionPropsValidators;
  7085. return t;
  7086. };
  7087. var Transition = /* @__PURE__ */ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
  7088. var callHook = (hook, args = []) => {
  7089. if (isArray(hook)) hook.forEach((h2) => h2(...args));
  7090. else if (hook) hook(...args);
  7091. };
  7092. var hasExplicitCallback = (hook) => {
  7093. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  7094. };
  7095. function resolveTransitionProps(rawProps) {
  7096. const baseProps = {};
  7097. for (const key in rawProps) if (!(key in DOMTransitionPropsValidators)) baseProps[key] = rawProps[key];
  7098. if (rawProps.css === false) return baseProps;
  7099. const { name = "v", type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps;
  7100. const durations = normalizeDuration(duration);
  7101. const enterDuration = durations && durations[0];
  7102. const leaveDuration = durations && durations[1];
  7103. const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps;
  7104. const finishEnter = (el, isAppear, done, isCancelled) => {
  7105. el._enterCancelled = isCancelled;
  7106. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  7107. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  7108. done && done();
  7109. };
  7110. const finishLeave = (el, done) => {
  7111. el._isLeaving = false;
  7112. removeTransitionClass(el, leaveFromClass);
  7113. removeTransitionClass(el, leaveToClass);
  7114. removeTransitionClass(el, leaveActiveClass);
  7115. done && done();
  7116. };
  7117. const makeEnterHook = (isAppear) => {
  7118. return (el, done) => {
  7119. const hook = isAppear ? onAppear : onEnter;
  7120. const resolve$1 = () => finishEnter(el, isAppear, done);
  7121. callHook(hook, [el, resolve$1]);
  7122. nextFrame(() => {
  7123. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  7124. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  7125. if (!hasExplicitCallback(hook)) whenTransitionEnds(el, type, enterDuration, resolve$1);
  7126. });
  7127. };
  7128. };
  7129. return extend(baseProps, {
  7130. onBeforeEnter(el) {
  7131. callHook(onBeforeEnter, [el]);
  7132. addTransitionClass(el, enterFromClass);
  7133. addTransitionClass(el, enterActiveClass);
  7134. },
  7135. onBeforeAppear(el) {
  7136. callHook(onBeforeAppear, [el]);
  7137. addTransitionClass(el, appearFromClass);
  7138. addTransitionClass(el, appearActiveClass);
  7139. },
  7140. onEnter: makeEnterHook(false),
  7141. onAppear: makeEnterHook(true),
  7142. onLeave(el, done) {
  7143. el._isLeaving = true;
  7144. const resolve$1 = () => finishLeave(el, done);
  7145. addTransitionClass(el, leaveFromClass);
  7146. if (!el._enterCancelled) {
  7147. forceReflow(el);
  7148. addTransitionClass(el, leaveActiveClass);
  7149. } else {
  7150. addTransitionClass(el, leaveActiveClass);
  7151. forceReflow(el);
  7152. }
  7153. nextFrame(() => {
  7154. if (!el._isLeaving) return;
  7155. removeTransitionClass(el, leaveFromClass);
  7156. addTransitionClass(el, leaveToClass);
  7157. if (!hasExplicitCallback(onLeave)) whenTransitionEnds(el, type, leaveDuration, resolve$1);
  7158. });
  7159. callHook(onLeave, [el, resolve$1]);
  7160. },
  7161. onEnterCancelled(el) {
  7162. finishEnter(el, false, void 0, true);
  7163. callHook(onEnterCancelled, [el]);
  7164. },
  7165. onAppearCancelled(el) {
  7166. finishEnter(el, true, void 0, true);
  7167. callHook(onAppearCancelled, [el]);
  7168. },
  7169. onLeaveCancelled(el) {
  7170. finishLeave(el);
  7171. callHook(onLeaveCancelled, [el]);
  7172. }
  7173. });
  7174. }
  7175. function normalizeDuration(duration) {
  7176. if (duration == null) return null;
  7177. else if (isObject(duration)) return [NumberOf(duration.enter), NumberOf(duration.leave)];
  7178. else {
  7179. const n = NumberOf(duration);
  7180. return [n, n];
  7181. }
  7182. }
  7183. function NumberOf(val) {
  7184. const res = toNumber(val);
  7185. assertNumber(res, "<transition> explicit duration");
  7186. return res;
  7187. }
  7188. function addTransitionClass(el, cls) {
  7189. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  7190. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  7191. }
  7192. function removeTransitionClass(el, cls) {
  7193. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  7194. const _vtc = el[vtcKey];
  7195. if (_vtc) {
  7196. _vtc.delete(cls);
  7197. if (!_vtc.size) el[vtcKey] = void 0;
  7198. }
  7199. }
  7200. function nextFrame(cb) {
  7201. requestAnimationFrame(() => {
  7202. requestAnimationFrame(cb);
  7203. });
  7204. }
  7205. var endId = 0;
  7206. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve$1) {
  7207. const id = el._endId = ++endId;
  7208. const resolveIfNotStale = () => {
  7209. if (id === el._endId) resolve$1();
  7210. };
  7211. if (explicitTimeout != null) return setTimeout(resolveIfNotStale, explicitTimeout);
  7212. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  7213. if (!type) return resolve$1();
  7214. const endEvent = type + "end";
  7215. let ended = 0;
  7216. const end = () => {
  7217. el.removeEventListener(endEvent, onEnd);
  7218. resolveIfNotStale();
  7219. };
  7220. const onEnd = (e) => {
  7221. if (e.target === el && ++ended >= propCount) end();
  7222. };
  7223. setTimeout(() => {
  7224. if (ended < propCount) end();
  7225. }, timeout + 1);
  7226. el.addEventListener(endEvent, onEnd);
  7227. }
  7228. function getTransitionInfo(el, expectedType) {
  7229. const styles = window.getComputedStyle(el);
  7230. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  7231. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  7232. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  7233. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  7234. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  7235. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  7236. const animationTimeout = getTimeout(animationDelays, animationDurations);
  7237. let type = null;
  7238. let timeout = 0;
  7239. let propCount = 0;
  7240. if (expectedType === TRANSITION) {
  7241. if (transitionTimeout > 0) {
  7242. type = TRANSITION;
  7243. timeout = transitionTimeout;
  7244. propCount = transitionDurations.length;
  7245. }
  7246. } else if (expectedType === ANIMATION) {
  7247. if (animationTimeout > 0) {
  7248. type = ANIMATION;
  7249. timeout = animationTimeout;
  7250. propCount = animationDurations.length;
  7251. }
  7252. } else {
  7253. timeout = Math.max(transitionTimeout, animationTimeout);
  7254. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  7255. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  7256. }
  7257. const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
  7258. return {
  7259. type,
  7260. timeout,
  7261. propCount,
  7262. hasTransform
  7263. };
  7264. }
  7265. function getTimeout(delays, durations) {
  7266. while (delays.length < durations.length) delays = delays.concat(delays);
  7267. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  7268. }
  7269. function toMs(s) {
  7270. if (s === "auto") return 0;
  7271. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  7272. }
  7273. function forceReflow(el) {
  7274. return (el ? el.ownerDocument : document).body.offsetHeight;
  7275. }
  7276. function patchClass(el, value, isSVG) {
  7277. const transitionClasses = el[vtcKey];
  7278. if (transitionClasses) value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  7279. if (value == null) el.removeAttribute("class");
  7280. else if (isSVG) el.setAttribute("class", value);
  7281. else el.className = value;
  7282. }
  7283. var vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
  7284. var vShowHidden = /* @__PURE__ */ Symbol("_vsh");
  7285. var vShow = {
  7286. name: "show",
  7287. beforeMount(el, { value }, { transition }) {
  7288. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  7289. if (transition && value) transition.beforeEnter(el);
  7290. else setDisplay(el, value);
  7291. },
  7292. mounted(el, { value }, { transition }) {
  7293. if (transition && value) transition.enter(el);
  7294. },
  7295. updated(el, { value, oldValue }, { transition }) {
  7296. if (!value === !oldValue) return;
  7297. if (transition) if (value) {
  7298. transition.beforeEnter(el);
  7299. setDisplay(el, true);
  7300. transition.enter(el);
  7301. } else transition.leave(el, () => {
  7302. setDisplay(el, false);
  7303. });
  7304. else setDisplay(el, value);
  7305. },
  7306. beforeUnmount(el, { value }) {
  7307. setDisplay(el, value);
  7308. }
  7309. };
  7310. function setDisplay(el, value) {
  7311. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  7312. el[vShowHidden] = !value;
  7313. }
  7314. function initVShowForSSR() {
  7315. vShow.getSSRProps = ({ value }) => {
  7316. if (!value) return { style: { display: "none" } };
  7317. };
  7318. }
  7319. var CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT");
  7320. function useCssVars(getter) {
  7321. const instance = getCurrentInstance();
  7322. if (!instance) {
  7323. warn(`useCssVars is called without current active component instance.`);
  7324. return;
  7325. }
  7326. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  7327. Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
  7328. };
  7329. instance.getCssVars = () => getter(instance.proxy);
  7330. const setVars = () => {
  7331. const vars = getter(instance.proxy);
  7332. if (instance.ce) setVarsOnNode(instance.ce, vars);
  7333. else setVarsOnVNode(instance.subTree, vars);
  7334. updateTeleports(vars);
  7335. };
  7336. onBeforeUpdate(() => {
  7337. queuePostFlushCb(setVars);
  7338. });
  7339. onMounted(() => {
  7340. watch(setVars, NOOP, { flush: "post" });
  7341. const ob = new MutationObserver(setVars);
  7342. ob.observe(instance.subTree.el.parentNode, { childList: true });
  7343. onUnmounted(() => ob.disconnect());
  7344. });
  7345. }
  7346. function setVarsOnVNode(vnode, vars) {
  7347. if (vnode.shapeFlag & 128) {
  7348. const suspense = vnode.suspense;
  7349. vnode = suspense.activeBranch;
  7350. if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
  7351. setVarsOnVNode(suspense.activeBranch, vars);
  7352. });
  7353. }
  7354. while (vnode.component) vnode = vnode.component.subTree;
  7355. if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
  7356. else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  7357. else if (vnode.type === Static) {
  7358. let { el, anchor } = vnode;
  7359. while (el) {
  7360. setVarsOnNode(el, vars);
  7361. if (el === anchor) break;
  7362. el = el.nextSibling;
  7363. }
  7364. }
  7365. }
  7366. function setVarsOnNode(el, vars) {
  7367. if (el.nodeType === 1) {
  7368. const style = el.style;
  7369. let cssText = "";
  7370. for (const key in vars) {
  7371. const value = normalizeCssVarValue(vars[key]);
  7372. style.setProperty(`--${key}`, value);
  7373. cssText += `--${key}: ${value};`;
  7374. }
  7375. style[CSS_VAR_TEXT] = cssText;
  7376. }
  7377. }
  7378. var displayRE = /(?:^|;)\s*display\s*:/;
  7379. function patchStyle(el, prev, next) {
  7380. const style = el.style;
  7381. const isCssString = isString(next);
  7382. let hasControlledDisplay = false;
  7383. if (next && !isCssString) {
  7384. if (prev) if (!isString(prev)) {
  7385. for (const key in prev) if (next[key] == null) setStyle(style, key, "");
  7386. } else for (const prevStyle of prev.split(";")) {
  7387. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  7388. if (next[key] == null) setStyle(style, key, "");
  7389. }
  7390. for (const key in next) {
  7391. if (key === "display") hasControlledDisplay = true;
  7392. setStyle(style, key, next[key]);
  7393. }
  7394. } else if (isCssString) {
  7395. if (prev !== next) {
  7396. const cssVarText = style[CSS_VAR_TEXT];
  7397. if (cssVarText) next += ";" + cssVarText;
  7398. style.cssText = next;
  7399. hasControlledDisplay = displayRE.test(next);
  7400. }
  7401. } else if (prev) el.removeAttribute("style");
  7402. if (vShowOriginalDisplay in el) {
  7403. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  7404. if (el[vShowHidden]) style.display = "none";
  7405. }
  7406. }
  7407. var semicolonRE = /[^\\];\s*$/;
  7408. var importantRE = /\s*!important$/;
  7409. function setStyle(style, name, val) {
  7410. if (isArray(val)) val.forEach((v) => setStyle(style, name, v));
  7411. else {
  7412. if (val == null) val = "";
  7413. if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
  7414. if (name.startsWith("--")) style.setProperty(name, val);
  7415. else {
  7416. const prefixed = autoPrefix(style, name);
  7417. if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
  7418. else style[prefixed] = val;
  7419. }
  7420. }
  7421. }
  7422. var prefixes = [
  7423. "Webkit",
  7424. "Moz",
  7425. "ms"
  7426. ];
  7427. var prefixCache = {};
  7428. function autoPrefix(style, rawName) {
  7429. const cached = prefixCache[rawName];
  7430. if (cached) return cached;
  7431. let name = camelize(rawName);
  7432. if (name !== "filter" && name in style) return prefixCache[rawName] = name;
  7433. name = capitalize(name);
  7434. for (let i = 0; i < prefixes.length; i++) {
  7435. const prefixed = prefixes[i] + name;
  7436. if (prefixed in style) return prefixCache[rawName] = prefixed;
  7437. }
  7438. return rawName;
  7439. }
  7440. var xlinkNS = "http://www.w3.org/1999/xlink";
  7441. function patchAttr(el, key, value, isSVG, instance, isBoolean$1 = isSpecialBooleanAttr(key)) {
  7442. if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  7443. else el.setAttributeNS(xlinkNS, key, value);
  7444. else if (value == null || isBoolean$1 && !includeBooleanAttr(value)) el.removeAttribute(key);
  7445. else el.setAttribute(key, isBoolean$1 ? "" : isSymbol(value) ? String(value) : value);
  7446. }
  7447. function patchDOMProp(el, key, value, parentComponent, attrName) {
  7448. if (key === "innerHTML" || key === "textContent") {
  7449. if (value != null) el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  7450. return;
  7451. }
  7452. const tag = el.tagName;
  7453. if (key === "value" && tag !== "PROGRESS" && !tag.includes("-")) {
  7454. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  7455. const newValue = value == null ? el.type === "checkbox" ? "on" : "" : String(value);
  7456. if (oldValue !== newValue || !("_value" in el)) el.value = newValue;
  7457. if (value == null) el.removeAttribute(key);
  7458. el._value = value;
  7459. return;
  7460. }
  7461. let needRemove = false;
  7462. if (value === "" || value == null) {
  7463. const type = typeof el[key];
  7464. if (type === "boolean") value = includeBooleanAttr(value);
  7465. else if (value == null && type === "string") {
  7466. value = "";
  7467. needRemove = true;
  7468. } else if (type === "number") {
  7469. value = 0;
  7470. needRemove = true;
  7471. }
  7472. }
  7473. try {
  7474. el[key] = value;
  7475. } catch (e) {
  7476. if (!needRemove) warn(`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, e);
  7477. }
  7478. needRemove && el.removeAttribute(attrName || key);
  7479. }
  7480. function addEventListener(el, event, handler, options) {
  7481. el.addEventListener(event, handler, options);
  7482. }
  7483. function removeEventListener(el, event, handler, options) {
  7484. el.removeEventListener(event, handler, options);
  7485. }
  7486. var veiKey = /* @__PURE__ */ Symbol("_vei");
  7487. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  7488. const invokers = el[veiKey] || (el[veiKey] = {});
  7489. const existingInvoker = invokers[rawName];
  7490. if (nextValue && existingInvoker) existingInvoker.value = sanitizeEventValue(nextValue, rawName);
  7491. else {
  7492. const [name, options] = parseName(rawName);
  7493. if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(sanitizeEventValue(nextValue, rawName), instance), options);
  7494. else if (existingInvoker) {
  7495. removeEventListener(el, name, existingInvoker, options);
  7496. invokers[rawName] = void 0;
  7497. }
  7498. }
  7499. }
  7500. var optionsModifierRE = /(?:Once|Passive|Capture)$/;
  7501. function parseName(name) {
  7502. let options;
  7503. if (optionsModifierRE.test(name)) {
  7504. options = {};
  7505. let m;
  7506. while (m = name.match(optionsModifierRE)) {
  7507. name = name.slice(0, name.length - m[0].length);
  7508. options[m[0].toLowerCase()] = true;
  7509. }
  7510. }
  7511. return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
  7512. }
  7513. var cachedNow = 0;
  7514. var p = /* @__PURE__ */ Promise.resolve();
  7515. var getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  7516. function createInvoker(initialValue, instance) {
  7517. const invoker = (e) => {
  7518. if (!e._vts) e._vts = Date.now();
  7519. else if (e._vts <= invoker.attached) return;
  7520. callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
  7521. };
  7522. invoker.value = initialValue;
  7523. invoker.attached = getNow();
  7524. return invoker;
  7525. }
  7526. function sanitizeEventValue(value, propName) {
  7527. if (isFunction(value) || isArray(value)) return value;
  7528. warn(`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
  7529. Expected function or array of functions, received type ${typeof value}.`);
  7530. return NOOP;
  7531. }
  7532. function patchStopImmediatePropagation(e, value) {
  7533. if (isArray(value)) {
  7534. const originalStop = e.stopImmediatePropagation;
  7535. e.stopImmediatePropagation = () => {
  7536. originalStop.call(e);
  7537. e._stopped = true;
  7538. };
  7539. return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
  7540. } else return value;
  7541. }
  7542. var isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  7543. var patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  7544. const isSVG = namespace === "svg";
  7545. if (key === "class") patchClass(el, nextValue, isSVG);
  7546. else if (key === "style") patchStyle(el, prevValue, nextValue);
  7547. else if (isOn(key)) {
  7548. if (!isModelListener(key)) patchEvent(el, key, prevValue, nextValue, parentComponent);
  7549. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  7550. patchDOMProp(el, key, nextValue);
  7551. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  7552. } else if (el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
  7553. else {
  7554. if (key === "true-value") el._trueValue = nextValue;
  7555. else if (key === "false-value") el._falseValue = nextValue;
  7556. patchAttr(el, key, nextValue, isSVG);
  7557. }
  7558. };
  7559. function shouldSetAsProp(el, key, value, isSVG) {
  7560. if (isSVG) {
  7561. if (key === "innerHTML" || key === "textContent") return true;
  7562. if (key in el && isNativeOn(key) && isFunction(value)) return true;
  7563. return false;
  7564. }
  7565. if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") return false;
  7566. if (key === "sandbox" && el.tagName === "IFRAME") return false;
  7567. if (key === "form") return false;
  7568. if (key === "list" && el.tagName === "INPUT") return false;
  7569. if (key === "type" && el.tagName === "TEXTAREA") return false;
  7570. if (key === "width" || key === "height") {
  7571. const tag = el.tagName;
  7572. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") return false;
  7573. }
  7574. if (isNativeOn(key) && isString(value)) return false;
  7575. return key in el;
  7576. }
  7577. var REMOVAL = {};
  7578. /* @__NO_SIDE_EFFECTS__ */
  7579. function defineCustomElement(options, extraOptions, _createApp) {
  7580. let Comp = defineComponent(options, extraOptions);
  7581. if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
  7582. class VueCustomElement extends VueElement {
  7583. constructor(initialProps) {
  7584. super(Comp, initialProps, _createApp);
  7585. }
  7586. }
  7587. VueCustomElement.def = Comp;
  7588. return VueCustomElement;
  7589. }
  7590. var defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ ((options, extraOptions) => {
  7591. return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
  7592. });
  7593. var BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {};
  7594. var VueElement = class VueElement extends BaseClass {
  7595. constructor(_def, _props = {}, _createApp = createApp) {
  7596. super();
  7597. this._def = _def;
  7598. this._props = _props;
  7599. this._createApp = _createApp;
  7600. this._isVueCE = true;
  7601. /**
  7602. * @internal
  7603. */
  7604. this._instance = null;
  7605. /**
  7606. * @internal
  7607. */
  7608. this._app = null;
  7609. /**
  7610. * @internal
  7611. */
  7612. this._nonce = this._def.nonce;
  7613. this._connected = false;
  7614. this._resolved = false;
  7615. this._patching = false;
  7616. this._dirty = false;
  7617. this._numberProps = null;
  7618. this._styleChildren = /* @__PURE__ */ new WeakSet();
  7619. this._ob = null;
  7620. if (this.shadowRoot && _createApp !== createApp) this._root = this.shadowRoot;
  7621. else {
  7622. if (this.shadowRoot) warn(`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`);
  7623. if (_def.shadowRoot !== false) {
  7624. this.attachShadow(extend({}, _def.shadowRootOptions, { mode: "open" }));
  7625. this._root = this.shadowRoot;
  7626. } else this._root = this;
  7627. }
  7628. }
  7629. connectedCallback() {
  7630. if (!this.isConnected) return;
  7631. if (!this.shadowRoot && !this._resolved) this._parseSlots();
  7632. this._connected = true;
  7633. let parent = this;
  7634. while (parent = parent && (parent.parentNode || parent.host)) if (parent instanceof VueElement) {
  7635. this._parent = parent;
  7636. break;
  7637. }
  7638. if (!this._instance) if (this._resolved) this._mount(this._def);
  7639. else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
  7640. this._pendingResolve = void 0;
  7641. this._resolveDef();
  7642. });
  7643. else this._resolveDef();
  7644. }
  7645. _setParent(parent = this._parent) {
  7646. if (parent) {
  7647. this._instance.parent = parent._instance;
  7648. this._inheritParentContext(parent);
  7649. }
  7650. }
  7651. _inheritParentContext(parent = this._parent) {
  7652. if (parent && this._app) Object.setPrototypeOf(this._app._context.provides, parent._instance.provides);
  7653. }
  7654. disconnectedCallback() {
  7655. this._connected = false;
  7656. nextTick(() => {
  7657. if (!this._connected) {
  7658. if (this._ob) {
  7659. this._ob.disconnect();
  7660. this._ob = null;
  7661. }
  7662. this._app && this._app.unmount();
  7663. if (this._instance) this._instance.ce = void 0;
  7664. this._app = this._instance = null;
  7665. if (this._teleportTargets) {
  7666. this._teleportTargets.clear();
  7667. this._teleportTargets = void 0;
  7668. }
  7669. }
  7670. });
  7671. }
  7672. _processMutations(mutations) {
  7673. for (const m of mutations) this._setAttr(m.attributeName);
  7674. }
  7675. /**
  7676. * resolve inner component definition (handle possible async component)
  7677. */
  7678. _resolveDef() {
  7679. if (this._pendingResolve) return;
  7680. for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
  7681. this._ob = new MutationObserver(this._processMutations.bind(this));
  7682. this._ob.observe(this, { attributes: true });
  7683. const resolve$1 = (def$1, isAsync = false) => {
  7684. this._resolved = true;
  7685. this._pendingResolve = void 0;
  7686. const { props, styles } = def$1;
  7687. let numberProps;
  7688. if (props && !isArray(props)) for (const key in props) {
  7689. const opt = props[key];
  7690. if (opt === Number || opt && opt.type === Number) {
  7691. if (key in this._props) this._props[key] = toNumber(this._props[key]);
  7692. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
  7693. }
  7694. }
  7695. this._numberProps = numberProps;
  7696. this._resolveProps(def$1);
  7697. if (this.shadowRoot) this._applyStyles(styles);
  7698. else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
  7699. this._mount(def$1);
  7700. };
  7701. const asyncDef = this._def.__asyncLoader;
  7702. if (asyncDef) this._pendingResolve = asyncDef().then((def$1) => {
  7703. def$1.configureApp = this._def.configureApp;
  7704. resolve$1(this._def = def$1, true);
  7705. });
  7706. else resolve$1(this._def);
  7707. }
  7708. _mount(def$1) {
  7709. if (!def$1.name) def$1.name = "VueElement";
  7710. this._app = this._createApp(def$1);
  7711. this._inheritParentContext();
  7712. if (def$1.configureApp) def$1.configureApp(this._app);
  7713. this._app._ceVNode = this._createVNode();
  7714. this._app.mount(this._root);
  7715. const exposed = this._instance && this._instance.exposed;
  7716. if (!exposed) return;
  7717. for (const key in exposed) if (!hasOwn(this, key)) Object.defineProperty(this, key, { get: () => unref(exposed[key]) });
  7718. else warn(`Exposed property "${key}" already exists on custom element.`);
  7719. }
  7720. _resolveProps(def$1) {
  7721. const { props } = def$1;
  7722. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  7723. for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
  7724. for (const key of declaredPropKeys.map(camelize)) Object.defineProperty(this, key, {
  7725. get() {
  7726. return this._getProp(key);
  7727. },
  7728. set(val) {
  7729. this._setProp(key, val, true, !this._patching);
  7730. }
  7731. });
  7732. }
  7733. _setAttr(key) {
  7734. if (key.startsWith("data-v-")) return;
  7735. const has = this.hasAttribute(key);
  7736. let value = has ? this.getAttribute(key) : REMOVAL;
  7737. const camelKey = camelize(key);
  7738. if (has && this._numberProps && this._numberProps[camelKey]) value = toNumber(value);
  7739. this._setProp(camelKey, value, false, true);
  7740. }
  7741. /**
  7742. * @internal
  7743. */
  7744. _getProp(key) {
  7745. return this._props[key];
  7746. }
  7747. /**
  7748. * @internal
  7749. */
  7750. _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
  7751. if (val !== this._props[key]) {
  7752. this._dirty = true;
  7753. if (val === REMOVAL) delete this._props[key];
  7754. else {
  7755. this._props[key] = val;
  7756. if (key === "key" && this._app) this._app._ceVNode.key = val;
  7757. }
  7758. if (shouldUpdate && this._instance) this._update();
  7759. if (shouldReflect) {
  7760. const ob = this._ob;
  7761. if (ob) {
  7762. this._processMutations(ob.takeRecords());
  7763. ob.disconnect();
  7764. }
  7765. if (val === true) this.setAttribute(hyphenate(key), "");
  7766. else if (typeof val === "string" || typeof val === "number") this.setAttribute(hyphenate(key), val + "");
  7767. else if (!val) this.removeAttribute(hyphenate(key));
  7768. ob && ob.observe(this, { attributes: true });
  7769. }
  7770. }
  7771. }
  7772. _update() {
  7773. const vnode = this._createVNode();
  7774. if (this._app) vnode.appContext = this._app._context;
  7775. render(vnode, this._root);
  7776. }
  7777. _createVNode() {
  7778. const baseProps = {};
  7779. if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
  7780. const vnode = createVNode(this._def, extend(baseProps, this._props));
  7781. if (!this._instance) vnode.ce = (instance) => {
  7782. this._instance = instance;
  7783. instance.ce = this;
  7784. instance.isCE = true;
  7785. instance.ceReload = (newStyles) => {
  7786. if (this._styles) {
  7787. this._styles.forEach((s) => this._root.removeChild(s));
  7788. this._styles.length = 0;
  7789. }
  7790. this._applyStyles(newStyles);
  7791. this._instance = null;
  7792. this._update();
  7793. };
  7794. const dispatch = (event, args) => {
  7795. this.dispatchEvent(new CustomEvent(event, isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }));
  7796. };
  7797. instance.emit = (event, ...args) => {
  7798. dispatch(event, args);
  7799. if (hyphenate(event) !== event) dispatch(hyphenate(event), args);
  7800. };
  7801. this._setParent();
  7802. };
  7803. return vnode;
  7804. }
  7805. _applyStyles(styles, owner) {
  7806. if (!styles) return;
  7807. if (owner) {
  7808. if (owner === this._def || this._styleChildren.has(owner)) return;
  7809. this._styleChildren.add(owner);
  7810. }
  7811. const nonce = this._nonce;
  7812. for (let i = styles.length - 1; i >= 0; i--) {
  7813. const s = document.createElement("style");
  7814. if (nonce) s.setAttribute("nonce", nonce);
  7815. s.textContent = styles[i];
  7816. this.shadowRoot.prepend(s);
  7817. if (owner) {
  7818. if (owner.__hmrId) {
  7819. if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
  7820. let entry = this._childStyles.get(owner.__hmrId);
  7821. if (!entry) this._childStyles.set(owner.__hmrId, entry = []);
  7822. entry.push(s);
  7823. }
  7824. } else (this._styles || (this._styles = [])).push(s);
  7825. }
  7826. }
  7827. /**
  7828. * Only called when shadowRoot is false
  7829. */
  7830. _parseSlots() {
  7831. const slots = this._slots = {};
  7832. let n;
  7833. while (n = this.firstChild) {
  7834. const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
  7835. (slots[slotName] || (slots[slotName] = [])).push(n);
  7836. this.removeChild(n);
  7837. }
  7838. }
  7839. /**
  7840. * Only called when shadowRoot is false
  7841. */
  7842. _renderSlots() {
  7843. const outlets = this._getSlots();
  7844. const scopeId = this._instance.type.__scopeId;
  7845. for (let i = 0; i < outlets.length; i++) {
  7846. const o = outlets[i];
  7847. const slotName = o.getAttribute("name") || "default";
  7848. const content = this._slots[slotName];
  7849. const parent = o.parentNode;
  7850. if (content) for (const n of content) {
  7851. if (scopeId && n.nodeType === 1) {
  7852. const id = scopeId + "-s";
  7853. const walker = document.createTreeWalker(n, 1);
  7854. n.setAttribute(id, "");
  7855. let child;
  7856. while (child = walker.nextNode()) child.setAttribute(id, "");
  7857. }
  7858. parent.insertBefore(n, o);
  7859. }
  7860. else while (o.firstChild) parent.insertBefore(o.firstChild, o);
  7861. parent.removeChild(o);
  7862. }
  7863. }
  7864. /**
  7865. * @internal
  7866. */
  7867. _getSlots() {
  7868. const roots = [this];
  7869. if (this._teleportTargets) roots.push(...this._teleportTargets);
  7870. const slots = /* @__PURE__ */ new Set();
  7871. for (const root of roots) {
  7872. const found = root.querySelectorAll("slot");
  7873. for (let i = 0; i < found.length; i++) slots.add(found[i]);
  7874. }
  7875. return Array.from(slots);
  7876. }
  7877. /**
  7878. * @internal
  7879. */
  7880. _injectChildStyle(comp) {
  7881. this._applyStyles(comp.styles, comp);
  7882. }
  7883. /**
  7884. * @internal
  7885. */
  7886. _beginPatch() {
  7887. this._patching = true;
  7888. this._dirty = false;
  7889. }
  7890. /**
  7891. * @internal
  7892. */
  7893. _endPatch() {
  7894. this._patching = false;
  7895. if (this._dirty && this._instance) this._update();
  7896. }
  7897. /**
  7898. * @internal
  7899. */
  7900. _removeChildStyle(comp) {
  7901. this._styleChildren.delete(comp);
  7902. if (this._childStyles && comp.__hmrId) {
  7903. const oldStyles = this._childStyles.get(comp.__hmrId);
  7904. if (oldStyles) {
  7905. oldStyles.forEach((s) => this._root.removeChild(s));
  7906. oldStyles.length = 0;
  7907. }
  7908. }
  7909. }
  7910. };
  7911. function useHost(caller) {
  7912. const instance = getCurrentInstance();
  7913. const el = instance && instance.ce;
  7914. if (el) return el;
  7915. else if (!instance) warn(`${caller || "useHost"} called without an active component instance.`);
  7916. else warn(`${caller || "useHost"} can only be used in components defined via defineCustomElement.`);
  7917. return null;
  7918. }
  7919. function useShadowRoot() {
  7920. const el = useHost("useShadowRoot");
  7921. return el && el.shadowRoot;
  7922. }
  7923. function useCssModule(name = "$style") {
  7924. {
  7925. const instance = getCurrentInstance();
  7926. if (!instance) {
  7927. warn(`useCssModule must be called inside setup()`);
  7928. return EMPTY_OBJ;
  7929. }
  7930. const modules = instance.type.__cssModules;
  7931. if (!modules) {
  7932. warn(`Current instance does not have CSS modules injected.`);
  7933. return EMPTY_OBJ;
  7934. }
  7935. const mod = modules[name];
  7936. if (!mod) {
  7937. warn(`Current instance does not have CSS module named "${name}".`);
  7938. return EMPTY_OBJ;
  7939. }
  7940. return mod;
  7941. }
  7942. }
  7943. var positionMap = /* @__PURE__ */ new WeakMap();
  7944. var newPositionMap = /* @__PURE__ */ new WeakMap();
  7945. var moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
  7946. var enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
  7947. var decorate = (t) => {
  7948. delete t.props.mode;
  7949. return t;
  7950. };
  7951. var TransitionGroup = /* @__PURE__ */ decorate({
  7952. name: "TransitionGroup",
  7953. props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
  7954. tag: String,
  7955. moveClass: String
  7956. }),
  7957. setup(props, { slots }) {
  7958. const instance = getCurrentInstance();
  7959. const state = useTransitionState();
  7960. let prevChildren;
  7961. let children;
  7962. onUpdated(() => {
  7963. if (!prevChildren.length) return;
  7964. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  7965. if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
  7966. prevChildren = [];
  7967. return;
  7968. }
  7969. prevChildren.forEach(callPendingCbs);
  7970. prevChildren.forEach(recordPosition);
  7971. const movedChildren = prevChildren.filter(applyTranslation);
  7972. forceReflow(instance.vnode.el);
  7973. movedChildren.forEach((c) => {
  7974. const el = c.el;
  7975. const style = el.style;
  7976. addTransitionClass(el, moveClass);
  7977. style.transform = style.webkitTransform = style.transitionDuration = "";
  7978. const cb = el[moveCbKey] = (e) => {
  7979. if (e && e.target !== el) return;
  7980. if (!e || e.propertyName.endsWith("transform")) {
  7981. el.removeEventListener("transitionend", cb);
  7982. el[moveCbKey] = null;
  7983. removeTransitionClass(el, moveClass);
  7984. }
  7985. };
  7986. el.addEventListener("transitionend", cb);
  7987. });
  7988. prevChildren = [];
  7989. });
  7990. return () => {
  7991. const rawProps = toRaw(props);
  7992. const cssTransitionProps = resolveTransitionProps(rawProps);
  7993. let tag = rawProps.tag || Fragment;
  7994. prevChildren = [];
  7995. if (children) for (let i = 0; i < children.length; i++) {
  7996. const child = children[i];
  7997. if (child.el && child.el instanceof Element) {
  7998. prevChildren.push(child);
  7999. setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
  8000. positionMap.set(child, {
  8001. left: child.el.offsetLeft,
  8002. top: child.el.offsetTop
  8003. });
  8004. }
  8005. }
  8006. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  8007. for (let i = 0; i < children.length; i++) {
  8008. const child = children[i];
  8009. if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
  8010. else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
  8011. }
  8012. return createVNode(tag, null, children);
  8013. };
  8014. }
  8015. });
  8016. function callPendingCbs(c) {
  8017. const el = c.el;
  8018. if (el[moveCbKey]) el[moveCbKey]();
  8019. if (el[enterCbKey]) el[enterCbKey]();
  8020. }
  8021. function recordPosition(c) {
  8022. newPositionMap.set(c, {
  8023. left: c.el.offsetLeft,
  8024. top: c.el.offsetTop
  8025. });
  8026. }
  8027. function applyTranslation(c) {
  8028. const oldPos = positionMap.get(c);
  8029. const newPos = newPositionMap.get(c);
  8030. const dx = oldPos.left - newPos.left;
  8031. const dy = oldPos.top - newPos.top;
  8032. if (dx || dy) {
  8033. const s = c.el.style;
  8034. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  8035. s.transitionDuration = "0s";
  8036. return c;
  8037. }
  8038. }
  8039. function hasCSSTransform(el, root, moveClass) {
  8040. const clone = el.cloneNode();
  8041. const _vtc = el[vtcKey];
  8042. if (_vtc) _vtc.forEach((cls) => {
  8043. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  8044. });
  8045. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  8046. clone.style.display = "none";
  8047. const container = root.nodeType === 1 ? root : root.parentNode;
  8048. container.appendChild(clone);
  8049. const { hasTransform } = getTransitionInfo(clone);
  8050. container.removeChild(clone);
  8051. return hasTransform;
  8052. }
  8053. var getModelAssigner = (vnode) => {
  8054. const fn = vnode.props["onUpdate:modelValue"] || false;
  8055. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  8056. };
  8057. function onCompositionStart(e) {
  8058. e.target.composing = true;
  8059. }
  8060. function onCompositionEnd(e) {
  8061. const target = e.target;
  8062. if (target.composing) {
  8063. target.composing = false;
  8064. target.dispatchEvent(new Event("input"));
  8065. }
  8066. }
  8067. var assignKey = /* @__PURE__ */ Symbol("_assign");
  8068. function castValue(value, trim, number) {
  8069. if (trim) value = value.trim();
  8070. if (number) value = looseToNumber(value);
  8071. return value;
  8072. }
  8073. var vModelText = {
  8074. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  8075. el[assignKey] = getModelAssigner(vnode);
  8076. const castToNumber = number || vnode.props && vnode.props.type === "number";
  8077. addEventListener(el, lazy ? "change" : "input", (e) => {
  8078. if (e.target.composing) return;
  8079. el[assignKey](castValue(el.value, trim, castToNumber));
  8080. });
  8081. if (trim || castToNumber) addEventListener(el, "change", () => {
  8082. el.value = castValue(el.value, trim, castToNumber);
  8083. });
  8084. if (!lazy) {
  8085. addEventListener(el, "compositionstart", onCompositionStart);
  8086. addEventListener(el, "compositionend", onCompositionEnd);
  8087. addEventListener(el, "change", onCompositionEnd);
  8088. }
  8089. },
  8090. mounted(el, { value }) {
  8091. el.value = value == null ? "" : value;
  8092. },
  8093. beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
  8094. el[assignKey] = getModelAssigner(vnode);
  8095. if (el.composing) return;
  8096. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
  8097. const newValue = value == null ? "" : value;
  8098. if (elValue === newValue) return;
  8099. if (document.activeElement === el && el.type !== "range") {
  8100. if (lazy && value === oldValue) return;
  8101. if (trim && el.value.trim() === newValue) return;
  8102. }
  8103. el.value = newValue;
  8104. }
  8105. };
  8106. var vModelCheckbox = {
  8107. deep: true,
  8108. created(el, _, vnode) {
  8109. el[assignKey] = getModelAssigner(vnode);
  8110. addEventListener(el, "change", () => {
  8111. const modelValue = el._modelValue;
  8112. const elementValue = getValue(el);
  8113. const checked = el.checked;
  8114. const assign = el[assignKey];
  8115. if (isArray(modelValue)) {
  8116. const index = looseIndexOf(modelValue, elementValue);
  8117. const found = index !== -1;
  8118. if (checked && !found) assign(modelValue.concat(elementValue));
  8119. else if (!checked && found) {
  8120. const filtered = [...modelValue];
  8121. filtered.splice(index, 1);
  8122. assign(filtered);
  8123. }
  8124. } else if (isSet(modelValue)) {
  8125. const cloned = new Set(modelValue);
  8126. if (checked) cloned.add(elementValue);
  8127. else cloned.delete(elementValue);
  8128. assign(cloned);
  8129. } else assign(getCheckboxValue(el, checked));
  8130. });
  8131. },
  8132. mounted: setChecked,
  8133. beforeUpdate(el, binding, vnode) {
  8134. el[assignKey] = getModelAssigner(vnode);
  8135. setChecked(el, binding, vnode);
  8136. }
  8137. };
  8138. function setChecked(el, { value, oldValue }, vnode) {
  8139. el._modelValue = value;
  8140. let checked;
  8141. if (isArray(value)) checked = looseIndexOf(value, vnode.props.value) > -1;
  8142. else if (isSet(value)) checked = value.has(vnode.props.value);
  8143. else {
  8144. if (value === oldValue) return;
  8145. checked = looseEqual(value, getCheckboxValue(el, true));
  8146. }
  8147. if (el.checked !== checked) el.checked = checked;
  8148. }
  8149. var vModelRadio = {
  8150. created(el, { value }, vnode) {
  8151. el.checked = looseEqual(value, vnode.props.value);
  8152. el[assignKey] = getModelAssigner(vnode);
  8153. addEventListener(el, "change", () => {
  8154. el[assignKey](getValue(el));
  8155. });
  8156. },
  8157. beforeUpdate(el, { value, oldValue }, vnode) {
  8158. el[assignKey] = getModelAssigner(vnode);
  8159. if (value !== oldValue) el.checked = looseEqual(value, vnode.props.value);
  8160. }
  8161. };
  8162. var vModelSelect = {
  8163. deep: true,
  8164. created(el, { value, modifiers: { number } }, vnode) {
  8165. const isSetModel = isSet(value);
  8166. addEventListener(el, "change", () => {
  8167. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
  8168. el[assignKey](el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]);
  8169. el._assigning = true;
  8170. nextTick(() => {
  8171. el._assigning = false;
  8172. });
  8173. });
  8174. el[assignKey] = getModelAssigner(vnode);
  8175. },
  8176. mounted(el, { value }) {
  8177. setSelected(el, value);
  8178. },
  8179. beforeUpdate(el, _binding, vnode) {
  8180. el[assignKey] = getModelAssigner(vnode);
  8181. },
  8182. updated(el, { value }) {
  8183. if (!el._assigning) setSelected(el, value);
  8184. }
  8185. };
  8186. function setSelected(el, value) {
  8187. const isMultiple = el.multiple;
  8188. const isArrayValue = isArray(value);
  8189. if (isMultiple && !isArrayValue && !isSet(value)) {
  8190. warn(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
  8191. return;
  8192. }
  8193. for (let i = 0, l = el.options.length; i < l; i++) {
  8194. const option = el.options[i];
  8195. const optionValue = getValue(option);
  8196. if (isMultiple) if (isArrayValue) {
  8197. const optionType = typeof optionValue;
  8198. if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
  8199. else option.selected = looseIndexOf(value, optionValue) > -1;
  8200. } else option.selected = value.has(optionValue);
  8201. else if (looseEqual(getValue(option), value)) {
  8202. if (el.selectedIndex !== i) el.selectedIndex = i;
  8203. return;
  8204. }
  8205. }
  8206. if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
  8207. }
  8208. function getValue(el) {
  8209. return "_value" in el ? el._value : el.value;
  8210. }
  8211. function getCheckboxValue(el, checked) {
  8212. const key = checked ? "_trueValue" : "_falseValue";
  8213. return key in el ? el[key] : checked;
  8214. }
  8215. var vModelDynamic = {
  8216. created(el, binding, vnode) {
  8217. callModelHook(el, binding, vnode, null, "created");
  8218. },
  8219. mounted(el, binding, vnode) {
  8220. callModelHook(el, binding, vnode, null, "mounted");
  8221. },
  8222. beforeUpdate(el, binding, vnode, prevVNode) {
  8223. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  8224. },
  8225. updated(el, binding, vnode, prevVNode) {
  8226. callModelHook(el, binding, vnode, prevVNode, "updated");
  8227. }
  8228. };
  8229. function resolveDynamicModel(tagName, type) {
  8230. switch (tagName) {
  8231. case "SELECT": return vModelSelect;
  8232. case "TEXTAREA": return vModelText;
  8233. default: switch (type) {
  8234. case "checkbox": return vModelCheckbox;
  8235. case "radio": return vModelRadio;
  8236. default: return vModelText;
  8237. }
  8238. }
  8239. }
  8240. function callModelHook(el, binding, vnode, prevVNode, hook) {
  8241. const fn = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type)[hook];
  8242. fn && fn(el, binding, vnode, prevVNode);
  8243. }
  8244. function initVModelForSSR() {
  8245. vModelText.getSSRProps = ({ value }) => ({ value });
  8246. vModelRadio.getSSRProps = ({ value }, vnode) => {
  8247. if (vnode.props && looseEqual(vnode.props.value, value)) return { checked: true };
  8248. };
  8249. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  8250. if (isArray(value)) {
  8251. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) return { checked: true };
  8252. } else if (isSet(value)) {
  8253. if (vnode.props && value.has(vnode.props.value)) return { checked: true };
  8254. } else if (value) return { checked: true };
  8255. };
  8256. vModelDynamic.getSSRProps = (binding, vnode) => {
  8257. if (typeof vnode.type !== "string") return;
  8258. const modelToUse = resolveDynamicModel(vnode.type.toUpperCase(), vnode.props && vnode.props.type);
  8259. if (modelToUse.getSSRProps) return modelToUse.getSSRProps(binding, vnode);
  8260. };
  8261. }
  8262. var systemModifiers = [
  8263. "ctrl",
  8264. "shift",
  8265. "alt",
  8266. "meta"
  8267. ];
  8268. var modifierGuards = {
  8269. stop: (e) => e.stopPropagation(),
  8270. prevent: (e) => e.preventDefault(),
  8271. self: (e) => e.target !== e.currentTarget,
  8272. ctrl: (e) => !e.ctrlKey,
  8273. shift: (e) => !e.shiftKey,
  8274. alt: (e) => !e.altKey,
  8275. meta: (e) => !e.metaKey,
  8276. left: (e) => "button" in e && e.button !== 0,
  8277. middle: (e) => "button" in e && e.button !== 1,
  8278. right: (e) => "button" in e && e.button !== 2,
  8279. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  8280. };
  8281. var withModifiers = (fn, modifiers) => {
  8282. const cache = fn._withMods || (fn._withMods = {});
  8283. const cacheKey = modifiers.join(".");
  8284. return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
  8285. for (let i = 0; i < modifiers.length; i++) {
  8286. const guard = modifierGuards[modifiers[i]];
  8287. if (guard && guard(event, modifiers)) return;
  8288. }
  8289. return fn(event, ...args);
  8290. }));
  8291. };
  8292. var keyNames = {
  8293. esc: "escape",
  8294. space: " ",
  8295. up: "arrow-up",
  8296. left: "arrow-left",
  8297. right: "arrow-right",
  8298. down: "arrow-down",
  8299. delete: "backspace"
  8300. };
  8301. var withKeys = (fn, modifiers) => {
  8302. const cache = fn._withKeys || (fn._withKeys = {});
  8303. const cacheKey = modifiers.join(".");
  8304. return cache[cacheKey] || (cache[cacheKey] = ((event) => {
  8305. if (!("key" in event)) return;
  8306. const eventKey = hyphenate(event.key);
  8307. if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) return fn(event);
  8308. }));
  8309. };
  8310. var rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
  8311. var renderer;
  8312. var enabledHydration = false;
  8313. function ensureRenderer() {
  8314. return renderer || (renderer = createRenderer(rendererOptions));
  8315. }
  8316. function ensureHydrationRenderer() {
  8317. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  8318. enabledHydration = true;
  8319. return renderer;
  8320. }
  8321. var render = ((...args) => {
  8322. ensureRenderer().render(...args);
  8323. });
  8324. var hydrate = ((...args) => {
  8325. ensureHydrationRenderer().hydrate(...args);
  8326. });
  8327. var createApp = ((...args) => {
  8328. const app = ensureRenderer().createApp(...args);
  8329. injectNativeTagCheck(app);
  8330. injectCompilerOptionsCheck(app);
  8331. const { mount } = app;
  8332. app.mount = (containerOrSelector) => {
  8333. const container = normalizeContainer(containerOrSelector);
  8334. if (!container) return;
  8335. const component = app._component;
  8336. if (!isFunction(component) && !component.render && !component.template) component.template = container.innerHTML;
  8337. if (container.nodeType === 1) container.textContent = "";
  8338. const proxy = mount(container, false, resolveRootNamespace(container));
  8339. if (container instanceof Element) {
  8340. container.removeAttribute("v-cloak");
  8341. container.setAttribute("data-v-app", "");
  8342. }
  8343. return proxy;
  8344. };
  8345. return app;
  8346. });
  8347. var createSSRApp = ((...args) => {
  8348. const app = ensureHydrationRenderer().createApp(...args);
  8349. injectNativeTagCheck(app);
  8350. injectCompilerOptionsCheck(app);
  8351. const { mount } = app;
  8352. app.mount = (containerOrSelector) => {
  8353. const container = normalizeContainer(containerOrSelector);
  8354. if (container) return mount(container, true, resolveRootNamespace(container));
  8355. };
  8356. return app;
  8357. });
  8358. function resolveRootNamespace(container) {
  8359. if (container instanceof SVGElement) return "svg";
  8360. if (typeof MathMLElement === "function" && container instanceof MathMLElement) return "mathml";
  8361. }
  8362. function injectNativeTagCheck(app) {
  8363. Object.defineProperty(app.config, "isNativeTag", {
  8364. value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
  8365. writable: false
  8366. });
  8367. }
  8368. function injectCompilerOptionsCheck(app) {
  8369. if (isRuntimeOnly()) {
  8370. const isCustomElement = app.config.isCustomElement;
  8371. Object.defineProperty(app.config, "isCustomElement", {
  8372. get() {
  8373. return isCustomElement;
  8374. },
  8375. set() {
  8376. warn(`The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`);
  8377. }
  8378. });
  8379. const compilerOptions = app.config.compilerOptions;
  8380. 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.
  8381. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  8382. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  8383. - 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`;
  8384. Object.defineProperty(app.config, "compilerOptions", {
  8385. get() {
  8386. warn(msg);
  8387. return compilerOptions;
  8388. },
  8389. set() {
  8390. warn(msg);
  8391. }
  8392. });
  8393. }
  8394. }
  8395. function normalizeContainer(container) {
  8396. if (isString(container)) {
  8397. const res = document.querySelector(container);
  8398. if (!res) warn(`Failed to mount app: mount target selector "${container}" returned null.`);
  8399. return res;
  8400. }
  8401. if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
  8402. return container;
  8403. }
  8404. var ssrDirectiveInitialized = false;
  8405. var initDirectivesForSSR = () => {
  8406. if (!ssrDirectiveInitialized) {
  8407. ssrDirectiveInitialized = true;
  8408. initVModelForSSR();
  8409. initVShowForSSR();
  8410. }
  8411. };
  8412. //#endregion
  8413. //#region node_modules/vue/dist/vue.runtime.esm-bundler.js
  8414. /**
  8415. * vue v3.5.27
  8416. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  8417. * @license MIT
  8418. **/
  8419. function initDev() {
  8420. initCustomFormatter();
  8421. }
  8422. initDev();
  8423. var compile = () => {
  8424. warn("Runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
  8425. };
  8426. //#endregion
  8427. export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
  8428. //# sourceMappingURL=vue.js.map