element-plus.js 2.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665
  1. import { r as __toESM, t as __commonJSMin } from "./chunk-DEy6nfl2.js";
  2. import { $ as createTextVNode, $n as toRefs, At as onBeforeMount, Bn as markRaw, Bt as onUpdated, C as vShow, Cn as withDirectives, Dt as mergeProps, Ft as onMounted, G as createBlock, Gn as readonly, I as Teleport, Jn as shallowReadonly, Jt as renderSlot, K as createCommentVNode, Kn as ref, L as Text, M as Fragment, Mn as effectScope, Mt as onBeforeUpdate, Nn as getCurrentScope, Nt as onDeactivated, O as Comment, Ot as nextTick, Qn as toRef, Rn as isRef, S as vModelText, T as withModifiers, U as computed, Ut as provide, V as cloneVNode, Vn as onScopeDispose, Vt as openBlock, W as createBaseVNode, Wn as reactive, Xt as resolveDirective, Yn as shallowRef, Yt as resolveComponent, Z as createSlots, Zn as toRaw, Zt as resolveDynamicComponent, _n as watchEffect, _r as normalizeStyle, a as createApp, an as toHandlers, ar as capitalize$1, b as vModelRadio, cr as isArray$1, dn as useSlots, dr as isObject$2, er as toValue, et as createVNode, fr as isPlainObject$1, ft as guardReactiveProps, gn as watch, gr as normalizeProps, hn as warn, hr as normalizeClass, ht as hasInjectionContext, ir as camelize$1, jt as onBeforeUnmount, kt as onActivated, lr as isDate, mr as isString, n as Transition, nr as unref, nt as defineComponent, or as hasOwn, p as render, pr as isPromise, pt as h$1, q as createElementBlock, qn as shallowReactive, qt as renderList, r as TransitionGroup, rr as NOOP, sn as useAttrs$1, sr as hyphenate$1, tr as triggerRef, ur as isFunction$1, ut as getCurrentInstance, v as vModelCheckbox, vr as toDisplayString, w as withKeys, wt as isVNode, xn as withCtx, xt as inject, yr as toHandlerKey, zt as onUnmounted } from "./vue.runtime.esm-bundler-BN4TKXIE.js";
  3. //#region node_modules/element-plus/es/constants/aria.mjs
  4. var EVENT_CODE = {
  5. tab: "Tab",
  6. enter: "Enter",
  7. space: "Space",
  8. left: "ArrowLeft",
  9. up: "ArrowUp",
  10. right: "ArrowRight",
  11. down: "ArrowDown",
  12. esc: "Escape",
  13. delete: "Delete",
  14. backspace: "Backspace",
  15. numpadEnter: "NumpadEnter",
  16. pageUp: "PageUp",
  17. pageDown: "PageDown",
  18. home: "Home",
  19. end: "End"
  20. };
  21. //#endregion
  22. //#region node_modules/element-plus/es/constants/date.mjs
  23. var datePickTypes = [
  24. "year",
  25. "years",
  26. "month",
  27. "months",
  28. "date",
  29. "dates",
  30. "week",
  31. "datetime",
  32. "datetimerange",
  33. "daterange",
  34. "monthrange",
  35. "yearrange"
  36. ];
  37. var WEEK_DAYS = [
  38. "sun",
  39. "mon",
  40. "tue",
  41. "wed",
  42. "thu",
  43. "fri",
  44. "sat"
  45. ];
  46. //#endregion
  47. //#region node_modules/element-plus/es/constants/event.mjs
  48. var UPDATE_MODEL_EVENT = "update:modelValue";
  49. var CHANGE_EVENT = "change";
  50. var INPUT_EVENT = "input";
  51. //#endregion
  52. //#region node_modules/element-plus/es/constants/key.mjs
  53. var INSTALLED_KEY = Symbol("INSTALLED_KEY");
  54. //#endregion
  55. //#region node_modules/element-plus/es/constants/size.mjs
  56. var componentSizes = [
  57. "",
  58. "default",
  59. "small",
  60. "large"
  61. ];
  62. var componentSizeMap = {
  63. large: 40,
  64. default: 32,
  65. small: 24
  66. };
  67. //#endregion
  68. //#region node_modules/element-plus/es/constants/column-alignment.mjs
  69. var columnAlignment = [
  70. "left",
  71. "center",
  72. "right"
  73. ];
  74. //#endregion
  75. //#region node_modules/element-plus/es/constants/form.mjs
  76. var MINIMUM_INPUT_WIDTH = 11;
  77. var BORDER_HORIZONTAL_WIDTH = 2;
  78. //#endregion
  79. //#region node_modules/lodash-es/_freeGlobal.js
  80. /** Detect free variable `global` from Node.js. */
  81. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  82. //#endregion
  83. //#region node_modules/lodash-es/_root.js
  84. /** Detect free variable `self`. */
  85. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  86. /** Used as a reference to the global object. */
  87. var root = freeGlobal || freeSelf || Function("return this")();
  88. //#endregion
  89. //#region node_modules/lodash-es/_Symbol.js
  90. /** Built-in value references. */
  91. var Symbol$1 = root.Symbol;
  92. //#endregion
  93. //#region node_modules/lodash-es/_getRawTag.js
  94. /** Used for built-in method references. */
  95. var objectProto$4 = Object.prototype;
  96. /** Used to check objects for own properties. */
  97. var hasOwnProperty$13 = objectProto$4.hasOwnProperty;
  98. /**
  99. * Used to resolve the
  100. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  101. * of values.
  102. */
  103. var nativeObjectToString$1 = objectProto$4.toString;
  104. /** Built-in value references. */
  105. var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
  106. /**
  107. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  108. *
  109. * @private
  110. * @param {*} value The value to query.
  111. * @returns {string} Returns the raw `toStringTag`.
  112. */
  113. function getRawTag(value) {
  114. var isOwn = hasOwnProperty$13.call(value, symToStringTag$1), tag = value[symToStringTag$1];
  115. try {
  116. value[symToStringTag$1] = void 0;
  117. var unmasked = true;
  118. } catch (e) {}
  119. var result = nativeObjectToString$1.call(value);
  120. if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
  121. else delete value[symToStringTag$1];
  122. return result;
  123. }
  124. //#endregion
  125. //#region node_modules/lodash-es/_objectToString.js
  126. /**
  127. * Used to resolve the
  128. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  129. * of values.
  130. */
  131. var nativeObjectToString = Object.prototype.toString;
  132. /**
  133. * Converts `value` to a string using `Object.prototype.toString`.
  134. *
  135. * @private
  136. * @param {*} value The value to convert.
  137. * @returns {string} Returns the converted string.
  138. */
  139. function objectToString(value) {
  140. return nativeObjectToString.call(value);
  141. }
  142. //#endregion
  143. //#region node_modules/lodash-es/_baseGetTag.js
  144. /** `Object#toString` result references. */
  145. var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
  146. /** Built-in value references. */
  147. var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
  148. /**
  149. * The base implementation of `getTag` without fallbacks for buggy environments.
  150. *
  151. * @private
  152. * @param {*} value The value to query.
  153. * @returns {string} Returns the `toStringTag`.
  154. */
  155. function baseGetTag(value) {
  156. if (value == null) return value === void 0 ? undefinedTag : nullTag;
  157. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  158. }
  159. //#endregion
  160. //#region node_modules/lodash-es/isObjectLike.js
  161. /**
  162. * Checks if `value` is object-like. A value is object-like if it's not `null`
  163. * and has a `typeof` result of "object".
  164. *
  165. * @static
  166. * @memberOf _
  167. * @since 4.0.0
  168. * @category Lang
  169. * @param {*} value The value to check.
  170. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  171. * @example
  172. *
  173. * _.isObjectLike({});
  174. * // => true
  175. *
  176. * _.isObjectLike([1, 2, 3]);
  177. * // => true
  178. *
  179. * _.isObjectLike(_.noop);
  180. * // => false
  181. *
  182. * _.isObjectLike(null);
  183. * // => false
  184. */
  185. function isObjectLike(value) {
  186. return value != null && typeof value == "object";
  187. }
  188. //#endregion
  189. //#region node_modules/lodash-es/isSymbol.js
  190. /** `Object#toString` result references. */
  191. var symbolTag$3 = "[object Symbol]";
  192. /**
  193. * Checks if `value` is classified as a `Symbol` primitive or object.
  194. *
  195. * @static
  196. * @memberOf _
  197. * @since 4.0.0
  198. * @category Lang
  199. * @param {*} value The value to check.
  200. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  201. * @example
  202. *
  203. * _.isSymbol(Symbol.iterator);
  204. * // => true
  205. *
  206. * _.isSymbol('abc');
  207. * // => false
  208. */
  209. function isSymbol(value) {
  210. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
  211. }
  212. //#endregion
  213. //#region node_modules/lodash-es/_arrayMap.js
  214. /**
  215. * A specialized version of `_.map` for arrays without support for iteratee
  216. * shorthands.
  217. *
  218. * @private
  219. * @param {Array} [array] The array to iterate over.
  220. * @param {Function} iteratee The function invoked per iteration.
  221. * @returns {Array} Returns the new mapped array.
  222. */
  223. function arrayMap(array, iteratee) {
  224. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  225. while (++index < length) result[index] = iteratee(array[index], index, array);
  226. return result;
  227. }
  228. //#endregion
  229. //#region node_modules/lodash-es/isArray.js
  230. /**
  231. * Checks if `value` is classified as an `Array` object.
  232. *
  233. * @static
  234. * @memberOf _
  235. * @since 0.1.0
  236. * @category Lang
  237. * @param {*} value The value to check.
  238. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  239. * @example
  240. *
  241. * _.isArray([1, 2, 3]);
  242. * // => true
  243. *
  244. * _.isArray(document.body.children);
  245. * // => false
  246. *
  247. * _.isArray('abc');
  248. * // => false
  249. *
  250. * _.isArray(_.noop);
  251. * // => false
  252. */
  253. var isArray = Array.isArray;
  254. //#endregion
  255. //#region node_modules/lodash-es/_baseToString.js
  256. /** Used as references for various `Number` constants. */
  257. var INFINITY$3 = Infinity;
  258. /** Used to convert symbols to primitives and strings. */
  259. var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
  260. /**
  261. * The base implementation of `_.toString` which doesn't convert nullish
  262. * values to empty strings.
  263. *
  264. * @private
  265. * @param {*} value The value to process.
  266. * @returns {string} Returns the string.
  267. */
  268. function baseToString(value) {
  269. if (typeof value == "string") return value;
  270. if (isArray(value)) return arrayMap(value, baseToString) + "";
  271. if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
  272. var result = value + "";
  273. return result == "0" && 1 / value == -INFINITY$3 ? "-0" : result;
  274. }
  275. //#endregion
  276. //#region node_modules/lodash-es/_trimmedEndIndex.js
  277. /** Used to match a single whitespace character. */
  278. var reWhitespace = /\s/;
  279. /**
  280. * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  281. * character of `string`.
  282. *
  283. * @private
  284. * @param {string} string The string to inspect.
  285. * @returns {number} Returns the index of the last non-whitespace character.
  286. */
  287. function trimmedEndIndex(string) {
  288. var index = string.length;
  289. while (index-- && reWhitespace.test(string.charAt(index)));
  290. return index;
  291. }
  292. //#endregion
  293. //#region node_modules/lodash-es/_baseTrim.js
  294. /** Used to match leading whitespace. */
  295. var reTrimStart = /^\s+/;
  296. /**
  297. * The base implementation of `_.trim`.
  298. *
  299. * @private
  300. * @param {string} string The string to trim.
  301. * @returns {string} Returns the trimmed string.
  302. */
  303. function baseTrim(string) {
  304. return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  305. }
  306. //#endregion
  307. //#region node_modules/lodash-es/isObject.js
  308. /**
  309. * Checks if `value` is the
  310. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  311. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  312. *
  313. * @static
  314. * @memberOf _
  315. * @since 0.1.0
  316. * @category Lang
  317. * @param {*} value The value to check.
  318. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  319. * @example
  320. *
  321. * _.isObject({});
  322. * // => true
  323. *
  324. * _.isObject([1, 2, 3]);
  325. * // => true
  326. *
  327. * _.isObject(_.noop);
  328. * // => true
  329. *
  330. * _.isObject(null);
  331. * // => false
  332. */
  333. function isObject$1(value) {
  334. var type = typeof value;
  335. return value != null && (type == "object" || type == "function");
  336. }
  337. //#endregion
  338. //#region node_modules/lodash-es/toNumber.js
  339. /** Used as references for various `Number` constants. */
  340. var NAN = NaN;
  341. /** Used to detect bad signed hexadecimal string values. */
  342. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  343. /** Used to detect binary string values. */
  344. var reIsBinary = /^0b[01]+$/i;
  345. /** Used to detect octal string values. */
  346. var reIsOctal = /^0o[0-7]+$/i;
  347. /** Built-in method references without a dependency on `root`. */
  348. var freeParseInt = parseInt;
  349. /**
  350. * Converts `value` to a number.
  351. *
  352. * @static
  353. * @memberOf _
  354. * @since 4.0.0
  355. * @category Lang
  356. * @param {*} value The value to process.
  357. * @returns {number} Returns the number.
  358. * @example
  359. *
  360. * _.toNumber(3.2);
  361. * // => 3.2
  362. *
  363. * _.toNumber(Number.MIN_VALUE);
  364. * // => 5e-324
  365. *
  366. * _.toNumber(Infinity);
  367. * // => Infinity
  368. *
  369. * _.toNumber('3.2');
  370. * // => 3.2
  371. */
  372. function toNumber(value) {
  373. if (typeof value == "number") return value;
  374. if (isSymbol(value)) return NAN;
  375. if (isObject$1(value)) {
  376. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  377. value = isObject$1(other) ? other + "" : other;
  378. }
  379. if (typeof value != "string") return value === 0 ? value : +value;
  380. value = baseTrim(value);
  381. var isBinary = reIsBinary.test(value);
  382. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  383. }
  384. //#endregion
  385. //#region node_modules/lodash-es/toFinite.js
  386. /** Used as references for various `Number` constants. */
  387. var INFINITY$2 = Infinity, MAX_INTEGER = 17976931348623157e292;
  388. /**
  389. * Converts `value` to a finite number.
  390. *
  391. * @static
  392. * @memberOf _
  393. * @since 4.12.0
  394. * @category Lang
  395. * @param {*} value The value to convert.
  396. * @returns {number} Returns the converted number.
  397. * @example
  398. *
  399. * _.toFinite(3.2);
  400. * // => 3.2
  401. *
  402. * _.toFinite(Number.MIN_VALUE);
  403. * // => 5e-324
  404. *
  405. * _.toFinite(Infinity);
  406. * // => 1.7976931348623157e+308
  407. *
  408. * _.toFinite('3.2');
  409. * // => 3.2
  410. */
  411. function toFinite(value) {
  412. if (!value) return value === 0 ? value : 0;
  413. value = toNumber(value);
  414. if (value === INFINITY$2 || value === -INFINITY$2) return (value < 0 ? -1 : 1) * MAX_INTEGER;
  415. return value === value ? value : 0;
  416. }
  417. //#endregion
  418. //#region node_modules/lodash-es/toInteger.js
  419. /**
  420. * Converts `value` to an integer.
  421. *
  422. * **Note:** This method is loosely based on
  423. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  424. *
  425. * @static
  426. * @memberOf _
  427. * @since 4.0.0
  428. * @category Lang
  429. * @param {*} value The value to convert.
  430. * @returns {number} Returns the converted integer.
  431. * @example
  432. *
  433. * _.toInteger(3.2);
  434. * // => 3
  435. *
  436. * _.toInteger(Number.MIN_VALUE);
  437. * // => 0
  438. *
  439. * _.toInteger(Infinity);
  440. * // => 1.7976931348623157e+308
  441. *
  442. * _.toInteger('3.2');
  443. * // => 3
  444. */
  445. function toInteger(value) {
  446. var result = toFinite(value), remainder = result % 1;
  447. return result === result ? remainder ? result - remainder : result : 0;
  448. }
  449. //#endregion
  450. //#region node_modules/lodash-es/identity.js
  451. /**
  452. * This method returns the first argument it receives.
  453. *
  454. * @static
  455. * @since 0.1.0
  456. * @memberOf _
  457. * @category Util
  458. * @param {*} value Any value.
  459. * @returns {*} Returns `value`.
  460. * @example
  461. *
  462. * var object = { 'a': 1 };
  463. *
  464. * console.log(_.identity(object) === object);
  465. * // => true
  466. */
  467. function identity(value) {
  468. return value;
  469. }
  470. //#endregion
  471. //#region node_modules/lodash-es/isFunction.js
  472. /** `Object#toString` result references. */
  473. var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
  474. /**
  475. * Checks if `value` is classified as a `Function` object.
  476. *
  477. * @static
  478. * @memberOf _
  479. * @since 0.1.0
  480. * @category Lang
  481. * @param {*} value The value to check.
  482. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  483. * @example
  484. *
  485. * _.isFunction(_);
  486. * // => true
  487. *
  488. * _.isFunction(/abc/);
  489. * // => false
  490. */
  491. function isFunction(value) {
  492. if (!isObject$1(value)) return false;
  493. var tag = baseGetTag(value);
  494. return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
  495. }
  496. //#endregion
  497. //#region node_modules/lodash-es/_coreJsData.js
  498. /** Used to detect overreaching core-js shims. */
  499. var coreJsData = root["__core-js_shared__"];
  500. //#endregion
  501. //#region node_modules/lodash-es/_isMasked.js
  502. /** Used to detect methods masquerading as native. */
  503. var maskSrcKey = function() {
  504. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  505. return uid ? "Symbol(src)_1." + uid : "";
  506. }();
  507. /**
  508. * Checks if `func` has its source masked.
  509. *
  510. * @private
  511. * @param {Function} func The function to check.
  512. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  513. */
  514. function isMasked(func) {
  515. return !!maskSrcKey && maskSrcKey in func;
  516. }
  517. //#endregion
  518. //#region node_modules/lodash-es/_toSource.js
  519. /** Used to resolve the decompiled source of functions. */
  520. var funcToString$2 = Function.prototype.toString;
  521. /**
  522. * Converts `func` to its source code.
  523. *
  524. * @private
  525. * @param {Function} func The function to convert.
  526. * @returns {string} Returns the source code.
  527. */
  528. function toSource(func) {
  529. if (func != null) {
  530. try {
  531. return funcToString$2.call(func);
  532. } catch (e) {}
  533. try {
  534. return func + "";
  535. } catch (e) {}
  536. }
  537. return "";
  538. }
  539. //#endregion
  540. //#region node_modules/lodash-es/_baseIsNative.js
  541. /**
  542. * Used to match `RegExp`
  543. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  544. */
  545. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  546. /** Used to detect host constructors (Safari). */
  547. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  548. /** Used for built-in method references. */
  549. var funcProto$1 = Function.prototype, objectProto$3 = Object.prototype;
  550. /** Used to resolve the decompiled source of functions. */
  551. var funcToString$1 = funcProto$1.toString;
  552. /** Used to check objects for own properties. */
  553. var hasOwnProperty$12 = objectProto$3.hasOwnProperty;
  554. /** Used to detect if a method is native. */
  555. var reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$12).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
  556. /**
  557. * The base implementation of `_.isNative` without bad shim checks.
  558. *
  559. * @private
  560. * @param {*} value The value to check.
  561. * @returns {boolean} Returns `true` if `value` is a native function,
  562. * else `false`.
  563. */
  564. function baseIsNative(value) {
  565. if (!isObject$1(value) || isMasked(value)) return false;
  566. return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
  567. }
  568. //#endregion
  569. //#region node_modules/lodash-es/_getValue.js
  570. /**
  571. * Gets the value at `key` of `object`.
  572. *
  573. * @private
  574. * @param {Object} [object] The object to query.
  575. * @param {string} key The key of the property to get.
  576. * @returns {*} Returns the property value.
  577. */
  578. function getValue$1(object, key) {
  579. return object == null ? void 0 : object[key];
  580. }
  581. //#endregion
  582. //#region node_modules/lodash-es/_getNative.js
  583. /**
  584. * Gets the native function at `key` of `object`.
  585. *
  586. * @private
  587. * @param {Object} object The object to query.
  588. * @param {string} key The key of the method to get.
  589. * @returns {*} Returns the function if it's native, else `undefined`.
  590. */
  591. function getNative(object, key) {
  592. var value = getValue$1(object, key);
  593. return baseIsNative(value) ? value : void 0;
  594. }
  595. //#endregion
  596. //#region node_modules/lodash-es/_WeakMap.js
  597. var WeakMap$1 = getNative(root, "WeakMap");
  598. //#endregion
  599. //#region node_modules/lodash-es/_baseCreate.js
  600. /** Built-in value references. */
  601. var objectCreate = Object.create;
  602. /**
  603. * The base implementation of `_.create` without support for assigning
  604. * properties to the created object.
  605. *
  606. * @private
  607. * @param {Object} proto The object to inherit from.
  608. * @returns {Object} Returns the new object.
  609. */
  610. var baseCreate = function() {
  611. function object() {}
  612. return function(proto) {
  613. if (!isObject$1(proto)) return {};
  614. if (objectCreate) return objectCreate(proto);
  615. object.prototype = proto;
  616. var result = new object();
  617. object.prototype = void 0;
  618. return result;
  619. };
  620. }();
  621. //#endregion
  622. //#region node_modules/lodash-es/_apply.js
  623. /**
  624. * A faster alternative to `Function#apply`, this function invokes `func`
  625. * with the `this` binding of `thisArg` and the arguments of `args`.
  626. *
  627. * @private
  628. * @param {Function} func The function to invoke.
  629. * @param {*} thisArg The `this` binding of `func`.
  630. * @param {Array} args The arguments to invoke `func` with.
  631. * @returns {*} Returns the result of `func`.
  632. */
  633. function apply(func, thisArg, args) {
  634. switch (args.length) {
  635. case 0: return func.call(thisArg);
  636. case 1: return func.call(thisArg, args[0]);
  637. case 2: return func.call(thisArg, args[0], args[1]);
  638. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  639. }
  640. return func.apply(thisArg, args);
  641. }
  642. //#endregion
  643. //#region node_modules/lodash-es/noop.js
  644. /**
  645. * This method returns `undefined`.
  646. *
  647. * @static
  648. * @memberOf _
  649. * @since 2.3.0
  650. * @category Util
  651. * @example
  652. *
  653. * _.times(2, _.noop);
  654. * // => [undefined, undefined]
  655. */
  656. function noop$1() {}
  657. //#endregion
  658. //#region node_modules/lodash-es/_copyArray.js
  659. /**
  660. * Copies the values of `source` to `array`.
  661. *
  662. * @private
  663. * @param {Array} source The array to copy values from.
  664. * @param {Array} [array=[]] The array to copy values to.
  665. * @returns {Array} Returns `array`.
  666. */
  667. function copyArray(source, array) {
  668. var index = -1, length = source.length;
  669. array || (array = Array(length));
  670. while (++index < length) array[index] = source[index];
  671. return array;
  672. }
  673. //#endregion
  674. //#region node_modules/lodash-es/_shortOut.js
  675. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  676. var HOT_COUNT = 800, HOT_SPAN = 16;
  677. var nativeNow = Date.now;
  678. /**
  679. * Creates a function that'll short out and invoke `identity` instead
  680. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  681. * milliseconds.
  682. *
  683. * @private
  684. * @param {Function} func The function to restrict.
  685. * @returns {Function} Returns the new shortable function.
  686. */
  687. function shortOut(func) {
  688. var count = 0, lastCalled = 0;
  689. return function() {
  690. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  691. lastCalled = stamp;
  692. if (remaining > 0) {
  693. if (++count >= HOT_COUNT) return arguments[0];
  694. } else count = 0;
  695. return func.apply(void 0, arguments);
  696. };
  697. }
  698. //#endregion
  699. //#region node_modules/lodash-es/constant.js
  700. /**
  701. * Creates a function that returns `value`.
  702. *
  703. * @static
  704. * @memberOf _
  705. * @since 2.4.0
  706. * @category Util
  707. * @param {*} value The value to return from the new function.
  708. * @returns {Function} Returns the new constant function.
  709. * @example
  710. *
  711. * var objects = _.times(2, _.constant({ 'a': 1 }));
  712. *
  713. * console.log(objects);
  714. * // => [{ 'a': 1 }, { 'a': 1 }]
  715. *
  716. * console.log(objects[0] === objects[1]);
  717. * // => true
  718. */
  719. function constant(value) {
  720. return function() {
  721. return value;
  722. };
  723. }
  724. //#endregion
  725. //#region node_modules/lodash-es/_defineProperty.js
  726. var defineProperty = function() {
  727. try {
  728. var func = getNative(Object, "defineProperty");
  729. func({}, "", {});
  730. return func;
  731. } catch (e) {}
  732. }();
  733. //#endregion
  734. //#region node_modules/lodash-es/_setToString.js
  735. /**
  736. * Sets the `toString` method of `func` to return `string`.
  737. *
  738. * @private
  739. * @param {Function} func The function to modify.
  740. * @param {Function} string The `toString` result.
  741. * @returns {Function} Returns `func`.
  742. */
  743. var setToString = shortOut(!defineProperty ? identity : function(func, string) {
  744. return defineProperty(func, "toString", {
  745. "configurable": true,
  746. "enumerable": false,
  747. "value": constant(string),
  748. "writable": true
  749. });
  750. });
  751. //#endregion
  752. //#region node_modules/lodash-es/_arrayEach.js
  753. /**
  754. * A specialized version of `_.forEach` for arrays without support for
  755. * iteratee shorthands.
  756. *
  757. * @private
  758. * @param {Array} [array] The array to iterate over.
  759. * @param {Function} iteratee The function invoked per iteration.
  760. * @returns {Array} Returns `array`.
  761. */
  762. function arrayEach(array, iteratee) {
  763. var index = -1, length = array == null ? 0 : array.length;
  764. while (++index < length) if (iteratee(array[index], index, array) === false) break;
  765. return array;
  766. }
  767. //#endregion
  768. //#region node_modules/lodash-es/_baseFindIndex.js
  769. /**
  770. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  771. * support for iteratee shorthands.
  772. *
  773. * @private
  774. * @param {Array} array The array to inspect.
  775. * @param {Function} predicate The function invoked per iteration.
  776. * @param {number} fromIndex The index to search from.
  777. * @param {boolean} [fromRight] Specify iterating from right to left.
  778. * @returns {number} Returns the index of the matched value, else `-1`.
  779. */
  780. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  781. var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
  782. while (fromRight ? index-- : ++index < length) if (predicate(array[index], index, array)) return index;
  783. return -1;
  784. }
  785. //#endregion
  786. //#region node_modules/lodash-es/_baseIsNaN.js
  787. /**
  788. * The base implementation of `_.isNaN` without support for number objects.
  789. *
  790. * @private
  791. * @param {*} value The value to check.
  792. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  793. */
  794. function baseIsNaN(value) {
  795. return value !== value;
  796. }
  797. //#endregion
  798. //#region node_modules/lodash-es/_strictIndexOf.js
  799. /**
  800. * A specialized version of `_.indexOf` which performs strict equality
  801. * comparisons of values, i.e. `===`.
  802. *
  803. * @private
  804. * @param {Array} array The array to inspect.
  805. * @param {*} value The value to search for.
  806. * @param {number} fromIndex The index to search from.
  807. * @returns {number} Returns the index of the matched value, else `-1`.
  808. */
  809. function strictIndexOf(array, value, fromIndex) {
  810. var index = fromIndex - 1, length = array.length;
  811. while (++index < length) if (array[index] === value) return index;
  812. return -1;
  813. }
  814. //#endregion
  815. //#region node_modules/lodash-es/_baseIndexOf.js
  816. /**
  817. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  818. *
  819. * @private
  820. * @param {Array} array The array to inspect.
  821. * @param {*} value The value to search for.
  822. * @param {number} fromIndex The index to search from.
  823. * @returns {number} Returns the index of the matched value, else `-1`.
  824. */
  825. function baseIndexOf(array, value, fromIndex) {
  826. return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
  827. }
  828. //#endregion
  829. //#region node_modules/lodash-es/_arrayIncludes.js
  830. /**
  831. * A specialized version of `_.includes` for arrays without support for
  832. * specifying an index to search from.
  833. *
  834. * @private
  835. * @param {Array} [array] The array to inspect.
  836. * @param {*} target The value to search for.
  837. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  838. */
  839. function arrayIncludes(array, value) {
  840. return !!(array == null ? 0 : array.length) && baseIndexOf(array, value, 0) > -1;
  841. }
  842. //#endregion
  843. //#region node_modules/lodash-es/_isIndex.js
  844. /** Used as references for various `Number` constants. */
  845. var MAX_SAFE_INTEGER$1 = 9007199254740991;
  846. /** Used to detect unsigned integer values. */
  847. var reIsUint = /^(?:0|[1-9]\d*)$/;
  848. /**
  849. * Checks if `value` is a valid array-like index.
  850. *
  851. * @private
  852. * @param {*} value The value to check.
  853. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  854. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  855. */
  856. function isIndex(value, length) {
  857. var type = typeof value;
  858. length = length == null ? MAX_SAFE_INTEGER$1 : length;
  859. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  860. }
  861. //#endregion
  862. //#region node_modules/lodash-es/_baseAssignValue.js
  863. /**
  864. * The base implementation of `assignValue` and `assignMergeValue` without
  865. * value checks.
  866. *
  867. * @private
  868. * @param {Object} object The object to modify.
  869. * @param {string} key The key of the property to assign.
  870. * @param {*} value The value to assign.
  871. */
  872. function baseAssignValue(object, key, value) {
  873. if (key == "__proto__" && defineProperty) defineProperty(object, key, {
  874. "configurable": true,
  875. "enumerable": true,
  876. "value": value,
  877. "writable": true
  878. });
  879. else object[key] = value;
  880. }
  881. //#endregion
  882. //#region node_modules/lodash-es/eq.js
  883. /**
  884. * Performs a
  885. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  886. * comparison between two values to determine if they are equivalent.
  887. *
  888. * @static
  889. * @memberOf _
  890. * @since 4.0.0
  891. * @category Lang
  892. * @param {*} value The value to compare.
  893. * @param {*} other The other value to compare.
  894. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  895. * @example
  896. *
  897. * var object = { 'a': 1 };
  898. * var other = { 'a': 1 };
  899. *
  900. * _.eq(object, object);
  901. * // => true
  902. *
  903. * _.eq(object, other);
  904. * // => false
  905. *
  906. * _.eq('a', 'a');
  907. * // => true
  908. *
  909. * _.eq('a', Object('a'));
  910. * // => false
  911. *
  912. * _.eq(NaN, NaN);
  913. * // => true
  914. */
  915. function eq(value, other) {
  916. return value === other || value !== value && other !== other;
  917. }
  918. //#endregion
  919. //#region node_modules/lodash-es/_assignValue.js
  920. /** Used to check objects for own properties. */
  921. var hasOwnProperty$11 = Object.prototype.hasOwnProperty;
  922. /**
  923. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  924. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  925. * for equality comparisons.
  926. *
  927. * @private
  928. * @param {Object} object The object to modify.
  929. * @param {string} key The key of the property to assign.
  930. * @param {*} value The value to assign.
  931. */
  932. function assignValue(object, key, value) {
  933. var objValue = object[key];
  934. if (!(hasOwnProperty$11.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
  935. }
  936. //#endregion
  937. //#region node_modules/lodash-es/_copyObject.js
  938. /**
  939. * Copies properties of `source` to `object`.
  940. *
  941. * @private
  942. * @param {Object} source The object to copy properties from.
  943. * @param {Array} props The property identifiers to copy.
  944. * @param {Object} [object={}] The object to copy properties to.
  945. * @param {Function} [customizer] The function to customize copied values.
  946. * @returns {Object} Returns `object`.
  947. */
  948. function copyObject(source, props, object, customizer) {
  949. var isNew = !object;
  950. object || (object = {});
  951. var index = -1, length = props.length;
  952. while (++index < length) {
  953. var key = props[index];
  954. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
  955. if (newValue === void 0) newValue = source[key];
  956. if (isNew) baseAssignValue(object, key, newValue);
  957. else assignValue(object, key, newValue);
  958. }
  959. return object;
  960. }
  961. //#endregion
  962. //#region node_modules/lodash-es/_overRest.js
  963. var nativeMax$2 = Math.max;
  964. /**
  965. * A specialized version of `baseRest` which transforms the rest array.
  966. *
  967. * @private
  968. * @param {Function} func The function to apply a rest parameter to.
  969. * @param {number} [start=func.length-1] The start position of the rest parameter.
  970. * @param {Function} transform The rest array transform.
  971. * @returns {Function} Returns the new function.
  972. */
  973. function overRest(func, start, transform) {
  974. start = nativeMax$2(start === void 0 ? func.length - 1 : start, 0);
  975. return function() {
  976. var args = arguments, index = -1, length = nativeMax$2(args.length - start, 0), array = Array(length);
  977. while (++index < length) array[index] = args[start + index];
  978. index = -1;
  979. var otherArgs = Array(start + 1);
  980. while (++index < start) otherArgs[index] = args[index];
  981. otherArgs[start] = transform(array);
  982. return apply(func, this, otherArgs);
  983. };
  984. }
  985. //#endregion
  986. //#region node_modules/lodash-es/_baseRest.js
  987. /**
  988. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  989. *
  990. * @private
  991. * @param {Function} func The function to apply a rest parameter to.
  992. * @param {number} [start=func.length-1] The start position of the rest parameter.
  993. * @returns {Function} Returns the new function.
  994. */
  995. function baseRest(func, start) {
  996. return setToString(overRest(func, start, identity), func + "");
  997. }
  998. //#endregion
  999. //#region node_modules/lodash-es/isLength.js
  1000. /** Used as references for various `Number` constants. */
  1001. var MAX_SAFE_INTEGER = 9007199254740991;
  1002. /**
  1003. * Checks if `value` is a valid array-like length.
  1004. *
  1005. * **Note:** This method is loosely based on
  1006. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  1007. *
  1008. * @static
  1009. * @memberOf _
  1010. * @since 4.0.0
  1011. * @category Lang
  1012. * @param {*} value The value to check.
  1013. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1014. * @example
  1015. *
  1016. * _.isLength(3);
  1017. * // => true
  1018. *
  1019. * _.isLength(Number.MIN_VALUE);
  1020. * // => false
  1021. *
  1022. * _.isLength(Infinity);
  1023. * // => false
  1024. *
  1025. * _.isLength('3');
  1026. * // => false
  1027. */
  1028. function isLength(value) {
  1029. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1030. }
  1031. //#endregion
  1032. //#region node_modules/lodash-es/isArrayLike.js
  1033. /**
  1034. * Checks if `value` is array-like. A value is considered array-like if it's
  1035. * not a function and has a `value.length` that's an integer greater than or
  1036. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  1037. *
  1038. * @static
  1039. * @memberOf _
  1040. * @since 4.0.0
  1041. * @category Lang
  1042. * @param {*} value The value to check.
  1043. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1044. * @example
  1045. *
  1046. * _.isArrayLike([1, 2, 3]);
  1047. * // => true
  1048. *
  1049. * _.isArrayLike(document.body.children);
  1050. * // => true
  1051. *
  1052. * _.isArrayLike('abc');
  1053. * // => true
  1054. *
  1055. * _.isArrayLike(_.noop);
  1056. * // => false
  1057. */
  1058. function isArrayLike(value) {
  1059. return value != null && isLength(value.length) && !isFunction(value);
  1060. }
  1061. //#endregion
  1062. //#region node_modules/lodash-es/_isIterateeCall.js
  1063. /**
  1064. * Checks if the given arguments are from an iteratee call.
  1065. *
  1066. * @private
  1067. * @param {*} value The potential iteratee value argument.
  1068. * @param {*} index The potential iteratee index or key argument.
  1069. * @param {*} object The potential iteratee object argument.
  1070. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  1071. * else `false`.
  1072. */
  1073. function isIterateeCall(value, index, object) {
  1074. if (!isObject$1(object)) return false;
  1075. var type = typeof index;
  1076. if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
  1077. return false;
  1078. }
  1079. //#endregion
  1080. //#region node_modules/lodash-es/_createAssigner.js
  1081. /**
  1082. * Creates a function like `_.assign`.
  1083. *
  1084. * @private
  1085. * @param {Function} assigner The function to assign values.
  1086. * @returns {Function} Returns the new assigner function.
  1087. */
  1088. function createAssigner(assigner) {
  1089. return baseRest(function(object, sources) {
  1090. var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
  1091. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
  1092. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  1093. customizer = length < 3 ? void 0 : customizer;
  1094. length = 1;
  1095. }
  1096. object = Object(object);
  1097. while (++index < length) {
  1098. var source = sources[index];
  1099. if (source) assigner(object, source, index, customizer);
  1100. }
  1101. return object;
  1102. });
  1103. }
  1104. //#endregion
  1105. //#region node_modules/lodash-es/_isPrototype.js
  1106. /** Used for built-in method references. */
  1107. var objectProto$2 = Object.prototype;
  1108. /**
  1109. * Checks if `value` is likely a prototype object.
  1110. *
  1111. * @private
  1112. * @param {*} value The value to check.
  1113. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  1114. */
  1115. function isPrototype(value) {
  1116. var Ctor = value && value.constructor;
  1117. return value === (typeof Ctor == "function" && Ctor.prototype || objectProto$2);
  1118. }
  1119. //#endregion
  1120. //#region node_modules/lodash-es/_baseTimes.js
  1121. /**
  1122. * The base implementation of `_.times` without support for iteratee shorthands
  1123. * or max array length checks.
  1124. *
  1125. * @private
  1126. * @param {number} n The number of times to invoke `iteratee`.
  1127. * @param {Function} iteratee The function invoked per iteration.
  1128. * @returns {Array} Returns the array of results.
  1129. */
  1130. function baseTimes(n, iteratee) {
  1131. var index = -1, result = Array(n);
  1132. while (++index < n) result[index] = iteratee(index);
  1133. return result;
  1134. }
  1135. //#endregion
  1136. //#region node_modules/lodash-es/_baseIsArguments.js
  1137. /** `Object#toString` result references. */
  1138. var argsTag$3 = "[object Arguments]";
  1139. /**
  1140. * The base implementation of `_.isArguments`.
  1141. *
  1142. * @private
  1143. * @param {*} value The value to check.
  1144. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1145. */
  1146. function baseIsArguments(value) {
  1147. return isObjectLike(value) && baseGetTag(value) == argsTag$3;
  1148. }
  1149. //#endregion
  1150. //#region node_modules/lodash-es/isArguments.js
  1151. /** Used for built-in method references. */
  1152. var objectProto$1 = Object.prototype;
  1153. /** Used to check objects for own properties. */
  1154. var hasOwnProperty$10 = objectProto$1.hasOwnProperty;
  1155. /** Built-in value references. */
  1156. var propertyIsEnumerable$1 = objectProto$1.propertyIsEnumerable;
  1157. /**
  1158. * Checks if `value` is likely an `arguments` object.
  1159. *
  1160. * @static
  1161. * @memberOf _
  1162. * @since 0.1.0
  1163. * @category Lang
  1164. * @param {*} value The value to check.
  1165. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1166. * else `false`.
  1167. * @example
  1168. *
  1169. * _.isArguments(function() { return arguments; }());
  1170. * // => true
  1171. *
  1172. * _.isArguments([1, 2, 3]);
  1173. * // => false
  1174. */
  1175. var isArguments = baseIsArguments(function() {
  1176. return arguments;
  1177. }()) ? baseIsArguments : function(value) {
  1178. return isObjectLike(value) && hasOwnProperty$10.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
  1179. };
  1180. //#endregion
  1181. //#region node_modules/lodash-es/stubFalse.js
  1182. /**
  1183. * This method returns `false`.
  1184. *
  1185. * @static
  1186. * @memberOf _
  1187. * @since 4.13.0
  1188. * @category Util
  1189. * @returns {boolean} Returns `false`.
  1190. * @example
  1191. *
  1192. * _.times(2, _.stubFalse);
  1193. * // => [false, false]
  1194. */
  1195. function stubFalse() {
  1196. return false;
  1197. }
  1198. //#endregion
  1199. //#region node_modules/lodash-es/isBuffer.js
  1200. /** Detect free variable `exports`. */
  1201. var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
  1202. /** Detect free variable `module`. */
  1203. var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
  1204. /** Built-in value references. */
  1205. var Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? root.Buffer : void 0;
  1206. /**
  1207. * Checks if `value` is a buffer.
  1208. *
  1209. * @static
  1210. * @memberOf _
  1211. * @since 4.3.0
  1212. * @category Lang
  1213. * @param {*} value The value to check.
  1214. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  1215. * @example
  1216. *
  1217. * _.isBuffer(new Buffer(2));
  1218. * // => true
  1219. *
  1220. * _.isBuffer(new Uint8Array(2));
  1221. * // => false
  1222. */
  1223. var isBuffer = (Buffer$1 ? Buffer$1.isBuffer : void 0) || stubFalse;
  1224. //#endregion
  1225. //#region node_modules/lodash-es/_baseIsTypedArray.js
  1226. /** `Object#toString` result references. */
  1227. var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
  1228. var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
  1229. /** Used to identify `toStringTag` values of typed arrays. */
  1230. var typedArrayTags = {};
  1231. typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
  1232. typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
  1233. /**
  1234. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  1235. *
  1236. * @private
  1237. * @param {*} value The value to check.
  1238. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1239. */
  1240. function baseIsTypedArray(value) {
  1241. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  1242. }
  1243. //#endregion
  1244. //#region node_modules/lodash-es/_baseUnary.js
  1245. /**
  1246. * The base implementation of `_.unary` without support for storing metadata.
  1247. *
  1248. * @private
  1249. * @param {Function} func The function to cap arguments for.
  1250. * @returns {Function} Returns the new capped function.
  1251. */
  1252. function baseUnary(func) {
  1253. return function(value) {
  1254. return func(value);
  1255. };
  1256. }
  1257. //#endregion
  1258. //#region node_modules/lodash-es/_nodeUtil.js
  1259. /** Detect free variable `exports`. */
  1260. var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
  1261. /** Detect free variable `module`. */
  1262. var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
  1263. /** Detect free variable `process` from Node.js. */
  1264. var freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && freeGlobal.process;
  1265. /** Used to access faster Node.js helpers. */
  1266. var nodeUtil = function() {
  1267. try {
  1268. var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
  1269. if (types) return types;
  1270. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  1271. } catch (e) {}
  1272. }();
  1273. //#endregion
  1274. //#region node_modules/lodash-es/isTypedArray.js
  1275. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1276. /**
  1277. * Checks if `value` is classified as a typed array.
  1278. *
  1279. * @static
  1280. * @memberOf _
  1281. * @since 3.0.0
  1282. * @category Lang
  1283. * @param {*} value The value to check.
  1284. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1285. * @example
  1286. *
  1287. * _.isTypedArray(new Uint8Array);
  1288. * // => true
  1289. *
  1290. * _.isTypedArray([]);
  1291. * // => false
  1292. */
  1293. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  1294. //#endregion
  1295. //#region node_modules/lodash-es/_arrayLikeKeys.js
  1296. /** Used to check objects for own properties. */
  1297. var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
  1298. /**
  1299. * Creates an array of the enumerable property names of the array-like `value`.
  1300. *
  1301. * @private
  1302. * @param {*} value The value to query.
  1303. * @param {boolean} inherited Specify returning inherited property names.
  1304. * @returns {Array} Returns the array of property names.
  1305. */
  1306. function arrayLikeKeys(value, inherited) {
  1307. var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
  1308. for (var key in value) if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
  1309. return result;
  1310. }
  1311. //#endregion
  1312. //#region node_modules/lodash-es/_overArg.js
  1313. /**
  1314. * Creates a unary function that invokes `func` with its argument transformed.
  1315. *
  1316. * @private
  1317. * @param {Function} func The function to wrap.
  1318. * @param {Function} transform The argument transform.
  1319. * @returns {Function} Returns the new function.
  1320. */
  1321. function overArg(func, transform) {
  1322. return function(arg) {
  1323. return func(transform(arg));
  1324. };
  1325. }
  1326. //#endregion
  1327. //#region node_modules/lodash-es/_nativeKeys.js
  1328. var nativeKeys = overArg(Object.keys, Object);
  1329. //#endregion
  1330. //#region node_modules/lodash-es/_baseKeys.js
  1331. /** Used to check objects for own properties. */
  1332. var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
  1333. /**
  1334. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  1335. *
  1336. * @private
  1337. * @param {Object} object The object to query.
  1338. * @returns {Array} Returns the array of property names.
  1339. */
  1340. function baseKeys(object) {
  1341. if (!isPrototype(object)) return nativeKeys(object);
  1342. var result = [];
  1343. for (var key in Object(object)) if (hasOwnProperty$8.call(object, key) && key != "constructor") result.push(key);
  1344. return result;
  1345. }
  1346. //#endregion
  1347. //#region node_modules/lodash-es/keys.js
  1348. /**
  1349. * Creates an array of the own enumerable property names of `object`.
  1350. *
  1351. * **Note:** Non-object values are coerced to objects. See the
  1352. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  1353. * for more details.
  1354. *
  1355. * @static
  1356. * @since 0.1.0
  1357. * @memberOf _
  1358. * @category Object
  1359. * @param {Object} object The object to query.
  1360. * @returns {Array} Returns the array of property names.
  1361. * @example
  1362. *
  1363. * function Foo() {
  1364. * this.a = 1;
  1365. * this.b = 2;
  1366. * }
  1367. *
  1368. * Foo.prototype.c = 3;
  1369. *
  1370. * _.keys(new Foo);
  1371. * // => ['a', 'b'] (iteration order is not guaranteed)
  1372. *
  1373. * _.keys('hi');
  1374. * // => ['0', '1']
  1375. */
  1376. function keys(object) {
  1377. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  1378. }
  1379. //#endregion
  1380. //#region node_modules/lodash-es/_nativeKeysIn.js
  1381. /**
  1382. * This function is like
  1383. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  1384. * except that it includes inherited enumerable properties.
  1385. *
  1386. * @private
  1387. * @param {Object} object The object to query.
  1388. * @returns {Array} Returns the array of property names.
  1389. */
  1390. function nativeKeysIn(object) {
  1391. var result = [];
  1392. if (object != null) for (var key in Object(object)) result.push(key);
  1393. return result;
  1394. }
  1395. //#endregion
  1396. //#region node_modules/lodash-es/_baseKeysIn.js
  1397. /** Used to check objects for own properties. */
  1398. var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
  1399. /**
  1400. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  1401. *
  1402. * @private
  1403. * @param {Object} object The object to query.
  1404. * @returns {Array} Returns the array of property names.
  1405. */
  1406. function baseKeysIn(object) {
  1407. if (!isObject$1(object)) return nativeKeysIn(object);
  1408. var isProto = isPrototype(object), result = [];
  1409. for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$7.call(object, key)))) result.push(key);
  1410. return result;
  1411. }
  1412. //#endregion
  1413. //#region node_modules/lodash-es/keysIn.js
  1414. /**
  1415. * Creates an array of the own and inherited enumerable property names of `object`.
  1416. *
  1417. * **Note:** Non-object values are coerced to objects.
  1418. *
  1419. * @static
  1420. * @memberOf _
  1421. * @since 3.0.0
  1422. * @category Object
  1423. * @param {Object} object The object to query.
  1424. * @returns {Array} Returns the array of property names.
  1425. * @example
  1426. *
  1427. * function Foo() {
  1428. * this.a = 1;
  1429. * this.b = 2;
  1430. * }
  1431. *
  1432. * Foo.prototype.c = 3;
  1433. *
  1434. * _.keysIn(new Foo);
  1435. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  1436. */
  1437. function keysIn(object) {
  1438. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  1439. }
  1440. //#endregion
  1441. //#region node_modules/lodash-es/_isKey.js
  1442. /** Used to match property names within property paths. */
  1443. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
  1444. /**
  1445. * Checks if `value` is a property name and not a property path.
  1446. *
  1447. * @private
  1448. * @param {*} value The value to check.
  1449. * @param {Object} [object] The object to query keys on.
  1450. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  1451. */
  1452. function isKey(value, object) {
  1453. if (isArray(value)) return false;
  1454. var type = typeof value;
  1455. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
  1456. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
  1457. }
  1458. //#endregion
  1459. //#region node_modules/lodash-es/_nativeCreate.js
  1460. var nativeCreate = getNative(Object, "create");
  1461. //#endregion
  1462. //#region node_modules/lodash-es/_hashClear.js
  1463. /**
  1464. * Removes all key-value entries from the hash.
  1465. *
  1466. * @private
  1467. * @name clear
  1468. * @memberOf Hash
  1469. */
  1470. function hashClear() {
  1471. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  1472. this.size = 0;
  1473. }
  1474. //#endregion
  1475. //#region node_modules/lodash-es/_hashDelete.js
  1476. /**
  1477. * Removes `key` and its value from the hash.
  1478. *
  1479. * @private
  1480. * @name delete
  1481. * @memberOf Hash
  1482. * @param {Object} hash The hash to modify.
  1483. * @param {string} key The key of the value to remove.
  1484. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1485. */
  1486. function hashDelete(key) {
  1487. var result = this.has(key) && delete this.__data__[key];
  1488. this.size -= result ? 1 : 0;
  1489. return result;
  1490. }
  1491. //#endregion
  1492. //#region node_modules/lodash-es/_hashGet.js
  1493. /** Used to stand-in for `undefined` hash values. */
  1494. var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
  1495. /** Used to check objects for own properties. */
  1496. var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
  1497. /**
  1498. * Gets the hash value for `key`.
  1499. *
  1500. * @private
  1501. * @name get
  1502. * @memberOf Hash
  1503. * @param {string} key The key of the value to get.
  1504. * @returns {*} Returns the entry value.
  1505. */
  1506. function hashGet(key) {
  1507. var data = this.__data__;
  1508. if (nativeCreate) {
  1509. var result = data[key];
  1510. return result === HASH_UNDEFINED$2 ? void 0 : result;
  1511. }
  1512. return hasOwnProperty$6.call(data, key) ? data[key] : void 0;
  1513. }
  1514. //#endregion
  1515. //#region node_modules/lodash-es/_hashHas.js
  1516. /** Used to check objects for own properties. */
  1517. var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
  1518. /**
  1519. * Checks if a hash value for `key` exists.
  1520. *
  1521. * @private
  1522. * @name has
  1523. * @memberOf Hash
  1524. * @param {string} key The key of the entry to check.
  1525. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1526. */
  1527. function hashHas(key) {
  1528. var data = this.__data__;
  1529. return nativeCreate ? data[key] !== void 0 : hasOwnProperty$5.call(data, key);
  1530. }
  1531. //#endregion
  1532. //#region node_modules/lodash-es/_hashSet.js
  1533. /** Used to stand-in for `undefined` hash values. */
  1534. var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
  1535. /**
  1536. * Sets the hash `key` to `value`.
  1537. *
  1538. * @private
  1539. * @name set
  1540. * @memberOf Hash
  1541. * @param {string} key The key of the value to set.
  1542. * @param {*} value The value to set.
  1543. * @returns {Object} Returns the hash instance.
  1544. */
  1545. function hashSet(key, value) {
  1546. var data = this.__data__;
  1547. this.size += this.has(key) ? 0 : 1;
  1548. data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
  1549. return this;
  1550. }
  1551. //#endregion
  1552. //#region node_modules/lodash-es/_Hash.js
  1553. /**
  1554. * Creates a hash object.
  1555. *
  1556. * @private
  1557. * @constructor
  1558. * @param {Array} [entries] The key-value pairs to cache.
  1559. */
  1560. function Hash(entries) {
  1561. var index = -1, length = entries == null ? 0 : entries.length;
  1562. this.clear();
  1563. while (++index < length) {
  1564. var entry = entries[index];
  1565. this.set(entry[0], entry[1]);
  1566. }
  1567. }
  1568. Hash.prototype.clear = hashClear;
  1569. Hash.prototype["delete"] = hashDelete;
  1570. Hash.prototype.get = hashGet;
  1571. Hash.prototype.has = hashHas;
  1572. Hash.prototype.set = hashSet;
  1573. //#endregion
  1574. //#region node_modules/lodash-es/_listCacheClear.js
  1575. /**
  1576. * Removes all key-value entries from the list cache.
  1577. *
  1578. * @private
  1579. * @name clear
  1580. * @memberOf ListCache
  1581. */
  1582. function listCacheClear() {
  1583. this.__data__ = [];
  1584. this.size = 0;
  1585. }
  1586. //#endregion
  1587. //#region node_modules/lodash-es/_assocIndexOf.js
  1588. /**
  1589. * Gets the index at which the `key` is found in `array` of key-value pairs.
  1590. *
  1591. * @private
  1592. * @param {Array} array The array to inspect.
  1593. * @param {*} key The key to search for.
  1594. * @returns {number} Returns the index of the matched value, else `-1`.
  1595. */
  1596. function assocIndexOf(array, key) {
  1597. var length = array.length;
  1598. while (length--) if (eq(array[length][0], key)) return length;
  1599. return -1;
  1600. }
  1601. //#endregion
  1602. //#region node_modules/lodash-es/_listCacheDelete.js
  1603. /** Built-in value references. */
  1604. var splice = Array.prototype.splice;
  1605. /**
  1606. * Removes `key` and its value from the list cache.
  1607. *
  1608. * @private
  1609. * @name delete
  1610. * @memberOf ListCache
  1611. * @param {string} key The key of the value to remove.
  1612. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1613. */
  1614. function listCacheDelete(key) {
  1615. var data = this.__data__, index = assocIndexOf(data, key);
  1616. if (index < 0) return false;
  1617. if (index == data.length - 1) data.pop();
  1618. else splice.call(data, index, 1);
  1619. --this.size;
  1620. return true;
  1621. }
  1622. //#endregion
  1623. //#region node_modules/lodash-es/_listCacheGet.js
  1624. /**
  1625. * Gets the list cache value for `key`.
  1626. *
  1627. * @private
  1628. * @name get
  1629. * @memberOf ListCache
  1630. * @param {string} key The key of the value to get.
  1631. * @returns {*} Returns the entry value.
  1632. */
  1633. function listCacheGet(key) {
  1634. var data = this.__data__, index = assocIndexOf(data, key);
  1635. return index < 0 ? void 0 : data[index][1];
  1636. }
  1637. //#endregion
  1638. //#region node_modules/lodash-es/_listCacheHas.js
  1639. /**
  1640. * Checks if a list cache value for `key` exists.
  1641. *
  1642. * @private
  1643. * @name has
  1644. * @memberOf ListCache
  1645. * @param {string} key The key of the entry to check.
  1646. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1647. */
  1648. function listCacheHas(key) {
  1649. return assocIndexOf(this.__data__, key) > -1;
  1650. }
  1651. //#endregion
  1652. //#region node_modules/lodash-es/_listCacheSet.js
  1653. /**
  1654. * Sets the list cache `key` to `value`.
  1655. *
  1656. * @private
  1657. * @name set
  1658. * @memberOf ListCache
  1659. * @param {string} key The key of the value to set.
  1660. * @param {*} value The value to set.
  1661. * @returns {Object} Returns the list cache instance.
  1662. */
  1663. function listCacheSet(key, value) {
  1664. var data = this.__data__, index = assocIndexOf(data, key);
  1665. if (index < 0) {
  1666. ++this.size;
  1667. data.push([key, value]);
  1668. } else data[index][1] = value;
  1669. return this;
  1670. }
  1671. //#endregion
  1672. //#region node_modules/lodash-es/_ListCache.js
  1673. /**
  1674. * Creates an list cache object.
  1675. *
  1676. * @private
  1677. * @constructor
  1678. * @param {Array} [entries] The key-value pairs to cache.
  1679. */
  1680. function ListCache(entries) {
  1681. var index = -1, length = entries == null ? 0 : entries.length;
  1682. this.clear();
  1683. while (++index < length) {
  1684. var entry = entries[index];
  1685. this.set(entry[0], entry[1]);
  1686. }
  1687. }
  1688. ListCache.prototype.clear = listCacheClear;
  1689. ListCache.prototype["delete"] = listCacheDelete;
  1690. ListCache.prototype.get = listCacheGet;
  1691. ListCache.prototype.has = listCacheHas;
  1692. ListCache.prototype.set = listCacheSet;
  1693. //#endregion
  1694. //#region node_modules/lodash-es/_Map.js
  1695. var Map$1 = getNative(root, "Map");
  1696. //#endregion
  1697. //#region node_modules/lodash-es/_mapCacheClear.js
  1698. /**
  1699. * Removes all key-value entries from the map.
  1700. *
  1701. * @private
  1702. * @name clear
  1703. * @memberOf MapCache
  1704. */
  1705. function mapCacheClear() {
  1706. this.size = 0;
  1707. this.__data__ = {
  1708. "hash": new Hash(),
  1709. "map": new (Map$1 || ListCache)(),
  1710. "string": new Hash()
  1711. };
  1712. }
  1713. //#endregion
  1714. //#region node_modules/lodash-es/_isKeyable.js
  1715. /**
  1716. * Checks if `value` is suitable for use as unique object key.
  1717. *
  1718. * @private
  1719. * @param {*} value The value to check.
  1720. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  1721. */
  1722. function isKeyable(value) {
  1723. var type = typeof value;
  1724. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  1725. }
  1726. //#endregion
  1727. //#region node_modules/lodash-es/_getMapData.js
  1728. /**
  1729. * Gets the data for `map`.
  1730. *
  1731. * @private
  1732. * @param {Object} map The map to query.
  1733. * @param {string} key The reference key.
  1734. * @returns {*} Returns the map data.
  1735. */
  1736. function getMapData(map, key) {
  1737. var data = map.__data__;
  1738. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  1739. }
  1740. //#endregion
  1741. //#region node_modules/lodash-es/_mapCacheDelete.js
  1742. /**
  1743. * Removes `key` and its value from the map.
  1744. *
  1745. * @private
  1746. * @name delete
  1747. * @memberOf MapCache
  1748. * @param {string} key The key of the value to remove.
  1749. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1750. */
  1751. function mapCacheDelete(key) {
  1752. var result = getMapData(this, key)["delete"](key);
  1753. this.size -= result ? 1 : 0;
  1754. return result;
  1755. }
  1756. //#endregion
  1757. //#region node_modules/lodash-es/_mapCacheGet.js
  1758. /**
  1759. * Gets the map value for `key`.
  1760. *
  1761. * @private
  1762. * @name get
  1763. * @memberOf MapCache
  1764. * @param {string} key The key of the value to get.
  1765. * @returns {*} Returns the entry value.
  1766. */
  1767. function mapCacheGet(key) {
  1768. return getMapData(this, key).get(key);
  1769. }
  1770. //#endregion
  1771. //#region node_modules/lodash-es/_mapCacheHas.js
  1772. /**
  1773. * Checks if a map value for `key` exists.
  1774. *
  1775. * @private
  1776. * @name has
  1777. * @memberOf MapCache
  1778. * @param {string} key The key of the entry to check.
  1779. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1780. */
  1781. function mapCacheHas(key) {
  1782. return getMapData(this, key).has(key);
  1783. }
  1784. //#endregion
  1785. //#region node_modules/lodash-es/_mapCacheSet.js
  1786. /**
  1787. * Sets the map `key` to `value`.
  1788. *
  1789. * @private
  1790. * @name set
  1791. * @memberOf MapCache
  1792. * @param {string} key The key of the value to set.
  1793. * @param {*} value The value to set.
  1794. * @returns {Object} Returns the map cache instance.
  1795. */
  1796. function mapCacheSet(key, value) {
  1797. var data = getMapData(this, key), size = data.size;
  1798. data.set(key, value);
  1799. this.size += data.size == size ? 0 : 1;
  1800. return this;
  1801. }
  1802. //#endregion
  1803. //#region node_modules/lodash-es/_MapCache.js
  1804. /**
  1805. * Creates a map cache object to store key-value pairs.
  1806. *
  1807. * @private
  1808. * @constructor
  1809. * @param {Array} [entries] The key-value pairs to cache.
  1810. */
  1811. function MapCache(entries) {
  1812. var index = -1, length = entries == null ? 0 : entries.length;
  1813. this.clear();
  1814. while (++index < length) {
  1815. var entry = entries[index];
  1816. this.set(entry[0], entry[1]);
  1817. }
  1818. }
  1819. MapCache.prototype.clear = mapCacheClear;
  1820. MapCache.prototype["delete"] = mapCacheDelete;
  1821. MapCache.prototype.get = mapCacheGet;
  1822. MapCache.prototype.has = mapCacheHas;
  1823. MapCache.prototype.set = mapCacheSet;
  1824. //#endregion
  1825. //#region node_modules/lodash-es/memoize.js
  1826. /** Error message constants. */
  1827. var FUNC_ERROR_TEXT$2 = "Expected a function";
  1828. /**
  1829. * Creates a function that memoizes the result of `func`. If `resolver` is
  1830. * provided, it determines the cache key for storing the result based on the
  1831. * arguments provided to the memoized function. By default, the first argument
  1832. * provided to the memoized function is used as the map cache key. The `func`
  1833. * is invoked with the `this` binding of the memoized function.
  1834. *
  1835. * **Note:** The cache is exposed as the `cache` property on the memoized
  1836. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  1837. * constructor with one whose instances implement the
  1838. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  1839. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  1840. *
  1841. * @static
  1842. * @memberOf _
  1843. * @since 0.1.0
  1844. * @category Function
  1845. * @param {Function} func The function to have its output memoized.
  1846. * @param {Function} [resolver] The function to resolve the cache key.
  1847. * @returns {Function} Returns the new memoized function.
  1848. * @example
  1849. *
  1850. * var object = { 'a': 1, 'b': 2 };
  1851. * var other = { 'c': 3, 'd': 4 };
  1852. *
  1853. * var values = _.memoize(_.values);
  1854. * values(object);
  1855. * // => [1, 2]
  1856. *
  1857. * values(other);
  1858. * // => [3, 4]
  1859. *
  1860. * object.a = 2;
  1861. * values(object);
  1862. * // => [1, 2]
  1863. *
  1864. * // Modify the result cache.
  1865. * values.cache.set(object, ['a', 'b']);
  1866. * values(object);
  1867. * // => ['a', 'b']
  1868. *
  1869. * // Replace `_.memoize.Cache`.
  1870. * _.memoize.Cache = WeakMap;
  1871. */
  1872. function memoize(func, resolver) {
  1873. if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT$2);
  1874. var memoized = function() {
  1875. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
  1876. if (cache.has(key)) return cache.get(key);
  1877. var result = func.apply(this, args);
  1878. memoized.cache = cache.set(key, result) || cache;
  1879. return result;
  1880. };
  1881. memoized.cache = new (memoize.Cache || MapCache)();
  1882. return memoized;
  1883. }
  1884. memoize.Cache = MapCache;
  1885. //#endregion
  1886. //#region node_modules/lodash-es/_memoizeCapped.js
  1887. /** Used as the maximum memoize cache size. */
  1888. var MAX_MEMOIZE_SIZE = 500;
  1889. /**
  1890. * A specialized version of `_.memoize` which clears the memoized function's
  1891. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  1892. *
  1893. * @private
  1894. * @param {Function} func The function to have its output memoized.
  1895. * @returns {Function} Returns the new memoized function.
  1896. */
  1897. function memoizeCapped(func) {
  1898. var result = memoize(func, function(key) {
  1899. if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
  1900. return key;
  1901. });
  1902. var cache = result.cache;
  1903. return result;
  1904. }
  1905. //#endregion
  1906. //#region node_modules/lodash-es/_stringToPath.js
  1907. /** Used to match property names within property paths. */
  1908. var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1909. /** Used to match backslashes in property paths. */
  1910. var reEscapeChar = /\\(\\)?/g;
  1911. /**
  1912. * Converts `string` to a property path array.
  1913. *
  1914. * @private
  1915. * @param {string} string The string to convert.
  1916. * @returns {Array} Returns the property path array.
  1917. */
  1918. var stringToPath = memoizeCapped(function(string) {
  1919. var result = [];
  1920. if (string.charCodeAt(0) === 46) result.push("");
  1921. string.replace(rePropName, function(match, number, quote, subString) {
  1922. result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
  1923. });
  1924. return result;
  1925. });
  1926. //#endregion
  1927. //#region node_modules/lodash-es/toString.js
  1928. /**
  1929. * Converts `value` to a string. An empty string is returned for `null`
  1930. * and `undefined` values. The sign of `-0` is preserved.
  1931. *
  1932. * @static
  1933. * @memberOf _
  1934. * @since 4.0.0
  1935. * @category Lang
  1936. * @param {*} value The value to convert.
  1937. * @returns {string} Returns the converted string.
  1938. * @example
  1939. *
  1940. * _.toString(null);
  1941. * // => ''
  1942. *
  1943. * _.toString(-0);
  1944. * // => '-0'
  1945. *
  1946. * _.toString([1, 2, 3]);
  1947. * // => '1,2,3'
  1948. */
  1949. function toString$1(value) {
  1950. return value == null ? "" : baseToString(value);
  1951. }
  1952. //#endregion
  1953. //#region node_modules/lodash-es/_castPath.js
  1954. /**
  1955. * Casts `value` to a path array if it's not one.
  1956. *
  1957. * @private
  1958. * @param {*} value The value to inspect.
  1959. * @param {Object} [object] The object to query keys on.
  1960. * @returns {Array} Returns the cast property path array.
  1961. */
  1962. function castPath(value, object) {
  1963. if (isArray(value)) return value;
  1964. return isKey(value, object) ? [value] : stringToPath(toString$1(value));
  1965. }
  1966. //#endregion
  1967. //#region node_modules/lodash-es/_toKey.js
  1968. /** Used as references for various `Number` constants. */
  1969. var INFINITY$1 = Infinity;
  1970. /**
  1971. * Converts `value` to a string key if it's not a string or symbol.
  1972. *
  1973. * @private
  1974. * @param {*} value The value to inspect.
  1975. * @returns {string|symbol} Returns the key.
  1976. */
  1977. function toKey(value) {
  1978. if (typeof value == "string" || isSymbol(value)) return value;
  1979. var result = value + "";
  1980. return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
  1981. }
  1982. //#endregion
  1983. //#region node_modules/lodash-es/_baseGet.js
  1984. /**
  1985. * The base implementation of `_.get` without support for default values.
  1986. *
  1987. * @private
  1988. * @param {Object} object The object to query.
  1989. * @param {Array|string} path The path of the property to get.
  1990. * @returns {*} Returns the resolved value.
  1991. */
  1992. function baseGet(object, path) {
  1993. path = castPath(path, object);
  1994. var index = 0, length = path.length;
  1995. while (object != null && index < length) object = object[toKey(path[index++])];
  1996. return index && index == length ? object : void 0;
  1997. }
  1998. //#endregion
  1999. //#region node_modules/lodash-es/get.js
  2000. /**
  2001. * Gets the value at `path` of `object`. If the resolved value is
  2002. * `undefined`, the `defaultValue` is returned in its place.
  2003. *
  2004. * @static
  2005. * @memberOf _
  2006. * @since 3.7.0
  2007. * @category Object
  2008. * @param {Object} object The object to query.
  2009. * @param {Array|string} path The path of the property to get.
  2010. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  2011. * @returns {*} Returns the resolved value.
  2012. * @example
  2013. *
  2014. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  2015. *
  2016. * _.get(object, 'a[0].b.c');
  2017. * // => 3
  2018. *
  2019. * _.get(object, ['a', '0', 'b', 'c']);
  2020. * // => 3
  2021. *
  2022. * _.get(object, 'a.b.c', 'default');
  2023. * // => 'default'
  2024. */
  2025. function get(object, path, defaultValue) {
  2026. var result = object == null ? void 0 : baseGet(object, path);
  2027. return result === void 0 ? defaultValue : result;
  2028. }
  2029. //#endregion
  2030. //#region node_modules/lodash-es/_arrayPush.js
  2031. /**
  2032. * Appends the elements of `values` to `array`.
  2033. *
  2034. * @private
  2035. * @param {Array} array The array to modify.
  2036. * @param {Array} values The values to append.
  2037. * @returns {Array} Returns `array`.
  2038. */
  2039. function arrayPush(array, values) {
  2040. var index = -1, length = values.length, offset = array.length;
  2041. while (++index < length) array[offset + index] = values[index];
  2042. return array;
  2043. }
  2044. //#endregion
  2045. //#region node_modules/lodash-es/_isFlattenable.js
  2046. /** Built-in value references. */
  2047. var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
  2048. /**
  2049. * Checks if `value` is a flattenable `arguments` object or array.
  2050. *
  2051. * @private
  2052. * @param {*} value The value to check.
  2053. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  2054. */
  2055. function isFlattenable(value) {
  2056. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  2057. }
  2058. //#endregion
  2059. //#region node_modules/lodash-es/_baseFlatten.js
  2060. /**
  2061. * The base implementation of `_.flatten` with support for restricting flattening.
  2062. *
  2063. * @private
  2064. * @param {Array} array The array to flatten.
  2065. * @param {number} depth The maximum recursion depth.
  2066. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  2067. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  2068. * @param {Array} [result=[]] The initial result value.
  2069. * @returns {Array} Returns the new flattened array.
  2070. */
  2071. function baseFlatten(array, depth, predicate, isStrict, result) {
  2072. var index = -1, length = array.length;
  2073. predicate || (predicate = isFlattenable);
  2074. result || (result = []);
  2075. while (++index < length) {
  2076. var value = array[index];
  2077. if (depth > 0 && predicate(value)) if (depth > 1) baseFlatten(value, depth - 1, predicate, isStrict, result);
  2078. else arrayPush(result, value);
  2079. else if (!isStrict) result[result.length] = value;
  2080. }
  2081. return result;
  2082. }
  2083. //#endregion
  2084. //#region node_modules/lodash-es/flatten.js
  2085. /**
  2086. * Flattens `array` a single level deep.
  2087. *
  2088. * @static
  2089. * @memberOf _
  2090. * @since 0.1.0
  2091. * @category Array
  2092. * @param {Array} array The array to flatten.
  2093. * @returns {Array} Returns the new flattened array.
  2094. * @example
  2095. *
  2096. * _.flatten([1, [2, [3, [4]], 5]]);
  2097. * // => [1, 2, [3, [4]], 5]
  2098. */
  2099. function flatten(array) {
  2100. return (array == null ? 0 : array.length) ? baseFlatten(array, 1) : [];
  2101. }
  2102. //#endregion
  2103. //#region node_modules/lodash-es/_flatRest.js
  2104. /**
  2105. * A specialized version of `baseRest` which flattens the rest array.
  2106. *
  2107. * @private
  2108. * @param {Function} func The function to apply a rest parameter to.
  2109. * @returns {Function} Returns the new function.
  2110. */
  2111. function flatRest(func) {
  2112. return setToString(overRest(func, void 0, flatten), func + "");
  2113. }
  2114. //#endregion
  2115. //#region node_modules/lodash-es/_getPrototype.js
  2116. /** Built-in value references. */
  2117. var getPrototype = overArg(Object.getPrototypeOf, Object);
  2118. //#endregion
  2119. //#region node_modules/lodash-es/isPlainObject.js
  2120. /** `Object#toString` result references. */
  2121. var objectTag$3 = "[object Object]";
  2122. /** Used for built-in method references. */
  2123. var funcProto = Function.prototype, objectProto = Object.prototype;
  2124. /** Used to resolve the decompiled source of functions. */
  2125. var funcToString = funcProto.toString;
  2126. /** Used to check objects for own properties. */
  2127. var hasOwnProperty$4 = objectProto.hasOwnProperty;
  2128. /** Used to infer the `Object` constructor. */
  2129. var objectCtorString = funcToString.call(Object);
  2130. /**
  2131. * Checks if `value` is a plain object, that is, an object created by the
  2132. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  2133. *
  2134. * @static
  2135. * @memberOf _
  2136. * @since 0.8.0
  2137. * @category Lang
  2138. * @param {*} value The value to check.
  2139. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  2140. * @example
  2141. *
  2142. * function Foo() {
  2143. * this.a = 1;
  2144. * }
  2145. *
  2146. * _.isPlainObject(new Foo);
  2147. * // => false
  2148. *
  2149. * _.isPlainObject([1, 2, 3]);
  2150. * // => false
  2151. *
  2152. * _.isPlainObject({ 'x': 0, 'y': 0 });
  2153. * // => true
  2154. *
  2155. * _.isPlainObject(Object.create(null));
  2156. * // => true
  2157. */
  2158. function isPlainObject(value) {
  2159. if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) return false;
  2160. var proto = getPrototype(value);
  2161. if (proto === null) return true;
  2162. var Ctor = hasOwnProperty$4.call(proto, "constructor") && proto.constructor;
  2163. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  2164. }
  2165. //#endregion
  2166. //#region node_modules/lodash-es/_baseSlice.js
  2167. /**
  2168. * The base implementation of `_.slice` without an iteratee call guard.
  2169. *
  2170. * @private
  2171. * @param {Array} array The array to slice.
  2172. * @param {number} [start=0] The start position.
  2173. * @param {number} [end=array.length] The end position.
  2174. * @returns {Array} Returns the slice of `array`.
  2175. */
  2176. function baseSlice(array, start, end) {
  2177. var index = -1, length = array.length;
  2178. if (start < 0) start = -start > length ? 0 : length + start;
  2179. end = end > length ? length : end;
  2180. if (end < 0) end += length;
  2181. length = start > end ? 0 : end - start >>> 0;
  2182. start >>>= 0;
  2183. var result = Array(length);
  2184. while (++index < length) result[index] = array[index + start];
  2185. return result;
  2186. }
  2187. //#endregion
  2188. //#region node_modules/lodash-es/castArray.js
  2189. /**
  2190. * Casts `value` as an array if it's not one.
  2191. *
  2192. * @static
  2193. * @memberOf _
  2194. * @since 4.4.0
  2195. * @category Lang
  2196. * @param {*} value The value to inspect.
  2197. * @returns {Array} Returns the cast array.
  2198. * @example
  2199. *
  2200. * _.castArray(1);
  2201. * // => [1]
  2202. *
  2203. * _.castArray({ 'a': 1 });
  2204. * // => [{ 'a': 1 }]
  2205. *
  2206. * _.castArray('abc');
  2207. * // => ['abc']
  2208. *
  2209. * _.castArray(null);
  2210. * // => [null]
  2211. *
  2212. * _.castArray(undefined);
  2213. * // => [undefined]
  2214. *
  2215. * _.castArray();
  2216. * // => []
  2217. *
  2218. * var array = [1, 2, 3];
  2219. * console.log(_.castArray(array) === array);
  2220. * // => true
  2221. */
  2222. function castArray$1() {
  2223. if (!arguments.length) return [];
  2224. var value = arguments[0];
  2225. return isArray(value) ? value : [value];
  2226. }
  2227. //#endregion
  2228. //#region node_modules/lodash-es/_baseClamp.js
  2229. /**
  2230. * The base implementation of `_.clamp` which doesn't coerce arguments.
  2231. *
  2232. * @private
  2233. * @param {number} number The number to clamp.
  2234. * @param {number} [lower] The lower bound.
  2235. * @param {number} upper The upper bound.
  2236. * @returns {number} Returns the clamped number.
  2237. */
  2238. function baseClamp(number, lower, upper) {
  2239. if (number === number) {
  2240. if (upper !== void 0) number = number <= upper ? number : upper;
  2241. if (lower !== void 0) number = number >= lower ? number : lower;
  2242. }
  2243. return number;
  2244. }
  2245. //#endregion
  2246. //#region node_modules/lodash-es/clamp.js
  2247. /**
  2248. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  2249. *
  2250. * @static
  2251. * @memberOf _
  2252. * @since 4.0.0
  2253. * @category Number
  2254. * @param {number} number The number to clamp.
  2255. * @param {number} [lower] The lower bound.
  2256. * @param {number} upper The upper bound.
  2257. * @returns {number} Returns the clamped number.
  2258. * @example
  2259. *
  2260. * _.clamp(-10, -5, 5);
  2261. * // => -5
  2262. *
  2263. * _.clamp(10, -5, 5);
  2264. * // => 5
  2265. */
  2266. function clamp$2(number, lower, upper) {
  2267. if (upper === void 0) {
  2268. upper = lower;
  2269. lower = void 0;
  2270. }
  2271. if (upper !== void 0) {
  2272. upper = toNumber(upper);
  2273. upper = upper === upper ? upper : 0;
  2274. }
  2275. if (lower !== void 0) {
  2276. lower = toNumber(lower);
  2277. lower = lower === lower ? lower : 0;
  2278. }
  2279. return baseClamp(toNumber(number), lower, upper);
  2280. }
  2281. //#endregion
  2282. //#region node_modules/lodash-es/_stackClear.js
  2283. /**
  2284. * Removes all key-value entries from the stack.
  2285. *
  2286. * @private
  2287. * @name clear
  2288. * @memberOf Stack
  2289. */
  2290. function stackClear() {
  2291. this.__data__ = new ListCache();
  2292. this.size = 0;
  2293. }
  2294. //#endregion
  2295. //#region node_modules/lodash-es/_stackDelete.js
  2296. /**
  2297. * Removes `key` and its value from the stack.
  2298. *
  2299. * @private
  2300. * @name delete
  2301. * @memberOf Stack
  2302. * @param {string} key The key of the value to remove.
  2303. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  2304. */
  2305. function stackDelete(key) {
  2306. var data = this.__data__, result = data["delete"](key);
  2307. this.size = data.size;
  2308. return result;
  2309. }
  2310. //#endregion
  2311. //#region node_modules/lodash-es/_stackGet.js
  2312. /**
  2313. * Gets the stack value for `key`.
  2314. *
  2315. * @private
  2316. * @name get
  2317. * @memberOf Stack
  2318. * @param {string} key The key of the value to get.
  2319. * @returns {*} Returns the entry value.
  2320. */
  2321. function stackGet(key) {
  2322. return this.__data__.get(key);
  2323. }
  2324. //#endregion
  2325. //#region node_modules/lodash-es/_stackHas.js
  2326. /**
  2327. * Checks if a stack value for `key` exists.
  2328. *
  2329. * @private
  2330. * @name has
  2331. * @memberOf Stack
  2332. * @param {string} key The key of the entry to check.
  2333. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2334. */
  2335. function stackHas(key) {
  2336. return this.__data__.has(key);
  2337. }
  2338. //#endregion
  2339. //#region node_modules/lodash-es/_stackSet.js
  2340. /** Used as the size to enable large array optimizations. */
  2341. var LARGE_ARRAY_SIZE$1 = 200;
  2342. /**
  2343. * Sets the stack `key` to `value`.
  2344. *
  2345. * @private
  2346. * @name set
  2347. * @memberOf Stack
  2348. * @param {string} key The key of the value to set.
  2349. * @param {*} value The value to set.
  2350. * @returns {Object} Returns the stack cache instance.
  2351. */
  2352. function stackSet(key, value) {
  2353. var data = this.__data__;
  2354. if (data instanceof ListCache) {
  2355. var pairs = data.__data__;
  2356. if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
  2357. pairs.push([key, value]);
  2358. this.size = ++data.size;
  2359. return this;
  2360. }
  2361. data = this.__data__ = new MapCache(pairs);
  2362. }
  2363. data.set(key, value);
  2364. this.size = data.size;
  2365. return this;
  2366. }
  2367. //#endregion
  2368. //#region node_modules/lodash-es/_Stack.js
  2369. /**
  2370. * Creates a stack cache object to store key-value pairs.
  2371. *
  2372. * @private
  2373. * @constructor
  2374. * @param {Array} [entries] The key-value pairs to cache.
  2375. */
  2376. function Stack(entries) {
  2377. var data = this.__data__ = new ListCache(entries);
  2378. this.size = data.size;
  2379. }
  2380. Stack.prototype.clear = stackClear;
  2381. Stack.prototype["delete"] = stackDelete;
  2382. Stack.prototype.get = stackGet;
  2383. Stack.prototype.has = stackHas;
  2384. Stack.prototype.set = stackSet;
  2385. //#endregion
  2386. //#region node_modules/lodash-es/_baseAssign.js
  2387. /**
  2388. * The base implementation of `_.assign` without support for multiple sources
  2389. * or `customizer` functions.
  2390. *
  2391. * @private
  2392. * @param {Object} object The destination object.
  2393. * @param {Object} source The source object.
  2394. * @returns {Object} Returns `object`.
  2395. */
  2396. function baseAssign(object, source) {
  2397. return object && copyObject(source, keys(source), object);
  2398. }
  2399. //#endregion
  2400. //#region node_modules/lodash-es/_baseAssignIn.js
  2401. /**
  2402. * The base implementation of `_.assignIn` without support for multiple sources
  2403. * or `customizer` functions.
  2404. *
  2405. * @private
  2406. * @param {Object} object The destination object.
  2407. * @param {Object} source The source object.
  2408. * @returns {Object} Returns `object`.
  2409. */
  2410. function baseAssignIn(object, source) {
  2411. return object && copyObject(source, keysIn(source), object);
  2412. }
  2413. //#endregion
  2414. //#region node_modules/lodash-es/_cloneBuffer.js
  2415. /** Detect free variable `exports`. */
  2416. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  2417. /** Detect free variable `module`. */
  2418. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  2419. /** Built-in value references. */
  2420. var Buffer = freeModule && freeModule.exports === freeExports ? root.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
  2421. /**
  2422. * Creates a clone of `buffer`.
  2423. *
  2424. * @private
  2425. * @param {Buffer} buffer The buffer to clone.
  2426. * @param {boolean} [isDeep] Specify a deep clone.
  2427. * @returns {Buffer} Returns the cloned buffer.
  2428. */
  2429. function cloneBuffer(buffer, isDeep) {
  2430. if (isDeep) return buffer.slice();
  2431. var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  2432. buffer.copy(result);
  2433. return result;
  2434. }
  2435. //#endregion
  2436. //#region node_modules/lodash-es/_arrayFilter.js
  2437. /**
  2438. * A specialized version of `_.filter` for arrays without support for
  2439. * iteratee shorthands.
  2440. *
  2441. * @private
  2442. * @param {Array} [array] The array to iterate over.
  2443. * @param {Function} predicate The function invoked per iteration.
  2444. * @returns {Array} Returns the new filtered array.
  2445. */
  2446. function arrayFilter(array, predicate) {
  2447. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  2448. while (++index < length) {
  2449. var value = array[index];
  2450. if (predicate(value, index, array)) result[resIndex++] = value;
  2451. }
  2452. return result;
  2453. }
  2454. //#endregion
  2455. //#region node_modules/lodash-es/stubArray.js
  2456. /**
  2457. * This method returns a new empty array.
  2458. *
  2459. * @static
  2460. * @memberOf _
  2461. * @since 4.13.0
  2462. * @category Util
  2463. * @returns {Array} Returns the new empty array.
  2464. * @example
  2465. *
  2466. * var arrays = _.times(2, _.stubArray);
  2467. *
  2468. * console.log(arrays);
  2469. * // => [[], []]
  2470. *
  2471. * console.log(arrays[0] === arrays[1]);
  2472. * // => false
  2473. */
  2474. function stubArray() {
  2475. return [];
  2476. }
  2477. //#endregion
  2478. //#region node_modules/lodash-es/_getSymbols.js
  2479. /** Built-in value references. */
  2480. var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
  2481. var nativeGetSymbols = Object.getOwnPropertySymbols;
  2482. /**
  2483. * Creates an array of the own enumerable symbols of `object`.
  2484. *
  2485. * @private
  2486. * @param {Object} object The object to query.
  2487. * @returns {Array} Returns the array of symbols.
  2488. */
  2489. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  2490. if (object == null) return [];
  2491. object = Object(object);
  2492. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  2493. return propertyIsEnumerable.call(object, symbol);
  2494. });
  2495. };
  2496. //#endregion
  2497. //#region node_modules/lodash-es/_copySymbols.js
  2498. /**
  2499. * Copies own symbols of `source` to `object`.
  2500. *
  2501. * @private
  2502. * @param {Object} source The object to copy symbols from.
  2503. * @param {Object} [object={}] The object to copy symbols to.
  2504. * @returns {Object} Returns `object`.
  2505. */
  2506. function copySymbols(source, object) {
  2507. return copyObject(source, getSymbols(source), object);
  2508. }
  2509. //#endregion
  2510. //#region node_modules/lodash-es/_getSymbolsIn.js
  2511. /**
  2512. * Creates an array of the own and inherited enumerable symbols of `object`.
  2513. *
  2514. * @private
  2515. * @param {Object} object The object to query.
  2516. * @returns {Array} Returns the array of symbols.
  2517. */
  2518. var getSymbolsIn = !Object.getOwnPropertySymbols ? stubArray : function(object) {
  2519. var result = [];
  2520. while (object) {
  2521. arrayPush(result, getSymbols(object));
  2522. object = getPrototype(object);
  2523. }
  2524. return result;
  2525. };
  2526. //#endregion
  2527. //#region node_modules/lodash-es/_copySymbolsIn.js
  2528. /**
  2529. * Copies own and inherited symbols of `source` to `object`.
  2530. *
  2531. * @private
  2532. * @param {Object} source The object to copy symbols from.
  2533. * @param {Object} [object={}] The object to copy symbols to.
  2534. * @returns {Object} Returns `object`.
  2535. */
  2536. function copySymbolsIn(source, object) {
  2537. return copyObject(source, getSymbolsIn(source), object);
  2538. }
  2539. //#endregion
  2540. //#region node_modules/lodash-es/_baseGetAllKeys.js
  2541. /**
  2542. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  2543. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  2544. * symbols of `object`.
  2545. *
  2546. * @private
  2547. * @param {Object} object The object to query.
  2548. * @param {Function} keysFunc The function to get the keys of `object`.
  2549. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  2550. * @returns {Array} Returns the array of property names and symbols.
  2551. */
  2552. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  2553. var result = keysFunc(object);
  2554. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  2555. }
  2556. //#endregion
  2557. //#region node_modules/lodash-es/_getAllKeys.js
  2558. /**
  2559. * Creates an array of own enumerable property names and symbols of `object`.
  2560. *
  2561. * @private
  2562. * @param {Object} object The object to query.
  2563. * @returns {Array} Returns the array of property names and symbols.
  2564. */
  2565. function getAllKeys(object) {
  2566. return baseGetAllKeys(object, keys, getSymbols);
  2567. }
  2568. //#endregion
  2569. //#region node_modules/lodash-es/_getAllKeysIn.js
  2570. /**
  2571. * Creates an array of own and inherited enumerable property names and
  2572. * symbols of `object`.
  2573. *
  2574. * @private
  2575. * @param {Object} object The object to query.
  2576. * @returns {Array} Returns the array of property names and symbols.
  2577. */
  2578. function getAllKeysIn(object) {
  2579. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  2580. }
  2581. //#endregion
  2582. //#region node_modules/lodash-es/_DataView.js
  2583. var DataView = getNative(root, "DataView");
  2584. //#endregion
  2585. //#region node_modules/lodash-es/_Promise.js
  2586. var Promise$1 = getNative(root, "Promise");
  2587. //#endregion
  2588. //#region node_modules/lodash-es/_Set.js
  2589. var Set$1 = getNative(root, "Set");
  2590. //#endregion
  2591. //#region node_modules/lodash-es/_getTag.js
  2592. /** `Object#toString` result references. */
  2593. var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
  2594. var dataViewTag$3 = "[object DataView]";
  2595. /** Used to detect maps, sets, and weakmaps. */
  2596. var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
  2597. /**
  2598. * Gets the `toStringTag` of `value`.
  2599. *
  2600. * @private
  2601. * @param {*} value The value to query.
  2602. * @returns {string} Returns the `toStringTag`.
  2603. */
  2604. var getTag = baseGetTag;
  2605. if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$4 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) getTag = function(value) {
  2606. var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
  2607. if (ctorString) switch (ctorString) {
  2608. case dataViewCtorString: return dataViewTag$3;
  2609. case mapCtorString: return mapTag$4;
  2610. case promiseCtorString: return promiseTag;
  2611. case setCtorString: return setTag$4;
  2612. case weakMapCtorString: return weakMapTag$1;
  2613. }
  2614. return result;
  2615. };
  2616. var _getTag_default = getTag;
  2617. //#endregion
  2618. //#region node_modules/lodash-es/_initCloneArray.js
  2619. /** Used to check objects for own properties. */
  2620. var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
  2621. /**
  2622. * Initializes an array clone.
  2623. *
  2624. * @private
  2625. * @param {Array} array The array to clone.
  2626. * @returns {Array} Returns the initialized clone.
  2627. */
  2628. function initCloneArray(array) {
  2629. var length = array.length, result = new array.constructor(length);
  2630. if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
  2631. result.index = array.index;
  2632. result.input = array.input;
  2633. }
  2634. return result;
  2635. }
  2636. //#endregion
  2637. //#region node_modules/lodash-es/_Uint8Array.js
  2638. /** Built-in value references. */
  2639. var Uint8Array$1 = root.Uint8Array;
  2640. //#endregion
  2641. //#region node_modules/lodash-es/_cloneArrayBuffer.js
  2642. /**
  2643. * Creates a clone of `arrayBuffer`.
  2644. *
  2645. * @private
  2646. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  2647. * @returns {ArrayBuffer} Returns the cloned array buffer.
  2648. */
  2649. function cloneArrayBuffer(arrayBuffer) {
  2650. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  2651. new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
  2652. return result;
  2653. }
  2654. //#endregion
  2655. //#region node_modules/lodash-es/_cloneDataView.js
  2656. /**
  2657. * Creates a clone of `dataView`.
  2658. *
  2659. * @private
  2660. * @param {Object} dataView The data view to clone.
  2661. * @param {boolean} [isDeep] Specify a deep clone.
  2662. * @returns {Object} Returns the cloned data view.
  2663. */
  2664. function cloneDataView(dataView, isDeep) {
  2665. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  2666. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  2667. }
  2668. //#endregion
  2669. //#region node_modules/lodash-es/_cloneRegExp.js
  2670. /** Used to match `RegExp` flags from their coerced string values. */
  2671. var reFlags = /\w*$/;
  2672. /**
  2673. * Creates a clone of `regexp`.
  2674. *
  2675. * @private
  2676. * @param {Object} regexp The regexp to clone.
  2677. * @returns {Object} Returns the cloned regexp.
  2678. */
  2679. function cloneRegExp(regexp) {
  2680. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  2681. result.lastIndex = regexp.lastIndex;
  2682. return result;
  2683. }
  2684. //#endregion
  2685. //#region node_modules/lodash-es/_cloneSymbol.js
  2686. /** Used to convert symbols to primitives and strings. */
  2687. var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
  2688. /**
  2689. * Creates a clone of the `symbol` object.
  2690. *
  2691. * @private
  2692. * @param {Object} symbol The symbol object to clone.
  2693. * @returns {Object} Returns the cloned symbol object.
  2694. */
  2695. function cloneSymbol(symbol) {
  2696. return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
  2697. }
  2698. //#endregion
  2699. //#region node_modules/lodash-es/_cloneTypedArray.js
  2700. /**
  2701. * Creates a clone of `typedArray`.
  2702. *
  2703. * @private
  2704. * @param {Object} typedArray The typed array to clone.
  2705. * @param {boolean} [isDeep] Specify a deep clone.
  2706. * @returns {Object} Returns the cloned typed array.
  2707. */
  2708. function cloneTypedArray(typedArray, isDeep) {
  2709. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  2710. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  2711. }
  2712. //#endregion
  2713. //#region node_modules/lodash-es/_initCloneByTag.js
  2714. /** `Object#toString` result references. */
  2715. var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
  2716. var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
  2717. /**
  2718. * Initializes an object clone based on its `toStringTag`.
  2719. *
  2720. * **Note:** This function only supports cloning values with tags of
  2721. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  2722. *
  2723. * @private
  2724. * @param {Object} object The object to clone.
  2725. * @param {string} tag The `toStringTag` of the object to clone.
  2726. * @param {boolean} [isDeep] Specify a deep clone.
  2727. * @returns {Object} Returns the initialized clone.
  2728. */
  2729. function initCloneByTag(object, tag, isDeep) {
  2730. var Ctor = object.constructor;
  2731. switch (tag) {
  2732. case arrayBufferTag$2: return cloneArrayBuffer(object);
  2733. case boolTag$2:
  2734. case dateTag$2: return new Ctor(+object);
  2735. case dataViewTag$2: return cloneDataView(object, isDeep);
  2736. case float32Tag$1:
  2737. case float64Tag$1:
  2738. case int8Tag$1:
  2739. case int16Tag$1:
  2740. case int32Tag$1:
  2741. case uint8Tag$1:
  2742. case uint8ClampedTag$1:
  2743. case uint16Tag$1:
  2744. case uint32Tag$1: return cloneTypedArray(object, isDeep);
  2745. case mapTag$3: return new Ctor();
  2746. case numberTag$2:
  2747. case stringTag$2: return new Ctor(object);
  2748. case regexpTag$2: return cloneRegExp(object);
  2749. case setTag$3: return new Ctor();
  2750. case symbolTag$2: return cloneSymbol(object);
  2751. }
  2752. }
  2753. //#endregion
  2754. //#region node_modules/lodash-es/_initCloneObject.js
  2755. /**
  2756. * Initializes an object clone.
  2757. *
  2758. * @private
  2759. * @param {Object} object The object to clone.
  2760. * @returns {Object} Returns the initialized clone.
  2761. */
  2762. function initCloneObject(object) {
  2763. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  2764. }
  2765. //#endregion
  2766. //#region node_modules/lodash-es/_baseIsMap.js
  2767. /** `Object#toString` result references. */
  2768. var mapTag$2 = "[object Map]";
  2769. /**
  2770. * The base implementation of `_.isMap` without Node.js optimizations.
  2771. *
  2772. * @private
  2773. * @param {*} value The value to check.
  2774. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  2775. */
  2776. function baseIsMap(value) {
  2777. return isObjectLike(value) && _getTag_default(value) == mapTag$2;
  2778. }
  2779. //#endregion
  2780. //#region node_modules/lodash-es/isMap.js
  2781. var nodeIsMap = nodeUtil && nodeUtil.isMap;
  2782. /**
  2783. * Checks if `value` is classified as a `Map` object.
  2784. *
  2785. * @static
  2786. * @memberOf _
  2787. * @since 4.3.0
  2788. * @category Lang
  2789. * @param {*} value The value to check.
  2790. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  2791. * @example
  2792. *
  2793. * _.isMap(new Map);
  2794. * // => true
  2795. *
  2796. * _.isMap(new WeakMap);
  2797. * // => false
  2798. */
  2799. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  2800. //#endregion
  2801. //#region node_modules/lodash-es/_baseIsSet.js
  2802. /** `Object#toString` result references. */
  2803. var setTag$2 = "[object Set]";
  2804. /**
  2805. * The base implementation of `_.isSet` without Node.js optimizations.
  2806. *
  2807. * @private
  2808. * @param {*} value The value to check.
  2809. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  2810. */
  2811. function baseIsSet(value) {
  2812. return isObjectLike(value) && _getTag_default(value) == setTag$2;
  2813. }
  2814. //#endregion
  2815. //#region node_modules/lodash-es/isSet.js
  2816. var nodeIsSet = nodeUtil && nodeUtil.isSet;
  2817. /**
  2818. * Checks if `value` is classified as a `Set` object.
  2819. *
  2820. * @static
  2821. * @memberOf _
  2822. * @since 4.3.0
  2823. * @category Lang
  2824. * @param {*} value The value to check.
  2825. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  2826. * @example
  2827. *
  2828. * _.isSet(new Set);
  2829. * // => true
  2830. *
  2831. * _.isSet(new WeakSet);
  2832. * // => false
  2833. */
  2834. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  2835. //#endregion
  2836. //#region node_modules/lodash-es/_baseClone.js
  2837. /** Used to compose bitmasks for cloning. */
  2838. var CLONE_DEEP_FLAG$2 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$2 = 4;
  2839. /** `Object#toString` result references. */
  2840. var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
  2841. var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
  2842. /** Used to identify `toStringTag` values supported by `_.clone`. */
  2843. var cloneableTags = {};
  2844. cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  2845. cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  2846. /**
  2847. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  2848. * traversed objects.
  2849. *
  2850. * @private
  2851. * @param {*} value The value to clone.
  2852. * @param {boolean} bitmask The bitmask flags.
  2853. * 1 - Deep clone
  2854. * 2 - Flatten inherited properties
  2855. * 4 - Clone symbols
  2856. * @param {Function} [customizer] The function to customize cloning.
  2857. * @param {string} [key] The key of `value`.
  2858. * @param {Object} [object] The parent object of `value`.
  2859. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  2860. * @returns {*} Returns the cloned value.
  2861. */
  2862. function baseClone(value, bitmask, customizer, key, object, stack) {
  2863. var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
  2864. if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
  2865. if (result !== void 0) return result;
  2866. if (!isObject$1(value)) return value;
  2867. var isArr = isArray(value);
  2868. if (isArr) {
  2869. result = initCloneArray(value);
  2870. if (!isDeep) return copyArray(value, result);
  2871. } else {
  2872. var tag = _getTag_default(value), isFunc = tag == funcTag || tag == genTag;
  2873. if (isBuffer(value)) return cloneBuffer(value, isDeep);
  2874. if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
  2875. result = isFlat || isFunc ? {} : initCloneObject(value);
  2876. if (!isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
  2877. } else {
  2878. if (!cloneableTags[tag]) return object ? value : {};
  2879. result = initCloneByTag(value, tag, isDeep);
  2880. }
  2881. }
  2882. stack || (stack = new Stack());
  2883. var stacked = stack.get(value);
  2884. if (stacked) return stacked;
  2885. stack.set(value, result);
  2886. if (isSet(value)) value.forEach(function(subValue) {
  2887. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  2888. });
  2889. else if (isMap(value)) value.forEach(function(subValue, key) {
  2890. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  2891. });
  2892. var props = isArr ? void 0 : (isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys)(value);
  2893. arrayEach(props || value, function(subValue, key) {
  2894. if (props) {
  2895. key = subValue;
  2896. subValue = value[key];
  2897. }
  2898. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  2899. });
  2900. return result;
  2901. }
  2902. //#endregion
  2903. //#region node_modules/lodash-es/cloneDeep.js
  2904. /** Used to compose bitmasks for cloning. */
  2905. var CLONE_DEEP_FLAG$1 = 1, CLONE_SYMBOLS_FLAG$1 = 4;
  2906. /**
  2907. * This method is like `_.clone` except that it recursively clones `value`.
  2908. *
  2909. * @static
  2910. * @memberOf _
  2911. * @since 1.0.0
  2912. * @category Lang
  2913. * @param {*} value The value to recursively clone.
  2914. * @returns {*} Returns the deep cloned value.
  2915. * @see _.clone
  2916. * @example
  2917. *
  2918. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  2919. *
  2920. * var deep = _.cloneDeep(objects);
  2921. * console.log(deep[0] === objects[0]);
  2922. * // => false
  2923. */
  2924. function cloneDeep(value) {
  2925. return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
  2926. }
  2927. //#endregion
  2928. //#region node_modules/lodash-es/_setCacheAdd.js
  2929. /** Used to stand-in for `undefined` hash values. */
  2930. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  2931. /**
  2932. * Adds `value` to the array cache.
  2933. *
  2934. * @private
  2935. * @name add
  2936. * @memberOf SetCache
  2937. * @alias push
  2938. * @param {*} value The value to cache.
  2939. * @returns {Object} Returns the cache instance.
  2940. */
  2941. function setCacheAdd(value) {
  2942. this.__data__.set(value, HASH_UNDEFINED);
  2943. return this;
  2944. }
  2945. //#endregion
  2946. //#region node_modules/lodash-es/_setCacheHas.js
  2947. /**
  2948. * Checks if `value` is in the array cache.
  2949. *
  2950. * @private
  2951. * @name has
  2952. * @memberOf SetCache
  2953. * @param {*} value The value to search for.
  2954. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  2955. */
  2956. function setCacheHas(value) {
  2957. return this.__data__.has(value);
  2958. }
  2959. //#endregion
  2960. //#region node_modules/lodash-es/_SetCache.js
  2961. /**
  2962. *
  2963. * Creates an array cache object to store unique values.
  2964. *
  2965. * @private
  2966. * @constructor
  2967. * @param {Array} [values] The values to cache.
  2968. */
  2969. function SetCache(values) {
  2970. var index = -1, length = values == null ? 0 : values.length;
  2971. this.__data__ = new MapCache();
  2972. while (++index < length) this.add(values[index]);
  2973. }
  2974. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  2975. SetCache.prototype.has = setCacheHas;
  2976. //#endregion
  2977. //#region node_modules/lodash-es/_arraySome.js
  2978. /**
  2979. * A specialized version of `_.some` for arrays without support for iteratee
  2980. * shorthands.
  2981. *
  2982. * @private
  2983. * @param {Array} [array] The array to iterate over.
  2984. * @param {Function} predicate The function invoked per iteration.
  2985. * @returns {boolean} Returns `true` if any element passes the predicate check,
  2986. * else `false`.
  2987. */
  2988. function arraySome(array, predicate) {
  2989. var index = -1, length = array == null ? 0 : array.length;
  2990. while (++index < length) if (predicate(array[index], index, array)) return true;
  2991. return false;
  2992. }
  2993. //#endregion
  2994. //#region node_modules/lodash-es/_cacheHas.js
  2995. /**
  2996. * Checks if a `cache` value for `key` exists.
  2997. *
  2998. * @private
  2999. * @param {Object} cache The cache to query.
  3000. * @param {string} key The key of the entry to check.
  3001. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3002. */
  3003. function cacheHas(cache, key) {
  3004. return cache.has(key);
  3005. }
  3006. //#endregion
  3007. //#region node_modules/lodash-es/_equalArrays.js
  3008. /** Used to compose bitmasks for value comparisons. */
  3009. var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
  3010. /**
  3011. * A specialized version of `baseIsEqualDeep` for arrays with support for
  3012. * partial deep comparisons.
  3013. *
  3014. * @private
  3015. * @param {Array} array The array to compare.
  3016. * @param {Array} other The other array to compare.
  3017. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3018. * @param {Function} customizer The function to customize comparisons.
  3019. * @param {Function} equalFunc The function to determine equivalents of values.
  3020. * @param {Object} stack Tracks traversed `array` and `other` objects.
  3021. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  3022. */
  3023. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  3024. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
  3025. if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
  3026. var arrStacked = stack.get(array);
  3027. var othStacked = stack.get(other);
  3028. if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
  3029. var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
  3030. stack.set(array, other);
  3031. stack.set(other, array);
  3032. while (++index < arrLength) {
  3033. var arrValue = array[index], othValue = other[index];
  3034. if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  3035. if (compared !== void 0) {
  3036. if (compared) continue;
  3037. result = false;
  3038. break;
  3039. }
  3040. if (seen) {
  3041. if (!arraySome(other, function(othValue, othIndex) {
  3042. if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
  3043. })) {
  3044. result = false;
  3045. break;
  3046. }
  3047. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  3048. result = false;
  3049. break;
  3050. }
  3051. }
  3052. stack["delete"](array);
  3053. stack["delete"](other);
  3054. return result;
  3055. }
  3056. //#endregion
  3057. //#region node_modules/lodash-es/_mapToArray.js
  3058. /**
  3059. * Converts `map` to its key-value pairs.
  3060. *
  3061. * @private
  3062. * @param {Object} map The map to convert.
  3063. * @returns {Array} Returns the key-value pairs.
  3064. */
  3065. function mapToArray(map) {
  3066. var index = -1, result = Array(map.size);
  3067. map.forEach(function(value, key) {
  3068. result[++index] = [key, value];
  3069. });
  3070. return result;
  3071. }
  3072. //#endregion
  3073. //#region node_modules/lodash-es/_setToArray.js
  3074. /**
  3075. * Converts `set` to an array of its values.
  3076. *
  3077. * @private
  3078. * @param {Object} set The set to convert.
  3079. * @returns {Array} Returns the values.
  3080. */
  3081. function setToArray(set) {
  3082. var index = -1, result = Array(set.size);
  3083. set.forEach(function(value) {
  3084. result[++index] = value;
  3085. });
  3086. return result;
  3087. }
  3088. //#endregion
  3089. //#region node_modules/lodash-es/_equalByTag.js
  3090. /** Used to compose bitmasks for value comparisons. */
  3091. var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
  3092. /** `Object#toString` result references. */
  3093. var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
  3094. var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
  3095. /** Used to convert symbols to primitives and strings. */
  3096. var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
  3097. /**
  3098. * A specialized version of `baseIsEqualDeep` for comparing objects of
  3099. * the same `toStringTag`.
  3100. *
  3101. * **Note:** This function only supports comparing values with tags of
  3102. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  3103. *
  3104. * @private
  3105. * @param {Object} object The object to compare.
  3106. * @param {Object} other The other object to compare.
  3107. * @param {string} tag The `toStringTag` of the objects to compare.
  3108. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3109. * @param {Function} customizer The function to customize comparisons.
  3110. * @param {Function} equalFunc The function to determine equivalents of values.
  3111. * @param {Object} stack Tracks traversed `object` and `other` objects.
  3112. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  3113. */
  3114. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  3115. switch (tag) {
  3116. case dataViewTag:
  3117. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return false;
  3118. object = object.buffer;
  3119. other = other.buffer;
  3120. case arrayBufferTag:
  3121. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) return false;
  3122. return true;
  3123. case boolTag:
  3124. case dateTag:
  3125. case numberTag: return eq(+object, +other);
  3126. case errorTag: return object.name == other.name && object.message == other.message;
  3127. case regexpTag:
  3128. case stringTag: return object == other + "";
  3129. case mapTag: var convert = mapToArray;
  3130. case setTag:
  3131. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
  3132. convert || (convert = setToArray);
  3133. if (object.size != other.size && !isPartial) return false;
  3134. var stacked = stack.get(object);
  3135. if (stacked) return stacked == other;
  3136. bitmask |= COMPARE_UNORDERED_FLAG$2;
  3137. stack.set(object, other);
  3138. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  3139. stack["delete"](object);
  3140. return result;
  3141. case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
  3142. }
  3143. return false;
  3144. }
  3145. //#endregion
  3146. //#region node_modules/lodash-es/_equalObjects.js
  3147. /** Used to compose bitmasks for value comparisons. */
  3148. var COMPARE_PARTIAL_FLAG$3 = 1;
  3149. /** Used to check objects for own properties. */
  3150. var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  3151. /**
  3152. * A specialized version of `baseIsEqualDeep` for objects with support for
  3153. * partial deep comparisons.
  3154. *
  3155. * @private
  3156. * @param {Object} object The object to compare.
  3157. * @param {Object} other The other object to compare.
  3158. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3159. * @param {Function} customizer The function to customize comparisons.
  3160. * @param {Function} equalFunc The function to determine equivalents of values.
  3161. * @param {Object} stack Tracks traversed `object` and `other` objects.
  3162. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  3163. */
  3164. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  3165. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length;
  3166. if (objLength != getAllKeys(other).length && !isPartial) return false;
  3167. var index = objLength;
  3168. while (index--) {
  3169. var key = objProps[index];
  3170. if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) return false;
  3171. }
  3172. var objStacked = stack.get(object);
  3173. var othStacked = stack.get(other);
  3174. if (objStacked && othStacked) return objStacked == other && othStacked == object;
  3175. var result = true;
  3176. stack.set(object, other);
  3177. stack.set(other, object);
  3178. var skipCtor = isPartial;
  3179. while (++index < objLength) {
  3180. key = objProps[index];
  3181. var objValue = object[key], othValue = other[key];
  3182. if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  3183. if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  3184. result = false;
  3185. break;
  3186. }
  3187. skipCtor || (skipCtor = key == "constructor");
  3188. }
  3189. if (result && !skipCtor) {
  3190. var objCtor = object.constructor, othCtor = other.constructor;
  3191. if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) result = false;
  3192. }
  3193. stack["delete"](object);
  3194. stack["delete"](other);
  3195. return result;
  3196. }
  3197. //#endregion
  3198. //#region node_modules/lodash-es/_baseIsEqualDeep.js
  3199. /** Used to compose bitmasks for value comparisons. */
  3200. var COMPARE_PARTIAL_FLAG$2 = 1;
  3201. /** `Object#toString` result references. */
  3202. var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
  3203. /** Used to check objects for own properties. */
  3204. var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  3205. /**
  3206. * A specialized version of `baseIsEqual` for arrays and objects which performs
  3207. * deep comparisons and tracks traversed objects enabling objects with circular
  3208. * references to be compared.
  3209. *
  3210. * @private
  3211. * @param {Object} object The object to compare.
  3212. * @param {Object} other The other object to compare.
  3213. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  3214. * @param {Function} customizer The function to customize comparisons.
  3215. * @param {Function} equalFunc The function to determine equivalents of values.
  3216. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  3217. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  3218. */
  3219. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  3220. var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : _getTag_default(object), othTag = othIsArr ? arrayTag : _getTag_default(other);
  3221. objTag = objTag == argsTag ? objectTag : objTag;
  3222. othTag = othTag == argsTag ? objectTag : othTag;
  3223. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  3224. if (isSameTag && isBuffer(object)) {
  3225. if (!isBuffer(other)) return false;
  3226. objIsArr = true;
  3227. objIsObj = false;
  3228. }
  3229. if (isSameTag && !objIsObj) {
  3230. stack || (stack = new Stack());
  3231. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  3232. }
  3233. if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
  3234. var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
  3235. if (objIsWrapped || othIsWrapped) {
  3236. var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
  3237. stack || (stack = new Stack());
  3238. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  3239. }
  3240. }
  3241. if (!isSameTag) return false;
  3242. stack || (stack = new Stack());
  3243. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  3244. }
  3245. //#endregion
  3246. //#region node_modules/lodash-es/_baseIsEqual.js
  3247. /**
  3248. * The base implementation of `_.isEqual` which supports partial comparisons
  3249. * and tracks traversed objects.
  3250. *
  3251. * @private
  3252. * @param {*} value The value to compare.
  3253. * @param {*} other The other value to compare.
  3254. * @param {boolean} bitmask The bitmask flags.
  3255. * 1 - Unordered comparison
  3256. * 2 - Partial comparison
  3257. * @param {Function} [customizer] The function to customize comparisons.
  3258. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  3259. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  3260. */
  3261. function baseIsEqual(value, other, bitmask, customizer, stack) {
  3262. if (value === other) return true;
  3263. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
  3264. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  3265. }
  3266. //#endregion
  3267. //#region node_modules/lodash-es/_baseIsMatch.js
  3268. /** Used to compose bitmasks for value comparisons. */
  3269. var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
  3270. /**
  3271. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  3272. *
  3273. * @private
  3274. * @param {Object} object The object to inspect.
  3275. * @param {Object} source The object of property values to match.
  3276. * @param {Array} matchData The property names, values, and compare flags to match.
  3277. * @param {Function} [customizer] The function to customize comparisons.
  3278. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  3279. */
  3280. function baseIsMatch(object, source, matchData, customizer) {
  3281. var index = matchData.length, length = index, noCustomizer = !customizer;
  3282. if (object == null) return !length;
  3283. object = Object(object);
  3284. while (index--) {
  3285. var data = matchData[index];
  3286. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return false;
  3287. }
  3288. while (++index < length) {
  3289. data = matchData[index];
  3290. var key = data[0], objValue = object[key], srcValue = data[1];
  3291. if (noCustomizer && data[2]) {
  3292. if (objValue === void 0 && !(key in object)) return false;
  3293. } else {
  3294. var stack = new Stack();
  3295. if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
  3296. if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) return false;
  3297. }
  3298. }
  3299. return true;
  3300. }
  3301. //#endregion
  3302. //#region node_modules/lodash-es/_isStrictComparable.js
  3303. /**
  3304. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  3305. *
  3306. * @private
  3307. * @param {*} value The value to check.
  3308. * @returns {boolean} Returns `true` if `value` if suitable for strict
  3309. * equality comparisons, else `false`.
  3310. */
  3311. function isStrictComparable(value) {
  3312. return value === value && !isObject$1(value);
  3313. }
  3314. //#endregion
  3315. //#region node_modules/lodash-es/_getMatchData.js
  3316. /**
  3317. * Gets the property names, values, and compare flags of `object`.
  3318. *
  3319. * @private
  3320. * @param {Object} object The object to query.
  3321. * @returns {Array} Returns the match data of `object`.
  3322. */
  3323. function getMatchData(object) {
  3324. var result = keys(object), length = result.length;
  3325. while (length--) {
  3326. var key = result[length], value = object[key];
  3327. result[length] = [
  3328. key,
  3329. value,
  3330. isStrictComparable(value)
  3331. ];
  3332. }
  3333. return result;
  3334. }
  3335. //#endregion
  3336. //#region node_modules/lodash-es/_matchesStrictComparable.js
  3337. /**
  3338. * A specialized version of `matchesProperty` for source values suitable
  3339. * for strict equality comparisons, i.e. `===`.
  3340. *
  3341. * @private
  3342. * @param {string} key The key of the property to get.
  3343. * @param {*} srcValue The value to match.
  3344. * @returns {Function} Returns the new spec function.
  3345. */
  3346. function matchesStrictComparable(key, srcValue) {
  3347. return function(object) {
  3348. if (object == null) return false;
  3349. return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
  3350. };
  3351. }
  3352. //#endregion
  3353. //#region node_modules/lodash-es/_baseMatches.js
  3354. /**
  3355. * The base implementation of `_.matches` which doesn't clone `source`.
  3356. *
  3357. * @private
  3358. * @param {Object} source The object of property values to match.
  3359. * @returns {Function} Returns the new spec function.
  3360. */
  3361. function baseMatches(source) {
  3362. var matchData = getMatchData(source);
  3363. if (matchData.length == 1 && matchData[0][2]) return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  3364. return function(object) {
  3365. return object === source || baseIsMatch(object, source, matchData);
  3366. };
  3367. }
  3368. //#endregion
  3369. //#region node_modules/lodash-es/_baseHasIn.js
  3370. /**
  3371. * The base implementation of `_.hasIn` without support for deep paths.
  3372. *
  3373. * @private
  3374. * @param {Object} [object] The object to query.
  3375. * @param {Array|string} key The key to check.
  3376. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  3377. */
  3378. function baseHasIn(object, key) {
  3379. return object != null && key in Object(object);
  3380. }
  3381. //#endregion
  3382. //#region node_modules/lodash-es/_hasPath.js
  3383. /**
  3384. * Checks if `path` exists on `object`.
  3385. *
  3386. * @private
  3387. * @param {Object} object The object to query.
  3388. * @param {Array|string} path The path to check.
  3389. * @param {Function} hasFunc The function to check properties.
  3390. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  3391. */
  3392. function hasPath(object, path, hasFunc) {
  3393. path = castPath(path, object);
  3394. var index = -1, length = path.length, result = false;
  3395. while (++index < length) {
  3396. var key = toKey(path[index]);
  3397. if (!(result = object != null && hasFunc(object, key))) break;
  3398. object = object[key];
  3399. }
  3400. if (result || ++index != length) return result;
  3401. length = object == null ? 0 : object.length;
  3402. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  3403. }
  3404. //#endregion
  3405. //#region node_modules/lodash-es/hasIn.js
  3406. /**
  3407. * Checks if `path` is a direct or inherited property of `object`.
  3408. *
  3409. * @static
  3410. * @memberOf _
  3411. * @since 4.0.0
  3412. * @category Object
  3413. * @param {Object} object The object to query.
  3414. * @param {Array|string} path The path to check.
  3415. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  3416. * @example
  3417. *
  3418. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  3419. *
  3420. * _.hasIn(object, 'a');
  3421. * // => true
  3422. *
  3423. * _.hasIn(object, 'a.b');
  3424. * // => true
  3425. *
  3426. * _.hasIn(object, ['a', 'b']);
  3427. * // => true
  3428. *
  3429. * _.hasIn(object, 'b');
  3430. * // => false
  3431. */
  3432. function hasIn(object, path) {
  3433. return object != null && hasPath(object, path, baseHasIn);
  3434. }
  3435. //#endregion
  3436. //#region node_modules/lodash-es/_baseMatchesProperty.js
  3437. /** Used to compose bitmasks for value comparisons. */
  3438. var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
  3439. /**
  3440. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  3441. *
  3442. * @private
  3443. * @param {string} path The path of the property to get.
  3444. * @param {*} srcValue The value to match.
  3445. * @returns {Function} Returns the new spec function.
  3446. */
  3447. function baseMatchesProperty(path, srcValue) {
  3448. if (isKey(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey(path), srcValue);
  3449. return function(object) {
  3450. var objValue = get(object, path);
  3451. return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  3452. };
  3453. }
  3454. //#endregion
  3455. //#region node_modules/lodash-es/_baseProperty.js
  3456. /**
  3457. * The base implementation of `_.property` without support for deep paths.
  3458. *
  3459. * @private
  3460. * @param {string} key The key of the property to get.
  3461. * @returns {Function} Returns the new accessor function.
  3462. */
  3463. function baseProperty(key) {
  3464. return function(object) {
  3465. return object == null ? void 0 : object[key];
  3466. };
  3467. }
  3468. //#endregion
  3469. //#region node_modules/lodash-es/_basePropertyDeep.js
  3470. /**
  3471. * A specialized version of `baseProperty` which supports deep paths.
  3472. *
  3473. * @private
  3474. * @param {Array|string} path The path of the property to get.
  3475. * @returns {Function} Returns the new accessor function.
  3476. */
  3477. function basePropertyDeep(path) {
  3478. return function(object) {
  3479. return baseGet(object, path);
  3480. };
  3481. }
  3482. //#endregion
  3483. //#region node_modules/lodash-es/property.js
  3484. /**
  3485. * Creates a function that returns the value at `path` of a given object.
  3486. *
  3487. * @static
  3488. * @memberOf _
  3489. * @since 2.4.0
  3490. * @category Util
  3491. * @param {Array|string} path The path of the property to get.
  3492. * @returns {Function} Returns the new accessor function.
  3493. * @example
  3494. *
  3495. * var objects = [
  3496. * { 'a': { 'b': 2 } },
  3497. * { 'a': { 'b': 1 } }
  3498. * ];
  3499. *
  3500. * _.map(objects, _.property('a.b'));
  3501. * // => [2, 1]
  3502. *
  3503. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  3504. * // => [1, 2]
  3505. */
  3506. function property(path) {
  3507. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  3508. }
  3509. //#endregion
  3510. //#region node_modules/lodash-es/_baseIteratee.js
  3511. /**
  3512. * The base implementation of `_.iteratee`.
  3513. *
  3514. * @private
  3515. * @param {*} [value=_.identity] The value to convert to an iteratee.
  3516. * @returns {Function} Returns the iteratee.
  3517. */
  3518. function baseIteratee(value) {
  3519. if (typeof value == "function") return value;
  3520. if (value == null) return identity;
  3521. if (typeof value == "object") return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  3522. return property(value);
  3523. }
  3524. //#endregion
  3525. //#region node_modules/lodash-es/_createBaseFor.js
  3526. /**
  3527. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  3528. *
  3529. * @private
  3530. * @param {boolean} [fromRight] Specify iterating from right to left.
  3531. * @returns {Function} Returns the new base function.
  3532. */
  3533. function createBaseFor(fromRight) {
  3534. return function(object, iteratee, keysFunc) {
  3535. var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
  3536. while (length--) {
  3537. var key = props[fromRight ? length : ++index];
  3538. if (iteratee(iterable[key], key, iterable) === false) break;
  3539. }
  3540. return object;
  3541. };
  3542. }
  3543. //#endregion
  3544. //#region node_modules/lodash-es/_baseFor.js
  3545. /**
  3546. * The base implementation of `baseForOwn` which iterates over `object`
  3547. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  3548. * Iteratee functions may exit iteration early by explicitly returning `false`.
  3549. *
  3550. * @private
  3551. * @param {Object} object The object to iterate over.
  3552. * @param {Function} iteratee The function invoked per iteration.
  3553. * @param {Function} keysFunc The function to get the keys of `object`.
  3554. * @returns {Object} Returns `object`.
  3555. */
  3556. var baseFor = createBaseFor();
  3557. //#endregion
  3558. //#region node_modules/lodash-es/_baseForOwn.js
  3559. /**
  3560. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  3561. *
  3562. * @private
  3563. * @param {Object} object The object to iterate over.
  3564. * @param {Function} iteratee The function invoked per iteration.
  3565. * @returns {Object} Returns `object`.
  3566. */
  3567. function baseForOwn(object, iteratee) {
  3568. return object && baseFor(object, iteratee, keys);
  3569. }
  3570. //#endregion
  3571. //#region node_modules/lodash-es/_createBaseEach.js
  3572. /**
  3573. * Creates a `baseEach` or `baseEachRight` function.
  3574. *
  3575. * @private
  3576. * @param {Function} eachFunc The function to iterate over a collection.
  3577. * @param {boolean} [fromRight] Specify iterating from right to left.
  3578. * @returns {Function} Returns the new base function.
  3579. */
  3580. function createBaseEach(eachFunc, fromRight) {
  3581. return function(collection, iteratee) {
  3582. if (collection == null) return collection;
  3583. if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
  3584. var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
  3585. while (fromRight ? index-- : ++index < length) if (iteratee(iterable[index], index, iterable) === false) break;
  3586. return collection;
  3587. };
  3588. }
  3589. //#endregion
  3590. //#region node_modules/lodash-es/_baseEach.js
  3591. /**
  3592. * The base implementation of `_.forEach` without support for iteratee shorthands.
  3593. *
  3594. * @private
  3595. * @param {Array|Object} collection The collection to iterate over.
  3596. * @param {Function} iteratee The function invoked per iteration.
  3597. * @returns {Array|Object} Returns `collection`.
  3598. */
  3599. var baseEach = createBaseEach(baseForOwn);
  3600. //#endregion
  3601. //#region node_modules/lodash-es/now.js
  3602. /**
  3603. * Gets the timestamp of the number of milliseconds that have elapsed since
  3604. * the Unix epoch (1 January 1970 00:00:00 UTC).
  3605. *
  3606. * @static
  3607. * @memberOf _
  3608. * @since 2.4.0
  3609. * @category Date
  3610. * @returns {number} Returns the timestamp.
  3611. * @example
  3612. *
  3613. * _.defer(function(stamp) {
  3614. * console.log(_.now() - stamp);
  3615. * }, _.now());
  3616. * // => Logs the number of milliseconds it took for the deferred invocation.
  3617. */
  3618. var now = function() {
  3619. return root.Date.now();
  3620. };
  3621. //#endregion
  3622. //#region node_modules/lodash-es/debounce.js
  3623. /** Error message constants. */
  3624. var FUNC_ERROR_TEXT$1 = "Expected a function";
  3625. var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
  3626. /**
  3627. * Creates a debounced function that delays invoking `func` until after `wait`
  3628. * milliseconds have elapsed since the last time the debounced function was
  3629. * invoked. The debounced function comes with a `cancel` method to cancel
  3630. * delayed `func` invocations and a `flush` method to immediately invoke them.
  3631. * Provide `options` to indicate whether `func` should be invoked on the
  3632. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  3633. * with the last arguments provided to the debounced function. Subsequent
  3634. * calls to the debounced function return the result of the last `func`
  3635. * invocation.
  3636. *
  3637. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  3638. * invoked on the trailing edge of the timeout only if the debounced function
  3639. * is invoked more than once during the `wait` timeout.
  3640. *
  3641. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  3642. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  3643. *
  3644. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  3645. * for details over the differences between `_.debounce` and `_.throttle`.
  3646. *
  3647. * @static
  3648. * @memberOf _
  3649. * @since 0.1.0
  3650. * @category Function
  3651. * @param {Function} func The function to debounce.
  3652. * @param {number} [wait=0] The number of milliseconds to delay.
  3653. * @param {Object} [options={}] The options object.
  3654. * @param {boolean} [options.leading=false]
  3655. * Specify invoking on the leading edge of the timeout.
  3656. * @param {number} [options.maxWait]
  3657. * The maximum time `func` is allowed to be delayed before it's invoked.
  3658. * @param {boolean} [options.trailing=true]
  3659. * Specify invoking on the trailing edge of the timeout.
  3660. * @returns {Function} Returns the new debounced function.
  3661. * @example
  3662. *
  3663. * // Avoid costly calculations while the window size is in flux.
  3664. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  3665. *
  3666. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  3667. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  3668. * 'leading': true,
  3669. * 'trailing': false
  3670. * }));
  3671. *
  3672. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  3673. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  3674. * var source = new EventSource('/stream');
  3675. * jQuery(source).on('message', debounced);
  3676. *
  3677. * // Cancel the trailing debounced invocation.
  3678. * jQuery(window).on('popstate', debounced.cancel);
  3679. */
  3680. function debounce(func, wait, options) {
  3681. var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  3682. if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
  3683. wait = toNumber(wait) || 0;
  3684. if (isObject$1(options)) {
  3685. leading = !!options.leading;
  3686. maxing = "maxWait" in options;
  3687. maxWait = maxing ? nativeMax$1(toNumber(options.maxWait) || 0, wait) : maxWait;
  3688. trailing = "trailing" in options ? !!options.trailing : trailing;
  3689. }
  3690. function invokeFunc(time) {
  3691. var args = lastArgs, thisArg = lastThis;
  3692. lastArgs = lastThis = void 0;
  3693. lastInvokeTime = time;
  3694. result = func.apply(thisArg, args);
  3695. return result;
  3696. }
  3697. function leadingEdge(time) {
  3698. lastInvokeTime = time;
  3699. timerId = setTimeout(timerExpired, wait);
  3700. return leading ? invokeFunc(time) : result;
  3701. }
  3702. function remainingWait(time) {
  3703. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  3704. return maxing ? nativeMin$1(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  3705. }
  3706. function shouldInvoke(time) {
  3707. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
  3708. return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  3709. }
  3710. function timerExpired() {
  3711. var time = now();
  3712. if (shouldInvoke(time)) return trailingEdge(time);
  3713. timerId = setTimeout(timerExpired, remainingWait(time));
  3714. }
  3715. function trailingEdge(time) {
  3716. timerId = void 0;
  3717. if (trailing && lastArgs) return invokeFunc(time);
  3718. lastArgs = lastThis = void 0;
  3719. return result;
  3720. }
  3721. function cancel() {
  3722. if (timerId !== void 0) clearTimeout(timerId);
  3723. lastInvokeTime = 0;
  3724. lastArgs = lastCallTime = lastThis = timerId = void 0;
  3725. }
  3726. function flush() {
  3727. return timerId === void 0 ? result : trailingEdge(now());
  3728. }
  3729. function debounced() {
  3730. var time = now(), isInvoking = shouldInvoke(time);
  3731. lastArgs = arguments;
  3732. lastThis = this;
  3733. lastCallTime = time;
  3734. if (isInvoking) {
  3735. if (timerId === void 0) return leadingEdge(lastCallTime);
  3736. if (maxing) {
  3737. clearTimeout(timerId);
  3738. timerId = setTimeout(timerExpired, wait);
  3739. return invokeFunc(lastCallTime);
  3740. }
  3741. }
  3742. if (timerId === void 0) timerId = setTimeout(timerExpired, wait);
  3743. return result;
  3744. }
  3745. debounced.cancel = cancel;
  3746. debounced.flush = flush;
  3747. return debounced;
  3748. }
  3749. //#endregion
  3750. //#region node_modules/lodash-es/_assignMergeValue.js
  3751. /**
  3752. * This function is like `assignValue` except that it doesn't assign
  3753. * `undefined` values.
  3754. *
  3755. * @private
  3756. * @param {Object} object The object to modify.
  3757. * @param {string} key The key of the property to assign.
  3758. * @param {*} value The value to assign.
  3759. */
  3760. function assignMergeValue(object, key, value) {
  3761. if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
  3762. }
  3763. //#endregion
  3764. //#region node_modules/lodash-es/isArrayLikeObject.js
  3765. /**
  3766. * This method is like `_.isArrayLike` except that it also checks if `value`
  3767. * is an object.
  3768. *
  3769. * @static
  3770. * @memberOf _
  3771. * @since 4.0.0
  3772. * @category Lang
  3773. * @param {*} value The value to check.
  3774. * @returns {boolean} Returns `true` if `value` is an array-like object,
  3775. * else `false`.
  3776. * @example
  3777. *
  3778. * _.isArrayLikeObject([1, 2, 3]);
  3779. * // => true
  3780. *
  3781. * _.isArrayLikeObject(document.body.children);
  3782. * // => true
  3783. *
  3784. * _.isArrayLikeObject('abc');
  3785. * // => false
  3786. *
  3787. * _.isArrayLikeObject(_.noop);
  3788. * // => false
  3789. */
  3790. function isArrayLikeObject(value) {
  3791. return isObjectLike(value) && isArrayLike(value);
  3792. }
  3793. //#endregion
  3794. //#region node_modules/lodash-es/_safeGet.js
  3795. /**
  3796. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  3797. *
  3798. * @private
  3799. * @param {Object} object The object to query.
  3800. * @param {string} key The key of the property to get.
  3801. * @returns {*} Returns the property value.
  3802. */
  3803. function safeGet(object, key) {
  3804. if (key === "constructor" && typeof object[key] === "function") return;
  3805. if (key == "__proto__") return;
  3806. return object[key];
  3807. }
  3808. //#endregion
  3809. //#region node_modules/lodash-es/toPlainObject.js
  3810. /**
  3811. * Converts `value` to a plain object flattening inherited enumerable string
  3812. * keyed properties of `value` to own properties of the plain object.
  3813. *
  3814. * @static
  3815. * @memberOf _
  3816. * @since 3.0.0
  3817. * @category Lang
  3818. * @param {*} value The value to convert.
  3819. * @returns {Object} Returns the converted plain object.
  3820. * @example
  3821. *
  3822. * function Foo() {
  3823. * this.b = 2;
  3824. * }
  3825. *
  3826. * Foo.prototype.c = 3;
  3827. *
  3828. * _.assign({ 'a': 1 }, new Foo);
  3829. * // => { 'a': 1, 'b': 2 }
  3830. *
  3831. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  3832. * // => { 'a': 1, 'b': 2, 'c': 3 }
  3833. */
  3834. function toPlainObject(value) {
  3835. return copyObject(value, keysIn(value));
  3836. }
  3837. //#endregion
  3838. //#region node_modules/lodash-es/_baseMergeDeep.js
  3839. /**
  3840. * A specialized version of `baseMerge` for arrays and objects which performs
  3841. * deep merges and tracks traversed objects enabling objects with circular
  3842. * references to be merged.
  3843. *
  3844. * @private
  3845. * @param {Object} object The destination object.
  3846. * @param {Object} source The source object.
  3847. * @param {string} key The key of the value to merge.
  3848. * @param {number} srcIndex The index of `source`.
  3849. * @param {Function} mergeFunc The function to merge values.
  3850. * @param {Function} [customizer] The function to customize assigned values.
  3851. * @param {Object} [stack] Tracks traversed source values and their merged
  3852. * counterparts.
  3853. */
  3854. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  3855. var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
  3856. if (stacked) {
  3857. assignMergeValue(object, key, stacked);
  3858. return;
  3859. }
  3860. var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
  3861. var isCommon = newValue === void 0;
  3862. if (isCommon) {
  3863. var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  3864. newValue = srcValue;
  3865. if (isArr || isBuff || isTyped) if (isArray(objValue)) newValue = objValue;
  3866. else if (isArrayLikeObject(objValue)) newValue = copyArray(objValue);
  3867. else if (isBuff) {
  3868. isCommon = false;
  3869. newValue = cloneBuffer(srcValue, true);
  3870. } else if (isTyped) {
  3871. isCommon = false;
  3872. newValue = cloneTypedArray(srcValue, true);
  3873. } else newValue = [];
  3874. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  3875. newValue = objValue;
  3876. if (isArguments(objValue)) newValue = toPlainObject(objValue);
  3877. else if (!isObject$1(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
  3878. } else isCommon = false;
  3879. }
  3880. if (isCommon) {
  3881. stack.set(srcValue, newValue);
  3882. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  3883. stack["delete"](srcValue);
  3884. }
  3885. assignMergeValue(object, key, newValue);
  3886. }
  3887. //#endregion
  3888. //#region node_modules/lodash-es/_baseMerge.js
  3889. /**
  3890. * The base implementation of `_.merge` without support for multiple sources.
  3891. *
  3892. * @private
  3893. * @param {Object} object The destination object.
  3894. * @param {Object} source The source object.
  3895. * @param {number} srcIndex The index of `source`.
  3896. * @param {Function} [customizer] The function to customize merged values.
  3897. * @param {Object} [stack] Tracks traversed source values and their merged
  3898. * counterparts.
  3899. */
  3900. function baseMerge(object, source, srcIndex, customizer, stack) {
  3901. if (object === source) return;
  3902. baseFor(source, function(srcValue, key) {
  3903. stack || (stack = new Stack());
  3904. if (isObject$1(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  3905. else {
  3906. var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
  3907. if (newValue === void 0) newValue = srcValue;
  3908. assignMergeValue(object, key, newValue);
  3909. }
  3910. }, keysIn);
  3911. }
  3912. //#endregion
  3913. //#region node_modules/lodash-es/_arrayIncludesWith.js
  3914. /**
  3915. * This function is like `arrayIncludes` except that it accepts a comparator.
  3916. *
  3917. * @private
  3918. * @param {Array} [array] The array to inspect.
  3919. * @param {*} target The value to search for.
  3920. * @param {Function} comparator The comparator invoked per element.
  3921. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  3922. */
  3923. function arrayIncludesWith(array, value, comparator) {
  3924. var index = -1, length = array == null ? 0 : array.length;
  3925. while (++index < length) if (comparator(value, array[index])) return true;
  3926. return false;
  3927. }
  3928. //#endregion
  3929. //#region node_modules/lodash-es/last.js
  3930. /**
  3931. * Gets the last element of `array`.
  3932. *
  3933. * @static
  3934. * @memberOf _
  3935. * @since 0.1.0
  3936. * @category Array
  3937. * @param {Array} array The array to query.
  3938. * @returns {*} Returns the last element of `array`.
  3939. * @example
  3940. *
  3941. * _.last([1, 2, 3]);
  3942. * // => 3
  3943. */
  3944. function last(array) {
  3945. var length = array == null ? 0 : array.length;
  3946. return length ? array[length - 1] : void 0;
  3947. }
  3948. //#endregion
  3949. //#region node_modules/lodash-es/findLastIndex.js
  3950. var nativeMax = Math.max, nativeMin = Math.min;
  3951. /**
  3952. * This method is like `_.findIndex` except that it iterates over elements
  3953. * of `collection` from right to left.
  3954. *
  3955. * @static
  3956. * @memberOf _
  3957. * @since 2.0.0
  3958. * @category Array
  3959. * @param {Array} array The array to inspect.
  3960. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  3961. * @param {number} [fromIndex=array.length-1] The index to search from.
  3962. * @returns {number} Returns the index of the found element, else `-1`.
  3963. * @example
  3964. *
  3965. * var users = [
  3966. * { 'user': 'barney', 'active': true },
  3967. * { 'user': 'fred', 'active': false },
  3968. * { 'user': 'pebbles', 'active': false }
  3969. * ];
  3970. *
  3971. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  3972. * // => 2
  3973. *
  3974. * // The `_.matches` iteratee shorthand.
  3975. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  3976. * // => 0
  3977. *
  3978. * // The `_.matchesProperty` iteratee shorthand.
  3979. * _.findLastIndex(users, ['active', false]);
  3980. * // => 2
  3981. *
  3982. * // The `_.property` iteratee shorthand.
  3983. * _.findLastIndex(users, 'active');
  3984. * // => 0
  3985. */
  3986. function findLastIndex(array, predicate, fromIndex) {
  3987. var length = array == null ? 0 : array.length;
  3988. if (!length) return -1;
  3989. var index = length - 1;
  3990. if (fromIndex !== void 0) {
  3991. index = toInteger(fromIndex);
  3992. index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  3993. }
  3994. return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
  3995. }
  3996. //#endregion
  3997. //#region node_modules/lodash-es/_baseMap.js
  3998. /**
  3999. * The base implementation of `_.map` without support for iteratee shorthands.
  4000. *
  4001. * @private
  4002. * @param {Array|Object} collection The collection to iterate over.
  4003. * @param {Function} iteratee The function invoked per iteration.
  4004. * @returns {Array} Returns the new mapped array.
  4005. */
  4006. function baseMap(collection, iteratee) {
  4007. var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
  4008. baseEach(collection, function(value, key, collection) {
  4009. result[++index] = iteratee(value, key, collection);
  4010. });
  4011. return result;
  4012. }
  4013. //#endregion
  4014. //#region node_modules/lodash-es/map.js
  4015. /**
  4016. * Creates an array of values by running each element in `collection` thru
  4017. * `iteratee`. The iteratee is invoked with three arguments:
  4018. * (value, index|key, collection).
  4019. *
  4020. * Many lodash methods are guarded to work as iteratees for methods like
  4021. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  4022. *
  4023. * The guarded methods are:
  4024. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  4025. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  4026. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  4027. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  4028. *
  4029. * @static
  4030. * @memberOf _
  4031. * @since 0.1.0
  4032. * @category Collection
  4033. * @param {Array|Object} collection The collection to iterate over.
  4034. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  4035. * @returns {Array} Returns the new mapped array.
  4036. * @example
  4037. *
  4038. * function square(n) {
  4039. * return n * n;
  4040. * }
  4041. *
  4042. * _.map([4, 8], square);
  4043. * // => [16, 64]
  4044. *
  4045. * _.map({ 'a': 4, 'b': 8 }, square);
  4046. * // => [16, 64] (iteration order is not guaranteed)
  4047. *
  4048. * var users = [
  4049. * { 'user': 'barney' },
  4050. * { 'user': 'fred' }
  4051. * ];
  4052. *
  4053. * // The `_.property` iteratee shorthand.
  4054. * _.map(users, 'user');
  4055. * // => ['barney', 'fred']
  4056. */
  4057. function map(collection, iteratee) {
  4058. return (isArray(collection) ? arrayMap : baseMap)(collection, baseIteratee(iteratee, 3));
  4059. }
  4060. //#endregion
  4061. //#region node_modules/lodash-es/flatMap.js
  4062. /**
  4063. * Creates a flattened array of values by running each element in `collection`
  4064. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  4065. * with three arguments: (value, index|key, collection).
  4066. *
  4067. * @static
  4068. * @memberOf _
  4069. * @since 4.0.0
  4070. * @category Collection
  4071. * @param {Array|Object} collection The collection to iterate over.
  4072. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  4073. * @returns {Array} Returns the new flattened array.
  4074. * @example
  4075. *
  4076. * function duplicate(n) {
  4077. * return [n, n];
  4078. * }
  4079. *
  4080. * _.flatMap([1, 2], duplicate);
  4081. * // => [1, 1, 2, 2]
  4082. */
  4083. function flatMap(collection, iteratee) {
  4084. return baseFlatten(map(collection, iteratee), 1);
  4085. }
  4086. //#endregion
  4087. //#region node_modules/lodash-es/flattenDeep.js
  4088. /** Used as references for various `Number` constants. */
  4089. var INFINITY = Infinity;
  4090. /**
  4091. * Recursively flattens `array`.
  4092. *
  4093. * @static
  4094. * @memberOf _
  4095. * @since 3.0.0
  4096. * @category Array
  4097. * @param {Array} array The array to flatten.
  4098. * @returns {Array} Returns the new flattened array.
  4099. * @example
  4100. *
  4101. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  4102. * // => [1, 2, 3, 4, 5]
  4103. */
  4104. function flattenDeep(array) {
  4105. return (array == null ? 0 : array.length) ? baseFlatten(array, INFINITY) : [];
  4106. }
  4107. //#endregion
  4108. //#region node_modules/lodash-es/fromPairs.js
  4109. /**
  4110. * The inverse of `_.toPairs`; this method returns an object composed
  4111. * from key-value `pairs`.
  4112. *
  4113. * @static
  4114. * @memberOf _
  4115. * @since 4.0.0
  4116. * @category Array
  4117. * @param {Array} pairs The key-value pairs.
  4118. * @returns {Object} Returns the new object.
  4119. * @example
  4120. *
  4121. * _.fromPairs([['a', 1], ['b', 2]]);
  4122. * // => { 'a': 1, 'b': 2 }
  4123. */
  4124. function fromPairs(pairs) {
  4125. var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
  4126. while (++index < length) {
  4127. var pair = pairs[index];
  4128. baseAssignValue(result, pair[0], pair[1]);
  4129. }
  4130. return result;
  4131. }
  4132. //#endregion
  4133. //#region node_modules/lodash-es/_parent.js
  4134. /**
  4135. * Gets the parent value at `path` of `object`.
  4136. *
  4137. * @private
  4138. * @param {Object} object The object to query.
  4139. * @param {Array} path The path to get the parent value of.
  4140. * @returns {*} Returns the parent value.
  4141. */
  4142. function parent(object, path) {
  4143. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  4144. }
  4145. //#endregion
  4146. //#region node_modules/lodash-es/isEqual.js
  4147. /**
  4148. * Performs a deep comparison between two values to determine if they are
  4149. * equivalent.
  4150. *
  4151. * **Note:** This method supports comparing arrays, array buffers, booleans,
  4152. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  4153. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  4154. * by their own, not inherited, enumerable properties. Functions and DOM
  4155. * nodes are compared by strict equality, i.e. `===`.
  4156. *
  4157. * @static
  4158. * @memberOf _
  4159. * @since 0.1.0
  4160. * @category Lang
  4161. * @param {*} value The value to compare.
  4162. * @param {*} other The other value to compare.
  4163. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4164. * @example
  4165. *
  4166. * var object = { 'a': 1 };
  4167. * var other = { 'a': 1 };
  4168. *
  4169. * _.isEqual(object, other);
  4170. * // => true
  4171. *
  4172. * object === other;
  4173. * // => false
  4174. */
  4175. function isEqual$1(value, other) {
  4176. return baseIsEqual(value, other);
  4177. }
  4178. //#endregion
  4179. //#region node_modules/lodash-es/isNil.js
  4180. /**
  4181. * Checks if `value` is `null` or `undefined`.
  4182. *
  4183. * @static
  4184. * @memberOf _
  4185. * @since 4.0.0
  4186. * @category Lang
  4187. * @param {*} value The value to check.
  4188. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  4189. * @example
  4190. *
  4191. * _.isNil(null);
  4192. * // => true
  4193. *
  4194. * _.isNil(void 0);
  4195. * // => true
  4196. *
  4197. * _.isNil(NaN);
  4198. * // => false
  4199. */
  4200. function isNil(value) {
  4201. return value == null;
  4202. }
  4203. //#endregion
  4204. //#region node_modules/lodash-es/isNull.js
  4205. /**
  4206. * Checks if `value` is `null`.
  4207. *
  4208. * @static
  4209. * @memberOf _
  4210. * @since 0.1.0
  4211. * @category Lang
  4212. * @param {*} value The value to check.
  4213. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  4214. * @example
  4215. *
  4216. * _.isNull(null);
  4217. * // => true
  4218. *
  4219. * _.isNull(void 0);
  4220. * // => false
  4221. */
  4222. function isNull(value) {
  4223. return value === null;
  4224. }
  4225. //#endregion
  4226. //#region node_modules/lodash-es/isUndefined.js
  4227. /**
  4228. * Checks if `value` is `undefined`.
  4229. *
  4230. * @static
  4231. * @since 0.1.0
  4232. * @memberOf _
  4233. * @category Lang
  4234. * @param {*} value The value to check.
  4235. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  4236. * @example
  4237. *
  4238. * _.isUndefined(void 0);
  4239. * // => true
  4240. *
  4241. * _.isUndefined(null);
  4242. * // => false
  4243. */
  4244. function isUndefined$1(value) {
  4245. return value === void 0;
  4246. }
  4247. //#endregion
  4248. //#region node_modules/lodash-es/merge.js
  4249. /**
  4250. * This method is like `_.assign` except that it recursively merges own and
  4251. * inherited enumerable string keyed properties of source objects into the
  4252. * destination object. Source properties that resolve to `undefined` are
  4253. * skipped if a destination value exists. Array and plain object properties
  4254. * are merged recursively. Other objects and value types are overridden by
  4255. * assignment. Source objects are applied from left to right. Subsequent
  4256. * sources overwrite property assignments of previous sources.
  4257. *
  4258. * **Note:** This method mutates `object`.
  4259. *
  4260. * @static
  4261. * @memberOf _
  4262. * @since 0.5.0
  4263. * @category Object
  4264. * @param {Object} object The destination object.
  4265. * @param {...Object} [sources] The source objects.
  4266. * @returns {Object} Returns `object`.
  4267. * @example
  4268. *
  4269. * var object = {
  4270. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  4271. * };
  4272. *
  4273. * var other = {
  4274. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  4275. * };
  4276. *
  4277. * _.merge(object, other);
  4278. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  4279. */
  4280. var merge = createAssigner(function(object, source, srcIndex) {
  4281. baseMerge(object, source, srcIndex);
  4282. });
  4283. //#endregion
  4284. //#region node_modules/lodash-es/_baseUnset.js
  4285. /** Used to check objects for own properties. */
  4286. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4287. /**
  4288. * The base implementation of `_.unset`.
  4289. *
  4290. * @private
  4291. * @param {Object} object The object to modify.
  4292. * @param {Array|string} path The property path to unset.
  4293. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  4294. */
  4295. function baseUnset(object, path) {
  4296. path = castPath(path, object);
  4297. var index = -1, length = path.length;
  4298. if (!length) return true;
  4299. while (++index < length) {
  4300. var key = toKey(path[index]);
  4301. if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) return false;
  4302. if ((key === "constructor" || key === "prototype") && index < length - 1) return false;
  4303. }
  4304. var obj = parent(object, path);
  4305. return obj == null || delete obj[toKey(last(path))];
  4306. }
  4307. //#endregion
  4308. //#region node_modules/lodash-es/_customOmitClone.js
  4309. /**
  4310. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  4311. * objects.
  4312. *
  4313. * @private
  4314. * @param {*} value The value to inspect.
  4315. * @param {string} key The key of the property to inspect.
  4316. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  4317. */
  4318. function customOmitClone(value) {
  4319. return isPlainObject(value) ? void 0 : value;
  4320. }
  4321. //#endregion
  4322. //#region node_modules/lodash-es/omit.js
  4323. /** Used to compose bitmasks for cloning. */
  4324. var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
  4325. /**
  4326. * The opposite of `_.pick`; this method creates an object composed of the
  4327. * own and inherited enumerable property paths of `object` that are not omitted.
  4328. *
  4329. * **Note:** This method is considerably slower than `_.pick`.
  4330. *
  4331. * @static
  4332. * @since 0.1.0
  4333. * @memberOf _
  4334. * @category Object
  4335. * @param {Object} object The source object.
  4336. * @param {...(string|string[])} [paths] The property paths to omit.
  4337. * @returns {Object} Returns the new object.
  4338. * @example
  4339. *
  4340. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  4341. *
  4342. * _.omit(object, ['a', 'c']);
  4343. * // => { 'b': '2' }
  4344. */
  4345. var omit = flatRest(function(object, paths) {
  4346. var result = {};
  4347. if (object == null) return result;
  4348. var isDeep = false;
  4349. paths = arrayMap(paths, function(path) {
  4350. path = castPath(path, object);
  4351. isDeep || (isDeep = path.length > 1);
  4352. return path;
  4353. });
  4354. copyObject(object, getAllKeysIn(object), result);
  4355. if (isDeep) result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  4356. var length = paths.length;
  4357. while (length--) baseUnset(result, paths[length]);
  4358. return result;
  4359. });
  4360. //#endregion
  4361. //#region node_modules/lodash-es/_baseSet.js
  4362. /**
  4363. * The base implementation of `_.set`.
  4364. *
  4365. * @private
  4366. * @param {Object} object The object to modify.
  4367. * @param {Array|string} path The path of the property to set.
  4368. * @param {*} value The value to set.
  4369. * @param {Function} [customizer] The function to customize path creation.
  4370. * @returns {Object} Returns `object`.
  4371. */
  4372. function baseSet(object, path, value, customizer) {
  4373. if (!isObject$1(object)) return object;
  4374. path = castPath(path, object);
  4375. var index = -1, length = path.length, lastIndex = length - 1, nested = object;
  4376. while (nested != null && ++index < length) {
  4377. var key = toKey(path[index]), newValue = value;
  4378. if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
  4379. if (index != lastIndex) {
  4380. var objValue = nested[key];
  4381. newValue = customizer ? customizer(objValue, key, nested) : void 0;
  4382. if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
  4383. }
  4384. assignValue(nested, key, newValue);
  4385. nested = nested[key];
  4386. }
  4387. return object;
  4388. }
  4389. //#endregion
  4390. //#region node_modules/lodash-es/_basePickBy.js
  4391. /**
  4392. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  4393. *
  4394. * @private
  4395. * @param {Object} object The source object.
  4396. * @param {string[]} paths The property paths to pick.
  4397. * @param {Function} predicate The function invoked per property.
  4398. * @returns {Object} Returns the new object.
  4399. */
  4400. function basePickBy(object, paths, predicate) {
  4401. var index = -1, length = paths.length, result = {};
  4402. while (++index < length) {
  4403. var path = paths[index], value = baseGet(object, path);
  4404. if (predicate(value, path)) baseSet(result, castPath(path, object), value);
  4405. }
  4406. return result;
  4407. }
  4408. //#endregion
  4409. //#region node_modules/lodash-es/_basePick.js
  4410. /**
  4411. * The base implementation of `_.pick` without support for individual
  4412. * property identifiers.
  4413. *
  4414. * @private
  4415. * @param {Object} object The source object.
  4416. * @param {string[]} paths The property paths to pick.
  4417. * @returns {Object} Returns the new object.
  4418. */
  4419. function basePick(object, paths) {
  4420. return basePickBy(object, paths, function(value, path) {
  4421. return hasIn(object, path);
  4422. });
  4423. }
  4424. //#endregion
  4425. //#region node_modules/lodash-es/pick.js
  4426. /**
  4427. * Creates an object composed of the picked `object` properties.
  4428. *
  4429. * @static
  4430. * @since 0.1.0
  4431. * @memberOf _
  4432. * @category Object
  4433. * @param {Object} object The source object.
  4434. * @param {...(string|string[])} [paths] The property paths to pick.
  4435. * @returns {Object} Returns the new object.
  4436. * @example
  4437. *
  4438. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  4439. *
  4440. * _.pick(object, ['a', 'c']);
  4441. * // => { 'a': 1, 'c': 3 }
  4442. */
  4443. var pick = flatRest(function(object, paths) {
  4444. return object == null ? {} : basePick(object, paths);
  4445. });
  4446. //#endregion
  4447. //#region node_modules/lodash-es/set.js
  4448. /**
  4449. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  4450. * it's created. Arrays are created for missing index properties while objects
  4451. * are created for all other missing properties. Use `_.setWith` to customize
  4452. * `path` creation.
  4453. *
  4454. * **Note:** This method mutates `object`.
  4455. *
  4456. * @static
  4457. * @memberOf _
  4458. * @since 3.7.0
  4459. * @category Object
  4460. * @param {Object} object The object to modify.
  4461. * @param {Array|string} path The path of the property to set.
  4462. * @param {*} value The value to set.
  4463. * @returns {Object} Returns `object`.
  4464. * @example
  4465. *
  4466. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  4467. *
  4468. * _.set(object, 'a[0].b.c', 4);
  4469. * console.log(object.a[0].b.c);
  4470. * // => 4
  4471. *
  4472. * _.set(object, ['x', '0', 'y', 'z'], 5);
  4473. * console.log(object.x[0].y.z);
  4474. * // => 5
  4475. */
  4476. function set(object, path, value) {
  4477. return object == null ? object : baseSet(object, path, value);
  4478. }
  4479. //#endregion
  4480. //#region node_modules/lodash-es/throttle.js
  4481. /** Error message constants. */
  4482. var FUNC_ERROR_TEXT = "Expected a function";
  4483. /**
  4484. * Creates a throttled function that only invokes `func` at most once per
  4485. * every `wait` milliseconds. The throttled function comes with a `cancel`
  4486. * method to cancel delayed `func` invocations and a `flush` method to
  4487. * immediately invoke them. Provide `options` to indicate whether `func`
  4488. * should be invoked on the leading and/or trailing edge of the `wait`
  4489. * timeout. The `func` is invoked with the last arguments provided to the
  4490. * throttled function. Subsequent calls to the throttled function return the
  4491. * result of the last `func` invocation.
  4492. *
  4493. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  4494. * invoked on the trailing edge of the timeout only if the throttled function
  4495. * is invoked more than once during the `wait` timeout.
  4496. *
  4497. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  4498. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  4499. *
  4500. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  4501. * for details over the differences between `_.throttle` and `_.debounce`.
  4502. *
  4503. * @static
  4504. * @memberOf _
  4505. * @since 0.1.0
  4506. * @category Function
  4507. * @param {Function} func The function to throttle.
  4508. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  4509. * @param {Object} [options={}] The options object.
  4510. * @param {boolean} [options.leading=true]
  4511. * Specify invoking on the leading edge of the timeout.
  4512. * @param {boolean} [options.trailing=true]
  4513. * Specify invoking on the trailing edge of the timeout.
  4514. * @returns {Function} Returns the new throttled function.
  4515. * @example
  4516. *
  4517. * // Avoid excessively updating the position while scrolling.
  4518. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  4519. *
  4520. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  4521. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  4522. * jQuery(element).on('click', throttled);
  4523. *
  4524. * // Cancel the trailing throttled invocation.
  4525. * jQuery(window).on('popstate', throttled.cancel);
  4526. */
  4527. function throttle(func, wait, options) {
  4528. var leading = true, trailing = true;
  4529. if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
  4530. if (isObject$1(options)) {
  4531. leading = "leading" in options ? !!options.leading : leading;
  4532. trailing = "trailing" in options ? !!options.trailing : trailing;
  4533. }
  4534. return debounce(func, wait, {
  4535. "leading": leading,
  4536. "maxWait": wait,
  4537. "trailing": trailing
  4538. });
  4539. }
  4540. //#endregion
  4541. //#region node_modules/lodash-es/_createSet.js
  4542. /**
  4543. * Creates a set object of `values`.
  4544. *
  4545. * @private
  4546. * @param {Array} values The values to add to the set.
  4547. * @returns {Object} Returns the new set.
  4548. */
  4549. var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == Infinity) ? noop$1 : function(values) {
  4550. return new Set$1(values);
  4551. };
  4552. //#endregion
  4553. //#region node_modules/lodash-es/_baseUniq.js
  4554. /** Used as the size to enable large array optimizations. */
  4555. var LARGE_ARRAY_SIZE = 200;
  4556. /**
  4557. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  4558. *
  4559. * @private
  4560. * @param {Array} array The array to inspect.
  4561. * @param {Function} [iteratee] The iteratee invoked per element.
  4562. * @param {Function} [comparator] The comparator invoked per element.
  4563. * @returns {Array} Returns the new duplicate free array.
  4564. */
  4565. function baseUniq(array, iteratee, comparator) {
  4566. var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
  4567. if (comparator) {
  4568. isCommon = false;
  4569. includes = arrayIncludesWith;
  4570. } else if (length >= LARGE_ARRAY_SIZE) {
  4571. var set = iteratee ? null : createSet(array);
  4572. if (set) return setToArray(set);
  4573. isCommon = false;
  4574. includes = cacheHas;
  4575. seen = new SetCache();
  4576. } else seen = iteratee ? [] : result;
  4577. outer: while (++index < length) {
  4578. var value = array[index], computed = iteratee ? iteratee(value) : value;
  4579. value = comparator || value !== 0 ? value : 0;
  4580. if (isCommon && computed === computed) {
  4581. var seenIndex = seen.length;
  4582. while (seenIndex--) if (seen[seenIndex] === computed) continue outer;
  4583. if (iteratee) seen.push(computed);
  4584. result.push(value);
  4585. } else if (!includes(seen, computed, comparator)) {
  4586. if (seen !== result) seen.push(computed);
  4587. result.push(value);
  4588. }
  4589. }
  4590. return result;
  4591. }
  4592. //#endregion
  4593. //#region node_modules/lodash-es/union.js
  4594. /**
  4595. * Creates an array of unique values, in order, from all given arrays using
  4596. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  4597. * for equality comparisons.
  4598. *
  4599. * @static
  4600. * @memberOf _
  4601. * @since 0.1.0
  4602. * @category Array
  4603. * @param {...Array} [arrays] The arrays to inspect.
  4604. * @returns {Array} Returns the new array of combined values.
  4605. * @example
  4606. *
  4607. * _.union([2], [1, 2]);
  4608. * // => [2, 1]
  4609. */
  4610. var union = baseRest(function(arrays) {
  4611. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  4612. });
  4613. //#endregion
  4614. //#region node_modules/element-plus/es/utils/types.mjs
  4615. var isUndefined = (val) => val === void 0;
  4616. var isBoolean = (val) => typeof val === "boolean";
  4617. var isNumber = (val) => typeof val === "number";
  4618. var isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$2(val) && !Object.keys(val).length;
  4619. var isElement$1 = (e) => {
  4620. if (typeof Element === "undefined") return false;
  4621. return e instanceof Element;
  4622. };
  4623. var isPropAbsent = (prop) => isNil(prop);
  4624. var isStringNumber = (val) => {
  4625. if (!isString(val)) return false;
  4626. return !Number.isNaN(Number(val));
  4627. };
  4628. var isWindow = (val) => val === window;
  4629. //#endregion
  4630. //#region node_modules/element-plus/es/utils/objects.mjs
  4631. var keysOf = (arr) => Object.keys(arr);
  4632. var entriesOf = (arr) => Object.entries(arr);
  4633. var getProp = (obj, path, defaultValue) => {
  4634. return {
  4635. get value() {
  4636. return get(obj, path, defaultValue);
  4637. },
  4638. set value(val) {
  4639. set(obj, path, val);
  4640. }
  4641. };
  4642. };
  4643. //#endregion
  4644. //#region node_modules/element-plus/es/utils/vue/props/runtime.mjs
  4645. var epPropKey = "__epPropKey";
  4646. var definePropType = (val) => val;
  4647. var isEpProp = (val) => isObject$2(val) && !!val["__epPropKey"];
  4648. /**
  4649. * @description Build prop. It can better optimize prop types
  4650. * @description 生成 prop,能更好地优化类型
  4651. * @example
  4652. // limited options
  4653. // the type will be PropType<'light' | 'dark'>
  4654. buildProp({
  4655. type: String,
  4656. values: ['light', 'dark'],
  4657. } as const)
  4658. * @example
  4659. // limited options and other types
  4660. // the type will be PropType<'small' | 'large' | number>
  4661. buildProp({
  4662. type: [String, Number],
  4663. values: ['small', 'large'],
  4664. validator: (val: unknown): val is number => typeof val === 'number',
  4665. } as const)
  4666. @link see more: https://github.com/element-plus/element-plus/pull/3341
  4667. */
  4668. var buildProp = (prop, key) => {
  4669. if (!isObject$2(prop) || isEpProp(prop)) return prop;
  4670. const { values, required, default: defaultValue, type, validator } = prop;
  4671. const epProp = {
  4672. type,
  4673. required: !!required,
  4674. validator: values || validator ? (val) => {
  4675. let valid = false;
  4676. let allowedValues = [];
  4677. if (values) {
  4678. allowedValues = Array.from(values);
  4679. if (hasOwn(prop, "default")) allowedValues.push(defaultValue);
  4680. valid ||= allowedValues.includes(val);
  4681. }
  4682. if (validator) valid ||= validator(val);
  4683. if (!valid && allowedValues.length > 0) {
  4684. const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
  4685. warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
  4686. }
  4687. return valid;
  4688. } : void 0,
  4689. [epPropKey]: true
  4690. };
  4691. if (hasOwn(prop, "default")) epProp.default = defaultValue;
  4692. return epProp;
  4693. };
  4694. var buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
  4695. //#endregion
  4696. //#region node_modules/element-plus/es/components/affix/src/affix.mjs
  4697. /**
  4698. * @deprecated Removed after 3.0.0, Use `AffixProps` instead.
  4699. */
  4700. var affixProps = buildProps({
  4701. /**
  4702. * @description affix element zIndex value
  4703. * */
  4704. zIndex: {
  4705. type: definePropType([Number, String]),
  4706. default: 100
  4707. },
  4708. /**
  4709. * @description target container. (CSS selector)
  4710. */
  4711. target: {
  4712. type: String,
  4713. default: ""
  4714. },
  4715. /**
  4716. * @description offset distance
  4717. * */
  4718. offset: {
  4719. type: Number,
  4720. default: 0
  4721. },
  4722. /**
  4723. * @description position of affix
  4724. * */
  4725. position: {
  4726. type: String,
  4727. values: ["top", "bottom"],
  4728. default: "top"
  4729. },
  4730. /**
  4731. * @description whether affix element is teleported, if `true` it will be teleported to where `append-to` sets
  4732. * */
  4733. teleported: Boolean,
  4734. /**
  4735. * @description which element the affix element appends to
  4736. * */
  4737. appendTo: {
  4738. type: definePropType([String, Object]),
  4739. default: "body"
  4740. }
  4741. });
  4742. var affixEmits = {
  4743. scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
  4744. [CHANGE_EVENT]: (fixed) => isBoolean(fixed)
  4745. };
  4746. //#endregion
  4747. //#region node_modules/element-plus/es/utils/error.mjs
  4748. var ElementPlusError = class extends Error {
  4749. constructor(m) {
  4750. super(m);
  4751. this.name = "ElementPlusError";
  4752. }
  4753. };
  4754. function throwError(scope, m) {
  4755. throw new ElementPlusError(`[${scope}] ${m}`);
  4756. }
  4757. function debugWarn(scope, message) {
  4758. {
  4759. const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
  4760. console.warn(error);
  4761. }
  4762. }
  4763. //#endregion
  4764. //#region node_modules/element-plus/es/hooks/use-attrs/index.mjs
  4765. var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
  4766. var LISTENER_PREFIX = /^on[A-Z]/;
  4767. var useAttrs = (params = {}) => {
  4768. const { excludeListeners = false, excludeKeys } = params;
  4769. const allExcludeKeys = computed(() => {
  4770. return (excludeKeys?.value || []).concat(DEFAULT_EXCLUDE_KEYS);
  4771. });
  4772. const instance = getCurrentInstance();
  4773. if (!instance) {
  4774. debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
  4775. return computed(() => ({}));
  4776. }
  4777. return computed(() => fromPairs(Object.entries(instance.proxy?.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key)))));
  4778. };
  4779. //#endregion
  4780. //#region node_modules/@vueuse/shared/dist/index.js
  4781. /**
  4782. *
  4783. * @deprecated This function will be removed in future version.
  4784. *
  4785. * Note: If you are using Vue 3.4+, you can straight use computed instead.
  4786. * Because in Vue 3.4+, if computed new value does not change,
  4787. * computed, effect, watch, watchEffect, render dependencies will not be triggered.
  4788. * refer: https://github.com/vuejs/core/pull/5912
  4789. *
  4790. * @param fn effect function
  4791. * @param options WatchOptionsBase
  4792. * @returns readonly shallowRef
  4793. */
  4794. function computedEager(fn, options) {
  4795. var _options$flush;
  4796. const result = shallowRef();
  4797. watchEffect(() => {
  4798. result.value = fn();
  4799. }, {
  4800. ...options,
  4801. flush: (_options$flush = options === null || options === void 0 ? void 0 : options.flush) !== null && _options$flush !== void 0 ? _options$flush : "sync"
  4802. });
  4803. return readonly(result);
  4804. }
  4805. /**
  4806. * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
  4807. *
  4808. * @param fn
  4809. */
  4810. function tryOnScopeDispose(fn, failSilently) {
  4811. if (getCurrentScope()) {
  4812. onScopeDispose(fn, failSilently);
  4813. return true;
  4814. }
  4815. return false;
  4816. }
  4817. var localProvidedStateMap = /* @__PURE__ */ new WeakMap();
  4818. /**
  4819. * On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
  4820. *
  4821. * @example
  4822. * ```ts
  4823. * injectLocal('MyInjectionKey', 1)
  4824. * const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
  4825. * ```
  4826. *
  4827. * @__NO_SIDE_EFFECTS__
  4828. */
  4829. var injectLocal = (...args) => {
  4830. var _getCurrentInstance;
  4831. const key = args[0];
  4832. const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
  4833. const owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();
  4834. if (owner == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
  4835. if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
  4836. return inject(...args);
  4837. };
  4838. var isClient = typeof window !== "undefined" && typeof document !== "undefined";
  4839. typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
  4840. var isDef = (val) => typeof val !== "undefined";
  4841. var notNullish = (val) => val != null;
  4842. var toString = Object.prototype.toString;
  4843. var isObject = (val) => toString.call(val) === "[object Object]";
  4844. var clamp$1 = (n, min, max) => Math.min(max, Math.max(min, n));
  4845. var noop = () => {};
  4846. var isIOS = /* @__PURE__ */ getIsIOS();
  4847. function getIsIOS() {
  4848. var _window, _window2, _window3;
  4849. return isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
  4850. }
  4851. /**
  4852. * @internal
  4853. */
  4854. function createFilterWrapper(filter, fn) {
  4855. function wrapper(...args) {
  4856. return new Promise((resolve, reject) => {
  4857. Promise.resolve(filter(() => fn.apply(this, args), {
  4858. fn,
  4859. thisArg: this,
  4860. args
  4861. })).then(resolve).catch(reject);
  4862. });
  4863. }
  4864. return wrapper;
  4865. }
  4866. /**
  4867. * Create an EventFilter that debounce the events
  4868. */
  4869. function debounceFilter(ms, options = {}) {
  4870. let timer;
  4871. let maxTimer;
  4872. let lastRejector = noop;
  4873. const _clearTimeout = (timer) => {
  4874. clearTimeout(timer);
  4875. lastRejector();
  4876. lastRejector = noop;
  4877. };
  4878. let lastInvoker;
  4879. const filter = (invoke) => {
  4880. const duration = toValue(ms);
  4881. const maxDuration = toValue(options.maxWait);
  4882. if (timer) _clearTimeout(timer);
  4883. if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
  4884. if (maxTimer) {
  4885. _clearTimeout(maxTimer);
  4886. maxTimer = void 0;
  4887. }
  4888. return Promise.resolve(invoke());
  4889. }
  4890. return new Promise((resolve, reject) => {
  4891. lastRejector = options.rejectOnCancel ? reject : resolve;
  4892. lastInvoker = invoke;
  4893. if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
  4894. if (timer) _clearTimeout(timer);
  4895. maxTimer = void 0;
  4896. resolve(lastInvoker());
  4897. }, maxDuration);
  4898. timer = setTimeout(() => {
  4899. if (maxTimer) _clearTimeout(maxTimer);
  4900. maxTimer = void 0;
  4901. resolve(invoke());
  4902. }, duration);
  4903. });
  4904. };
  4905. return filter;
  4906. }
  4907. function throttleFilter(...args) {
  4908. let lastExec = 0;
  4909. let timer;
  4910. let isLeading = true;
  4911. let lastRejector = noop;
  4912. let lastValue;
  4913. let ms;
  4914. let trailing;
  4915. let leading;
  4916. let rejectOnCancel;
  4917. if (!isRef(args[0]) && typeof args[0] === "object") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);
  4918. else [ms, trailing = true, leading = true, rejectOnCancel = false] = args;
  4919. const clear = () => {
  4920. if (timer) {
  4921. clearTimeout(timer);
  4922. timer = void 0;
  4923. lastRejector();
  4924. lastRejector = noop;
  4925. }
  4926. };
  4927. const filter = (_invoke) => {
  4928. const duration = toValue(ms);
  4929. const elapsed = Date.now() - lastExec;
  4930. const invoke = () => {
  4931. return lastValue = _invoke();
  4932. };
  4933. clear();
  4934. if (duration <= 0) {
  4935. lastExec = Date.now();
  4936. return invoke();
  4937. }
  4938. if (elapsed > duration) {
  4939. lastExec = Date.now();
  4940. if (leading || !isLeading) invoke();
  4941. } else if (trailing) lastValue = new Promise((resolve, reject) => {
  4942. lastRejector = rejectOnCancel ? reject : resolve;
  4943. timer = setTimeout(() => {
  4944. lastExec = Date.now();
  4945. isLeading = true;
  4946. resolve(invoke());
  4947. clear();
  4948. }, Math.max(0, duration - elapsed));
  4949. });
  4950. if (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);
  4951. isLeading = false;
  4952. return lastValue;
  4953. };
  4954. return filter;
  4955. }
  4956. /**
  4957. * Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
  4958. */
  4959. function pxValue(px) {
  4960. return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
  4961. }
  4962. function toArray(value) {
  4963. return Array.isArray(value) ? value : [value];
  4964. }
  4965. function getLifeCycleTarget(target) {
  4966. return target || getCurrentInstance();
  4967. }
  4968. /**
  4969. * Converts ref to reactive.
  4970. *
  4971. * @see https://vueuse.org/toReactive
  4972. * @param objectRef A ref of object
  4973. */
  4974. function toReactive(objectRef) {
  4975. if (!isRef(objectRef)) return reactive(objectRef);
  4976. return reactive(new Proxy({}, {
  4977. get(_, p, receiver) {
  4978. return unref(Reflect.get(objectRef.value, p, receiver));
  4979. },
  4980. set(_, p, value) {
  4981. if (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;
  4982. else objectRef.value[p] = value;
  4983. return true;
  4984. },
  4985. deleteProperty(_, p) {
  4986. return Reflect.deleteProperty(objectRef.value, p);
  4987. },
  4988. has(_, p) {
  4989. return Reflect.has(objectRef.value, p);
  4990. },
  4991. ownKeys() {
  4992. return Object.keys(objectRef.value);
  4993. },
  4994. getOwnPropertyDescriptor() {
  4995. return {
  4996. enumerable: true,
  4997. configurable: true
  4998. };
  4999. }
  5000. }));
  5001. }
  5002. /**
  5003. * Computed reactive object.
  5004. */
  5005. function reactiveComputed(fn) {
  5006. return toReactive(computed(fn));
  5007. }
  5008. /**
  5009. * Debounce execution of a function.
  5010. *
  5011. * @see https://vueuse.org/useDebounceFn
  5012. * @param fn A function to be executed after delay milliseconds debounced.
  5013. * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
  5014. * @param options Options
  5015. *
  5016. * @return A new, debounce, function.
  5017. *
  5018. * @__NO_SIDE_EFFECTS__
  5019. */
  5020. function useDebounceFn(fn, ms = 200, options = {}) {
  5021. return createFilterWrapper(debounceFilter(ms, options), fn);
  5022. }
  5023. /**
  5024. * Debounce updates of a ref.
  5025. *
  5026. * @return A new debounced ref.
  5027. */
  5028. function refDebounced(value, ms = 200, options = {}) {
  5029. const debounced = ref(toValue(value));
  5030. const updater = useDebounceFn(() => {
  5031. debounced.value = value.value;
  5032. }, ms, options);
  5033. watch(value, () => updater());
  5034. return shallowReadonly(debounced);
  5035. }
  5036. /**
  5037. * Throttle execution of a function. Especially useful for rate limiting
  5038. * execution of handlers on events like resize and scroll.
  5039. *
  5040. * @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
  5041. * to `callback` when the throttled-function is executed.
  5042. * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
  5043. * (default value: 200)
  5044. *
  5045. * @param [trailing] if true, call fn again after the time is up (default value: false)
  5046. *
  5047. * @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true)
  5048. *
  5049. * @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false)
  5050. *
  5051. * @return A new, throttled, function.
  5052. *
  5053. * @__NO_SIDE_EFFECTS__
  5054. */
  5055. function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
  5056. return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
  5057. }
  5058. /**
  5059. * Call onMounted() if it's inside a component lifecycle, if not, just call the function
  5060. *
  5061. * @param fn
  5062. * @param sync if set to false, it will run in the nextTick() of Vue
  5063. * @param target
  5064. */
  5065. function tryOnMounted(fn, sync = true, target) {
  5066. if (getLifeCycleTarget(target)) onMounted(fn, target);
  5067. else if (sync) fn();
  5068. else nextTick(fn);
  5069. }
  5070. /**
  5071. * Wrapper for `setTimeout` with controls.
  5072. *
  5073. * @param cb
  5074. * @param interval
  5075. * @param options
  5076. */
  5077. function useTimeoutFn(cb, interval, options = {}) {
  5078. const { immediate = true, immediateCallback = false } = options;
  5079. const isPending = shallowRef(false);
  5080. let timer;
  5081. function clear() {
  5082. if (timer) {
  5083. clearTimeout(timer);
  5084. timer = void 0;
  5085. }
  5086. }
  5087. function stop() {
  5088. isPending.value = false;
  5089. clear();
  5090. }
  5091. function start(...args) {
  5092. if (immediateCallback) cb();
  5093. clear();
  5094. isPending.value = true;
  5095. timer = setTimeout(() => {
  5096. isPending.value = false;
  5097. timer = void 0;
  5098. cb(...args);
  5099. }, toValue(interval));
  5100. }
  5101. if (immediate) {
  5102. isPending.value = true;
  5103. if (isClient) start();
  5104. }
  5105. tryOnScopeDispose(stop);
  5106. return {
  5107. isPending: shallowReadonly(isPending),
  5108. start,
  5109. stop
  5110. };
  5111. }
  5112. /**
  5113. * Shorthand for watching value with {immediate: true}
  5114. *
  5115. * @see https://vueuse.org/watchImmediate
  5116. */
  5117. function watchImmediate(source, cb, options) {
  5118. return watch(source, cb, {
  5119. ...options,
  5120. immediate: true
  5121. });
  5122. }
  5123. //#endregion
  5124. //#region node_modules/@vueuse/core/dist/index.js
  5125. var defaultWindow = isClient ? window : void 0;
  5126. var defaultDocument = isClient ? window.document : void 0;
  5127. isClient && window.navigator;
  5128. isClient && window.location;
  5129. /**
  5130. * Get the dom element of a ref of element or Vue component instance
  5131. *
  5132. * @param elRef
  5133. */
  5134. function unrefElement(elRef) {
  5135. var _$el;
  5136. const plain = toValue(elRef);
  5137. return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
  5138. }
  5139. function useEventListener(...args) {
  5140. const register = (el, event, listener, options) => {
  5141. el.addEventListener(event, listener, options);
  5142. return () => el.removeEventListener(event, listener, options);
  5143. };
  5144. const firstParamTargets = computed(() => {
  5145. const test = toArray(toValue(args[0])).filter((e) => e != null);
  5146. return test.every((e) => typeof e !== "string") ? test : void 0;
  5147. });
  5148. return watchImmediate(() => {
  5149. var _firstParamTargets$va, _firstParamTargets$va2;
  5150. return [
  5151. (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
  5152. toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
  5153. toArray(unref(firstParamTargets.value ? args[2] : args[1])),
  5154. toValue(firstParamTargets.value ? args[3] : args[2])
  5155. ];
  5156. }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
  5157. if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
  5158. const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
  5159. const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
  5160. onCleanup(() => {
  5161. cleanups.forEach((fn) => fn());
  5162. });
  5163. }, { flush: "post" });
  5164. }
  5165. var _iOSWorkaround = false;
  5166. function onClickOutside(target, handler, options = {}) {
  5167. const { window = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;
  5168. if (!window) return controls ? {
  5169. stop: noop,
  5170. cancel: noop,
  5171. trigger: noop
  5172. } : noop;
  5173. if (isIOS && !_iOSWorkaround) {
  5174. _iOSWorkaround = true;
  5175. const listenerOptions = { passive: true };
  5176. Array.from(window.document.body.children).forEach((el) => el.addEventListener("click", noop, listenerOptions));
  5177. window.document.documentElement.addEventListener("click", noop, listenerOptions);
  5178. }
  5179. let shouldListen = true;
  5180. const shouldIgnore = (event) => {
  5181. return toValue(ignore).some((target) => {
  5182. if (typeof target === "string") return Array.from(window.document.querySelectorAll(target)).some((el) => el === event.target || event.composedPath().includes(el));
  5183. else {
  5184. const el = unrefElement(target);
  5185. return el && (event.target === el || event.composedPath().includes(el));
  5186. }
  5187. });
  5188. };
  5189. /**
  5190. * Determines if the given target has multiple root elements.
  5191. * Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21
  5192. */
  5193. function hasMultipleRoots(target) {
  5194. const vm = toValue(target);
  5195. return vm && vm.$.subTree.shapeFlag === 16;
  5196. }
  5197. function checkMultipleRoots(target, event) {
  5198. const vm = toValue(target);
  5199. const children = vm.$.subTree && vm.$.subTree.children;
  5200. if (children == null || !Array.isArray(children)) return false;
  5201. return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
  5202. }
  5203. const listener = (event) => {
  5204. const el = unrefElement(target);
  5205. if (event.target == null) return;
  5206. if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
  5207. if (!el || el === event.target || event.composedPath().includes(el)) return;
  5208. if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
  5209. if (!shouldListen) {
  5210. shouldListen = true;
  5211. return;
  5212. }
  5213. handler(event);
  5214. };
  5215. let isProcessingClick = false;
  5216. const cleanup = [
  5217. useEventListener(window, "click", (event) => {
  5218. if (!isProcessingClick) {
  5219. isProcessingClick = true;
  5220. setTimeout(() => {
  5221. isProcessingClick = false;
  5222. }, 0);
  5223. listener(event);
  5224. }
  5225. }, {
  5226. passive: true,
  5227. capture
  5228. }),
  5229. useEventListener(window, "pointerdown", (e) => {
  5230. const el = unrefElement(target);
  5231. shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
  5232. }, { passive: true }),
  5233. detectIframe && useEventListener(window, "blur", (event) => {
  5234. setTimeout(() => {
  5235. const el = unrefElement(target);
  5236. let activeEl = window.document.activeElement;
  5237. while (activeEl === null || activeEl === void 0 ? void 0 : activeEl.shadowRoot) activeEl = activeEl.shadowRoot.activeElement;
  5238. if ((activeEl === null || activeEl === void 0 ? void 0 : activeEl.tagName) === "IFRAME" && !(el === null || el === void 0 ? void 0 : el.contains(window.document.activeElement))) handler(event);
  5239. }, 0);
  5240. }, { passive: true })
  5241. ].filter(Boolean);
  5242. const stop = () => cleanup.forEach((fn) => fn());
  5243. if (controls) return {
  5244. stop,
  5245. cancel: () => {
  5246. shouldListen = false;
  5247. },
  5248. trigger: (event) => {
  5249. shouldListen = true;
  5250. listener(event);
  5251. shouldListen = false;
  5252. }
  5253. };
  5254. return stop;
  5255. }
  5256. /**
  5257. * Mounted state in ref.
  5258. *
  5259. * @see https://vueuse.org/useMounted
  5260. *
  5261. * @__NO_SIDE_EFFECTS__
  5262. */
  5263. function useMounted() {
  5264. const isMounted = shallowRef(false);
  5265. const instance = getCurrentInstance();
  5266. if (instance) onMounted(() => {
  5267. isMounted.value = true;
  5268. }, instance);
  5269. return isMounted;
  5270. }
  5271. /* @__NO_SIDE_EFFECTS__ */
  5272. function useSupported(callback) {
  5273. const isMounted = useMounted();
  5274. return computed(() => {
  5275. isMounted.value;
  5276. return Boolean(callback());
  5277. });
  5278. }
  5279. /**
  5280. * Watch for changes being made to the DOM tree.
  5281. *
  5282. * @see https://vueuse.org/useMutationObserver
  5283. * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN
  5284. * @param target
  5285. * @param callback
  5286. * @param options
  5287. */
  5288. function useMutationObserver(target, callback, options = {}) {
  5289. const { window = defaultWindow, ...mutationOptions } = options;
  5290. let observer;
  5291. const isSupported = /* @__PURE__ */ useSupported(() => window && "MutationObserver" in window);
  5292. const cleanup = () => {
  5293. if (observer) {
  5294. observer.disconnect();
  5295. observer = void 0;
  5296. }
  5297. };
  5298. const stopWatch = watch(computed(() => {
  5299. const items = toArray(toValue(target)).map(unrefElement).filter(notNullish);
  5300. return new Set(items);
  5301. }), (newTargets) => {
  5302. cleanup();
  5303. if (isSupported.value && newTargets.size) {
  5304. observer = new MutationObserver(callback);
  5305. newTargets.forEach((el) => observer.observe(el, mutationOptions));
  5306. }
  5307. }, {
  5308. immediate: true,
  5309. flush: "post"
  5310. });
  5311. const takeRecords = () => {
  5312. return observer === null || observer === void 0 ? void 0 : observer.takeRecords();
  5313. };
  5314. const stop = () => {
  5315. stopWatch();
  5316. cleanup();
  5317. };
  5318. tryOnScopeDispose(stop);
  5319. return {
  5320. isSupported,
  5321. stop,
  5322. takeRecords
  5323. };
  5324. }
  5325. /**
  5326. * Fires when the element or any element containing it is removed.
  5327. *
  5328. * @param target
  5329. * @param callback
  5330. * @param options
  5331. */
  5332. function onElementRemoval(target, callback, options = {}) {
  5333. const { window = defaultWindow, document = window === null || window === void 0 ? void 0 : window.document, flush = "sync" } = options;
  5334. if (!window || !document) return noop;
  5335. let stopFn;
  5336. const cleanupAndUpdate = (fn) => {
  5337. stopFn === null || stopFn === void 0 || stopFn();
  5338. stopFn = fn;
  5339. };
  5340. const stopWatch = watchEffect(() => {
  5341. const el = unrefElement(target);
  5342. if (el) {
  5343. const { stop } = useMutationObserver(document, (mutationsList) => {
  5344. if (mutationsList.map((mutation) => [...mutation.removedNodes]).flat().some((node) => node === el || node.contains(el))) callback(mutationsList);
  5345. }, {
  5346. window,
  5347. childList: true,
  5348. subtree: true
  5349. });
  5350. cleanupAndUpdate(stop);
  5351. }
  5352. }, { flush });
  5353. const stopHandle = () => {
  5354. stopWatch();
  5355. cleanupAndUpdate();
  5356. };
  5357. tryOnScopeDispose(stopHandle);
  5358. return stopHandle;
  5359. }
  5360. /**
  5361. * Reactive `document.activeElement`
  5362. *
  5363. * @see https://vueuse.org/useActiveElement
  5364. * @param options
  5365. *
  5366. * @__NO_SIDE_EFFECTS__
  5367. */
  5368. function useActiveElement(options = {}) {
  5369. var _options$document;
  5370. const { window = defaultWindow, deep = true, triggerOnRemoval = false } = options;
  5371. const document = (_options$document = options.document) !== null && _options$document !== void 0 ? _options$document : window === null || window === void 0 ? void 0 : window.document;
  5372. const getDeepActiveElement = () => {
  5373. let element = document === null || document === void 0 ? void 0 : document.activeElement;
  5374. if (deep) {
  5375. var _element$shadowRoot;
  5376. while (element === null || element === void 0 ? void 0 : element.shadowRoot) element = element === null || element === void 0 || (_element$shadowRoot = element.shadowRoot) === null || _element$shadowRoot === void 0 ? void 0 : _element$shadowRoot.activeElement;
  5377. }
  5378. return element;
  5379. };
  5380. const activeElement = shallowRef();
  5381. const trigger = () => {
  5382. activeElement.value = getDeepActiveElement();
  5383. };
  5384. if (window) {
  5385. const listenerOptions = {
  5386. capture: true,
  5387. passive: true
  5388. };
  5389. useEventListener(window, "blur", (event) => {
  5390. if (event.relatedTarget !== null) return;
  5391. trigger();
  5392. }, listenerOptions);
  5393. useEventListener(window, "focus", trigger, listenerOptions);
  5394. }
  5395. if (triggerOnRemoval) onElementRemoval(activeElement, trigger, { document });
  5396. trigger();
  5397. return activeElement;
  5398. }
  5399. var ssrWidthSymbol = Symbol("vueuse-ssr-width");
  5400. /* @__NO_SIDE_EFFECTS__ */
  5401. function useSSRWidth() {
  5402. const ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
  5403. return typeof ssrWidth === "number" ? ssrWidth : void 0;
  5404. }
  5405. /**
  5406. * Reactive Media Query.
  5407. *
  5408. * @see https://vueuse.org/useMediaQuery
  5409. * @param query
  5410. * @param options
  5411. */
  5412. function useMediaQuery(query, options = {}) {
  5413. const { window = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;
  5414. const isSupported = /* @__PURE__ */ useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
  5415. const ssrSupport = shallowRef(typeof ssrWidth === "number");
  5416. const mediaQuery = shallowRef();
  5417. const matches = shallowRef(false);
  5418. const handler = (event) => {
  5419. matches.value = event.matches;
  5420. };
  5421. watchEffect(() => {
  5422. if (ssrSupport.value) {
  5423. ssrSupport.value = !isSupported.value;
  5424. matches.value = toValue(query).split(",").some((queryString) => {
  5425. const not = queryString.includes("not all");
  5426. const minWidth = queryString.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
  5427. const maxWidth = queryString.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
  5428. let res = Boolean(minWidth || maxWidth);
  5429. if (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);
  5430. if (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);
  5431. return not ? !res : res;
  5432. });
  5433. return;
  5434. }
  5435. if (!isSupported.value) return;
  5436. mediaQuery.value = window.matchMedia(toValue(query));
  5437. matches.value = mediaQuery.value.matches;
  5438. });
  5439. useEventListener(mediaQuery, "change", handler, { passive: true });
  5440. return computed(() => matches.value);
  5441. }
  5442. function cloneFnJSON(source) {
  5443. return JSON.parse(JSON.stringify(source));
  5444. }
  5445. /**
  5446. * Manipulate CSS variables.
  5447. *
  5448. * @see https://vueuse.org/useCssVar
  5449. * @param prop
  5450. * @param target
  5451. * @param options
  5452. */
  5453. function useCssVar(prop, target, options = {}) {
  5454. const { window = defaultWindow, initialValue, observe = false } = options;
  5455. const variable = shallowRef(initialValue);
  5456. const elRef = computed(() => {
  5457. var _window$document;
  5458. return unrefElement(target) || (window === null || window === void 0 || (_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);
  5459. });
  5460. function updateCssVar() {
  5461. const key = toValue(prop);
  5462. const el = toValue(elRef);
  5463. if (el && window && key) {
  5464. var _window$getComputedSt;
  5465. variable.value = ((_window$getComputedSt = window.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;
  5466. }
  5467. }
  5468. if (observe) useMutationObserver(elRef, updateCssVar, {
  5469. attributeFilter: ["style", "class"],
  5470. window
  5471. });
  5472. watch([elRef, () => toValue(prop)], (_, old) => {
  5473. if (old[0] && old[1]) old[0].style.removeProperty(old[1]);
  5474. updateCssVar();
  5475. }, { immediate: true });
  5476. watch([variable, elRef], ([val, el]) => {
  5477. const raw_prop = toValue(prop);
  5478. if ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);
  5479. else el.style.setProperty(raw_prop, val);
  5480. }, { immediate: true });
  5481. return variable;
  5482. }
  5483. /**
  5484. * Reactively track `document.visibilityState`.
  5485. *
  5486. * @see https://vueuse.org/useDocumentVisibility
  5487. *
  5488. * @__NO_SIDE_EFFECTS__
  5489. */
  5490. function useDocumentVisibility(options = {}) {
  5491. const { document = defaultDocument } = options;
  5492. if (!document) return shallowRef("visible");
  5493. const visibility = shallowRef(document.visibilityState);
  5494. useEventListener(document, "visibilitychange", () => {
  5495. visibility.value = document.visibilityState;
  5496. }, { passive: true });
  5497. return visibility;
  5498. }
  5499. /**
  5500. * Reports changes to the dimensions of an Element's content or the border-box
  5501. *
  5502. * @see https://vueuse.org/useResizeObserver
  5503. * @param target
  5504. * @param callback
  5505. * @param options
  5506. */
  5507. function useResizeObserver(target, callback, options = {}) {
  5508. const { window = defaultWindow, ...observerOptions } = options;
  5509. let observer;
  5510. const isSupported = /* @__PURE__ */ useSupported(() => window && "ResizeObserver" in window);
  5511. const cleanup = () => {
  5512. if (observer) {
  5513. observer.disconnect();
  5514. observer = void 0;
  5515. }
  5516. };
  5517. const stopWatch = watch(computed(() => {
  5518. const _targets = toValue(target);
  5519. return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
  5520. }), (els) => {
  5521. cleanup();
  5522. if (isSupported.value && window) {
  5523. observer = new ResizeObserver(callback);
  5524. for (const _el of els) if (_el) observer.observe(_el, observerOptions);
  5525. }
  5526. }, {
  5527. immediate: true,
  5528. flush: "post"
  5529. });
  5530. const stop = () => {
  5531. cleanup();
  5532. stopWatch();
  5533. };
  5534. tryOnScopeDispose(stop);
  5535. return {
  5536. isSupported,
  5537. stop
  5538. };
  5539. }
  5540. /**
  5541. * Reactive bounding box of an HTML element.
  5542. *
  5543. * @see https://vueuse.org/useElementBounding
  5544. * @param target
  5545. */
  5546. function useElementBounding(target, options = {}) {
  5547. const { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = "sync" } = options;
  5548. const height = shallowRef(0);
  5549. const bottom = shallowRef(0);
  5550. const left = shallowRef(0);
  5551. const right = shallowRef(0);
  5552. const top = shallowRef(0);
  5553. const width = shallowRef(0);
  5554. const x = shallowRef(0);
  5555. const y = shallowRef(0);
  5556. function recalculate() {
  5557. const el = unrefElement(target);
  5558. if (!el) {
  5559. if (reset) {
  5560. height.value = 0;
  5561. bottom.value = 0;
  5562. left.value = 0;
  5563. right.value = 0;
  5564. top.value = 0;
  5565. width.value = 0;
  5566. x.value = 0;
  5567. y.value = 0;
  5568. }
  5569. return;
  5570. }
  5571. const rect = el.getBoundingClientRect();
  5572. height.value = rect.height;
  5573. bottom.value = rect.bottom;
  5574. left.value = rect.left;
  5575. right.value = rect.right;
  5576. top.value = rect.top;
  5577. width.value = rect.width;
  5578. x.value = rect.x;
  5579. y.value = rect.y;
  5580. }
  5581. function update() {
  5582. if (updateTiming === "sync") recalculate();
  5583. else if (updateTiming === "next-frame") requestAnimationFrame(() => recalculate());
  5584. }
  5585. useResizeObserver(target, update);
  5586. watch(() => unrefElement(target), (ele) => !ele && update());
  5587. useMutationObserver(target, update, { attributeFilter: ["style", "class"] });
  5588. if (windowScroll) useEventListener("scroll", update, {
  5589. capture: true,
  5590. passive: true
  5591. });
  5592. if (windowResize) useEventListener("resize", update, { passive: true });
  5593. tryOnMounted(() => {
  5594. if (immediate) update();
  5595. });
  5596. return {
  5597. height,
  5598. bottom,
  5599. left,
  5600. right,
  5601. top,
  5602. width,
  5603. x,
  5604. y,
  5605. update
  5606. };
  5607. }
  5608. /**
  5609. * Reactive size of an HTML element.
  5610. *
  5611. * @see https://vueuse.org/useElementSize
  5612. */
  5613. function useElementSize(target, initialSize = {
  5614. width: 0,
  5615. height: 0
  5616. }, options = {}) {
  5617. const { window = defaultWindow, box = "content-box" } = options;
  5618. const isSVG = computed(() => {
  5619. var _unrefElement;
  5620. return (_unrefElement = unrefElement(target)) === null || _unrefElement === void 0 || (_unrefElement = _unrefElement.namespaceURI) === null || _unrefElement === void 0 ? void 0 : _unrefElement.includes("svg");
  5621. });
  5622. const width = shallowRef(initialSize.width);
  5623. const height = shallowRef(initialSize.height);
  5624. const { stop: stop1 } = useResizeObserver(target, ([entry]) => {
  5625. const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
  5626. if (window && isSVG.value) {
  5627. const $elem = unrefElement(target);
  5628. if ($elem) {
  5629. const rect = $elem.getBoundingClientRect();
  5630. width.value = rect.width;
  5631. height.value = rect.height;
  5632. }
  5633. } else if (boxSize) {
  5634. const formatBoxSize = toArray(boxSize);
  5635. width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
  5636. height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
  5637. } else {
  5638. width.value = entry.contentRect.width;
  5639. height.value = entry.contentRect.height;
  5640. }
  5641. }, options);
  5642. tryOnMounted(() => {
  5643. const ele = unrefElement(target);
  5644. if (ele) {
  5645. width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
  5646. height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
  5647. }
  5648. });
  5649. const stop2 = watch(() => unrefElement(target), (ele) => {
  5650. width.value = ele ? initialSize.width : 0;
  5651. height.value = ele ? initialSize.height : 0;
  5652. });
  5653. function stop() {
  5654. stop1();
  5655. stop2();
  5656. }
  5657. return {
  5658. width,
  5659. height,
  5660. stop
  5661. };
  5662. }
  5663. /**
  5664. * Detects changes to a target element's visibility.
  5665. *
  5666. * @see https://vueuse.org/useIntersectionObserver
  5667. * @param target
  5668. * @param callback
  5669. * @param options
  5670. */
  5671. function useIntersectionObserver(target, callback, options = {}) {
  5672. const { root, rootMargin, threshold = 0, window = defaultWindow, immediate = true } = options;
  5673. const isSupported = /* @__PURE__ */ useSupported(() => window && "IntersectionObserver" in window);
  5674. const targets = computed(() => {
  5675. return toArray(toValue(target)).map(unrefElement).filter(notNullish);
  5676. });
  5677. let cleanup = noop;
  5678. const isActive = shallowRef(immediate);
  5679. const stopWatch = isSupported.value ? watch(() => [
  5680. targets.value,
  5681. unrefElement(root),
  5682. toValue(rootMargin),
  5683. isActive.value
  5684. ], ([targets, root, rootMargin]) => {
  5685. cleanup();
  5686. if (!isActive.value) return;
  5687. if (!targets.length) return;
  5688. const observer = new IntersectionObserver(callback, {
  5689. root: unrefElement(root),
  5690. rootMargin,
  5691. threshold
  5692. });
  5693. targets.forEach((el) => el && observer.observe(el));
  5694. cleanup = () => {
  5695. observer.disconnect();
  5696. cleanup = noop;
  5697. };
  5698. }, {
  5699. immediate,
  5700. flush: "post"
  5701. }) : noop;
  5702. const stop = () => {
  5703. cleanup();
  5704. stopWatch();
  5705. isActive.value = false;
  5706. };
  5707. tryOnScopeDispose(stop);
  5708. return {
  5709. isSupported,
  5710. isActive,
  5711. pause() {
  5712. cleanup();
  5713. isActive.value = false;
  5714. },
  5715. resume() {
  5716. isActive.value = true;
  5717. },
  5718. stop
  5719. };
  5720. }
  5721. Number.POSITIVE_INFINITY;
  5722. /**
  5723. * Shorthand for v-model binding, props + emit -> ref
  5724. *
  5725. * @see https://vueuse.org/useVModel
  5726. * @param props
  5727. * @param key (default 'modelValue')
  5728. * @param emit
  5729. * @param options
  5730. *
  5731. * @__NO_SIDE_EFFECTS__
  5732. */
  5733. function useVModel(props, key, emit, options = {}) {
  5734. var _vm$$emit, _vm$proxy;
  5735. const { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;
  5736. const vm = getCurrentInstance();
  5737. const _emit = emit || (vm === null || vm === void 0 ? void 0 : vm.emit) || (vm === null || vm === void 0 || (_vm$$emit = vm.$emit) === null || _vm$$emit === void 0 ? void 0 : _vm$$emit.bind(vm)) || (vm === null || vm === void 0 || (_vm$proxy = vm.proxy) === null || _vm$proxy === void 0 || (_vm$proxy = _vm$proxy.$emit) === null || _vm$proxy === void 0 ? void 0 : _vm$proxy.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));
  5738. let event = eventName;
  5739. if (!key) key = "modelValue";
  5740. event = event || `update:${key.toString()}`;
  5741. const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
  5742. const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
  5743. const triggerEmit = (value) => {
  5744. if (shouldEmit) {
  5745. if (shouldEmit(value)) _emit(event, value);
  5746. } else _emit(event, value);
  5747. };
  5748. if (passive) {
  5749. const proxy = ref(getValue());
  5750. let isUpdating = false;
  5751. watch(() => props[key], (v) => {
  5752. if (!isUpdating) {
  5753. isUpdating = true;
  5754. proxy.value = cloneFn(v);
  5755. nextTick(() => isUpdating = false);
  5756. }
  5757. });
  5758. watch(proxy, (v) => {
  5759. if (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);
  5760. }, { deep });
  5761. return proxy;
  5762. } else return computed({
  5763. get() {
  5764. return getValue();
  5765. },
  5766. set(value) {
  5767. triggerEmit(value);
  5768. }
  5769. });
  5770. }
  5771. /**
  5772. * Reactively track window focus with `window.onfocus` and `window.onblur`.
  5773. *
  5774. * @see https://vueuse.org/useWindowFocus
  5775. *
  5776. * @__NO_SIDE_EFFECTS__
  5777. */
  5778. function useWindowFocus(options = {}) {
  5779. const { window = defaultWindow } = options;
  5780. if (!window) return shallowRef(false);
  5781. const focused = shallowRef(window.document.hasFocus());
  5782. const listenerOptions = { passive: true };
  5783. useEventListener(window, "blur", () => {
  5784. focused.value = false;
  5785. }, listenerOptions);
  5786. useEventListener(window, "focus", () => {
  5787. focused.value = true;
  5788. }, listenerOptions);
  5789. return focused;
  5790. }
  5791. /**
  5792. * Reactive window size.
  5793. *
  5794. * @see https://vueuse.org/useWindowSize
  5795. * @param options
  5796. *
  5797. * @__NO_SIDE_EFFECTS__
  5798. */
  5799. function useWindowSize(options = {}) {
  5800. const { window = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options;
  5801. const width = shallowRef(initialWidth);
  5802. const height = shallowRef(initialHeight);
  5803. const update = () => {
  5804. if (window) if (type === "outer") {
  5805. width.value = window.outerWidth;
  5806. height.value = window.outerHeight;
  5807. } else if (type === "visual" && window.visualViewport) {
  5808. const { width: visualViewportWidth, height: visualViewportHeight, scale } = window.visualViewport;
  5809. width.value = Math.round(visualViewportWidth * scale);
  5810. height.value = Math.round(visualViewportHeight * scale);
  5811. } else if (includeScrollbar) {
  5812. width.value = window.innerWidth;
  5813. height.value = window.innerHeight;
  5814. } else {
  5815. width.value = window.document.documentElement.clientWidth;
  5816. height.value = window.document.documentElement.clientHeight;
  5817. }
  5818. };
  5819. update();
  5820. tryOnMounted(update);
  5821. const listenerOptions = { passive: true };
  5822. useEventListener("resize", update, listenerOptions);
  5823. if (window && type === "visual" && window.visualViewport) useEventListener(window.visualViewport, "resize", update, listenerOptions);
  5824. if (listenOrientation) watch(useMediaQuery("(orientation: portrait)"), () => update());
  5825. return {
  5826. width,
  5827. height
  5828. };
  5829. }
  5830. //#endregion
  5831. //#region node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
  5832. function useCalcInputWidth() {
  5833. const calculatorRef = shallowRef();
  5834. const calculatorWidth = ref(0);
  5835. const inputStyle = computed(() => ({ minWidth: `${Math.max(calculatorWidth.value, 11)}px` }));
  5836. const resetCalculatorWidth = () => {
  5837. calculatorWidth.value = calculatorRef.value?.getBoundingClientRect().width ?? 0;
  5838. };
  5839. useResizeObserver(calculatorRef, resetCalculatorWidth);
  5840. return {
  5841. calculatorRef,
  5842. calculatorWidth,
  5843. inputStyle
  5844. };
  5845. }
  5846. //#endregion
  5847. //#region node_modules/element-plus/es/hooks/use-deprecated/index.mjs
  5848. var useDeprecated = ({ from, replacement, scope, version, ref, type = "API" }, condition) => {
  5849. watch(() => unref(condition), (val) => {
  5850. if (val) debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
  5851. For more detail, please visit: ${ref}
  5852. `);
  5853. }, { immediate: true });
  5854. };
  5855. //#endregion
  5856. //#region node_modules/element-plus/es/utils/dom/aria.mjs
  5857. var FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])`;
  5858. var isShadowRoot$1 = (e) => {
  5859. if (typeof ShadowRoot === "undefined") return false;
  5860. return e instanceof ShadowRoot;
  5861. };
  5862. var isHTMLElement$1 = (e) => {
  5863. if (typeof Element === "undefined") return false;
  5864. return e instanceof Element;
  5865. };
  5866. /**
  5867. * Determine if the testing element is visible on screen no matter if its on the viewport or not
  5868. */
  5869. var isVisible = (element) => {
  5870. return getComputedStyle(element).position === "fixed" ? false : element.offsetParent !== null;
  5871. };
  5872. var obtainAllFocusableElements$1 = (element) => {
  5873. return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
  5874. };
  5875. /**
  5876. * @desc Determine if target element is focusable
  5877. * @param element {HTMLElement}
  5878. * @returns {Boolean} true if it is focusable
  5879. */
  5880. var isFocusable = (element) => {
  5881. if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) return true;
  5882. if (element.tabIndex < 0 || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") return false;
  5883. switch (element.nodeName) {
  5884. case "A": return !!element.href && element.rel !== "ignore";
  5885. case "INPUT": return !(element.type === "hidden" || element.type === "file");
  5886. case "BUTTON":
  5887. case "SELECT":
  5888. case "TEXTAREA": return true;
  5889. default: return false;
  5890. }
  5891. };
  5892. /**
  5893. * Trigger an event
  5894. * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
  5895. * @param {HTMLElement} elm
  5896. * @param {String} name
  5897. * @param {*} opts
  5898. */
  5899. var triggerEvent = function(elm, name, ...opts) {
  5900. let eventName;
  5901. if (name.includes("mouse") || name.includes("click")) eventName = "MouseEvents";
  5902. else if (name.includes("key")) eventName = "KeyboardEvent";
  5903. else eventName = "HTMLEvents";
  5904. const evt = document.createEvent(eventName);
  5905. evt.initEvent(name, ...opts);
  5906. elm.dispatchEvent(evt);
  5907. return elm;
  5908. };
  5909. var isLeaf = (el) => !el.getAttribute("aria-owns");
  5910. var getSibling = (el, distance, elClass) => {
  5911. const { parentNode } = el;
  5912. if (!parentNode) return null;
  5913. const siblings = parentNode.querySelectorAll(elClass);
  5914. return siblings[Array.prototype.indexOf.call(siblings, el) + distance] || null;
  5915. };
  5916. var focusElement = (el, options) => {
  5917. if (!el || !el.focus) return;
  5918. let cleanup = false;
  5919. if (isHTMLElement$1(el) && !isFocusable(el) && !el.getAttribute("tabindex")) {
  5920. el.setAttribute("tabindex", "-1");
  5921. cleanup = true;
  5922. }
  5923. el.focus(options);
  5924. if (isHTMLElement$1(el) && cleanup) el.removeAttribute("tabindex");
  5925. };
  5926. var focusNode = (el) => {
  5927. if (!el) return;
  5928. focusElement(el);
  5929. !isLeaf(el) && el.click();
  5930. };
  5931. //#endregion
  5932. //#region node_modules/element-plus/es/utils/browser.mjs
  5933. var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
  5934. var isAndroid = () => isClient && /android/i.test(window.navigator.userAgent);
  5935. //#endregion
  5936. //#region node_modules/element-plus/es/utils/strings.mjs
  5937. /**
  5938. * fork from {@link https://github.com/sindresorhus/escape-string-regexp}
  5939. */
  5940. var escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
  5941. var capitalize = (str) => capitalize$1(str);
  5942. //#endregion
  5943. //#region node_modules/element-plus/es/utils/dom/style.mjs
  5944. var SCOPE$12 = "utils/dom/style";
  5945. var classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
  5946. var hasClass = (el, cls) => {
  5947. if (!el || !cls) return false;
  5948. if (cls.includes(" ")) throw new Error("className should not contain space.");
  5949. return el.classList.contains(cls);
  5950. };
  5951. var addClass = (el, cls) => {
  5952. if (!el || !cls.trim()) return;
  5953. el.classList.add(...classNameToArray(cls));
  5954. };
  5955. var removeClass = (el, cls) => {
  5956. if (!el || !cls.trim()) return;
  5957. el.classList.remove(...classNameToArray(cls));
  5958. };
  5959. var getStyle = (element, styleName) => {
  5960. if (!isClient || !element || !styleName || isShadowRoot$1(element)) return "";
  5961. let key = camelize$1(styleName);
  5962. if (key === "float") key = "cssFloat";
  5963. try {
  5964. const style = element.style[key];
  5965. if (style) return style;
  5966. const computed = document.defaultView?.getComputedStyle(element, "");
  5967. return computed ? computed[key] : "";
  5968. } catch {
  5969. return element.style[key];
  5970. }
  5971. };
  5972. var setStyle = (element, styleName, value) => {
  5973. if (!element || !styleName) return;
  5974. if (isObject$2(styleName)) entriesOf(styleName).forEach(([prop, value]) => setStyle(element, prop, value));
  5975. else {
  5976. const key = camelize$1(styleName);
  5977. element.style[key] = value;
  5978. }
  5979. };
  5980. function addUnit(value, defaultUnit = "px") {
  5981. if (!value && value !== 0) return "";
  5982. if (isNumber(value) || isStringNumber(value)) return `${value}${defaultUnit}`;
  5983. else if (isString(value)) return value;
  5984. debugWarn(SCOPE$12, "binding value must be a string or number");
  5985. }
  5986. //#endregion
  5987. //#region node_modules/element-plus/es/hooks/use-draggable/index.mjs
  5988. var useDraggable = (targetRef, dragRef, draggable, overflow) => {
  5989. const transform = {
  5990. offsetX: 0,
  5991. offsetY: 0
  5992. };
  5993. const isDragging = ref(false);
  5994. const adjustPosition = (moveX, moveY) => {
  5995. if (targetRef.value) {
  5996. const { offsetX, offsetY } = transform;
  5997. const targetRect = targetRef.value.getBoundingClientRect();
  5998. const targetLeft = Math.max(targetRect.left, 0);
  5999. const targetTop = Math.max(targetRect.top, 0);
  6000. const targetWidth = targetRect.width;
  6001. const targetHeight = targetRect.height;
  6002. const clientWidth = document.documentElement.clientWidth;
  6003. const clientHeight = document.documentElement.clientHeight;
  6004. const minLeft = -targetLeft + offsetX;
  6005. const minTop = -targetTop + offsetY;
  6006. const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
  6007. const maxTop = clientHeight - targetTop - (targetHeight < clientHeight ? targetHeight : 0) + offsetY;
  6008. if (!overflow?.value) {
  6009. moveX = clamp$2(moveX, minLeft, maxLeft);
  6010. moveY = clamp$2(moveY, minTop, maxTop);
  6011. }
  6012. transform.offsetX = moveX;
  6013. transform.offsetY = moveY;
  6014. targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
  6015. }
  6016. };
  6017. const onMousedown = (e) => {
  6018. const downX = e.clientX;
  6019. const downY = e.clientY;
  6020. const { offsetX, offsetY } = transform;
  6021. const onMousemove = (e) => {
  6022. if (!isDragging.value) isDragging.value = true;
  6023. adjustPosition(offsetX + e.clientX - downX, offsetY + e.clientY - downY);
  6024. };
  6025. const onMouseup = () => {
  6026. isDragging.value = false;
  6027. document.removeEventListener("mousemove", onMousemove);
  6028. document.removeEventListener("mouseup", onMouseup);
  6029. };
  6030. document.addEventListener("mousemove", onMousemove);
  6031. document.addEventListener("mouseup", onMouseup);
  6032. };
  6033. const onDraggable = () => {
  6034. if (dragRef.value && targetRef.value) {
  6035. dragRef.value.addEventListener("mousedown", onMousedown);
  6036. window.addEventListener("resize", updatePosition);
  6037. }
  6038. };
  6039. const offDraggable = () => {
  6040. if (dragRef.value && targetRef.value) {
  6041. dragRef.value.removeEventListener("mousedown", onMousedown);
  6042. window.removeEventListener("resize", updatePosition);
  6043. }
  6044. };
  6045. const resetPosition = () => {
  6046. transform.offsetX = 0;
  6047. transform.offsetY = 0;
  6048. if (targetRef.value) targetRef.value.style.transform = "";
  6049. };
  6050. const updatePosition = () => {
  6051. const { offsetX, offsetY } = transform;
  6052. adjustPosition(offsetX, offsetY);
  6053. };
  6054. onMounted(() => {
  6055. watchEffect(() => {
  6056. if (draggable.value) onDraggable();
  6057. else offDraggable();
  6058. });
  6059. });
  6060. onBeforeUnmount(() => {
  6061. offDraggable();
  6062. });
  6063. return {
  6064. isDragging,
  6065. resetPosition,
  6066. updatePosition
  6067. };
  6068. };
  6069. //#endregion
  6070. //#region node_modules/element-plus/es/hooks/use-focus/index.mjs
  6071. var useFocus = (el) => {
  6072. return { focus: () => {
  6073. el.value?.focus?.();
  6074. } };
  6075. };
  6076. //#endregion
  6077. //#region node_modules/element-plus/es/locale/lang/en.mjs
  6078. var en_default = {
  6079. name: "en",
  6080. el: {
  6081. breadcrumb: { label: "Breadcrumb" },
  6082. colorpicker: {
  6083. confirm: "OK",
  6084. clear: "Clear",
  6085. defaultLabel: "color picker",
  6086. description: "current color is {color}. press enter to select a new color.",
  6087. alphaLabel: "pick alpha value",
  6088. alphaDescription: "alpha {alpha}, current color is {color}",
  6089. hueLabel: "pick hue value",
  6090. hueDescription: "hue {hue}, current color is {color}",
  6091. svLabel: "pick saturation and brightness value",
  6092. svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
  6093. predefineDescription: "select {value} as the color"
  6094. },
  6095. datepicker: {
  6096. now: "Now",
  6097. today: "Today",
  6098. cancel: "Cancel",
  6099. clear: "Clear",
  6100. confirm: "OK",
  6101. dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
  6102. monthTablePrompt: "Use the arrow keys and enter to select the month",
  6103. yearTablePrompt: "Use the arrow keys and enter to select the year",
  6104. selectedDate: "Selected date",
  6105. selectDate: "Select date",
  6106. selectTime: "Select time",
  6107. startDate: "Start Date",
  6108. startTime: "Start Time",
  6109. endDate: "End Date",
  6110. endTime: "End Time",
  6111. prevYear: "Previous Year",
  6112. nextYear: "Next Year",
  6113. prevMonth: "Previous Month",
  6114. nextMonth: "Next Month",
  6115. year: "",
  6116. month1: "January",
  6117. month2: "February",
  6118. month3: "March",
  6119. month4: "April",
  6120. month5: "May",
  6121. month6: "June",
  6122. month7: "July",
  6123. month8: "August",
  6124. month9: "September",
  6125. month10: "October",
  6126. month11: "November",
  6127. month12: "December",
  6128. weeks: {
  6129. sun: "Sun",
  6130. mon: "Mon",
  6131. tue: "Tue",
  6132. wed: "Wed",
  6133. thu: "Thu",
  6134. fri: "Fri",
  6135. sat: "Sat"
  6136. },
  6137. weeksFull: {
  6138. sun: "Sunday",
  6139. mon: "Monday",
  6140. tue: "Tuesday",
  6141. wed: "Wednesday",
  6142. thu: "Thursday",
  6143. fri: "Friday",
  6144. sat: "Saturday"
  6145. },
  6146. months: {
  6147. jan: "Jan",
  6148. feb: "Feb",
  6149. mar: "Mar",
  6150. apr: "Apr",
  6151. may: "May",
  6152. jun: "Jun",
  6153. jul: "Jul",
  6154. aug: "Aug",
  6155. sep: "Sep",
  6156. oct: "Oct",
  6157. nov: "Nov",
  6158. dec: "Dec"
  6159. }
  6160. },
  6161. inputNumber: {
  6162. decrease: "decrease number",
  6163. increase: "increase number"
  6164. },
  6165. select: {
  6166. loading: "Loading",
  6167. noMatch: "No matching data",
  6168. noData: "No data",
  6169. placeholder: "Select"
  6170. },
  6171. mention: { loading: "Loading" },
  6172. dropdown: { toggleDropdown: "Toggle Dropdown" },
  6173. cascader: {
  6174. noMatch: "No matching data",
  6175. loading: "Loading",
  6176. placeholder: "Select",
  6177. noData: "No data"
  6178. },
  6179. pagination: {
  6180. goto: "Go to",
  6181. pagesize: "/page",
  6182. total: "Total {total}",
  6183. pageClassifier: "",
  6184. page: "Page",
  6185. prev: "Go to previous page",
  6186. next: "Go to next page",
  6187. currentPage: "page {pager}",
  6188. prevPages: "Previous {pager} pages",
  6189. nextPages: "Next {pager} pages",
  6190. deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
  6191. },
  6192. dialog: { close: "Close this dialog" },
  6193. drawer: { close: "Close this dialog" },
  6194. messagebox: {
  6195. title: "Message",
  6196. confirm: "OK",
  6197. cancel: "Cancel",
  6198. error: "Illegal input",
  6199. close: "Close this dialog"
  6200. },
  6201. upload: {
  6202. deleteTip: "press delete to remove",
  6203. delete: "Delete",
  6204. preview: "Preview",
  6205. continue: "Continue"
  6206. },
  6207. slider: {
  6208. defaultLabel: "slider between {min} and {max}",
  6209. defaultRangeStartLabel: "pick start value",
  6210. defaultRangeEndLabel: "pick end value"
  6211. },
  6212. table: {
  6213. emptyText: "No Data",
  6214. confirmFilter: "Confirm",
  6215. resetFilter: "Reset",
  6216. clearFilter: "All",
  6217. sumText: "Sum",
  6218. selectAllLabel: "Select all rows",
  6219. selectRowLabel: "Select this row",
  6220. expandRowLabel: "Expand this row",
  6221. collapseRowLabel: "Collapse this row",
  6222. sortLabel: "Sort by {column}",
  6223. filterLabel: "Filter by {column}"
  6224. },
  6225. tag: { close: "Close this tag" },
  6226. tour: {
  6227. next: "Next",
  6228. previous: "Previous",
  6229. finish: "Finish",
  6230. close: "Close this dialog"
  6231. },
  6232. tree: { emptyText: "No Data" },
  6233. transfer: {
  6234. noMatch: "No matching data",
  6235. noData: "No data",
  6236. titles: ["List 1", "List 2"],
  6237. filterPlaceholder: "Enter keyword",
  6238. noCheckedFormat: "{total} items",
  6239. hasCheckedFormat: "{checked}/{total} checked"
  6240. },
  6241. image: { error: "FAILED" },
  6242. pageHeader: { title: "Back" },
  6243. popconfirm: {
  6244. confirmButtonText: "Yes",
  6245. cancelButtonText: "No"
  6246. },
  6247. carousel: {
  6248. leftArrow: "Carousel arrow left",
  6249. rightArrow: "Carousel arrow right",
  6250. indicator: "Carousel switch to index {index}"
  6251. },
  6252. inputOTP: {
  6253. groupLabel: "OTP Input",
  6254. defaultLabel: "Please enter OTP character {index}"
  6255. }
  6256. }
  6257. };
  6258. //#endregion
  6259. //#region node_modules/element-plus/es/hooks/use-locale/index.mjs
  6260. var buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
  6261. var translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => `${option?.[key] ?? `{${key}}`}`);
  6262. var buildLocaleContext = (locale) => {
  6263. return {
  6264. lang: computed(() => unref(locale).name),
  6265. locale: isRef(locale) ? locale : ref(locale),
  6266. t: buildTranslator(locale)
  6267. };
  6268. };
  6269. var localeContextKey = Symbol("localeContextKey");
  6270. var useLocale = (localeOverrides) => {
  6271. const locale = localeOverrides || inject(localeContextKey, ref());
  6272. return buildLocaleContext(computed(() => locale.value || en_default));
  6273. };
  6274. //#endregion
  6275. //#region node_modules/element-plus/es/hooks/use-namespace/index.mjs
  6276. var defaultNamespace = "el";
  6277. var statePrefix = "is-";
  6278. var _bem = (namespace, block, blockSuffix, element, modifier) => {
  6279. let cls = `${namespace}-${block}`;
  6280. if (blockSuffix) cls += `-${blockSuffix}`;
  6281. if (element) cls += `__${element}`;
  6282. if (modifier) cls += `--${modifier}`;
  6283. return cls;
  6284. };
  6285. var namespaceContextKey = Symbol("namespaceContextKey");
  6286. var useGetDerivedNamespace = (namespaceOverrides) => {
  6287. const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref("el")) : ref("el"));
  6288. return computed(() => {
  6289. return unref(derivedNamespace) || "el";
  6290. });
  6291. };
  6292. var useNamespace = (block, namespaceOverrides) => {
  6293. const namespace = useGetDerivedNamespace(namespaceOverrides);
  6294. const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
  6295. const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
  6296. const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
  6297. const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
  6298. const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
  6299. const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
  6300. const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
  6301. const is = (name, ...args) => {
  6302. const state = args.length >= 1 ? args[0] : true;
  6303. return name && state ? `${statePrefix}${name}` : "";
  6304. };
  6305. const cssVar = (object) => {
  6306. const styles = {};
  6307. for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
  6308. return styles;
  6309. };
  6310. const cssVarBlock = (object) => {
  6311. const styles = {};
  6312. for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
  6313. return styles;
  6314. };
  6315. const cssVarName = (name) => `--${namespace.value}-${name}`;
  6316. const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
  6317. return {
  6318. namespace,
  6319. b,
  6320. e,
  6321. m,
  6322. be,
  6323. em,
  6324. bm,
  6325. bem,
  6326. is,
  6327. cssVar,
  6328. cssVarName,
  6329. cssVarBlock,
  6330. cssVarBlockName
  6331. };
  6332. };
  6333. //#endregion
  6334. //#region node_modules/element-plus/es/utils/easings.mjs
  6335. function easeInOutCubic(t, b, c, d) {
  6336. const cc = c - b;
  6337. t /= d / 2;
  6338. if (t < 1) return cc / 2 * t * t * t + b;
  6339. return cc / 2 * ((t -= 2) * t * t + 2) + b;
  6340. }
  6341. //#endregion
  6342. //#region node_modules/element-plus/es/utils/raf.mjs
  6343. var rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
  6344. var cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
  6345. //#endregion
  6346. //#region node_modules/element-plus/es/utils/dom/scroll.mjs
  6347. var isScroll = (el, isVertical) => {
  6348. if (!isClient) return false;
  6349. const key = {
  6350. undefined: "overflow",
  6351. true: "overflow-y",
  6352. false: "overflow-x"
  6353. }[String(isVertical)];
  6354. const overflow = getStyle(el, key);
  6355. return [
  6356. "scroll",
  6357. "auto",
  6358. "overlay"
  6359. ].some((s) => overflow.includes(s));
  6360. };
  6361. var getScrollContainer = (el, isVertical) => {
  6362. if (!isClient) return;
  6363. let parent = el;
  6364. while (parent) {
  6365. if ([
  6366. window,
  6367. document,
  6368. document.documentElement
  6369. ].includes(parent)) return window;
  6370. if (isScroll(parent, isVertical)) return parent;
  6371. if (isShadowRoot$1(parent)) parent = parent.host;
  6372. else parent = parent.parentNode;
  6373. }
  6374. return parent;
  6375. };
  6376. var scrollBarWidth;
  6377. var getScrollBarWidth = (namespace) => {
  6378. if (!isClient) return 0;
  6379. if (scrollBarWidth !== void 0) return scrollBarWidth;
  6380. const outer = document.createElement("div");
  6381. outer.className = `${namespace}-scrollbar__wrap`;
  6382. outer.style.visibility = "hidden";
  6383. outer.style.width = "100px";
  6384. outer.style.position = "absolute";
  6385. outer.style.top = "-9999px";
  6386. document.body.appendChild(outer);
  6387. const widthNoScroll = outer.offsetWidth;
  6388. outer.style.overflow = "scroll";
  6389. const inner = document.createElement("div");
  6390. inner.style.width = "100%";
  6391. outer.appendChild(inner);
  6392. const widthWithScroll = inner.offsetWidth;
  6393. outer.parentNode?.removeChild(outer);
  6394. scrollBarWidth = widthNoScroll - widthWithScroll;
  6395. return scrollBarWidth;
  6396. };
  6397. /**
  6398. * Scroll with in the container element, positioning the **selected** element at the top
  6399. * of the container
  6400. */
  6401. function scrollIntoView(container, selected) {
  6402. if (!isClient) return;
  6403. if (!selected) {
  6404. container.scrollTop = 0;
  6405. return;
  6406. }
  6407. const offsetParents = [];
  6408. let pointer = selected.offsetParent;
  6409. while (pointer !== null && container !== pointer && container.contains(pointer)) {
  6410. offsetParents.push(pointer);
  6411. pointer = pointer.offsetParent;
  6412. }
  6413. const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
  6414. const bottom = top + selected.offsetHeight;
  6415. const viewRectTop = container.scrollTop;
  6416. const viewRectBottom = viewRectTop + container.clientHeight;
  6417. if (top < viewRectTop) container.scrollTop = top;
  6418. else if (bottom > viewRectBottom) container.scrollTop = bottom - container.clientHeight;
  6419. }
  6420. function animateScrollTo(container, from, to, duration, callback) {
  6421. const startTime = Date.now();
  6422. let handle;
  6423. const scroll = () => {
  6424. const time = Date.now() - startTime;
  6425. const nextScrollTop = easeInOutCubic(time > duration ? duration : time, from, to, duration);
  6426. if (isWindow(container)) container.scrollTo(window.pageXOffset, nextScrollTop);
  6427. else container.scrollTop = nextScrollTop;
  6428. if (time < duration) handle = rAF(scroll);
  6429. else if (isFunction$1(callback)) callback();
  6430. };
  6431. scroll();
  6432. return () => {
  6433. handle && cAF(handle);
  6434. };
  6435. }
  6436. var getScrollElement = (target, container) => {
  6437. if (isWindow(container)) return target.ownerDocument.documentElement;
  6438. return container;
  6439. };
  6440. var getScrollTop = (container) => {
  6441. if (isWindow(container)) return window.scrollY;
  6442. return container.scrollTop;
  6443. };
  6444. //#endregion
  6445. //#region node_modules/element-plus/es/hooks/use-lockscreen/index.mjs
  6446. /**
  6447. * Hook that monitoring the ref value to lock or unlock the screen.
  6448. * When the trigger became true, it assumes modal is now opened and vice versa.
  6449. * @param trigger {Ref<boolean>}
  6450. */
  6451. var useLockscreen = (trigger, options = {}) => {
  6452. if (!isRef(trigger)) throwError("[useLockscreen]", "You need to pass a ref param to this function");
  6453. const ns = options.ns || useNamespace("popup");
  6454. const hiddenCls = computed(() => ns.bm("parent", "hidden"));
  6455. let scrollBarWidth = 0;
  6456. let withoutHiddenClass = false;
  6457. let bodyWidth = "0";
  6458. let cleaned = false;
  6459. const cleanup = () => {
  6460. if (cleaned) return;
  6461. cleaned = true;
  6462. setTimeout(() => {
  6463. if (typeof document === "undefined") return;
  6464. if (withoutHiddenClass && document) {
  6465. document.body.style.width = bodyWidth;
  6466. removeClass(document.body, hiddenCls.value);
  6467. }
  6468. }, 200);
  6469. };
  6470. watch(trigger, (val) => {
  6471. if (!val) {
  6472. cleanup();
  6473. return;
  6474. }
  6475. cleaned = false;
  6476. withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
  6477. if (withoutHiddenClass) {
  6478. bodyWidth = document.body.style.width;
  6479. addClass(document.body, hiddenCls.value);
  6480. }
  6481. scrollBarWidth = getScrollBarWidth(ns.namespace.value);
  6482. const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
  6483. const bodyOverflowY = getStyle(document.body, "overflowY");
  6484. if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) document.body.style.width = `calc(100% - ${scrollBarWidth}px)`;
  6485. });
  6486. onScopeDispose(() => cleanup());
  6487. };
  6488. //#endregion
  6489. //#region node_modules/element-plus/es/utils/dom/event.mjs
  6490. var composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => {
  6491. const handleEvent = (event) => {
  6492. const shouldPrevent = theirsHandler?.(event);
  6493. if (checkForDefaultPrevented === false || !shouldPrevent) return oursHandler?.(event);
  6494. };
  6495. return handleEvent;
  6496. };
  6497. var whenMouse = (handler) => {
  6498. return (e) => e.pointerType === "mouse" ? handler(e) : void 0;
  6499. };
  6500. var getEventCode = (event) => {
  6501. if (event.code && event.code !== "Unidentified") return event.code;
  6502. const key = getEventKey(event);
  6503. if (key) {
  6504. if (Object.values(EVENT_CODE).includes(key)) return key;
  6505. switch (key) {
  6506. case " ": return EVENT_CODE.space;
  6507. default: return "";
  6508. }
  6509. }
  6510. return "";
  6511. };
  6512. var getEventKey = (event) => {
  6513. let key = event.key && event.key !== "Unidentified" ? event.key : "";
  6514. if (!key && event.type === "keyup" && isAndroid()) {
  6515. const target = event.target;
  6516. key = target.value.charAt(target.selectionStart - 1);
  6517. }
  6518. return key;
  6519. };
  6520. //#endregion
  6521. //#region node_modules/element-plus/es/hooks/use-modal/index.mjs
  6522. var modalStack = [];
  6523. var closeModal = (e) => {
  6524. if (modalStack.length === 0) return;
  6525. if (getEventCode(e) === EVENT_CODE.esc) {
  6526. e.stopPropagation();
  6527. modalStack[modalStack.length - 1].handleClose();
  6528. }
  6529. };
  6530. var useModal = (instance, visibleRef) => {
  6531. watch(visibleRef, (val) => {
  6532. if (val) modalStack.push(instance);
  6533. else modalStack.splice(modalStack.indexOf(instance), 1);
  6534. });
  6535. };
  6536. if (isClient) useEventListener(document, "keydown", closeModal);
  6537. //#endregion
  6538. //#region node_modules/element-plus/es/hooks/use-model-toggle/index.mjs
  6539. var _prop = buildProp({
  6540. type: definePropType(Boolean),
  6541. default: null
  6542. });
  6543. var _event = buildProp({ type: definePropType(Function) });
  6544. var createModelToggleComposable = (name) => {
  6545. const updateEventKey = `update:${name}`;
  6546. const updateEventKeyRaw = `onUpdate:${name}`;
  6547. const useModelToggleEmits = [updateEventKey];
  6548. const useModelToggleProps = {
  6549. [name]: _prop,
  6550. [updateEventKeyRaw]: _event
  6551. };
  6552. const useModelToggle = ({ indicator, toggleReason, shouldHideWhenRouteChanges, shouldProceed, onShow, onHide }) => {
  6553. const instance = getCurrentInstance();
  6554. const { emit } = instance;
  6555. const props = instance.props;
  6556. const hasUpdateHandler = computed(() => isFunction$1(props[updateEventKeyRaw]));
  6557. const isModelBindingAbsent = computed(() => props[name] === null);
  6558. const doShow = (event) => {
  6559. if (indicator.value === true) return;
  6560. indicator.value = true;
  6561. if (toggleReason) toggleReason.value = event;
  6562. if (isFunction$1(onShow)) onShow(event);
  6563. };
  6564. const doHide = (event) => {
  6565. if (indicator.value === false) return;
  6566. indicator.value = false;
  6567. if (toggleReason) toggleReason.value = event;
  6568. if (isFunction$1(onHide)) onHide(event);
  6569. };
  6570. const show = (event) => {
  6571. if (props.disabled === true || isFunction$1(shouldProceed) && !shouldProceed()) return;
  6572. const shouldEmit = hasUpdateHandler.value && isClient;
  6573. if (shouldEmit) emit(updateEventKey, true);
  6574. if (isModelBindingAbsent.value || !shouldEmit) doShow(event);
  6575. };
  6576. const hide = (event) => {
  6577. if (props.disabled === true || !isClient) return;
  6578. const shouldEmit = hasUpdateHandler.value && isClient;
  6579. if (shouldEmit) emit(updateEventKey, false);
  6580. if (isModelBindingAbsent.value || !shouldEmit) doHide(event);
  6581. };
  6582. const onChange = (val) => {
  6583. if (!isBoolean(val)) return;
  6584. if (props.disabled && val) {
  6585. if (hasUpdateHandler.value) emit(updateEventKey, false);
  6586. } else if (indicator.value !== val) if (val) doShow();
  6587. else doHide();
  6588. };
  6589. const toggle = () => {
  6590. if (indicator.value) hide();
  6591. else show();
  6592. };
  6593. watch(() => props[name], onChange);
  6594. if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) watch(() => ({ ...instance.proxy.$route }), () => {
  6595. if (shouldHideWhenRouteChanges.value && indicator.value) hide();
  6596. });
  6597. onMounted(() => {
  6598. onChange(props[name]);
  6599. });
  6600. return {
  6601. hide,
  6602. show,
  6603. toggle,
  6604. hasUpdateHandler
  6605. };
  6606. };
  6607. return {
  6608. useModelToggle,
  6609. useModelToggleProps,
  6610. useModelToggleEmits
  6611. };
  6612. };
  6613. var { useModelToggle, useModelToggleProps, useModelToggleEmits } = createModelToggleComposable("modelValue");
  6614. //#endregion
  6615. //#region node_modules/element-plus/es/hooks/use-prevent-global/index.mjs
  6616. var usePreventGlobal = (indicator, evt, cb) => {
  6617. const prevent = (e) => {
  6618. if (cb(e)) e.stopImmediatePropagation();
  6619. };
  6620. let stop = void 0;
  6621. watch(() => indicator.value, (val) => {
  6622. if (val) stop = useEventListener(document, evt, prevent, true);
  6623. else stop?.();
  6624. }, { immediate: true });
  6625. };
  6626. //#endregion
  6627. //#region node_modules/element-plus/es/hooks/use-prop/index.mjs
  6628. var useProp = (name) => {
  6629. const vm = getCurrentInstance();
  6630. return computed(() => (vm?.proxy?.$props)?.[name]);
  6631. }, W = "bottom", T$1 = "right", P$1 = "left", me = "auto", Q = [
  6632. "top",
  6633. W,
  6634. T$1,
  6635. P$1
  6636. ], Y$1 = "start", Ye = "clippingParents", je = "viewport", ee = "popper", Ge = "reference", De = Q.reduce(function(e, t) {
  6637. return e.concat([t + "-" + Y$1, t + "-end"]);
  6638. }, []), Ee = [].concat(Q, [me]).reduce(function(e, t) {
  6639. return e.concat([
  6640. t,
  6641. t + "-" + Y$1,
  6642. t + "-end"
  6643. ]);
  6644. }, []), it = [
  6645. "beforeRead",
  6646. "read",
  6647. "afterRead",
  6648. "beforeMain",
  6649. "main",
  6650. "afterMain",
  6651. "beforeWrite",
  6652. "write",
  6653. "afterWrite"
  6654. ];
  6655. function V(e) {
  6656. return e ? (e.nodeName || "").toLowerCase() : null;
  6657. }
  6658. function B(e) {
  6659. if (e == null) return window;
  6660. if (e.toString() !== "[object Window]") {
  6661. var t = e.ownerDocument;
  6662. return t && t.defaultView || window;
  6663. }
  6664. return e;
  6665. }
  6666. function G(e) {
  6667. return e instanceof B(e).Element || e instanceof Element;
  6668. }
  6669. function R(e) {
  6670. return e instanceof B(e).HTMLElement || e instanceof HTMLElement;
  6671. }
  6672. function Ae(e) {
  6673. if (typeof ShadowRoot == "undefined") return !1;
  6674. return e instanceof B(e).ShadowRoot || e instanceof ShadowRoot;
  6675. }
  6676. function Tt(e) {
  6677. var t = e.state;
  6678. Object.keys(t.elements).forEach(function(n) {
  6679. var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n];
  6680. !R(a) || !V(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(c) {
  6681. var s = o[c];
  6682. s === !1 ? a.removeAttribute(c) : a.setAttribute(c, s === !0 ? "" : s);
  6683. }));
  6684. });
  6685. }
  6686. function Bt(e) {
  6687. var t = e.state, n = {
  6688. popper: {
  6689. position: t.options.strategy,
  6690. left: "0",
  6691. top: "0",
  6692. margin: "0"
  6693. },
  6694. arrow: { position: "absolute" },
  6695. reference: {}
  6696. };
  6697. return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
  6698. Object.keys(t.elements).forEach(function(r) {
  6699. var o = t.elements[r], a = t.attributes[r] || {}, s = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]).reduce(function(i, f) {
  6700. return i[f] = "", i;
  6701. }, {});
  6702. !R(o) || !V(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(i) {
  6703. o.removeAttribute(i);
  6704. }));
  6705. });
  6706. };
  6707. }
  6708. var ke = {
  6709. name: "applyStyles",
  6710. enabled: !0,
  6711. phase: "write",
  6712. fn: Tt,
  6713. effect: Bt,
  6714. requires: ["computeStyles"]
  6715. };
  6716. function C(e) {
  6717. return e.split("-")[0];
  6718. }
  6719. var J = Math.max, ve = Math.min, te = Math.round;
  6720. function Le() {
  6721. var e = navigator.userAgentData;
  6722. return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
  6723. return t.brand + "/" + t.version;
  6724. }).join(" ") : navigator.userAgent;
  6725. }
  6726. function at() {
  6727. return !/^((?!chrome|android).)*safari/i.test(Le());
  6728. }
  6729. function ne(e, t, n) {
  6730. t === void 0 && (t = !1), n === void 0 && (n = !1);
  6731. var r = e.getBoundingClientRect(), o = 1, a = 1;
  6732. t && R(e) && (o = e.offsetWidth > 0 && te(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && te(r.height) / e.offsetHeight || 1);
  6733. var s = (G(e) ? B(e) : window).visualViewport, i = !at() && n, f = (r.left + (i && s ? s.offsetLeft : 0)) / o, u = (r.top + (i && s ? s.offsetTop : 0)) / a, m = r.width / o, h = r.height / a;
  6734. return {
  6735. width: m,
  6736. height: h,
  6737. top: u,
  6738. right: f + m,
  6739. bottom: u + h,
  6740. left: f,
  6741. x: f,
  6742. y: u
  6743. };
  6744. }
  6745. function Pe(e) {
  6746. var t = ne(e), n = e.offsetWidth, r = e.offsetHeight;
  6747. return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
  6748. x: e.offsetLeft,
  6749. y: e.offsetTop,
  6750. width: n,
  6751. height: r
  6752. };
  6753. }
  6754. function st(e, t) {
  6755. var n = t.getRootNode && t.getRootNode();
  6756. if (e.contains(t)) return !0;
  6757. if (n && Ae(n)) {
  6758. var r = t;
  6759. do {
  6760. if (r && e.isSameNode(r)) return !0;
  6761. r = r.parentNode || r.host;
  6762. } while (r);
  6763. }
  6764. return !1;
  6765. }
  6766. function I$1(e) {
  6767. return B(e).getComputedStyle(e);
  6768. }
  6769. function Rt(e) {
  6770. return [
  6771. "table",
  6772. "td",
  6773. "th"
  6774. ].indexOf(V(e)) >= 0;
  6775. }
  6776. function N$1(e) {
  6777. return ((G(e) ? e.ownerDocument : e.document) || window.document).documentElement;
  6778. }
  6779. function ye(e) {
  6780. return V(e) === "html" ? e : e.assignedSlot || e.parentNode || (Ae(e) ? e.host : null) || N$1(e);
  6781. }
  6782. function ft(e) {
  6783. return !R(e) || I$1(e).position === "fixed" ? null : e.offsetParent;
  6784. }
  6785. function Ht(e) {
  6786. var t = /firefox/i.test(Le());
  6787. if (/Trident/i.test(Le()) && R(e)) {
  6788. if (I$1(e).position === "fixed") return null;
  6789. }
  6790. var o = ye(e);
  6791. for (Ae(o) && (o = o.host); R(o) && ["html", "body"].indexOf(V(o)) < 0;) {
  6792. var a = I$1(o);
  6793. if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o;
  6794. o = o.parentNode;
  6795. }
  6796. return null;
  6797. }
  6798. function se(e) {
  6799. for (var t = B(e), n = ft(e); n && Rt(n) && I$1(n).position === "static";) n = ft(n);
  6800. return n && (V(n) === "html" || V(n) === "body" && I$1(n).position === "static") ? t : n || Ht(e) || t;
  6801. }
  6802. function Me(e) {
  6803. return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
  6804. }
  6805. function fe(e, t, n) {
  6806. return J(e, ve(t, n));
  6807. }
  6808. function St(e, t, n) {
  6809. var r = fe(e, t, n);
  6810. return r > n ? n : r;
  6811. }
  6812. function ct() {
  6813. return {
  6814. top: 0,
  6815. right: 0,
  6816. bottom: 0,
  6817. left: 0
  6818. };
  6819. }
  6820. function ut(e) {
  6821. return Object.assign({}, ct(), e);
  6822. }
  6823. function pt(e, t) {
  6824. return t.reduce(function(n, r) {
  6825. return n[r] = e, n;
  6826. }, {});
  6827. }
  6828. var Vt = function(e, t) {
  6829. return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, ut(typeof e != "number" ? e : pt(e, Q));
  6830. };
  6831. function Ct(e) {
  6832. var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, c = n.modifiersData.popperOffsets, s = C(n.placement), i = Me(s), u = ["left", "right"].indexOf(s) >= 0 ? "height" : "width";
  6833. if (!(!a || !c)) {
  6834. var m = Vt(o.padding, n), h = Pe(a), l = i === "y" ? "top" : P$1, g = i === "y" ? W : T$1, p = n.rects.reference[u] + n.rects.reference[i] - c[i] - n.rects.popper[u], y = c[i] - n.rects.reference[i], b = se(a), x = b ? i === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, O = p / 2 - y / 2, d = m[l], v = x - h[u] - m[g], w = x / 2 - h[u] / 2 + O, $ = fe(d, w, v), j = i;
  6835. n.modifiersData[r] = (t = {}, t[j] = $, t.centerOffset = $ - w, t);
  6836. }
  6837. }
  6838. function qt(e) {
  6839. var t = e.state, r = e.options.element, o = r === void 0 ? "[data-popper-arrow]" : r;
  6840. o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || st(t.elements.popper, o) && (t.elements.arrow = o));
  6841. }
  6842. var lt = {
  6843. name: "arrow",
  6844. enabled: !0,
  6845. phase: "main",
  6846. fn: Ct,
  6847. effect: qt,
  6848. requires: ["popperOffsets"],
  6849. requiresIfExists: ["preventOverflow"]
  6850. };
  6851. function re(e) {
  6852. return e.split("-")[1];
  6853. }
  6854. var It = {
  6855. top: "auto",
  6856. right: "auto",
  6857. bottom: "auto",
  6858. left: "auto"
  6859. };
  6860. function Nt(e, t) {
  6861. var n = e.x, r = e.y, o = t.devicePixelRatio || 1;
  6862. return {
  6863. x: te(n * o) / o || 0,
  6864. y: te(r * o) / o || 0
  6865. };
  6866. }
  6867. function dt(e) {
  6868. var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, f = e.adaptive, u = e.roundOffsets, m = e.isFixed, h = c.x, l = h === void 0 ? 0 : h, g = c.y, p = g === void 0 ? 0 : g, y = typeof u == "function" ? u({
  6869. x: l,
  6870. y: p
  6871. }) : {
  6872. x: l,
  6873. y: p
  6874. };
  6875. l = y.x, p = y.y;
  6876. var b = c.hasOwnProperty("x"), x = c.hasOwnProperty("y"), O = P$1, d = "top", v = window;
  6877. if (f) {
  6878. var w = se(n), $ = "clientHeight", j = "clientWidth";
  6879. if (w === B(n) && (w = N$1(n), I$1(w).position !== "static" && s === "absolute" && ($ = "scrollHeight", j = "scrollWidth")), w = w, o === "top" || (o === "left" || o === "right") && a === "end") {
  6880. d = W;
  6881. var D = m && w === v && v.visualViewport ? v.visualViewport.height : w[$];
  6882. p -= D - r.height, p *= i ? 1 : -1;
  6883. }
  6884. if (o === "left" || (o === "top" || o === "bottom") && a === "end") {
  6885. O = T$1;
  6886. var E = m && w === v && v.visualViewport ? v.visualViewport.width : w[j];
  6887. l -= E - r.width, l *= i ? 1 : -1;
  6888. }
  6889. }
  6890. var A = Object.assign({ position: s }, f && It), H = u === !0 ? Nt({
  6891. x: l,
  6892. y: p
  6893. }, B(n)) : {
  6894. x: l,
  6895. y: p
  6896. };
  6897. if (l = H.x, p = H.y, i) {
  6898. var k;
  6899. return Object.assign({}, A, (k = {}, k[d] = x ? "0" : "", k[O] = b ? "0" : "", k.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + l + "px, " + p + "px)" : "translate3d(" + l + "px, " + p + "px, 0)", k));
  6900. }
  6901. return Object.assign({}, A, (t = {}, t[d] = x ? p + "px" : "", t[O] = b ? l + "px" : "", t.transform = "", t));
  6902. }
  6903. function Ft(e) {
  6904. var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, c = a === void 0 ? !0 : a, s = n.roundOffsets, i = s === void 0 ? !0 : s, f = {
  6905. placement: C(t.placement),
  6906. variation: re(t.placement),
  6907. popper: t.elements.popper,
  6908. popperRect: t.rects.popper,
  6909. gpuAcceleration: o,
  6910. isFixed: t.options.strategy === "fixed"
  6911. };
  6912. t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, dt(Object.assign({}, f, {
  6913. offsets: t.modifiersData.popperOffsets,
  6914. position: t.options.strategy,
  6915. adaptive: c,
  6916. roundOffsets: i
  6917. })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, dt(Object.assign({}, f, {
  6918. offsets: t.modifiersData.arrow,
  6919. position: "absolute",
  6920. adaptive: !1,
  6921. roundOffsets: i
  6922. })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
  6923. }
  6924. var We = {
  6925. name: "computeStyles",
  6926. enabled: !0,
  6927. phase: "beforeWrite",
  6928. fn: Ft,
  6929. data: {}
  6930. }, ge = { passive: !0 };
  6931. function Ut(e) {
  6932. var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, c = r.resize, s = c === void 0 ? !0 : c, i = B(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
  6933. return a && f.forEach(function(u) {
  6934. u.addEventListener("scroll", n.update, ge);
  6935. }), s && i.addEventListener("resize", n.update, ge), function() {
  6936. a && f.forEach(function(u) {
  6937. u.removeEventListener("scroll", n.update, ge);
  6938. }), s && i.removeEventListener("resize", n.update, ge);
  6939. };
  6940. }
  6941. var Te = {
  6942. name: "eventListeners",
  6943. enabled: !0,
  6944. phase: "write",
  6945. fn: function() {},
  6946. effect: Ut,
  6947. data: {}
  6948. }, _t = {
  6949. left: "right",
  6950. right: "left",
  6951. bottom: "top",
  6952. top: "bottom"
  6953. };
  6954. function be(e) {
  6955. return e.replace(/left|right|bottom|top/g, function(t) {
  6956. return _t[t];
  6957. });
  6958. }
  6959. var zt = {
  6960. start: "end",
  6961. end: "start"
  6962. };
  6963. function ht(e) {
  6964. return e.replace(/start|end/g, function(t) {
  6965. return zt[t];
  6966. });
  6967. }
  6968. function Be(e) {
  6969. var t = B(e);
  6970. return {
  6971. scrollLeft: t.pageXOffset,
  6972. scrollTop: t.pageYOffset
  6973. };
  6974. }
  6975. function Re(e) {
  6976. return ne(N$1(e)).left + Be(e).scrollLeft;
  6977. }
  6978. function Xt(e, t) {
  6979. var n = B(e), r = N$1(e), o = n.visualViewport, a = r.clientWidth, c = r.clientHeight, s = 0, i = 0;
  6980. if (o) {
  6981. a = o.width, c = o.height;
  6982. var f = at();
  6983. (f || !f && t === "fixed") && (s = o.offsetLeft, i = o.offsetTop);
  6984. }
  6985. return {
  6986. width: a,
  6987. height: c,
  6988. x: s + Re(e),
  6989. y: i
  6990. };
  6991. }
  6992. function Yt(e) {
  6993. var t, n = N$1(e), r = Be(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = J(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), c = J(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Re(e), i = -r.scrollTop;
  6994. return I$1(o || n).direction === "rtl" && (s += J(n.clientWidth, o ? o.clientWidth : 0) - a), {
  6995. width: a,
  6996. height: c,
  6997. x: s,
  6998. y: i
  6999. };
  7000. }
  7001. function He(e) {
  7002. var t = I$1(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
  7003. return /auto|scroll|overlay|hidden/.test(n + o + r);
  7004. }
  7005. function mt(e) {
  7006. return [
  7007. "html",
  7008. "body",
  7009. "#document"
  7010. ].indexOf(V(e)) >= 0 ? e.ownerDocument.body : R(e) && He(e) ? e : mt(ye(e));
  7011. }
  7012. function ce(e, t) {
  7013. var n;
  7014. t === void 0 && (t = []);
  7015. var r = mt(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = B(r), c = o ? [a].concat(a.visualViewport || [], He(r) ? r : []) : r, s = t.concat(c);
  7016. return o ? s : s.concat(ce(ye(c)));
  7017. }
  7018. function Se(e) {
  7019. return Object.assign({}, e, {
  7020. left: e.x,
  7021. top: e.y,
  7022. right: e.x + e.width,
  7023. bottom: e.y + e.height
  7024. });
  7025. }
  7026. function Gt(e, t) {
  7027. var n = ne(e, !1, t === "fixed");
  7028. return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
  7029. }
  7030. function vt(e, t, n) {
  7031. return t === "viewport" ? Se(Xt(e, n)) : G(t) ? Gt(t, n) : Se(Yt(N$1(e)));
  7032. }
  7033. function Jt(e) {
  7034. var t = ce(ye(e)), r = ["absolute", "fixed"].indexOf(I$1(e).position) >= 0 && R(e) ? se(e) : e;
  7035. return G(r) ? t.filter(function(o) {
  7036. return G(o) && st(o, r) && V(o) !== "body";
  7037. }) : [];
  7038. }
  7039. function Kt(e, t, n, r) {
  7040. var o = t === "clippingParents" ? Jt(e) : [].concat(t), a = [].concat(o, [n]), c = a[0], s = a.reduce(function(i, f) {
  7041. var u = vt(e, f, r);
  7042. return i.top = J(u.top, i.top), i.right = ve(u.right, i.right), i.bottom = ve(u.bottom, i.bottom), i.left = J(u.left, i.left), i;
  7043. }, vt(e, c, r));
  7044. return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
  7045. }
  7046. function yt(e) {
  7047. var t = e.reference, n = e.element, r = e.placement, o = r ? C(r) : null, a = r ? re(r) : null, c = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, i;
  7048. switch (o) {
  7049. case "top":
  7050. i = {
  7051. x: c,
  7052. y: t.y - n.height
  7053. };
  7054. break;
  7055. case W:
  7056. i = {
  7057. x: c,
  7058. y: t.y + t.height
  7059. };
  7060. break;
  7061. case T$1:
  7062. i = {
  7063. x: t.x + t.width,
  7064. y: s
  7065. };
  7066. break;
  7067. case P$1:
  7068. i = {
  7069. x: t.x - n.width,
  7070. y: s
  7071. };
  7072. break;
  7073. default: i = {
  7074. x: t.x,
  7075. y: t.y
  7076. };
  7077. }
  7078. var f = o ? Me(o) : null;
  7079. if (f != null) {
  7080. var u = f === "y" ? "height" : "width";
  7081. switch (a) {
  7082. case Y$1:
  7083. i[f] = i[f] - (t[u] / 2 - n[u] / 2);
  7084. break;
  7085. case "end":
  7086. i[f] = i[f] + (t[u] / 2 - n[u] / 2);
  7087. break;
  7088. }
  7089. }
  7090. return i;
  7091. }
  7092. function oe(e, t) {
  7093. t === void 0 && (t = {});
  7094. var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.strategy, c = a === void 0 ? e.strategy : a, s = n.boundary, i = s === void 0 ? Ye : s, f = n.rootBoundary, u = f === void 0 ? je : f, m = n.elementContext, h = m === void 0 ? ee : m, l = n.altBoundary, g = l === void 0 ? !1 : l, p = n.padding, y = p === void 0 ? 0 : p, b = ut(typeof y != "number" ? y : pt(y, Q)), x = h === "popper" ? Ge : ee, O = e.rects.popper, d = e.elements[g ? x : h], v = Kt(G(d) ? d : d.contextElement || N$1(e.elements.popper), i, u, c), w = ne(e.elements.reference), $ = yt({
  7095. reference: w,
  7096. element: O,
  7097. placement: o
  7098. }), j = Se(Object.assign({}, O, $)), D = h === "popper" ? j : w, E = {
  7099. top: v.top - D.top + b.top,
  7100. bottom: D.bottom - v.bottom + b.bottom,
  7101. left: v.left - D.left + b.left,
  7102. right: D.right - v.right + b.right
  7103. }, A = e.modifiersData.offset;
  7104. if (h === "popper" && A) {
  7105. var H = A[o];
  7106. Object.keys(E).forEach(function(k) {
  7107. var F = ["right", "bottom"].indexOf(k) >= 0 ? 1 : -1, U = ["top", "bottom"].indexOf(k) >= 0 ? "y" : "x";
  7108. E[k] += H[U] * F;
  7109. });
  7110. }
  7111. return E;
  7112. }
  7113. function Qt(e, t) {
  7114. t === void 0 && (t = {});
  7115. var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, c = n.padding, s = n.flipVariations, i = n.allowedAutoPlacements, f = i === void 0 ? Ee : i, u = re(r), m = u ? s ? De : De.filter(function(g) {
  7116. return re(g) === u;
  7117. }) : Q, h = m.filter(function(g) {
  7118. return f.indexOf(g) >= 0;
  7119. });
  7120. h.length === 0 && (h = m);
  7121. var l = h.reduce(function(g, p) {
  7122. return g[p] = oe(e, {
  7123. placement: p,
  7124. boundary: o,
  7125. rootBoundary: a,
  7126. padding: c
  7127. })[C(p)], g;
  7128. }, {});
  7129. return Object.keys(l).sort(function(g, p) {
  7130. return l[g] - l[p];
  7131. });
  7132. }
  7133. function Zt(e) {
  7134. if (C(e) === "auto") return [];
  7135. var t = be(e);
  7136. return [
  7137. ht(e),
  7138. t,
  7139. ht(t)
  7140. ];
  7141. }
  7142. function en(e) {
  7143. var t = e.state, n = e.options, r = e.name;
  7144. if (!t.modifiersData[r]._skip) {
  7145. for (var o = n.mainAxis, a = o === void 0 ? !0 : o, c = n.altAxis, s = c === void 0 ? !0 : c, i = n.fallbackPlacements, f = n.padding, u = n.boundary, m = n.rootBoundary, h = n.altBoundary, l = n.flipVariations, g = l === void 0 ? !0 : l, p = n.allowedAutoPlacements, y = t.options.placement, x = C(y) === y, O = i || (x || !g ? [be(y)] : Zt(y)), d = [y].concat(O).reduce(function(z, q) {
  7146. return z.concat(C(q) === "auto" ? Qt(t, {
  7147. placement: q,
  7148. boundary: u,
  7149. rootBoundary: m,
  7150. padding: f,
  7151. flipVariations: g,
  7152. allowedAutoPlacements: p
  7153. }) : q);
  7154. }, []), v = t.rects.reference, w = t.rects.popper, $ = /* @__PURE__ */ new Map(), j = !0, D = d[0], E = 0; E < d.length; E++) {
  7155. var A = d[E], H = C(A), k = re(A) === Y$1, F = ["top", W].indexOf(H) >= 0, U = F ? "width" : "height", M = oe(t, {
  7156. placement: A,
  7157. boundary: u,
  7158. rootBoundary: m,
  7159. altBoundary: h,
  7160. padding: f
  7161. }), S = F ? k ? T$1 : P$1 : k ? W : "top";
  7162. v[U] > w[U] && (S = be(S));
  7163. var ue = be(S), _ = [];
  7164. if (a && _.push(M[H] <= 0), s && _.push(M[S] <= 0, M[ue] <= 0), _.every(function(z) {
  7165. return z;
  7166. })) {
  7167. D = A, j = !1;
  7168. break;
  7169. }
  7170. $.set(A, _);
  7171. }
  7172. if (j) {
  7173. for (var pe = g ? 3 : 1, xe = function(z) {
  7174. var q = d.find(function(de) {
  7175. var ae = $.get(de);
  7176. if (ae) return ae.slice(0, z).every(function(K) {
  7177. return K;
  7178. });
  7179. });
  7180. if (q) return D = q, "break";
  7181. }, ie = pe; ie > 0; ie--) if (xe(ie) === "break") break;
  7182. }
  7183. t.placement !== D && (t.modifiersData[r]._skip = !0, t.placement = D, t.reset = !0);
  7184. }
  7185. }
  7186. var gt = {
  7187. name: "flip",
  7188. enabled: !0,
  7189. phase: "main",
  7190. fn: en,
  7191. requiresIfExists: ["offset"],
  7192. data: { _skip: !1 }
  7193. };
  7194. function bt(e, t, n) {
  7195. return n === void 0 && (n = {
  7196. x: 0,
  7197. y: 0
  7198. }), {
  7199. top: e.top - t.height - n.y,
  7200. right: e.right - t.width + n.x,
  7201. bottom: e.bottom - t.height + n.y,
  7202. left: e.left - t.width - n.x
  7203. };
  7204. }
  7205. function wt(e) {
  7206. return [
  7207. "top",
  7208. T$1,
  7209. W,
  7210. P$1
  7211. ].some(function(t) {
  7212. return e[t] >= 0;
  7213. });
  7214. }
  7215. function tn(e) {
  7216. var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, c = oe(t, { elementContext: "reference" }), s = oe(t, { altBoundary: !0 }), i = bt(c, r), f = bt(s, o, a), u = wt(i), m = wt(f);
  7217. t.modifiersData[n] = {
  7218. referenceClippingOffsets: i,
  7219. popperEscapeOffsets: f,
  7220. isReferenceHidden: u,
  7221. hasPopperEscaped: m
  7222. }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
  7223. "data-popper-reference-hidden": u,
  7224. "data-popper-escaped": m
  7225. });
  7226. }
  7227. var xt = {
  7228. name: "hide",
  7229. enabled: !0,
  7230. phase: "main",
  7231. requiresIfExists: ["preventOverflow"],
  7232. fn: tn
  7233. };
  7234. function nn(e, t, n) {
  7235. var r = C(e), o = ["left", "top"].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, c = a[0], s = a[1];
  7236. return c = c || 0, s = (s || 0) * o, ["left", "right"].indexOf(r) >= 0 ? {
  7237. x: s,
  7238. y: c
  7239. } : {
  7240. x: c,
  7241. y: s
  7242. };
  7243. }
  7244. function rn(e) {
  7245. var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, c = Ee.reduce(function(u, m) {
  7246. return u[m] = nn(m, t.rects, a), u;
  7247. }, {}), s = c[t.placement], i = s.x, f = s.y;
  7248. t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += f), t.modifiersData[r] = c;
  7249. }
  7250. var Ot = {
  7251. name: "offset",
  7252. enabled: !0,
  7253. phase: "main",
  7254. requires: ["popperOffsets"],
  7255. fn: rn
  7256. };
  7257. function on(e) {
  7258. var t = e.state, n = e.name;
  7259. t.modifiersData[n] = yt({
  7260. reference: t.rects.reference,
  7261. element: t.rects.popper,
  7262. placement: t.placement
  7263. });
  7264. }
  7265. var Ve = {
  7266. name: "popperOffsets",
  7267. enabled: !0,
  7268. phase: "read",
  7269. fn: on,
  7270. data: {}
  7271. };
  7272. function an(e) {
  7273. return e === "x" ? "y" : "x";
  7274. }
  7275. function sn(e) {
  7276. var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, c = n.altAxis, s = c === void 0 ? !1 : c, i = n.boundary, f = n.rootBoundary, u = n.altBoundary, m = n.padding, h = n.tether, l = h === void 0 ? !0 : h, g = n.tetherOffset, p = g === void 0 ? 0 : g, y = oe(t, {
  7277. boundary: i,
  7278. rootBoundary: f,
  7279. padding: m,
  7280. altBoundary: u
  7281. }), b = C(t.placement), x = re(t.placement), O = !x, d = Me(b), v = an(d), w = t.modifiersData.popperOffsets, $ = t.rects.reference, j = t.rects.popper, D = typeof p == "function" ? p(Object.assign({}, t.rects, { placement: t.placement })) : p, E = typeof D == "number" ? {
  7282. mainAxis: D,
  7283. altAxis: D
  7284. } : Object.assign({
  7285. mainAxis: 0,
  7286. altAxis: 0
  7287. }, D), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = {
  7288. x: 0,
  7289. y: 0
  7290. };
  7291. if (w) {
  7292. if (a) {
  7293. var k, F = d === "y" ? "top" : P$1, U = d === "y" ? W : T$1, M = d === "y" ? "height" : "width", S = w[d], ue = S + y[F], _ = S - y[U], pe = l ? -j[M] / 2 : 0, xe = x === "start" ? $[M] : j[M], ie = x === "start" ? -j[M] : -$[M], le = t.elements.arrow, z = l && le ? Pe(le) : {
  7294. width: 0,
  7295. height: 0
  7296. }, q = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ct(), de = q[F], ae = q[U], K = fe(0, $[M], z[M]), Et = O ? $[M] / 2 - pe - K - de - E.mainAxis : xe - K - de - E.mainAxis, At = O ? -$[M] / 2 + pe + K + ae + E.mainAxis : ie + K + ae + E.mainAxis, Oe = t.elements.arrow && se(t.elements.arrow), kt = Oe ? d === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (k = A == null ? void 0 : A[d]) != null ? k : 0, Lt = S + Et - Ce - kt, Pt = S + At - Ce, qe = fe(l ? ve(ue, Lt) : ue, S, l ? J(_, Pt) : _);
  7297. w[d] = qe, H[d] = qe - S;
  7298. }
  7299. if (s) {
  7300. var Ie, Mt = d === "x" ? "top" : P$1, Wt = d === "x" ? W : T$1, X = w[v], he = v === "y" ? "height" : "width", Ne = X + y[Mt], Fe = X - y[Wt], $e = ["top", P$1].indexOf(b) !== -1, Ue = (Ie = A == null ? void 0 : A[v]) != null ? Ie : 0, _e = $e ? Ne : X - $[he] - j[he] - Ue + E.altAxis, ze = $e ? X + $[he] + j[he] - Ue - E.altAxis : Fe, Xe = l && $e ? St(_e, X, ze) : fe(l ? _e : Ne, X, l ? ze : Fe);
  7301. w[v] = Xe, H[v] = Xe - X;
  7302. }
  7303. t.modifiersData[r] = H;
  7304. }
  7305. }
  7306. var $t = {
  7307. name: "preventOverflow",
  7308. enabled: !0,
  7309. phase: "main",
  7310. fn: sn,
  7311. requiresIfExists: ["offset"]
  7312. };
  7313. function fn(e) {
  7314. return {
  7315. scrollLeft: e.scrollLeft,
  7316. scrollTop: e.scrollTop
  7317. };
  7318. }
  7319. function cn(e) {
  7320. return e === B(e) || !R(e) ? Be(e) : fn(e);
  7321. }
  7322. function un(e) {
  7323. var t = e.getBoundingClientRect(), n = te(t.width) / e.offsetWidth || 1, r = te(t.height) / e.offsetHeight || 1;
  7324. return n !== 1 || r !== 1;
  7325. }
  7326. function pn(e, t, n) {
  7327. n === void 0 && (n = !1);
  7328. var r = R(t), o = R(t) && un(t), a = N$1(t), c = ne(e, o, n), s = {
  7329. scrollLeft: 0,
  7330. scrollTop: 0
  7331. }, i = {
  7332. x: 0,
  7333. y: 0
  7334. };
  7335. return (r || !r && !n) && ((V(t) !== "body" || He(a)) && (s = cn(t)), R(t) ? (i = ne(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : a && (i.x = Re(a))), {
  7336. x: c.left + s.scrollLeft - i.x,
  7337. y: c.top + s.scrollTop - i.y,
  7338. width: c.width,
  7339. height: c.height
  7340. };
  7341. }
  7342. function ln(e) {
  7343. var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  7344. e.forEach(function(a) {
  7345. t.set(a.name, a);
  7346. });
  7347. function o(a) {
  7348. n.add(a.name);
  7349. [].concat(a.requires || [], a.requiresIfExists || []).forEach(function(s) {
  7350. if (!n.has(s)) {
  7351. var i = t.get(s);
  7352. i && o(i);
  7353. }
  7354. }), r.push(a);
  7355. }
  7356. return e.forEach(function(a) {
  7357. n.has(a.name) || o(a);
  7358. }), r;
  7359. }
  7360. function dn(e) {
  7361. var t = ln(e);
  7362. return it.reduce(function(n, r) {
  7363. return n.concat(t.filter(function(o) {
  7364. return o.phase === r;
  7365. }));
  7366. }, []);
  7367. }
  7368. function hn(e) {
  7369. var t;
  7370. return function() {
  7371. return t || (t = new Promise(function(n) {
  7372. Promise.resolve().then(function() {
  7373. t = void 0, n(e());
  7374. });
  7375. })), t;
  7376. };
  7377. }
  7378. function mn(e) {
  7379. var t = e.reduce(function(n, r) {
  7380. var o = n[r.name];
  7381. return n[r.name] = o ? Object.assign({}, o, r, {
  7382. options: Object.assign({}, o.options, r.options),
  7383. data: Object.assign({}, o.data, r.data)
  7384. }) : r, n;
  7385. }, {});
  7386. return Object.keys(t).map(function(n) {
  7387. return t[n];
  7388. });
  7389. }
  7390. var jt = {
  7391. placement: "bottom",
  7392. modifiers: [],
  7393. strategy: "absolute"
  7394. };
  7395. function Dt() {
  7396. for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
  7397. return !t.some(function(r) {
  7398. return !(r && typeof r.getBoundingClientRect == "function");
  7399. });
  7400. }
  7401. function we(e) {
  7402. e === void 0 && (e = {});
  7403. var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? jt : o;
  7404. return function(c, s, i) {
  7405. i === void 0 && (i = a);
  7406. var f = {
  7407. placement: "bottom",
  7408. orderedModifiers: [],
  7409. options: Object.assign({}, jt, a),
  7410. modifiersData: {},
  7411. elements: {
  7412. reference: c,
  7413. popper: s
  7414. },
  7415. attributes: {},
  7416. styles: {}
  7417. }, u = [], m = !1, h = {
  7418. state: f,
  7419. setOptions: function(p) {
  7420. var y = typeof p == "function" ? p(f.options) : p;
  7421. g(), f.options = Object.assign({}, a, f.options, y), f.scrollParents = {
  7422. reference: G(c) ? ce(c) : c.contextElement ? ce(c.contextElement) : [],
  7423. popper: ce(s)
  7424. };
  7425. var b = dn(mn([].concat(r, f.options.modifiers)));
  7426. return f.orderedModifiers = b.filter(function(x) {
  7427. return x.enabled;
  7428. }), l(), h.update();
  7429. },
  7430. forceUpdate: function() {
  7431. if (!m) {
  7432. var p = f.elements, y = p.reference, b = p.popper;
  7433. if (Dt(y, b)) {
  7434. f.rects = {
  7435. reference: pn(y, se(b), f.options.strategy === "fixed"),
  7436. popper: Pe(b)
  7437. }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(j) {
  7438. return f.modifiersData[j.name] = Object.assign({}, j.data);
  7439. });
  7440. for (var x = 0; x < f.orderedModifiers.length; x++) {
  7441. if (f.reset === !0) {
  7442. f.reset = !1, x = -1;
  7443. continue;
  7444. }
  7445. var O = f.orderedModifiers[x], d = O.fn, v = O.options, w = v === void 0 ? {} : v, $ = O.name;
  7446. typeof d == "function" && (f = d({
  7447. state: f,
  7448. options: w,
  7449. name: $,
  7450. instance: h
  7451. }) || f);
  7452. }
  7453. }
  7454. }
  7455. },
  7456. update: hn(function() {
  7457. return new Promise(function(p) {
  7458. h.forceUpdate(), p(f);
  7459. });
  7460. }),
  7461. destroy: function() {
  7462. g(), m = !0;
  7463. }
  7464. };
  7465. if (!Dt(c, s)) return h;
  7466. h.setOptions(i).then(function(p) {
  7467. !m && i.onFirstUpdate && i.onFirstUpdate(p);
  7468. });
  7469. function l() {
  7470. f.orderedModifiers.forEach(function(p) {
  7471. var y = p.name, b = p.options, x = b === void 0 ? {} : b, O = p.effect;
  7472. if (typeof O == "function") {
  7473. var d = O({
  7474. state: f,
  7475. name: y,
  7476. instance: h,
  7477. options: x
  7478. }), v = function() {};
  7479. u.push(d || v);
  7480. }
  7481. });
  7482. }
  7483. function g() {
  7484. u.forEach(function(p) {
  7485. return p();
  7486. }), u = [];
  7487. }
  7488. return h;
  7489. };
  7490. }
  7491. we();
  7492. we({ defaultModifiers: [
  7493. Te,
  7494. Ve,
  7495. We,
  7496. ke
  7497. ] });
  7498. var wn = we({ defaultModifiers: [
  7499. Te,
  7500. Ve,
  7501. We,
  7502. ke,
  7503. Ot,
  7504. gt,
  7505. $t,
  7506. lt,
  7507. xt
  7508. ] });
  7509. //#endregion
  7510. //#region node_modules/element-plus/es/hooks/use-popper/index.mjs
  7511. var usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
  7512. const stateUpdater = {
  7513. name: "updateState",
  7514. enabled: true,
  7515. phase: "write",
  7516. fn: ({ state }) => {
  7517. const derivedState = deriveState(state);
  7518. Object.assign(states.value, derivedState);
  7519. },
  7520. requires: ["computeStyles"]
  7521. };
  7522. const options = computed(() => {
  7523. const { onFirstUpdate, placement, strategy, modifiers } = unref(opts);
  7524. return {
  7525. onFirstUpdate,
  7526. placement: placement || "bottom",
  7527. strategy: strategy || "absolute",
  7528. modifiers: [
  7529. ...modifiers || [],
  7530. stateUpdater,
  7531. {
  7532. name: "applyStyles",
  7533. enabled: false
  7534. }
  7535. ]
  7536. };
  7537. });
  7538. const instanceRef = shallowRef();
  7539. const states = ref({
  7540. styles: {
  7541. popper: {
  7542. position: unref(options).strategy,
  7543. left: "0",
  7544. top: "0"
  7545. },
  7546. arrow: { position: "absolute" }
  7547. },
  7548. attributes: {}
  7549. });
  7550. const destroy = () => {
  7551. if (!instanceRef.value) return;
  7552. instanceRef.value.destroy();
  7553. instanceRef.value = void 0;
  7554. };
  7555. watch(options, (newOptions) => {
  7556. const instance = unref(instanceRef);
  7557. if (instance) instance.setOptions(newOptions);
  7558. }, { deep: true });
  7559. watch([referenceElementRef, popperElementRef], ([referenceElement, popperElement]) => {
  7560. destroy();
  7561. if (!referenceElement || !popperElement) return;
  7562. instanceRef.value = wn(referenceElement, popperElement, unref(options));
  7563. });
  7564. onBeforeUnmount(() => {
  7565. destroy();
  7566. });
  7567. return {
  7568. state: computed(() => ({ ...unref(instanceRef)?.state || {} })),
  7569. styles: computed(() => unref(states).styles),
  7570. attributes: computed(() => unref(states).attributes),
  7571. update: () => unref(instanceRef)?.update(),
  7572. forceUpdate: () => unref(instanceRef)?.forceUpdate(),
  7573. instanceRef: computed(() => unref(instanceRef))
  7574. };
  7575. };
  7576. function deriveState(state) {
  7577. const elements = Object.keys(state.elements);
  7578. return {
  7579. styles: fromPairs(elements.map((element) => [element, state.styles[element] || {}])),
  7580. attributes: fromPairs(elements.map((element) => [element, state.attributes[element]]))
  7581. };
  7582. }
  7583. //#endregion
  7584. //#region node_modules/element-plus/es/hooks/use-same-target/index.mjs
  7585. var useSameTarget = (handleClick) => {
  7586. if (!handleClick) return {
  7587. onClick: NOOP,
  7588. onMousedown: NOOP,
  7589. onMouseup: NOOP
  7590. };
  7591. let mousedownTarget = false;
  7592. let mouseupTarget = false;
  7593. const onClick = (e) => {
  7594. if (mousedownTarget && mouseupTarget) handleClick(e);
  7595. mousedownTarget = mouseupTarget = false;
  7596. };
  7597. const onMousedown = (e) => {
  7598. mousedownTarget = e.target === e.currentTarget;
  7599. };
  7600. const onMouseup = (e) => {
  7601. mouseupTarget = e.target === e.currentTarget;
  7602. };
  7603. return {
  7604. onClick,
  7605. onMousedown,
  7606. onMouseup
  7607. };
  7608. };
  7609. //#endregion
  7610. //#region node_modules/element-plus/es/utils/vue/global-node.mjs
  7611. var globalNodes = [];
  7612. var target = !isClient ? void 0 : document.body;
  7613. function createGlobalNode(id) {
  7614. const el = document.createElement("div");
  7615. if (id !== void 0) el.setAttribute("id", id);
  7616. if (target) {
  7617. target.appendChild(el);
  7618. globalNodes.push(el);
  7619. }
  7620. return el;
  7621. }
  7622. function removeGlobalNode(el) {
  7623. globalNodes.splice(globalNodes.indexOf(el), 1);
  7624. el.remove();
  7625. }
  7626. //#endregion
  7627. //#region node_modules/element-plus/es/hooks/use-teleport/index.mjs
  7628. var useTeleport = (contentRenderer, appendToBody) => {
  7629. const isTeleportVisible = ref(false);
  7630. if (!isClient) return {
  7631. isTeleportVisible,
  7632. showTeleport: NOOP,
  7633. hideTeleport: NOOP,
  7634. renderTeleport: NOOP
  7635. };
  7636. let $el = null;
  7637. const showTeleport = () => {
  7638. isTeleportVisible.value = true;
  7639. if ($el !== null) return;
  7640. $el = createGlobalNode();
  7641. };
  7642. const hideTeleport = () => {
  7643. isTeleportVisible.value = false;
  7644. if ($el !== null) {
  7645. removeGlobalNode($el);
  7646. $el = null;
  7647. }
  7648. };
  7649. const renderTeleport = () => {
  7650. return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [h$1(Teleport, { to: $el }, contentRenderer())] : void 0;
  7651. };
  7652. onUnmounted(hideTeleport);
  7653. return {
  7654. isTeleportVisible,
  7655. showTeleport,
  7656. hideTeleport,
  7657. renderTeleport
  7658. };
  7659. };
  7660. //#endregion
  7661. //#region node_modules/element-plus/es/hooks/use-throttle-render/index.mjs
  7662. var useThrottleRender = (loading, throttle = 0) => {
  7663. if (throttle === 0) return loading;
  7664. const throttled = ref(isObject$2(throttle) && Boolean(throttle.initVal));
  7665. let timeoutHandle = null;
  7666. const dispatchThrottling = (timer) => {
  7667. if (isUndefined(timer)) {
  7668. throttled.value = loading.value;
  7669. return;
  7670. }
  7671. if (timeoutHandle) clearTimeout(timeoutHandle);
  7672. timeoutHandle = setTimeout(() => {
  7673. throttled.value = loading.value;
  7674. }, timer);
  7675. };
  7676. const dispatcher = (type) => {
  7677. if (type === "leading") if (isNumber(throttle)) dispatchThrottling(throttle);
  7678. else dispatchThrottling(throttle.leading);
  7679. else if (isObject$2(throttle)) dispatchThrottling(throttle.trailing);
  7680. else throttled.value = false;
  7681. };
  7682. onMounted(() => dispatcher("leading"));
  7683. watch(() => loading.value, (val) => {
  7684. dispatcher(val ? "leading" : "trailing");
  7685. });
  7686. return throttled;
  7687. };
  7688. //#endregion
  7689. //#region node_modules/element-plus/es/hooks/use-timeout/index.mjs
  7690. function useTimeout() {
  7691. let timeoutHandle;
  7692. const registerTimeout = (fn, delay) => {
  7693. cancelTimeout();
  7694. timeoutHandle = globalThis.setTimeout(fn, delay);
  7695. };
  7696. const cancelTimeout = () => {
  7697. if (timeoutHandle === void 0) return;
  7698. globalThis.clearTimeout(timeoutHandle);
  7699. timeoutHandle = void 0;
  7700. };
  7701. tryOnScopeDispose(() => cancelTimeout());
  7702. return {
  7703. registerTimeout,
  7704. cancelTimeout
  7705. };
  7706. }
  7707. //#endregion
  7708. //#region node_modules/element-plus/es/hooks/use-transition-fallthrough/index.mjs
  7709. /* istanbul ignore file */
  7710. var AFTER_APPEAR = "after-appear";
  7711. var AFTER_ENTER = "after-enter";
  7712. var AFTER_LEAVE = "after-leave";
  7713. var APPEAR = "appear";
  7714. var APPEAR_CANCELLED = "appear-cancelled";
  7715. var BEFORE_ENTER = "before-enter";
  7716. var BEFORE_LEAVE = "before-leave";
  7717. var ENTER = "enter";
  7718. var ENTER_CANCELLED = "enter-cancelled";
  7719. var LEAVE = "leave";
  7720. var LEAVE_CANCELLED = "leave-cancelled";
  7721. var useTransitionFallthroughEmits = [
  7722. AFTER_APPEAR,
  7723. AFTER_ENTER,
  7724. AFTER_LEAVE,
  7725. APPEAR,
  7726. APPEAR_CANCELLED,
  7727. BEFORE_ENTER,
  7728. BEFORE_LEAVE,
  7729. ENTER,
  7730. ENTER_CANCELLED,
  7731. LEAVE,
  7732. LEAVE_CANCELLED
  7733. ];
  7734. /**
  7735. * NOTE:
  7736. * This is only a delegator for delegating transition callbacks.
  7737. * Use this at your need.
  7738. */
  7739. /**
  7740. * Simple usage
  7741. *
  7742. * In your setups:
  7743. *
  7744. * setup() {
  7745. * const fallthroughMethods = useTransitionFallthrough()
  7746. * return fallthrough
  7747. * }
  7748. *
  7749. * In your template:
  7750. *
  7751. * <template>
  7752. * <transition name="whatever" v-bind="fallthrough">
  7753. * <slot />
  7754. * </transition>
  7755. * </template>
  7756. *
  7757. */
  7758. var useTransitionFallthrough = () => {
  7759. const { emit } = getCurrentInstance();
  7760. return {
  7761. onAfterAppear: () => {
  7762. emit(AFTER_APPEAR);
  7763. },
  7764. onAfterEnter: () => {
  7765. emit(AFTER_ENTER);
  7766. },
  7767. onAfterLeave: () => {
  7768. emit(AFTER_LEAVE);
  7769. },
  7770. onAppearCancelled: () => {
  7771. emit(APPEAR_CANCELLED);
  7772. },
  7773. onBeforeEnter: () => {
  7774. emit(BEFORE_ENTER);
  7775. },
  7776. onBeforeLeave: () => {
  7777. emit(BEFORE_LEAVE);
  7778. },
  7779. onEnter: () => {
  7780. emit(ENTER);
  7781. },
  7782. onEnterCancelled: () => {
  7783. emit(ENTER_CANCELLED);
  7784. },
  7785. onLeave: () => {
  7786. emit(LEAVE);
  7787. },
  7788. onLeaveCancelled: () => {
  7789. emit(LEAVE_CANCELLED);
  7790. }
  7791. };
  7792. };
  7793. //#endregion
  7794. //#region node_modules/element-plus/es/hooks/use-id/index.mjs
  7795. var defaultIdInjection = {
  7796. prefix: Math.floor(Math.random() * 1e4),
  7797. current: 0
  7798. };
  7799. var ID_INJECTION_KEY = Symbol("elIdInjection");
  7800. var useIdInjection = () => {
  7801. return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
  7802. };
  7803. var useId = (deterministicId) => {
  7804. const idInjection = useIdInjection();
  7805. if (!isClient && idInjection === defaultIdInjection) debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
  7806. usage: app.provide(ID_INJECTION_KEY, {
  7807. prefix: number,
  7808. current: number,
  7809. })`);
  7810. const namespace = useGetDerivedNamespace();
  7811. return computedEager(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
  7812. };
  7813. //#endregion
  7814. //#region node_modules/element-plus/es/hooks/use-escape-keydown/index.mjs
  7815. var registeredEscapeHandlers = [];
  7816. var cachedHandler = (event) => {
  7817. if (getEventCode(event) === EVENT_CODE.esc) registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
  7818. };
  7819. var useEscapeKeydown = (handler) => {
  7820. onMounted(() => {
  7821. if (registeredEscapeHandlers.length === 0) document.addEventListener("keydown", cachedHandler);
  7822. if (isClient) registeredEscapeHandlers.push(handler);
  7823. });
  7824. onBeforeUnmount(() => {
  7825. registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
  7826. if (registeredEscapeHandlers.length === 0) {
  7827. if (isClient) document.removeEventListener("keydown", cachedHandler);
  7828. }
  7829. });
  7830. };
  7831. //#endregion
  7832. //#region node_modules/element-plus/es/hooks/use-popper-container/index.mjs
  7833. var usePopperContainerId = () => {
  7834. const namespace = useGetDerivedNamespace();
  7835. const idInjection = useIdInjection();
  7836. const id = computed(() => {
  7837. return `${namespace.value}-popper-container-${idInjection.prefix}`;
  7838. });
  7839. return {
  7840. id,
  7841. selector: computed(() => `#${id.value}`)
  7842. };
  7843. };
  7844. var createContainer = (id) => {
  7845. const container = document.createElement("div");
  7846. container.id = id;
  7847. document.body.appendChild(container);
  7848. return container;
  7849. };
  7850. var usePopperContainer = () => {
  7851. const { id, selector } = usePopperContainerId();
  7852. onBeforeMount(() => {
  7853. if (!isClient) return;
  7854. if (!document.body.querySelector(selector.value)) createContainer(id.value);
  7855. });
  7856. return {
  7857. id,
  7858. selector
  7859. };
  7860. };
  7861. //#endregion
  7862. //#region node_modules/element-plus/es/hooks/use-intermediate-render/index.mjs
  7863. var useDelayedRender = ({ indicator, intermediateIndicator, shouldSetIntermediate = () => true, beforeShow, afterShow, afterHide, beforeHide }) => {
  7864. watch(() => unref(indicator), (val) => {
  7865. if (val) {
  7866. beforeShow?.();
  7867. nextTick(() => {
  7868. if (!unref(indicator)) return;
  7869. if (shouldSetIntermediate("show")) intermediateIndicator.value = true;
  7870. });
  7871. } else {
  7872. beforeHide?.();
  7873. nextTick(() => {
  7874. if (unref(indicator)) return;
  7875. if (shouldSetIntermediate("hide")) intermediateIndicator.value = false;
  7876. });
  7877. }
  7878. });
  7879. watch(() => intermediateIndicator.value, (val) => {
  7880. if (val) afterShow?.();
  7881. else afterHide?.();
  7882. });
  7883. };
  7884. //#endregion
  7885. //#region node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs
  7886. /**
  7887. * @deprecated Removed after 3.0.0, Use `UseDelayedToggleProps` instead.
  7888. */
  7889. var useDelayedToggleProps = buildProps({
  7890. /**
  7891. * @description delay of appearance, in millisecond, not valid in controlled mode
  7892. */
  7893. showAfter: {
  7894. type: Number,
  7895. default: 0
  7896. },
  7897. /**
  7898. * @description delay of disappear, in millisecond, not valid in controlled mode
  7899. */
  7900. hideAfter: {
  7901. type: Number,
  7902. default: 200
  7903. },
  7904. /**
  7905. * @description disappear automatically, in millisecond, not valid in controlled mode
  7906. */
  7907. autoClose: {
  7908. type: Number,
  7909. default: 0
  7910. }
  7911. });
  7912. var useDelayedTogglePropsDefaults = {
  7913. showAfter: 0,
  7914. hideAfter: 200,
  7915. autoClose: 0
  7916. };
  7917. var useDelayedToggle = ({ showAfter, hideAfter, autoClose, open, close }) => {
  7918. const { registerTimeout } = useTimeout();
  7919. const { registerTimeout: registerTimeoutForAutoClose, cancelTimeout: cancelTimeoutForAutoClose } = useTimeout();
  7920. const onOpen = (event, delay = unref(showAfter)) => {
  7921. registerTimeout(() => {
  7922. open(event);
  7923. const _autoClose = unref(autoClose);
  7924. if (isNumber(_autoClose) && _autoClose > 0) registerTimeoutForAutoClose(() => {
  7925. close(event);
  7926. }, _autoClose);
  7927. }, delay);
  7928. };
  7929. const onClose = (event, delay = unref(hideAfter)) => {
  7930. cancelTimeoutForAutoClose();
  7931. registerTimeout(() => {
  7932. close(event);
  7933. }, delay);
  7934. };
  7935. return {
  7936. onOpen,
  7937. onClose
  7938. };
  7939. };
  7940. //#endregion
  7941. //#region node_modules/element-plus/es/hooks/use-forward-ref/index.mjs
  7942. var FORWARD_REF_INJECTION_KEY = Symbol("elForwardRef");
  7943. var useForwardRef = (forwardRef) => {
  7944. const setForwardRef = ((el) => {
  7945. forwardRef.value = el;
  7946. });
  7947. provide(FORWARD_REF_INJECTION_KEY, { setForwardRef });
  7948. };
  7949. var useForwardRefDirective = (setForwardRef) => {
  7950. return {
  7951. mounted(el) {
  7952. setForwardRef(el);
  7953. },
  7954. updated(el) {
  7955. setForwardRef(el);
  7956. },
  7957. unmounted() {
  7958. setForwardRef(null);
  7959. }
  7960. };
  7961. };
  7962. //#endregion
  7963. //#region node_modules/element-plus/es/hooks/use-z-index/index.mjs
  7964. var initial = { current: 0 };
  7965. var zIndex = ref(0);
  7966. var defaultInitialZIndex = 2e3;
  7967. var ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
  7968. var zIndexContextKey = Symbol("zIndexContextKey");
  7969. var useZIndex = (zIndexOverrides) => {
  7970. const increasingInjection = getCurrentInstance() ? inject(ZINDEX_INJECTION_KEY, initial) : initial;
  7971. const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
  7972. const initialZIndex = computed(() => {
  7973. const zIndexFromInjection = unref(zIndexInjection);
  7974. return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
  7975. });
  7976. const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
  7977. const nextZIndex = () => {
  7978. increasingInjection.current++;
  7979. zIndex.value = increasingInjection.current;
  7980. return currentZIndex.value;
  7981. };
  7982. if (!isClient && !inject(ZINDEX_INJECTION_KEY)) debugWarn("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
  7983. usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
  7984. return {
  7985. initialZIndex,
  7986. currentZIndex,
  7987. nextZIndex
  7988. };
  7989. };
  7990. //#endregion
  7991. //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
  7992. var min$1 = Math.min;
  7993. var max$1 = Math.max;
  7994. var round = Math.round;
  7995. var floor$1 = Math.floor;
  7996. var createCoords = (v) => ({
  7997. x: v,
  7998. y: v
  7999. });
  8000. var oppositeSideMap = {
  8001. left: "right",
  8002. right: "left",
  8003. bottom: "top",
  8004. top: "bottom"
  8005. };
  8006. function clamp(start, value, end) {
  8007. return max$1(start, min$1(value, end));
  8008. }
  8009. function evaluate(value, param) {
  8010. return typeof value === "function" ? value(param) : value;
  8011. }
  8012. function getSide(placement) {
  8013. return placement.split("-")[0];
  8014. }
  8015. function getAlignment(placement) {
  8016. return placement.split("-")[1];
  8017. }
  8018. function getOppositeAxis(axis) {
  8019. return axis === "x" ? "y" : "x";
  8020. }
  8021. function getAxisLength(axis) {
  8022. return axis === "y" ? "height" : "width";
  8023. }
  8024. function getSideAxis(placement) {
  8025. const firstChar = placement[0];
  8026. return firstChar === "t" || firstChar === "b" ? "y" : "x";
  8027. }
  8028. function getAlignmentAxis(placement) {
  8029. return getOppositeAxis(getSideAxis(placement));
  8030. }
  8031. function getAlignmentSides(placement, rects, rtl) {
  8032. if (rtl === void 0) rtl = false;
  8033. const alignment = getAlignment(placement);
  8034. const alignmentAxis = getAlignmentAxis(placement);
  8035. const length = getAxisLength(alignmentAxis);
  8036. let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
  8037. if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
  8038. return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
  8039. }
  8040. function getExpandedPlacements(placement) {
  8041. const oppositePlacement = getOppositePlacement(placement);
  8042. return [
  8043. getOppositeAlignmentPlacement(placement),
  8044. oppositePlacement,
  8045. getOppositeAlignmentPlacement(oppositePlacement)
  8046. ];
  8047. }
  8048. function getOppositeAlignmentPlacement(placement) {
  8049. return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
  8050. }
  8051. var lrPlacement = ["left", "right"];
  8052. var rlPlacement = ["right", "left"];
  8053. var tbPlacement = ["top", "bottom"];
  8054. var btPlacement = ["bottom", "top"];
  8055. function getSideList(side, isStart, rtl) {
  8056. switch (side) {
  8057. case "top":
  8058. case "bottom":
  8059. if (rtl) return isStart ? rlPlacement : lrPlacement;
  8060. return isStart ? lrPlacement : rlPlacement;
  8061. case "left":
  8062. case "right": return isStart ? tbPlacement : btPlacement;
  8063. default: return [];
  8064. }
  8065. }
  8066. function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
  8067. const alignment = getAlignment(placement);
  8068. let list = getSideList(getSide(placement), direction === "start", rtl);
  8069. if (alignment) {
  8070. list = list.map((side) => side + "-" + alignment);
  8071. if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
  8072. }
  8073. return list;
  8074. }
  8075. function getOppositePlacement(placement) {
  8076. const side = getSide(placement);
  8077. return oppositeSideMap[side] + placement.slice(side.length);
  8078. }
  8079. function expandPaddingObject(padding) {
  8080. return {
  8081. top: 0,
  8082. right: 0,
  8083. bottom: 0,
  8084. left: 0,
  8085. ...padding
  8086. };
  8087. }
  8088. function getPaddingObject(padding) {
  8089. return typeof padding !== "number" ? expandPaddingObject(padding) : {
  8090. top: padding,
  8091. right: padding,
  8092. bottom: padding,
  8093. left: padding
  8094. };
  8095. }
  8096. function rectToClientRect(rect) {
  8097. const { x, y, width, height } = rect;
  8098. return {
  8099. width,
  8100. height,
  8101. top: y,
  8102. left: x,
  8103. right: x + width,
  8104. bottom: y + height,
  8105. x,
  8106. y
  8107. };
  8108. }
  8109. //#endregion
  8110. //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
  8111. function computeCoordsFromPlacement(_ref, placement, rtl) {
  8112. let { reference, floating } = _ref;
  8113. const sideAxis = getSideAxis(placement);
  8114. const alignmentAxis = getAlignmentAxis(placement);
  8115. const alignLength = getAxisLength(alignmentAxis);
  8116. const side = getSide(placement);
  8117. const isVertical = sideAxis === "y";
  8118. const commonX = reference.x + reference.width / 2 - floating.width / 2;
  8119. const commonY = reference.y + reference.height / 2 - floating.height / 2;
  8120. const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
  8121. let coords;
  8122. switch (side) {
  8123. case "top":
  8124. coords = {
  8125. x: commonX,
  8126. y: reference.y - floating.height
  8127. };
  8128. break;
  8129. case "bottom":
  8130. coords = {
  8131. x: commonX,
  8132. y: reference.y + reference.height
  8133. };
  8134. break;
  8135. case "right":
  8136. coords = {
  8137. x: reference.x + reference.width,
  8138. y: commonY
  8139. };
  8140. break;
  8141. case "left":
  8142. coords = {
  8143. x: reference.x - floating.width,
  8144. y: commonY
  8145. };
  8146. break;
  8147. default: coords = {
  8148. x: reference.x,
  8149. y: reference.y
  8150. };
  8151. }
  8152. switch (getAlignment(placement)) {
  8153. case "start":
  8154. coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
  8155. break;
  8156. case "end":
  8157. coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
  8158. break;
  8159. }
  8160. return coords;
  8161. }
  8162. /**
  8163. * Resolves with an object of overflow side offsets that determine how much the
  8164. * element is overflowing a given clipping boundary on each side.
  8165. * - positive = overflowing the boundary by that number of pixels
  8166. * - negative = how many pixels left before it will overflow
  8167. * - 0 = lies flush with the boundary
  8168. * @see https://floating-ui.com/docs/detectOverflow
  8169. */
  8170. async function detectOverflow$1(state, options) {
  8171. var _await$platform$isEle;
  8172. if (options === void 0) options = {};
  8173. const { x, y, platform, rects, elements, strategy } = state;
  8174. const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
  8175. const paddingObject = getPaddingObject(padding);
  8176. const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
  8177. const clippingClientRect = rectToClientRect(await platform.getClippingRect({
  8178. element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
  8179. boundary,
  8180. rootBoundary,
  8181. strategy
  8182. }));
  8183. const rect = elementContext === "floating" ? {
  8184. x,
  8185. y,
  8186. width: rects.floating.width,
  8187. height: rects.floating.height
  8188. } : rects.reference;
  8189. const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
  8190. const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
  8191. x: 1,
  8192. y: 1
  8193. } : {
  8194. x: 1,
  8195. y: 1
  8196. };
  8197. const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
  8198. elements,
  8199. rect,
  8200. offsetParent,
  8201. strategy
  8202. }) : rect);
  8203. return {
  8204. top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
  8205. bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
  8206. left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
  8207. right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
  8208. };
  8209. }
  8210. var MAX_RESET_COUNT = 50;
  8211. /**
  8212. * Computes the `x` and `y` coordinates that will place the floating element
  8213. * next to a given reference element.
  8214. *
  8215. * This export does not have any `platform` interface logic. You will need to
  8216. * write one for the platform you are using Floating UI with.
  8217. */
  8218. var computePosition$1 = async (reference, floating, config) => {
  8219. const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
  8220. const platformWithDetectOverflow = platform.detectOverflow ? platform : {
  8221. ...platform,
  8222. detectOverflow: detectOverflow$1
  8223. };
  8224. const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
  8225. let rects = await platform.getElementRects({
  8226. reference,
  8227. floating,
  8228. strategy
  8229. });
  8230. let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
  8231. let statefulPlacement = placement;
  8232. let resetCount = 0;
  8233. const middlewareData = {};
  8234. for (let i = 0; i < middleware.length; i++) {
  8235. const currentMiddleware = middleware[i];
  8236. if (!currentMiddleware) continue;
  8237. const { name, fn } = currentMiddleware;
  8238. const { x: nextX, y: nextY, data, reset } = await fn({
  8239. x,
  8240. y,
  8241. initialPlacement: placement,
  8242. placement: statefulPlacement,
  8243. strategy,
  8244. middlewareData,
  8245. rects,
  8246. platform: platformWithDetectOverflow,
  8247. elements: {
  8248. reference,
  8249. floating
  8250. }
  8251. });
  8252. x = nextX != null ? nextX : x;
  8253. y = nextY != null ? nextY : y;
  8254. middlewareData[name] = {
  8255. ...middlewareData[name],
  8256. ...data
  8257. };
  8258. if (reset && resetCount < MAX_RESET_COUNT) {
  8259. resetCount++;
  8260. if (typeof reset === "object") {
  8261. if (reset.placement) statefulPlacement = reset.placement;
  8262. if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
  8263. reference,
  8264. floating,
  8265. strategy
  8266. }) : reset.rects;
  8267. ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
  8268. }
  8269. i = -1;
  8270. }
  8271. }
  8272. return {
  8273. x,
  8274. y,
  8275. placement: statefulPlacement,
  8276. strategy,
  8277. middlewareData
  8278. };
  8279. };
  8280. /**
  8281. * Provides data to position an inner element of the floating element so that it
  8282. * appears centered to the reference element.
  8283. * @see https://floating-ui.com/docs/arrow
  8284. */
  8285. var arrow$1 = (options) => ({
  8286. name: "arrow",
  8287. options,
  8288. async fn(state) {
  8289. const { x, y, placement, rects, platform, elements, middlewareData } = state;
  8290. const { element, padding = 0 } = evaluate(options, state) || {};
  8291. if (element == null) return {};
  8292. const paddingObject = getPaddingObject(padding);
  8293. const coords = {
  8294. x,
  8295. y
  8296. };
  8297. const axis = getAlignmentAxis(placement);
  8298. const length = getAxisLength(axis);
  8299. const arrowDimensions = await platform.getDimensions(element);
  8300. const isYAxis = axis === "y";
  8301. const minProp = isYAxis ? "top" : "left";
  8302. const maxProp = isYAxis ? "bottom" : "right";
  8303. const clientProp = isYAxis ? "clientHeight" : "clientWidth";
  8304. const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
  8305. const startDiff = coords[axis] - rects.reference[axis];
  8306. const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
  8307. let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
  8308. if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];
  8309. const centerToReference = endDiff / 2 - startDiff / 2;
  8310. const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
  8311. const minPadding = min$1(paddingObject[minProp], largestPossiblePadding);
  8312. const maxPadding = min$1(paddingObject[maxProp], largestPossiblePadding);
  8313. const min$1$1 = minPadding;
  8314. const max = clientSize - arrowDimensions[length] - maxPadding;
  8315. const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
  8316. const offset = clamp(min$1$1, center, max);
  8317. const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
  8318. const alignmentOffset = shouldAddOffset ? center < min$1$1 ? center - min$1$1 : center - max : 0;
  8319. return {
  8320. [axis]: coords[axis] + alignmentOffset,
  8321. data: {
  8322. [axis]: offset,
  8323. centerOffset: center - offset - alignmentOffset,
  8324. ...shouldAddOffset && { alignmentOffset }
  8325. },
  8326. reset: shouldAddOffset
  8327. };
  8328. }
  8329. });
  8330. /**
  8331. * Optimizes the visibility of the floating element by flipping the `placement`
  8332. * in order to keep it in view when the preferred placement(s) will overflow the
  8333. * clipping boundary. Alternative to `autoPlacement`.
  8334. * @see https://floating-ui.com/docs/flip
  8335. */
  8336. var flip$1 = function(options) {
  8337. if (options === void 0) options = {};
  8338. return {
  8339. name: "flip",
  8340. options,
  8341. async fn(state) {
  8342. var _middlewareData$arrow, _middlewareData$flip;
  8343. const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
  8344. const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
  8345. if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
  8346. const side = getSide(placement);
  8347. const initialSideAxis = getSideAxis(initialPlacement);
  8348. const isBasePlacement = getSide(initialPlacement) === initialPlacement;
  8349. const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
  8350. const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
  8351. const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
  8352. if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
  8353. const placements = [initialPlacement, ...fallbackPlacements];
  8354. const overflow = await platform.detectOverflow(state, detectOverflowOptions);
  8355. const overflows = [];
  8356. let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
  8357. if (checkMainAxis) overflows.push(overflow[side]);
  8358. if (checkCrossAxis) {
  8359. const sides = getAlignmentSides(placement, rects, rtl);
  8360. overflows.push(overflow[sides[0]], overflow[sides[1]]);
  8361. }
  8362. overflowsData = [...overflowsData, {
  8363. placement,
  8364. overflows
  8365. }];
  8366. if (!overflows.every((side) => side <= 0)) {
  8367. var _middlewareData$flip2, _overflowsData$filter;
  8368. const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
  8369. const nextPlacement = placements[nextIndex];
  8370. if (nextPlacement) {
  8371. if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
  8372. data: {
  8373. index: nextIndex,
  8374. overflows: overflowsData
  8375. },
  8376. reset: { placement: nextPlacement }
  8377. };
  8378. }
  8379. let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
  8380. if (!resetPlacement) switch (fallbackStrategy) {
  8381. case "bestFit": {
  8382. var _overflowsData$filter2;
  8383. const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
  8384. if (hasFallbackAxisSideDirection) {
  8385. const currentSideAxis = getSideAxis(d.placement);
  8386. return currentSideAxis === initialSideAxis || currentSideAxis === "y";
  8387. }
  8388. return true;
  8389. }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
  8390. if (placement) resetPlacement = placement;
  8391. break;
  8392. }
  8393. case "initialPlacement":
  8394. resetPlacement = initialPlacement;
  8395. break;
  8396. }
  8397. if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
  8398. }
  8399. return {};
  8400. }
  8401. };
  8402. };
  8403. var originSides = /*#__PURE__*/ new Set(["left", "top"]);
  8404. async function convertValueToCoords(state, options) {
  8405. const { placement, platform, elements } = state;
  8406. const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
  8407. const side = getSide(placement);
  8408. const alignment = getAlignment(placement);
  8409. const isVertical = getSideAxis(placement) === "y";
  8410. const mainAxisMulti = originSides.has(side) ? -1 : 1;
  8411. const crossAxisMulti = rtl && isVertical ? -1 : 1;
  8412. const rawValue = evaluate(options, state);
  8413. let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
  8414. mainAxis: rawValue,
  8415. crossAxis: 0,
  8416. alignmentAxis: null
  8417. } : {
  8418. mainAxis: rawValue.mainAxis || 0,
  8419. crossAxis: rawValue.crossAxis || 0,
  8420. alignmentAxis: rawValue.alignmentAxis
  8421. };
  8422. if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
  8423. return isVertical ? {
  8424. x: crossAxis * crossAxisMulti,
  8425. y: mainAxis * mainAxisMulti
  8426. } : {
  8427. x: mainAxis * mainAxisMulti,
  8428. y: crossAxis * crossAxisMulti
  8429. };
  8430. }
  8431. /**
  8432. * Modifies the placement by translating the floating element along the
  8433. * specified axes.
  8434. * A number (shorthand for `mainAxis` or distance), or an axes configuration
  8435. * object may be passed.
  8436. * @see https://floating-ui.com/docs/offset
  8437. */
  8438. var offset$1 = function(options) {
  8439. if (options === void 0) options = 0;
  8440. return {
  8441. name: "offset",
  8442. options,
  8443. async fn(state) {
  8444. var _middlewareData$offse, _middlewareData$arrow;
  8445. const { x, y, placement, middlewareData } = state;
  8446. const diffCoords = await convertValueToCoords(state, options);
  8447. if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
  8448. return {
  8449. x: x + diffCoords.x,
  8450. y: y + diffCoords.y,
  8451. data: {
  8452. ...diffCoords,
  8453. placement
  8454. }
  8455. };
  8456. }
  8457. };
  8458. };
  8459. /**
  8460. * Optimizes the visibility of the floating element by shifting it in order to
  8461. * keep it in view when it will overflow the clipping boundary.
  8462. * @see https://floating-ui.com/docs/shift
  8463. */
  8464. var shift$1 = function(options) {
  8465. if (options === void 0) options = {};
  8466. return {
  8467. name: "shift",
  8468. options,
  8469. async fn(state) {
  8470. const { x, y, placement, platform } = state;
  8471. const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
  8472. let { x, y } = _ref;
  8473. return {
  8474. x,
  8475. y
  8476. };
  8477. } }, ...detectOverflowOptions } = evaluate(options, state);
  8478. const coords = {
  8479. x,
  8480. y
  8481. };
  8482. const overflow = await platform.detectOverflow(state, detectOverflowOptions);
  8483. const crossAxis = getSideAxis(getSide(placement));
  8484. const mainAxis = getOppositeAxis(crossAxis);
  8485. let mainAxisCoord = coords[mainAxis];
  8486. let crossAxisCoord = coords[crossAxis];
  8487. if (checkMainAxis) {
  8488. const minSide = mainAxis === "y" ? "top" : "left";
  8489. const maxSide = mainAxis === "y" ? "bottom" : "right";
  8490. const min = mainAxisCoord + overflow[minSide];
  8491. const max = mainAxisCoord - overflow[maxSide];
  8492. mainAxisCoord = clamp(min, mainAxisCoord, max);
  8493. }
  8494. if (checkCrossAxis) {
  8495. const minSide = crossAxis === "y" ? "top" : "left";
  8496. const maxSide = crossAxis === "y" ? "bottom" : "right";
  8497. const min = crossAxisCoord + overflow[minSide];
  8498. const max = crossAxisCoord - overflow[maxSide];
  8499. crossAxisCoord = clamp(min, crossAxisCoord, max);
  8500. }
  8501. const limitedCoords = limiter.fn({
  8502. ...state,
  8503. [mainAxis]: mainAxisCoord,
  8504. [crossAxis]: crossAxisCoord
  8505. });
  8506. return {
  8507. ...limitedCoords,
  8508. data: {
  8509. x: limitedCoords.x - x,
  8510. y: limitedCoords.y - y,
  8511. enabled: {
  8512. [mainAxis]: checkMainAxis,
  8513. [crossAxis]: checkCrossAxis
  8514. }
  8515. }
  8516. };
  8517. }
  8518. };
  8519. };
  8520. //#endregion
  8521. //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
  8522. function hasWindow() {
  8523. return typeof window !== "undefined";
  8524. }
  8525. function getNodeName(node) {
  8526. if (isNode(node)) return (node.nodeName || "").toLowerCase();
  8527. return "#document";
  8528. }
  8529. function getWindow(node) {
  8530. var _node$ownerDocument;
  8531. return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
  8532. }
  8533. function getDocumentElement(node) {
  8534. var _ref;
  8535. return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
  8536. }
  8537. function isNode(value) {
  8538. if (!hasWindow()) return false;
  8539. return value instanceof Node || value instanceof getWindow(value).Node;
  8540. }
  8541. function isElement(value) {
  8542. if (!hasWindow()) return false;
  8543. return value instanceof Element || value instanceof getWindow(value).Element;
  8544. }
  8545. function isHTMLElement(value) {
  8546. if (!hasWindow()) return false;
  8547. return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
  8548. }
  8549. function isShadowRoot(value) {
  8550. if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
  8551. return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
  8552. }
  8553. function isOverflowElement(element) {
  8554. const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
  8555. return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
  8556. }
  8557. function isTableElement(element) {
  8558. return /^(table|td|th)$/.test(getNodeName(element));
  8559. }
  8560. function isTopLayer(element) {
  8561. try {
  8562. if (element.matches(":popover-open")) return true;
  8563. } catch (_e) {}
  8564. try {
  8565. return element.matches(":modal");
  8566. } catch (_e) {
  8567. return false;
  8568. }
  8569. }
  8570. var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
  8571. var containRe = /paint|layout|strict|content/;
  8572. var isNotNone = (value) => !!value && value !== "none";
  8573. var isWebKitValue;
  8574. function isContainingBlock(elementOrCss) {
  8575. const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
  8576. return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
  8577. }
  8578. function getContainingBlock(element) {
  8579. let currentNode = getParentNode(element);
  8580. while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
  8581. if (isContainingBlock(currentNode)) return currentNode;
  8582. else if (isTopLayer(currentNode)) return null;
  8583. currentNode = getParentNode(currentNode);
  8584. }
  8585. return null;
  8586. }
  8587. function isWebKit() {
  8588. if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
  8589. return isWebKitValue;
  8590. }
  8591. function isLastTraversableNode(node) {
  8592. return /^(html|body|#document)$/.test(getNodeName(node));
  8593. }
  8594. function getComputedStyle$1(element) {
  8595. return getWindow(element).getComputedStyle(element);
  8596. }
  8597. function getNodeScroll(element) {
  8598. if (isElement(element)) return {
  8599. scrollLeft: element.scrollLeft,
  8600. scrollTop: element.scrollTop
  8601. };
  8602. return {
  8603. scrollLeft: element.scrollX,
  8604. scrollTop: element.scrollY
  8605. };
  8606. }
  8607. function getParentNode(node) {
  8608. if (getNodeName(node) === "html") return node;
  8609. const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
  8610. return isShadowRoot(result) ? result.host : result;
  8611. }
  8612. function getNearestOverflowAncestor(node) {
  8613. const parentNode = getParentNode(node);
  8614. if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
  8615. if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
  8616. return getNearestOverflowAncestor(parentNode);
  8617. }
  8618. function getOverflowAncestors(node, list, traverseIframes) {
  8619. var _node$ownerDocument2;
  8620. if (list === void 0) list = [];
  8621. if (traverseIframes === void 0) traverseIframes = true;
  8622. const scrollableAncestor = getNearestOverflowAncestor(node);
  8623. const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
  8624. const win = getWindow(scrollableAncestor);
  8625. if (isBody) {
  8626. const frameElement = getFrameElement(win);
  8627. return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
  8628. } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
  8629. }
  8630. function getFrameElement(win) {
  8631. return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
  8632. }
  8633. //#endregion
  8634. //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
  8635. function getCssDimensions(element) {
  8636. const css = getComputedStyle$1(element);
  8637. let width = parseFloat(css.width) || 0;
  8638. let height = parseFloat(css.height) || 0;
  8639. const hasOffset = isHTMLElement(element);
  8640. const offsetWidth = hasOffset ? element.offsetWidth : width;
  8641. const offsetHeight = hasOffset ? element.offsetHeight : height;
  8642. const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
  8643. if (shouldFallback) {
  8644. width = offsetWidth;
  8645. height = offsetHeight;
  8646. }
  8647. return {
  8648. width,
  8649. height,
  8650. $: shouldFallback
  8651. };
  8652. }
  8653. function unwrapElement(element) {
  8654. return !isElement(element) ? element.contextElement : element;
  8655. }
  8656. function getScale(element) {
  8657. const domElement = unwrapElement(element);
  8658. if (!isHTMLElement(domElement)) return createCoords(1);
  8659. const rect = domElement.getBoundingClientRect();
  8660. const { width, height, $ } = getCssDimensions(domElement);
  8661. let x = ($ ? round(rect.width) : rect.width) / width;
  8662. let y = ($ ? round(rect.height) : rect.height) / height;
  8663. if (!x || !Number.isFinite(x)) x = 1;
  8664. if (!y || !Number.isFinite(y)) y = 1;
  8665. return {
  8666. x,
  8667. y
  8668. };
  8669. }
  8670. var noOffsets = /*#__PURE__*/ createCoords(0);
  8671. function getVisualOffsets(element) {
  8672. const win = getWindow(element);
  8673. if (!isWebKit() || !win.visualViewport) return noOffsets;
  8674. return {
  8675. x: win.visualViewport.offsetLeft,
  8676. y: win.visualViewport.offsetTop
  8677. };
  8678. }
  8679. function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
  8680. if (isFixed === void 0) isFixed = false;
  8681. if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) return false;
  8682. return isFixed;
  8683. }
  8684. function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
  8685. if (includeScale === void 0) includeScale = false;
  8686. if (isFixedStrategy === void 0) isFixedStrategy = false;
  8687. const clientRect = element.getBoundingClientRect();
  8688. const domElement = unwrapElement(element);
  8689. let scale = createCoords(1);
  8690. if (includeScale) if (offsetParent) {
  8691. if (isElement(offsetParent)) scale = getScale(offsetParent);
  8692. } else scale = getScale(element);
  8693. const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
  8694. let x = (clientRect.left + visualOffsets.x) / scale.x;
  8695. let y = (clientRect.top + visualOffsets.y) / scale.y;
  8696. let width = clientRect.width / scale.x;
  8697. let height = clientRect.height / scale.y;
  8698. if (domElement) {
  8699. const win = getWindow(domElement);
  8700. const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
  8701. let currentWin = win;
  8702. let currentIFrame = getFrameElement(currentWin);
  8703. while (currentIFrame && offsetParent && offsetWin !== currentWin) {
  8704. const iframeScale = getScale(currentIFrame);
  8705. const iframeRect = currentIFrame.getBoundingClientRect();
  8706. const css = getComputedStyle$1(currentIFrame);
  8707. const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
  8708. const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
  8709. x *= iframeScale.x;
  8710. y *= iframeScale.y;
  8711. width *= iframeScale.x;
  8712. height *= iframeScale.y;
  8713. x += left;
  8714. y += top;
  8715. currentWin = getWindow(currentIFrame);
  8716. currentIFrame = getFrameElement(currentWin);
  8717. }
  8718. }
  8719. return rectToClientRect({
  8720. width,
  8721. height,
  8722. x,
  8723. y
  8724. });
  8725. }
  8726. function getWindowScrollBarX(element, rect) {
  8727. const leftScroll = getNodeScroll(element).scrollLeft;
  8728. if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
  8729. return rect.left + leftScroll;
  8730. }
  8731. function getHTMLOffset(documentElement, scroll) {
  8732. const htmlRect = documentElement.getBoundingClientRect();
  8733. return {
  8734. x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
  8735. y: htmlRect.top + scroll.scrollTop
  8736. };
  8737. }
  8738. function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
  8739. let { elements, rect, offsetParent, strategy } = _ref;
  8740. const isFixed = strategy === "fixed";
  8741. const documentElement = getDocumentElement(offsetParent);
  8742. const topLayer = elements ? isTopLayer(elements.floating) : false;
  8743. if (offsetParent === documentElement || topLayer && isFixed) return rect;
  8744. let scroll = {
  8745. scrollLeft: 0,
  8746. scrollTop: 0
  8747. };
  8748. let scale = createCoords(1);
  8749. const offsets = createCoords(0);
  8750. const isOffsetParentAnElement = isHTMLElement(offsetParent);
  8751. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  8752. if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
  8753. if (isOffsetParentAnElement) {
  8754. const offsetRect = getBoundingClientRect(offsetParent);
  8755. scale = getScale(offsetParent);
  8756. offsets.x = offsetRect.x + offsetParent.clientLeft;
  8757. offsets.y = offsetRect.y + offsetParent.clientTop;
  8758. }
  8759. }
  8760. const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
  8761. return {
  8762. width: rect.width * scale.x,
  8763. height: rect.height * scale.y,
  8764. x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
  8765. y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
  8766. };
  8767. }
  8768. function getClientRects(element) {
  8769. return Array.from(element.getClientRects());
  8770. }
  8771. function getDocumentRect(element) {
  8772. const html = getDocumentElement(element);
  8773. const scroll = getNodeScroll(element);
  8774. const body = element.ownerDocument.body;
  8775. const width = max$1(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
  8776. const height = max$1(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
  8777. let x = -scroll.scrollLeft + getWindowScrollBarX(element);
  8778. const y = -scroll.scrollTop;
  8779. if (getComputedStyle$1(body).direction === "rtl") x += max$1(html.clientWidth, body.clientWidth) - width;
  8780. return {
  8781. width,
  8782. height,
  8783. x,
  8784. y
  8785. };
  8786. }
  8787. var SCROLLBAR_MAX = 25;
  8788. function getViewportRect(element, strategy) {
  8789. const win = getWindow(element);
  8790. const html = getDocumentElement(element);
  8791. const visualViewport = win.visualViewport;
  8792. let width = html.clientWidth;
  8793. let height = html.clientHeight;
  8794. let x = 0;
  8795. let y = 0;
  8796. if (visualViewport) {
  8797. width = visualViewport.width;
  8798. height = visualViewport.height;
  8799. const visualViewportBased = isWebKit();
  8800. if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
  8801. x = visualViewport.offsetLeft;
  8802. y = visualViewport.offsetTop;
  8803. }
  8804. }
  8805. const windowScrollbarX = getWindowScrollBarX(html);
  8806. if (windowScrollbarX <= 0) {
  8807. const doc = html.ownerDocument;
  8808. const body = doc.body;
  8809. const bodyStyles = getComputedStyle(body);
  8810. const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
  8811. const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
  8812. if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) width -= clippingStableScrollbarWidth;
  8813. } else if (windowScrollbarX <= SCROLLBAR_MAX) width += windowScrollbarX;
  8814. return {
  8815. width,
  8816. height,
  8817. x,
  8818. y
  8819. };
  8820. }
  8821. function getInnerBoundingClientRect(element, strategy) {
  8822. const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
  8823. const top = clientRect.top + element.clientTop;
  8824. const left = clientRect.left + element.clientLeft;
  8825. const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
  8826. return {
  8827. width: element.clientWidth * scale.x,
  8828. height: element.clientHeight * scale.y,
  8829. x: left * scale.x,
  8830. y: top * scale.y
  8831. };
  8832. }
  8833. function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
  8834. let rect;
  8835. if (clippingAncestor === "viewport") rect = getViewportRect(element, strategy);
  8836. else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
  8837. else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
  8838. else {
  8839. const visualOffsets = getVisualOffsets(element);
  8840. rect = {
  8841. x: clippingAncestor.x - visualOffsets.x,
  8842. y: clippingAncestor.y - visualOffsets.y,
  8843. width: clippingAncestor.width,
  8844. height: clippingAncestor.height
  8845. };
  8846. }
  8847. return rectToClientRect(rect);
  8848. }
  8849. function hasFixedPositionAncestor(element, stopNode) {
  8850. const parentNode = getParentNode(element);
  8851. if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
  8852. return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
  8853. }
  8854. function getClippingElementAncestors(element, cache) {
  8855. const cachedResult = cache.get(element);
  8856. if (cachedResult) return cachedResult;
  8857. let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
  8858. let currentContainingBlockComputedStyle = null;
  8859. const elementIsFixed = getComputedStyle$1(element).position === "fixed";
  8860. let currentNode = elementIsFixed ? getParentNode(element) : element;
  8861. while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
  8862. const computedStyle = getComputedStyle$1(currentNode);
  8863. const currentNodeIsContaining = isContainingBlock(currentNode);
  8864. if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
  8865. if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
  8866. else currentContainingBlockComputedStyle = computedStyle;
  8867. currentNode = getParentNode(currentNode);
  8868. }
  8869. cache.set(element, result);
  8870. return result;
  8871. }
  8872. function getClippingRect(_ref) {
  8873. let { element, boundary, rootBoundary, strategy } = _ref;
  8874. const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
  8875. const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
  8876. let top = firstRect.top;
  8877. let right = firstRect.right;
  8878. let bottom = firstRect.bottom;
  8879. let left = firstRect.left;
  8880. for (let i = 1; i < clippingAncestors.length; i++) {
  8881. const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
  8882. top = max$1(rect.top, top);
  8883. right = min$1(rect.right, right);
  8884. bottom = min$1(rect.bottom, bottom);
  8885. left = max$1(rect.left, left);
  8886. }
  8887. return {
  8888. width: right - left,
  8889. height: bottom - top,
  8890. x: left,
  8891. y: top
  8892. };
  8893. }
  8894. function getDimensions(element) {
  8895. const { width, height } = getCssDimensions(element);
  8896. return {
  8897. width,
  8898. height
  8899. };
  8900. }
  8901. function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
  8902. const isOffsetParentAnElement = isHTMLElement(offsetParent);
  8903. const documentElement = getDocumentElement(offsetParent);
  8904. const isFixed = strategy === "fixed";
  8905. const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
  8906. let scroll = {
  8907. scrollLeft: 0,
  8908. scrollTop: 0
  8909. };
  8910. const offsets = createCoords(0);
  8911. function setLeftRTLScrollbarOffset() {
  8912. offsets.x = getWindowScrollBarX(documentElement);
  8913. }
  8914. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  8915. if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
  8916. if (isOffsetParentAnElement) {
  8917. const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
  8918. offsets.x = offsetRect.x + offsetParent.clientLeft;
  8919. offsets.y = offsetRect.y + offsetParent.clientTop;
  8920. } else if (documentElement) setLeftRTLScrollbarOffset();
  8921. }
  8922. if (isFixed && !isOffsetParentAnElement && documentElement) setLeftRTLScrollbarOffset();
  8923. const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
  8924. return {
  8925. x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
  8926. y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
  8927. width: rect.width,
  8928. height: rect.height
  8929. };
  8930. }
  8931. function isStaticPositioned(element) {
  8932. return getComputedStyle$1(element).position === "static";
  8933. }
  8934. function getTrueOffsetParent(element, polyfill) {
  8935. if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
  8936. if (polyfill) return polyfill(element);
  8937. let rawOffsetParent = element.offsetParent;
  8938. if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
  8939. return rawOffsetParent;
  8940. }
  8941. function getOffsetParent(element, polyfill) {
  8942. const win = getWindow(element);
  8943. if (isTopLayer(element)) return win;
  8944. if (!isHTMLElement(element)) {
  8945. let svgOffsetParent = getParentNode(element);
  8946. while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
  8947. if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
  8948. svgOffsetParent = getParentNode(svgOffsetParent);
  8949. }
  8950. return win;
  8951. }
  8952. let offsetParent = getTrueOffsetParent(element, polyfill);
  8953. while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
  8954. if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
  8955. return offsetParent || getContainingBlock(element) || win;
  8956. }
  8957. var getElementRects = async function(data) {
  8958. const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
  8959. const getDimensionsFn = this.getDimensions;
  8960. const floatingDimensions = await getDimensionsFn(data.floating);
  8961. return {
  8962. reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
  8963. floating: {
  8964. x: 0,
  8965. y: 0,
  8966. width: floatingDimensions.width,
  8967. height: floatingDimensions.height
  8968. }
  8969. };
  8970. };
  8971. function isRTL$1(element) {
  8972. return getComputedStyle$1(element).direction === "rtl";
  8973. }
  8974. var platform = {
  8975. convertOffsetParentRelativeRectToViewportRelativeRect,
  8976. getDocumentElement,
  8977. getClippingRect,
  8978. getOffsetParent,
  8979. getElementRects,
  8980. getClientRects,
  8981. getDimensions,
  8982. getScale,
  8983. isElement,
  8984. isRTL: isRTL$1
  8985. };
  8986. function rectsAreEqual(a, b) {
  8987. return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
  8988. }
  8989. function observeMove(element, onMove) {
  8990. let io = null;
  8991. let timeoutId;
  8992. const root = getDocumentElement(element);
  8993. function cleanup() {
  8994. var _io;
  8995. clearTimeout(timeoutId);
  8996. (_io = io) == null || _io.disconnect();
  8997. io = null;
  8998. }
  8999. function refresh(skip, threshold) {
  9000. if (skip === void 0) skip = false;
  9001. if (threshold === void 0) threshold = 1;
  9002. cleanup();
  9003. const elementRectForRootMargin = element.getBoundingClientRect();
  9004. const { left, top, width, height } = elementRectForRootMargin;
  9005. if (!skip) onMove();
  9006. if (!width || !height) return;
  9007. const insetTop = floor$1(top);
  9008. const insetRight = floor$1(root.clientWidth - (left + width));
  9009. const insetBottom = floor$1(root.clientHeight - (top + height));
  9010. const insetLeft = floor$1(left);
  9011. const options = {
  9012. rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
  9013. threshold: max$1(0, min$1(1, threshold)) || 1
  9014. };
  9015. let isFirstUpdate = true;
  9016. function handleObserve(entries) {
  9017. const ratio = entries[0].intersectionRatio;
  9018. if (ratio !== threshold) {
  9019. if (!isFirstUpdate) return refresh();
  9020. if (!ratio) timeoutId = setTimeout(() => {
  9021. refresh(false, 1e-7);
  9022. }, 1e3);
  9023. else refresh(false, ratio);
  9024. }
  9025. if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) refresh();
  9026. isFirstUpdate = false;
  9027. }
  9028. try {
  9029. io = new IntersectionObserver(handleObserve, {
  9030. ...options,
  9031. root: root.ownerDocument
  9032. });
  9033. } catch (_e) {
  9034. io = new IntersectionObserver(handleObserve, options);
  9035. }
  9036. io.observe(element);
  9037. }
  9038. refresh(true);
  9039. return cleanup;
  9040. }
  9041. /**
  9042. * Automatically updates the position of the floating element when necessary.
  9043. * Should only be called when the floating element is mounted on the DOM or
  9044. * visible on the screen.
  9045. * @returns cleanup function that should be invoked when the floating element is
  9046. * removed from the DOM or hidden from the screen.
  9047. * @see https://floating-ui.com/docs/autoUpdate
  9048. */
  9049. function autoUpdate(reference, floating, update, options) {
  9050. if (options === void 0) options = {};
  9051. const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
  9052. const referenceEl = unwrapElement(reference);
  9053. const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
  9054. ancestors.forEach((ancestor) => {
  9055. ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
  9056. ancestorResize && ancestor.addEventListener("resize", update);
  9057. });
  9058. const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
  9059. let reobserveFrame = -1;
  9060. let resizeObserver = null;
  9061. if (elementResize) {
  9062. resizeObserver = new ResizeObserver((_ref) => {
  9063. let [firstEntry] = _ref;
  9064. if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
  9065. resizeObserver.unobserve(floating);
  9066. cancelAnimationFrame(reobserveFrame);
  9067. reobserveFrame = requestAnimationFrame(() => {
  9068. var _resizeObserver;
  9069. (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
  9070. });
  9071. }
  9072. update();
  9073. });
  9074. if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
  9075. if (floating) resizeObserver.observe(floating);
  9076. }
  9077. let frameId;
  9078. let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
  9079. if (animationFrame) frameLoop();
  9080. function frameLoop() {
  9081. const nextRefRect = getBoundingClientRect(reference);
  9082. if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
  9083. prevRefRect = nextRefRect;
  9084. frameId = requestAnimationFrame(frameLoop);
  9085. }
  9086. update();
  9087. return () => {
  9088. var _resizeObserver2;
  9089. ancestors.forEach((ancestor) => {
  9090. ancestorScroll && ancestor.removeEventListener("scroll", update);
  9091. ancestorResize && ancestor.removeEventListener("resize", update);
  9092. });
  9093. cleanupIo?.();
  9094. (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
  9095. resizeObserver = null;
  9096. if (animationFrame) cancelAnimationFrame(frameId);
  9097. };
  9098. }
  9099. /**
  9100. * Resolves with an object of overflow side offsets that determine how much the
  9101. * element is overflowing a given clipping boundary on each side.
  9102. * - positive = overflowing the boundary by that number of pixels
  9103. * - negative = how many pixels left before it will overflow
  9104. * - 0 = lies flush with the boundary
  9105. * @see https://floating-ui.com/docs/detectOverflow
  9106. */
  9107. var detectOverflow = detectOverflow$1;
  9108. /**
  9109. * Modifies the placement by translating the floating element along the
  9110. * specified axes.
  9111. * A number (shorthand for `mainAxis` or distance), or an axes configuration
  9112. * object may be passed.
  9113. * @see https://floating-ui.com/docs/offset
  9114. */
  9115. var offset = offset$1;
  9116. /**
  9117. * Optimizes the visibility of the floating element by shifting it in order to
  9118. * keep it in view when it will overflow the clipping boundary.
  9119. * @see https://floating-ui.com/docs/shift
  9120. */
  9121. var shift = shift$1;
  9122. /**
  9123. * Optimizes the visibility of the floating element by flipping the `placement`
  9124. * in order to keep it in view when the preferred placement(s) will overflow the
  9125. * clipping boundary. Alternative to `autoPlacement`.
  9126. * @see https://floating-ui.com/docs/flip
  9127. */
  9128. var flip = flip$1;
  9129. /**
  9130. * Provides data to position an inner element of the floating element so that it
  9131. * appears centered to the reference element.
  9132. * @see https://floating-ui.com/docs/arrow
  9133. */
  9134. var arrow = arrow$1;
  9135. /**
  9136. * Computes the `x` and `y` coordinates that will place the floating element
  9137. * next to a given reference element.
  9138. */
  9139. var computePosition = (reference, floating, options) => {
  9140. const cache = /* @__PURE__ */ new Map();
  9141. const mergedOptions = {
  9142. platform,
  9143. ...options
  9144. };
  9145. const platformWithCache = {
  9146. ...mergedOptions.platform,
  9147. _c: cache
  9148. };
  9149. return computePosition$1(reference, floating, {
  9150. ...mergedOptions,
  9151. platform: platformWithCache
  9152. });
  9153. };
  9154. //#endregion
  9155. //#region node_modules/element-plus/es/hooks/use-floating/index.mjs
  9156. var useFloatingProps = buildProps({});
  9157. var unrefReference = (elRef) => {
  9158. if (!isClient) return;
  9159. if (!elRef) return elRef;
  9160. const unrefEl = unrefElement(elRef);
  9161. if (unrefEl) return unrefEl;
  9162. return isRef(elRef) ? unrefEl : elRef;
  9163. };
  9164. var getPositionDataWithUnit = (record, key) => {
  9165. const value = record?.[key];
  9166. return isNil(value) ? "" : `${value}px`;
  9167. };
  9168. var useFloating = ({ middleware, placement, strategy }) => {
  9169. const referenceRef = ref();
  9170. const contentRef = ref();
  9171. const states = {
  9172. x: ref(),
  9173. y: ref(),
  9174. placement,
  9175. strategy,
  9176. middlewareData: ref({})
  9177. };
  9178. const update = async () => {
  9179. if (!isClient) return;
  9180. const referenceEl = unrefReference(referenceRef);
  9181. const contentEl = unrefElement(contentRef);
  9182. if (!referenceEl || !contentEl) return;
  9183. const data = await computePosition(referenceEl, contentEl, {
  9184. placement: unref(placement),
  9185. strategy: unref(strategy),
  9186. middleware: unref(middleware)
  9187. });
  9188. keysOf(states).forEach((key) => {
  9189. states[key].value = data[key];
  9190. });
  9191. };
  9192. onMounted(() => {
  9193. watchEffect(() => {
  9194. update();
  9195. });
  9196. });
  9197. return {
  9198. ...states,
  9199. update,
  9200. referenceRef,
  9201. contentRef
  9202. };
  9203. };
  9204. var arrowMiddleware = ({ arrowRef, padding }) => {
  9205. return {
  9206. name: "arrow",
  9207. options: {
  9208. element: arrowRef,
  9209. padding
  9210. },
  9211. fn(args) {
  9212. const arrowEl = unref(arrowRef);
  9213. if (!arrowEl) return {};
  9214. return arrow({
  9215. element: arrowEl,
  9216. padding
  9217. }).fn(args);
  9218. }
  9219. };
  9220. };
  9221. //#endregion
  9222. //#region node_modules/element-plus/es/hooks/use-cursor/index.mjs
  9223. function useCursor(input) {
  9224. let selectionInfo;
  9225. function recordCursor() {
  9226. if (input.value == void 0) return;
  9227. const { selectionStart, selectionEnd, value } = input.value;
  9228. if (selectionStart == null || selectionEnd == null) return;
  9229. selectionInfo = {
  9230. selectionStart,
  9231. selectionEnd,
  9232. value,
  9233. beforeTxt: value.slice(0, Math.max(0, selectionStart)),
  9234. afterTxt: value.slice(Math.max(0, selectionEnd))
  9235. };
  9236. }
  9237. function setCursor() {
  9238. if (input.value == void 0 || selectionInfo == void 0) return;
  9239. const { value } = input.value;
  9240. const { beforeTxt, afterTxt, selectionStart } = selectionInfo;
  9241. if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0) return;
  9242. let startPos = value.length;
  9243. if (value.endsWith(afterTxt)) startPos = value.length - afterTxt.length;
  9244. else if (value.startsWith(beforeTxt)) startPos = beforeTxt.length;
  9245. else {
  9246. const beforeLastChar = beforeTxt[selectionStart - 1];
  9247. const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
  9248. if (newIndex !== -1) startPos = newIndex + 1;
  9249. }
  9250. input.value.setSelectionRange(startPos, startPos);
  9251. }
  9252. return [recordCursor, setCursor];
  9253. }
  9254. //#endregion
  9255. //#region node_modules/element-plus/es/utils/vue/vnode.mjs
  9256. var SCOPE$11 = "utils/vue/vnode";
  9257. function isFragment(node) {
  9258. return isVNode(node) && node.type === Fragment;
  9259. }
  9260. function isComment(node) {
  9261. return isVNode(node) && node.type === Comment;
  9262. }
  9263. function isValidElementNode(node) {
  9264. return isVNode(node) && !isFragment(node) && !isComment(node);
  9265. }
  9266. var getNormalizedProps = (node) => {
  9267. if (!isVNode(node)) {
  9268. debugWarn(SCOPE$11, "[getNormalizedProps] must be a VNode");
  9269. return {};
  9270. }
  9271. const raw = node.props || {};
  9272. const type = (isVNode(node.type) ? node.type.props : void 0) || {};
  9273. const props = {};
  9274. Object.keys(type).forEach((key) => {
  9275. if (hasOwn(type[key], "default")) props[key] = type[key].default;
  9276. });
  9277. Object.keys(raw).forEach((key) => {
  9278. props[camelize$1(key)] = raw[key];
  9279. });
  9280. return props;
  9281. };
  9282. var flattedChildren = (children) => {
  9283. const vNodes = isArray$1(children) ? children : [children];
  9284. const result = [];
  9285. vNodes.forEach((child) => {
  9286. if (isArray$1(child)) result.push(...flattedChildren(child));
  9287. else if (isVNode(child) && child.component?.subTree) result.push(child, ...flattedChildren(child.component.subTree));
  9288. else if (isVNode(child) && isArray$1(child.children)) result.push(...flattedChildren(child.children));
  9289. else if (isVNode(child) && child.shapeFlag === 2) result.push(...flattedChildren(child.type()));
  9290. else result.push(child);
  9291. });
  9292. return result;
  9293. };
  9294. //#endregion
  9295. //#region node_modules/element-plus/es/hooks/use-ordered-children/index.mjs
  9296. var getOrderedChildren = (vm, childComponentName, children) => {
  9297. return flattedChildren(vm.subTree).filter((n) => isVNode(n) && n.type?.name === childComponentName && !!n.component).map((n) => n.component.uid).map((uid) => children[uid]).filter((p) => !!p);
  9298. };
  9299. var useOrderedChildren = (vm, childComponentName) => {
  9300. const children = shallowRef({});
  9301. const orderedChildren = shallowRef([]);
  9302. const nodesMap = /* @__PURE__ */ new WeakMap();
  9303. const addChild = (child) => {
  9304. children.value[child.uid] = child;
  9305. triggerRef(children);
  9306. onMounted(() => {
  9307. const childNode = child.getVnode().el;
  9308. const parentNode = childNode.parentNode;
  9309. if (!nodesMap.has(parentNode)) {
  9310. nodesMap.set(parentNode, []);
  9311. const originalFn = parentNode.insertBefore.bind(parentNode);
  9312. parentNode.insertBefore = (node, anchor) => {
  9313. if (nodesMap.get(parentNode).some((el) => node === el || anchor === el)) triggerRef(children);
  9314. return originalFn(node, anchor);
  9315. };
  9316. }
  9317. nodesMap.get(parentNode).push(childNode);
  9318. });
  9319. };
  9320. const removeChild = (child) => {
  9321. delete children.value[child.uid];
  9322. triggerRef(children);
  9323. const childNode = child.getVnode().el;
  9324. const parentNode = childNode.parentNode;
  9325. const childNodes = nodesMap.get(parentNode);
  9326. const index = childNodes.indexOf(childNode);
  9327. childNodes.splice(index, 1);
  9328. };
  9329. const sortChildren = () => {
  9330. orderedChildren.value = getOrderedChildren(vm, childComponentName, children.value);
  9331. };
  9332. const IsolatedRenderer = (props) => {
  9333. return props.render();
  9334. };
  9335. return {
  9336. children: orderedChildren,
  9337. addChild,
  9338. removeChild,
  9339. ChildrenSorter: defineComponent({ setup(_, { slots }) {
  9340. return () => {
  9341. sortChildren();
  9342. return slots.default ? h$1(IsolatedRenderer, { render: slots.default }) : null;
  9343. };
  9344. } })
  9345. };
  9346. };
  9347. //#endregion
  9348. //#region node_modules/element-plus/es/hooks/use-size/index.mjs
  9349. var useSizeProp = buildProp({
  9350. type: String,
  9351. values: componentSizes,
  9352. required: false
  9353. });
  9354. var useSizeProps = { size: useSizeProp };
  9355. var SIZE_INJECTION_KEY = Symbol("size");
  9356. var useGlobalSize = () => {
  9357. const injectedSize = inject(SIZE_INJECTION_KEY, {});
  9358. return computed(() => {
  9359. return unref(injectedSize.size) || "";
  9360. });
  9361. };
  9362. //#endregion
  9363. //#region node_modules/element-plus/es/hooks/use-focus-controller/index.mjs
  9364. function useFocusController(target, { disabled, beforeFocus, afterFocus, beforeBlur, afterBlur } = {}) {
  9365. const { emit } = getCurrentInstance();
  9366. const wrapperRef = shallowRef();
  9367. const isFocused = ref(false);
  9368. const handleFocus = (event) => {
  9369. const cancelFocus = isFunction$1(beforeFocus) ? beforeFocus(event) : false;
  9370. if (unref(disabled) || isFocused.value || cancelFocus) return;
  9371. isFocused.value = true;
  9372. emit("focus", event);
  9373. afterFocus?.();
  9374. };
  9375. const handleBlur = (event) => {
  9376. const cancelBlur = isFunction$1(beforeBlur) ? beforeBlur(event) : false;
  9377. if (unref(disabled) || event.relatedTarget && wrapperRef.value?.contains(event.relatedTarget) || cancelBlur) return;
  9378. isFocused.value = false;
  9379. emit("blur", event);
  9380. afterBlur?.();
  9381. };
  9382. const handleClick = (event) => {
  9383. if (unref(disabled) || isFocusable(event.target) || wrapperRef.value?.contains(document.activeElement) && wrapperRef.value !== document.activeElement) return;
  9384. target.value?.focus();
  9385. };
  9386. watch([wrapperRef, () => unref(disabled)], ([el, disabled]) => {
  9387. if (!el) return;
  9388. if (disabled) el.removeAttribute("tabindex");
  9389. else el.setAttribute("tabindex", "-1");
  9390. });
  9391. useEventListener(wrapperRef, "focus", handleFocus, true);
  9392. useEventListener(wrapperRef, "blur", handleBlur, true);
  9393. useEventListener(wrapperRef, "click", handleClick, true);
  9394. return {
  9395. isFocused,
  9396. /** Avoid using wrapperRef and handleFocus/handleBlur together */
  9397. wrapperRef,
  9398. handleFocus,
  9399. handleBlur
  9400. };
  9401. }
  9402. //#endregion
  9403. //#region node_modules/element-plus/es/hooks/use-composition/index.mjs
  9404. function useComposition({ afterComposition, emit }) {
  9405. const isComposing = ref(false);
  9406. const handleCompositionStart = (event) => {
  9407. emit?.("compositionstart", event);
  9408. isComposing.value = true;
  9409. };
  9410. const handleCompositionUpdate = (event) => {
  9411. emit?.("compositionupdate", event);
  9412. isComposing.value = true;
  9413. };
  9414. const handleCompositionEnd = (event) => {
  9415. emit?.("compositionend", event);
  9416. if (isComposing.value) {
  9417. isComposing.value = false;
  9418. nextTick(() => afterComposition(event));
  9419. }
  9420. };
  9421. const handleComposition = (event) => {
  9422. event.type === "compositionend" ? handleCompositionEnd(event) : handleCompositionUpdate(event);
  9423. };
  9424. return {
  9425. isComposing,
  9426. handleComposition,
  9427. handleCompositionStart,
  9428. handleCompositionUpdate,
  9429. handleCompositionEnd
  9430. };
  9431. }
  9432. //#endregion
  9433. //#region node_modules/element-plus/es/hooks/use-empty-values/index.mjs
  9434. var emptyValuesContextKey = Symbol("emptyValuesContextKey");
  9435. var SCOPE = "use-empty-values";
  9436. var DEFAULT_EMPTY_VALUES = [
  9437. "",
  9438. void 0,
  9439. null
  9440. ];
  9441. var DEFAULT_VALUE_ON_CLEAR = void 0;
  9442. /**
  9443. * @deprecated Removed after 3.0.0, Use `UseEmptyValuesProps` instead.
  9444. */
  9445. var useEmptyValuesProps = buildProps({
  9446. /**
  9447. * @description empty values supported by the component
  9448. */
  9449. emptyValues: Array,
  9450. /**
  9451. * @description return value when cleared, if you want to set `undefined`, use `() => undefined`
  9452. */
  9453. valueOnClear: {
  9454. type: definePropType([
  9455. String,
  9456. Number,
  9457. Boolean,
  9458. Function
  9459. ]),
  9460. default: void 0,
  9461. validator: (val) => {
  9462. val = isFunction$1(val) ? val() : val;
  9463. if (isArray$1(val)) return val.every((item) => !item);
  9464. return !val;
  9465. }
  9466. }
  9467. });
  9468. var useEmptyValues = (props, defaultValue) => {
  9469. const config = getCurrentInstance() ? inject(emptyValuesContextKey, ref({})) : ref({});
  9470. const emptyValues = computed(() => props.emptyValues || config.value.emptyValues || DEFAULT_EMPTY_VALUES);
  9471. const valueOnClear = computed(() => {
  9472. if (isFunction$1(props.valueOnClear)) return props.valueOnClear();
  9473. else if (props.valueOnClear !== void 0) return props.valueOnClear;
  9474. else if (isFunction$1(config.value.valueOnClear)) return config.value.valueOnClear();
  9475. else if (config.value.valueOnClear !== void 0) return config.value.valueOnClear;
  9476. return defaultValue !== void 0 ? defaultValue : void 0;
  9477. });
  9478. const isEmptyValue = (value) => {
  9479. let result = true;
  9480. if (isArray$1(value)) result = emptyValues.value.some((emptyValue) => {
  9481. return isEqual$1(value, emptyValue);
  9482. });
  9483. else result = emptyValues.value.includes(value);
  9484. return result;
  9485. };
  9486. if (!isEmptyValue(valueOnClear.value)) debugWarn(SCOPE, "value-on-clear should be a value of empty-values");
  9487. return {
  9488. emptyValues,
  9489. valueOnClear,
  9490. isEmptyValue
  9491. };
  9492. };
  9493. //#endregion
  9494. //#region node_modules/element-plus/es/hooks/use-aria/index.mjs
  9495. /**
  9496. * @deprecated Removed after 3.0.0, Use `AriaProps` instead.
  9497. */
  9498. var ariaProps = buildProps({
  9499. /**
  9500. * @description native `aria-label` attribute
  9501. */
  9502. ariaLabel: String,
  9503. /**
  9504. * @description native `aria-orientation` attribute
  9505. */
  9506. ariaOrientation: {
  9507. type: String,
  9508. values: [
  9509. "horizontal",
  9510. "vertical",
  9511. "undefined"
  9512. ]
  9513. },
  9514. /**
  9515. * @description native `aria-controls` attribute
  9516. */
  9517. ariaControls: String
  9518. });
  9519. var useAriaProps = (arias) => {
  9520. return pick(ariaProps, arias);
  9521. };
  9522. //#endregion
  9523. //#region node_modules/element-plus/es/utils/vue/install.mjs
  9524. var withPropsDefaultsSetter = (target) => {
  9525. const _p = target.props;
  9526. const props = isArray$1(_p) ? fromPairs(_p.map((key) => [key, {}])) : _p;
  9527. target.setPropsDefaults = (defaults) => {
  9528. if (!props) return;
  9529. for (const [key, value] of Object.entries(defaults)) {
  9530. const prop = props[key];
  9531. if (!hasOwn(props, key)) continue;
  9532. if (isPlainObject(prop)) {
  9533. props[key] = {
  9534. ...prop,
  9535. default: value
  9536. };
  9537. continue;
  9538. }
  9539. props[key] = {
  9540. type: prop,
  9541. default: value
  9542. };
  9543. }
  9544. target.props = props;
  9545. };
  9546. };
  9547. var withInstall = (main, extra) => {
  9548. main.install = (app) => {
  9549. for (const comp of [main, ...Object.values(extra ?? {})]) app.component(comp.name, comp);
  9550. };
  9551. if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
  9552. withPropsDefaultsSetter(main);
  9553. return main;
  9554. };
  9555. var withInstallFunction = (fn, name) => {
  9556. fn.install = (app) => {
  9557. fn._context = app._context;
  9558. app.config.globalProperties[name] = fn;
  9559. };
  9560. return fn;
  9561. };
  9562. var withInstallDirective = (directive, name) => {
  9563. directive.install = (app) => {
  9564. app.directive(name, directive);
  9565. };
  9566. return directive;
  9567. };
  9568. var withNoopInstall = (component) => {
  9569. component.install = NOOP;
  9570. withPropsDefaultsSetter(component);
  9571. return component;
  9572. };
  9573. //#endregion
  9574. //#region node_modules/element-plus/es/components/affix/src/affix.vue_vue_type_script_setup_true_lang.mjs
  9575. var COMPONENT_NAME$22 = "ElAffix";
  9576. //#endregion
  9577. //#region node_modules/element-plus/es/components/affix/index.mjs
  9578. var ElAffix = withInstall(/* @__PURE__ */ defineComponent({
  9579. name: COMPONENT_NAME$22,
  9580. __name: "affix",
  9581. props: affixProps,
  9582. emits: affixEmits,
  9583. setup(__props, { expose: __expose, emit: __emit }) {
  9584. const props = __props;
  9585. const emit = __emit;
  9586. const ns = useNamespace("affix");
  9587. const target = shallowRef();
  9588. const root = shallowRef();
  9589. const scrollContainer = shallowRef();
  9590. const { height: windowHeight } = useWindowSize();
  9591. const { height: rootHeight, width: rootWidth, top: rootTop, bottom: rootBottom, left: rootLeft, update: updateRoot } = useElementBounding(root, { windowScroll: false });
  9592. const targetRect = useElementBounding(target);
  9593. const fixed = ref(false);
  9594. const scrollTop = ref(0);
  9595. const transform = ref(0);
  9596. const teleportDisabled = computed(() => {
  9597. return !props.teleported || !fixed.value;
  9598. });
  9599. const rootStyle = computed(() => {
  9600. return {
  9601. display: "flow-root",
  9602. height: fixed.value ? `${rootHeight.value}px` : "",
  9603. width: fixed.value ? `${rootWidth.value}px` : ""
  9604. };
  9605. });
  9606. const affixStyle = computed(() => {
  9607. if (!fixed.value) return {};
  9608. const offset = addUnit(props.offset);
  9609. return {
  9610. height: `${rootHeight.value}px`,
  9611. width: `${rootWidth.value}px`,
  9612. top: props.position === "top" ? offset : "",
  9613. bottom: props.position === "bottom" ? offset : "",
  9614. left: props.teleported ? `${rootLeft.value}px` : "",
  9615. transform: transform.value ? `translateY(${transform.value}px)` : "",
  9616. zIndex: props.zIndex
  9617. };
  9618. });
  9619. const update = () => {
  9620. if (!scrollContainer.value) return;
  9621. scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
  9622. const { position, target, offset } = props;
  9623. const rootHeightOffset = offset + rootHeight.value;
  9624. if (position === "top") if (target) {
  9625. const difference = targetRect.bottom.value - rootHeightOffset;
  9626. fixed.value = offset > rootTop.value && targetRect.bottom.value > 0;
  9627. transform.value = difference < 0 ? difference : 0;
  9628. } else fixed.value = offset > rootTop.value;
  9629. else if (target) {
  9630. const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
  9631. fixed.value = windowHeight.value - offset < rootBottom.value && windowHeight.value > targetRect.top.value;
  9632. transform.value = difference < 0 ? -difference : 0;
  9633. } else fixed.value = windowHeight.value - offset < rootBottom.value;
  9634. };
  9635. const updateRootRect = async () => {
  9636. if (!fixed.value) {
  9637. updateRoot();
  9638. return;
  9639. }
  9640. fixed.value = false;
  9641. await nextTick();
  9642. updateRoot();
  9643. fixed.value = true;
  9644. };
  9645. const handleScroll = async () => {
  9646. updateRoot();
  9647. await nextTick();
  9648. emit("scroll", {
  9649. scrollTop: scrollTop.value,
  9650. fixed: fixed.value
  9651. });
  9652. };
  9653. watch(fixed, (val) => emit(CHANGE_EVENT, val));
  9654. onMounted(() => {
  9655. if (props.target) {
  9656. target.value = document.querySelector(props.target) ?? void 0;
  9657. if (!target.value) throwError(COMPONENT_NAME$22, `Target does not exist: ${props.target}`);
  9658. } else target.value = document.documentElement;
  9659. scrollContainer.value = getScrollContainer(root.value, true);
  9660. updateRoot();
  9661. });
  9662. onActivated(() => {
  9663. nextTick(updateRootRect);
  9664. });
  9665. onDeactivated(() => {
  9666. fixed.value = false;
  9667. });
  9668. useEventListener(scrollContainer, "scroll", handleScroll);
  9669. watchEffect(update);
  9670. __expose({
  9671. /** @description update affix status */
  9672. update,
  9673. /** @description update rootRect info */
  9674. updateRoot: updateRootRect
  9675. });
  9676. return (_ctx, _cache) => {
  9677. return openBlock(), createElementBlock("div", {
  9678. ref_key: "root",
  9679. ref: root,
  9680. class: normalizeClass(unref(ns).b()),
  9681. style: normalizeStyle(rootStyle.value)
  9682. }, [(openBlock(), createBlock(Teleport, {
  9683. disabled: teleportDisabled.value,
  9684. to: __props.appendTo
  9685. }, [createBaseVNode("div", {
  9686. class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
  9687. style: normalizeStyle(affixStyle.value)
  9688. }, [renderSlot(_ctx.$slots, "default")], 6)], 8, ["disabled", "to"]))], 6);
  9689. };
  9690. }
  9691. }));
  9692. //#endregion
  9693. //#region node_modules/@element-plus/icons-vue/dist/index.js
  9694. /*! Element Plus Icons Vue v2.3.2 */
  9695. var arrow_down_default = /* @__PURE__ */ defineComponent({
  9696. name: "ArrowDown",
  9697. __name: "arrow-down",
  9698. setup(__props) {
  9699. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9700. xmlns: "http://www.w3.org/2000/svg",
  9701. viewBox: "0 0 1024 1024"
  9702. }, [createBaseVNode("path", {
  9703. fill: "currentColor",
  9704. d: "M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"
  9705. })]));
  9706. }
  9707. });
  9708. var arrow_left_default = /* @__PURE__ */ defineComponent({
  9709. name: "ArrowLeft",
  9710. __name: "arrow-left",
  9711. setup(__props) {
  9712. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9713. xmlns: "http://www.w3.org/2000/svg",
  9714. viewBox: "0 0 1024 1024"
  9715. }, [createBaseVNode("path", {
  9716. fill: "currentColor",
  9717. d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"
  9718. })]));
  9719. }
  9720. });
  9721. var arrow_right_default = /* @__PURE__ */ defineComponent({
  9722. name: "ArrowRight",
  9723. __name: "arrow-right",
  9724. setup(__props) {
  9725. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9726. xmlns: "http://www.w3.org/2000/svg",
  9727. viewBox: "0 0 1024 1024"
  9728. }, [createBaseVNode("path", {
  9729. fill: "currentColor",
  9730. d: "M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
  9731. })]));
  9732. }
  9733. });
  9734. var arrow_up_default = /* @__PURE__ */ defineComponent({
  9735. name: "ArrowUp",
  9736. __name: "arrow-up",
  9737. setup(__props) {
  9738. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9739. xmlns: "http://www.w3.org/2000/svg",
  9740. viewBox: "0 0 1024 1024"
  9741. }, [createBaseVNode("path", {
  9742. fill: "currentColor",
  9743. d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
  9744. })]));
  9745. }
  9746. });
  9747. var back_default = /* @__PURE__ */ defineComponent({
  9748. name: "Back",
  9749. __name: "back",
  9750. setup(__props) {
  9751. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9752. xmlns: "http://www.w3.org/2000/svg",
  9753. viewBox: "0 0 1024 1024"
  9754. }, [createBaseVNode("path", {
  9755. fill: "currentColor",
  9756. d: "M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"
  9757. }), createBaseVNode("path", {
  9758. fill: "currentColor",
  9759. d: "m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"
  9760. })]));
  9761. }
  9762. });
  9763. var calendar_default$1 = /* @__PURE__ */ defineComponent({
  9764. name: "Calendar",
  9765. __name: "calendar",
  9766. setup(__props) {
  9767. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9768. xmlns: "http://www.w3.org/2000/svg",
  9769. viewBox: "0 0 1024 1024"
  9770. }, [createBaseVNode("path", {
  9771. fill: "currentColor",
  9772. d: "M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"
  9773. })]));
  9774. }
  9775. });
  9776. var caret_right_default = /* @__PURE__ */ defineComponent({
  9777. name: "CaretRight",
  9778. __name: "caret-right",
  9779. setup(__props) {
  9780. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9781. xmlns: "http://www.w3.org/2000/svg",
  9782. viewBox: "0 0 1024 1024"
  9783. }, [createBaseVNode("path", {
  9784. fill: "currentColor",
  9785. d: "M384 192v640l384-320.064z"
  9786. })]));
  9787. }
  9788. });
  9789. var caret_top_default = /* @__PURE__ */ defineComponent({
  9790. name: "CaretTop",
  9791. __name: "caret-top",
  9792. setup(__props) {
  9793. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9794. xmlns: "http://www.w3.org/2000/svg",
  9795. viewBox: "0 0 1024 1024"
  9796. }, [createBaseVNode("path", {
  9797. fill: "currentColor",
  9798. d: "M512 320 192 704h639.936z"
  9799. })]));
  9800. }
  9801. });
  9802. var check_default = /* @__PURE__ */ defineComponent({
  9803. name: "Check",
  9804. __name: "check",
  9805. setup(__props) {
  9806. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9807. xmlns: "http://www.w3.org/2000/svg",
  9808. viewBox: "0 0 1024 1024"
  9809. }, [createBaseVNode("path", {
  9810. fill: "currentColor",
  9811. d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
  9812. })]));
  9813. }
  9814. });
  9815. var circle_check_filled_default = /* @__PURE__ */ defineComponent({
  9816. name: "CircleCheckFilled",
  9817. __name: "circle-check-filled",
  9818. setup(__props) {
  9819. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9820. xmlns: "http://www.w3.org/2000/svg",
  9821. viewBox: "0 0 1024 1024"
  9822. }, [createBaseVNode("path", {
  9823. fill: "currentColor",
  9824. d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
  9825. })]));
  9826. }
  9827. });
  9828. var circle_check_default = /* @__PURE__ */ defineComponent({
  9829. name: "CircleCheck",
  9830. __name: "circle-check",
  9831. setup(__props) {
  9832. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9833. xmlns: "http://www.w3.org/2000/svg",
  9834. viewBox: "0 0 1024 1024"
  9835. }, [createBaseVNode("path", {
  9836. fill: "currentColor",
  9837. d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
  9838. }), createBaseVNode("path", {
  9839. fill: "currentColor",
  9840. d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"
  9841. })]));
  9842. }
  9843. });
  9844. var circle_close_filled_default = /* @__PURE__ */ defineComponent({
  9845. name: "CircleCloseFilled",
  9846. __name: "circle-close-filled",
  9847. setup(__props) {
  9848. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9849. xmlns: "http://www.w3.org/2000/svg",
  9850. viewBox: "0 0 1024 1024"
  9851. }, [createBaseVNode("path", {
  9852. fill: "currentColor",
  9853. d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
  9854. })]));
  9855. }
  9856. });
  9857. var circle_close_default = /* @__PURE__ */ defineComponent({
  9858. name: "CircleClose",
  9859. __name: "circle-close",
  9860. setup(__props) {
  9861. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9862. xmlns: "http://www.w3.org/2000/svg",
  9863. viewBox: "0 0 1024 1024"
  9864. }, [createBaseVNode("path", {
  9865. fill: "currentColor",
  9866. d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
  9867. }), createBaseVNode("path", {
  9868. fill: "currentColor",
  9869. d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
  9870. })]));
  9871. }
  9872. });
  9873. var clock_default = /* @__PURE__ */ defineComponent({
  9874. name: "Clock",
  9875. __name: "clock",
  9876. setup(__props) {
  9877. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9878. xmlns: "http://www.w3.org/2000/svg",
  9879. viewBox: "0 0 1024 1024"
  9880. }, [
  9881. createBaseVNode("path", {
  9882. fill: "currentColor",
  9883. d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
  9884. }),
  9885. createBaseVNode("path", {
  9886. fill: "currentColor",
  9887. d: "M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"
  9888. }),
  9889. createBaseVNode("path", {
  9890. fill: "currentColor",
  9891. d: "M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"
  9892. })
  9893. ]));
  9894. }
  9895. });
  9896. var close_default = /* @__PURE__ */ defineComponent({
  9897. name: "Close",
  9898. __name: "close",
  9899. setup(__props) {
  9900. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9901. xmlns: "http://www.w3.org/2000/svg",
  9902. viewBox: "0 0 1024 1024"
  9903. }, [createBaseVNode("path", {
  9904. fill: "currentColor",
  9905. d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
  9906. })]));
  9907. }
  9908. });
  9909. var d_arrow_left_default = /* @__PURE__ */ defineComponent({
  9910. name: "DArrowLeft",
  9911. __name: "d-arrow-left",
  9912. setup(__props) {
  9913. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9914. xmlns: "http://www.w3.org/2000/svg",
  9915. viewBox: "0 0 1024 1024"
  9916. }, [createBaseVNode("path", {
  9917. fill: "currentColor",
  9918. d: "M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"
  9919. })]));
  9920. }
  9921. });
  9922. var d_arrow_right_default = /* @__PURE__ */ defineComponent({
  9923. name: "DArrowRight",
  9924. __name: "d-arrow-right",
  9925. setup(__props) {
  9926. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9927. xmlns: "http://www.w3.org/2000/svg",
  9928. viewBox: "0 0 1024 1024"
  9929. }, [createBaseVNode("path", {
  9930. fill: "currentColor",
  9931. d: "M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"
  9932. })]));
  9933. }
  9934. });
  9935. var delete_default = /* @__PURE__ */ defineComponent({
  9936. name: "Delete",
  9937. __name: "delete",
  9938. setup(__props) {
  9939. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9940. xmlns: "http://www.w3.org/2000/svg",
  9941. viewBox: "0 0 1024 1024"
  9942. }, [createBaseVNode("path", {
  9943. fill: "currentColor",
  9944. d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
  9945. })]));
  9946. }
  9947. });
  9948. var document_default = /* @__PURE__ */ defineComponent({
  9949. name: "Document",
  9950. __name: "document",
  9951. setup(__props) {
  9952. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9953. xmlns: "http://www.w3.org/2000/svg",
  9954. viewBox: "0 0 1024 1024"
  9955. }, [createBaseVNode("path", {
  9956. fill: "currentColor",
  9957. d: "M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"
  9958. })]));
  9959. }
  9960. });
  9961. var full_screen_default = /* @__PURE__ */ defineComponent({
  9962. name: "FullScreen",
  9963. __name: "full-screen",
  9964. setup(__props) {
  9965. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9966. xmlns: "http://www.w3.org/2000/svg",
  9967. viewBox: "0 0 1024 1024"
  9968. }, [createBaseVNode("path", {
  9969. fill: "currentColor",
  9970. d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
  9971. })]));
  9972. }
  9973. });
  9974. var hide_default = /* @__PURE__ */ defineComponent({
  9975. name: "Hide",
  9976. __name: "hide",
  9977. setup(__props) {
  9978. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9979. xmlns: "http://www.w3.org/2000/svg",
  9980. viewBox: "0 0 1024 1024"
  9981. }, [createBaseVNode("path", {
  9982. fill: "currentColor",
  9983. d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"
  9984. }), createBaseVNode("path", {
  9985. fill: "currentColor",
  9986. d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"
  9987. })]));
  9988. }
  9989. });
  9990. var info_filled_default = /* @__PURE__ */ defineComponent({
  9991. name: "InfoFilled",
  9992. __name: "info-filled",
  9993. setup(__props) {
  9994. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  9995. xmlns: "http://www.w3.org/2000/svg",
  9996. viewBox: "0 0 1024 1024"
  9997. }, [createBaseVNode("path", {
  9998. fill: "currentColor",
  9999. d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
  10000. })]));
  10001. }
  10002. });
  10003. var loading_default = /* @__PURE__ */ defineComponent({
  10004. name: "Loading",
  10005. __name: "loading",
  10006. setup(__props) {
  10007. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10008. xmlns: "http://www.w3.org/2000/svg",
  10009. viewBox: "0 0 1024 1024"
  10010. }, [createBaseVNode("path", {
  10011. fill: "currentColor",
  10012. d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
  10013. })]));
  10014. }
  10015. });
  10016. var minus_default = /* @__PURE__ */ defineComponent({
  10017. name: "Minus",
  10018. __name: "minus",
  10019. setup(__props) {
  10020. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10021. xmlns: "http://www.w3.org/2000/svg",
  10022. viewBox: "0 0 1024 1024"
  10023. }, [createBaseVNode("path", {
  10024. fill: "currentColor",
  10025. d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
  10026. })]));
  10027. }
  10028. });
  10029. var more_filled_default = /* @__PURE__ */ defineComponent({
  10030. name: "MoreFilled",
  10031. __name: "more-filled",
  10032. setup(__props) {
  10033. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10034. xmlns: "http://www.w3.org/2000/svg",
  10035. viewBox: "0 0 1024 1024"
  10036. }, [createBaseVNode("path", {
  10037. fill: "currentColor",
  10038. d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
  10039. })]));
  10040. }
  10041. });
  10042. var more_default = /* @__PURE__ */ defineComponent({
  10043. name: "More",
  10044. __name: "more",
  10045. setup(__props) {
  10046. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10047. xmlns: "http://www.w3.org/2000/svg",
  10048. viewBox: "0 0 1024 1024"
  10049. }, [createBaseVNode("path", {
  10050. fill: "currentColor",
  10051. d: "M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"
  10052. })]));
  10053. }
  10054. });
  10055. var picture_filled_default = /* @__PURE__ */ defineComponent({
  10056. name: "PictureFilled",
  10057. __name: "picture-filled",
  10058. setup(__props) {
  10059. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10060. xmlns: "http://www.w3.org/2000/svg",
  10061. viewBox: "0 0 1024 1024"
  10062. }, [createBaseVNode("path", {
  10063. fill: "currentColor",
  10064. d: "M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"
  10065. })]));
  10066. }
  10067. });
  10068. var plus_default = /* @__PURE__ */ defineComponent({
  10069. name: "Plus",
  10070. __name: "plus",
  10071. setup(__props) {
  10072. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10073. xmlns: "http://www.w3.org/2000/svg",
  10074. viewBox: "0 0 1024 1024"
  10075. }, [createBaseVNode("path", {
  10076. fill: "currentColor",
  10077. d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
  10078. })]));
  10079. }
  10080. });
  10081. var question_filled_default = /* @__PURE__ */ defineComponent({
  10082. name: "QuestionFilled",
  10083. __name: "question-filled",
  10084. setup(__props) {
  10085. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10086. xmlns: "http://www.w3.org/2000/svg",
  10087. viewBox: "0 0 1024 1024"
  10088. }, [createBaseVNode("path", {
  10089. fill: "currentColor",
  10090. d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
  10091. })]));
  10092. }
  10093. });
  10094. var refresh_left_default = /* @__PURE__ */ defineComponent({
  10095. name: "RefreshLeft",
  10096. __name: "refresh-left",
  10097. setup(__props) {
  10098. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10099. xmlns: "http://www.w3.org/2000/svg",
  10100. viewBox: "0 0 1024 1024"
  10101. }, [createBaseVNode("path", {
  10102. fill: "currentColor",
  10103. d: "M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"
  10104. })]));
  10105. }
  10106. });
  10107. var refresh_right_default = /* @__PURE__ */ defineComponent({
  10108. name: "RefreshRight",
  10109. __name: "refresh-right",
  10110. setup(__props) {
  10111. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10112. xmlns: "http://www.w3.org/2000/svg",
  10113. viewBox: "0 0 1024 1024"
  10114. }, [createBaseVNode("path", {
  10115. fill: "currentColor",
  10116. d: "M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"
  10117. })]));
  10118. }
  10119. });
  10120. var scale_to_original_default = /* @__PURE__ */ defineComponent({
  10121. name: "ScaleToOriginal",
  10122. __name: "scale-to-original",
  10123. setup(__props) {
  10124. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10125. xmlns: "http://www.w3.org/2000/svg",
  10126. viewBox: "0 0 1024 1024"
  10127. }, [createBaseVNode("path", {
  10128. fill: "currentColor",
  10129. d: "M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"
  10130. })]));
  10131. }
  10132. });
  10133. var search_default = /* @__PURE__ */ defineComponent({
  10134. name: "Search",
  10135. __name: "search",
  10136. setup(__props) {
  10137. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10138. xmlns: "http://www.w3.org/2000/svg",
  10139. viewBox: "0 0 1024 1024"
  10140. }, [createBaseVNode("path", {
  10141. fill: "currentColor",
  10142. d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
  10143. })]));
  10144. }
  10145. });
  10146. var sort_down_default = /* @__PURE__ */ defineComponent({
  10147. name: "SortDown",
  10148. __name: "sort-down",
  10149. setup(__props) {
  10150. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10151. xmlns: "http://www.w3.org/2000/svg",
  10152. viewBox: "0 0 1024 1024"
  10153. }, [createBaseVNode("path", {
  10154. fill: "currentColor",
  10155. d: "M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"
  10156. })]));
  10157. }
  10158. });
  10159. var sort_up_default = /* @__PURE__ */ defineComponent({
  10160. name: "SortUp",
  10161. __name: "sort-up",
  10162. setup(__props) {
  10163. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10164. xmlns: "http://www.w3.org/2000/svg",
  10165. viewBox: "0 0 1024 1024"
  10166. }, [createBaseVNode("path", {
  10167. fill: "currentColor",
  10168. d: "M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"
  10169. })]));
  10170. }
  10171. });
  10172. var star_filled_default = /* @__PURE__ */ defineComponent({
  10173. name: "StarFilled",
  10174. __name: "star-filled",
  10175. setup(__props) {
  10176. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10177. xmlns: "http://www.w3.org/2000/svg",
  10178. viewBox: "0 0 1024 1024"
  10179. }, [createBaseVNode("path", {
  10180. fill: "currentColor",
  10181. d: "M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"
  10182. })]));
  10183. }
  10184. });
  10185. var star_default = /* @__PURE__ */ defineComponent({
  10186. name: "Star",
  10187. __name: "star",
  10188. setup(__props) {
  10189. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10190. xmlns: "http://www.w3.org/2000/svg",
  10191. viewBox: "0 0 1024 1024"
  10192. }, [createBaseVNode("path", {
  10193. fill: "currentColor",
  10194. d: "m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"
  10195. })]));
  10196. }
  10197. });
  10198. var success_filled_default = /* @__PURE__ */ defineComponent({
  10199. name: "SuccessFilled",
  10200. __name: "success-filled",
  10201. setup(__props) {
  10202. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10203. xmlns: "http://www.w3.org/2000/svg",
  10204. viewBox: "0 0 1024 1024"
  10205. }, [createBaseVNode("path", {
  10206. fill: "currentColor",
  10207. d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
  10208. })]));
  10209. }
  10210. });
  10211. var view_default = /* @__PURE__ */ defineComponent({
  10212. name: "View",
  10213. __name: "view",
  10214. setup(__props) {
  10215. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10216. xmlns: "http://www.w3.org/2000/svg",
  10217. viewBox: "0 0 1024 1024"
  10218. }, [createBaseVNode("path", {
  10219. fill: "currentColor",
  10220. d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
  10221. })]));
  10222. }
  10223. });
  10224. var warning_filled_default = /* @__PURE__ */ defineComponent({
  10225. name: "WarningFilled",
  10226. __name: "warning-filled",
  10227. setup(__props) {
  10228. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10229. xmlns: "http://www.w3.org/2000/svg",
  10230. viewBox: "0 0 1024 1024"
  10231. }, [createBaseVNode("path", {
  10232. fill: "currentColor",
  10233. d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
  10234. })]));
  10235. }
  10236. });
  10237. var zoom_in_default = /* @__PURE__ */ defineComponent({
  10238. name: "ZoomIn",
  10239. __name: "zoom-in",
  10240. setup(__props) {
  10241. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10242. xmlns: "http://www.w3.org/2000/svg",
  10243. viewBox: "0 0 1024 1024"
  10244. }, [createBaseVNode("path", {
  10245. fill: "currentColor",
  10246. d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
  10247. })]));
  10248. }
  10249. });
  10250. var zoom_out_default = /* @__PURE__ */ defineComponent({
  10251. name: "ZoomOut",
  10252. __name: "zoom-out",
  10253. setup(__props) {
  10254. return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
  10255. xmlns: "http://www.w3.org/2000/svg",
  10256. viewBox: "0 0 1024 1024"
  10257. }, [createBaseVNode("path", {
  10258. fill: "currentColor",
  10259. d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"
  10260. })]));
  10261. }
  10262. });
  10263. //#endregion
  10264. //#region node_modules/element-plus/es/utils/vue/icon.mjs
  10265. var iconPropType = definePropType([
  10266. String,
  10267. Object,
  10268. Function
  10269. ]);
  10270. var CloseComponents = { Close: close_default };
  10271. var TypeComponents = {
  10272. Close: close_default,
  10273. SuccessFilled: success_filled_default,
  10274. InfoFilled: info_filled_default,
  10275. WarningFilled: warning_filled_default,
  10276. CircleCloseFilled: circle_close_filled_default
  10277. };
  10278. var TypeComponentsMap = {
  10279. primary: info_filled_default,
  10280. success: success_filled_default,
  10281. warning: warning_filled_default,
  10282. error: circle_close_filled_default,
  10283. info: info_filled_default
  10284. };
  10285. var ValidateComponentsMap = {
  10286. validating: loading_default,
  10287. success: circle_check_default,
  10288. error: circle_close_default
  10289. };
  10290. //#endregion
  10291. //#region node_modules/element-plus/es/components/alert/src/alert.mjs
  10292. var alertEffects = ["light", "dark"];
  10293. /**
  10294. * @deprecated Removed after 3.0.0, Use `AlertProps` instead.
  10295. */
  10296. var alertProps = buildProps({
  10297. /**
  10298. * @description alert title.
  10299. */
  10300. title: {
  10301. type: String,
  10302. default: ""
  10303. },
  10304. description: {
  10305. type: String,
  10306. default: ""
  10307. },
  10308. /**
  10309. * @description alert type.
  10310. */
  10311. type: {
  10312. type: String,
  10313. values: keysOf(TypeComponentsMap),
  10314. default: "info"
  10315. },
  10316. /**
  10317. * @description whether alert can be dismissed.
  10318. */
  10319. closable: {
  10320. type: Boolean,
  10321. default: true
  10322. },
  10323. /**
  10324. * @description text for replacing x button
  10325. */
  10326. closeText: {
  10327. type: String,
  10328. default: ""
  10329. },
  10330. /**
  10331. * @description whether show icon
  10332. */
  10333. showIcon: Boolean,
  10334. /**
  10335. * @description should content be placed in center.
  10336. */
  10337. center: Boolean,
  10338. effect: {
  10339. type: String,
  10340. values: alertEffects,
  10341. default: "light"
  10342. }
  10343. });
  10344. var alertEmits = { close: (evt) => evt instanceof MouseEvent };
  10345. //#endregion
  10346. //#region node_modules/element-plus/es/components/icon/src/icon.mjs
  10347. /**
  10348. * @deprecated Removed after 3.0.0, Use `IconProps` instead.
  10349. */
  10350. var iconProps = buildProps({
  10351. /**
  10352. * @description SVG icon size, size x size
  10353. */
  10354. size: { type: definePropType([Number, String]) },
  10355. /**
  10356. * @description SVG tag's fill attribute
  10357. */
  10358. color: { type: String }
  10359. });
  10360. //#endregion
  10361. //#region node_modules/element-plus/es/components/icon/index.mjs
  10362. var ElIcon = withInstall(/* @__PURE__ */ defineComponent({
  10363. name: "ElIcon",
  10364. inheritAttrs: false,
  10365. __name: "icon",
  10366. props: iconProps,
  10367. setup(__props) {
  10368. const props = __props;
  10369. const ns = useNamespace("icon");
  10370. const style = computed(() => {
  10371. const { size, color } = props;
  10372. const fontSize = addUnit(size);
  10373. if (!fontSize && !color) return {};
  10374. return {
  10375. fontSize,
  10376. "--color": color
  10377. };
  10378. });
  10379. return (_ctx, _cache) => {
  10380. return openBlock(), createElementBlock("i", mergeProps({
  10381. class: unref(ns).b(),
  10382. style: style.value
  10383. }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16);
  10384. };
  10385. }
  10386. }));
  10387. //#endregion
  10388. //#region node_modules/element-plus/es/components/alert/index.mjs
  10389. var ElAlert = withInstall(/* @__PURE__ */ defineComponent({
  10390. name: "ElAlert",
  10391. __name: "alert",
  10392. props: alertProps,
  10393. emits: alertEmits,
  10394. setup(__props, { emit: __emit }) {
  10395. const { Close } = TypeComponents;
  10396. const props = __props;
  10397. const emit = __emit;
  10398. const slots = useSlots();
  10399. const ns = useNamespace("alert");
  10400. const visible = ref(true);
  10401. const iconComponent = computed(() => TypeComponentsMap[props.type]);
  10402. const hasDesc = computed(() => {
  10403. if (props.description) return true;
  10404. const slotContent = slots.default?.();
  10405. if (!slotContent) return false;
  10406. return flattedChildren(slotContent).some((child) => !isComment(child));
  10407. });
  10408. const close = (evt) => {
  10409. visible.value = false;
  10410. emit("close", evt);
  10411. };
  10412. return (_ctx, _cache) => {
  10413. return openBlock(), createBlock(Transition, {
  10414. name: unref(ns).b("fade"),
  10415. persisted: ""
  10416. }, {
  10417. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  10418. class: normalizeClass([
  10419. unref(ns).b(),
  10420. unref(ns).m(__props.type),
  10421. unref(ns).is("center", __props.center),
  10422. unref(ns).is(__props.effect)
  10423. ]),
  10424. role: "alert"
  10425. }, [__props.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), {
  10426. key: 0,
  10427. class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)])
  10428. }, {
  10429. default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))])]),
  10430. _: 3
  10431. }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [
  10432. __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
  10433. key: 0,
  10434. class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }])
  10435. }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true),
  10436. hasDesc.value ? (openBlock(), createElementBlock("p", {
  10437. key: 1,
  10438. class: normalizeClass(unref(ns).e("description"))
  10439. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 2)) : createCommentVNode("v-if", true),
  10440. __props.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [__props.closeText ? (openBlock(), createElementBlock("div", {
  10441. key: 0,
  10442. class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
  10443. onClick: close
  10444. }, toDisplayString(__props.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
  10445. key: 1,
  10446. class: normalizeClass(unref(ns).e("close-btn")),
  10447. onClick: close
  10448. }, {
  10449. default: withCtx(() => [createVNode(unref(Close))]),
  10450. _: 1
  10451. }, 8, ["class"]))], 64)) : createCommentVNode("v-if", true)
  10452. ], 2)], 2), [[vShow, visible.value]])]),
  10453. _: 3
  10454. }, 8, ["name"]);
  10455. };
  10456. }
  10457. }));
  10458. //#endregion
  10459. //#region node_modules/element-plus/es/components/popper/src/popper.mjs
  10460. var Effect = {
  10461. LIGHT: "light",
  10462. DARK: "dark"
  10463. };
  10464. var roleTypes = [
  10465. "dialog",
  10466. "grid",
  10467. "group",
  10468. "listbox",
  10469. "menu",
  10470. "navigation",
  10471. "tooltip",
  10472. "tree"
  10473. ];
  10474. /**
  10475. * @deprecated Removed after 3.0.0, Use `PopperProps` instead.
  10476. */
  10477. var popperProps = buildProps({ role: {
  10478. type: String,
  10479. values: roleTypes,
  10480. default: "tooltip"
  10481. } });
  10482. /** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */
  10483. var usePopperProps = popperProps;
  10484. //#endregion
  10485. //#region node_modules/element-plus/es/components/popper/src/constants.mjs
  10486. var POPPER_INJECTION_KEY = Symbol("popper");
  10487. var POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
  10488. //#endregion
  10489. //#region node_modules/element-plus/es/components/popper/src/arrow2.mjs
  10490. var arrow_default = /* @__PURE__ */ defineComponent({
  10491. name: "ElPopperArrow",
  10492. inheritAttrs: false,
  10493. __name: "arrow",
  10494. setup(__props, { expose: __expose }) {
  10495. const ns = useNamespace("popper");
  10496. const { arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
  10497. onBeforeUnmount(() => {
  10498. arrowRef.value = void 0;
  10499. });
  10500. __expose({
  10501. /**
  10502. * @description Arrow element
  10503. */
  10504. arrowRef });
  10505. return (_ctx, _cache) => {
  10506. return openBlock(), createElementBlock("span", {
  10507. ref_key: "arrowRef",
  10508. ref: arrowRef,
  10509. class: normalizeClass(unref(ns).e("arrow")),
  10510. style: normalizeStyle(unref(arrowStyle)),
  10511. "data-popper-arrow": ""
  10512. }, null, 6);
  10513. };
  10514. }
  10515. });
  10516. //#endregion
  10517. //#region node_modules/element-plus/es/components/popper/src/trigger.mjs
  10518. /**
  10519. * @deprecated Removed after 3.0.0, Use `PopperTriggerProps` instead.
  10520. */
  10521. var popperTriggerProps = buildProps({
  10522. /** @description Indicates the reference element to which the popper is attached */
  10523. virtualRef: { type: definePropType(Object) },
  10524. /** @description Indicates whether virtual triggering is enabled */
  10525. virtualTriggering: Boolean,
  10526. onMouseenter: { type: definePropType(Function) },
  10527. onMouseleave: { type: definePropType(Function) },
  10528. onClick: { type: definePropType(Function) },
  10529. onKeydown: { type: definePropType(Function) },
  10530. onFocus: { type: definePropType(Function) },
  10531. onBlur: { type: definePropType(Function) },
  10532. onContextmenu: { type: definePropType(Function) },
  10533. id: String,
  10534. open: Boolean
  10535. });
  10536. /** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */
  10537. var usePopperTriggerProps = popperTriggerProps;
  10538. //#endregion
  10539. //#region node_modules/element-plus/es/components/slot/src/only-child.mjs
  10540. var NAME = "ElOnlyChild";
  10541. var OnlyChild = /* @__PURE__ */ defineComponent({
  10542. name: NAME,
  10543. setup(_, { slots, attrs }) {
  10544. const forwardRefDirective = useForwardRefDirective(inject(FORWARD_REF_INJECTION_KEY)?.setForwardRef ?? NOOP);
  10545. return () => {
  10546. const defaultSlot = slots.default?.(attrs);
  10547. if (!defaultSlot) return null;
  10548. const [firstLegitNode, length] = findFirstLegitChild(defaultSlot);
  10549. if (!firstLegitNode) {
  10550. debugWarn(NAME, "no valid child node found");
  10551. return null;
  10552. }
  10553. if (length > 1) debugWarn(NAME, "requires exact only one valid child.");
  10554. return withDirectives(cloneVNode(firstLegitNode, attrs), [[forwardRefDirective]]);
  10555. };
  10556. }
  10557. });
  10558. function findFirstLegitChild(node) {
  10559. if (!node) return [null, 0];
  10560. const children = node;
  10561. const len = children.filter((c) => c.type !== Comment).length;
  10562. for (const child of children) {
  10563. /**
  10564. * when user uses h(Fragment, [text]) to render plain string,
  10565. * this switch case just cannot handle, when the value is primitives
  10566. * we should just return the wrapped string
  10567. */
  10568. if (isObject$2(child)) switch (child.type) {
  10569. case Comment: continue;
  10570. case Text:
  10571. case "svg": return [wrapTextContent(child), len];
  10572. case Fragment: return findFirstLegitChild(child.children);
  10573. default: return [child, len];
  10574. }
  10575. return [wrapTextContent(child), len];
  10576. }
  10577. return [null, 0];
  10578. }
  10579. function wrapTextContent(s) {
  10580. return createVNode("span", { "class": useNamespace("only-child").e("content") }, [s]);
  10581. }
  10582. //#endregion
  10583. //#region node_modules/element-plus/es/components/popper/src/trigger2.mjs
  10584. var trigger_default = /* @__PURE__ */ defineComponent({
  10585. name: "ElPopperTrigger",
  10586. inheritAttrs: false,
  10587. __name: "trigger",
  10588. props: popperTriggerProps,
  10589. setup(__props, { expose: __expose }) {
  10590. const props = __props;
  10591. const { role, triggerRef } = inject(POPPER_INJECTION_KEY, void 0);
  10592. useForwardRef(triggerRef);
  10593. const ariaControls = computed(() => {
  10594. return ariaHaspopup.value ? props.id : void 0;
  10595. });
  10596. const ariaDescribedby = computed(() => {
  10597. if (role && role.value === "tooltip") return props.open && props.id ? props.id : void 0;
  10598. });
  10599. const ariaHaspopup = computed(() => {
  10600. if (role && role.value !== "tooltip") return role.value;
  10601. });
  10602. const ariaExpanded = computed(() => {
  10603. return ariaHaspopup.value ? `${props.open}` : void 0;
  10604. });
  10605. let virtualTriggerAriaStopWatch = void 0;
  10606. const TRIGGER_ELE_EVENTS = [
  10607. "onMouseenter",
  10608. "onMouseleave",
  10609. "onClick",
  10610. "onKeydown",
  10611. "onFocus",
  10612. "onBlur",
  10613. "onContextmenu"
  10614. ];
  10615. onMounted(() => {
  10616. watch(() => props.virtualRef, (virtualEl) => {
  10617. if (virtualEl) triggerRef.value = unrefElement(virtualEl);
  10618. }, { immediate: true });
  10619. watch(triggerRef, (el, prevEl) => {
  10620. virtualTriggerAriaStopWatch?.();
  10621. virtualTriggerAriaStopWatch = void 0;
  10622. if (isElement$1(prevEl)) TRIGGER_ELE_EVENTS.forEach((eventName) => {
  10623. const handler = props[eventName];
  10624. if (handler) prevEl.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
  10625. });
  10626. if (isElement$1(el)) {
  10627. TRIGGER_ELE_EVENTS.forEach((eventName) => {
  10628. const handler = props[eventName];
  10629. if (handler) el.addEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
  10630. });
  10631. if (isFocusable(el)) virtualTriggerAriaStopWatch = watch([
  10632. ariaControls,
  10633. ariaDescribedby,
  10634. ariaHaspopup,
  10635. ariaExpanded
  10636. ], (watches) => {
  10637. [
  10638. "aria-controls",
  10639. "aria-describedby",
  10640. "aria-haspopup",
  10641. "aria-expanded"
  10642. ].forEach((key, idx) => {
  10643. isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
  10644. });
  10645. }, { immediate: true });
  10646. }
  10647. if (isElement$1(prevEl) && isFocusable(prevEl)) [
  10648. "aria-controls",
  10649. "aria-describedby",
  10650. "aria-haspopup",
  10651. "aria-expanded"
  10652. ].forEach((key) => prevEl.removeAttribute(key));
  10653. }, { immediate: true });
  10654. });
  10655. onBeforeUnmount(() => {
  10656. virtualTriggerAriaStopWatch?.();
  10657. virtualTriggerAriaStopWatch = void 0;
  10658. if (triggerRef.value && isElement$1(triggerRef.value)) {
  10659. const el = triggerRef.value;
  10660. TRIGGER_ELE_EVENTS.forEach((eventName) => {
  10661. const handler = props[eventName];
  10662. if (handler) el.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
  10663. });
  10664. triggerRef.value = void 0;
  10665. }
  10666. });
  10667. __expose({
  10668. /**
  10669. * @description trigger element
  10670. */
  10671. triggerRef });
  10672. return (_ctx, _cache) => {
  10673. return !__props.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
  10674. "aria-controls": ariaControls.value,
  10675. "aria-describedby": ariaDescribedby.value,
  10676. "aria-expanded": ariaExpanded.value,
  10677. "aria-haspopup": ariaHaspopup.value
  10678. }), {
  10679. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  10680. _: 3
  10681. }, 16, [
  10682. "aria-controls",
  10683. "aria-describedby",
  10684. "aria-expanded",
  10685. "aria-haspopup"
  10686. ])) : createCommentVNode("v-if", true);
  10687. };
  10688. }
  10689. });
  10690. //#endregion
  10691. //#region node_modules/element-plus/es/components/popper/src/arrow.mjs
  10692. /**
  10693. * @deprecated Removed after 3.0.0, Use `PopperArrowProps` instead.
  10694. */
  10695. var popperArrowProps = buildProps({ arrowOffset: {
  10696. type: Number,
  10697. default: 5
  10698. } });
  10699. var popperArrowPropsDefaults = { arrowOffset: 5 };
  10700. /** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */
  10701. var usePopperArrowProps = popperArrowProps;
  10702. //#endregion
  10703. //#region node_modules/element-plus/es/components/popper/src/content.mjs
  10704. /**
  10705. * @deprecated Removed after 3.0.0, Use `PopperCoreConfigProps` instead.
  10706. */
  10707. var popperCoreConfigProps = buildProps({
  10708. boundariesPadding: {
  10709. type: Number,
  10710. default: 0
  10711. },
  10712. fallbackPlacements: {
  10713. type: definePropType(Array),
  10714. default: void 0
  10715. },
  10716. gpuAcceleration: {
  10717. type: Boolean,
  10718. default: true
  10719. },
  10720. /**
  10721. * @description offset of the Tooltip
  10722. */
  10723. offset: {
  10724. type: Number,
  10725. default: 12
  10726. },
  10727. /**
  10728. * @description position of Tooltip
  10729. */
  10730. placement: {
  10731. type: String,
  10732. values: Ee,
  10733. default: "bottom"
  10734. },
  10735. /**
  10736. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  10737. */
  10738. popperOptions: {
  10739. type: definePropType(Object),
  10740. default: () => ({})
  10741. },
  10742. strategy: {
  10743. type: String,
  10744. values: ["fixed", "absolute"],
  10745. default: "absolute"
  10746. }
  10747. });
  10748. /**
  10749. * @deprecated Removed after 3.0.0, Use `PopperContentProps` instead.
  10750. */
  10751. var popperContentProps = buildProps({
  10752. ...popperCoreConfigProps,
  10753. ...popperArrowProps,
  10754. id: String,
  10755. style: {
  10756. type: definePropType([
  10757. String,
  10758. Array,
  10759. Object,
  10760. Boolean
  10761. ]),
  10762. default: void 0
  10763. },
  10764. className: { type: definePropType([
  10765. String,
  10766. Array,
  10767. Object
  10768. ]) },
  10769. effect: {
  10770. type: definePropType(String),
  10771. default: "dark"
  10772. },
  10773. visible: Boolean,
  10774. enterable: {
  10775. type: Boolean,
  10776. default: true
  10777. },
  10778. pure: Boolean,
  10779. focusOnShow: Boolean,
  10780. trapping: Boolean,
  10781. popperClass: { type: definePropType([
  10782. String,
  10783. Array,
  10784. Object
  10785. ]) },
  10786. popperStyle: {
  10787. type: definePropType([
  10788. String,
  10789. Array,
  10790. Object,
  10791. Boolean
  10792. ]),
  10793. default: void 0
  10794. },
  10795. referenceEl: { type: definePropType(Object) },
  10796. triggerTargetEl: { type: definePropType(Object) },
  10797. stopPopperMouseEvent: {
  10798. type: Boolean,
  10799. default: true
  10800. },
  10801. virtualTriggering: Boolean,
  10802. zIndex: Number,
  10803. ...useAriaProps(["ariaLabel"]),
  10804. loop: Boolean
  10805. });
  10806. var popperCoreConfigPropsDefaults = {
  10807. boundariesPadding: 0,
  10808. gpuAcceleration: true,
  10809. offset: 12,
  10810. placement: "bottom",
  10811. popperOptions: () => ({}),
  10812. strategy: "absolute"
  10813. };
  10814. var popperContentPropsDefaults = {
  10815. ...popperCoreConfigPropsDefaults,
  10816. ...popperArrowPropsDefaults,
  10817. effect: "dark",
  10818. enterable: true,
  10819. stopPopperMouseEvent: true,
  10820. visible: false,
  10821. pure: false,
  10822. focusOnShow: false,
  10823. trapping: false,
  10824. virtualTriggering: false,
  10825. loop: false,
  10826. style: void 0,
  10827. popperStyle: void 0
  10828. };
  10829. var popperContentEmits = {
  10830. mouseenter: (evt) => evt instanceof MouseEvent,
  10831. mouseleave: (evt) => evt instanceof MouseEvent,
  10832. focus: () => true,
  10833. blur: () => true,
  10834. close: () => true
  10835. };
  10836. /** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */
  10837. var usePopperCoreConfigProps = popperCoreConfigProps;
  10838. /** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */
  10839. var usePopperContentProps = popperContentProps;
  10840. /** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */
  10841. var usePopperContentEmits = popperContentEmits;
  10842. //#endregion
  10843. //#region node_modules/element-plus/es/components/form/src/form.mjs
  10844. /**
  10845. * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.
  10846. */
  10847. var formMetaProps = buildProps({
  10848. /**
  10849. * @description Control the size of components in this form.
  10850. */
  10851. size: {
  10852. type: String,
  10853. values: componentSizes
  10854. },
  10855. /**
  10856. * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.
  10857. */
  10858. disabled: Boolean
  10859. });
  10860. /**
  10861. * @deprecated Removed after 3.0.0, Use `FormProps` instead.
  10862. */
  10863. var formProps = buildProps({
  10864. ...formMetaProps,
  10865. /**
  10866. * @description Data of form component.
  10867. */
  10868. model: Object,
  10869. /**
  10870. * @description Validation rules of form.
  10871. */
  10872. rules: { type: definePropType(Object) },
  10873. /**
  10874. * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.
  10875. */
  10876. labelPosition: {
  10877. type: String,
  10878. values: [
  10879. "left",
  10880. "right",
  10881. "top"
  10882. ],
  10883. default: "right"
  10884. },
  10885. /**
  10886. * @description Position of asterisk.
  10887. */
  10888. requireAsteriskPosition: {
  10889. type: String,
  10890. values: ["left", "right"],
  10891. default: "left"
  10892. },
  10893. /**
  10894. * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.
  10895. */
  10896. labelWidth: {
  10897. type: [String, Number],
  10898. default: ""
  10899. },
  10900. /**
  10901. * @description Suffix of the label.
  10902. */
  10903. labelSuffix: {
  10904. type: String,
  10905. default: ""
  10906. },
  10907. /**
  10908. * @description Whether the form is inline.
  10909. */
  10910. inline: Boolean,
  10911. /**
  10912. * @description Whether to display the error message inline with the form item.
  10913. */
  10914. inlineMessage: Boolean,
  10915. /**
  10916. * @description Whether to display an icon indicating the validation result.
  10917. */
  10918. statusIcon: Boolean,
  10919. /**
  10920. * @description Whether to show the error message.
  10921. */
  10922. showMessage: {
  10923. type: Boolean,
  10924. default: true
  10925. },
  10926. /**
  10927. * @description Whether to trigger validation when the `rules` prop is changed.
  10928. */
  10929. validateOnRuleChange: {
  10930. type: Boolean,
  10931. default: true
  10932. },
  10933. /**
  10934. * @description Whether to hide required fields should have a red asterisk (star) beside their labels.
  10935. */
  10936. hideRequiredAsterisk: Boolean,
  10937. /**
  10938. * @description When validation fails, scroll to the first error form entry.
  10939. */
  10940. scrollToError: Boolean,
  10941. /**
  10942. * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.
  10943. */
  10944. scrollIntoViewOptions: {
  10945. type: definePropType([Object, Boolean]),
  10946. default: true
  10947. }
  10948. });
  10949. var formEmits = { validate: (prop, isValid, message) => (isArray$1(prop) || isString(prop)) && isBoolean(isValid) && isString(message) };
  10950. //#endregion
  10951. //#region node_modules/element-plus/es/components/form/src/constants.mjs
  10952. var formContextKey = Symbol("formContextKey");
  10953. var formItemContextKey = Symbol("formItemContextKey");
  10954. //#endregion
  10955. //#region node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs
  10956. var useFormSize = (fallback, ignore = {}) => {
  10957. const emptyRef = ref(void 0);
  10958. const size = ignore.prop ? emptyRef : useProp("size");
  10959. const globalConfig = ignore.global ? emptyRef : useGlobalSize();
  10960. const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
  10961. const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
  10962. return computed(() => size.value || unref(fallback) || formItem?.size || form?.size || globalConfig.value || "");
  10963. };
  10964. var useFormDisabled = (fallback) => {
  10965. const disabled = useProp("disabled");
  10966. const form = inject(formContextKey, void 0);
  10967. return computed(() => {
  10968. return disabled.value ?? unref(fallback) ?? form?.disabled ?? false;
  10969. });
  10970. };
  10971. var useSize = useFormSize;
  10972. var useDisabled = useFormDisabled;
  10973. //#endregion
  10974. //#region node_modules/element-plus/es/components/form/src/hooks/use-form-item.mjs
  10975. var useFormItem = () => {
  10976. return {
  10977. form: inject(formContextKey, void 0),
  10978. formItem: inject(formItemContextKey, void 0)
  10979. };
  10980. };
  10981. var useFormItemInputId = (props, { formItemContext, disableIdGeneration, disableIdManagement }) => {
  10982. if (!disableIdGeneration) disableIdGeneration = ref(false);
  10983. if (!disableIdManagement) disableIdManagement = ref(false);
  10984. const instance = getCurrentInstance();
  10985. const inLabel = () => {
  10986. let parent = instance?.parent;
  10987. while (parent) {
  10988. if (parent.type.name === "ElFormItem") return false;
  10989. if (parent.type.name === "ElLabelWrap") return true;
  10990. parent = parent.parent;
  10991. }
  10992. return false;
  10993. };
  10994. const inputId = ref();
  10995. let idUnwatch = void 0;
  10996. const isLabeledByFormItem = computed(() => {
  10997. return !!(!(props.label || props.ariaLabel) && formItemContext && formItemContext.inputIds && formItemContext.inputIds?.length <= 1);
  10998. });
  10999. onMounted(() => {
  11000. idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration]) => {
  11001. const newId = id ?? (!disableIdGeneration ? useId().value : void 0);
  11002. if (newId !== inputId.value) {
  11003. if (formItemContext?.removeInputId && !inLabel()) {
  11004. inputId.value && formItemContext.removeInputId(inputId.value);
  11005. if (!disableIdManagement?.value && !disableIdGeneration && newId) formItemContext.addInputId(newId);
  11006. }
  11007. inputId.value = newId;
  11008. }
  11009. }, { immediate: true });
  11010. });
  11011. onUnmounted(() => {
  11012. idUnwatch && idUnwatch();
  11013. if (formItemContext?.removeInputId) inputId.value && formItemContext.removeInputId(inputId.value);
  11014. });
  11015. return {
  11016. isLabeledByFormItem,
  11017. inputId
  11018. };
  11019. };
  11020. //#endregion
  11021. //#region node_modules/element-plus/es/components/form/src/form-item.mjs
  11022. var formItemValidateStates = [
  11023. "",
  11024. "error",
  11025. "validating",
  11026. "success"
  11027. ];
  11028. /**
  11029. * @deprecated Removed after 3.0.0, Use `FormItemProps` instead.
  11030. */
  11031. var formItemProps = buildProps({
  11032. /**
  11033. * @description Label text.
  11034. */
  11035. label: String,
  11036. /**
  11037. * @description Width of label, e.g. `'50px'`. `'auto'` is supported.
  11038. */
  11039. labelWidth: { type: [String, Number] },
  11040. /**
  11041. * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required. The default is extend from `form label-position`.
  11042. */
  11043. labelPosition: {
  11044. type: String,
  11045. values: [
  11046. "left",
  11047. "right",
  11048. "top",
  11049. ""
  11050. ],
  11051. default: ""
  11052. },
  11053. /**
  11054. * @description A key of `model`. It could be an array of property paths (e.g `['a', 'b', '0']`). In the use of `validate` and `resetFields` method, the attribute is required.
  11055. */
  11056. prop: { type: definePropType([String, Array]) },
  11057. /**
  11058. * @description Whether the field is required or not, will be determined by validation rules if omitted.
  11059. */
  11060. required: {
  11061. type: Boolean,
  11062. default: void 0
  11063. },
  11064. /**
  11065. * @description Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator).
  11066. */
  11067. rules: { type: definePropType([Object, Array]) },
  11068. /**
  11069. * @description Field error message, set its value and the field will validate error and show this message immediately.
  11070. */
  11071. error: String,
  11072. /**
  11073. * @description Validation state of formItem.
  11074. */
  11075. validateStatus: {
  11076. type: String,
  11077. values: formItemValidateStates
  11078. },
  11079. /**
  11080. * @description Same as for in native label.
  11081. */
  11082. for: String,
  11083. /**
  11084. * @description Inline style validate message.
  11085. */
  11086. inlineMessage: {
  11087. type: Boolean,
  11088. default: void 0
  11089. },
  11090. /**
  11091. * @description Whether to show the error message.
  11092. */
  11093. showMessage: {
  11094. type: Boolean,
  11095. default: true
  11096. },
  11097. /**
  11098. * @description Control the size of components in this form-item.
  11099. */
  11100. size: {
  11101. type: String,
  11102. values: componentSizes
  11103. }
  11104. });
  11105. //#endregion
  11106. //#region node_modules/element-plus/es/utils/arrays.mjs
  11107. var unique = (arr) => [...new Set(arr)];
  11108. var extractFirst = (arr) => {
  11109. return isArray$1(arr) ? arr[0] : arr;
  11110. };
  11111. /** like `_.castArray`, except falsy value returns empty array. */
  11112. var castArray = (arr) => {
  11113. if (!arr && arr !== 0) return [];
  11114. return isArray$1(arr) ? arr : [arr];
  11115. };
  11116. //#endregion
  11117. //#region node_modules/element-plus/es/components/form/src/utils.mjs
  11118. var SCOPE$10 = "ElForm";
  11119. function useFormLabelWidth() {
  11120. const potentialLabelWidthArr = ref([]);
  11121. const autoLabelWidth = computed(() => {
  11122. if (!potentialLabelWidthArr.value.length) return "0";
  11123. const max = Math.max(...potentialLabelWidthArr.value);
  11124. return max ? `${max}px` : "";
  11125. });
  11126. function getLabelWidthIndex(width) {
  11127. const index = potentialLabelWidthArr.value.indexOf(width);
  11128. if (index === -1 && autoLabelWidth.value === "0") debugWarn(SCOPE$10, `unexpected width ${width}`);
  11129. return index;
  11130. }
  11131. function registerLabelWidth(val, oldVal) {
  11132. if (val && oldVal) {
  11133. const index = getLabelWidthIndex(oldVal);
  11134. potentialLabelWidthArr.value.splice(index, 1, val);
  11135. } else if (val) potentialLabelWidthArr.value.push(val);
  11136. }
  11137. function deregisterLabelWidth(val) {
  11138. const index = getLabelWidthIndex(val);
  11139. if (index > -1) potentialLabelWidthArr.value.splice(index, 1);
  11140. }
  11141. return {
  11142. autoLabelWidth,
  11143. registerLabelWidth,
  11144. deregisterLabelWidth
  11145. };
  11146. }
  11147. var filterFields = (fields, props) => {
  11148. const normalized = castArray$1(props).map((prop) => isArray$1(prop) ? prop.join(".") : prop);
  11149. return normalized.length > 0 ? fields.filter((field) => field.propString && normalized.includes(field.propString)) : fields;
  11150. };
  11151. //#endregion
  11152. //#region node_modules/element-plus/es/components/form/src/form.vue_vue_type_script_setup_true_lang.mjs
  11153. var COMPONENT_NAME$21 = "ElForm";
  11154. //#endregion
  11155. //#region node_modules/element-plus/es/components/form/src/form2.mjs
  11156. var form_default = /* @__PURE__ */ defineComponent({
  11157. name: COMPONENT_NAME$21,
  11158. __name: "form",
  11159. props: formProps,
  11160. emits: formEmits,
  11161. setup(__props, { expose: __expose, emit: __emit }) {
  11162. const props = __props;
  11163. const emit = __emit;
  11164. const formRef = ref();
  11165. const fields = reactive([]);
  11166. const initialValues = /* @__PURE__ */ new Map();
  11167. const formSize = useFormSize();
  11168. const ns = useNamespace("form");
  11169. const formClasses = computed(() => {
  11170. const { labelPosition, inline } = props;
  11171. return [
  11172. ns.b(),
  11173. ns.m(formSize.value || "default"),
  11174. {
  11175. [ns.m(`label-${labelPosition}`)]: labelPosition,
  11176. [ns.m("inline")]: inline
  11177. }
  11178. ];
  11179. });
  11180. const getField = (prop) => {
  11181. return filterFields(fields, [prop])[0];
  11182. };
  11183. const addField = (field) => {
  11184. if (!fields.includes(field)) fields.push(field);
  11185. if (field.propString) if (initialValues.has(field.propString)) field.setInitialValue(initialValues.get(field.propString));
  11186. else initialValues.set(field.propString, cloneDeep(field.fieldValue));
  11187. };
  11188. const removeField = (field, oldPropString) => {
  11189. if (oldPropString) {
  11190. initialValues.delete(oldPropString);
  11191. return;
  11192. }
  11193. const idx = fields.indexOf(field);
  11194. if (idx > -1) {
  11195. fields.splice(idx, 1);
  11196. if (field.propString) initialValues.set(field.propString, cloneDeep(field.getInitialValue()));
  11197. }
  11198. };
  11199. const setInitialValues = (initModel) => {
  11200. if (!props.model) {
  11201. debugWarn(COMPONENT_NAME$21, "model is required for setInitialValues to work.");
  11202. return;
  11203. }
  11204. if (!initModel) {
  11205. debugWarn(COMPONENT_NAME$21, "initModel is required for setInitialValues to work.");
  11206. return;
  11207. }
  11208. for (const key of initialValues.keys()) initialValues.set(key, cloneDeep(getProp(initModel, key).value));
  11209. fields.forEach((field) => {
  11210. if (field.prop) field.setInitialValue(getProp(initModel, field.prop).value);
  11211. });
  11212. };
  11213. const resetFields = (properties = []) => {
  11214. if (!props.model) {
  11215. debugWarn(COMPONENT_NAME$21, "model is required for resetFields to work.");
  11216. return;
  11217. }
  11218. filterFields(fields, properties).forEach((field) => field.resetField());
  11219. const activePropStrings = new Set(fields.map((f) => f.propString).filter(Boolean));
  11220. const propsToCheck = properties.length > 0 ? castArray$1(properties).map((p) => isArray$1(p) ? p.join(".") : p) : [...initialValues.keys()];
  11221. for (const propString of propsToCheck) if (!activePropStrings.has(propString) && initialValues.has(propString)) getProp(props.model, propString).value = cloneDeep(initialValues.get(propString));
  11222. };
  11223. const clearValidate = (props = []) => {
  11224. filterFields(fields, props).forEach((field) => field.clearValidate());
  11225. };
  11226. const isValidatable = computed(() => {
  11227. const hasModel = !!props.model;
  11228. if (!hasModel) debugWarn(COMPONENT_NAME$21, "model is required for validate to work.");
  11229. return hasModel;
  11230. });
  11231. const obtainValidateFields = (props) => {
  11232. if (fields.length === 0) return [];
  11233. const filteredFields = filterFields(fields, props);
  11234. if (!filteredFields.length) {
  11235. debugWarn(COMPONENT_NAME$21, "please pass correct props!");
  11236. return [];
  11237. }
  11238. return filteredFields;
  11239. };
  11240. const validate = async (callback) => validateField(void 0, callback);
  11241. const doValidateField = async (props = []) => {
  11242. if (!isValidatable.value) return false;
  11243. const fields = obtainValidateFields(props);
  11244. if (fields.length === 0) return true;
  11245. let validationErrors = {};
  11246. for (const field of fields) try {
  11247. await field.validate("");
  11248. if (field.validateState === "error" && !field.error) field.resetField();
  11249. } catch (fields) {
  11250. validationErrors = {
  11251. ...validationErrors,
  11252. ...fields
  11253. };
  11254. }
  11255. if (Object.keys(validationErrors).length === 0) return true;
  11256. return Promise.reject(validationErrors);
  11257. };
  11258. const validateField = async (modelProps = [], callback) => {
  11259. let result = false;
  11260. const shouldThrow = !isFunction$1(callback);
  11261. try {
  11262. result = await doValidateField(modelProps);
  11263. if (result === true) await callback?.(result);
  11264. return result;
  11265. } catch (e) {
  11266. if (e instanceof Error) throw e;
  11267. const invalidFields = e;
  11268. if (props.scrollToError) {
  11269. if (formRef.value) formRef.value.querySelector(`.${ns.b()}-item.is-error`)?.scrollIntoView(props.scrollIntoViewOptions);
  11270. }
  11271. !result && await callback?.(false, invalidFields);
  11272. return shouldThrow && Promise.reject(invalidFields);
  11273. }
  11274. };
  11275. const scrollToField = (prop) => {
  11276. const field = getField(prop);
  11277. if (field) field.$el?.scrollIntoView(props.scrollIntoViewOptions);
  11278. };
  11279. watch(() => props.rules, () => {
  11280. if (props.validateOnRuleChange) validate().catch(NOOP);
  11281. }, {
  11282. deep: true,
  11283. flush: "post"
  11284. });
  11285. provide(formContextKey, reactive({
  11286. ...toRefs(props),
  11287. emit,
  11288. resetFields,
  11289. clearValidate,
  11290. validateField,
  11291. getField,
  11292. addField,
  11293. removeField,
  11294. setInitialValues,
  11295. ...useFormLabelWidth()
  11296. }));
  11297. __expose({
  11298. /**
  11299. * @description Validate the whole form. Receives a callback or returns `Promise`.
  11300. */
  11301. validate,
  11302. /**
  11303. * @description Validate specified fields.
  11304. */
  11305. validateField,
  11306. /**
  11307. * @description Reset specified fields and remove validation result.
  11308. */
  11309. resetFields,
  11310. /**
  11311. * @description Clear validation message for specified fields.
  11312. */
  11313. clearValidate,
  11314. /**
  11315. * @description Scroll to the specified fields.
  11316. */
  11317. scrollToField,
  11318. /**
  11319. * @description Get a field context.
  11320. */
  11321. getField,
  11322. /**
  11323. * @description All fields context.
  11324. */
  11325. fields,
  11326. /**
  11327. * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values.
  11328. */
  11329. setInitialValues
  11330. });
  11331. return (_ctx, _cache) => {
  11332. return openBlock(), createElementBlock("form", {
  11333. ref_key: "formRef",
  11334. ref: formRef,
  11335. class: normalizeClass(formClasses.value)
  11336. }, [renderSlot(_ctx.$slots, "default")], 2);
  11337. };
  11338. }
  11339. });
  11340. //#endregion
  11341. //#region node_modules/element-plus/es/components/form/src/form-label-wrap.mjs
  11342. var COMPONENT_NAME$20 = "ElLabelWrap";
  11343. var form_label_wrap_default = /* @__PURE__ */ defineComponent({
  11344. name: COMPONENT_NAME$20,
  11345. props: {
  11346. isAutoWidth: Boolean,
  11347. updateAll: Boolean
  11348. },
  11349. setup(props, { slots }) {
  11350. const formContext = inject(formContextKey, void 0);
  11351. const formItemContext = inject(formItemContextKey);
  11352. if (!formItemContext) throwError(COMPONENT_NAME$20, "usage: <el-form-item><label-wrap /></el-form-item>");
  11353. const ns = useNamespace("form");
  11354. const el = ref();
  11355. const computedWidth = ref(0);
  11356. const getLabelWidth = () => {
  11357. if (el.value?.firstElementChild) {
  11358. const width = window.getComputedStyle(el.value.firstElementChild).width;
  11359. return Math.ceil(Number.parseFloat(width));
  11360. } else return 0;
  11361. };
  11362. const updateLabelWidth = (action = "update") => {
  11363. nextTick(() => {
  11364. if (slots.default && props.isAutoWidth) {
  11365. if (action === "update") computedWidth.value = getLabelWidth();
  11366. else if (action === "remove") formContext?.deregisterLabelWidth(computedWidth.value);
  11367. }
  11368. });
  11369. };
  11370. const updateLabelWidthFn = () => updateLabelWidth("update");
  11371. onMounted(() => {
  11372. updateLabelWidthFn();
  11373. });
  11374. onBeforeUnmount(() => {
  11375. updateLabelWidth("remove");
  11376. });
  11377. onUpdated(() => updateLabelWidthFn());
  11378. watch(computedWidth, (val, oldVal) => {
  11379. if (props.updateAll) formContext?.registerLabelWidth(val, oldVal);
  11380. });
  11381. useResizeObserver(computed(() => el.value?.firstElementChild ?? null), updateLabelWidthFn);
  11382. return () => {
  11383. if (!slots) return null;
  11384. const { isAutoWidth } = props;
  11385. if (isAutoWidth) {
  11386. const autoLabelWidth = formContext?.autoLabelWidth;
  11387. const hasLabel = formItemContext?.hasLabel;
  11388. const style = {};
  11389. if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") {
  11390. const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value);
  11391. const marginPosition = (formItemContext.labelPosition || formContext.labelPosition) === "left" ? "marginRight" : "marginLeft";
  11392. if (marginWidth) style[marginPosition] = `${marginWidth}px`;
  11393. }
  11394. return createVNode("div", {
  11395. "ref": el,
  11396. "class": [ns.be("item", "label-wrap")],
  11397. "style": style
  11398. }, [slots.default?.()]);
  11399. } else return createVNode(Fragment, { "ref": el }, [slots.default?.()]);
  11400. };
  11401. }
  11402. });
  11403. //#endregion
  11404. //#region node_modules/async-validator/dist-web/index.js
  11405. function _extends() {
  11406. _extends = Object.assign ? Object.assign.bind() : function(target) {
  11407. for (var i = 1; i < arguments.length; i++) {
  11408. var source = arguments[i];
  11409. for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
  11410. }
  11411. return target;
  11412. };
  11413. return _extends.apply(this, arguments);
  11414. }
  11415. function _inheritsLoose(subClass, superClass) {
  11416. subClass.prototype = Object.create(superClass.prototype);
  11417. subClass.prototype.constructor = subClass;
  11418. _setPrototypeOf(subClass, superClass);
  11419. }
  11420. function _getPrototypeOf(o) {
  11421. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  11422. return o.__proto__ || Object.getPrototypeOf(o);
  11423. };
  11424. return _getPrototypeOf(o);
  11425. }
  11426. function _setPrototypeOf(o, p) {
  11427. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  11428. o.__proto__ = p;
  11429. return o;
  11430. };
  11431. return _setPrototypeOf(o, p);
  11432. }
  11433. function _isNativeReflectConstruct() {
  11434. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  11435. if (Reflect.construct.sham) return false;
  11436. if (typeof Proxy === "function") return true;
  11437. try {
  11438. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  11439. return true;
  11440. } catch (e) {
  11441. return false;
  11442. }
  11443. }
  11444. function _construct(Parent, args, Class) {
  11445. if (_isNativeReflectConstruct()) _construct = Reflect.construct.bind();
  11446. else _construct = function _construct(Parent, args, Class) {
  11447. var a = [null];
  11448. a.push.apply(a, args);
  11449. var instance = new (Function.bind.apply(Parent, a))();
  11450. if (Class) _setPrototypeOf(instance, Class.prototype);
  11451. return instance;
  11452. };
  11453. return _construct.apply(null, arguments);
  11454. }
  11455. function _isNativeFunction(fn) {
  11456. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  11457. }
  11458. function _wrapNativeSuper(Class) {
  11459. var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
  11460. _wrapNativeSuper = function _wrapNativeSuper(Class) {
  11461. if (Class === null || !_isNativeFunction(Class)) return Class;
  11462. if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
  11463. if (typeof _cache !== "undefined") {
  11464. if (_cache.has(Class)) return _cache.get(Class);
  11465. _cache.set(Class, Wrapper);
  11466. }
  11467. function Wrapper() {
  11468. return _construct(Class, arguments, _getPrototypeOf(this).constructor);
  11469. }
  11470. Wrapper.prototype = Object.create(Class.prototype, { constructor: {
  11471. value: Wrapper,
  11472. enumerable: false,
  11473. writable: true,
  11474. configurable: true
  11475. } });
  11476. return _setPrototypeOf(Wrapper, Class);
  11477. };
  11478. return _wrapNativeSuper(Class);
  11479. }
  11480. var formatRegExp = /%[sdj%]/g;
  11481. var warning = function warning() {};
  11482. if (typeof process !== "undefined" && process.env && typeof window !== "undefined" && typeof document !== "undefined") warning = function warning(type, errors) {
  11483. if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
  11484. if (errors.every(function(e) {
  11485. return typeof e === "string";
  11486. })) console.warn(type, errors);
  11487. }
  11488. };
  11489. function convertFieldsError(errors) {
  11490. if (!errors || !errors.length) return null;
  11491. var fields = {};
  11492. errors.forEach(function(error) {
  11493. var field = error.field;
  11494. fields[field] = fields[field] || [];
  11495. fields[field].push(error);
  11496. });
  11497. return fields;
  11498. }
  11499. function format(template) {
  11500. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
  11501. var i = 0;
  11502. var len = args.length;
  11503. if (typeof template === "function") return template.apply(null, args);
  11504. if (typeof template === "string") return template.replace(formatRegExp, function(x) {
  11505. if (x === "%%") return "%";
  11506. if (i >= len) return x;
  11507. switch (x) {
  11508. case "%s": return String(args[i++]);
  11509. case "%d": return Number(args[i++]);
  11510. case "%j":
  11511. try {
  11512. return JSON.stringify(args[i++]);
  11513. } catch (_) {
  11514. return "[Circular]";
  11515. }
  11516. break;
  11517. default: return x;
  11518. }
  11519. });
  11520. return template;
  11521. }
  11522. function isNativeStringType(type) {
  11523. return type === "string" || type === "url" || type === "hex" || type === "email" || type === "date" || type === "pattern";
  11524. }
  11525. function isEmptyValue(value, type) {
  11526. if (value === void 0 || value === null) return true;
  11527. if (type === "array" && Array.isArray(value) && !value.length) return true;
  11528. if (isNativeStringType(type) && typeof value === "string" && !value) return true;
  11529. return false;
  11530. }
  11531. function asyncParallelArray(arr, func, callback) {
  11532. var results = [];
  11533. var total = 0;
  11534. var arrLength = arr.length;
  11535. function count(errors) {
  11536. results.push.apply(results, errors || []);
  11537. total++;
  11538. if (total === arrLength) callback(results);
  11539. }
  11540. arr.forEach(function(a) {
  11541. func(a, count);
  11542. });
  11543. }
  11544. function asyncSerialArray(arr, func, callback) {
  11545. var index = 0;
  11546. var arrLength = arr.length;
  11547. function next(errors) {
  11548. if (errors && errors.length) {
  11549. callback(errors);
  11550. return;
  11551. }
  11552. var original = index;
  11553. index = index + 1;
  11554. if (original < arrLength) func(arr[original], next);
  11555. else callback([]);
  11556. }
  11557. next([]);
  11558. }
  11559. function flattenObjArr(objArr) {
  11560. var ret = [];
  11561. Object.keys(objArr).forEach(function(k) {
  11562. ret.push.apply(ret, objArr[k] || []);
  11563. });
  11564. return ret;
  11565. }
  11566. var AsyncValidationError = /*#__PURE__*/ function(_Error) {
  11567. _inheritsLoose(AsyncValidationError, _Error);
  11568. function AsyncValidationError(errors, fields) {
  11569. var _this = _Error.call(this, "Async Validation Error") || this;
  11570. _this.errors = errors;
  11571. _this.fields = fields;
  11572. return _this;
  11573. }
  11574. return AsyncValidationError;
  11575. }(/*#__PURE__*/ _wrapNativeSuper(Error));
  11576. function asyncMap(objArr, option, func, callback, source) {
  11577. if (option.first) {
  11578. var _pending = new Promise(function(resolve, reject) {
  11579. asyncSerialArray(flattenObjArr(objArr), func, function next(errors) {
  11580. callback(errors);
  11581. return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
  11582. });
  11583. });
  11584. _pending["catch"](function(e) {
  11585. return e;
  11586. });
  11587. return _pending;
  11588. }
  11589. var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
  11590. var objArrKeys = Object.keys(objArr);
  11591. var objArrLength = objArrKeys.length;
  11592. var total = 0;
  11593. var results = [];
  11594. var pending = new Promise(function(resolve, reject) {
  11595. var next = function next(errors) {
  11596. results.push.apply(results, errors);
  11597. total++;
  11598. if (total === objArrLength) {
  11599. callback(results);
  11600. return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
  11601. }
  11602. };
  11603. if (!objArrKeys.length) {
  11604. callback(results);
  11605. resolve(source);
  11606. }
  11607. objArrKeys.forEach(function(key) {
  11608. var arr = objArr[key];
  11609. if (firstFields.indexOf(key) !== -1) asyncSerialArray(arr, func, next);
  11610. else asyncParallelArray(arr, func, next);
  11611. });
  11612. });
  11613. pending["catch"](function(e) {
  11614. return e;
  11615. });
  11616. return pending;
  11617. }
  11618. function isErrorObj(obj) {
  11619. return !!(obj && obj.message !== void 0);
  11620. }
  11621. function getValue(value, path) {
  11622. var v = value;
  11623. for (var i = 0; i < path.length; i++) {
  11624. if (v == void 0) return v;
  11625. v = v[path[i]];
  11626. }
  11627. return v;
  11628. }
  11629. function complementError(rule, source) {
  11630. return function(oe) {
  11631. var fieldValue;
  11632. if (rule.fullFields) fieldValue = getValue(source, rule.fullFields);
  11633. else fieldValue = source[oe.field || rule.fullField];
  11634. if (isErrorObj(oe)) {
  11635. oe.field = oe.field || rule.fullField;
  11636. oe.fieldValue = fieldValue;
  11637. return oe;
  11638. }
  11639. return {
  11640. message: typeof oe === "function" ? oe() : oe,
  11641. fieldValue,
  11642. field: oe.field || rule.fullField
  11643. };
  11644. };
  11645. }
  11646. function deepMerge(target, source) {
  11647. if (source) {
  11648. for (var s in source) if (source.hasOwnProperty(s)) {
  11649. var value = source[s];
  11650. if (typeof value === "object" && typeof target[s] === "object") target[s] = _extends({}, target[s], value);
  11651. else target[s] = value;
  11652. }
  11653. }
  11654. return target;
  11655. }
  11656. var required$1 = function required(rule, value, source, errors, options, type) {
  11657. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) errors.push(format(options.messages.required, rule.fullField));
  11658. };
  11659. /**
  11660. * Rule for validating whitespace.
  11661. *
  11662. * @param rule The validation rule.
  11663. * @param value The value of the field on the source object.
  11664. * @param source The source object being validated.
  11665. * @param errors An array of errors that this rule may add
  11666. * validation errors to.
  11667. * @param options The validation options.
  11668. * @param options.messages The validation messages.
  11669. */
  11670. var whitespace = function whitespace(rule, value, source, errors, options) {
  11671. if (/^\s+$/.test(value) || value === "") errors.push(format(options.messages.whitespace, rule.fullField));
  11672. };
  11673. var urlReg;
  11674. var getUrlRegex = (function() {
  11675. if (urlReg) return urlReg;
  11676. var word = "[a-fA-F\\d:]";
  11677. var b = function b(options) {
  11678. return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
  11679. };
  11680. var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
  11681. var v6seg = "[a-fA-F\\d]{1,4}";
  11682. var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
  11683. var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
  11684. var v4exact = new RegExp("^" + v4 + "$");
  11685. var v6exact = new RegExp("^" + v6 + "$");
  11686. var ip = function ip(options) {
  11687. return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
  11688. };
  11689. ip.v4 = function(options) {
  11690. return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
  11691. };
  11692. ip.v6 = function(options) {
  11693. return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
  11694. };
  11695. var protocol = "(?:(?:[a-z]+:)?//)";
  11696. var auth = "(?:\\S+(?::\\S*)?@)?";
  11697. var ipv4 = ip.v4().source;
  11698. var ipv6 = ip.v6().source;
  11699. var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s\"]*)?";
  11700. urlReg = new RegExp("(?:^" + regex + "$)", "i");
  11701. return urlReg;
  11702. });
  11703. var pattern$2 = {
  11704. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  11705. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  11706. };
  11707. var types = {
  11708. integer: function integer(value) {
  11709. return types.number(value) && parseInt(value, 10) === value;
  11710. },
  11711. "float": function float(value) {
  11712. return types.number(value) && !types.integer(value);
  11713. },
  11714. array: function array(value) {
  11715. return Array.isArray(value);
  11716. },
  11717. regexp: function regexp(value) {
  11718. if (value instanceof RegExp) return true;
  11719. try {
  11720. return !!new RegExp(value);
  11721. } catch (e) {
  11722. return false;
  11723. }
  11724. },
  11725. date: function date(value) {
  11726. return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
  11727. },
  11728. number: function number(value) {
  11729. if (isNaN(value)) return false;
  11730. return typeof value === "number";
  11731. },
  11732. object: function object(value) {
  11733. return typeof value === "object" && !types.array(value);
  11734. },
  11735. method: function method(value) {
  11736. return typeof value === "function";
  11737. },
  11738. email: function email(value) {
  11739. return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
  11740. },
  11741. url: function url(value) {
  11742. return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
  11743. },
  11744. hex: function hex(value) {
  11745. return typeof value === "string" && !!value.match(pattern$2.hex);
  11746. }
  11747. };
  11748. var type$1 = function type(rule, value, source, errors, options) {
  11749. if (rule.required && value === void 0) {
  11750. required$1(rule, value, source, errors, options);
  11751. return;
  11752. }
  11753. var custom = [
  11754. "integer",
  11755. "float",
  11756. "array",
  11757. "regexp",
  11758. "object",
  11759. "method",
  11760. "email",
  11761. "number",
  11762. "date",
  11763. "url",
  11764. "hex"
  11765. ];
  11766. var ruleType = rule.type;
  11767. if (custom.indexOf(ruleType) > -1) {
  11768. if (!types[ruleType](value)) errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  11769. } else if (ruleType && typeof value !== rule.type) errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  11770. };
  11771. var range = function range(rule, value, source, errors, options) {
  11772. var len = typeof rule.len === "number";
  11773. var min = typeof rule.min === "number";
  11774. var max = typeof rule.max === "number";
  11775. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  11776. var val = value;
  11777. var key = null;
  11778. var num = typeof value === "number";
  11779. var str = typeof value === "string";
  11780. var arr = Array.isArray(value);
  11781. if (num) key = "number";
  11782. else if (str) key = "string";
  11783. else if (arr) key = "array";
  11784. if (!key) return false;
  11785. if (arr) val = value.length;
  11786. if (str) val = value.replace(spRegexp, "_").length;
  11787. if (len) {
  11788. if (val !== rule.len) errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  11789. } else if (min && !max && val < rule.min) errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  11790. else if (max && !min && val > rule.max) errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  11791. else if (min && max && (val < rule.min || val > rule.max)) errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  11792. };
  11793. var ENUM$1 = "enum";
  11794. var rules = {
  11795. required: required$1,
  11796. whitespace,
  11797. type: type$1,
  11798. range,
  11799. "enum": function enumerable(rule, value, source, errors, options) {
  11800. rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
  11801. if (rule[ENUM$1].indexOf(value) === -1) errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
  11802. },
  11803. pattern: function pattern(rule, value, source, errors, options) {
  11804. if (rule.pattern) {
  11805. if (rule.pattern instanceof RegExp) {
  11806. rule.pattern.lastIndex = 0;
  11807. if (!rule.pattern.test(value)) errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  11808. } else if (typeof rule.pattern === "string") {
  11809. if (!new RegExp(rule.pattern).test(value)) errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  11810. }
  11811. }
  11812. }
  11813. };
  11814. var string = function string(rule, value, callback, source, options) {
  11815. var errors = [];
  11816. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11817. if (isEmptyValue(value, "string") && !rule.required) return callback();
  11818. rules.required(rule, value, source, errors, options, "string");
  11819. if (!isEmptyValue(value, "string")) {
  11820. rules.type(rule, value, source, errors, options);
  11821. rules.range(rule, value, source, errors, options);
  11822. rules.pattern(rule, value, source, errors, options);
  11823. if (rule.whitespace === true) rules.whitespace(rule, value, source, errors, options);
  11824. }
  11825. }
  11826. callback(errors);
  11827. };
  11828. var method = function method(rule, value, callback, source, options) {
  11829. var errors = [];
  11830. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11831. if (isEmptyValue(value) && !rule.required) return callback();
  11832. rules.required(rule, value, source, errors, options);
  11833. if (value !== void 0) rules.type(rule, value, source, errors, options);
  11834. }
  11835. callback(errors);
  11836. };
  11837. var number = function number(rule, value, callback, source, options) {
  11838. var errors = [];
  11839. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11840. if (value === "") value = void 0;
  11841. if (isEmptyValue(value) && !rule.required) return callback();
  11842. rules.required(rule, value, source, errors, options);
  11843. if (value !== void 0) {
  11844. rules.type(rule, value, source, errors, options);
  11845. rules.range(rule, value, source, errors, options);
  11846. }
  11847. }
  11848. callback(errors);
  11849. };
  11850. var _boolean = function _boolean(rule, value, callback, source, options) {
  11851. var errors = [];
  11852. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11853. if (isEmptyValue(value) && !rule.required) return callback();
  11854. rules.required(rule, value, source, errors, options);
  11855. if (value !== void 0) rules.type(rule, value, source, errors, options);
  11856. }
  11857. callback(errors);
  11858. };
  11859. var regexp = function regexp(rule, value, callback, source, options) {
  11860. var errors = [];
  11861. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11862. if (isEmptyValue(value) && !rule.required) return callback();
  11863. rules.required(rule, value, source, errors, options);
  11864. if (!isEmptyValue(value)) rules.type(rule, value, source, errors, options);
  11865. }
  11866. callback(errors);
  11867. };
  11868. var integer = function integer(rule, value, callback, source, options) {
  11869. var errors = [];
  11870. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11871. if (isEmptyValue(value) && !rule.required) return callback();
  11872. rules.required(rule, value, source, errors, options);
  11873. if (value !== void 0) {
  11874. rules.type(rule, value, source, errors, options);
  11875. rules.range(rule, value, source, errors, options);
  11876. }
  11877. }
  11878. callback(errors);
  11879. };
  11880. var floatFn = function floatFn(rule, value, callback, source, options) {
  11881. var errors = [];
  11882. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11883. if (isEmptyValue(value) && !rule.required) return callback();
  11884. rules.required(rule, value, source, errors, options);
  11885. if (value !== void 0) {
  11886. rules.type(rule, value, source, errors, options);
  11887. rules.range(rule, value, source, errors, options);
  11888. }
  11889. }
  11890. callback(errors);
  11891. };
  11892. var array = function array(rule, value, callback, source, options) {
  11893. var errors = [];
  11894. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11895. if ((value === void 0 || value === null) && !rule.required) return callback();
  11896. rules.required(rule, value, source, errors, options, "array");
  11897. if (value !== void 0 && value !== null) {
  11898. rules.type(rule, value, source, errors, options);
  11899. rules.range(rule, value, source, errors, options);
  11900. }
  11901. }
  11902. callback(errors);
  11903. };
  11904. var object = function object(rule, value, callback, source, options) {
  11905. var errors = [];
  11906. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11907. if (isEmptyValue(value) && !rule.required) return callback();
  11908. rules.required(rule, value, source, errors, options);
  11909. if (value !== void 0) rules.type(rule, value, source, errors, options);
  11910. }
  11911. callback(errors);
  11912. };
  11913. var ENUM = "enum";
  11914. var enumerable = function enumerable(rule, value, callback, source, options) {
  11915. var errors = [];
  11916. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11917. if (isEmptyValue(value) && !rule.required) return callback();
  11918. rules.required(rule, value, source, errors, options);
  11919. if (value !== void 0) rules[ENUM](rule, value, source, errors, options);
  11920. }
  11921. callback(errors);
  11922. };
  11923. var pattern = function pattern(rule, value, callback, source, options) {
  11924. var errors = [];
  11925. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11926. if (isEmptyValue(value, "string") && !rule.required) return callback();
  11927. rules.required(rule, value, source, errors, options);
  11928. if (!isEmptyValue(value, "string")) rules.pattern(rule, value, source, errors, options);
  11929. }
  11930. callback(errors);
  11931. };
  11932. var date = function date(rule, value, callback, source, options) {
  11933. var errors = [];
  11934. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11935. if (isEmptyValue(value, "date") && !rule.required) return callback();
  11936. rules.required(rule, value, source, errors, options);
  11937. if (!isEmptyValue(value, "date")) {
  11938. var dateObject;
  11939. if (value instanceof Date) dateObject = value;
  11940. else dateObject = new Date(value);
  11941. rules.type(rule, dateObject, source, errors, options);
  11942. if (dateObject) rules.range(rule, dateObject.getTime(), source, errors, options);
  11943. }
  11944. }
  11945. callback(errors);
  11946. };
  11947. var required = function required(rule, value, callback, source, options) {
  11948. var errors = [];
  11949. var type = Array.isArray(value) ? "array" : typeof value;
  11950. rules.required(rule, value, source, errors, options, type);
  11951. callback(errors);
  11952. };
  11953. var type = function type(rule, value, callback, source, options) {
  11954. var ruleType = rule.type;
  11955. var errors = [];
  11956. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11957. if (isEmptyValue(value, ruleType) && !rule.required) return callback();
  11958. rules.required(rule, value, source, errors, options, ruleType);
  11959. if (!isEmptyValue(value, ruleType)) rules.type(rule, value, source, errors, options);
  11960. }
  11961. callback(errors);
  11962. };
  11963. var validators = {
  11964. string,
  11965. method,
  11966. number,
  11967. "boolean": _boolean,
  11968. regexp,
  11969. integer,
  11970. "float": floatFn,
  11971. array,
  11972. object,
  11973. "enum": enumerable,
  11974. pattern,
  11975. date,
  11976. url: type,
  11977. hex: type,
  11978. email: type,
  11979. required,
  11980. any: function any(rule, value, callback, source, options) {
  11981. var errors = [];
  11982. if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
  11983. if (isEmptyValue(value) && !rule.required) return callback();
  11984. rules.required(rule, value, source, errors, options);
  11985. }
  11986. callback(errors);
  11987. }
  11988. };
  11989. function newMessages() {
  11990. return {
  11991. "default": "Validation error on field %s",
  11992. required: "%s is required",
  11993. "enum": "%s must be one of %s",
  11994. whitespace: "%s cannot be empty",
  11995. date: {
  11996. format: "%s date %s is invalid for format %s",
  11997. parse: "%s date could not be parsed, %s is invalid ",
  11998. invalid: "%s date %s is invalid"
  11999. },
  12000. types: {
  12001. string: "%s is not a %s",
  12002. method: "%s is not a %s (function)",
  12003. array: "%s is not an %s",
  12004. object: "%s is not an %s",
  12005. number: "%s is not a %s",
  12006. date: "%s is not a %s",
  12007. "boolean": "%s is not a %s",
  12008. integer: "%s is not an %s",
  12009. "float": "%s is not a %s",
  12010. regexp: "%s is not a valid %s",
  12011. email: "%s is not a valid %s",
  12012. url: "%s is not a valid %s",
  12013. hex: "%s is not a valid %s"
  12014. },
  12015. string: {
  12016. len: "%s must be exactly %s characters",
  12017. min: "%s must be at least %s characters",
  12018. max: "%s cannot be longer than %s characters",
  12019. range: "%s must be between %s and %s characters"
  12020. },
  12021. number: {
  12022. len: "%s must equal %s",
  12023. min: "%s cannot be less than %s",
  12024. max: "%s cannot be greater than %s",
  12025. range: "%s must be between %s and %s"
  12026. },
  12027. array: {
  12028. len: "%s must be exactly %s in length",
  12029. min: "%s cannot be less than %s in length",
  12030. max: "%s cannot be greater than %s in length",
  12031. range: "%s must be between %s and %s in length"
  12032. },
  12033. pattern: { mismatch: "%s value %s does not match pattern %s" },
  12034. clone: function clone() {
  12035. var cloned = JSON.parse(JSON.stringify(this));
  12036. cloned.clone = this.clone;
  12037. return cloned;
  12038. }
  12039. };
  12040. }
  12041. var messages = newMessages();
  12042. /**
  12043. * Encapsulates a validation schema.
  12044. *
  12045. * @param descriptor An object declaring validation rules
  12046. * for this schema.
  12047. */
  12048. var Schema = /*#__PURE__*/ function() {
  12049. function Schema(descriptor) {
  12050. this.rules = null;
  12051. this._messages = messages;
  12052. this.define(descriptor);
  12053. }
  12054. var _proto = Schema.prototype;
  12055. _proto.define = function define(rules) {
  12056. var _this = this;
  12057. if (!rules) throw new Error("Cannot configure a schema with no rules");
  12058. if (typeof rules !== "object" || Array.isArray(rules)) throw new Error("Rules must be an object");
  12059. this.rules = {};
  12060. Object.keys(rules).forEach(function(name) {
  12061. var item = rules[name];
  12062. _this.rules[name] = Array.isArray(item) ? item : [item];
  12063. });
  12064. };
  12065. _proto.messages = function messages(_messages) {
  12066. if (_messages) this._messages = deepMerge(newMessages(), _messages);
  12067. return this._messages;
  12068. };
  12069. _proto.validate = function validate(source_, o, oc) {
  12070. var _this2 = this;
  12071. if (o === void 0) o = {};
  12072. if (oc === void 0) oc = function oc() {};
  12073. var source = source_;
  12074. var options = o;
  12075. var callback = oc;
  12076. if (typeof options === "function") {
  12077. callback = options;
  12078. options = {};
  12079. }
  12080. if (!this.rules || Object.keys(this.rules).length === 0) {
  12081. if (callback) callback(null, source);
  12082. return Promise.resolve(source);
  12083. }
  12084. function complete(results) {
  12085. var errors = [];
  12086. var fields = {};
  12087. function add(e) {
  12088. if (Array.isArray(e)) {
  12089. var _errors;
  12090. errors = (_errors = errors).concat.apply(_errors, e);
  12091. } else errors.push(e);
  12092. }
  12093. for (var i = 0; i < results.length; i++) add(results[i]);
  12094. if (!errors.length) callback(null, source);
  12095. else {
  12096. fields = convertFieldsError(errors);
  12097. callback(errors, fields);
  12098. }
  12099. }
  12100. if (options.messages) {
  12101. var messages$1 = this.messages();
  12102. if (messages$1 === messages) messages$1 = newMessages();
  12103. deepMerge(messages$1, options.messages);
  12104. options.messages = messages$1;
  12105. } else options.messages = this.messages();
  12106. var series = {};
  12107. (options.keys || Object.keys(this.rules)).forEach(function(z) {
  12108. var arr = _this2.rules[z];
  12109. var value = source[z];
  12110. arr.forEach(function(r) {
  12111. var rule = r;
  12112. if (typeof rule.transform === "function") {
  12113. if (source === source_) source = _extends({}, source);
  12114. value = source[z] = rule.transform(value);
  12115. }
  12116. if (typeof rule === "function") rule = { validator: rule };
  12117. else rule = _extends({}, rule);
  12118. rule.validator = _this2.getValidationMethod(rule);
  12119. if (!rule.validator) return;
  12120. rule.field = z;
  12121. rule.fullField = rule.fullField || z;
  12122. rule.type = _this2.getType(rule);
  12123. series[z] = series[z] || [];
  12124. series[z].push({
  12125. rule,
  12126. value,
  12127. source,
  12128. field: z
  12129. });
  12130. });
  12131. });
  12132. var errorFields = {};
  12133. return asyncMap(series, options, function(data, doIt) {
  12134. var rule = data.rule;
  12135. var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  12136. deep = deep && (rule.required || !rule.required && data.value);
  12137. rule.field = data.field;
  12138. function addFullField(key, schema) {
  12139. return _extends({}, schema, {
  12140. fullField: rule.fullField + "." + key,
  12141. fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
  12142. });
  12143. }
  12144. function cb(e) {
  12145. if (e === void 0) e = [];
  12146. var errorList = Array.isArray(e) ? e : [e];
  12147. if (!options.suppressWarning && errorList.length) Schema.warning("async-validator:", errorList);
  12148. if (errorList.length && rule.message !== void 0) errorList = [].concat(rule.message);
  12149. var filledErrors = errorList.map(complementError(rule, source));
  12150. if (options.first && filledErrors.length) {
  12151. errorFields[rule.field] = 1;
  12152. return doIt(filledErrors);
  12153. }
  12154. if (!deep) doIt(filledErrors);
  12155. else {
  12156. if (rule.required && !data.value) {
  12157. if (rule.message !== void 0) filledErrors = [].concat(rule.message).map(complementError(rule, source));
  12158. else if (options.error) filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
  12159. return doIt(filledErrors);
  12160. }
  12161. var fieldsSchema = {};
  12162. if (rule.defaultField) Object.keys(data.value).map(function(key) {
  12163. fieldsSchema[key] = rule.defaultField;
  12164. });
  12165. fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
  12166. var paredFieldsSchema = {};
  12167. Object.keys(fieldsSchema).forEach(function(field) {
  12168. var fieldSchema = fieldsSchema[field];
  12169. paredFieldsSchema[field] = (Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema]).map(addFullField.bind(null, field));
  12170. });
  12171. var schema = new Schema(paredFieldsSchema);
  12172. schema.messages(options.messages);
  12173. if (data.rule.options) {
  12174. data.rule.options.messages = options.messages;
  12175. data.rule.options.error = options.error;
  12176. }
  12177. schema.validate(data.value, data.rule.options || options, function(errs) {
  12178. var finalErrors = [];
  12179. if (filledErrors && filledErrors.length) finalErrors.push.apply(finalErrors, filledErrors);
  12180. if (errs && errs.length) finalErrors.push.apply(finalErrors, errs);
  12181. doIt(finalErrors.length ? finalErrors : null);
  12182. });
  12183. }
  12184. }
  12185. var res;
  12186. if (rule.asyncValidator) res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  12187. else if (rule.validator) {
  12188. try {
  12189. res = rule.validator(rule, data.value, cb, data.source, options);
  12190. } catch (error) {
  12191. console.error == null || console.error(error);
  12192. if (!options.suppressValidatorError) setTimeout(function() {
  12193. throw error;
  12194. }, 0);
  12195. cb(error.message);
  12196. }
  12197. if (res === true) cb();
  12198. else if (res === false) cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
  12199. else if (res instanceof Array) cb(res);
  12200. else if (res instanceof Error) cb(res.message);
  12201. }
  12202. if (res && res.then) res.then(function() {
  12203. return cb();
  12204. }, function(e) {
  12205. return cb(e);
  12206. });
  12207. }, function(results) {
  12208. complete(results);
  12209. }, source);
  12210. };
  12211. _proto.getType = function getType(rule) {
  12212. if (rule.type === void 0 && rule.pattern instanceof RegExp) rule.type = "pattern";
  12213. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) throw new Error(format("Unknown rule type %s", rule.type));
  12214. return rule.type || "string";
  12215. };
  12216. _proto.getValidationMethod = function getValidationMethod(rule) {
  12217. if (typeof rule.validator === "function") return rule.validator;
  12218. var keys = Object.keys(rule);
  12219. var messageIndex = keys.indexOf("message");
  12220. if (messageIndex !== -1) keys.splice(messageIndex, 1);
  12221. if (keys.length === 1 && keys[0] === "required") return validators.required;
  12222. return validators[this.getType(rule)] || void 0;
  12223. };
  12224. return Schema;
  12225. }();
  12226. Schema.register = function register(type, validator) {
  12227. if (typeof validator !== "function") throw new Error("Cannot register a validator by type, validator is not a function");
  12228. validators[type] = validator;
  12229. };
  12230. Schema.warning = warning;
  12231. Schema.messages = messages;
  12232. Schema.validators = validators;
  12233. //#endregion
  12234. //#region node_modules/element-plus/es/components/form/src/form-item.vue_vue_type_script_setup_true_lang.mjs
  12235. var _hoisted_1$79 = ["role", "aria-labelledby"];
  12236. //#endregion
  12237. //#region node_modules/element-plus/es/components/form/src/form-item2.mjs
  12238. var form_item_default = /* @__PURE__ */ defineComponent({
  12239. name: "ElFormItem",
  12240. __name: "form-item",
  12241. props: formItemProps,
  12242. setup(__props, { expose: __expose }) {
  12243. const props = __props;
  12244. const slots = useSlots();
  12245. const formContext = inject(formContextKey, void 0);
  12246. const parentFormItemContext = inject(formItemContextKey, void 0);
  12247. const _size = useFormSize(void 0, { formItem: false });
  12248. const ns = useNamespace("form-item");
  12249. const labelId = useId().value;
  12250. const inputIds = ref([]);
  12251. const validateState = ref("");
  12252. const validateStateDebounced = refDebounced(validateState, 100);
  12253. const validateMessage = ref("");
  12254. const formItemRef = ref();
  12255. let initialValue = void 0;
  12256. let isResettingField = false;
  12257. const labelPosition = computed(() => props.labelPosition || formContext?.labelPosition);
  12258. const labelStyle = computed(() => {
  12259. if (labelPosition.value === "top") return {};
  12260. return { width: addUnit(props.labelWidth ?? formContext?.labelWidth) };
  12261. });
  12262. const contentStyle = computed(() => {
  12263. if (labelPosition.value === "top" || formContext?.inline) return {};
  12264. if (!props.label && !props.labelWidth && isNested) return {};
  12265. const labelWidth = addUnit(props.labelWidth ?? formContext?.labelWidth);
  12266. if (!props.label && !slots.label) return { marginLeft: labelWidth };
  12267. return {};
  12268. });
  12269. const formItemClasses = computed(() => [
  12270. ns.b(),
  12271. ns.m(_size.value),
  12272. ns.is("error", validateState.value === "error"),
  12273. ns.is("validating", validateState.value === "validating"),
  12274. ns.is("success", validateState.value === "success"),
  12275. ns.is("required", isRequired.value || props.required),
  12276. ns.is("no-asterisk", formContext?.hideRequiredAsterisk),
  12277. formContext?.requireAsteriskPosition === "right" ? "asterisk-right" : "asterisk-left",
  12278. {
  12279. [ns.m("feedback")]: formContext?.statusIcon,
  12280. [ns.m(`label-${labelPosition.value}`)]: labelPosition.value
  12281. }
  12282. ]);
  12283. const _inlineMessage = computed(() => isBoolean(props.inlineMessage) ? props.inlineMessage : formContext?.inlineMessage || false);
  12284. const validateClasses = computed(() => [ns.e("error"), { [ns.em("error", "inline")]: _inlineMessage.value }]);
  12285. const propString = computed(() => {
  12286. if (!props.prop) return "";
  12287. return isArray$1(props.prop) ? props.prop.join(".") : props.prop;
  12288. });
  12289. const hasLabel = computed(() => {
  12290. return !!(props.label || slots.label);
  12291. });
  12292. const labelFor = computed(() => {
  12293. return props.for ?? (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
  12294. });
  12295. const isGroup = computed(() => {
  12296. return !labelFor.value && hasLabel.value;
  12297. });
  12298. const isNested = !!parentFormItemContext;
  12299. const fieldValue = computed(() => {
  12300. const model = formContext?.model;
  12301. if (!model || !props.prop) return;
  12302. return getProp(model, props.prop).value;
  12303. });
  12304. const normalizedRules = computed(() => {
  12305. const { required } = props;
  12306. const rules = [];
  12307. if (props.rules) rules.push(...castArray$1(props.rules));
  12308. const formRules = formContext?.rules;
  12309. if (formRules && props.prop) {
  12310. const _rules = getProp(formRules, props.prop).value;
  12311. if (_rules) rules.push(...castArray$1(_rules));
  12312. }
  12313. if (required !== void 0) {
  12314. const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => "required" in rule);
  12315. if (requiredRules.length > 0) for (const [rule, i] of requiredRules) {
  12316. if (rule.required === required) continue;
  12317. rules[i] = {
  12318. ...rule,
  12319. required
  12320. };
  12321. }
  12322. else rules.push({ required });
  12323. }
  12324. return rules;
  12325. });
  12326. const validateEnabled = computed(() => normalizedRules.value.length > 0);
  12327. const getFilteredRule = (trigger) => {
  12328. return normalizedRules.value.filter((rule) => {
  12329. if (!rule.trigger || !trigger) return true;
  12330. if (isArray$1(rule.trigger)) return rule.trigger.includes(trigger);
  12331. else return rule.trigger === trigger;
  12332. }).map(({ trigger, ...rule }) => rule);
  12333. };
  12334. const isRequired = computed(() => normalizedRules.value.some((rule) => rule.required));
  12335. const shouldShowError = computed(() => validateStateDebounced.value === "error" && props.showMessage && (formContext?.showMessage ?? true));
  12336. const currentLabel = computed(() => `${props.label || ""}${formContext?.labelSuffix || ""}`);
  12337. const setValidationState = (state) => {
  12338. validateState.value = state;
  12339. };
  12340. const onValidationFailed = (error) => {
  12341. const { errors, fields } = error;
  12342. if (!errors || !fields) console.error(error);
  12343. setValidationState("error");
  12344. validateMessage.value = errors ? errors?.[0]?.message ?? `${props.prop} is required` : "";
  12345. formContext?.emit("validate", props.prop, false, validateMessage.value);
  12346. };
  12347. const onValidationSucceeded = () => {
  12348. setValidationState("success");
  12349. formContext?.emit("validate", props.prop, true, "");
  12350. };
  12351. const doValidate = async (rules) => {
  12352. const modelName = propString.value;
  12353. return new Schema({ [modelName]: rules }).validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
  12354. onValidationSucceeded();
  12355. return true;
  12356. }).catch((err) => {
  12357. onValidationFailed(err);
  12358. return Promise.reject(err);
  12359. });
  12360. };
  12361. const validate = async (trigger, callback) => {
  12362. if (isResettingField || !props.prop) return false;
  12363. const hasCallback = isFunction$1(callback);
  12364. if (!validateEnabled.value) {
  12365. callback?.(false);
  12366. return false;
  12367. }
  12368. const rules = getFilteredRule(trigger);
  12369. if (rules.length === 0) {
  12370. callback?.(true);
  12371. return true;
  12372. }
  12373. setValidationState("validating");
  12374. return doValidate(rules).then(() => {
  12375. callback?.(true);
  12376. return true;
  12377. }).catch((err) => {
  12378. const { fields } = err;
  12379. callback?.(false, fields);
  12380. return hasCallback ? false : Promise.reject(fields);
  12381. });
  12382. };
  12383. const clearValidate = () => {
  12384. setValidationState("");
  12385. validateMessage.value = "";
  12386. isResettingField = false;
  12387. };
  12388. const resetField = async () => {
  12389. const model = formContext?.model;
  12390. if (!model || !props.prop) return;
  12391. const computedValue = getProp(model, props.prop);
  12392. isResettingField = true;
  12393. computedValue.value = cloneDeep(initialValue);
  12394. await nextTick();
  12395. clearValidate();
  12396. isResettingField = false;
  12397. };
  12398. const addInputId = (id) => {
  12399. if (!inputIds.value.includes(id)) inputIds.value.push(id);
  12400. };
  12401. const removeInputId = (id) => {
  12402. inputIds.value = inputIds.value.filter((listId) => listId !== id);
  12403. };
  12404. const setInitialValue = (value) => {
  12405. initialValue = cloneDeep(value);
  12406. };
  12407. const getInitialValue = () => initialValue;
  12408. watch(() => props.error, (val) => {
  12409. validateMessage.value = val || "";
  12410. setValidationState(val ? "error" : "");
  12411. }, { immediate: true });
  12412. watch(() => props.validateStatus, (val) => setValidationState(val || ""));
  12413. const context = reactive({
  12414. ...toRefs(props),
  12415. $el: formItemRef,
  12416. size: _size,
  12417. validateMessage,
  12418. validateState,
  12419. labelId,
  12420. inputIds,
  12421. isGroup,
  12422. hasLabel,
  12423. fieldValue,
  12424. addInputId,
  12425. removeInputId,
  12426. resetField,
  12427. clearValidate,
  12428. validate,
  12429. propString,
  12430. setInitialValue,
  12431. getInitialValue
  12432. });
  12433. provide(formItemContextKey, context);
  12434. watch(propString, (newPropString, oldPropString) => {
  12435. if (!formContext || !oldPropString) return;
  12436. formContext.removeField(context, oldPropString);
  12437. if (newPropString) {
  12438. setInitialValue(fieldValue.value);
  12439. formContext.addField(context);
  12440. }
  12441. });
  12442. onMounted(() => {
  12443. if (props.prop) {
  12444. setInitialValue(fieldValue.value);
  12445. formContext?.addField(context);
  12446. }
  12447. });
  12448. onBeforeUnmount(() => {
  12449. formContext?.removeField(context);
  12450. });
  12451. __expose({
  12452. /**
  12453. * @description Form item size.
  12454. */
  12455. size: _size,
  12456. /**
  12457. * @description Validation message.
  12458. */
  12459. validateMessage,
  12460. /**
  12461. * @description Validation state.
  12462. */
  12463. validateState,
  12464. /**
  12465. * @description Validate form item.
  12466. */
  12467. validate,
  12468. /**
  12469. * @description Remove validation status of the field.
  12470. */
  12471. clearValidate,
  12472. /**
  12473. * @description Reset current field and remove validation result.
  12474. */
  12475. resetField,
  12476. /**
  12477. * @description Set initial value for this field. When `resetField` is called, the field will reset to this value.
  12478. */
  12479. setInitialValue
  12480. });
  12481. return (_ctx, _cache) => {
  12482. return openBlock(), createElementBlock("div", {
  12483. ref_key: "formItemRef",
  12484. ref: formItemRef,
  12485. class: normalizeClass(formItemClasses.value),
  12486. role: isGroup.value ? "group" : void 0,
  12487. "aria-labelledby": isGroup.value ? unref(labelId) : void 0
  12488. }, [createVNode(unref(form_label_wrap_default), {
  12489. "is-auto-width": labelStyle.value.width === "auto",
  12490. "update-all": unref(formContext)?.labelWidth === "auto"
  12491. }, {
  12492. default: withCtx(() => [!!(__props.label || _ctx.$slots.label) ? (openBlock(), createBlock(resolveDynamicComponent(labelFor.value ? "label" : "div"), {
  12493. key: 0,
  12494. id: unref(labelId),
  12495. for: labelFor.value,
  12496. class: normalizeClass(unref(ns).e("label")),
  12497. style: normalizeStyle(labelStyle.value)
  12498. }, {
  12499. default: withCtx(() => [renderSlot(_ctx.$slots, "label", { label: currentLabel.value }, () => [createTextVNode(toDisplayString(currentLabel.value), 1)])]),
  12500. _: 3
  12501. }, 8, [
  12502. "id",
  12503. "for",
  12504. "class",
  12505. "style"
  12506. ])) : createCommentVNode("v-if", true)]),
  12507. _: 3
  12508. }, 8, ["is-auto-width", "update-all"]), createBaseVNode("div", {
  12509. class: normalizeClass(unref(ns).e("content")),
  12510. style: normalizeStyle(contentStyle.value)
  12511. }, [renderSlot(_ctx.$slots, "default"), createVNode(TransitionGroup, { name: `${unref(ns).namespace.value}-zoom-in-top` }, {
  12512. default: withCtx(() => [shouldShowError.value ? renderSlot(_ctx.$slots, "error", {
  12513. key: 0,
  12514. error: validateMessage.value
  12515. }, () => [createBaseVNode("div", { class: normalizeClass(validateClasses.value) }, toDisplayString(validateMessage.value), 3)]) : createCommentVNode("v-if", true)]),
  12516. _: 3
  12517. }, 8, ["name"])], 6)], 10, _hoisted_1$79);
  12518. };
  12519. }
  12520. });
  12521. //#endregion
  12522. //#region node_modules/element-plus/es/components/form/index.mjs
  12523. var ElForm = withInstall(form_default, { FormItem: form_item_default });
  12524. var ElFormItem = withNoopInstall(form_item_default);
  12525. //#endregion
  12526. //#region node_modules/element-plus/es/components/focus-trap/src/tokens.mjs
  12527. var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
  12528. var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
  12529. var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
  12530. var FOCUS_AFTER_TRAPPED_OPTS = {
  12531. cancelable: true,
  12532. bubbles: false
  12533. };
  12534. var FOCUSOUT_PREVENTED_OPTS = {
  12535. cancelable: true,
  12536. bubbles: false
  12537. };
  12538. var ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
  12539. var ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
  12540. var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
  12541. //#endregion
  12542. //#region node_modules/element-plus/es/components/focus-trap/src/utils.mjs
  12543. var focusReason = ref();
  12544. var lastUserFocusTimestamp = ref(0);
  12545. var lastAutomatedFocusTimestamp = ref(0);
  12546. var focusReasonUserCount = 0;
  12547. var obtainAllFocusableElements = (element) => {
  12548. const nodes = [];
  12549. const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
  12550. const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
  12551. if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
  12552. return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
  12553. } });
  12554. while (walker.nextNode()) nodes.push(walker.currentNode);
  12555. return nodes;
  12556. };
  12557. var getVisibleElement = (elements, container) => {
  12558. for (const element of elements) if (!isHidden(element, container)) return element;
  12559. };
  12560. var isHidden = (element, container) => {
  12561. if (getComputedStyle(element).visibility === "hidden") return true;
  12562. while (element) {
  12563. if (container && element === container) return false;
  12564. if (getComputedStyle(element).display === "none") return true;
  12565. element = element.parentElement;
  12566. }
  12567. return false;
  12568. };
  12569. var getEdges = (container) => {
  12570. const focusable = obtainAllFocusableElements(container);
  12571. return [getVisibleElement(focusable, container), getVisibleElement(focusable.reverse(), container)];
  12572. };
  12573. var isSelectable = (element) => {
  12574. return element instanceof HTMLInputElement && "select" in element;
  12575. };
  12576. var tryFocus = (element, shouldSelect) => {
  12577. if (element) {
  12578. const prevFocusedElement = document.activeElement;
  12579. focusElement(element, { preventScroll: true });
  12580. lastAutomatedFocusTimestamp.value = window.performance.now();
  12581. if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) element.select();
  12582. }
  12583. };
  12584. function removeFromStack(list, item) {
  12585. const copy = [...list];
  12586. const idx = list.indexOf(item);
  12587. if (idx !== -1) copy.splice(idx, 1);
  12588. return copy;
  12589. }
  12590. var createFocusableStack = () => {
  12591. let stack = [];
  12592. const push = (layer) => {
  12593. const currentLayer = stack[0];
  12594. if (currentLayer && layer !== currentLayer) currentLayer.pause();
  12595. stack = removeFromStack(stack, layer);
  12596. stack.unshift(layer);
  12597. };
  12598. const remove = (layer) => {
  12599. stack = removeFromStack(stack, layer);
  12600. stack[0]?.resume?.();
  12601. };
  12602. return {
  12603. push,
  12604. remove
  12605. };
  12606. };
  12607. var focusFirstDescendant = (elements, shouldSelect = false) => {
  12608. const prevFocusedElement = document.activeElement;
  12609. for (const element of elements) {
  12610. tryFocus(element, shouldSelect);
  12611. if (document.activeElement !== prevFocusedElement) return;
  12612. }
  12613. };
  12614. var focusableStack = createFocusableStack();
  12615. var isFocusCausedByUserEvent = () => {
  12616. return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
  12617. };
  12618. var notifyFocusReasonPointer = () => {
  12619. focusReason.value = "pointer";
  12620. lastUserFocusTimestamp.value = window.performance.now();
  12621. };
  12622. var notifyFocusReasonKeydown = () => {
  12623. focusReason.value = "keyboard";
  12624. lastUserFocusTimestamp.value = window.performance.now();
  12625. };
  12626. var useFocusReason = () => {
  12627. onMounted(() => {
  12628. if (focusReasonUserCount === 0) {
  12629. document.addEventListener("mousedown", notifyFocusReasonPointer);
  12630. document.addEventListener("touchstart", notifyFocusReasonPointer);
  12631. document.addEventListener("keydown", notifyFocusReasonKeydown);
  12632. }
  12633. focusReasonUserCount++;
  12634. });
  12635. onBeforeUnmount(() => {
  12636. focusReasonUserCount--;
  12637. if (focusReasonUserCount <= 0) {
  12638. document.removeEventListener("mousedown", notifyFocusReasonPointer);
  12639. document.removeEventListener("touchstart", notifyFocusReasonPointer);
  12640. document.removeEventListener("keydown", notifyFocusReasonKeydown);
  12641. }
  12642. });
  12643. return {
  12644. focusReason,
  12645. lastUserFocusTimestamp,
  12646. lastAutomatedFocusTimestamp
  12647. };
  12648. };
  12649. var createFocusOutPreventedEvent = (detail) => {
  12650. return new CustomEvent(FOCUSOUT_PREVENTED, {
  12651. ...FOCUSOUT_PREVENTED_OPTS,
  12652. detail
  12653. });
  12654. };
  12655. //#endregion
  12656. //#region node_modules/element-plus/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs
  12657. var focus_trap_vue_vue_type_script_lang_default = defineComponent({
  12658. name: "ElFocusTrap",
  12659. inheritAttrs: false,
  12660. props: {
  12661. loop: Boolean,
  12662. trapped: Boolean,
  12663. focusTrapEl: Object,
  12664. focusStartEl: {
  12665. type: [Object, String],
  12666. default: "first"
  12667. }
  12668. },
  12669. emits: [
  12670. ON_TRAP_FOCUS_EVT,
  12671. ON_RELEASE_FOCUS_EVT,
  12672. "focusin",
  12673. "focusout",
  12674. "focusout-prevented",
  12675. "release-requested"
  12676. ],
  12677. setup(props, { emit }) {
  12678. const forwardRef = ref();
  12679. let lastFocusBeforeTrapped;
  12680. let lastFocusAfterTrapped;
  12681. const { focusReason } = useFocusReason();
  12682. useEscapeKeydown((event) => {
  12683. if (props.trapped && !focusLayer.paused) emit("release-requested", event);
  12684. });
  12685. const focusLayer = {
  12686. paused: false,
  12687. pause() {
  12688. this.paused = true;
  12689. },
  12690. resume() {
  12691. this.paused = false;
  12692. }
  12693. };
  12694. const onKeydown = (e) => {
  12695. if (!props.loop && !props.trapped) return;
  12696. if (focusLayer.paused) return;
  12697. const { altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
  12698. const { loop } = props;
  12699. const isTabbing = getEventCode(e) === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
  12700. const currentFocusingEl = document.activeElement;
  12701. if (isTabbing && currentFocusingEl) {
  12702. const container = currentTarget;
  12703. const [first, last] = getEdges(container);
  12704. if (!(first && last)) {
  12705. if (currentFocusingEl === container) {
  12706. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  12707. emit("focusout-prevented", focusoutPreventedEvent);
  12708. if (!focusoutPreventedEvent.defaultPrevented) e.preventDefault();
  12709. }
  12710. } else if (!shiftKey && currentFocusingEl === last) {
  12711. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  12712. emit("focusout-prevented", focusoutPreventedEvent);
  12713. if (!focusoutPreventedEvent.defaultPrevented) {
  12714. e.preventDefault();
  12715. if (loop) tryFocus(first, true);
  12716. }
  12717. } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
  12718. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  12719. emit("focusout-prevented", focusoutPreventedEvent);
  12720. if (!focusoutPreventedEvent.defaultPrevented) {
  12721. e.preventDefault();
  12722. if (loop) tryFocus(last, true);
  12723. }
  12724. }
  12725. }
  12726. };
  12727. provide(FOCUS_TRAP_INJECTION_KEY, {
  12728. focusTrapRef: forwardRef,
  12729. onKeydown
  12730. });
  12731. watch(() => props.focusTrapEl, (focusTrapEl) => {
  12732. if (focusTrapEl) forwardRef.value = focusTrapEl;
  12733. }, { immediate: true });
  12734. watch([forwardRef], ([forwardRef], [oldForwardRef]) => {
  12735. if (forwardRef) {
  12736. forwardRef.addEventListener("keydown", onKeydown);
  12737. forwardRef.addEventListener("focusin", onFocusIn);
  12738. forwardRef.addEventListener("focusout", onFocusOut);
  12739. }
  12740. if (oldForwardRef) {
  12741. oldForwardRef.removeEventListener("keydown", onKeydown);
  12742. oldForwardRef.removeEventListener("focusin", onFocusIn);
  12743. oldForwardRef.removeEventListener("focusout", onFocusOut);
  12744. }
  12745. });
  12746. const trapOnFocus = (e) => {
  12747. emit(ON_TRAP_FOCUS_EVT, e);
  12748. };
  12749. const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
  12750. const onFocusIn = (e) => {
  12751. const trapContainer = unref(forwardRef);
  12752. if (!trapContainer) return;
  12753. const target = e.target;
  12754. const relatedTarget = e.relatedTarget;
  12755. const isFocusedInTrap = target && trapContainer.contains(target);
  12756. if (!props.trapped) {
  12757. if (!(relatedTarget && trapContainer.contains(relatedTarget))) lastFocusBeforeTrapped = relatedTarget;
  12758. }
  12759. if (isFocusedInTrap) emit("focusin", e);
  12760. if (focusLayer.paused) return;
  12761. if (props.trapped) if (isFocusedInTrap) lastFocusAfterTrapped = target;
  12762. else tryFocus(lastFocusAfterTrapped, true);
  12763. };
  12764. const onFocusOut = (e) => {
  12765. const trapContainer = unref(forwardRef);
  12766. if (focusLayer.paused || !trapContainer) return;
  12767. if (props.trapped) {
  12768. const relatedTarget = e.relatedTarget;
  12769. if (!isNil(relatedTarget) && !trapContainer.contains(relatedTarget)) setTimeout(() => {
  12770. if (!focusLayer.paused && props.trapped) {
  12771. const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
  12772. emit("focusout-prevented", focusoutPreventedEvent);
  12773. if (!focusoutPreventedEvent.defaultPrevented) tryFocus(lastFocusAfterTrapped, true);
  12774. }
  12775. }, 0);
  12776. } else {
  12777. const target = e.target;
  12778. if (!(target && trapContainer.contains(target))) emit("focusout", e);
  12779. }
  12780. };
  12781. async function startTrap() {
  12782. await nextTick();
  12783. const trapContainer = unref(forwardRef);
  12784. if (trapContainer) {
  12785. focusableStack.push(focusLayer);
  12786. const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
  12787. lastFocusBeforeTrapped = prevFocusedElement;
  12788. if (!trapContainer.contains(prevFocusedElement)) {
  12789. const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
  12790. trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
  12791. trapContainer.dispatchEvent(focusEvent);
  12792. if (!focusEvent.defaultPrevented) nextTick(() => {
  12793. let focusStartEl = props.focusStartEl;
  12794. if (!isString(focusStartEl)) {
  12795. tryFocus(focusStartEl);
  12796. if (document.activeElement !== focusStartEl) focusStartEl = "first";
  12797. }
  12798. if (focusStartEl === "first") focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
  12799. if (document.activeElement === prevFocusedElement || focusStartEl === "container") tryFocus(trapContainer);
  12800. });
  12801. }
  12802. }
  12803. }
  12804. function stopTrap() {
  12805. const trapContainer = unref(forwardRef);
  12806. if (trapContainer) {
  12807. trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
  12808. const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
  12809. ...FOCUS_AFTER_TRAPPED_OPTS,
  12810. detail: { focusReason: focusReason.value }
  12811. });
  12812. trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
  12813. trapContainer.dispatchEvent(releasedEvent);
  12814. if (!releasedEvent.defaultPrevented && (focusReason.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) tryFocus(lastFocusBeforeTrapped ?? document.body);
  12815. trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
  12816. focusableStack.remove(focusLayer);
  12817. lastFocusBeforeTrapped = null;
  12818. lastFocusAfterTrapped = null;
  12819. }
  12820. }
  12821. onMounted(() => {
  12822. if (props.trapped) startTrap();
  12823. watch(() => props.trapped, (trapped) => {
  12824. if (trapped) startTrap();
  12825. else stopTrap();
  12826. });
  12827. });
  12828. onBeforeUnmount(() => {
  12829. if (props.trapped) stopTrap();
  12830. if (forwardRef.value) {
  12831. forwardRef.value.removeEventListener("keydown", onKeydown);
  12832. forwardRef.value.removeEventListener("focusin", onFocusIn);
  12833. forwardRef.value.removeEventListener("focusout", onFocusOut);
  12834. forwardRef.value = void 0;
  12835. }
  12836. lastFocusBeforeTrapped = null;
  12837. lastFocusAfterTrapped = null;
  12838. });
  12839. return { onKeydown };
  12840. }
  12841. });
  12842. //#endregion
  12843. //#region node_modules/element-plus/es/_virtual/_plugin-vue_export-helper.mjs
  12844. var _plugin_vue_export_helper_default = (sfc, props) => {
  12845. const target = sfc.__vccOpts || sfc;
  12846. for (const [key, val] of props) target[key] = val;
  12847. return target;
  12848. };
  12849. //#endregion
  12850. //#region node_modules/element-plus/es/components/focus-trap/src/focus-trap.mjs
  12851. function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
  12852. return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
  12853. }
  12854. //#endregion
  12855. //#region node_modules/element-plus/es/components/focus-trap/index.mjs
  12856. var focus_trap_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(focus_trap_vue_vue_type_script_lang_default, [["render", _sfc_render$20]]);
  12857. //#endregion
  12858. //#region node_modules/element-plus/es/components/popper/src/utils.mjs
  12859. var buildPopperOptions = (props, modifiers = []) => {
  12860. const { placement, strategy, popperOptions } = props;
  12861. const options = {
  12862. placement,
  12863. strategy,
  12864. ...popperOptions,
  12865. modifiers: [...genModifiers(props), ...modifiers]
  12866. };
  12867. deriveExtraModifiers(options, popperOptions?.modifiers);
  12868. return options;
  12869. };
  12870. var unwrapMeasurableEl = ($el) => {
  12871. if (!isClient) return;
  12872. return unrefElement($el);
  12873. };
  12874. function genModifiers(options) {
  12875. const { offset, gpuAcceleration, fallbackPlacements } = options;
  12876. return [
  12877. {
  12878. name: "offset",
  12879. options: { offset: [0, offset ?? 12] }
  12880. },
  12881. {
  12882. name: "preventOverflow",
  12883. options: { padding: {
  12884. top: 0,
  12885. bottom: 0,
  12886. left: 0,
  12887. right: 0
  12888. } }
  12889. },
  12890. {
  12891. name: "flip",
  12892. options: {
  12893. padding: 5,
  12894. fallbackPlacements
  12895. }
  12896. },
  12897. {
  12898. name: "computeStyles",
  12899. options: { gpuAcceleration }
  12900. }
  12901. ];
  12902. }
  12903. function deriveExtraModifiers(options, modifiers) {
  12904. if (modifiers) options.modifiers = [...options.modifiers, ...modifiers ?? []];
  12905. }
  12906. //#endregion
  12907. //#region node_modules/element-plus/es/components/popper/src/composables/use-content.mjs
  12908. var DEFAULT_ARROW_OFFSET = 0;
  12909. var usePopperContent = (props) => {
  12910. const { popperInstanceRef, contentRef, triggerRef, role } = inject(POPPER_INJECTION_KEY, void 0);
  12911. const arrowRef = ref();
  12912. const arrowOffset = computed(() => props.arrowOffset);
  12913. const eventListenerModifier = computed(() => {
  12914. return {
  12915. name: "eventListeners",
  12916. enabled: !!props.visible
  12917. };
  12918. });
  12919. const arrowModifier = computed(() => {
  12920. const arrowEl = unref(arrowRef);
  12921. const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET;
  12922. return {
  12923. name: "arrow",
  12924. enabled: !isUndefined$1(arrowEl),
  12925. options: {
  12926. element: arrowEl,
  12927. padding: offset
  12928. }
  12929. };
  12930. });
  12931. const options = computed(() => {
  12932. return {
  12933. onFirstUpdate: () => {
  12934. update();
  12935. },
  12936. ...buildPopperOptions(props, [unref(arrowModifier), unref(eventListenerModifier)])
  12937. };
  12938. });
  12939. const computedReference = computed(() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef));
  12940. const { attributes, state, styles, update, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options);
  12941. watch(instanceRef, (instance) => popperInstanceRef.value = instance, { flush: "sync" });
  12942. onMounted(() => {
  12943. watch(() => unref(computedReference)?.getBoundingClientRect?.(), () => {
  12944. update();
  12945. });
  12946. });
  12947. let stopResizeObserver;
  12948. watch(() => props.visible, (visible) => {
  12949. stopResizeObserver?.();
  12950. stopResizeObserver = void 0;
  12951. if (visible) stopResizeObserver = useResizeObserver(contentRef, update).stop;
  12952. });
  12953. onBeforeUnmount(() => {
  12954. popperInstanceRef.value = void 0;
  12955. stopResizeObserver?.();
  12956. stopResizeObserver = void 0;
  12957. });
  12958. return {
  12959. attributes,
  12960. arrowRef,
  12961. contentRef,
  12962. instanceRef,
  12963. state,
  12964. styles,
  12965. role,
  12966. forceUpdate,
  12967. update
  12968. };
  12969. };
  12970. //#endregion
  12971. //#region node_modules/element-plus/es/components/popper/src/composables/use-content-dom.mjs
  12972. var usePopperContentDOM = (props, { attributes, styles, role }) => {
  12973. const { nextZIndex } = useZIndex();
  12974. const ns = useNamespace("popper");
  12975. const contentAttrs = computed(() => unref(attributes).popper);
  12976. const contentZIndex = ref(isNumber(props.zIndex) ? props.zIndex : nextZIndex());
  12977. const contentClass = computed(() => [
  12978. ns.b(),
  12979. ns.is("pure", props.pure),
  12980. ns.is(props.effect),
  12981. props.popperClass
  12982. ]);
  12983. const contentStyle = computed(() => {
  12984. return [
  12985. { zIndex: unref(contentZIndex) },
  12986. unref(styles).popper,
  12987. props.popperStyle || {}
  12988. ];
  12989. });
  12990. const ariaModal = computed(() => role.value === "dialog" ? "false" : void 0);
  12991. const arrowStyle = computed(() => unref(styles).arrow || {});
  12992. const updateZIndex = () => {
  12993. contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex();
  12994. };
  12995. return {
  12996. ariaModal,
  12997. arrowStyle,
  12998. contentAttrs,
  12999. contentClass,
  13000. contentStyle,
  13001. contentZIndex,
  13002. updateZIndex
  13003. };
  13004. };
  13005. //#endregion
  13006. //#region node_modules/element-plus/es/components/popper/src/composables/use-focus-trap.mjs
  13007. var usePopperContentFocusTrap = (props, emit) => {
  13008. const trapped = ref(false);
  13009. const focusStartRef = ref();
  13010. const onFocusAfterTrapped = () => {
  13011. emit("focus");
  13012. };
  13013. const onFocusAfterReleased = (event) => {
  13014. if (event.detail?.focusReason !== "pointer") {
  13015. focusStartRef.value = "first";
  13016. emit("blur");
  13017. }
  13018. };
  13019. const onFocusInTrap = (event) => {
  13020. if (props.visible && !trapped.value) {
  13021. if (event.target) focusStartRef.value = event.target;
  13022. trapped.value = true;
  13023. }
  13024. };
  13025. const onFocusoutPrevented = (event) => {
  13026. if (!props.trapping) {
  13027. if (event.detail.focusReason === "pointer") event.preventDefault();
  13028. trapped.value = false;
  13029. }
  13030. };
  13031. const onReleaseRequested = () => {
  13032. trapped.value = false;
  13033. emit("close");
  13034. };
  13035. onBeforeUnmount(() => {
  13036. focusStartRef.value = void 0;
  13037. });
  13038. return {
  13039. focusStartRef,
  13040. trapped,
  13041. onFocusAfterReleased,
  13042. onFocusAfterTrapped,
  13043. onFocusInTrap,
  13044. onFocusoutPrevented,
  13045. onReleaseRequested
  13046. };
  13047. };
  13048. //#endregion
  13049. //#region node_modules/element-plus/es/components/popper/src/content2.mjs
  13050. var content_default = /* @__PURE__ */ defineComponent({
  13051. name: "ElPopperContent",
  13052. __name: "content",
  13053. props: popperContentProps,
  13054. emits: popperContentEmits,
  13055. setup(__props, { expose: __expose, emit: __emit }) {
  13056. const emit = __emit;
  13057. const props = __props;
  13058. const { focusStartRef, trapped, onFocusAfterReleased, onFocusAfterTrapped, onFocusInTrap, onFocusoutPrevented, onReleaseRequested } = usePopperContentFocusTrap(props, emit);
  13059. const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
  13060. const { ariaModal, arrowStyle, contentAttrs, contentClass, contentStyle, updateZIndex } = usePopperContentDOM(props, {
  13061. styles,
  13062. attributes,
  13063. role
  13064. });
  13065. const formItemContext = inject(formItemContextKey, void 0);
  13066. provide(POPPER_CONTENT_INJECTION_KEY, {
  13067. arrowStyle,
  13068. arrowRef
  13069. });
  13070. if (formItemContext) provide(formItemContextKey, {
  13071. ...formItemContext,
  13072. addInputId: NOOP,
  13073. removeInputId: NOOP
  13074. });
  13075. let triggerTargetAriaStopWatch = void 0;
  13076. const updatePopper = (shouldUpdateZIndex = true) => {
  13077. update();
  13078. shouldUpdateZIndex && updateZIndex();
  13079. };
  13080. const togglePopperAlive = () => {
  13081. updatePopper(false);
  13082. if (props.visible && props.focusOnShow) trapped.value = true;
  13083. else if (props.visible === false) trapped.value = false;
  13084. };
  13085. onMounted(() => {
  13086. watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
  13087. triggerTargetAriaStopWatch?.();
  13088. triggerTargetAriaStopWatch = void 0;
  13089. const el = unref(triggerTargetEl || contentRef.value);
  13090. const prevEl = unref(prevTriggerTargetEl || contentRef.value);
  13091. if (isElement$1(el)) triggerTargetAriaStopWatch = watch([
  13092. role,
  13093. () => props.ariaLabel,
  13094. ariaModal,
  13095. () => props.id
  13096. ], (watches) => {
  13097. [
  13098. "role",
  13099. "aria-label",
  13100. "aria-modal",
  13101. "id"
  13102. ].forEach((key, idx) => {
  13103. isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
  13104. });
  13105. }, { immediate: true });
  13106. if (prevEl !== el && isElement$1(prevEl)) [
  13107. "role",
  13108. "aria-label",
  13109. "aria-modal",
  13110. "id"
  13111. ].forEach((key) => {
  13112. prevEl.removeAttribute(key);
  13113. });
  13114. }, { immediate: true });
  13115. watch(() => props.visible, togglePopperAlive, { immediate: true });
  13116. });
  13117. onBeforeUnmount(() => {
  13118. triggerTargetAriaStopWatch?.();
  13119. triggerTargetAriaStopWatch = void 0;
  13120. contentRef.value = void 0;
  13121. });
  13122. __expose({
  13123. /**
  13124. * @description popper content element
  13125. */
  13126. popperContentRef: contentRef,
  13127. /**
  13128. * @description popperjs instance
  13129. */
  13130. popperInstanceRef: instanceRef,
  13131. /**
  13132. * @description method for updating popper
  13133. */
  13134. updatePopper,
  13135. /**
  13136. * @description content style
  13137. */
  13138. contentStyle
  13139. });
  13140. return (_ctx, _cache) => {
  13141. return openBlock(), createElementBlock("div", mergeProps({
  13142. ref_key: "contentRef",
  13143. ref: contentRef
  13144. }, unref(contentAttrs), {
  13145. style: unref(contentStyle),
  13146. class: unref(contentClass),
  13147. tabindex: "-1",
  13148. onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
  13149. onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
  13150. }), [createVNode(unref(focus_trap_default$1), {
  13151. loop: __props.loop,
  13152. trapped: unref(trapped),
  13153. "trap-on-focus-in": true,
  13154. "focus-trap-el": unref(contentRef),
  13155. "focus-start-el": unref(focusStartRef),
  13156. onFocusAfterTrapped: unref(onFocusAfterTrapped),
  13157. onFocusAfterReleased: unref(onFocusAfterReleased),
  13158. onFocusin: unref(onFocusInTrap),
  13159. onFocusoutPrevented: unref(onFocusoutPrevented),
  13160. onReleaseRequested: unref(onReleaseRequested)
  13161. }, {
  13162. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  13163. _: 3
  13164. }, 8, [
  13165. "loop",
  13166. "trapped",
  13167. "focus-trap-el",
  13168. "focus-start-el",
  13169. "onFocusAfterTrapped",
  13170. "onFocusAfterReleased",
  13171. "onFocusin",
  13172. "onFocusoutPrevented",
  13173. "onReleaseRequested"
  13174. ])], 16);
  13175. };
  13176. }
  13177. });
  13178. //#endregion
  13179. //#region node_modules/element-plus/es/components/popper/index.mjs
  13180. var ElPopper = withInstall(/* @__PURE__ */ defineComponent({
  13181. name: "ElPopper",
  13182. inheritAttrs: false,
  13183. __name: "popper",
  13184. props: popperProps,
  13185. setup(__props, { expose: __expose }) {
  13186. const props = __props;
  13187. const popperProvides = {
  13188. /**
  13189. * @description trigger element
  13190. */
  13191. triggerRef: ref(),
  13192. /**
  13193. * @description popperjs instance
  13194. */
  13195. popperInstanceRef: ref(),
  13196. /**
  13197. * @description popper content element
  13198. */
  13199. contentRef: ref(),
  13200. /**
  13201. * @description popper reference element
  13202. */
  13203. referenceRef: ref(),
  13204. /**
  13205. * @description role determines how aria attributes are distributed
  13206. */
  13207. role: computed(() => props.role)
  13208. };
  13209. __expose(popperProvides);
  13210. provide(POPPER_INJECTION_KEY, popperProvides);
  13211. return (_ctx, _cache) => {
  13212. return renderSlot(_ctx.$slots, "default");
  13213. };
  13214. }
  13215. }));
  13216. //#endregion
  13217. //#region node_modules/element-plus/es/components/tooltip/src/content.mjs
  13218. var useTooltipContentPropsDefaults = {
  13219. ...useDelayedTogglePropsDefaults,
  13220. ...popperContentPropsDefaults,
  13221. content: "",
  13222. visible: null,
  13223. teleported: true
  13224. };
  13225. /**
  13226. * @deprecated Removed after 3.0.0, Use `ElTooltipContentProps` instead.
  13227. */
  13228. var useTooltipContentProps = buildProps({
  13229. ...useDelayedToggleProps,
  13230. ...popperContentProps,
  13231. /**
  13232. * @description which element the tooltip CONTENT appends to
  13233. */
  13234. appendTo: { type: definePropType([String, Object]) },
  13235. /**
  13236. * @description display content, can be overridden by `slot#content`
  13237. */
  13238. content: {
  13239. type: String,
  13240. default: ""
  13241. },
  13242. /**
  13243. * @description whether `content` is treated as HTML string
  13244. */
  13245. rawContent: Boolean,
  13246. /**
  13247. * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed
  13248. */
  13249. persistent: Boolean,
  13250. /**
  13251. * @description visibility of Tooltip
  13252. */
  13253. visible: {
  13254. type: definePropType(Boolean),
  13255. default: null
  13256. },
  13257. /**
  13258. * @description animation name
  13259. */
  13260. transition: String,
  13261. /**
  13262. * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets
  13263. */
  13264. teleported: {
  13265. type: Boolean,
  13266. default: true
  13267. },
  13268. /**
  13269. * @description whether Tooltip is disabled
  13270. */
  13271. disabled: Boolean,
  13272. ...useAriaProps(["ariaLabel"])
  13273. });
  13274. //#endregion
  13275. //#region node_modules/element-plus/es/components/tooltip/src/trigger.mjs
  13276. var useTooltipTriggerPropsDefaults = {
  13277. trigger: "hover",
  13278. triggerKeys: () => [
  13279. EVENT_CODE.enter,
  13280. EVENT_CODE.numpadEnter,
  13281. EVENT_CODE.space
  13282. ]
  13283. };
  13284. /**
  13285. * @deprecated Removed after 3.0.0, Use `UseTooltipTriggerProps` instead.
  13286. */
  13287. var useTooltipTriggerProps = buildProps({
  13288. ...popperTriggerProps,
  13289. /**
  13290. * @description whether Tooltip is disabled
  13291. */
  13292. disabled: Boolean,
  13293. /**
  13294. * @description How should the tooltip be triggered (to show), not valid in controlled mode
  13295. */
  13296. trigger: {
  13297. type: definePropType([String, Array]),
  13298. default: "hover"
  13299. },
  13300. /**
  13301. * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard, not valid in controlled mode
  13302. */
  13303. triggerKeys: {
  13304. type: definePropType(Array),
  13305. default: () => [
  13306. EVENT_CODE.enter,
  13307. EVENT_CODE.numpadEnter,
  13308. EVENT_CODE.space
  13309. ]
  13310. },
  13311. /**
  13312. * @description when triggering tooltips through hover, whether to focus the trigger element, which improves accessibility
  13313. */
  13314. focusOnTarget: Boolean
  13315. });
  13316. //#endregion
  13317. //#region node_modules/element-plus/es/components/tooltip/src/tooltip.mjs
  13318. var { useModelToggleProps: useTooltipModelToggleProps, useModelToggleEmits: useTooltipModelToggleEmits, useModelToggle: useTooltipModelToggle } = createModelToggleComposable("visible");
  13319. /**
  13320. * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.
  13321. */
  13322. var useTooltipProps = buildProps({
  13323. ...popperProps,
  13324. ...useTooltipModelToggleProps,
  13325. ...useTooltipContentProps,
  13326. ...useTooltipTriggerProps,
  13327. ...popperArrowProps,
  13328. /**
  13329. * @description whether the tooltip content has an arrow
  13330. */
  13331. showArrow: {
  13332. type: Boolean,
  13333. default: true
  13334. }
  13335. });
  13336. var tooltipEmits = [
  13337. ...useTooltipModelToggleEmits,
  13338. "before-show",
  13339. "before-hide",
  13340. "show",
  13341. "hide",
  13342. "open",
  13343. "close"
  13344. ];
  13345. //#endregion
  13346. //#region node_modules/element-plus/es/components/tooltip/src/constants.mjs
  13347. var TOOLTIP_INJECTION_KEY = Symbol("elTooltip");
  13348. //#endregion
  13349. //#region node_modules/element-plus/es/components/tooltip/src/utils.mjs
  13350. var isTriggerType = (trigger, type) => {
  13351. if (isArray$1(trigger)) return trigger.includes(type);
  13352. return trigger === type;
  13353. };
  13354. var whenTrigger = (trigger, type, handler) => {
  13355. return (e) => {
  13356. isTriggerType(unref(trigger), type) && handler(e);
  13357. };
  13358. };
  13359. //#endregion
  13360. //#region node_modules/element-plus/es/components/tooltip/src/trigger2.mjs
  13361. var trigger_default$1 = /* @__PURE__ */ defineComponent({
  13362. name: "ElTooltipTrigger",
  13363. __name: "trigger",
  13364. props: useTooltipTriggerProps,
  13365. setup(__props, { expose: __expose }) {
  13366. const props = __props;
  13367. const ns = useNamespace("tooltip");
  13368. const { controlled, id, open, onOpen, onClose, onToggle } = inject(TOOLTIP_INJECTION_KEY, void 0);
  13369. const triggerRef = ref(null);
  13370. const stopWhenControlledOrDisabled = () => {
  13371. if (unref(controlled) || props.disabled) return true;
  13372. };
  13373. const trigger = toRef(props, "trigger");
  13374. const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", (e) => {
  13375. onOpen(e);
  13376. if (props.focusOnTarget && e.target) nextTick(() => {
  13377. focusElement(e.target, { preventScroll: true });
  13378. });
  13379. }));
  13380. const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
  13381. const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
  13382. if (e.button === 0) onToggle(e);
  13383. }));
  13384. const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
  13385. const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
  13386. const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
  13387. e.preventDefault();
  13388. onToggle(e);
  13389. }));
  13390. const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
  13391. const code = getEventCode(e);
  13392. if (props.triggerKeys.includes(code)) {
  13393. e.preventDefault();
  13394. onToggle(e);
  13395. }
  13396. });
  13397. __expose({
  13398. /**
  13399. * @description trigger element
  13400. */
  13401. triggerRef });
  13402. return (_ctx, _cache) => {
  13403. return openBlock(), createBlock(unref(trigger_default), {
  13404. id: unref(id),
  13405. "virtual-ref": __props.virtualRef,
  13406. open: unref(open),
  13407. "virtual-triggering": __props.virtualTriggering,
  13408. class: normalizeClass(unref(ns).e("trigger")),
  13409. onBlur: unref(onBlur),
  13410. onClick: unref(onClick),
  13411. onContextmenu: unref(onContextMenu),
  13412. onFocus: unref(onFocus),
  13413. onMouseenter: unref(onMouseenter),
  13414. onMouseleave: unref(onMouseleave),
  13415. onKeydown: unref(onKeydown)
  13416. }, {
  13417. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  13418. _: 3
  13419. }, 8, [
  13420. "id",
  13421. "virtual-ref",
  13422. "open",
  13423. "virtual-triggering",
  13424. "class",
  13425. "onBlur",
  13426. "onClick",
  13427. "onContextmenu",
  13428. "onFocus",
  13429. "onMouseenter",
  13430. "onMouseleave",
  13431. "onKeydown"
  13432. ]);
  13433. };
  13434. }
  13435. });
  13436. //#endregion
  13437. //#region node_modules/element-plus/es/components/tooltip/src/content2.mjs
  13438. var content_default$2 = /* @__PURE__ */ defineComponent({
  13439. name: "ElTooltipContent",
  13440. inheritAttrs: false,
  13441. __name: "content",
  13442. props: useTooltipContentProps,
  13443. setup(__props, { expose: __expose }) {
  13444. const props = __props;
  13445. const { selector } = usePopperContainerId();
  13446. const ns = useNamespace("tooltip");
  13447. const contentRef = ref();
  13448. const popperContentRef = computedEager(() => contentRef.value?.popperContentRef);
  13449. let stopHandle;
  13450. const { controlled, id, open, trigger, onClose, onOpen, onShow, onHide, onBeforeShow, onBeforeHide } = inject(TOOLTIP_INJECTION_KEY, void 0);
  13451. const transitionClass = computed(() => {
  13452. return props.transition || `${ns.namespace.value}-fade-in-linear`;
  13453. });
  13454. const persistentRef = computed(() => {
  13455. return props.persistent;
  13456. });
  13457. onBeforeUnmount(() => {
  13458. stopHandle?.();
  13459. });
  13460. const shouldRender = computed(() => {
  13461. return unref(persistentRef) ? true : unref(open);
  13462. });
  13463. const shouldShow = computed(() => {
  13464. return props.disabled ? false : unref(open);
  13465. });
  13466. const appendTo = computed(() => {
  13467. return props.appendTo || selector.value;
  13468. });
  13469. const contentStyle = computed(() => props.style ?? {});
  13470. const ariaHidden = ref(true);
  13471. const onTransitionLeave = () => {
  13472. onHide();
  13473. isFocusInsideContent() && focusElement(document.body, { preventScroll: true });
  13474. ariaHidden.value = true;
  13475. };
  13476. const stopWhenControlled = () => {
  13477. if (unref(controlled)) return true;
  13478. };
  13479. const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
  13480. if (props.enterable && isTriggerType(unref(trigger), "hover")) onOpen();
  13481. });
  13482. const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
  13483. if (isTriggerType(unref(trigger), "hover")) onClose();
  13484. });
  13485. const onBeforeEnter = () => {
  13486. contentRef.value?.updatePopper?.();
  13487. onBeforeShow?.();
  13488. };
  13489. const onBeforeLeave = () => {
  13490. onBeforeHide?.();
  13491. };
  13492. const onAfterShow = () => {
  13493. onShow();
  13494. };
  13495. const onBlur = () => {
  13496. if (!props.virtualTriggering) onClose();
  13497. };
  13498. const isFocusInsideContent = (event) => {
  13499. const popperContent = contentRef.value?.popperContentRef;
  13500. const activeElement = event?.relatedTarget || document.activeElement;
  13501. return popperContent?.contains(activeElement);
  13502. };
  13503. watch(() => unref(open), (val) => {
  13504. if (!val) stopHandle?.();
  13505. else {
  13506. ariaHidden.value = false;
  13507. stopHandle = onClickOutside(popperContentRef, () => {
  13508. if (unref(controlled)) return;
  13509. if (castArray(unref(trigger)).every((item) => {
  13510. return item !== "hover" && item !== "focus";
  13511. })) onClose();
  13512. }, { detectIframe: true });
  13513. }
  13514. }, { flush: "post" });
  13515. __expose({
  13516. /**
  13517. * @description el-popper-content component instance
  13518. */
  13519. contentRef,
  13520. /**
  13521. * @description validate current focus event is trigger inside el-popper-content
  13522. */
  13523. isFocusInsideContent
  13524. });
  13525. return (_ctx, _cache) => {
  13526. return openBlock(), createBlock(Teleport, {
  13527. disabled: !__props.teleported,
  13528. to: appendTo.value
  13529. }, [shouldRender.value || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
  13530. key: 0,
  13531. name: transitionClass.value,
  13532. appear: !persistentRef.value,
  13533. onAfterLeave: onTransitionLeave,
  13534. onBeforeEnter,
  13535. onAfterEnter: onAfterShow,
  13536. onBeforeLeave,
  13537. persisted: ""
  13538. }, {
  13539. default: withCtx(() => [withDirectives(createVNode(unref(content_default), mergeProps({
  13540. id: unref(id),
  13541. ref_key: "contentRef",
  13542. ref: contentRef
  13543. }, _ctx.$attrs, {
  13544. "aria-label": __props.ariaLabel,
  13545. "aria-hidden": ariaHidden.value,
  13546. "boundaries-padding": __props.boundariesPadding,
  13547. "fallback-placements": __props.fallbackPlacements,
  13548. "gpu-acceleration": __props.gpuAcceleration,
  13549. offset: __props.offset,
  13550. placement: __props.placement,
  13551. "popper-options": __props.popperOptions,
  13552. "arrow-offset": __props.arrowOffset,
  13553. strategy: __props.strategy,
  13554. effect: __props.effect,
  13555. enterable: __props.enterable,
  13556. pure: __props.pure,
  13557. "popper-class": __props.popperClass,
  13558. "popper-style": [__props.popperStyle, contentStyle.value],
  13559. "reference-el": __props.referenceEl,
  13560. "trigger-target-el": __props.triggerTargetEl,
  13561. visible: shouldShow.value,
  13562. "z-index": __props.zIndex,
  13563. loop: __props.loop,
  13564. onMouseenter: unref(onContentEnter),
  13565. onMouseleave: unref(onContentLeave),
  13566. onBlur,
  13567. onClose: unref(onClose)
  13568. }), {
  13569. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  13570. _: 3
  13571. }, 16, [
  13572. "id",
  13573. "aria-label",
  13574. "aria-hidden",
  13575. "boundaries-padding",
  13576. "fallback-placements",
  13577. "gpu-acceleration",
  13578. "offset",
  13579. "placement",
  13580. "popper-options",
  13581. "arrow-offset",
  13582. "strategy",
  13583. "effect",
  13584. "enterable",
  13585. "pure",
  13586. "popper-class",
  13587. "popper-style",
  13588. "reference-el",
  13589. "trigger-target-el",
  13590. "visible",
  13591. "z-index",
  13592. "loop",
  13593. "onMouseenter",
  13594. "onMouseleave",
  13595. "onClose"
  13596. ]), [[vShow, shouldShow.value]])]),
  13597. _: 3
  13598. }, 8, ["name", "appear"])) : createCommentVNode("v-if", true)], 8, ["disabled", "to"]);
  13599. };
  13600. }
  13601. });
  13602. //#endregion
  13603. //#region node_modules/element-plus/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs
  13604. var _hoisted_1$78 = ["innerHTML"];
  13605. var _hoisted_2$44 = { key: 1 };
  13606. //#endregion
  13607. //#region node_modules/element-plus/es/components/tooltip/index.mjs
  13608. var ElTooltip = withInstall(/* @__PURE__ */ defineComponent({
  13609. name: "ElTooltip",
  13610. __name: "tooltip",
  13611. props: useTooltipProps,
  13612. emits: tooltipEmits,
  13613. setup(__props, { expose: __expose, emit: __emit }) {
  13614. const props = __props;
  13615. const emit = __emit;
  13616. usePopperContainer();
  13617. const ns = useNamespace("tooltip");
  13618. const id = useId();
  13619. const popperRef = ref();
  13620. const contentRef = ref();
  13621. const updatePopper = () => {
  13622. const popperComponent = unref(popperRef);
  13623. if (popperComponent) popperComponent.popperInstanceRef?.update();
  13624. };
  13625. const open = ref(false);
  13626. const toggleReason = ref();
  13627. const { show, hide, hasUpdateHandler } = useTooltipModelToggle({
  13628. indicator: open,
  13629. toggleReason
  13630. });
  13631. const { onOpen, onClose } = useDelayedToggle({
  13632. showAfter: toRef(props, "showAfter"),
  13633. hideAfter: toRef(props, "hideAfter"),
  13634. autoClose: toRef(props, "autoClose"),
  13635. open: show,
  13636. close: hide
  13637. });
  13638. const controlled = computed(() => isBoolean(props.visible) && !hasUpdateHandler.value);
  13639. const kls = computed(() => {
  13640. return [ns.b(), props.popperClass];
  13641. });
  13642. provide(TOOLTIP_INJECTION_KEY, {
  13643. controlled,
  13644. id,
  13645. open: readonly(open),
  13646. trigger: toRef(props, "trigger"),
  13647. onOpen,
  13648. onClose,
  13649. onToggle: (event) => {
  13650. if (unref(open)) onClose(event);
  13651. else onOpen(event);
  13652. },
  13653. onShow: () => {
  13654. emit("show", toggleReason.value);
  13655. },
  13656. onHide: () => {
  13657. emit("hide", toggleReason.value);
  13658. },
  13659. onBeforeShow: () => {
  13660. emit("before-show", toggleReason.value);
  13661. },
  13662. onBeforeHide: () => {
  13663. emit("before-hide", toggleReason.value);
  13664. },
  13665. updatePopper
  13666. });
  13667. watch(() => props.disabled, (disabled) => {
  13668. if (disabled && open.value) open.value = false;
  13669. if (!disabled && isBoolean(props.visible)) open.value = props.visible;
  13670. });
  13671. const isFocusInsideContent = (event) => {
  13672. return contentRef.value?.isFocusInsideContent(event);
  13673. };
  13674. onDeactivated(() => open.value && hide());
  13675. onBeforeUnmount(() => {
  13676. toggleReason.value = void 0;
  13677. });
  13678. __expose({
  13679. /**
  13680. * @description el-popper component instance
  13681. */
  13682. popperRef,
  13683. /**
  13684. * @description el-tooltip-content component instance
  13685. */
  13686. contentRef,
  13687. /**
  13688. * @description validate current focus event is trigger inside el-tooltip-content
  13689. */
  13690. isFocusInsideContent,
  13691. /**
  13692. * @description update el-popper component instance
  13693. */
  13694. updatePopper,
  13695. /**
  13696. * @description expose onOpen function to mange el-tooltip open state
  13697. */
  13698. onOpen,
  13699. /**
  13700. * @description expose onClose function to manage el-tooltip close state
  13701. */
  13702. onClose,
  13703. /**
  13704. * @description expose hide function
  13705. */
  13706. hide
  13707. });
  13708. return (_ctx, _cache) => {
  13709. return openBlock(), createBlock(unref(ElPopper), {
  13710. ref_key: "popperRef",
  13711. ref: popperRef,
  13712. role: __props.role
  13713. }, {
  13714. default: withCtx(() => [createVNode(trigger_default$1, {
  13715. disabled: __props.disabled,
  13716. trigger: __props.trigger,
  13717. "trigger-keys": __props.triggerKeys,
  13718. "virtual-ref": __props.virtualRef,
  13719. "virtual-triggering": __props.virtualTriggering,
  13720. "focus-on-target": __props.focusOnTarget
  13721. }, {
  13722. default: withCtx(() => [_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)]),
  13723. _: 3
  13724. }, 8, [
  13725. "disabled",
  13726. "trigger",
  13727. "trigger-keys",
  13728. "virtual-ref",
  13729. "virtual-triggering",
  13730. "focus-on-target"
  13731. ]), createVNode(content_default$2, {
  13732. ref_key: "contentRef",
  13733. ref: contentRef,
  13734. "aria-label": __props.ariaLabel,
  13735. "boundaries-padding": __props.boundariesPadding,
  13736. content: __props.content,
  13737. disabled: __props.disabled,
  13738. effect: __props.effect,
  13739. enterable: __props.enterable,
  13740. "fallback-placements": __props.fallbackPlacements,
  13741. "hide-after": __props.hideAfter,
  13742. "gpu-acceleration": __props.gpuAcceleration,
  13743. offset: __props.offset,
  13744. persistent: __props.persistent,
  13745. "popper-class": kls.value,
  13746. "popper-style": __props.popperStyle,
  13747. placement: __props.placement,
  13748. "popper-options": __props.popperOptions,
  13749. "arrow-offset": __props.arrowOffset,
  13750. pure: __props.pure,
  13751. "raw-content": __props.rawContent,
  13752. "reference-el": __props.referenceEl,
  13753. "trigger-target-el": __props.triggerTargetEl,
  13754. "show-after": __props.showAfter,
  13755. strategy: __props.strategy,
  13756. teleported: __props.teleported,
  13757. transition: __props.transition,
  13758. "virtual-triggering": __props.virtualTriggering,
  13759. "z-index": __props.zIndex,
  13760. "append-to": __props.appendTo,
  13761. loop: __props.loop
  13762. }, {
  13763. default: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [__props.rawContent ? (openBlock(), createElementBlock("span", {
  13764. key: 0,
  13765. innerHTML: __props.content
  13766. }, null, 8, _hoisted_1$78)) : (openBlock(), createElementBlock("span", _hoisted_2$44, toDisplayString(__props.content), 1))]), __props.showArrow ? (openBlock(), createBlock(unref(arrow_default), { key: 0 })) : createCommentVNode("v-if", true)]),
  13767. _: 3
  13768. }, 8, [
  13769. "aria-label",
  13770. "boundaries-padding",
  13771. "content",
  13772. "disabled",
  13773. "effect",
  13774. "enterable",
  13775. "fallback-placements",
  13776. "hide-after",
  13777. "gpu-acceleration",
  13778. "offset",
  13779. "persistent",
  13780. "popper-class",
  13781. "popper-style",
  13782. "placement",
  13783. "popper-options",
  13784. "arrow-offset",
  13785. "pure",
  13786. "raw-content",
  13787. "reference-el",
  13788. "trigger-target-el",
  13789. "show-after",
  13790. "strategy",
  13791. "teleported",
  13792. "transition",
  13793. "virtual-triggering",
  13794. "z-index",
  13795. "append-to",
  13796. "loop"
  13797. ])]),
  13798. _: 3
  13799. }, 8, ["role"]);
  13800. };
  13801. }
  13802. }));
  13803. //#endregion
  13804. //#region node_modules/element-plus/es/utils/typescript.mjs
  13805. var mutable = (val) => val;
  13806. //#endregion
  13807. //#region node_modules/element-plus/es/components/input/src/input.mjs
  13808. /**
  13809. * @deprecated Removed after 3.0.0, Use `InputProps` instead.
  13810. */
  13811. var inputProps = buildProps({
  13812. /**
  13813. * @description native input id
  13814. */
  13815. id: {
  13816. type: String,
  13817. default: void 0
  13818. },
  13819. /**
  13820. * @description input box size
  13821. */
  13822. size: useSizeProp,
  13823. /**
  13824. * @description whether to disable
  13825. */
  13826. disabled: {
  13827. type: Boolean,
  13828. default: void 0
  13829. },
  13830. /**
  13831. * @description binding value
  13832. */
  13833. modelValue: {
  13834. type: definePropType([
  13835. String,
  13836. Number,
  13837. Object
  13838. ]),
  13839. default: ""
  13840. },
  13841. /**
  13842. * @description v-model modifiers, reference [Vue modifiers](https://vuejs.org/guide/essentials/forms.html#modifiers)
  13843. */
  13844. modelModifiers: {
  13845. type: definePropType(Object),
  13846. default: () => ({})
  13847. },
  13848. /**
  13849. * @description same as `maxlength` in native input
  13850. */
  13851. maxlength: { type: [String, Number] },
  13852. /**
  13853. * @description same as `minlength` in native input
  13854. */
  13855. minlength: { type: [String, Number] },
  13856. /**
  13857. * @description type of input, see more in [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types)
  13858. */
  13859. type: {
  13860. type: definePropType(String),
  13861. default: "text"
  13862. },
  13863. /**
  13864. * @description control the resizability
  13865. */
  13866. resize: {
  13867. type: String,
  13868. values: [
  13869. "none",
  13870. "both",
  13871. "horizontal",
  13872. "vertical"
  13873. ]
  13874. },
  13875. /**
  13876. * @description whether textarea has an adaptive height
  13877. */
  13878. autosize: {
  13879. type: definePropType([Boolean, Object]),
  13880. default: false
  13881. },
  13882. /**
  13883. * @description native input autocomplete
  13884. */
  13885. autocomplete: {
  13886. type: definePropType(String),
  13887. default: "off"
  13888. },
  13889. /**
  13890. * @description format content
  13891. */
  13892. formatter: { type: Function },
  13893. /**
  13894. * @description parse content
  13895. */
  13896. parser: { type: Function },
  13897. /**
  13898. * @description placeholder
  13899. */
  13900. placeholder: { type: String },
  13901. /**
  13902. * @description native input form
  13903. */
  13904. form: { type: String },
  13905. /**
  13906. * @description native input readonly
  13907. */
  13908. readonly: Boolean,
  13909. /**
  13910. * @description whether to show clear button
  13911. */
  13912. clearable: Boolean,
  13913. /**
  13914. * @description custom clear icon component
  13915. */
  13916. clearIcon: {
  13917. type: iconPropType,
  13918. default: circle_close_default
  13919. },
  13920. /**
  13921. * @description toggleable password input
  13922. */
  13923. showPassword: Boolean,
  13924. /**
  13925. * @description word count
  13926. */
  13927. showWordLimit: Boolean,
  13928. /**
  13929. * @description word count position, valid when `show-word-limit` is true
  13930. */
  13931. wordLimitPosition: {
  13932. type: String,
  13933. values: ["inside", "outside"],
  13934. default: "inside"
  13935. },
  13936. /**
  13937. * @description suffix icon
  13938. */
  13939. suffixIcon: { type: iconPropType },
  13940. /**
  13941. * @description prefix icon
  13942. */
  13943. prefixIcon: { type: iconPropType },
  13944. /**
  13945. * @description container role, internal properties provided for use by the picker component
  13946. */
  13947. containerRole: {
  13948. type: String,
  13949. default: void 0
  13950. },
  13951. /**
  13952. * @description input tabindex
  13953. */
  13954. tabindex: {
  13955. type: [String, Number],
  13956. default: 0
  13957. },
  13958. /**
  13959. * @description whether to trigger form validation
  13960. */
  13961. validateEvent: {
  13962. type: Boolean,
  13963. default: true
  13964. },
  13965. /**
  13966. * @description input or textarea element style
  13967. */
  13968. inputStyle: {
  13969. type: definePropType([
  13970. Object,
  13971. Array,
  13972. String,
  13973. Boolean
  13974. ]),
  13975. default: () => mutable({})
  13976. },
  13977. /**
  13978. * @description Count graphemes of input value. If it's set, native maxlength and minlength won't be used.
  13979. */
  13980. countGraphemes: { type: definePropType(Function) },
  13981. /**
  13982. * @description native input autofocus
  13983. */
  13984. autofocus: Boolean,
  13985. rows: {
  13986. type: Number,
  13987. default: 2
  13988. },
  13989. ...useAriaProps(["ariaLabel"]),
  13990. /**
  13991. * @description native input mode for virtual keyboards
  13992. */
  13993. inputmode: {
  13994. type: definePropType(String),
  13995. default: void 0
  13996. },
  13997. /**
  13998. * @description same as `name` in native input
  13999. */
  14000. name: String
  14001. });
  14002. var inputEmits = {
  14003. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  14004. input: (value) => isString(value),
  14005. change: (value, evt) => isString(value) && (evt instanceof Event || evt === void 0),
  14006. focus: (evt) => evt instanceof FocusEvent,
  14007. blur: (evt) => evt instanceof FocusEvent,
  14008. clear: (evt) => evt === void 0 || evt instanceof MouseEvent,
  14009. mouseleave: (evt) => evt instanceof MouseEvent,
  14010. mouseenter: (evt) => evt instanceof MouseEvent,
  14011. keydown: (evt) => evt instanceof Event,
  14012. compositionstart: (evt) => evt instanceof CompositionEvent,
  14013. compositionupdate: (evt) => evt instanceof CompositionEvent,
  14014. compositionend: (evt) => evt instanceof CompositionEvent
  14015. };
  14016. /**
  14017. * @description default values for InputProps, used in components that extend InputProps like Autocomplete
  14018. */
  14019. var inputPropsDefaults = {
  14020. disabled: void 0,
  14021. modelValue: "",
  14022. modelModifiers: () => ({}),
  14023. type: "text",
  14024. autocomplete: "off",
  14025. clearIcon: markRaw(circle_close_default),
  14026. wordLimitPosition: "inside",
  14027. tabindex: 0,
  14028. validateEvent: true,
  14029. inputStyle: () => ({}),
  14030. rows: 2
  14031. };
  14032. //#endregion
  14033. //#region node_modules/element-plus/es/components/input/src/utils.mjs
  14034. var hiddenTextarea = void 0;
  14035. var HIDDEN_STYLE = {
  14036. height: "0",
  14037. visibility: "hidden",
  14038. overflow: isFirefox() ? "" : "hidden",
  14039. position: "absolute",
  14040. "z-index": "-1000",
  14041. top: "0",
  14042. right: "0"
  14043. };
  14044. var CONTEXT_STYLE = [
  14045. "letter-spacing",
  14046. "line-height",
  14047. "padding-top",
  14048. "padding-bottom",
  14049. "font-family",
  14050. "font-weight",
  14051. "font-size",
  14052. "text-rendering",
  14053. "text-transform",
  14054. "width",
  14055. "text-indent",
  14056. "padding-left",
  14057. "padding-right",
  14058. "border-width",
  14059. "box-sizing",
  14060. "word-break"
  14061. ];
  14062. var looseToNumber = (val) => {
  14063. const n = Number.parseFloat(val);
  14064. return Number.isNaN(n) ? val : n;
  14065. };
  14066. function calculateNodeStyling(targetElement) {
  14067. const style = window.getComputedStyle(targetElement);
  14068. const boxSizing = style.getPropertyValue("box-sizing");
  14069. const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
  14070. const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
  14071. return {
  14072. contextStyle: CONTEXT_STYLE.map((name) => [name, style.getPropertyValue(name)]),
  14073. paddingSize,
  14074. borderSize,
  14075. boxSizing
  14076. };
  14077. }
  14078. function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
  14079. if (!hiddenTextarea) {
  14080. hiddenTextarea = document.createElement("textarea");
  14081. let hostNode = document.body;
  14082. if (!isFirefox() && targetElement.parentNode) hostNode = targetElement.parentNode;
  14083. hostNode.appendChild(hiddenTextarea);
  14084. }
  14085. const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
  14086. contextStyle.forEach(([key, value]) => hiddenTextarea?.style.setProperty(key, value));
  14087. Object.entries(HIDDEN_STYLE).forEach(([key, value]) => hiddenTextarea?.style.setProperty(key, value, "important"));
  14088. hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
  14089. let height = hiddenTextarea.scrollHeight;
  14090. const result = {};
  14091. if (boxSizing === "border-box") height = height + borderSize;
  14092. else if (boxSizing === "content-box") height = height - paddingSize;
  14093. hiddenTextarea.value = "";
  14094. const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  14095. if (isNumber(minRows)) {
  14096. let minHeight = singleRowHeight * minRows;
  14097. if (boxSizing === "border-box") minHeight = minHeight + paddingSize + borderSize;
  14098. height = Math.max(minHeight, height);
  14099. result.minHeight = `${minHeight}px`;
  14100. }
  14101. if (isNumber(maxRows)) {
  14102. let maxHeight = singleRowHeight * maxRows;
  14103. if (boxSizing === "border-box") maxHeight = maxHeight + paddingSize + borderSize;
  14104. height = Math.min(maxHeight, height);
  14105. }
  14106. result.height = `${height}px`;
  14107. hiddenTextarea.parentNode?.removeChild(hiddenTextarea);
  14108. hiddenTextarea = void 0;
  14109. return result;
  14110. }
  14111. //#endregion
  14112. //#region node_modules/element-plus/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs
  14113. var _hoisted_1$77 = [
  14114. "id",
  14115. "name",
  14116. "minlength",
  14117. "maxlength",
  14118. "type",
  14119. "disabled",
  14120. "readonly",
  14121. "autocomplete",
  14122. "tabindex",
  14123. "aria-label",
  14124. "placeholder",
  14125. "form",
  14126. "autofocus",
  14127. "role",
  14128. "inputmode"
  14129. ];
  14130. var _hoisted_2$43 = [
  14131. "id",
  14132. "name",
  14133. "minlength",
  14134. "maxlength",
  14135. "tabindex",
  14136. "disabled",
  14137. "readonly",
  14138. "autocomplete",
  14139. "aria-label",
  14140. "placeholder",
  14141. "form",
  14142. "autofocus",
  14143. "rows",
  14144. "role",
  14145. "inputmode"
  14146. ];
  14147. var COMPONENT_NAME$19 = "ElInput";
  14148. //#endregion
  14149. //#region node_modules/element-plus/es/components/input/index.mjs
  14150. var ElInput = withInstall(/* @__PURE__ */ defineComponent({
  14151. name: COMPONENT_NAME$19,
  14152. inheritAttrs: false,
  14153. __name: "input",
  14154. props: inputProps,
  14155. emits: inputEmits,
  14156. setup(__props, { expose: __expose, emit: __emit }) {
  14157. const props = __props;
  14158. const emit = __emit;
  14159. const rawAttrs = useAttrs$1();
  14160. const slots = useSlots();
  14161. const containerKls = computed(() => [
  14162. props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
  14163. nsInput.m(inputSize.value),
  14164. nsInput.is("disabled", inputDisabled.value),
  14165. nsInput.is("exceed", inputExceed.value),
  14166. {
  14167. [nsInput.b("group")]: slots.prepend || slots.append,
  14168. [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
  14169. [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
  14170. [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value,
  14171. [nsInput.b("hidden")]: props.type === "hidden"
  14172. },
  14173. rawAttrs.class
  14174. ]);
  14175. const wrapperKls = computed(() => [nsInput.e("wrapper"), nsInput.is("focus", isFocused.value)]);
  14176. const attrs = useAttrs();
  14177. const maxlength = computed(() => props.maxlength?.toString());
  14178. const { form: elForm, formItem: elFormItem } = useFormItem();
  14179. const { inputId } = useFormItemInputId(props, { formItemContext: elFormItem });
  14180. const inputSize = useFormSize();
  14181. const inputDisabled = useFormDisabled();
  14182. const nsInput = useNamespace("input");
  14183. const nsTextarea = useNamespace("textarea");
  14184. const input = shallowRef();
  14185. const textarea = shallowRef();
  14186. const hovering = ref(false);
  14187. const passwordVisible = ref(false);
  14188. const countStyle = ref();
  14189. const clearIconStyle = ref();
  14190. const textareaCalcStyle = shallowRef(props.inputStyle);
  14191. const saveValue = ref("");
  14192. const textareaHeight = ref();
  14193. const _ref = computed(() => input.value || textarea.value);
  14194. const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, {
  14195. disabled: inputDisabled,
  14196. afterBlur() {
  14197. if (props.validateEvent) elFormItem?.validate?.("blur").catch(NOOP);
  14198. }
  14199. });
  14200. const needStatusIcon = computed(() => elForm?.statusIcon ?? false);
  14201. const validateState = computed(() => elFormItem?.validateState || "");
  14202. const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
  14203. const passwordIcon = computed(() => passwordVisible.value ? view_default : hide_default);
  14204. const containerStyle = computed(() => [rawAttrs.style]);
  14205. const textareaStyle = computed(() => [
  14206. props.inputStyle,
  14207. textareaCalcStyle.value,
  14208. { resize: props.resize },
  14209. textareaHeight.value ? { height: textareaHeight.value } : void 0
  14210. ]);
  14211. const nativeInputValue = computed(() => isNil(props.modelValue) ? "" : String(props.modelValue));
  14212. const renderClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly);
  14213. const showClear = computed(() => renderClear.value && !!nativeInputValue.value && (isFocused.value || hovering.value));
  14214. const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !!nativeInputValue.value);
  14215. const isWordLimitVisible = computed(() => props.showWordLimit && !!maxlength.value && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
  14216. const textLength = computed(() => {
  14217. if (props.countGraphemes && props.showWordLimit) return props.countGraphemes(nativeInputValue.value);
  14218. return nativeInputValue.value.length;
  14219. });
  14220. const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(maxlength.value));
  14221. const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || props.clearable || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
  14222. const hasModelModifiers = computed(() => !!Object.keys(props.modelModifiers).length);
  14223. const [recordCursor, setCursor] = useCursor(input);
  14224. let rAFId;
  14225. useResizeObserver(textarea, (entries) => {
  14226. onceInitSizeTextarea();
  14227. if (!isWordLimitVisible.value && !renderClear.value || props.resize !== "both" && props.resize !== "horizontal") return;
  14228. const { width } = entries[0].target.getBoundingClientRect();
  14229. const updateStyle = () => {
  14230. rAFId = void 0;
  14231. countStyle.value = {
  14232. /** right: 100% - (width - right(10)) */
  14233. right: `calc(100% - ${width - 10}px)` };
  14234. clearIconStyle.value = {
  14235. /** right: 100% - (width - right(11)) */
  14236. right: `calc(100% - ${width - 11}px)` };
  14237. };
  14238. rAFId && cAF(rAFId);
  14239. rAFId = rAF(updateStyle);
  14240. });
  14241. const resizeTextarea = () => {
  14242. const { type, autosize } = props;
  14243. if (!isClient || type !== "textarea" || !textarea.value) return;
  14244. if (autosize) {
  14245. const minRows = isObject$2(autosize) ? autosize.minRows : void 0;
  14246. const maxRows = isObject$2(autosize) ? autosize.maxRows : void 0;
  14247. const textareaStyle = calcTextareaHeight(textarea.value, minRows, maxRows);
  14248. textareaCalcStyle.value = {
  14249. overflowY: "hidden",
  14250. ...textareaStyle
  14251. };
  14252. nextTick(() => {
  14253. textarea.value.offsetHeight;
  14254. textareaCalcStyle.value = textareaStyle;
  14255. });
  14256. } else textareaCalcStyle.value = { minHeight: calcTextareaHeight(textarea.value).minHeight };
  14257. };
  14258. const createOnceInitResize = (resizeTextarea) => {
  14259. let isInit = false;
  14260. return () => {
  14261. if (isInit || !props.autosize) {
  14262. if (props.resize !== "none") setTimeout(() => {
  14263. textareaHeight.value = textarea.value?.style.height;
  14264. });
  14265. return;
  14266. }
  14267. if (!(textarea.value?.offsetParent === null)) {
  14268. setTimeout(resizeTextarea);
  14269. isInit = true;
  14270. }
  14271. };
  14272. };
  14273. const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
  14274. const setNativeInputValue = () => {
  14275. const input = _ref.value;
  14276. const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
  14277. if (!input || input.value === formatterValue || props.type === "file") return;
  14278. input.value = formatterValue;
  14279. };
  14280. const formatValue = (value) => {
  14281. const { trim, number } = props.modelModifiers;
  14282. if (trim) value = value.trim();
  14283. if (number) value = `${looseToNumber(value)}`;
  14284. if (props.formatter && props.parser) value = props.parser(value);
  14285. return value;
  14286. };
  14287. const handleInput = async (event) => {
  14288. if (isComposing.value) return;
  14289. const { lazy } = props.modelModifiers;
  14290. let { value } = event.target;
  14291. let shouldForceNativeUpdate = false;
  14292. if (lazy) {
  14293. emit(INPUT_EVENT, value);
  14294. return;
  14295. }
  14296. value = formatValue(value);
  14297. if (props.countGraphemes && maxlength.value != null) {
  14298. const limit = Number(maxlength.value);
  14299. const graphemes = props.countGraphemes(value);
  14300. const saveGraphemes = props.countGraphemes(saveValue.value);
  14301. if (graphemes > limit && graphemes > saveGraphemes) if (saveGraphemes > limit) {
  14302. value = saveValue.value;
  14303. shouldForceNativeUpdate = true;
  14304. } else {
  14305. const prevValue = saveValue.value;
  14306. const nextValue = value;
  14307. let prefixLen = 0;
  14308. while (prefixLen < prevValue.length && prefixLen < nextValue.length && prevValue[prefixLen] === nextValue[prefixLen]) prefixLen++;
  14309. let prevSuffixIndex = prevValue.length;
  14310. let nextSuffixIndex = nextValue.length;
  14311. while (prevSuffixIndex > prefixLen && nextSuffixIndex > prefixLen && prevValue[prevSuffixIndex - 1] === nextValue[nextSuffixIndex - 1]) {
  14312. prevSuffixIndex--;
  14313. nextSuffixIndex--;
  14314. }
  14315. const before = nextValue.slice(0, prefixLen);
  14316. const removed = prevValue.slice(prefixLen, prevSuffixIndex);
  14317. const inserted = nextValue.slice(prefixLen, nextSuffixIndex);
  14318. const after = nextValue.slice(nextSuffixIndex);
  14319. const baseCount = saveGraphemes - props.countGraphemes(removed);
  14320. const availableInserted = Math.max(0, limit - baseCount);
  14321. let acceptedInserted = "";
  14322. if (availableInserted > 0) if (typeof Intl !== "undefined" && "Segmenter" in Intl) {
  14323. const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
  14324. for (const { segment } of segmenter.segment(inserted)) {
  14325. const candidate = acceptedInserted + segment;
  14326. if (props.countGraphemes(candidate) > availableInserted) break;
  14327. acceptedInserted = candidate;
  14328. }
  14329. } else for (const char of Array.from(inserted)) {
  14330. const candidate = acceptedInserted + char;
  14331. if (props.countGraphemes(candidate) > availableInserted) break;
  14332. acceptedInserted = candidate;
  14333. }
  14334. value = before + acceptedInserted + after;
  14335. shouldForceNativeUpdate = true;
  14336. }
  14337. }
  14338. if (String(value) === nativeInputValue.value) {
  14339. if (props.formatter || shouldForceNativeUpdate) {
  14340. const target = event.target;
  14341. const blockedValue = target.value;
  14342. const selectionStart = target.selectionStart;
  14343. const selectionEnd = target.selectionEnd;
  14344. setNativeInputValue();
  14345. if (shouldForceNativeUpdate && _ref.value && selectionStart != null && selectionEnd != null) {
  14346. const restoredValue = _ref.value.value;
  14347. const afterTxt = blockedValue.slice(Math.max(0, selectionEnd));
  14348. let caretPos = Math.min(selectionStart, restoredValue.length);
  14349. if (afterTxt && restoredValue.endsWith(afterTxt)) caretPos = restoredValue.length - afterTxt.length;
  14350. _ref.value.setSelectionRange(caretPos, caretPos);
  14351. }
  14352. }
  14353. return;
  14354. }
  14355. saveValue.value = value;
  14356. recordCursor();
  14357. emit(UPDATE_MODEL_EVENT, value);
  14358. emit(INPUT_EVENT, value);
  14359. await nextTick();
  14360. if (props.formatter && props.parser || !hasModelModifiers.value) setNativeInputValue();
  14361. setCursor();
  14362. };
  14363. const handleChange = async (event) => {
  14364. let { value } = event.target;
  14365. value = formatValue(value);
  14366. if (props.modelModifiers.lazy) emit(UPDATE_MODEL_EVENT, value);
  14367. emit(CHANGE_EVENT, value, event);
  14368. await nextTick();
  14369. setNativeInputValue();
  14370. };
  14371. const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({
  14372. emit,
  14373. afterComposition: handleInput
  14374. });
  14375. const handlePasswordVisible = () => {
  14376. passwordVisible.value = !passwordVisible.value;
  14377. };
  14378. const focus = () => _ref.value?.focus();
  14379. const blur = () => _ref.value?.blur();
  14380. const handleMouseLeave = (evt) => {
  14381. hovering.value = false;
  14382. emit("mouseleave", evt);
  14383. };
  14384. const handleMouseEnter = (evt) => {
  14385. hovering.value = true;
  14386. emit("mouseenter", evt);
  14387. };
  14388. const handleKeydown = (evt) => {
  14389. emit("keydown", evt);
  14390. };
  14391. const select = () => {
  14392. _ref.value?.select();
  14393. };
  14394. const clear = (evt) => {
  14395. emit(UPDATE_MODEL_EVENT, "");
  14396. emit(CHANGE_EVENT, "");
  14397. emit("clear", evt);
  14398. emit(INPUT_EVENT, "");
  14399. };
  14400. watch(() => props.modelValue, () => {
  14401. nextTick(() => {
  14402. resizeTextarea();
  14403. if (props.autosize) textareaHeight.value = void 0;
  14404. });
  14405. if (props.validateEvent) elFormItem?.validate?.("change").catch(NOOP);
  14406. });
  14407. watch(() => nativeInputValue.value, (val) => {
  14408. saveValue.value = val;
  14409. }, { immediate: true });
  14410. watch(nativeInputValue, (newValue) => {
  14411. if (!_ref.value) return;
  14412. const { trim, number } = props.modelModifiers;
  14413. const elValue = _ref.value.value;
  14414. const displayValue = (number || props.type === "number") && !/^0\d/.test(elValue) ? `${looseToNumber(elValue)}` : elValue;
  14415. if (displayValue === newValue) return;
  14416. if (document.activeElement === _ref.value && _ref.value.type !== "range") {
  14417. if (trim && displayValue.trim() === newValue) return;
  14418. }
  14419. setNativeInputValue();
  14420. });
  14421. watch(() => props.type, async () => {
  14422. await nextTick();
  14423. setNativeInputValue();
  14424. resizeTextarea();
  14425. });
  14426. onMounted(() => {
  14427. if (!props.formatter && props.parser) debugWarn(COMPONENT_NAME$19, "If you set the parser, you also need to set the formatter.");
  14428. setNativeInputValue();
  14429. nextTick(resizeTextarea);
  14430. });
  14431. onBeforeUnmount(() => {
  14432. rAFId && cAF(rAFId);
  14433. });
  14434. __expose({
  14435. /** @description HTML input element */
  14436. input,
  14437. /** @description HTML textarea element */
  14438. textarea,
  14439. /** @description HTML element, input or textarea */
  14440. ref: _ref,
  14441. /** @description style of textarea. */
  14442. textareaStyle,
  14443. /** @description from props (used on unit test) */
  14444. autosize: toRef(props, "autosize"),
  14445. /** @description is input composing */
  14446. isComposing,
  14447. /** @description whether the password is visible */
  14448. passwordVisible,
  14449. /** @description HTML input element native method */
  14450. focus,
  14451. /** @description HTML input element native method */
  14452. blur,
  14453. /** @description HTML input element native method */
  14454. select,
  14455. /** @description clear input value */
  14456. clear,
  14457. /** @description resize textarea. */
  14458. resizeTextarea
  14459. });
  14460. return (_ctx, _cache) => {
  14461. return openBlock(), createElementBlock("div", {
  14462. class: normalizeClass([containerKls.value, {
  14463. [unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
  14464. [unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend
  14465. }]),
  14466. style: normalizeStyle(containerStyle.value),
  14467. onMouseenter: handleMouseEnter,
  14468. onMouseleave: handleMouseLeave
  14469. }, [createCommentVNode(" input "), __props.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  14470. createCommentVNode(" prepend slot "),
  14471. _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
  14472. key: 0,
  14473. class: normalizeClass(unref(nsInput).be("group", "prepend"))
  14474. }, [renderSlot(_ctx.$slots, "prepend")], 2)) : createCommentVNode("v-if", true),
  14475. createBaseVNode("div", {
  14476. ref_key: "wrapperRef",
  14477. ref: wrapperRef,
  14478. class: normalizeClass(wrapperKls.value)
  14479. }, [
  14480. createCommentVNode(" prefix slot "),
  14481. _ctx.$slots.prefix || __props.prefixIcon ? (openBlock(), createElementBlock("span", {
  14482. key: 0,
  14483. class: normalizeClass(unref(nsInput).e("prefix"))
  14484. }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("prefix-inner")) }, [renderSlot(_ctx.$slots, "prefix"), __props.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  14485. key: 0,
  14486. class: normalizeClass(unref(nsInput).e("icon"))
  14487. }, {
  14488. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon)))]),
  14489. _: 1
  14490. }, 8, ["class"])) : createCommentVNode("v-if", true)], 2)], 2)) : createCommentVNode("v-if", true),
  14491. createBaseVNode("input", mergeProps({
  14492. id: unref(inputId),
  14493. ref_key: "input",
  14494. ref: input,
  14495. class: unref(nsInput).e("inner")
  14496. }, unref(attrs), {
  14497. name: __props.name,
  14498. minlength: __props.countGraphemes ? void 0 : __props.minlength,
  14499. maxlength: __props.countGraphemes ? void 0 : maxlength.value,
  14500. type: __props.showPassword ? passwordVisible.value ? "text" : "password" : __props.type,
  14501. disabled: unref(inputDisabled),
  14502. readonly: __props.readonly,
  14503. autocomplete: __props.autocomplete,
  14504. tabindex: __props.tabindex,
  14505. "aria-label": __props.ariaLabel,
  14506. placeholder: __props.placeholder,
  14507. style: __props.inputStyle,
  14508. form: __props.form,
  14509. autofocus: __props.autofocus,
  14510. role: __props.containerRole,
  14511. inputmode: __props.inputmode,
  14512. onCompositionstart: _cache[0] || (_cache[0] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
  14513. onCompositionupdate: _cache[1] || (_cache[1] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
  14514. onCompositionend: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
  14515. onInput: handleInput,
  14516. onChange: handleChange,
  14517. onKeydown: handleKeydown
  14518. }), null, 16, _hoisted_1$77),
  14519. createCommentVNode(" suffix slot "),
  14520. suffixVisible.value ? (openBlock(), createElementBlock("span", {
  14521. key: 1,
  14522. class: normalizeClass(unref(nsInput).e("suffix"))
  14523. }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("suffix-inner")) }, [
  14524. renderClear.value ? (openBlock(), createBlock(unref(ElIcon), {
  14525. key: 0,
  14526. class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
  14527. style: normalizeStyle({ visibility: showClear.value ? "visible" : "hidden" }),
  14528. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  14529. onClick: clear
  14530. }, {
  14531. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  14532. _: 1
  14533. }, 8, [
  14534. "class",
  14535. "style",
  14536. "onMousedown"
  14537. ])) : createCommentVNode("v-if", true),
  14538. !showClear.value || !showPwdVisible.value || !isWordLimitVisible.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [renderSlot(_ctx.$slots, "suffix"), __props.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  14539. key: 0,
  14540. class: normalizeClass(unref(nsInput).e("icon"))
  14541. }, {
  14542. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.suffixIcon)))]),
  14543. _: 1
  14544. }, 8, ["class"])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true),
  14545. showPwdVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
  14546. key: 2,
  14547. class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
  14548. onClick: handlePasswordVisible,
  14549. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  14550. onMouseup: withModifiers(unref(NOOP), ["prevent"])
  14551. }, {
  14552. default: withCtx(() => [renderSlot(_ctx.$slots, "password-icon", { visible: passwordVisible.value }, () => [(openBlock(), createBlock(resolveDynamicComponent(passwordIcon.value)))])]),
  14553. _: 3
  14554. }, 8, [
  14555. "class",
  14556. "onMousedown",
  14557. "onMouseup"
  14558. ])) : createCommentVNode("v-if", true),
  14559. isWordLimitVisible.value ? (openBlock(), createElementBlock("span", {
  14560. key: 3,
  14561. class: normalizeClass([unref(nsInput).e("count"), unref(nsInput).is("outside", __props.wordLimitPosition === "outside")])
  14562. }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("count-inner")) }, toDisplayString(textLength.value) + " / " + toDisplayString(maxlength.value), 3)], 2)) : createCommentVNode("v-if", true),
  14563. validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  14564. key: 4,
  14565. class: normalizeClass([
  14566. unref(nsInput).e("icon"),
  14567. unref(nsInput).e("validateIcon"),
  14568. unref(nsInput).is("loading", validateState.value === "validating")
  14569. ])
  14570. }, {
  14571. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(validateIcon.value)))]),
  14572. _: 1
  14573. }, 8, ["class"])) : createCommentVNode("v-if", true)
  14574. ], 2)], 2)) : createCommentVNode("v-if", true)
  14575. ], 2),
  14576. createCommentVNode(" append slot "),
  14577. _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
  14578. key: 1,
  14579. class: normalizeClass(unref(nsInput).be("group", "append"))
  14580. }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
  14581. ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  14582. createCommentVNode(" textarea "),
  14583. createBaseVNode("textarea", mergeProps({
  14584. id: unref(inputId),
  14585. ref_key: "textarea",
  14586. ref: textarea,
  14587. class: [
  14588. unref(nsTextarea).e("inner"),
  14589. unref(nsInput).is("focus", unref(isFocused)),
  14590. unref(nsTextarea).is("clearable", __props.clearable)
  14591. ]
  14592. }, unref(attrs), {
  14593. name: __props.name,
  14594. minlength: __props.countGraphemes ? void 0 : __props.minlength,
  14595. maxlength: __props.countGraphemes ? void 0 : maxlength.value,
  14596. tabindex: __props.tabindex,
  14597. disabled: unref(inputDisabled),
  14598. readonly: __props.readonly,
  14599. autocomplete: __props.autocomplete,
  14600. style: textareaStyle.value,
  14601. "aria-label": __props.ariaLabel,
  14602. placeholder: __props.placeholder,
  14603. form: __props.form,
  14604. autofocus: __props.autofocus,
  14605. rows: __props.rows,
  14606. role: __props.containerRole,
  14607. inputmode: __props.inputmode,
  14608. onCompositionstart: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
  14609. onCompositionupdate: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
  14610. onCompositionend: _cache[5] || (_cache[5] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
  14611. onInput: handleInput,
  14612. onFocus: _cache[6] || (_cache[6] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  14613. onBlur: _cache[7] || (_cache[7] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
  14614. onChange: handleChange,
  14615. onKeydown: handleKeydown
  14616. }), null, 16, _hoisted_2$43),
  14617. showClear.value ? (openBlock(), createBlock(unref(ElIcon), {
  14618. key: 0,
  14619. class: normalizeClass([unref(nsTextarea).e("icon"), unref(nsTextarea).e("clear")]),
  14620. style: normalizeStyle(clearIconStyle.value),
  14621. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  14622. onClick: clear
  14623. }, {
  14624. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  14625. _: 1
  14626. }, 8, [
  14627. "class",
  14628. "style",
  14629. "onMousedown"
  14630. ])) : createCommentVNode("v-if", true),
  14631. isWordLimitVisible.value ? (openBlock(), createElementBlock("span", {
  14632. key: 1,
  14633. style: normalizeStyle(countStyle.value),
  14634. class: normalizeClass([unref(nsInput).e("count"), unref(nsInput).is("outside", __props.wordLimitPosition === "outside")])
  14635. }, toDisplayString(textLength.value) + " / " + toDisplayString(maxlength.value), 7)) : createCommentVNode("v-if", true)
  14636. ], 64))], 38);
  14637. };
  14638. }
  14639. }));
  14640. //#endregion
  14641. //#region node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs
  14642. /**
  14643. * @deprecated Removed after 3.0.0, Use `AutocompleteProps` instead.
  14644. */
  14645. var autocompleteProps = buildProps({
  14646. ...inputProps,
  14647. /**
  14648. * @description key name of the input suggestion object for display
  14649. */
  14650. valueKey: {
  14651. type: String,
  14652. default: "value"
  14653. },
  14654. /**
  14655. * @description binding value
  14656. */
  14657. modelValue: {
  14658. type: [String, Number],
  14659. default: ""
  14660. },
  14661. /**
  14662. * @description debounce delay when typing, in milliseconds
  14663. */
  14664. debounce: {
  14665. type: Number,
  14666. default: 300
  14667. },
  14668. /**
  14669. * @description placement of the popup menu
  14670. */
  14671. placement: {
  14672. type: definePropType(String),
  14673. values: [
  14674. "top",
  14675. "top-start",
  14676. "top-end",
  14677. "bottom",
  14678. "bottom-start",
  14679. "bottom-end"
  14680. ],
  14681. default: "bottom-start"
  14682. },
  14683. /**
  14684. * @description a method to fetch input suggestions. When suggestions are ready, invoke `callback(data:[])` to return them to Autocomplete
  14685. */
  14686. fetchSuggestions: {
  14687. type: definePropType([Function, Array]),
  14688. default: NOOP
  14689. },
  14690. /**
  14691. * @description custom class name for autocomplete's dropdown
  14692. */
  14693. popperClass: useTooltipContentProps.popperClass,
  14694. /**
  14695. * @description custom style for autocomplete's dropdown
  14696. */
  14697. popperStyle: useTooltipContentProps.popperStyle,
  14698. /**
  14699. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  14700. */
  14701. popperOptions: useTooltipContentProps.popperOptions,
  14702. /**
  14703. * @description determines whether the arrow is displayed
  14704. */
  14705. showArrow: {
  14706. type: Boolean,
  14707. default: true
  14708. },
  14709. /**
  14710. * @description whether show suggestions when input focus
  14711. */
  14712. triggerOnFocus: {
  14713. type: Boolean,
  14714. default: true
  14715. },
  14716. /**
  14717. * @description whether to emit a `select` event on enter when there is no autocomplete match
  14718. */
  14719. selectWhenUnmatched: Boolean,
  14720. /**
  14721. * @description whether to hide the loading icon in remote search
  14722. */
  14723. hideLoading: Boolean,
  14724. /**
  14725. * @description whether select dropdown is teleported to the body
  14726. */
  14727. teleported: useTooltipContentProps.teleported,
  14728. /**
  14729. * @description which select dropdown appends to
  14730. */
  14731. appendTo: useTooltipContentProps.appendTo,
  14732. /**
  14733. * @description whether to highlight first item in remote search suggestions by default
  14734. */
  14735. highlightFirstItem: Boolean,
  14736. /**
  14737. * @description whether the width of the dropdown is the same as the input
  14738. */
  14739. fitInputWidth: Boolean,
  14740. /**
  14741. * @description whether keyboard navigation loops from end to start
  14742. */
  14743. loopNavigation: {
  14744. type: Boolean,
  14745. default: true
  14746. }
  14747. });
  14748. var autocompleteEmits = {
  14749. [UPDATE_MODEL_EVENT]: (value) => isString(value) || isNumber(value),
  14750. [INPUT_EVENT]: (value) => isString(value) || isNumber(value),
  14751. [CHANGE_EVENT]: (value) => isString(value) || isNumber(value),
  14752. focus: (evt) => evt instanceof FocusEvent,
  14753. blur: (evt) => evt instanceof FocusEvent,
  14754. clear: () => true,
  14755. select: (item) => isObject$2(item)
  14756. };
  14757. //#endregion
  14758. //#region node_modules/element-plus/es/components/scrollbar/src/scrollbar.mjs
  14759. /**
  14760. * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.
  14761. */
  14762. var scrollbarProps = buildProps({
  14763. /**
  14764. * @description trigger distance(px)
  14765. */
  14766. distance: {
  14767. type: Number,
  14768. default: 0
  14769. },
  14770. /**
  14771. * @description height of scrollbar
  14772. */
  14773. height: {
  14774. type: [String, Number],
  14775. default: ""
  14776. },
  14777. /**
  14778. * @description max height of scrollbar
  14779. */
  14780. maxHeight: {
  14781. type: [String, Number],
  14782. default: ""
  14783. },
  14784. /**
  14785. * @description whether to use the native scrollbar
  14786. */
  14787. native: Boolean,
  14788. /**
  14789. * @description style of wrap
  14790. */
  14791. wrapStyle: {
  14792. type: definePropType([
  14793. String,
  14794. Object,
  14795. Array,
  14796. Boolean
  14797. ]),
  14798. default: ""
  14799. },
  14800. /**
  14801. * @description class of wrap
  14802. */
  14803. wrapClass: {
  14804. type: [String, Array],
  14805. default: ""
  14806. },
  14807. /**
  14808. * @description class of view
  14809. */
  14810. viewClass: {
  14811. type: [String, Array],
  14812. default: ""
  14813. },
  14814. /**
  14815. * @description style of view
  14816. */
  14817. viewStyle: {
  14818. type: definePropType([
  14819. String,
  14820. Object,
  14821. Array,
  14822. Boolean
  14823. ]),
  14824. default: ""
  14825. },
  14826. /**
  14827. * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance
  14828. */
  14829. noresize: Boolean,
  14830. /**
  14831. * @description element tag of the view
  14832. */
  14833. tag: {
  14834. type: String,
  14835. default: "div"
  14836. },
  14837. /**
  14838. * @description always show
  14839. */
  14840. always: Boolean,
  14841. /**
  14842. * @description minimum size of scrollbar
  14843. */
  14844. minSize: {
  14845. type: Number,
  14846. default: 20
  14847. },
  14848. /**
  14849. * @description Wrap tabindex
  14850. */
  14851. tabindex: {
  14852. type: [String, Number],
  14853. default: void 0
  14854. },
  14855. /**
  14856. * @description id of view
  14857. */
  14858. id: String,
  14859. /**
  14860. * @description role of view
  14861. */
  14862. role: String,
  14863. ...useAriaProps(["ariaLabel", "ariaOrientation"])
  14864. });
  14865. var scrollbarEmits = {
  14866. "end-reached": (direction) => [
  14867. "left",
  14868. "right",
  14869. "top",
  14870. "bottom"
  14871. ].includes(direction),
  14872. scroll: ({ scrollTop, scrollLeft }) => [scrollTop, scrollLeft].every(isNumber)
  14873. };
  14874. //#endregion
  14875. //#region node_modules/element-plus/es/components/scrollbar/src/util.mjs
  14876. var GAP = 4;
  14877. var BAR_MAP = {
  14878. vertical: {
  14879. offset: "offsetHeight",
  14880. scroll: "scrollTop",
  14881. scrollSize: "scrollHeight",
  14882. size: "height",
  14883. key: "vertical",
  14884. axis: "Y",
  14885. client: "clientY",
  14886. direction: "top"
  14887. },
  14888. horizontal: {
  14889. offset: "offsetWidth",
  14890. scroll: "scrollLeft",
  14891. scrollSize: "scrollWidth",
  14892. size: "width",
  14893. key: "horizontal",
  14894. axis: "X",
  14895. client: "clientX",
  14896. direction: "left"
  14897. }
  14898. };
  14899. var renderThumbStyle = ({ move, size, bar }) => ({
  14900. [bar.size]: size,
  14901. transform: `translate${bar.axis}(${move}%)`
  14902. });
  14903. //#endregion
  14904. //#region node_modules/element-plus/es/components/scrollbar/src/thumb.mjs
  14905. /**
  14906. * @deprecated Removed after 3.0.0, Use `ThumbProps` instead.
  14907. */
  14908. var thumbProps = buildProps({
  14909. vertical: Boolean,
  14910. size: String,
  14911. move: Number,
  14912. ratio: {
  14913. type: Number,
  14914. required: true
  14915. },
  14916. always: Boolean
  14917. });
  14918. //#endregion
  14919. //#region node_modules/element-plus/es/components/scrollbar/src/constants.mjs
  14920. var scrollbarContextKey = Symbol("scrollbarContextKey");
  14921. //#endregion
  14922. //#region node_modules/element-plus/es/utils/numbers.mjs
  14923. /**
  14924. * Due to browser rendering and calculation precision loss issues,
  14925. * boundary checks cannot be based solely on value equality;
  14926. * a certain range of fluctuation is permissible.
  14927. */
  14928. function isGreaterThan(a, b, epsilon = .03) {
  14929. return a - b > epsilon;
  14930. }
  14931. //#endregion
  14932. //#region node_modules/element-plus/es/components/scrollbar/src/bar.mjs
  14933. /**
  14934. * @deprecated Removed after 3.0.0, Use `BarProps` instead.
  14935. */
  14936. var barProps = buildProps({
  14937. always: {
  14938. type: Boolean,
  14939. default: true
  14940. },
  14941. minSize: {
  14942. type: Number,
  14943. required: true
  14944. }
  14945. });
  14946. //#endregion
  14947. //#region node_modules/element-plus/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs
  14948. var COMPONENT_NAME$18 = "Thumb";
  14949. //#endregion
  14950. //#region node_modules/element-plus/es/components/scrollbar/src/thumb2.mjs
  14951. var thumb_default = /* @__PURE__ */ defineComponent({
  14952. __name: "thumb",
  14953. props: thumbProps,
  14954. setup(__props) {
  14955. const props = __props;
  14956. const scrollbar = inject(scrollbarContextKey);
  14957. const ns = useNamespace("scrollbar");
  14958. if (!scrollbar) throwError(COMPONENT_NAME$18, "can not inject scrollbar context");
  14959. const instance = ref();
  14960. const thumb = ref();
  14961. const thumbState = ref({});
  14962. const visible = ref(false);
  14963. let cursorDown = false;
  14964. let cursorLeave = false;
  14965. let baseScrollHeight = 0;
  14966. let baseScrollWidth = 0;
  14967. let originalOnSelectStart = isClient ? document.onselectstart : null;
  14968. const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
  14969. const thumbStyle = computed(() => renderThumbStyle({
  14970. size: props.size,
  14971. move: props.move,
  14972. bar: bar.value
  14973. }));
  14974. const offsetRatio = computed(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]);
  14975. const clickThumbHandler = (e) => {
  14976. e.stopPropagation();
  14977. if (e.ctrlKey || [1, 2].includes(e.button)) return;
  14978. window.getSelection()?.removeAllRanges();
  14979. startDrag(e);
  14980. const el = e.currentTarget;
  14981. if (!el) return;
  14982. thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
  14983. };
  14984. const clickTrackHandler = (e) => {
  14985. if (!thumb.value || !instance.value || !scrollbar.wrapElement) return;
  14986. const thumbPositionPercentage = (Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) - thumb.value[bar.value.offset] / 2) * 100 * offsetRatio.value / instance.value[bar.value.offset];
  14987. scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
  14988. };
  14989. const startDrag = (e) => {
  14990. e.stopImmediatePropagation();
  14991. cursorDown = true;
  14992. baseScrollHeight = scrollbar.wrapElement.scrollHeight;
  14993. baseScrollWidth = scrollbar.wrapElement.scrollWidth;
  14994. document.addEventListener("mousemove", mouseMoveDocumentHandler);
  14995. document.addEventListener("mouseup", mouseUpDocumentHandler);
  14996. originalOnSelectStart = document.onselectstart;
  14997. document.onselectstart = () => false;
  14998. };
  14999. const mouseMoveDocumentHandler = (e) => {
  15000. if (!instance.value || !thumb.value) return;
  15001. if (cursorDown === false) return;
  15002. const prevPage = thumbState.value[bar.value.axis];
  15003. if (!prevPage) return;
  15004. const thumbPositionPercentage = ((instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1 - (thumb.value[bar.value.offset] - prevPage)) * 100 * offsetRatio.value / instance.value[bar.value.offset];
  15005. if (bar.value.scroll === "scrollLeft") scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollWidth / 100;
  15006. else scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollHeight / 100;
  15007. };
  15008. const mouseUpDocumentHandler = () => {
  15009. cursorDown = false;
  15010. thumbState.value[bar.value.axis] = 0;
  15011. document.removeEventListener("mousemove", mouseMoveDocumentHandler);
  15012. document.removeEventListener("mouseup", mouseUpDocumentHandler);
  15013. restoreOnselectstart();
  15014. if (cursorLeave) visible.value = false;
  15015. };
  15016. const mouseMoveScrollbarHandler = () => {
  15017. cursorLeave = false;
  15018. visible.value = !!props.size;
  15019. };
  15020. const mouseLeaveScrollbarHandler = () => {
  15021. cursorLeave = true;
  15022. visible.value = cursorDown;
  15023. };
  15024. onBeforeUnmount(() => {
  15025. restoreOnselectstart();
  15026. document.removeEventListener("mouseup", mouseUpDocumentHandler);
  15027. });
  15028. const restoreOnselectstart = () => {
  15029. if (document.onselectstart !== originalOnSelectStart) document.onselectstart = originalOnSelectStart;
  15030. };
  15031. useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
  15032. useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
  15033. return (_ctx, _cache) => {
  15034. return openBlock(), createBlock(Transition, {
  15035. name: unref(ns).b("fade"),
  15036. persisted: ""
  15037. }, {
  15038. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  15039. ref_key: "instance",
  15040. ref: instance,
  15041. class: normalizeClass([unref(ns).e("bar"), unref(ns).is(bar.value.key)]),
  15042. onMousedown: clickTrackHandler,
  15043. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  15044. }, [createBaseVNode("div", {
  15045. ref_key: "thumb",
  15046. ref: thumb,
  15047. class: normalizeClass(unref(ns).e("thumb")),
  15048. style: normalizeStyle(thumbStyle.value),
  15049. onMousedown: clickThumbHandler
  15050. }, null, 38)], 34), [[vShow, __props.always || visible.value]])]),
  15051. _: 1
  15052. }, 8, ["name"]);
  15053. };
  15054. }
  15055. });
  15056. //#endregion
  15057. //#region node_modules/element-plus/es/components/scrollbar/src/bar2.mjs
  15058. var bar_default = /* @__PURE__ */ defineComponent({
  15059. __name: "bar",
  15060. props: barProps,
  15061. setup(__props, { expose: __expose }) {
  15062. const props = __props;
  15063. const scrollbar = inject(scrollbarContextKey);
  15064. const moveX = ref(0);
  15065. const moveY = ref(0);
  15066. const sizeWidth = ref("");
  15067. const sizeHeight = ref("");
  15068. const ratioY = ref(1);
  15069. const ratioX = ref(1);
  15070. const handleScroll = (wrap) => {
  15071. if (wrap) {
  15072. const offsetHeight = wrap.offsetHeight - 4;
  15073. const offsetWidth = wrap.offsetWidth - 4;
  15074. moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
  15075. moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
  15076. }
  15077. };
  15078. const update = () => {
  15079. const wrap = scrollbar?.wrapElement;
  15080. if (!wrap) return;
  15081. const offsetHeight = wrap.offsetHeight - 4;
  15082. const offsetWidth = wrap.offsetWidth - 4;
  15083. const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
  15084. const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
  15085. const height = Math.max(originalHeight, props.minSize);
  15086. const width = Math.max(originalWidth, props.minSize);
  15087. ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
  15088. ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
  15089. sizeHeight.value = height + 4 < offsetHeight ? `${height}px` : "";
  15090. sizeWidth.value = width + 4 < offsetWidth ? `${width}px` : "";
  15091. };
  15092. __expose({
  15093. handleScroll,
  15094. update
  15095. });
  15096. return (_ctx, _cache) => {
  15097. return openBlock(), createElementBlock(Fragment, null, [createVNode(thumb_default, {
  15098. move: moveX.value,
  15099. ratio: ratioX.value,
  15100. size: sizeWidth.value,
  15101. always: __props.always
  15102. }, null, 8, [
  15103. "move",
  15104. "ratio",
  15105. "size",
  15106. "always"
  15107. ]), createVNode(thumb_default, {
  15108. move: moveY.value,
  15109. ratio: ratioY.value,
  15110. size: sizeHeight.value,
  15111. vertical: "",
  15112. always: __props.always
  15113. }, null, 8, [
  15114. "move",
  15115. "ratio",
  15116. "size",
  15117. "always"
  15118. ])], 64);
  15119. };
  15120. }
  15121. });
  15122. //#endregion
  15123. //#region node_modules/element-plus/es/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.mjs
  15124. var _hoisted_1$76 = ["tabindex"];
  15125. var COMPONENT_NAME$17 = "ElScrollbar";
  15126. //#endregion
  15127. //#region node_modules/element-plus/es/components/scrollbar/index.mjs
  15128. var ElScrollbar = withInstall(/* @__PURE__ */ defineComponent({
  15129. name: COMPONENT_NAME$17,
  15130. __name: "scrollbar",
  15131. props: scrollbarProps,
  15132. emits: scrollbarEmits,
  15133. setup(__props, { expose: __expose, emit: __emit }) {
  15134. const props = __props;
  15135. const emit = __emit;
  15136. const ns = useNamespace("scrollbar");
  15137. let stopResizeObserver = void 0;
  15138. let stopWrapResizeObserver = void 0;
  15139. let stopResizeListener = void 0;
  15140. let wrapScrollTop = 0;
  15141. let wrapScrollLeft = 0;
  15142. let direction = "";
  15143. const distanceScrollState = {
  15144. bottom: false,
  15145. top: false,
  15146. right: false,
  15147. left: false
  15148. };
  15149. const scrollbarRef = ref();
  15150. const wrapRef = ref();
  15151. const resizeRef = ref();
  15152. const barRef = ref();
  15153. const wrapStyle = computed(() => {
  15154. const style = {};
  15155. const height = addUnit(props.height);
  15156. const maxHeight = addUnit(props.maxHeight);
  15157. if (height) style.height = height;
  15158. if (maxHeight) style.maxHeight = maxHeight;
  15159. return [props.wrapStyle, style];
  15160. });
  15161. const wrapKls = computed(() => {
  15162. return [
  15163. props.wrapClass,
  15164. ns.e("wrap"),
  15165. { [ns.em("wrap", "hidden-default")]: !props.native }
  15166. ];
  15167. });
  15168. const resizeKls = computed(() => {
  15169. return [ns.e("view"), props.viewClass];
  15170. });
  15171. const shouldSkipDirection = (direction) => {
  15172. return distanceScrollState[direction] ?? false;
  15173. };
  15174. const DIRECTION_PAIRS = {
  15175. top: "bottom",
  15176. bottom: "top",
  15177. left: "right",
  15178. right: "left"
  15179. };
  15180. const updateTriggerStatus = (arrivedStates) => {
  15181. const oppositeDirection = DIRECTION_PAIRS[direction];
  15182. if (!oppositeDirection) return;
  15183. const arrived = arrivedStates[direction];
  15184. const oppositeArrived = arrivedStates[oppositeDirection];
  15185. if (arrived && !distanceScrollState[direction]) distanceScrollState[direction] = true;
  15186. if (!oppositeArrived && distanceScrollState[oppositeDirection]) distanceScrollState[oppositeDirection] = false;
  15187. };
  15188. const handleScroll = () => {
  15189. if (wrapRef.value) {
  15190. barRef.value?.handleScroll(wrapRef.value);
  15191. const prevTop = wrapScrollTop;
  15192. const prevLeft = wrapScrollLeft;
  15193. wrapScrollTop = wrapRef.value.scrollTop;
  15194. wrapScrollLeft = wrapRef.value.scrollLeft;
  15195. const arrivedStates = {
  15196. bottom: !isGreaterThan(wrapRef.value.scrollHeight - props.distance, wrapRef.value.clientHeight + wrapScrollTop),
  15197. top: wrapScrollTop <= props.distance && prevTop !== 0,
  15198. right: !isGreaterThan(wrapRef.value.scrollWidth - props.distance, wrapRef.value.clientWidth + wrapScrollLeft) && prevLeft !== wrapScrollLeft,
  15199. left: wrapScrollLeft <= props.distance && prevLeft !== 0
  15200. };
  15201. emit("scroll", {
  15202. scrollTop: wrapScrollTop,
  15203. scrollLeft: wrapScrollLeft
  15204. });
  15205. if (prevTop !== wrapScrollTop) direction = wrapScrollTop > prevTop ? "bottom" : "top";
  15206. if (prevLeft !== wrapScrollLeft) direction = wrapScrollLeft > prevLeft ? "right" : "left";
  15207. if (props.distance > 0) {
  15208. if (shouldSkipDirection(direction)) return;
  15209. updateTriggerStatus(arrivedStates);
  15210. }
  15211. if (arrivedStates[direction]) emit("end-reached", direction);
  15212. }
  15213. };
  15214. function scrollTo(arg1, arg2) {
  15215. if (isObject$2(arg1)) wrapRef.value.scrollTo(arg1);
  15216. else if (isNumber(arg1) && isNumber(arg2)) wrapRef.value.scrollTo(arg1, arg2);
  15217. }
  15218. const setScrollTop = (value) => {
  15219. if (!isNumber(value)) {
  15220. debugWarn(COMPONENT_NAME$17, "value must be a number");
  15221. return;
  15222. }
  15223. wrapRef.value.scrollTop = value;
  15224. };
  15225. const setScrollLeft = (value) => {
  15226. if (!isNumber(value)) {
  15227. debugWarn(COMPONENT_NAME$17, "value must be a number");
  15228. return;
  15229. }
  15230. wrapRef.value.scrollLeft = value;
  15231. };
  15232. const update = () => {
  15233. barRef.value?.update();
  15234. distanceScrollState[direction] = false;
  15235. if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value);
  15236. };
  15237. watch(() => props.noresize, (noresize) => {
  15238. if (noresize) {
  15239. stopResizeObserver?.();
  15240. stopWrapResizeObserver?.();
  15241. stopResizeListener?.();
  15242. } else {
  15243. ({stop: stopResizeObserver} = useResizeObserver(resizeRef, update));
  15244. ({stop: stopWrapResizeObserver} = useResizeObserver(wrapRef, update));
  15245. stopResizeListener = useEventListener("resize", update);
  15246. }
  15247. }, { immediate: true });
  15248. watch(() => [props.maxHeight, props.height], () => {
  15249. if (!props.native) nextTick(() => {
  15250. update();
  15251. });
  15252. });
  15253. provide(scrollbarContextKey, reactive({
  15254. scrollbarElement: scrollbarRef,
  15255. wrapElement: wrapRef
  15256. }));
  15257. onActivated(() => {
  15258. if (wrapRef.value) {
  15259. wrapRef.value.scrollTop = wrapScrollTop;
  15260. wrapRef.value.scrollLeft = wrapScrollLeft;
  15261. }
  15262. });
  15263. onMounted(() => {
  15264. if (!props.native) nextTick(() => {
  15265. update();
  15266. });
  15267. });
  15268. onUpdated(() => update());
  15269. __expose({
  15270. /** @description scrollbar wrap ref */
  15271. wrapRef,
  15272. /** @description update scrollbar state manually */
  15273. update,
  15274. /** @description scrolls to a particular set of coordinates */
  15275. scrollTo,
  15276. /** @description set distance to scroll top */
  15277. setScrollTop,
  15278. /** @description set distance to scroll left */
  15279. setScrollLeft,
  15280. /** @description handle scroll event */
  15281. handleScroll
  15282. });
  15283. return (_ctx, _cache) => {
  15284. return openBlock(), createElementBlock("div", {
  15285. ref_key: "scrollbarRef",
  15286. ref: scrollbarRef,
  15287. class: normalizeClass(unref(ns).b())
  15288. }, [createBaseVNode("div", {
  15289. ref_key: "wrapRef",
  15290. ref: wrapRef,
  15291. class: normalizeClass(wrapKls.value),
  15292. style: normalizeStyle(wrapStyle.value),
  15293. tabindex: __props.tabindex,
  15294. onScroll: handleScroll
  15295. }, [(openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  15296. id: __props.id,
  15297. ref_key: "resizeRef",
  15298. ref: resizeRef,
  15299. class: normalizeClass(resizeKls.value),
  15300. style: normalizeStyle(__props.viewStyle),
  15301. role: __props.role,
  15302. "aria-label": __props.ariaLabel,
  15303. "aria-orientation": __props.ariaOrientation
  15304. }, {
  15305. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  15306. _: 3
  15307. }, 8, [
  15308. "id",
  15309. "class",
  15310. "style",
  15311. "role",
  15312. "aria-label",
  15313. "aria-orientation"
  15314. ]))], 46, _hoisted_1$76), !__props.native ? (openBlock(), createBlock(bar_default, {
  15315. key: 0,
  15316. ref_key: "barRef",
  15317. ref: barRef,
  15318. always: __props.always,
  15319. "min-size": __props.minSize
  15320. }, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)], 2);
  15321. };
  15322. }
  15323. }));
  15324. //#endregion
  15325. //#region node_modules/element-plus/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs
  15326. var _hoisted_1$75 = ["aria-expanded", "aria-owns"];
  15327. var _hoisted_2$42 = { key: 0 };
  15328. var _hoisted_3$19 = [
  15329. "id",
  15330. "aria-selected",
  15331. "onClick"
  15332. ];
  15333. var COMPONENT_NAME$16 = "ElAutocomplete";
  15334. //#endregion
  15335. //#region node_modules/element-plus/es/components/autocomplete/index.mjs
  15336. var ElAutocomplete = withInstall(/* @__PURE__ */ defineComponent({
  15337. name: COMPONENT_NAME$16,
  15338. inheritAttrs: false,
  15339. __name: "autocomplete",
  15340. props: autocompleteProps,
  15341. emits: autocompleteEmits,
  15342. setup(__props, { expose: __expose, emit: __emit }) {
  15343. const props = __props;
  15344. const emit = __emit;
  15345. const passInputProps = computed(() => {
  15346. const inputProps = ElInput.props ?? [];
  15347. return pick(props, isArray$1(inputProps) ? inputProps : Object.keys(inputProps));
  15348. });
  15349. const rawAttrs = useAttrs$1();
  15350. const disabled = useFormDisabled();
  15351. const ns = useNamespace("autocomplete");
  15352. const inputRef = ref();
  15353. const regionRef = ref();
  15354. const popperRef = ref();
  15355. const listboxRef = ref();
  15356. let readonly = false;
  15357. let ignoreFocusEvent = false;
  15358. const suggestions = ref([]);
  15359. const highlightedIndex = ref(-1);
  15360. const dropdownWidth = ref("");
  15361. const activated = ref(false);
  15362. const suggestionDisabled = ref(false);
  15363. const loading = ref(false);
  15364. const listboxId = useId();
  15365. const styles = computed(() => rawAttrs.style);
  15366. const suggestionVisible = computed(() => {
  15367. return (suggestions.value.length > 0 || loading.value) && activated.value;
  15368. });
  15369. const suggestionLoading = computed(() => !props.hideLoading && loading.value);
  15370. const refInput = computed(() => {
  15371. if (inputRef.value) return Array.from(inputRef.value.$el.querySelectorAll("input"));
  15372. return [];
  15373. });
  15374. const onSuggestionShow = () => {
  15375. if (suggestionVisible.value) dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
  15376. };
  15377. const onHide = () => {
  15378. highlightedIndex.value = -1;
  15379. };
  15380. const getData = async (queryString) => {
  15381. if (suggestionDisabled.value) return;
  15382. const cb = (suggestionList) => {
  15383. loading.value = false;
  15384. if (suggestionDisabled.value) return;
  15385. if (isArray$1(suggestionList)) {
  15386. suggestions.value = suggestionList;
  15387. highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
  15388. } else throwError(COMPONENT_NAME$16, "autocomplete suggestions must be an array");
  15389. };
  15390. loading.value = true;
  15391. if (isArray$1(props.fetchSuggestions)) cb(props.fetchSuggestions);
  15392. else {
  15393. const result = await props.fetchSuggestions(queryString, cb);
  15394. if (isArray$1(result)) cb(result);
  15395. }
  15396. };
  15397. const debouncedGetData = useDebounceFn(getData, computed(() => props.debounce));
  15398. const handleInput = (value) => {
  15399. const valuePresented = !!value;
  15400. emit(INPUT_EVENT, value);
  15401. emit(UPDATE_MODEL_EVENT, value);
  15402. suggestionDisabled.value = false;
  15403. activated.value ||= valuePresented;
  15404. if (!props.triggerOnFocus && !value) {
  15405. suggestionDisabled.value = true;
  15406. suggestions.value = [];
  15407. return;
  15408. }
  15409. debouncedGetData(value);
  15410. };
  15411. const handleMouseDown = (event) => {
  15412. if (disabled.value) return;
  15413. if (event.target?.tagName !== "INPUT" || refInput.value.includes(document.activeElement)) activated.value = true;
  15414. };
  15415. const handleChange = (value) => {
  15416. emit(CHANGE_EVENT, value);
  15417. };
  15418. const handleFocus = (evt) => {
  15419. if (!ignoreFocusEvent) {
  15420. activated.value = true;
  15421. emit("focus", evt);
  15422. const queryString = props.modelValue ?? "";
  15423. if (props.triggerOnFocus && !readonly) debouncedGetData(String(queryString));
  15424. } else ignoreFocusEvent = false;
  15425. };
  15426. const handleBlur = (evt) => {
  15427. setTimeout(() => {
  15428. if (popperRef.value?.isFocusInsideContent()) {
  15429. ignoreFocusEvent = true;
  15430. return;
  15431. }
  15432. activated.value && close();
  15433. emit("blur", evt);
  15434. });
  15435. };
  15436. const handleClear = () => {
  15437. activated.value = false;
  15438. emit(UPDATE_MODEL_EVENT, "");
  15439. emit("clear");
  15440. };
  15441. const handleKeyEnter = async () => {
  15442. if (inputRef.value?.isComposing) return;
  15443. if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) handleSelect(suggestions.value[highlightedIndex.value]);
  15444. else {
  15445. if (props.selectWhenUnmatched) {
  15446. emit("select", { value: props.modelValue });
  15447. suggestions.value = [];
  15448. highlightedIndex.value = -1;
  15449. }
  15450. activated.value = true;
  15451. debouncedGetData(String(props.modelValue));
  15452. }
  15453. };
  15454. const handleKeyEscape = (evt) => {
  15455. if (suggestionVisible.value) {
  15456. evt.preventDefault();
  15457. evt.stopPropagation();
  15458. close();
  15459. }
  15460. };
  15461. const close = () => {
  15462. activated.value = false;
  15463. };
  15464. const focus = () => {
  15465. inputRef.value?.focus();
  15466. };
  15467. const blur = () => {
  15468. inputRef.value?.blur();
  15469. };
  15470. const handleSelect = async (item) => {
  15471. emit(INPUT_EVENT, item[props.valueKey]);
  15472. emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
  15473. emit("select", item);
  15474. suggestions.value = [];
  15475. highlightedIndex.value = -1;
  15476. };
  15477. const highlight = (index) => {
  15478. if (!suggestionVisible.value || loading.value) return;
  15479. if (index < 0) {
  15480. if (!props.loopNavigation) {
  15481. highlightedIndex.value = -1;
  15482. return;
  15483. }
  15484. index = suggestions.value.length - 1;
  15485. }
  15486. if (index >= suggestions.value.length) index = props.loopNavigation ? 0 : suggestions.value.length - 1;
  15487. const [suggestion, suggestionList] = getSuggestionContext();
  15488. const highlightItem = suggestionList[index];
  15489. const scrollTop = suggestion.scrollTop;
  15490. const { offsetTop, scrollHeight } = highlightItem;
  15491. if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) suggestion.scrollTop = offsetTop + scrollHeight - suggestion.clientHeight;
  15492. if (offsetTop < scrollTop) suggestion.scrollTop = offsetTop;
  15493. highlightedIndex.value = index;
  15494. inputRef.value?.ref?.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
  15495. };
  15496. const getSuggestionContext = () => {
  15497. const suggestion = regionRef.value.querySelector(`.${ns.be("suggestion", "wrap")}`);
  15498. return [suggestion, suggestion.querySelectorAll(`.${ns.be("suggestion", "list")} li`)];
  15499. };
  15500. const stopHandle = onClickOutside(listboxRef, (event) => {
  15501. if (popperRef.value?.isFocusInsideContent()) return;
  15502. const hadIgnoredFocus = ignoreFocusEvent;
  15503. ignoreFocusEvent = false;
  15504. if (!suggestionVisible.value) return;
  15505. if (hadIgnoredFocus) handleBlur(new FocusEvent("blur", event));
  15506. else close();
  15507. });
  15508. const handleKeydown = (e) => {
  15509. switch (getEventCode(e)) {
  15510. case EVENT_CODE.up:
  15511. e.preventDefault();
  15512. highlight(highlightedIndex.value - 1);
  15513. break;
  15514. case EVENT_CODE.down:
  15515. e.preventDefault();
  15516. highlight(highlightedIndex.value + 1);
  15517. break;
  15518. case EVENT_CODE.enter:
  15519. case EVENT_CODE.numpadEnter:
  15520. e.preventDefault();
  15521. handleKeyEnter();
  15522. break;
  15523. case EVENT_CODE.tab:
  15524. close();
  15525. break;
  15526. case EVENT_CODE.esc:
  15527. handleKeyEscape(e);
  15528. break;
  15529. case EVENT_CODE.home:
  15530. e.preventDefault();
  15531. highlight(0);
  15532. break;
  15533. case EVENT_CODE.end:
  15534. e.preventDefault();
  15535. highlight(suggestions.value.length - 1);
  15536. break;
  15537. case EVENT_CODE.pageUp:
  15538. e.preventDefault();
  15539. highlight(Math.max(0, highlightedIndex.value - 10));
  15540. break;
  15541. case EVENT_CODE.pageDown:
  15542. e.preventDefault();
  15543. highlight(Math.min(suggestions.value.length - 1, highlightedIndex.value + 10));
  15544. break;
  15545. }
  15546. };
  15547. onBeforeUnmount(() => {
  15548. stopHandle?.();
  15549. });
  15550. onMounted(() => {
  15551. const inputElement = inputRef.value?.ref;
  15552. if (!inputElement) return;
  15553. [
  15554. {
  15555. key: "role",
  15556. value: "textbox"
  15557. },
  15558. {
  15559. key: "aria-autocomplete",
  15560. value: "list"
  15561. },
  15562. {
  15563. key: "aria-controls",
  15564. value: listboxId.value
  15565. },
  15566. {
  15567. key: "aria-activedescendant",
  15568. value: `${listboxId.value}-item-${highlightedIndex.value}`
  15569. }
  15570. ].forEach(({ key, value }) => inputElement.setAttribute(key, value));
  15571. readonly = inputElement.hasAttribute("readonly");
  15572. });
  15573. __expose({
  15574. /** @description the index of the currently highlighted item */
  15575. highlightedIndex,
  15576. /** @description autocomplete whether activated */
  15577. activated,
  15578. /** @description remote search loading status */
  15579. loading,
  15580. /** @description el-input component instance */
  15581. inputRef,
  15582. /** @description el-tooltip component instance */
  15583. popperRef,
  15584. /** @description fetch suggestions result */
  15585. suggestions,
  15586. /** @description triggers when a suggestion is clicked */
  15587. handleSelect,
  15588. /** @description handle keyboard enter event */
  15589. handleKeyEnter,
  15590. /** @description focus the input element */
  15591. focus,
  15592. /** @description blur the input element */
  15593. blur,
  15594. /** @description close suggestion */
  15595. close,
  15596. /** @description highlight an item in a suggestion */
  15597. highlight,
  15598. /** @description loading suggestion list */
  15599. getData
  15600. });
  15601. return (_ctx, _cache) => {
  15602. return openBlock(), createBlock(unref(ElTooltip), {
  15603. ref_key: "popperRef",
  15604. ref: popperRef,
  15605. visible: suggestionVisible.value,
  15606. placement: __props.placement,
  15607. "fallback-placements": ["bottom-start", "top-start"],
  15608. "popper-class": [unref(ns).e("popper"), __props.popperClass],
  15609. "popper-style": __props.popperStyle,
  15610. "popper-options": __props.popperOptions,
  15611. "show-arrow": __props.showArrow,
  15612. teleported: __props.teleported,
  15613. "append-to": __props.appendTo,
  15614. "gpu-acceleration": false,
  15615. pure: "",
  15616. "manual-mode": "",
  15617. effect: "light",
  15618. trigger: "click",
  15619. transition: `${unref(ns).namespace.value}-zoom-in-top`,
  15620. persistent: "",
  15621. role: "listbox",
  15622. onBeforeShow: onSuggestionShow,
  15623. onHide
  15624. }, {
  15625. content: withCtx(() => [createBaseVNode("div", {
  15626. ref_key: "regionRef",
  15627. ref: regionRef,
  15628. class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", suggestionLoading.value)]),
  15629. style: normalizeStyle({
  15630. [__props.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
  15631. outline: "none"
  15632. }),
  15633. role: "region"
  15634. }, [
  15635. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  15636. key: 0,
  15637. class: normalizeClass(unref(ns).be("suggestion", "header")),
  15638. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  15639. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  15640. createVNode(unref(ElScrollbar), {
  15641. id: unref(listboxId),
  15642. tag: "ul",
  15643. "wrap-class": unref(ns).be("suggestion", "wrap"),
  15644. "view-class": unref(ns).be("suggestion", "list"),
  15645. role: "listbox"
  15646. }, {
  15647. default: withCtx(() => [suggestionLoading.value ? (openBlock(), createElementBlock("li", _hoisted_2$42, [renderSlot(_ctx.$slots, "loading", {}, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).is("loading")) }, {
  15648. default: withCtx(() => [createVNode(unref(loading_default))]),
  15649. _: 1
  15650. }, 8, ["class"])])])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
  15651. return openBlock(), createElementBlock("li", {
  15652. id: `${unref(listboxId)}-item-${index}`,
  15653. key: index,
  15654. class: normalizeClass({ highlighted: highlightedIndex.value === index }),
  15655. role: "option",
  15656. "aria-selected": highlightedIndex.value === index,
  15657. onClick: ($event) => handleSelect(item)
  15658. }, [renderSlot(_ctx.$slots, "default", { item }, () => [createTextVNode(toDisplayString(item[__props.valueKey]), 1)])], 10, _hoisted_3$19);
  15659. }), 128))]),
  15660. _: 3
  15661. }, 8, [
  15662. "id",
  15663. "wrap-class",
  15664. "view-class"
  15665. ]),
  15666. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  15667. key: 1,
  15668. class: normalizeClass(unref(ns).be("suggestion", "footer")),
  15669. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  15670. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  15671. ], 6)]),
  15672. default: withCtx(() => [createBaseVNode("div", {
  15673. ref_key: "listboxRef",
  15674. ref: listboxRef,
  15675. class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]),
  15676. style: normalizeStyle(styles.value),
  15677. role: "combobox",
  15678. "aria-haspopup": "listbox",
  15679. "aria-expanded": suggestionVisible.value,
  15680. "aria-owns": unref(listboxId)
  15681. }, [createVNode(unref(ElInput), mergeProps({
  15682. ref_key: "inputRef",
  15683. ref: inputRef
  15684. }, mergeProps(passInputProps.value, _ctx.$attrs), {
  15685. "model-value": __props.modelValue,
  15686. disabled: unref(disabled),
  15687. onInput: handleInput,
  15688. onChange: handleChange,
  15689. onFocus: handleFocus,
  15690. onBlur: handleBlur,
  15691. onClear: handleClear,
  15692. onKeydown: handleKeydown,
  15693. onMousedown: handleMouseDown
  15694. }), createSlots({ _: 2 }, [
  15695. _ctx.$slots.prepend ? {
  15696. name: "prepend",
  15697. fn: withCtx(() => [renderSlot(_ctx.$slots, "prepend")]),
  15698. key: "0"
  15699. } : void 0,
  15700. _ctx.$slots.append ? {
  15701. name: "append",
  15702. fn: withCtx(() => [renderSlot(_ctx.$slots, "append")]),
  15703. key: "1"
  15704. } : void 0,
  15705. _ctx.$slots.prefix ? {
  15706. name: "prefix",
  15707. fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
  15708. key: "2"
  15709. } : void 0,
  15710. _ctx.$slots.suffix ? {
  15711. name: "suffix",
  15712. fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
  15713. key: "3"
  15714. } : void 0
  15715. ]), 1040, ["model-value", "disabled"])], 14, _hoisted_1$75)]),
  15716. _: 3
  15717. }, 8, [
  15718. "visible",
  15719. "placement",
  15720. "popper-class",
  15721. "popper-style",
  15722. "popper-options",
  15723. "show-arrow",
  15724. "teleported",
  15725. "append-to",
  15726. "transition"
  15727. ]);
  15728. };
  15729. }
  15730. }));
  15731. //#endregion
  15732. //#region node_modules/element-plus/es/components/avatar/src/avatar.mjs
  15733. /**
  15734. * @deprecated Removed after 3.0.0, Use `AvatarProps` instead.
  15735. */
  15736. var avatarProps = buildProps({
  15737. /**
  15738. * @description avatar size.
  15739. */
  15740. size: {
  15741. type: [Number, String],
  15742. values: componentSizes,
  15743. validator: (val) => isNumber(val)
  15744. },
  15745. /**
  15746. * @description avatar shape.
  15747. */
  15748. shape: {
  15749. type: String,
  15750. values: ["circle", "square"]
  15751. },
  15752. /**
  15753. * @description representation type to icon, more info on icon component.
  15754. */
  15755. icon: { type: iconPropType },
  15756. /**
  15757. * @description the source of the image for an image avatar.
  15758. */
  15759. src: {
  15760. type: String,
  15761. default: ""
  15762. },
  15763. /**
  15764. * @description native attribute `alt` of image avatar.
  15765. */
  15766. alt: String,
  15767. /**
  15768. * @description native attribute srcset of image avatar.
  15769. */
  15770. srcSet: String,
  15771. /**
  15772. * @description set how the image fit its container for an image avatar.
  15773. */
  15774. fit: {
  15775. type: definePropType(String),
  15776. default: "cover"
  15777. }
  15778. });
  15779. var avatarEmits = { error: (evt) => evt instanceof Event };
  15780. //#endregion
  15781. //#region node_modules/element-plus/es/components/avatar/src/constants.mjs
  15782. var avatarGroupContextKey = Symbol("avatarGroupContextKey");
  15783. //#endregion
  15784. //#region node_modules/element-plus/es/components/avatar/src/avatar-group-props.mjs
  15785. var avatarGroupProps = {
  15786. /**
  15787. * @description control the size of avatars in this avatar-group
  15788. */
  15789. size: {
  15790. type: definePropType([Number, String]),
  15791. values: componentSizes,
  15792. validator: (val) => isNumber(val)
  15793. },
  15794. /**
  15795. * @description control the shape of avatars in this avatar-group
  15796. */
  15797. shape: {
  15798. type: definePropType(String),
  15799. values: ["circle", "square"]
  15800. },
  15801. /**
  15802. * @description whether to collapse avatars
  15803. */
  15804. collapseAvatars: Boolean,
  15805. /**
  15806. * @description whether show all collapsed avatars when mouse hover text of the collapse-avatar. To use this, `collapse-avatars` must be true
  15807. */
  15808. collapseAvatarsTooltip: Boolean,
  15809. /**
  15810. * @description the max avatars number to be shown. To use this, `collapse-avatars` must be true
  15811. */
  15812. maxCollapseAvatars: {
  15813. type: Number,
  15814. default: 1
  15815. },
  15816. /**
  15817. * @description tooltip theme, built-in theme: `dark` / `light`
  15818. */
  15819. effect: {
  15820. type: definePropType(String),
  15821. default: "light"
  15822. },
  15823. /**
  15824. * @description placement of tooltip
  15825. */
  15826. placement: {
  15827. type: definePropType(String),
  15828. values: Ee,
  15829. default: "top"
  15830. },
  15831. /**
  15832. * @description custom class name for tooltip
  15833. */
  15834. popperClass: useTooltipContentProps.popperClass,
  15835. /**
  15836. * @description custom style for tooltip
  15837. */
  15838. popperStyle: useTooltipContentProps.popperStyle,
  15839. /**
  15840. * @description custom class name for the collapse-avatar
  15841. */
  15842. collapseClass: String,
  15843. /**
  15844. * @description custom style for the collapse-avatar
  15845. */
  15846. collapseStyle: {
  15847. type: definePropType([
  15848. String,
  15849. Array,
  15850. Object,
  15851. Boolean
  15852. ]),
  15853. default: void 0
  15854. }
  15855. };
  15856. //#endregion
  15857. //#region node_modules/element-plus/es/components/avatar/src/avatar.vue_vue_type_script_setup_true_lang.mjs
  15858. var _hoisted_1$74 = [
  15859. "src",
  15860. "alt",
  15861. "srcset"
  15862. ];
  15863. //#endregion
  15864. //#region node_modules/element-plus/es/components/avatar/src/avatar2.mjs
  15865. var avatar_default = /* @__PURE__ */ defineComponent({
  15866. name: "ElAvatar",
  15867. __name: "avatar",
  15868. props: avatarProps,
  15869. emits: avatarEmits,
  15870. setup(__props, { emit: __emit }) {
  15871. const props = __props;
  15872. const emit = __emit;
  15873. const avatarGroupContext = inject(avatarGroupContextKey, void 0);
  15874. const ns = useNamespace("avatar");
  15875. const hasLoadError = ref(false);
  15876. const size = computed(() => props.size ?? avatarGroupContext?.size);
  15877. const shape = computed(() => props.shape ?? avatarGroupContext?.shape ?? "circle");
  15878. const avatarClass = computed(() => {
  15879. const { icon } = props;
  15880. const classList = [ns.b()];
  15881. if (isString(size.value)) classList.push(ns.m(size.value));
  15882. if (icon) classList.push(ns.m("icon"));
  15883. if (shape.value) classList.push(ns.m(shape.value));
  15884. return classList;
  15885. });
  15886. const sizeStyle = computed(() => {
  15887. return isNumber(size.value) ? ns.cssVarBlock({ size: addUnit(size.value) }) : void 0;
  15888. });
  15889. const fitStyle = computed(() => ({ objectFit: props.fit }));
  15890. watch(() => [props.src, props.srcSet], () => hasLoadError.value = false);
  15891. function handleError(e) {
  15892. hasLoadError.value = true;
  15893. emit("error", e);
  15894. }
  15895. return (_ctx, _cache) => {
  15896. return openBlock(), createElementBlock("span", {
  15897. class: normalizeClass(avatarClass.value),
  15898. style: normalizeStyle(sizeStyle.value)
  15899. }, [(__props.src || __props.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
  15900. key: 0,
  15901. src: __props.src,
  15902. alt: __props.alt,
  15903. srcset: __props.srcSet,
  15904. style: normalizeStyle(fitStyle.value),
  15905. onError: handleError
  15906. }, null, 44, _hoisted_1$74)) : __props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  15907. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  15908. _: 1
  15909. })) : renderSlot(_ctx.$slots, "default", { key: 2 })], 6);
  15910. };
  15911. }
  15912. });
  15913. //#endregion
  15914. //#region node_modules/element-plus/es/components/avatar/src/avatar-group.mjs
  15915. var avatar_group_default = /* @__PURE__ */ defineComponent({
  15916. name: "ElAvatarGroup",
  15917. props: avatarGroupProps,
  15918. setup(props, { slots }) {
  15919. const ns = useNamespace("avatar-group");
  15920. provide(avatarGroupContextKey, reactive({
  15921. size: toRef(props, "size"),
  15922. shape: toRef(props, "shape")
  15923. }));
  15924. return () => {
  15925. const avatars = flattedChildren(slots.default?.() ?? []);
  15926. let visibleAvatars = avatars;
  15927. if (props.collapseAvatars && avatars.length > props.maxCollapseAvatars) {
  15928. visibleAvatars = avatars.slice(0, props.maxCollapseAvatars);
  15929. const hiddenAvatars = avatars.slice(props.maxCollapseAvatars);
  15930. visibleAvatars.push(createVNode(ElTooltip, {
  15931. "popperClass": props.popperClass,
  15932. "popperStyle": props.popperStyle,
  15933. "placement": props.placement,
  15934. "effect": props.effect,
  15935. "disabled": !props.collapseAvatarsTooltip
  15936. }, {
  15937. default: () => createVNode(avatar_default, {
  15938. "size": props.size,
  15939. "shape": props.shape,
  15940. "class": props.collapseClass,
  15941. "style": props.collapseStyle
  15942. }, { default: () => [createTextVNode("+ "), hiddenAvatars.length] }),
  15943. content: () => createVNode("div", { "class": ns.e("collapse-avatars") }, [hiddenAvatars.map((node, idx) => isVNode(node) ? cloneVNode(node, { key: node.key ?? idx }) : node)])
  15944. }));
  15945. }
  15946. return createVNode("div", { "class": ns.b() }, [visibleAvatars]);
  15947. };
  15948. }
  15949. });
  15950. //#endregion
  15951. //#region node_modules/element-plus/es/components/avatar/index.mjs
  15952. var ElAvatar = withInstall(avatar_default, { AvatarGroup: avatar_group_default });
  15953. var ElAvatarGroup = withNoopInstall(avatar_group_default);
  15954. //#endregion
  15955. //#region node_modules/element-plus/es/components/backtop/src/backtop.mjs
  15956. /**
  15957. * @deprecated Removed after 3.0.0, Use `BacktopProps` instead.
  15958. */
  15959. var backtopProps = {
  15960. /**
  15961. * @description the button will not show until the scroll height reaches this value.
  15962. */
  15963. visibilityHeight: {
  15964. type: Number,
  15965. default: 200
  15966. },
  15967. /**
  15968. * @description the target to trigger scroll.
  15969. */
  15970. target: {
  15971. type: String,
  15972. default: ""
  15973. },
  15974. /**
  15975. * @description right distance.
  15976. */
  15977. right: {
  15978. type: Number,
  15979. default: 40
  15980. },
  15981. /**
  15982. * @description bottom distance.
  15983. */
  15984. bottom: {
  15985. type: Number,
  15986. default: 40
  15987. }
  15988. };
  15989. var backtopEmits = { click: (evt) => evt instanceof MouseEvent };
  15990. //#endregion
  15991. //#region node_modules/element-plus/es/components/backtop/src/use-backtop.mjs
  15992. var useBackTop = (props, emit, componentName) => {
  15993. const el = shallowRef();
  15994. const container = shallowRef();
  15995. const visible = ref(false);
  15996. const handleScroll = () => {
  15997. if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight;
  15998. };
  15999. const handleClick = (event) => {
  16000. el.value?.scrollTo({
  16001. top: 0,
  16002. behavior: "smooth"
  16003. });
  16004. emit("click", event);
  16005. };
  16006. useEventListener(container, "scroll", useThrottleFn(handleScroll, 300, true));
  16007. onMounted(() => {
  16008. container.value = document;
  16009. el.value = document.documentElement;
  16010. if (props.target) {
  16011. el.value = document.querySelector(props.target) ?? void 0;
  16012. if (!el.value) throwError(componentName, `target does not exist: ${props.target}`);
  16013. container.value = el.value;
  16014. }
  16015. handleScroll();
  16016. });
  16017. return {
  16018. visible,
  16019. handleClick
  16020. };
  16021. };
  16022. //#endregion
  16023. //#region node_modules/element-plus/es/components/backtop/src/backtop.vue_vue_type_script_setup_true_lang.mjs
  16024. var COMPONENT_NAME$15 = "ElBacktop";
  16025. //#endregion
  16026. //#region node_modules/element-plus/es/components/backtop/index.mjs
  16027. var ElBacktop = withInstall(/* @__PURE__ */ defineComponent({
  16028. name: COMPONENT_NAME$15,
  16029. __name: "backtop",
  16030. props: backtopProps,
  16031. emits: backtopEmits,
  16032. setup(__props, { emit: __emit }) {
  16033. const props = __props;
  16034. const emit = __emit;
  16035. const ns = useNamespace("backtop");
  16036. const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$15);
  16037. const backTopStyle = computed(() => ({
  16038. right: `${props.right}px`,
  16039. bottom: `${props.bottom}px`
  16040. }));
  16041. return (_ctx, _cache) => {
  16042. return openBlock(), createBlock(Transition, { name: `${unref(ns).namespace.value}-fade-in` }, {
  16043. default: withCtx(() => [unref(visible) ? (openBlock(), createElementBlock("div", {
  16044. key: 0,
  16045. style: normalizeStyle(backTopStyle.value),
  16046. class: normalizeClass(unref(ns).b()),
  16047. onClick: _cache[0] || (_cache[0] = withModifiers((...args) => unref(handleClick) && unref(handleClick)(...args), ["stop"]))
  16048. }, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("icon")) }, {
  16049. default: withCtx(() => [createVNode(unref(caret_top_default))]),
  16050. _: 1
  16051. }, 8, ["class"])])], 6)) : createCommentVNode("v-if", true)]),
  16052. _: 3
  16053. }, 8, ["name"]);
  16054. };
  16055. }
  16056. }));
  16057. //#endregion
  16058. //#region node_modules/element-plus/es/components/badge/src/badge.mjs
  16059. /**
  16060. * @deprecated Removed after 3.0.0, Use `BadgeProps` instead.
  16061. */
  16062. var badgeProps = buildProps({
  16063. /**
  16064. * @description display value.
  16065. */
  16066. value: {
  16067. type: [String, Number],
  16068. default: ""
  16069. },
  16070. /**
  16071. * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.
  16072. */
  16073. max: {
  16074. type: Number,
  16075. default: 99
  16076. },
  16077. /**
  16078. * @description if a little dot is displayed.
  16079. */
  16080. isDot: Boolean,
  16081. /**
  16082. * @description hidden badge.
  16083. */
  16084. hidden: Boolean,
  16085. /**
  16086. * @description badge type.
  16087. */
  16088. type: {
  16089. type: String,
  16090. values: [
  16091. "primary",
  16092. "success",
  16093. "warning",
  16094. "info",
  16095. "danger"
  16096. ],
  16097. default: "danger"
  16098. },
  16099. /**
  16100. * @description whether to show badge when value is zero.
  16101. */
  16102. showZero: {
  16103. type: Boolean,
  16104. default: true
  16105. },
  16106. /**
  16107. * @description customize dot background color
  16108. */
  16109. color: String,
  16110. /**
  16111. * @description CSS style of badge
  16112. */
  16113. badgeStyle: {
  16114. type: definePropType([
  16115. String,
  16116. Object,
  16117. Array,
  16118. Boolean
  16119. ]),
  16120. default: void 0
  16121. },
  16122. /**
  16123. * @description set offset of the badge
  16124. */
  16125. offset: {
  16126. type: definePropType(Array),
  16127. default: () => [0, 0]
  16128. },
  16129. /**
  16130. * @description custom class name of badge
  16131. */
  16132. badgeClass: { type: String }
  16133. });
  16134. //#endregion
  16135. //#region node_modules/element-plus/es/components/badge/index.mjs
  16136. var ElBadge = withInstall(/* @__PURE__ */ defineComponent({
  16137. name: "ElBadge",
  16138. __name: "badge",
  16139. props: badgeProps,
  16140. setup(__props, { expose: __expose }) {
  16141. const props = __props;
  16142. const ns = useNamespace("badge");
  16143. const content = computed(() => {
  16144. if (props.isDot) return "";
  16145. if (isNumber(props.value) && isNumber(props.max)) return props.max < props.value ? `${props.max}+` : `${props.value}`;
  16146. return `${props.value}`;
  16147. });
  16148. const style = computed(() => {
  16149. return [{
  16150. backgroundColor: props.color,
  16151. marginRight: addUnit(-props.offset[0]),
  16152. marginTop: addUnit(props.offset[1])
  16153. }, props.badgeStyle ?? {}];
  16154. });
  16155. __expose({
  16156. /** @description badge content */
  16157. content });
  16158. return (_ctx, _cache) => {
  16159. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [renderSlot(_ctx.$slots, "default"), createVNode(Transition, { name: `${unref(ns).namespace.value}-zoom-in-center` }, {
  16160. default: withCtx(() => [!__props.hidden && (content.value || __props.isDot || _ctx.$slots.content) ? (openBlock(), createElementBlock("sup", {
  16161. key: 0,
  16162. class: normalizeClass([
  16163. unref(ns).e("content"),
  16164. unref(ns).em("content", __props.type),
  16165. unref(ns).is("fixed", !!_ctx.$slots.default),
  16166. unref(ns).is("dot", __props.isDot),
  16167. unref(ns).is("hide-zero", !__props.showZero && __props.value === 0),
  16168. __props.badgeClass
  16169. ]),
  16170. style: normalizeStyle(style.value)
  16171. }, [renderSlot(_ctx.$slots, "content", { value: content.value }, () => [createTextVNode(toDisplayString(content.value), 1)])], 6)) : createCommentVNode("v-if", true)]),
  16172. _: 3
  16173. }, 8, ["name"])], 2);
  16174. };
  16175. }
  16176. }));
  16177. //#endregion
  16178. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.mjs
  16179. /**
  16180. * @deprecated Removed after 3.0.0, Use `BreadcrumbProps` instead.
  16181. */
  16182. var breadcrumbProps = buildProps({
  16183. /**
  16184. * @description separator character
  16185. */
  16186. separator: {
  16187. type: String,
  16188. default: "/"
  16189. },
  16190. /**
  16191. * @description icon component of icon separator
  16192. */
  16193. separatorIcon: { type: iconPropType }
  16194. });
  16195. //#endregion
  16196. //#region node_modules/element-plus/es/components/breadcrumb/src/constants.mjs
  16197. var breadcrumbKey = Symbol("breadcrumbKey");
  16198. //#endregion
  16199. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item.mjs
  16200. /**
  16201. * @deprecated Removed after 3.0.0, Use `BreadcrumbItemProps` instead.
  16202. */
  16203. var breadcrumbItemProps = buildProps({
  16204. /**
  16205. * @description target route of the link, same as `to` of `vue-router`
  16206. */
  16207. to: {
  16208. type: definePropType([String, Object]),
  16209. default: ""
  16210. },
  16211. /**
  16212. * @description if `true`, the navigation will not leave a history record
  16213. */
  16214. replace: Boolean
  16215. });
  16216. //#endregion
  16217. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.vue_vue_type_script_setup_true_lang.mjs
  16218. var _hoisted_1$73 = ["aria-label"];
  16219. //#endregion
  16220. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb2.mjs
  16221. var breadcrumb_default = /* @__PURE__ */ defineComponent({
  16222. name: "ElBreadcrumb",
  16223. __name: "breadcrumb",
  16224. props: breadcrumbProps,
  16225. setup(__props) {
  16226. const { t } = useLocale();
  16227. const props = __props;
  16228. const ns = useNamespace("breadcrumb");
  16229. const breadcrumb = ref();
  16230. provide(breadcrumbKey, props);
  16231. onMounted(() => {
  16232. const items = breadcrumb.value.querySelectorAll(`.${ns.e("item")}`);
  16233. if (items.length) items[items.length - 1].setAttribute("aria-current", "page");
  16234. });
  16235. return (_ctx, _cache) => {
  16236. return openBlock(), createElementBlock("div", {
  16237. ref_key: "breadcrumb",
  16238. ref: breadcrumb,
  16239. class: normalizeClass(unref(ns).b()),
  16240. "aria-label": unref(t)("el.breadcrumb.label"),
  16241. role: "navigation"
  16242. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$73);
  16243. };
  16244. }
  16245. });
  16246. //#endregion
  16247. //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item2.mjs
  16248. var breadcrumb_item_default = /* @__PURE__ */ defineComponent({
  16249. name: "ElBreadcrumbItem",
  16250. __name: "breadcrumb-item",
  16251. props: breadcrumbItemProps,
  16252. setup(__props) {
  16253. const props = __props;
  16254. const instance = getCurrentInstance();
  16255. const breadcrumbContext = inject(breadcrumbKey, void 0);
  16256. const ns = useNamespace("breadcrumb");
  16257. const router = instance.appContext.config.globalProperties.$router;
  16258. const onClick = () => {
  16259. if (!props.to || !router) return;
  16260. props.replace ? router.replace(props.to) : router.push(props.to);
  16261. };
  16262. return (_ctx, _cache) => {
  16263. return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("item")) }, [createBaseVNode("span", {
  16264. class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!__props.to)]),
  16265. role: "link",
  16266. onClick
  16267. }, [renderSlot(_ctx.$slots, "default")], 2), unref(breadcrumbContext)?.separatorIcon ? (openBlock(), createBlock(unref(ElIcon), {
  16268. key: 0,
  16269. class: normalizeClass(unref(ns).e("separator"))
  16270. }, {
  16271. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))]),
  16272. _: 1
  16273. }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
  16274. key: 1,
  16275. class: normalizeClass(unref(ns).e("separator")),
  16276. role: "presentation"
  16277. }, toDisplayString(unref(breadcrumbContext)?.separator), 3))], 2);
  16278. };
  16279. }
  16280. });
  16281. //#endregion
  16282. //#region node_modules/element-plus/es/components/breadcrumb/index.mjs
  16283. var ElBreadcrumb = withInstall(breadcrumb_default, { BreadcrumbItem: breadcrumb_item_default });
  16284. var ElBreadcrumbItem = withNoopInstall(breadcrumb_item_default);
  16285. //#endregion
  16286. //#region node_modules/element-plus/es/components/button/src/button.mjs
  16287. var buttonTypes = [
  16288. "default",
  16289. "primary",
  16290. "success",
  16291. "warning",
  16292. "info",
  16293. "danger",
  16294. "text",
  16295. ""
  16296. ];
  16297. var buttonNativeTypes = [
  16298. "button",
  16299. "submit",
  16300. "reset"
  16301. ];
  16302. /**
  16303. * @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
  16304. */
  16305. var buttonProps = buildProps({
  16306. /**
  16307. * @description button size
  16308. */
  16309. size: useSizeProp,
  16310. /**
  16311. * @description disable the button
  16312. */
  16313. disabled: {
  16314. type: Boolean,
  16315. default: void 0
  16316. },
  16317. /**
  16318. * @description button type
  16319. */
  16320. type: {
  16321. type: String,
  16322. values: buttonTypes,
  16323. default: ""
  16324. },
  16325. /**
  16326. * @description icon component
  16327. */
  16328. icon: { type: iconPropType },
  16329. /**
  16330. * @description native button type
  16331. */
  16332. nativeType: {
  16333. type: String,
  16334. values: buttonNativeTypes,
  16335. default: "button"
  16336. },
  16337. /**
  16338. * @description determine whether it's loading
  16339. */
  16340. loading: Boolean,
  16341. /**
  16342. * @description customize loading icon component
  16343. */
  16344. loadingIcon: {
  16345. type: iconPropType,
  16346. default: () => loading_default
  16347. },
  16348. /**
  16349. * @description determine whether it's a plain button
  16350. */
  16351. plain: {
  16352. type: Boolean,
  16353. default: void 0
  16354. },
  16355. /**
  16356. * @description determine whether it's a text button
  16357. */
  16358. text: {
  16359. type: Boolean,
  16360. default: void 0
  16361. },
  16362. /**
  16363. * @description determine whether it's a link button
  16364. */
  16365. link: Boolean,
  16366. /**
  16367. * @description determine whether the text button background color is always on
  16368. */
  16369. bg: Boolean,
  16370. /**
  16371. * @description native button autofocus
  16372. */
  16373. autofocus: Boolean,
  16374. /**
  16375. * @description determine whether it's a round button
  16376. */
  16377. round: {
  16378. type: Boolean,
  16379. default: void 0
  16380. },
  16381. /**
  16382. * @description determine whether it's a circle button
  16383. */
  16384. circle: Boolean,
  16385. /**
  16386. * @description determine whether it's a dashed button
  16387. */
  16388. dashed: {
  16389. type: Boolean,
  16390. default: void 0
  16391. },
  16392. /**
  16393. * @description custom button color, automatically calculate `hover` and `active` color
  16394. */
  16395. color: String,
  16396. /**
  16397. * @description dark mode, which automatically converts `color` to dark mode colors
  16398. */
  16399. dark: Boolean,
  16400. /**
  16401. * @description automatically insert a space between two chinese characters
  16402. */
  16403. autoInsertSpace: {
  16404. type: Boolean,
  16405. default: void 0
  16406. },
  16407. /**
  16408. * @description custom element tag
  16409. */
  16410. tag: {
  16411. type: definePropType([String, Object]),
  16412. default: "button"
  16413. }
  16414. });
  16415. var buttonEmits = { click: (evt) => evt instanceof MouseEvent };
  16416. //#endregion
  16417. //#region node_modules/element-plus/es/components/config-provider/src/constants.mjs
  16418. var configProviderContextKey = Symbol();
  16419. //#endregion
  16420. //#region node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.mjs
  16421. var globalConfig = ref();
  16422. function useGlobalConfig(key, defaultValue = void 0) {
  16423. const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
  16424. if (key) return computed(() => config.value?.[key] ?? defaultValue);
  16425. else return config;
  16426. }
  16427. function useGlobalComponentSettings(block, sizeFallback) {
  16428. const config = useGlobalConfig();
  16429. const ns = useNamespace(block, computed(() => config.value?.namespace || "el"));
  16430. const locale = useLocale(computed(() => config.value?.locale));
  16431. const zIndex = useZIndex(computed(() => {
  16432. const zIndex = config.value?.zIndex;
  16433. return isNil(zIndex) || Number.isNaN(zIndex) ? defaultInitialZIndex : zIndex;
  16434. }));
  16435. const size = computed(() => unref(sizeFallback) || config.value?.size || "");
  16436. provideGlobalConfig(computed(() => unref(config) || {}));
  16437. return {
  16438. ns,
  16439. locale,
  16440. zIndex,
  16441. size
  16442. };
  16443. }
  16444. var provideGlobalConfig = (config, app, global = false) => {
  16445. const inSetup = !!getCurrentInstance();
  16446. const oldConfig = inSetup ? useGlobalConfig() : void 0;
  16447. const provideFn = app?.provide ?? (inSetup ? provide : void 0);
  16448. if (!provideFn) {
  16449. debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
  16450. return;
  16451. }
  16452. const context = computed(() => {
  16453. const cfg = unref(config);
  16454. if (!oldConfig?.value) return cfg;
  16455. return mergeConfig(oldConfig.value, cfg);
  16456. });
  16457. provideFn(configProviderContextKey, context);
  16458. provideFn(localeContextKey, computed(() => context.value.locale));
  16459. provideFn(namespaceContextKey, computed(() => context.value.namespace));
  16460. provideFn(zIndexContextKey, computed(() => context.value.zIndex));
  16461. provideFn(SIZE_INJECTION_KEY, { size: computed(() => context.value.size || "") });
  16462. provideFn(emptyValuesContextKey, computed(() => ({
  16463. emptyValues: context.value.emptyValues,
  16464. valueOnClear: context.value.valueOnClear
  16465. })));
  16466. if (global || !globalConfig.value) globalConfig.value = context.value;
  16467. return context;
  16468. };
  16469. var mergeConfig = (a, b) => {
  16470. const keys = [...new Set([...keysOf(a), ...keysOf(b)])];
  16471. const obj = {};
  16472. for (const key of keys) obj[key] = b[key] !== void 0 ? b[key] : a[key];
  16473. return obj;
  16474. };
  16475. //#endregion
  16476. //#region node_modules/element-plus/es/components/config-provider/src/config-provider-props.mjs
  16477. var configProviderProps = buildProps({
  16478. /**
  16479. * @description Controlling if the users want a11y features
  16480. */
  16481. a11y: {
  16482. type: Boolean,
  16483. default: true
  16484. },
  16485. /**
  16486. * @description Locale Object
  16487. */
  16488. locale: { type: definePropType(Object) },
  16489. /**
  16490. * @description global component size
  16491. */
  16492. size: useSizeProp,
  16493. /**
  16494. * @description button related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#button-attribute)
  16495. */
  16496. button: { type: definePropType(Object) },
  16497. /**
  16498. * @description card related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#card-attribute)
  16499. */
  16500. card: { type: definePropType(Object) },
  16501. /**
  16502. * @description dialog related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#dialog-attribute)
  16503. */
  16504. dialog: { type: definePropType(Object) },
  16505. /**
  16506. * @description link related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#link-attribute)
  16507. */
  16508. link: { type: definePropType(Object) },
  16509. /**
  16510. * @description features at experimental stage to be added, all features are default to be set to false, [see the following table](https://element-plus.org/en-US/component/config-provider.html#experimental-features) | ^[object]
  16511. */
  16512. experimentalFeatures: { type: definePropType(Object) },
  16513. /**
  16514. * @description Controls if we should handle keyboard navigation
  16515. */
  16516. keyboardNavigation: {
  16517. type: Boolean,
  16518. default: true
  16519. },
  16520. /**
  16521. * @description message related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#message-attribute)
  16522. */
  16523. message: { type: definePropType(Object) },
  16524. /**
  16525. * @description global Initial zIndex
  16526. */
  16527. zIndex: Number,
  16528. /**
  16529. * @description global component className prefix (cooperated with [$namespace](https://github.com/element-plus/element-plus/blob/dev/packages/theme-chalk/src/mixins/config.scss#L1)) | ^[string]
  16530. */
  16531. namespace: {
  16532. type: String,
  16533. default: "el"
  16534. },
  16535. /**
  16536. * @description table related configuration, [see the following table](https://element-plus.org/en-US/component/config-provider.html#table-attribute)
  16537. */
  16538. table: { type: definePropType(Object) },
  16539. ...useEmptyValuesProps
  16540. });
  16541. //#endregion
  16542. //#region node_modules/element-plus/es/components/config-provider/src/config-provider.mjs
  16543. var messageConfig = { placement: "top" };
  16544. //#endregion
  16545. //#region node_modules/element-plus/es/components/config-provider/index.mjs
  16546. var ElConfigProvider = withInstall(defineComponent({
  16547. name: "ElConfigProvider",
  16548. props: configProviderProps,
  16549. setup(props, { slots }) {
  16550. const config = provideGlobalConfig(props);
  16551. watch(() => props.message, (val) => {
  16552. Object.assign(messageConfig, config?.value?.message ?? {}, val ?? {});
  16553. }, {
  16554. immediate: true,
  16555. deep: true
  16556. });
  16557. return () => renderSlot(slots, "default", { config: config?.value });
  16558. }
  16559. }));
  16560. //#endregion
  16561. //#region node_modules/element-plus/es/components/button/src/constants.mjs
  16562. var buttonGroupContextKey = Symbol("buttonGroupContextKey");
  16563. //#endregion
  16564. //#region node_modules/element-plus/es/components/button/src/use-button.mjs
  16565. var useButton = (props, emit) => {
  16566. useDeprecated({
  16567. from: "type.text",
  16568. replacement: "link",
  16569. version: "3.0.0",
  16570. scope: "props",
  16571. ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  16572. }, computed(() => props.type === "text"));
  16573. const buttonGroupContext = inject(buttonGroupContextKey, void 0);
  16574. const globalConfig = useGlobalConfig("button");
  16575. const { form } = useFormItem();
  16576. const _size = useFormSize(computed(() => buttonGroupContext?.size));
  16577. const _disabled = useFormDisabled();
  16578. const _ref = ref();
  16579. const slots = useSlots();
  16580. const _type = computed(() => props.type || buttonGroupContext?.type || globalConfig.value?.type || "");
  16581. const autoInsertSpace = computed(() => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false);
  16582. const _plain = computed(() => props.plain ?? globalConfig.value?.plain ?? false);
  16583. const _round = computed(() => props.round ?? globalConfig.value?.round ?? false);
  16584. const _text = computed(() => props.text ?? globalConfig.value?.text ?? false);
  16585. const _dashed = computed(() => props.dashed ?? globalConfig.value?.dashed ?? false);
  16586. const _props = computed(() => {
  16587. if (props.tag === "button") return {
  16588. ariaDisabled: _disabled.value || props.loading,
  16589. disabled: _disabled.value || props.loading,
  16590. autofocus: props.autofocus,
  16591. type: props.nativeType
  16592. };
  16593. return {};
  16594. });
  16595. const shouldAddSpace = computed(() => {
  16596. const defaultSlot = slots.default?.();
  16597. if (autoInsertSpace.value && defaultSlot?.length === 1) {
  16598. const slot = defaultSlot[0];
  16599. if (slot?.type === Text) {
  16600. const text = slot.children;
  16601. return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
  16602. }
  16603. }
  16604. return false;
  16605. });
  16606. const handleClick = (evt) => {
  16607. if (_disabled.value || props.loading) {
  16608. evt.stopPropagation();
  16609. return;
  16610. }
  16611. if (props.nativeType === "reset") form?.resetFields();
  16612. emit("click", evt);
  16613. };
  16614. return {
  16615. _disabled,
  16616. _size,
  16617. _type,
  16618. _ref,
  16619. _props,
  16620. _plain,
  16621. _round,
  16622. _text,
  16623. _dashed,
  16624. shouldAddSpace,
  16625. handleClick
  16626. };
  16627. };
  16628. //#endregion
  16629. //#region node_modules/@ctrl/tinycolor/dist/module/util.js
  16630. /**
  16631. * Take input from [0, n] and return it as [0, 1]
  16632. * @hidden
  16633. */
  16634. function bound01(n, max) {
  16635. if (isOnePointZero(n)) n = "100%";
  16636. const isPercent = isPercentage(n);
  16637. n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
  16638. if (isPercent) n = parseInt(String(n * max), 10) / 100;
  16639. if (Math.abs(n - max) < 1e-6) return 1;
  16640. if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
  16641. else n = n % max / parseFloat(String(max));
  16642. return n;
  16643. }
  16644. /**
  16645. * Force a number between 0 and 1
  16646. * @hidden
  16647. */
  16648. function clamp01(val) {
  16649. return Math.min(1, Math.max(0, val));
  16650. }
  16651. /**
  16652. * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  16653. * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  16654. * @hidden
  16655. */
  16656. function isOnePointZero(n) {
  16657. return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
  16658. }
  16659. /**
  16660. * Check to see if string passed in is a percentage
  16661. * @hidden
  16662. */
  16663. function isPercentage(n) {
  16664. return typeof n === "string" && n.indexOf("%") !== -1;
  16665. }
  16666. /**
  16667. * Return a valid alpha value [0,1] with all invalid values being set to 1
  16668. * @hidden
  16669. */
  16670. function boundAlpha(a) {
  16671. a = parseFloat(a);
  16672. if (isNaN(a) || a < 0 || a > 1) a = 1;
  16673. return a;
  16674. }
  16675. /**
  16676. * Replace a decimal with it's percentage value
  16677. * @hidden
  16678. */
  16679. function convertToPercentage(n) {
  16680. if (Number(n) <= 1) return `${Number(n) * 100}%`;
  16681. return n;
  16682. }
  16683. /**
  16684. * Force a hex value to have 2 characters
  16685. * @hidden
  16686. */
  16687. function pad2(c) {
  16688. return c.length === 1 ? "0" + c : String(c);
  16689. }
  16690. //#endregion
  16691. //#region node_modules/@ctrl/tinycolor/dist/module/conversion.js
  16692. /**
  16693. * Handle bounds / percentage checking to conform to CSS color spec
  16694. * <http://www.w3.org/TR/css3-color/>
  16695. * *Assumes:* r, g, b in [0, 255] or [0, 1]
  16696. * *Returns:* { r, g, b } in [0, 255]
  16697. */
  16698. function rgbToRgb(r, g, b) {
  16699. return {
  16700. r: bound01(r, 255) * 255,
  16701. g: bound01(g, 255) * 255,
  16702. b: bound01(b, 255) * 255
  16703. };
  16704. }
  16705. /**
  16706. * Converts an RGB color value to HSL.
  16707. * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
  16708. * *Returns:* { h, s, l } in [0,1]
  16709. */
  16710. function rgbToHsl(r, g, b) {
  16711. r = bound01(r, 255);
  16712. g = bound01(g, 255);
  16713. b = bound01(b, 255);
  16714. const max = Math.max(r, g, b);
  16715. const min = Math.min(r, g, b);
  16716. let h = 0;
  16717. let s = 0;
  16718. const l = (max + min) / 2;
  16719. if (max === min) {
  16720. s = 0;
  16721. h = 0;
  16722. } else {
  16723. const d = max - min;
  16724. s = l > .5 ? d / (2 - max - min) : d / (max + min);
  16725. switch (max) {
  16726. case r:
  16727. h = (g - b) / d + (g < b ? 6 : 0);
  16728. break;
  16729. case g:
  16730. h = (b - r) / d + 2;
  16731. break;
  16732. case b:
  16733. h = (r - g) / d + 4;
  16734. break;
  16735. default: break;
  16736. }
  16737. h /= 6;
  16738. }
  16739. return {
  16740. h,
  16741. s,
  16742. l
  16743. };
  16744. }
  16745. function hue2rgb(p, q, t) {
  16746. if (t < 0) t += 1;
  16747. if (t > 1) t -= 1;
  16748. if (t < 1 / 6) return p + (q - p) * (6 * t);
  16749. if (t < 1 / 2) return q;
  16750. if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
  16751. return p;
  16752. }
  16753. /**
  16754. * Converts an HSL color value to RGB.
  16755. *
  16756. * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
  16757. * *Returns:* { r, g, b } in the set [0, 255]
  16758. */
  16759. function hslToRgb(h, s, l) {
  16760. let r;
  16761. let g;
  16762. let b;
  16763. h = bound01(h, 360);
  16764. s = bound01(s, 100);
  16765. l = bound01(l, 100);
  16766. if (s === 0) {
  16767. g = l;
  16768. b = l;
  16769. r = l;
  16770. } else {
  16771. const q = l < .5 ? l * (1 + s) : l + s - l * s;
  16772. const p = 2 * l - q;
  16773. r = hue2rgb(p, q, h + 1 / 3);
  16774. g = hue2rgb(p, q, h);
  16775. b = hue2rgb(p, q, h - 1 / 3);
  16776. }
  16777. return {
  16778. r: r * 255,
  16779. g: g * 255,
  16780. b: b * 255
  16781. };
  16782. }
  16783. /**
  16784. * Converts an RGB color value to HSV
  16785. *
  16786. * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  16787. * *Returns:* { h, s, v } in [0,1]
  16788. */
  16789. function rgbToHsv(r, g, b) {
  16790. r = bound01(r, 255);
  16791. g = bound01(g, 255);
  16792. b = bound01(b, 255);
  16793. const max = Math.max(r, g, b);
  16794. const min = Math.min(r, g, b);
  16795. let h = 0;
  16796. const v = max;
  16797. const d = max - min;
  16798. const s = max === 0 ? 0 : d / max;
  16799. if (max === min) h = 0;
  16800. else {
  16801. switch (max) {
  16802. case r:
  16803. h = (g - b) / d + (g < b ? 6 : 0);
  16804. break;
  16805. case g:
  16806. h = (b - r) / d + 2;
  16807. break;
  16808. case b:
  16809. h = (r - g) / d + 4;
  16810. break;
  16811. default: break;
  16812. }
  16813. h /= 6;
  16814. }
  16815. return {
  16816. h,
  16817. s,
  16818. v
  16819. };
  16820. }
  16821. /**
  16822. * Converts an HSV color value to RGB.
  16823. *
  16824. * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  16825. * *Returns:* { r, g, b } in the set [0, 255]
  16826. */
  16827. function hsvToRgb(h, s, v) {
  16828. h = bound01(h, 360) * 6;
  16829. s = bound01(s, 100);
  16830. v = bound01(v, 100);
  16831. const i = Math.floor(h);
  16832. const f = h - i;
  16833. const p = v * (1 - s);
  16834. const q = v * (1 - f * s);
  16835. const t = v * (1 - (1 - f) * s);
  16836. const mod = i % 6;
  16837. const r = [
  16838. v,
  16839. q,
  16840. p,
  16841. p,
  16842. t,
  16843. v
  16844. ][mod];
  16845. const g = [
  16846. t,
  16847. v,
  16848. v,
  16849. q,
  16850. p,
  16851. p
  16852. ][mod];
  16853. const b = [
  16854. p,
  16855. p,
  16856. t,
  16857. v,
  16858. v,
  16859. q
  16860. ][mod];
  16861. return {
  16862. r: r * 255,
  16863. g: g * 255,
  16864. b: b * 255
  16865. };
  16866. }
  16867. /**
  16868. * Converts an RGB color to hex
  16869. *
  16870. * *Assumes:* r, g, and b are contained in the set [0, 255]
  16871. * *Returns:* a 3 or 6 character hex
  16872. */
  16873. function rgbToHex(r, g, b, allow3Char) {
  16874. const hex = [
  16875. pad2(Math.round(r).toString(16)),
  16876. pad2(Math.round(g).toString(16)),
  16877. pad2(Math.round(b).toString(16))
  16878. ];
  16879. if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
  16880. return hex.join("");
  16881. }
  16882. /**
  16883. * Converts an RGBA color plus alpha transparency to hex
  16884. *
  16885. * *Assumes:* r, g, b are contained in the set [0, 255] and a in [0, 1]
  16886. * *Returns:* a 4 or 8 character rgba hex
  16887. */
  16888. function rgbaToHex(r, g, b, a, allow4Char) {
  16889. const hex = [
  16890. pad2(Math.round(r).toString(16)),
  16891. pad2(Math.round(g).toString(16)),
  16892. pad2(Math.round(b).toString(16)),
  16893. pad2(convertDecimalToHex(a))
  16894. ];
  16895. if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
  16896. return hex.join("");
  16897. }
  16898. /**
  16899. * Converts CMYK to RBG
  16900. * Assumes c, m, y, k are in the set [0, 100]
  16901. */
  16902. function cmykToRgb(c, m, y, k) {
  16903. const cConv = c / 100;
  16904. const mConv = m / 100;
  16905. const yConv = y / 100;
  16906. const kConv = k / 100;
  16907. return {
  16908. r: 255 * (1 - cConv) * (1 - kConv),
  16909. g: 255 * (1 - mConv) * (1 - kConv),
  16910. b: 255 * (1 - yConv) * (1 - kConv)
  16911. };
  16912. }
  16913. function rgbToCmyk(r, g, b) {
  16914. let c = 1 - r / 255;
  16915. let m = 1 - g / 255;
  16916. let y = 1 - b / 255;
  16917. let k = Math.min(c, m, y);
  16918. if (k === 1) {
  16919. c = 0;
  16920. m = 0;
  16921. y = 0;
  16922. } else {
  16923. c = (c - k) / (1 - k) * 100;
  16924. m = (m - k) / (1 - k) * 100;
  16925. y = (y - k) / (1 - k) * 100;
  16926. }
  16927. k *= 100;
  16928. return {
  16929. c: Math.round(c),
  16930. m: Math.round(m),
  16931. y: Math.round(y),
  16932. k: Math.round(k)
  16933. };
  16934. }
  16935. /** Converts a decimal to a hex value */
  16936. function convertDecimalToHex(d) {
  16937. return Math.round(parseFloat(d) * 255).toString(16);
  16938. }
  16939. /** Converts a hex value to a decimal */
  16940. function convertHexToDecimal(h) {
  16941. return parseIntFromHex(h) / 255;
  16942. }
  16943. /** Parse a base-16 hex value into a base-10 integer */
  16944. function parseIntFromHex(val) {
  16945. return parseInt(val, 16);
  16946. }
  16947. function numberInputToObject(color) {
  16948. return {
  16949. r: color >> 16,
  16950. g: (color & 65280) >> 8,
  16951. b: color & 255
  16952. };
  16953. }
  16954. //#endregion
  16955. //#region node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
  16956. /**
  16957. * @hidden
  16958. */
  16959. var names = {
  16960. aliceblue: "#f0f8ff",
  16961. antiquewhite: "#faebd7",
  16962. aqua: "#00ffff",
  16963. aquamarine: "#7fffd4",
  16964. azure: "#f0ffff",
  16965. beige: "#f5f5dc",
  16966. bisque: "#ffe4c4",
  16967. black: "#000000",
  16968. blanchedalmond: "#ffebcd",
  16969. blue: "#0000ff",
  16970. blueviolet: "#8a2be2",
  16971. brown: "#a52a2a",
  16972. burlywood: "#deb887",
  16973. cadetblue: "#5f9ea0",
  16974. chartreuse: "#7fff00",
  16975. chocolate: "#d2691e",
  16976. coral: "#ff7f50",
  16977. cornflowerblue: "#6495ed",
  16978. cornsilk: "#fff8dc",
  16979. crimson: "#dc143c",
  16980. cyan: "#00ffff",
  16981. darkblue: "#00008b",
  16982. darkcyan: "#008b8b",
  16983. darkgoldenrod: "#b8860b",
  16984. darkgray: "#a9a9a9",
  16985. darkgreen: "#006400",
  16986. darkgrey: "#a9a9a9",
  16987. darkkhaki: "#bdb76b",
  16988. darkmagenta: "#8b008b",
  16989. darkolivegreen: "#556b2f",
  16990. darkorange: "#ff8c00",
  16991. darkorchid: "#9932cc",
  16992. darkred: "#8b0000",
  16993. darksalmon: "#e9967a",
  16994. darkseagreen: "#8fbc8f",
  16995. darkslateblue: "#483d8b",
  16996. darkslategray: "#2f4f4f",
  16997. darkslategrey: "#2f4f4f",
  16998. darkturquoise: "#00ced1",
  16999. darkviolet: "#9400d3",
  17000. deeppink: "#ff1493",
  17001. deepskyblue: "#00bfff",
  17002. dimgray: "#696969",
  17003. dimgrey: "#696969",
  17004. dodgerblue: "#1e90ff",
  17005. firebrick: "#b22222",
  17006. floralwhite: "#fffaf0",
  17007. forestgreen: "#228b22",
  17008. fuchsia: "#ff00ff",
  17009. gainsboro: "#dcdcdc",
  17010. ghostwhite: "#f8f8ff",
  17011. goldenrod: "#daa520",
  17012. gold: "#ffd700",
  17013. gray: "#808080",
  17014. green: "#008000",
  17015. greenyellow: "#adff2f",
  17016. grey: "#808080",
  17017. honeydew: "#f0fff0",
  17018. hotpink: "#ff69b4",
  17019. indianred: "#cd5c5c",
  17020. indigo: "#4b0082",
  17021. ivory: "#fffff0",
  17022. khaki: "#f0e68c",
  17023. lavenderblush: "#fff0f5",
  17024. lavender: "#e6e6fa",
  17025. lawngreen: "#7cfc00",
  17026. lemonchiffon: "#fffacd",
  17027. lightblue: "#add8e6",
  17028. lightcoral: "#f08080",
  17029. lightcyan: "#e0ffff",
  17030. lightgoldenrodyellow: "#fafad2",
  17031. lightgray: "#d3d3d3",
  17032. lightgreen: "#90ee90",
  17033. lightgrey: "#d3d3d3",
  17034. lightpink: "#ffb6c1",
  17035. lightsalmon: "#ffa07a",
  17036. lightseagreen: "#20b2aa",
  17037. lightskyblue: "#87cefa",
  17038. lightslategray: "#778899",
  17039. lightslategrey: "#778899",
  17040. lightsteelblue: "#b0c4de",
  17041. lightyellow: "#ffffe0",
  17042. lime: "#00ff00",
  17043. limegreen: "#32cd32",
  17044. linen: "#faf0e6",
  17045. magenta: "#ff00ff",
  17046. maroon: "#800000",
  17047. mediumaquamarine: "#66cdaa",
  17048. mediumblue: "#0000cd",
  17049. mediumorchid: "#ba55d3",
  17050. mediumpurple: "#9370db",
  17051. mediumseagreen: "#3cb371",
  17052. mediumslateblue: "#7b68ee",
  17053. mediumspringgreen: "#00fa9a",
  17054. mediumturquoise: "#48d1cc",
  17055. mediumvioletred: "#c71585",
  17056. midnightblue: "#191970",
  17057. mintcream: "#f5fffa",
  17058. mistyrose: "#ffe4e1",
  17059. moccasin: "#ffe4b5",
  17060. navajowhite: "#ffdead",
  17061. navy: "#000080",
  17062. oldlace: "#fdf5e6",
  17063. olive: "#808000",
  17064. olivedrab: "#6b8e23",
  17065. orange: "#ffa500",
  17066. orangered: "#ff4500",
  17067. orchid: "#da70d6",
  17068. palegoldenrod: "#eee8aa",
  17069. palegreen: "#98fb98",
  17070. paleturquoise: "#afeeee",
  17071. palevioletred: "#db7093",
  17072. papayawhip: "#ffefd5",
  17073. peachpuff: "#ffdab9",
  17074. peru: "#cd853f",
  17075. pink: "#ffc0cb",
  17076. plum: "#dda0dd",
  17077. powderblue: "#b0e0e6",
  17078. purple: "#800080",
  17079. rebeccapurple: "#663399",
  17080. red: "#ff0000",
  17081. rosybrown: "#bc8f8f",
  17082. royalblue: "#4169e1",
  17083. saddlebrown: "#8b4513",
  17084. salmon: "#fa8072",
  17085. sandybrown: "#f4a460",
  17086. seagreen: "#2e8b57",
  17087. seashell: "#fff5ee",
  17088. sienna: "#a0522d",
  17089. silver: "#c0c0c0",
  17090. skyblue: "#87ceeb",
  17091. slateblue: "#6a5acd",
  17092. slategray: "#708090",
  17093. slategrey: "#708090",
  17094. snow: "#fffafa",
  17095. springgreen: "#00ff7f",
  17096. steelblue: "#4682b4",
  17097. tan: "#d2b48c",
  17098. teal: "#008080",
  17099. thistle: "#d8bfd8",
  17100. tomato: "#ff6347",
  17101. turquoise: "#40e0d0",
  17102. violet: "#ee82ee",
  17103. wheat: "#f5deb3",
  17104. white: "#ffffff",
  17105. whitesmoke: "#f5f5f5",
  17106. yellow: "#ffff00",
  17107. yellowgreen: "#9acd32"
  17108. };
  17109. //#endregion
  17110. //#region node_modules/@ctrl/tinycolor/dist/module/format-input.js
  17111. /**
  17112. * Given a string or object, convert that input to RGB
  17113. *
  17114. * Possible string inputs:
  17115. * ```
  17116. * "red"
  17117. * "#f00" or "f00"
  17118. * "#ff0000" or "ff0000"
  17119. * "#ff000000" or "ff000000"
  17120. * "rgb 255 0 0" or "rgb (255, 0, 0)"
  17121. * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
  17122. * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
  17123. * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
  17124. * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
  17125. * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
  17126. * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
  17127. * "cmyk(0, 20, 0, 0)" or "cmyk 0 20 0 0"
  17128. * ```
  17129. */
  17130. function inputToRGB(color) {
  17131. let rgb = {
  17132. r: 0,
  17133. g: 0,
  17134. b: 0
  17135. };
  17136. let a = 1;
  17137. let s = null;
  17138. let v = null;
  17139. let l = null;
  17140. let ok = false;
  17141. let format = false;
  17142. if (typeof color === "string") color = stringInputToObject(color);
  17143. if (typeof color === "object") {
  17144. if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
  17145. rgb = rgbToRgb(color.r, color.g, color.b);
  17146. ok = true;
  17147. format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  17148. } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
  17149. s = convertToPercentage(color.s);
  17150. v = convertToPercentage(color.v);
  17151. rgb = hsvToRgb(color.h, s, v);
  17152. ok = true;
  17153. format = "hsv";
  17154. } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
  17155. s = convertToPercentage(color.s);
  17156. l = convertToPercentage(color.l);
  17157. rgb = hslToRgb(color.h, s, l);
  17158. ok = true;
  17159. format = "hsl";
  17160. } else if (isValidCSSUnit(color.c) && isValidCSSUnit(color.m) && isValidCSSUnit(color.y) && isValidCSSUnit(color.k)) {
  17161. rgb = cmykToRgb(color.c, color.m, color.y, color.k);
  17162. ok = true;
  17163. format = "cmyk";
  17164. }
  17165. if (Object.prototype.hasOwnProperty.call(color, "a")) a = color.a;
  17166. }
  17167. a = boundAlpha(a);
  17168. return {
  17169. ok,
  17170. format: color.format || format,
  17171. r: Math.min(255, Math.max(rgb.r, 0)),
  17172. g: Math.min(255, Math.max(rgb.g, 0)),
  17173. b: Math.min(255, Math.max(rgb.b, 0)),
  17174. a
  17175. };
  17176. }
  17177. var matchers = {
  17178. CSS_UNIT: /* @__PURE__ */ new RegExp("(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)"),
  17179. rgb: /* @__PURE__ */ new RegExp("rgb[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17180. rgba: /* @__PURE__ */ new RegExp("rgba[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17181. hsl: /* @__PURE__ */ new RegExp("hsl[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17182. hsla: /* @__PURE__ */ new RegExp("hsla[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17183. hsv: /* @__PURE__ */ new RegExp("hsv[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17184. hsva: /* @__PURE__ */ new RegExp("hsva[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17185. cmyk: /* @__PURE__ */ new RegExp("cmyk[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?"),
  17186. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  17187. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  17188. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  17189. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  17190. };
  17191. /**
  17192. * Permissive string parsing. Take in a number of formats, and output an object
  17193. * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` or `{c, m, y, k}` or `{c, m, y, k, a}`
  17194. */
  17195. function stringInputToObject(color) {
  17196. color = color.trim().toLowerCase();
  17197. if (color.length === 0) return false;
  17198. let named = false;
  17199. if (names[color]) {
  17200. color = names[color];
  17201. named = true;
  17202. } else if (color === "transparent") return {
  17203. r: 0,
  17204. g: 0,
  17205. b: 0,
  17206. a: 0,
  17207. format: "name"
  17208. };
  17209. let match = matchers.rgb.exec(color);
  17210. if (match) return {
  17211. r: match[1],
  17212. g: match[2],
  17213. b: match[3]
  17214. };
  17215. match = matchers.rgba.exec(color);
  17216. if (match) return {
  17217. r: match[1],
  17218. g: match[2],
  17219. b: match[3],
  17220. a: match[4]
  17221. };
  17222. match = matchers.hsl.exec(color);
  17223. if (match) return {
  17224. h: match[1],
  17225. s: match[2],
  17226. l: match[3]
  17227. };
  17228. match = matchers.hsla.exec(color);
  17229. if (match) return {
  17230. h: match[1],
  17231. s: match[2],
  17232. l: match[3],
  17233. a: match[4]
  17234. };
  17235. match = matchers.hsv.exec(color);
  17236. if (match) return {
  17237. h: match[1],
  17238. s: match[2],
  17239. v: match[3]
  17240. };
  17241. match = matchers.hsva.exec(color);
  17242. if (match) return {
  17243. h: match[1],
  17244. s: match[2],
  17245. v: match[3],
  17246. a: match[4]
  17247. };
  17248. match = matchers.cmyk.exec(color);
  17249. if (match) return {
  17250. c: match[1],
  17251. m: match[2],
  17252. y: match[3],
  17253. k: match[4]
  17254. };
  17255. match = matchers.hex8.exec(color);
  17256. if (match) return {
  17257. r: parseIntFromHex(match[1]),
  17258. g: parseIntFromHex(match[2]),
  17259. b: parseIntFromHex(match[3]),
  17260. a: convertHexToDecimal(match[4]),
  17261. format: named ? "name" : "hex8"
  17262. };
  17263. match = matchers.hex6.exec(color);
  17264. if (match) return {
  17265. r: parseIntFromHex(match[1]),
  17266. g: parseIntFromHex(match[2]),
  17267. b: parseIntFromHex(match[3]),
  17268. format: named ? "name" : "hex"
  17269. };
  17270. match = matchers.hex4.exec(color);
  17271. if (match) return {
  17272. r: parseIntFromHex(match[1] + match[1]),
  17273. g: parseIntFromHex(match[2] + match[2]),
  17274. b: parseIntFromHex(match[3] + match[3]),
  17275. a: convertHexToDecimal(match[4] + match[4]),
  17276. format: named ? "name" : "hex8"
  17277. };
  17278. match = matchers.hex3.exec(color);
  17279. if (match) return {
  17280. r: parseIntFromHex(match[1] + match[1]),
  17281. g: parseIntFromHex(match[2] + match[2]),
  17282. b: parseIntFromHex(match[3] + match[3]),
  17283. format: named ? "name" : "hex"
  17284. };
  17285. return false;
  17286. }
  17287. /**
  17288. * Check to see if it looks like a CSS unit
  17289. * (see `matchers` above for definition).
  17290. */
  17291. function isValidCSSUnit(color) {
  17292. if (typeof color === "number") return !Number.isNaN(color);
  17293. return matchers.CSS_UNIT.test(color);
  17294. }
  17295. //#endregion
  17296. //#region node_modules/@ctrl/tinycolor/dist/module/index.js
  17297. var TinyColor = class TinyColor {
  17298. constructor(color = "", opts = {}) {
  17299. if (color instanceof TinyColor) return color;
  17300. if (typeof color === "number") color = numberInputToObject(color);
  17301. this.originalInput = color;
  17302. const rgb = inputToRGB(color);
  17303. this.originalInput = color;
  17304. this.r = rgb.r;
  17305. this.g = rgb.g;
  17306. this.b = rgb.b;
  17307. this.a = rgb.a;
  17308. this.roundA = Math.round(100 * this.a) / 100;
  17309. this.format = opts.format ?? rgb.format;
  17310. this.gradientType = opts.gradientType;
  17311. if (this.r < 1) this.r = Math.round(this.r);
  17312. if (this.g < 1) this.g = Math.round(this.g);
  17313. if (this.b < 1) this.b = Math.round(this.b);
  17314. this.isValid = rgb.ok;
  17315. }
  17316. isDark() {
  17317. return this.getBrightness() < 128;
  17318. }
  17319. isLight() {
  17320. return !this.isDark();
  17321. }
  17322. /**
  17323. * Returns the perceived brightness of the color, from 0-255.
  17324. */
  17325. getBrightness() {
  17326. const rgb = this.toRgb();
  17327. return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
  17328. }
  17329. /**
  17330. * Returns the perceived luminance of a color, from 0-1.
  17331. */
  17332. getLuminance() {
  17333. const rgb = this.toRgb();
  17334. let R;
  17335. let G;
  17336. let B;
  17337. const RsRGB = rgb.r / 255;
  17338. const GsRGB = rgb.g / 255;
  17339. const BsRGB = rgb.b / 255;
  17340. if (RsRGB <= .03928) R = RsRGB / 12.92;
  17341. else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
  17342. if (GsRGB <= .03928) G = GsRGB / 12.92;
  17343. else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
  17344. if (BsRGB <= .03928) B = BsRGB / 12.92;
  17345. else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
  17346. return .2126 * R + .7152 * G + .0722 * B;
  17347. }
  17348. /**
  17349. * Returns the alpha value of a color, from 0-1.
  17350. */
  17351. getAlpha() {
  17352. return this.a;
  17353. }
  17354. /**
  17355. * Sets the alpha value on the current color.
  17356. *
  17357. * @param alpha - The new alpha value. The accepted range is 0-1.
  17358. */
  17359. setAlpha(alpha) {
  17360. this.a = boundAlpha(alpha);
  17361. this.roundA = Math.round(100 * this.a) / 100;
  17362. return this;
  17363. }
  17364. /**
  17365. * Returns whether the color is monochrome.
  17366. */
  17367. isMonochrome() {
  17368. const { s } = this.toHsl();
  17369. return s === 0;
  17370. }
  17371. /**
  17372. * Returns the object as a HSVA object.
  17373. */
  17374. toHsv() {
  17375. const hsv = rgbToHsv(this.r, this.g, this.b);
  17376. return {
  17377. h: hsv.h * 360,
  17378. s: hsv.s,
  17379. v: hsv.v,
  17380. a: this.a
  17381. };
  17382. }
  17383. /**
  17384. * Returns the hsva values interpolated into a string with the following format:
  17385. * "hsva(xxx, xxx, xxx, xx)".
  17386. */
  17387. toHsvString() {
  17388. const hsv = rgbToHsv(this.r, this.g, this.b);
  17389. const h = Math.round(hsv.h * 360);
  17390. const s = Math.round(hsv.s * 100);
  17391. const v = Math.round(hsv.v * 100);
  17392. return this.a === 1 ? `hsv(${h}, ${s}%, ${v}%)` : `hsva(${h}, ${s}%, ${v}%, ${this.roundA})`;
  17393. }
  17394. /**
  17395. * Returns the object as a HSLA object.
  17396. */
  17397. toHsl() {
  17398. const hsl = rgbToHsl(this.r, this.g, this.b);
  17399. return {
  17400. h: hsl.h * 360,
  17401. s: hsl.s,
  17402. l: hsl.l,
  17403. a: this.a
  17404. };
  17405. }
  17406. /**
  17407. * Returns the hsla values interpolated into a string with the following format:
  17408. * "hsla(xxx, xxx, xxx, xx)".
  17409. */
  17410. toHslString() {
  17411. const hsl = rgbToHsl(this.r, this.g, this.b);
  17412. const h = Math.round(hsl.h * 360);
  17413. const s = Math.round(hsl.s * 100);
  17414. const l = Math.round(hsl.l * 100);
  17415. return this.a === 1 ? `hsl(${h}, ${s}%, ${l}%)` : `hsla(${h}, ${s}%, ${l}%, ${this.roundA})`;
  17416. }
  17417. /**
  17418. * Returns the hex value of the color.
  17419. * @param allow3Char will shorten hex value to 3 char if possible
  17420. */
  17421. toHex(allow3Char = false) {
  17422. return rgbToHex(this.r, this.g, this.b, allow3Char);
  17423. }
  17424. /**
  17425. * Returns the hex value of the color -with a # prefixed.
  17426. * @param allow3Char will shorten hex value to 3 char if possible
  17427. */
  17428. toHexString(allow3Char = false) {
  17429. return "#" + this.toHex(allow3Char);
  17430. }
  17431. /**
  17432. * Returns the hex 8 value of the color.
  17433. * @param allow4Char will shorten hex value to 4 char if possible
  17434. */
  17435. toHex8(allow4Char = false) {
  17436. return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
  17437. }
  17438. /**
  17439. * Returns the hex 8 value of the color -with a # prefixed.
  17440. * @param allow4Char will shorten hex value to 4 char if possible
  17441. */
  17442. toHex8String(allow4Char = false) {
  17443. return "#" + this.toHex8(allow4Char);
  17444. }
  17445. /**
  17446. * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
  17447. * @param allowShortChar will shorten hex value to 3 or 4 char if possible
  17448. */
  17449. toHexShortString(allowShortChar = false) {
  17450. return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
  17451. }
  17452. /**
  17453. * Returns the object as a RGBA object.
  17454. */
  17455. toRgb() {
  17456. return {
  17457. r: Math.round(this.r),
  17458. g: Math.round(this.g),
  17459. b: Math.round(this.b),
  17460. a: this.a
  17461. };
  17462. }
  17463. /**
  17464. * Returns the RGBA values interpolated into a string with the following format:
  17465. * "RGBA(xxx, xxx, xxx, xx)".
  17466. */
  17467. toRgbString() {
  17468. const r = Math.round(this.r);
  17469. const g = Math.round(this.g);
  17470. const b = Math.round(this.b);
  17471. return this.a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${this.roundA})`;
  17472. }
  17473. /**
  17474. * Returns the object as a RGBA object.
  17475. */
  17476. toPercentageRgb() {
  17477. const fmt = (x) => `${Math.round(bound01(x, 255) * 100)}%`;
  17478. return {
  17479. r: fmt(this.r),
  17480. g: fmt(this.g),
  17481. b: fmt(this.b),
  17482. a: this.a
  17483. };
  17484. }
  17485. /**
  17486. * Returns the RGBA relative values interpolated into a string
  17487. */
  17488. toPercentageRgbString() {
  17489. const rnd = (x) => Math.round(bound01(x, 255) * 100);
  17490. return this.a === 1 ? `rgb(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%)` : `rgba(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%, ${this.roundA})`;
  17491. }
  17492. toCmyk() {
  17493. return { ...rgbToCmyk(this.r, this.g, this.b) };
  17494. }
  17495. toCmykString() {
  17496. const { c, m, y, k } = rgbToCmyk(this.r, this.g, this.b);
  17497. return `cmyk(${c}, ${m}, ${y}, ${k})`;
  17498. }
  17499. /**
  17500. * The 'real' name of the color -if there is one.
  17501. */
  17502. toName() {
  17503. if (this.a === 0) return "transparent";
  17504. if (this.a < 1) return false;
  17505. const hex = "#" + rgbToHex(this.r, this.g, this.b, false);
  17506. for (const [key, value] of Object.entries(names)) if (hex === value) return key;
  17507. return false;
  17508. }
  17509. toString(format) {
  17510. const formatSet = Boolean(format);
  17511. format = format ?? this.format;
  17512. let formattedString = false;
  17513. const hasAlpha = this.a < 1 && this.a >= 0;
  17514. if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
  17515. if (format === "name" && this.a === 0) return this.toName();
  17516. return this.toRgbString();
  17517. }
  17518. if (format === "rgb") formattedString = this.toRgbString();
  17519. if (format === "prgb") formattedString = this.toPercentageRgbString();
  17520. if (format === "hex" || format === "hex6") formattedString = this.toHexString();
  17521. if (format === "hex3") formattedString = this.toHexString(true);
  17522. if (format === "hex4") formattedString = this.toHex8String(true);
  17523. if (format === "hex8") formattedString = this.toHex8String();
  17524. if (format === "name") formattedString = this.toName();
  17525. if (format === "hsl") formattedString = this.toHslString();
  17526. if (format === "hsv") formattedString = this.toHsvString();
  17527. if (format === "cmyk") formattedString = this.toCmykString();
  17528. return formattedString || this.toHexString();
  17529. }
  17530. toNumber() {
  17531. return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
  17532. }
  17533. clone() {
  17534. return new TinyColor(this.toString());
  17535. }
  17536. /**
  17537. * Lighten the color a given amount. Providing 100 will always return white.
  17538. * @param amount - valid between 1-100
  17539. */
  17540. lighten(amount = 10) {
  17541. const hsl = this.toHsl();
  17542. hsl.l += amount / 100;
  17543. hsl.l = clamp01(hsl.l);
  17544. return new TinyColor(hsl);
  17545. }
  17546. /**
  17547. * Brighten the color a given amount, from 0 to 100.
  17548. * @param amount - valid between 1-100
  17549. */
  17550. brighten(amount = 10) {
  17551. const rgb = this.toRgb();
  17552. rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
  17553. rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
  17554. rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
  17555. return new TinyColor(rgb);
  17556. }
  17557. /**
  17558. * Darken the color a given amount, from 0 to 100.
  17559. * Providing 100 will always return black.
  17560. * @param amount - valid between 1-100
  17561. */
  17562. darken(amount = 10) {
  17563. const hsl = this.toHsl();
  17564. hsl.l -= amount / 100;
  17565. hsl.l = clamp01(hsl.l);
  17566. return new TinyColor(hsl);
  17567. }
  17568. /**
  17569. * Mix the color with pure white, from 0 to 100.
  17570. * Providing 0 will do nothing, providing 100 will always return white.
  17571. * @param amount - valid between 1-100
  17572. */
  17573. tint(amount = 10) {
  17574. return this.mix("white", amount);
  17575. }
  17576. /**
  17577. * Mix the color with pure black, from 0 to 100.
  17578. * Providing 0 will do nothing, providing 100 will always return black.
  17579. * @param amount - valid between 1-100
  17580. */
  17581. shade(amount = 10) {
  17582. return this.mix("black", amount);
  17583. }
  17584. /**
  17585. * Desaturate the color a given amount, from 0 to 100.
  17586. * Providing 100 will is the same as calling greyscale
  17587. * @param amount - valid between 1-100
  17588. */
  17589. desaturate(amount = 10) {
  17590. const hsl = this.toHsl();
  17591. hsl.s -= amount / 100;
  17592. hsl.s = clamp01(hsl.s);
  17593. return new TinyColor(hsl);
  17594. }
  17595. /**
  17596. * Saturate the color a given amount, from 0 to 100.
  17597. * @param amount - valid between 1-100
  17598. */
  17599. saturate(amount = 10) {
  17600. const hsl = this.toHsl();
  17601. hsl.s += amount / 100;
  17602. hsl.s = clamp01(hsl.s);
  17603. return new TinyColor(hsl);
  17604. }
  17605. /**
  17606. * Completely desaturates a color into greyscale.
  17607. * Same as calling `desaturate(100)`
  17608. */
  17609. greyscale() {
  17610. return this.desaturate(100);
  17611. }
  17612. /**
  17613. * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
  17614. * Values outside of this range will be wrapped into this range.
  17615. */
  17616. spin(amount) {
  17617. const hsl = this.toHsl();
  17618. const hue = (hsl.h + amount) % 360;
  17619. hsl.h = hue < 0 ? 360 + hue : hue;
  17620. return new TinyColor(hsl);
  17621. }
  17622. /**
  17623. * Mix the current color a given amount with another color, from 0 to 100.
  17624. * 0 means no mixing (return current color).
  17625. */
  17626. mix(color, amount = 50) {
  17627. const rgb1 = this.toRgb();
  17628. const rgb2 = new TinyColor(color).toRgb();
  17629. const p = amount / 100;
  17630. return new TinyColor({
  17631. r: (rgb2.r - rgb1.r) * p + rgb1.r,
  17632. g: (rgb2.g - rgb1.g) * p + rgb1.g,
  17633. b: (rgb2.b - rgb1.b) * p + rgb1.b,
  17634. a: (rgb2.a - rgb1.a) * p + rgb1.a
  17635. });
  17636. }
  17637. analogous(results = 6, slices = 30) {
  17638. const hsl = this.toHsl();
  17639. const part = 360 / slices;
  17640. const ret = [this];
  17641. for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
  17642. hsl.h = (hsl.h + part) % 360;
  17643. ret.push(new TinyColor(hsl));
  17644. }
  17645. return ret;
  17646. }
  17647. /**
  17648. * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
  17649. */
  17650. complement() {
  17651. const hsl = this.toHsl();
  17652. hsl.h = (hsl.h + 180) % 360;
  17653. return new TinyColor(hsl);
  17654. }
  17655. monochromatic(results = 6) {
  17656. const hsv = this.toHsv();
  17657. const { h } = hsv;
  17658. const { s } = hsv;
  17659. let { v } = hsv;
  17660. const res = [];
  17661. const modification = 1 / results;
  17662. while (results--) {
  17663. res.push(new TinyColor({
  17664. h,
  17665. s,
  17666. v
  17667. }));
  17668. v = (v + modification) % 1;
  17669. }
  17670. return res;
  17671. }
  17672. splitcomplement() {
  17673. const hsl = this.toHsl();
  17674. const { h } = hsl;
  17675. return [
  17676. this,
  17677. new TinyColor({
  17678. h: (h + 72) % 360,
  17679. s: hsl.s,
  17680. l: hsl.l
  17681. }),
  17682. new TinyColor({
  17683. h: (h + 216) % 360,
  17684. s: hsl.s,
  17685. l: hsl.l
  17686. })
  17687. ];
  17688. }
  17689. /**
  17690. * Compute how the color would appear on a background
  17691. */
  17692. onBackground(background) {
  17693. const fg = this.toRgb();
  17694. const bg = new TinyColor(background).toRgb();
  17695. const alpha = fg.a + bg.a * (1 - fg.a);
  17696. return new TinyColor({
  17697. r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
  17698. g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
  17699. b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
  17700. a: alpha
  17701. });
  17702. }
  17703. /**
  17704. * Alias for `polyad(3)`
  17705. */
  17706. triad() {
  17707. return this.polyad(3);
  17708. }
  17709. /**
  17710. * Alias for `polyad(4)`
  17711. */
  17712. tetrad() {
  17713. return this.polyad(4);
  17714. }
  17715. /**
  17716. * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
  17717. * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
  17718. */
  17719. polyad(n) {
  17720. const hsl = this.toHsl();
  17721. const { h } = hsl;
  17722. const result = [this];
  17723. const increment = 360 / n;
  17724. for (let i = 1; i < n; i++) result.push(new TinyColor({
  17725. h: (h + i * increment) % 360,
  17726. s: hsl.s,
  17727. l: hsl.l
  17728. }));
  17729. return result;
  17730. }
  17731. /**
  17732. * compare color vs current color
  17733. */
  17734. equals(color) {
  17735. const comparedColor = new TinyColor(color);
  17736. /**
  17737. * RGB and CMYK do not have the same color gamut, so a CMYK conversion will never be 100%.
  17738. * This means we need to compare CMYK to CMYK to ensure accuracy of the equals function.
  17739. */
  17740. if (this.format === "cmyk" || comparedColor.format === "cmyk") return this.toCmykString() === comparedColor.toCmykString();
  17741. return this.toRgbString() === comparedColor.toRgbString();
  17742. }
  17743. };
  17744. //#endregion
  17745. //#region node_modules/element-plus/es/components/button/src/button-custom.mjs
  17746. function darken(color, amount = 20) {
  17747. return color.mix("#141414", amount).toString();
  17748. }
  17749. function useButtonCustomStyle(props) {
  17750. const _disabled = useFormDisabled();
  17751. const ns = useNamespace("button");
  17752. return computed(() => {
  17753. let styles = {};
  17754. let buttonColor = props.color;
  17755. if (buttonColor) {
  17756. const match = buttonColor.match(/var\((.*?)\)/);
  17757. if (match) buttonColor = window.getComputedStyle(window.document.documentElement).getPropertyValue(match[1]);
  17758. const color = new TinyColor(buttonColor);
  17759. const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
  17760. if (props.plain) {
  17761. styles = ns.cssVarBlock({
  17762. "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
  17763. "text-color": buttonColor,
  17764. "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
  17765. "hover-text-color": `var(${ns.cssVarName("color-white")})`,
  17766. "hover-bg-color": buttonColor,
  17767. "hover-border-color": buttonColor,
  17768. "active-bg-color": activeBgColor,
  17769. "active-text-color": `var(${ns.cssVarName("color-white")})`,
  17770. "active-border-color": activeBgColor
  17771. });
  17772. if (_disabled.value) {
  17773. styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
  17774. styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
  17775. styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
  17776. }
  17777. } else if (props.link || props.text) {
  17778. const hoverColor = props.dark ? darken(color, 30) : color.tint(30).toString();
  17779. styles = ns.cssVarBlock({
  17780. "text-color": buttonColor,
  17781. "hover-text-color": hoverColor,
  17782. "active-text-color": activeBgColor
  17783. });
  17784. if (props.link) {
  17785. styles[ns.cssVarBlockName("hover-link-text-color")] = hoverColor;
  17786. styles[ns.cssVarBlockName("active-color")] = activeBgColor;
  17787. }
  17788. if (_disabled.value) {
  17789. const disabledColor = props.dark ? darken(color, 50) : color.tint(50).toString();
  17790. styles[ns.cssVarBlockName("disabled-bg-color")] = "transparent";
  17791. styles[ns.cssVarBlockName("disabled-text-color")] = disabledColor;
  17792. styles[ns.cssVarBlockName("disabled-border-color")] = "transparent";
  17793. }
  17794. } else {
  17795. const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
  17796. const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
  17797. styles = ns.cssVarBlock({
  17798. "bg-color": buttonColor,
  17799. "text-color": textColor,
  17800. "border-color": buttonColor,
  17801. "hover-bg-color": hoverBgColor,
  17802. "hover-text-color": textColor,
  17803. "hover-border-color": hoverBgColor,
  17804. "active-bg-color": activeBgColor,
  17805. "active-border-color": activeBgColor
  17806. });
  17807. if (_disabled.value) {
  17808. const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
  17809. styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
  17810. styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
  17811. styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
  17812. }
  17813. }
  17814. }
  17815. return styles;
  17816. });
  17817. }
  17818. //#endregion
  17819. //#region node_modules/element-plus/es/components/button/src/button2.mjs
  17820. var button_default$1 = /* @__PURE__ */ defineComponent({
  17821. name: "ElButton",
  17822. __name: "button",
  17823. props: buttonProps,
  17824. emits: buttonEmits,
  17825. setup(__props, { expose: __expose, emit: __emit }) {
  17826. const props = __props;
  17827. const emit = __emit;
  17828. const buttonStyle = useButtonCustomStyle(props);
  17829. const ns = useNamespace("button");
  17830. const { _ref, _size, _type, _disabled, _props, _plain, _round, _text, _dashed, shouldAddSpace, handleClick } = useButton(props, emit);
  17831. const buttonKls = computed(() => [
  17832. ns.b(),
  17833. ns.m(_type.value),
  17834. ns.m(_size.value),
  17835. ns.is("disabled", _disabled.value),
  17836. ns.is("loading", props.loading),
  17837. ns.is("plain", _plain.value),
  17838. ns.is("round", _round.value),
  17839. ns.is("circle", props.circle),
  17840. ns.is("text", _text.value),
  17841. ns.is("dashed", _dashed.value),
  17842. ns.is("link", props.link),
  17843. ns.is("has-bg", props.bg)
  17844. ]);
  17845. __expose({
  17846. /** @description button html element */
  17847. ref: _ref,
  17848. /** @description button size */
  17849. size: _size,
  17850. /** @description button type */
  17851. type: _type,
  17852. /** @description button disabled */
  17853. disabled: _disabled,
  17854. /** @description whether adding space */
  17855. shouldAddSpace
  17856. });
  17857. return (_ctx, _cache) => {
  17858. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({
  17859. ref_key: "_ref",
  17860. ref: _ref
  17861. }, unref(_props), {
  17862. class: buttonKls.value,
  17863. style: unref(buttonStyle),
  17864. onClick: unref(handleClick)
  17865. }), {
  17866. default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
  17867. key: 1,
  17868. class: normalizeClass(unref(ns).is("loading"))
  17869. }, {
  17870. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.loadingIcon)))]),
  17871. _: 1
  17872. }, 8, ["class"]))], 64)) : __props.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  17873. default: withCtx(() => [__props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })]),
  17874. _: 3
  17875. })) : createCommentVNode("v-if", true), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
  17876. key: 2,
  17877. class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
  17878. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)]),
  17879. _: 3
  17880. }, 16, [
  17881. "class",
  17882. "style",
  17883. "onClick"
  17884. ]);
  17885. };
  17886. }
  17887. });
  17888. //#endregion
  17889. //#region node_modules/element-plus/es/components/button/src/button-group2.mjs
  17890. var button_group_default = /* @__PURE__ */ defineComponent({
  17891. name: "ElButtonGroup",
  17892. __name: "button-group",
  17893. props: {
  17894. /**
  17895. * @description control the size of buttons in this button-group
  17896. */
  17897. size: buttonProps.size,
  17898. /**
  17899. * @description control the type of buttons in this button-group
  17900. */
  17901. type: buttonProps.type,
  17902. /**
  17903. * @description display direction
  17904. */
  17905. direction: {
  17906. type: definePropType(String),
  17907. values: ["horizontal", "vertical"],
  17908. default: "horizontal"
  17909. }
  17910. },
  17911. setup(__props) {
  17912. const props = __props;
  17913. provide(buttonGroupContextKey, reactive({
  17914. size: toRef(props, "size"),
  17915. type: toRef(props, "type")
  17916. }));
  17917. const ns = useNamespace("button");
  17918. return (_ctx, _cache) => {
  17919. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props.direction)]) }, [renderSlot(_ctx.$slots, "default")], 2);
  17920. };
  17921. }
  17922. });
  17923. //#endregion
  17924. //#region node_modules/element-plus/es/components/button/index.mjs
  17925. var ElButton = withInstall(button_default$1, { ButtonGroup: button_group_default });
  17926. var ElButtonGroup = withNoopInstall(button_group_default);
  17927. //#endregion
  17928. //#region node_modules/element-plus/es/components/calendar/src/calendar.mjs
  17929. var isValidRange$1 = (range) => isArray$1(range) && range.length === 2 && range.every((item) => isDate(item));
  17930. /**
  17931. * @deprecated Removed after 3.0.0, Use `CalendarProps` instead.
  17932. */
  17933. var calendarProps = buildProps({
  17934. /**
  17935. * @description binding value
  17936. */
  17937. modelValue: { type: Date },
  17938. /**
  17939. * @description time range, including start time and end time.
  17940. * Start time must be start day of week, end time must be end day of week, the time span cannot exceed two months.
  17941. */
  17942. range: {
  17943. type: definePropType(Array),
  17944. validator: isValidRange$1
  17945. },
  17946. /**
  17947. * @description type of the controller for the Calendar header
  17948. */
  17949. controllerType: {
  17950. type: String,
  17951. values: ["button", "select"],
  17952. default: "button"
  17953. },
  17954. /**
  17955. * @description format label when `controller-type` is 'select'
  17956. */
  17957. formatter: { type: definePropType(Function) }
  17958. });
  17959. var calendarEmits = {
  17960. [UPDATE_MODEL_EVENT]: (value) => isDate(value),
  17961. [INPUT_EVENT]: (value) => isDate(value)
  17962. };
  17963. //#endregion
  17964. //#region node_modules/element-plus/es/components/time-picker/src/constants.mjs
  17965. var timeUnits = [
  17966. "hours",
  17967. "minutes",
  17968. "seconds"
  17969. ];
  17970. var PICKER_BASE_INJECTION_KEY = "EP_PICKER_BASE";
  17971. var PICKER_POPPER_OPTIONS_INJECTION_KEY = "ElPopperOptions";
  17972. var ROOT_COMMON_PICKER_INJECTION_KEY = Symbol("commonPickerContextKey");
  17973. var DEFAULT_FORMATS_TIME = "HH:mm:ss";
  17974. var DEFAULT_FORMATS_DATE = "YYYY-MM-DD";
  17975. var DEFAULT_FORMATS_DATEPICKER = {
  17976. date: DEFAULT_FORMATS_DATE,
  17977. dates: DEFAULT_FORMATS_DATE,
  17978. week: "gggg[w]ww",
  17979. year: "YYYY",
  17980. years: "YYYY",
  17981. month: "YYYY-MM",
  17982. months: "YYYY-MM",
  17983. datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,
  17984. monthrange: "YYYY-MM",
  17985. yearrange: "YYYY",
  17986. daterange: DEFAULT_FORMATS_DATE,
  17987. datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`
  17988. };
  17989. //#endregion
  17990. //#region node_modules/element-plus/es/components/time-picker/src/utils.mjs
  17991. var import_dayjs_min = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
  17992. (function(t, e) {
  17993. "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
  17994. })(exports, (function() {
  17995. "use strict";
  17996. var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
  17997. name: "en",
  17998. weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  17999. months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  18000. ordinal: function(t) {
  18001. var e = [
  18002. "th",
  18003. "st",
  18004. "nd",
  18005. "rd"
  18006. ], n = t % 100;
  18007. return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
  18008. }
  18009. }, m = function(t, e, n) {
  18010. var r = String(t);
  18011. return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
  18012. }, v = {
  18013. s: m,
  18014. z: function(t) {
  18015. var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;
  18016. return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
  18017. },
  18018. m: function t(e, n) {
  18019. if (e.date() < n.date()) return -t(n, e);
  18020. var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), i = e.clone().add(r, c), s = n - i < 0, u = e.clone().add(r + (s ? -1 : 1), c);
  18021. return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
  18022. },
  18023. a: function(t) {
  18024. return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
  18025. },
  18026. p: function(t) {
  18027. return {
  18028. M: c,
  18029. y: h,
  18030. w: o,
  18031. d: a,
  18032. D: d,
  18033. h: u,
  18034. m: s,
  18035. s: i,
  18036. ms: r,
  18037. Q: f
  18038. }[t] || String(t || "").toLowerCase().replace(/s$/, "");
  18039. },
  18040. u: function(t) {
  18041. return void 0 === t;
  18042. }
  18043. }, g = "en", D = {};
  18044. D[g] = M;
  18045. var p = "$isDayjsObject", S = function(t) {
  18046. return t instanceof _ || !(!t || !t[p]);
  18047. }, w = function t(e, n, r) {
  18048. var i;
  18049. if (!e) return g;
  18050. if ("string" == typeof e) {
  18051. var s = e.toLowerCase();
  18052. D[s] && (i = s), n && (D[s] = n, i = s);
  18053. var u = e.split("-");
  18054. if (!i && u.length > 1) return t(u[0]);
  18055. } else {
  18056. var a = e.name;
  18057. D[a] = e, i = a;
  18058. }
  18059. return !r && i && (g = i), i || !r && g;
  18060. }, O = function(t, e) {
  18061. if (S(t)) return t.clone();
  18062. var n = "object" == typeof e ? e : {};
  18063. return n.date = t, n.args = arguments, new _(n);
  18064. }, b = v;
  18065. b.l = w, b.i = S, b.w = function(t, e) {
  18066. return O(t, {
  18067. locale: e.$L,
  18068. utc: e.$u,
  18069. x: e.$x,
  18070. $offset: e.$offset
  18071. });
  18072. };
  18073. var _ = function() {
  18074. function M(t) {
  18075. this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;
  18076. }
  18077. var m = M.prototype;
  18078. return m.parse = function(t) {
  18079. this.$d = function(t) {
  18080. var e = t.date, n = t.utc;
  18081. if (null === e) return /* @__PURE__ */ new Date(NaN);
  18082. if (b.u(e)) return /* @__PURE__ */ new Date();
  18083. if (e instanceof Date) return new Date(e);
  18084. if ("string" == typeof e && !/Z$/i.test(e)) {
  18085. var r = e.match($);
  18086. if (r) {
  18087. var i = r[2] - 1 || 0, s = (r[7] || "0").substring(0, 3);
  18088. return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
  18089. }
  18090. }
  18091. return new Date(e);
  18092. }(t), this.init();
  18093. }, m.init = function() {
  18094. var t = this.$d;
  18095. this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
  18096. }, m.$utils = function() {
  18097. return b;
  18098. }, m.isValid = function() {
  18099. return !(this.$d.toString() === l);
  18100. }, m.isSame = function(t, e) {
  18101. var n = O(t);
  18102. return this.startOf(e) <= n && n <= this.endOf(e);
  18103. }, m.isAfter = function(t, e) {
  18104. return O(t) < this.startOf(e);
  18105. }, m.isBefore = function(t, e) {
  18106. return this.endOf(e) < O(t);
  18107. }, m.$g = function(t, e, n) {
  18108. return b.u(t) ? this[e] : this.set(n, t);
  18109. }, m.unix = function() {
  18110. return Math.floor(this.valueOf() / 1e3);
  18111. }, m.valueOf = function() {
  18112. return this.$d.getTime();
  18113. }, m.startOf = function(t, e) {
  18114. var n = this, r = !!b.u(e) || e, f = b.p(t), l = function(t, e) {
  18115. var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
  18116. return r ? i : i.endOf(a);
  18117. }, $ = function(t, e) {
  18118. return b.w(n.toDate()[t].apply(n.toDate("s"), (r ? [
  18119. 0,
  18120. 0,
  18121. 0,
  18122. 0
  18123. ] : [
  18124. 23,
  18125. 59,
  18126. 59,
  18127. 999
  18128. ]).slice(e)), n);
  18129. }, y = this.$W, M = this.$M, m = this.$D, v = "set" + (this.$u ? "UTC" : "");
  18130. switch (f) {
  18131. case h: return r ? l(1, 0) : l(31, 11);
  18132. case c: return r ? l(1, M) : l(0, M + 1);
  18133. case o:
  18134. var g = this.$locale().weekStart || 0, D = (y < g ? y + 7 : y) - g;
  18135. return l(r ? m - D : m + (6 - D), M);
  18136. case a:
  18137. case d: return $(v + "Hours", 0);
  18138. case u: return $(v + "Minutes", 1);
  18139. case s: return $(v + "Seconds", 2);
  18140. case i: return $(v + "Milliseconds", 3);
  18141. default: return this.clone();
  18142. }
  18143. }, m.endOf = function(t) {
  18144. return this.startOf(t, !1);
  18145. }, m.$set = function(t, e) {
  18146. var n, o = b.p(t), f = "set" + (this.$u ? "UTC" : ""), l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o], $ = o === a ? this.$D + (e - this.$W) : e;
  18147. if (o === c || o === h) {
  18148. var y = this.clone().set(d, 1);
  18149. y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
  18150. } else l && this.$d[l]($);
  18151. return this.init(), this;
  18152. }, m.set = function(t, e) {
  18153. return this.clone().$set(t, e);
  18154. }, m.get = function(t) {
  18155. return this[b.p(t)]();
  18156. }, m.add = function(r, f) {
  18157. var d, l = this;
  18158. r = Number(r);
  18159. var $ = b.p(f), y = function(t) {
  18160. var e = O(l);
  18161. return b.w(e.date(e.date() + Math.round(t * r)), l);
  18162. };
  18163. if ($ === c) return this.set(c, this.$M + r);
  18164. if ($ === h) return this.set(h, this.$y + r);
  18165. if ($ === a) return y(1);
  18166. if ($ === o) return y(7);
  18167. var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1, m = this.$d.getTime() + r * M;
  18168. return b.w(m, this);
  18169. }, m.subtract = function(t, e) {
  18170. return this.add(-1 * t, e);
  18171. }, m.format = function(t) {
  18172. var e = this, n = this.$locale();
  18173. if (!this.isValid()) return n.invalidDate || l;
  18174. var r = t || "YYYY-MM-DDTHH:mm:ssZ", i = b.z(this), s = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function(t, n, i, s) {
  18175. return t && (t[n] || t(e, r)) || i[n].slice(0, s);
  18176. }, d = function(t) {
  18177. return b.s(s % 12 || 12, t, "0");
  18178. }, $ = f || function(t, e, n) {
  18179. var r = t < 12 ? "AM" : "PM";
  18180. return n ? r.toLowerCase() : r;
  18181. };
  18182. return r.replace(y, (function(t, r) {
  18183. return r || function(t) {
  18184. switch (t) {
  18185. case "YY": return String(e.$y).slice(-2);
  18186. case "YYYY": return b.s(e.$y, 4, "0");
  18187. case "M": return a + 1;
  18188. case "MM": return b.s(a + 1, 2, "0");
  18189. case "MMM": return h(n.monthsShort, a, c, 3);
  18190. case "MMMM": return h(c, a);
  18191. case "D": return e.$D;
  18192. case "DD": return b.s(e.$D, 2, "0");
  18193. case "d": return String(e.$W);
  18194. case "dd": return h(n.weekdaysMin, e.$W, o, 2);
  18195. case "ddd": return h(n.weekdaysShort, e.$W, o, 3);
  18196. case "dddd": return o[e.$W];
  18197. case "H": return String(s);
  18198. case "HH": return b.s(s, 2, "0");
  18199. case "h": return d(1);
  18200. case "hh": return d(2);
  18201. case "a": return $(s, u, !0);
  18202. case "A": return $(s, u, !1);
  18203. case "m": return String(u);
  18204. case "mm": return b.s(u, 2, "0");
  18205. case "s": return String(e.$s);
  18206. case "ss": return b.s(e.$s, 2, "0");
  18207. case "SSS": return b.s(e.$ms, 3, "0");
  18208. case "Z": return i;
  18209. }
  18210. return null;
  18211. }(t) || i.replace(":", "");
  18212. }));
  18213. }, m.utcOffset = function() {
  18214. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  18215. }, m.diff = function(r, d, l) {
  18216. var $, y = this, M = b.p(d), m = O(r), v = (m.utcOffset() - this.utcOffset()) * e, g = this - m, D = function() {
  18217. return b.m(y, m);
  18218. };
  18219. switch (M) {
  18220. case h:
  18221. $ = D() / 12;
  18222. break;
  18223. case c:
  18224. $ = D();
  18225. break;
  18226. case f:
  18227. $ = D() / 3;
  18228. break;
  18229. case o:
  18230. $ = (g - v) / 6048e5;
  18231. break;
  18232. case a:
  18233. $ = (g - v) / 864e5;
  18234. break;
  18235. case u:
  18236. $ = g / n;
  18237. break;
  18238. case s:
  18239. $ = g / e;
  18240. break;
  18241. case i:
  18242. $ = g / t;
  18243. break;
  18244. default: $ = g;
  18245. }
  18246. return l ? $ : b.a($);
  18247. }, m.daysInMonth = function() {
  18248. return this.endOf(c).$D;
  18249. }, m.$locale = function() {
  18250. return D[this.$L];
  18251. }, m.locale = function(t, e) {
  18252. if (!t) return this.$L;
  18253. var n = this.clone(), r = w(t, e, !0);
  18254. return r && (n.$L = r), n;
  18255. }, m.clone = function() {
  18256. return b.w(this.$d, this);
  18257. }, m.toDate = function() {
  18258. return new Date(this.valueOf());
  18259. }, m.toJSON = function() {
  18260. return this.isValid() ? this.toISOString() : null;
  18261. }, m.toISOString = function() {
  18262. return this.$d.toISOString();
  18263. }, m.toString = function() {
  18264. return this.$d.toUTCString();
  18265. }, M;
  18266. }(), Y = _.prototype;
  18267. return O.prototype = Y, [
  18268. ["$ms", r],
  18269. ["$s", i],
  18270. ["$m", s],
  18271. ["$H", u],
  18272. ["$W", a],
  18273. ["$M", c],
  18274. ["$y", h],
  18275. ["$D", d]
  18276. ].forEach((function(t) {
  18277. Y[t[1]] = function(e) {
  18278. return this.$g(e, t[0], t[1]);
  18279. };
  18280. })), O.extend = function(t, e) {
  18281. return t.$i || (t(e, _, O), t.$i = !0), O;
  18282. }, O.locale = w, O.isDayjs = S, O.unix = function(t) {
  18283. return O(1e3 * t);
  18284. }, O.en = D[g], O.Ls = D, O.p = {}, O;
  18285. }));
  18286. })))(), 1);
  18287. var buildTimeList = (value, bound) => {
  18288. return [
  18289. value > 0 ? value - 1 : void 0,
  18290. value,
  18291. value < bound ? value + 1 : void 0
  18292. ];
  18293. };
  18294. var rangeArr = (n) => Array.from(Array.from({ length: n }).keys());
  18295. var extractDateFormat = (format) => {
  18296. return format.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
  18297. };
  18298. var extractTimeFormat = (format) => {
  18299. return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim();
  18300. };
  18301. var dateEquals = function(a, b) {
  18302. const aIsDate = isDate(a);
  18303. const bIsDate = isDate(b);
  18304. if (aIsDate && bIsDate) return a.getTime() === b.getTime();
  18305. if (!aIsDate && !bIsDate) return a === b;
  18306. return false;
  18307. };
  18308. var valueEquals = function(a, b) {
  18309. const aIsArray = isArray$1(a);
  18310. const bIsArray = isArray$1(b);
  18311. if (aIsArray && bIsArray) {
  18312. if (a.length !== b.length) return false;
  18313. return a.every((item, index) => dateEquals(item, b[index]));
  18314. }
  18315. if (!aIsArray && !bIsArray) return dateEquals(a, b);
  18316. return false;
  18317. };
  18318. var parseDate = function(date, format, lang) {
  18319. const day = isEmpty(format) || format === "x" ? (0, import_dayjs_min.default)(date).locale(lang) : (0, import_dayjs_min.default)(date, format).locale(lang);
  18320. return day.isValid() ? day : void 0;
  18321. };
  18322. var formatter = function(date, format, lang) {
  18323. if (isEmpty(format)) return date;
  18324. if (format === "x") return +date;
  18325. return (0, import_dayjs_min.default)(date).locale(lang).format(format);
  18326. };
  18327. var makeList = (total, method) => {
  18328. const arr = [];
  18329. const disabledArr = method?.();
  18330. for (let i = 0; i < total; i++) arr.push(disabledArr?.includes(i) ?? false);
  18331. return arr;
  18332. };
  18333. var dayOrDaysToDate = (dayOrDays) => {
  18334. return isArray$1(dayOrDays) ? dayOrDays.map((d) => d.toDate()) : dayOrDays.toDate();
  18335. };
  18336. //#endregion
  18337. //#region node_modules/element-plus/es/components/time-picker/src/props/shared.mjs
  18338. var disabledTimeListsProps = buildProps({
  18339. /**
  18340. * @description To specify the array of hours that cannot be selected
  18341. */
  18342. disabledHours: { type: definePropType(Function) },
  18343. /**
  18344. * @description To specify the array of minutes that cannot be selected
  18345. */
  18346. disabledMinutes: { type: definePropType(Function) },
  18347. /**
  18348. * @description To specify the array of seconds that cannot be selected
  18349. */
  18350. disabledSeconds: { type: definePropType(Function) }
  18351. });
  18352. var timePanelSharedProps = buildProps({
  18353. visible: Boolean,
  18354. actualVisible: {
  18355. type: Boolean,
  18356. default: void 0
  18357. },
  18358. format: {
  18359. type: String,
  18360. default: ""
  18361. }
  18362. });
  18363. //#endregion
  18364. //#region node_modules/element-plus/es/components/time-picker/src/common/props.mjs
  18365. var timePickerDefaultProps = buildProps({
  18366. /**
  18367. * @description this prop decides if the date picker panel pops up when the input is focused
  18368. */
  18369. automaticDropdown: {
  18370. type: Boolean,
  18371. default: true
  18372. },
  18373. /**
  18374. * @description same as `id` in native input
  18375. */
  18376. id: { type: definePropType([Array, String]) },
  18377. /**
  18378. * @description same as `name` in native input
  18379. */
  18380. name: { type: definePropType([Array, String]) },
  18381. /**
  18382. * @description custom class name for TimePicker's dropdown
  18383. */
  18384. popperClass: useTooltipContentProps.popperClass,
  18385. /**
  18386. * @description custom style for TimePicker's dropdown
  18387. */
  18388. popperStyle: useTooltipContentProps.popperStyle,
  18389. /**
  18390. * @description format of the displayed value in the input box
  18391. */
  18392. format: String,
  18393. /**
  18394. * @description optional, format of binding value. If not specified, the binding value will be a Date object
  18395. */
  18396. valueFormat: String,
  18397. /**
  18398. * @description optional, format of the date displayed in input's inner panel
  18399. */
  18400. dateFormat: String,
  18401. /**
  18402. * @description optional, format of the time displayed in input's inner panel
  18403. */
  18404. timeFormat: String,
  18405. /**
  18406. * @description type of the picker
  18407. */
  18408. type: {
  18409. type: String,
  18410. default: ""
  18411. },
  18412. /**
  18413. * @description whether to show clear button
  18414. */
  18415. clearable: {
  18416. type: Boolean,
  18417. default: true
  18418. },
  18419. /**
  18420. * @description Custom clear icon component
  18421. */
  18422. clearIcon: {
  18423. type: definePropType([String, Object]),
  18424. default: circle_close_default
  18425. },
  18426. /**
  18427. * @description whether the input is editable
  18428. */
  18429. editable: {
  18430. type: Boolean,
  18431. default: true
  18432. },
  18433. /**
  18434. * @description Whether to auto-fill the input with the current time on focus when no value is selected.
  18435. */
  18436. saveOnBlur: {
  18437. type: Boolean,
  18438. default: true
  18439. },
  18440. /**
  18441. * @description Custom prefix icon component
  18442. */
  18443. prefixIcon: {
  18444. type: definePropType([String, Object]),
  18445. default: ""
  18446. },
  18447. /**
  18448. * @description size of Input
  18449. */
  18450. size: useSizeProp,
  18451. /**
  18452. * @description whether TimePicker is read only
  18453. */
  18454. readonly: Boolean,
  18455. /**
  18456. * @description whether TimePicker is disabled
  18457. */
  18458. disabled: {
  18459. type: Boolean,
  18460. default: void 0
  18461. },
  18462. /**
  18463. * @description placeholder in non-range mode
  18464. */
  18465. placeholder: {
  18466. type: String,
  18467. default: ""
  18468. },
  18469. /**
  18470. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  18471. */
  18472. popperOptions: {
  18473. type: definePropType(Object),
  18474. default: () => ({})
  18475. },
  18476. /**
  18477. * @description binding value, if it is an array, the length should be 2
  18478. */
  18479. modelValue: {
  18480. type: definePropType([
  18481. Date,
  18482. Array,
  18483. String,
  18484. Number
  18485. ]),
  18486. default: ""
  18487. },
  18488. /**
  18489. * @description range separator
  18490. */
  18491. rangeSeparator: {
  18492. type: String,
  18493. default: "-"
  18494. },
  18495. /**
  18496. * @description placeholder for the start date in range mode
  18497. */
  18498. startPlaceholder: String,
  18499. /**
  18500. * @description placeholder for the end date in range mode
  18501. */
  18502. endPlaceholder: String,
  18503. /**
  18504. * @description optional, default date of the calendar
  18505. */
  18506. defaultValue: { type: definePropType([Date, Array]) },
  18507. /**
  18508. * @description optional, the time value to use when selecting date range
  18509. */
  18510. defaultTime: { type: definePropType([Date, Array]) },
  18511. /**
  18512. * @description whether to pick a time range
  18513. */
  18514. isRange: Boolean,
  18515. ...disabledTimeListsProps,
  18516. /**
  18517. * @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean
  18518. */
  18519. disabledDate: { type: Function },
  18520. /**
  18521. * @description set custom className
  18522. */
  18523. cellClassName: { type: Function },
  18524. /**
  18525. * @description an object array to set shortcut options
  18526. */
  18527. shortcuts: {
  18528. type: Array,
  18529. default: () => []
  18530. },
  18531. /**
  18532. * @description whether to pick time using arrow buttons
  18533. */
  18534. arrowControl: Boolean,
  18535. /**
  18536. * @description input tabindex
  18537. */
  18538. tabindex: {
  18539. type: definePropType([String, Number]),
  18540. default: 0
  18541. },
  18542. /**
  18543. * @description whether to trigger form validation
  18544. */
  18545. validateEvent: {
  18546. type: Boolean,
  18547. default: true
  18548. },
  18549. /**
  18550. * @description unlink two date-panels in range-picker
  18551. */
  18552. unlinkPanels: Boolean,
  18553. /**
  18554. * @description show only one panel in range-picker
  18555. */
  18556. singlePanel: Boolean,
  18557. /**
  18558. * @description position of dropdown
  18559. */
  18560. placement: {
  18561. type: definePropType(String),
  18562. values: Ee,
  18563. default: "bottom"
  18564. },
  18565. /**
  18566. * @description list of possible positions for dropdown
  18567. */
  18568. fallbackPlacements: {
  18569. type: definePropType(Array),
  18570. default: [
  18571. "bottom",
  18572. "top",
  18573. "right",
  18574. "left"
  18575. ]
  18576. },
  18577. ...useEmptyValuesProps,
  18578. ...useAriaProps(["ariaLabel"]),
  18579. /**
  18580. * @description whether to show the now button
  18581. */
  18582. showNow: {
  18583. type: Boolean,
  18584. default: true
  18585. },
  18586. /**
  18587. * @description whether to show footer
  18588. */
  18589. showConfirm: {
  18590. type: Boolean,
  18591. default: true
  18592. },
  18593. /**
  18594. * @description whether to show footer
  18595. */
  18596. showFooter: {
  18597. type: Boolean,
  18598. default: true
  18599. },
  18600. /**
  18601. * @description whether to show the number of the calendar week
  18602. */
  18603. showWeekNumber: Boolean
  18604. });
  18605. var timePickerRangeTriggerProps = buildProps({
  18606. id: { type: definePropType(Array) },
  18607. name: { type: definePropType(Array) },
  18608. modelValue: { type: definePropType([Array, String]) },
  18609. startPlaceholder: String,
  18610. endPlaceholder: String,
  18611. disabled: Boolean
  18612. });
  18613. /**
  18614. * @deprecated Use `timePickerRangeTriggerProps` instead. This will be removed in future versions.
  18615. */
  18616. var timePickerRngeTriggerProps = timePickerRangeTriggerProps;
  18617. //#endregion
  18618. //#region node_modules/element-plus/es/components/time-picker/src/composables/use-common-picker.mjs
  18619. var useCommonPicker = (props, emit) => {
  18620. const { lang } = useLocale();
  18621. const pickerVisible = ref(false);
  18622. const pickerActualVisible = ref(false);
  18623. const userInput = ref(null);
  18624. const valueIsEmpty = computed(() => {
  18625. const { modelValue } = props;
  18626. return !modelValue || isArray$1(modelValue) && !modelValue.filter(Boolean).length;
  18627. });
  18628. const emitInput = (input) => {
  18629. if (!valueEquals(props.modelValue, input)) {
  18630. let formatted;
  18631. if (isArray$1(input)) formatted = input.map((item) => formatter(item, props.valueFormat, lang.value));
  18632. else if (input) formatted = formatter(input, props.valueFormat, lang.value);
  18633. emit(UPDATE_MODEL_EVENT, input ? formatted : input, lang.value);
  18634. }
  18635. };
  18636. const parsedValue = computed(() => {
  18637. let dayOrDays;
  18638. if (valueIsEmpty.value) {
  18639. if (pickerOptions.value.getDefaultValue) dayOrDays = pickerOptions.value.getDefaultValue();
  18640. } else if (isArray$1(props.modelValue)) dayOrDays = props.modelValue.map((d) => parseDate(d, props.valueFormat, lang.value));
  18641. else dayOrDays = parseDate(props.modelValue ?? "", props.valueFormat, lang.value);
  18642. if (pickerOptions.value.getRangeAvailableTime) {
  18643. const availableResult = pickerOptions.value.getRangeAvailableTime(dayOrDays);
  18644. if (!isEqual$1(availableResult, dayOrDays)) {
  18645. dayOrDays = availableResult;
  18646. if (!valueIsEmpty.value) emitInput(dayOrDaysToDate(dayOrDays));
  18647. }
  18648. }
  18649. if (isArray$1(dayOrDays) && dayOrDays.some((day) => !day)) dayOrDays = [];
  18650. return dayOrDays;
  18651. });
  18652. const pickerOptions = ref({});
  18653. const onSetPickerOption = (e) => {
  18654. pickerOptions.value[e[0]] = e[1];
  18655. pickerOptions.value.panelReady = true;
  18656. };
  18657. const onCalendarChange = (e) => {
  18658. emit("calendar-change", e);
  18659. };
  18660. const onPanelChange = (value, mode, view) => {
  18661. emit("panel-change", value, mode, view);
  18662. };
  18663. const onPick = (date = "", visible = false) => {
  18664. pickerVisible.value = visible;
  18665. let result;
  18666. if (isArray$1(date)) result = date.map((_) => _.toDate());
  18667. else result = date ? date.toDate() : date;
  18668. userInput.value = null;
  18669. emitInput(result);
  18670. };
  18671. return {
  18672. parsedValue,
  18673. pickerActualVisible,
  18674. pickerOptions,
  18675. pickerVisible,
  18676. userInput,
  18677. valueIsEmpty,
  18678. emitInput,
  18679. onCalendarChange,
  18680. onPanelChange,
  18681. onPick,
  18682. onSetPickerOption
  18683. };
  18684. };
  18685. //#endregion
  18686. //#region node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.vue_vue_type_script_setup_true_lang.mjs
  18687. var _hoisted_1$72 = [
  18688. "id",
  18689. "name",
  18690. "placeholder",
  18691. "value",
  18692. "disabled"
  18693. ];
  18694. var _hoisted_2$41 = [
  18695. "id",
  18696. "name",
  18697. "placeholder",
  18698. "value",
  18699. "disabled"
  18700. ];
  18701. //#endregion
  18702. //#region node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.mjs
  18703. var picker_range_trigger_default = /* @__PURE__ */ defineComponent({
  18704. name: "PickerRangeTrigger",
  18705. inheritAttrs: false,
  18706. __name: "picker-range-trigger",
  18707. props: timePickerRangeTriggerProps,
  18708. emits: [
  18709. "mouseenter",
  18710. "mouseleave",
  18711. "click",
  18712. "touchstart",
  18713. "focus",
  18714. "blur",
  18715. "startInput",
  18716. "endInput",
  18717. "startChange",
  18718. "endChange"
  18719. ],
  18720. setup(__props, { expose: __expose, emit: __emit }) {
  18721. const props = __props;
  18722. const emit = __emit;
  18723. const { formItem } = useFormItem();
  18724. const { inputId } = useFormItemInputId(reactive({ id: computed(() => props.id?.[0]) }), { formItemContext: formItem });
  18725. const attrs = useAttrs();
  18726. const nsDate = useNamespace("date");
  18727. const nsRange = useNamespace("range");
  18728. const inputRef = ref();
  18729. const endInputRef = ref();
  18730. const { wrapperRef, isFocused } = useFocusController(inputRef, { disabled: computed(() => props.disabled) });
  18731. const handleClick = (evt) => {
  18732. emit("click", evt);
  18733. };
  18734. const handleMouseEnter = (evt) => {
  18735. emit("mouseenter", evt);
  18736. };
  18737. const handleMouseLeave = (evt) => {
  18738. emit("mouseleave", evt);
  18739. };
  18740. const handleTouchStart = (evt) => {
  18741. emit("touchstart", evt);
  18742. };
  18743. const handleStartInput = (evt) => {
  18744. emit("startInput", evt);
  18745. };
  18746. const handleEndInput = (evt) => {
  18747. emit("endInput", evt);
  18748. };
  18749. const handleStartChange = (evt) => {
  18750. emit("startChange", evt);
  18751. };
  18752. const handleEndChange = (evt) => {
  18753. emit("endChange", evt);
  18754. };
  18755. const focus = () => {
  18756. inputRef.value?.focus();
  18757. };
  18758. const blur = () => {
  18759. inputRef.value?.blur();
  18760. endInputRef.value?.blur();
  18761. };
  18762. __expose({
  18763. focus,
  18764. blur
  18765. });
  18766. return (_ctx, _cache) => {
  18767. return openBlock(), createElementBlock("div", {
  18768. ref_key: "wrapperRef",
  18769. ref: wrapperRef,
  18770. class: normalizeClass([unref(nsDate).is("active", unref(isFocused)), _ctx.$attrs.class]),
  18771. style: normalizeStyle(_ctx.$attrs.style),
  18772. onClick: handleClick,
  18773. onMouseenter: handleMouseEnter,
  18774. onMouseleave: handleMouseLeave,
  18775. onTouchstartPassive: handleTouchStart
  18776. }, [
  18777. renderSlot(_ctx.$slots, "prefix"),
  18778. createBaseVNode("input", mergeProps(unref(attrs), {
  18779. id: unref(inputId),
  18780. ref_key: "inputRef",
  18781. ref: inputRef,
  18782. name: _ctx.name && _ctx.name[0],
  18783. placeholder: _ctx.startPlaceholder,
  18784. value: _ctx.modelValue && _ctx.modelValue[0],
  18785. class: unref(nsRange).b("input"),
  18786. disabled: _ctx.disabled,
  18787. onInput: handleStartInput,
  18788. onChange: handleStartChange
  18789. }), null, 16, _hoisted_1$72),
  18790. renderSlot(_ctx.$slots, "range-separator"),
  18791. createBaseVNode("input", mergeProps(unref(attrs), {
  18792. id: _ctx.id && _ctx.id[1],
  18793. ref_key: "endInputRef",
  18794. ref: endInputRef,
  18795. name: _ctx.name && _ctx.name[1],
  18796. placeholder: _ctx.endPlaceholder,
  18797. value: _ctx.modelValue && _ctx.modelValue[1],
  18798. class: unref(nsRange).b("input"),
  18799. disabled: _ctx.disabled,
  18800. onInput: handleEndInput,
  18801. onChange: handleEndChange
  18802. }), null, 16, _hoisted_2$41),
  18803. renderSlot(_ctx.$slots, "suffix")
  18804. ], 38);
  18805. };
  18806. }
  18807. });
  18808. //#endregion
  18809. //#region node_modules/element-plus/es/components/time-picker/src/common/picker.mjs
  18810. var picker_default = /* @__PURE__ */ defineComponent({
  18811. name: "Picker",
  18812. __name: "picker",
  18813. props: timePickerDefaultProps,
  18814. emits: [
  18815. UPDATE_MODEL_EVENT,
  18816. CHANGE_EVENT,
  18817. "focus",
  18818. "blur",
  18819. "clear",
  18820. "calendar-change",
  18821. "panel-change",
  18822. "visible-change",
  18823. "keydown"
  18824. ],
  18825. setup(__props, { expose: __expose, emit: __emit }) {
  18826. const props = __props;
  18827. const emit = __emit;
  18828. const attrs = useAttrs$1();
  18829. const nsDate = useNamespace("date");
  18830. const nsInput = useNamespace("input");
  18831. const nsRange = useNamespace("range");
  18832. const { formItem } = useFormItem();
  18833. const elPopperOptions = inject(PICKER_POPPER_OPTIONS_INJECTION_KEY, {});
  18834. const emptyValues = useEmptyValues(props, null);
  18835. const refPopper = ref();
  18836. const inputRef = ref();
  18837. const valueOnOpen = ref(null);
  18838. let hasJustTabExitedInput = false;
  18839. const pickerDisabled = useFormDisabled();
  18840. const commonPicker = useCommonPicker(props, emit);
  18841. const { parsedValue, pickerActualVisible, userInput, pickerVisible, pickerOptions, valueIsEmpty, emitInput, onPick, onSetPickerOption, onCalendarChange, onPanelChange } = commonPicker;
  18842. const { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, {
  18843. disabled: pickerDisabled,
  18844. beforeFocus() {
  18845. return props.readonly;
  18846. },
  18847. afterFocus() {
  18848. if (!props.automaticDropdown) return;
  18849. pickerVisible.value = true;
  18850. },
  18851. beforeBlur(event) {
  18852. return !hasJustTabExitedInput && refPopper.value?.isFocusInsideContent(event);
  18853. },
  18854. afterBlur() {
  18855. if (isTimePicker.value && !props.saveOnBlur) {
  18856. if (!valueIsEmpty.value) pickerOptions.value.handleCancel?.();
  18857. } else handleChange();
  18858. pickerVisible.value = false;
  18859. hasJustTabExitedInput = false;
  18860. props.validateEvent && formItem?.validate("blur").catch(NOOP);
  18861. }
  18862. });
  18863. const hovering = ref(false);
  18864. const rangeInputKls = computed(() => [
  18865. nsDate.b("editor"),
  18866. nsDate.bm("editor", props.type),
  18867. nsInput.e("wrapper"),
  18868. nsDate.is("disabled", pickerDisabled.value),
  18869. nsDate.is("active", pickerVisible.value),
  18870. nsRange.b("editor"),
  18871. pickerSize ? nsRange.bm("editor", pickerSize.value) : "",
  18872. attrs.class
  18873. ]);
  18874. const clearIconKls = computed(() => [
  18875. nsInput.e("icon"),
  18876. nsRange.e("close-icon"),
  18877. !showClearBtn.value ? nsRange.em("close-icon", "hidden") : ""
  18878. ]);
  18879. watch(pickerVisible, (val) => {
  18880. if (!val) {
  18881. userInput.value = null;
  18882. nextTick(() => {
  18883. emitChange(props.modelValue);
  18884. });
  18885. } else nextTick(() => {
  18886. if (val) valueOnOpen.value = props.modelValue;
  18887. });
  18888. });
  18889. const emitChange = (val, isClear) => {
  18890. if (isClear || !valueEquals(val, valueOnOpen.value)) {
  18891. emit(CHANGE_EVENT, val);
  18892. isClear && (valueOnOpen.value = val);
  18893. props.validateEvent && formItem?.validate("change").catch(NOOP);
  18894. }
  18895. };
  18896. const emitKeydown = (e) => {
  18897. emit("keydown", e);
  18898. };
  18899. const refInput = computed(() => {
  18900. if (inputRef.value) return Array.from(inputRef.value.$el.querySelectorAll("input"));
  18901. return [];
  18902. });
  18903. const setSelectionRange = (start, end, pos) => {
  18904. const _inputs = refInput.value;
  18905. if (!_inputs.length) return;
  18906. if (!pos || pos === "min") {
  18907. _inputs[0].setSelectionRange(start, end);
  18908. _inputs[0].focus();
  18909. } else if (pos === "max") {
  18910. _inputs[1].setSelectionRange(start, end);
  18911. _inputs[1].focus();
  18912. }
  18913. };
  18914. const onBeforeShow = () => {
  18915. pickerActualVisible.value = true;
  18916. };
  18917. const onShow = () => {
  18918. emit("visible-change", true);
  18919. };
  18920. const onHide = () => {
  18921. pickerActualVisible.value = false;
  18922. pickerVisible.value = false;
  18923. emit("visible-change", false);
  18924. };
  18925. const handleOpen = () => {
  18926. pickerVisible.value = true;
  18927. };
  18928. const handleClose = () => {
  18929. pickerVisible.value = false;
  18930. };
  18931. const displayValue = computed(() => {
  18932. const formattedValue = formatToString(parsedValue.value);
  18933. if (isArray$1(userInput.value)) return [userInput.value[0] ?? (formattedValue && formattedValue[0]) ?? "", userInput.value[1] ?? (formattedValue && formattedValue[1]) ?? ""];
  18934. else if (userInput.value !== null) return userInput.value;
  18935. if (isTimePicker.value && valueIsEmpty.value && !props.saveOnBlur) return "";
  18936. if (!isTimePicker.value && valueIsEmpty.value) return "";
  18937. if (!pickerVisible.value && valueIsEmpty.value) return "";
  18938. if (formattedValue) return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value ? formattedValue.join(", ") : formattedValue;
  18939. return "";
  18940. });
  18941. const isTimeLikePicker = computed(() => props.type.includes("time"));
  18942. const isTimePicker = computed(() => props.type.startsWith("time"));
  18943. const isDatesPicker = computed(() => props.type === "dates");
  18944. const isMonthsPicker = computed(() => props.type === "months");
  18945. const isYearsPicker = computed(() => props.type === "years");
  18946. const triggerIcon = computed(() => props.prefixIcon || (isTimeLikePicker.value ? clock_default : calendar_default$1));
  18947. const showClearBtn = computed(() => props.clearable && !pickerDisabled.value && !props.readonly && !valueIsEmpty.value && (hovering.value || isFocused.value));
  18948. const onClear = (event) => {
  18949. if (props.readonly || pickerDisabled.value) return;
  18950. if (showClearBtn.value) {
  18951. event?.stopPropagation();
  18952. if (pickerOptions.value.handleClear) pickerOptions.value.handleClear();
  18953. else emitInput(emptyValues.valueOnClear.value);
  18954. emitChange(emptyValues.valueOnClear.value, true);
  18955. onHide();
  18956. }
  18957. emit("clear");
  18958. };
  18959. const onMouseDownInput = async (event) => {
  18960. if (props.readonly || pickerDisabled.value) return;
  18961. if (event.target?.tagName !== "INPUT" || isFocused.value || !props.automaticDropdown) pickerVisible.value = true;
  18962. };
  18963. const onMouseEnter = () => {
  18964. if (props.readonly || pickerDisabled.value) return;
  18965. if (!valueIsEmpty.value && props.clearable) hovering.value = true;
  18966. };
  18967. const onMouseLeave = () => {
  18968. hovering.value = false;
  18969. };
  18970. const onTouchStartInput = (event) => {
  18971. if (props.readonly || pickerDisabled.value) return;
  18972. if (event.touches[0].target?.tagName !== "INPUT" || isFocused.value || !props.automaticDropdown) pickerVisible.value = true;
  18973. };
  18974. const isRangeInput = computed(() => {
  18975. return props.type.includes("range");
  18976. });
  18977. const pickerSize = useFormSize();
  18978. const popperEl = computed(() => unref(refPopper)?.popperRef?.contentRef);
  18979. const stophandle = onClickOutside(inputRef, (e) => {
  18980. const unrefedPopperEl = unref(popperEl);
  18981. const inputEl = unrefElement(inputRef);
  18982. if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || inputEl && e.composedPath().includes(inputEl)) return;
  18983. pickerVisible.value = false;
  18984. });
  18985. onBeforeUnmount(() => {
  18986. stophandle?.();
  18987. });
  18988. const handleChange = () => {
  18989. if (isTimePicker.value && !props.saveOnBlur) return;
  18990. const isRangeEmpty = isArray$1(userInput.value) && userInput.value.every((v) => v === "");
  18991. if (userInput.value && !isRangeEmpty) {
  18992. const value = parseUserInputToDayjs(displayValue.value);
  18993. if (value) {
  18994. if (isValidValue(value)) emitInput(dayOrDaysToDate(value));
  18995. userInput.value = null;
  18996. }
  18997. }
  18998. if (userInput.value === "" || isRangeEmpty) {
  18999. emitInput(emptyValues.valueOnClear.value);
  19000. emitChange(emptyValues.valueOnClear.value, true);
  19001. userInput.value = null;
  19002. }
  19003. };
  19004. const parseUserInputToDayjs = (value) => {
  19005. if (!value) return null;
  19006. return pickerOptions.value.parseUserInput(value);
  19007. };
  19008. const formatToString = (value) => {
  19009. if (!value) return null;
  19010. return isArray$1(value) ? value.map((_) => _.format(props.format)) : value.format(props.format);
  19011. };
  19012. const isValidValue = (value) => {
  19013. return pickerOptions.value.isValidValue(value);
  19014. };
  19015. const handleKeydownInput = async (event) => {
  19016. if (props.readonly || pickerDisabled.value) return;
  19017. const code = getEventCode(event);
  19018. emitKeydown(event);
  19019. if (code === EVENT_CODE.esc) {
  19020. if (pickerVisible.value === true) {
  19021. pickerVisible.value = false;
  19022. event.preventDefault();
  19023. event.stopPropagation();
  19024. }
  19025. return;
  19026. }
  19027. if (code === EVENT_CODE.down) {
  19028. if (pickerOptions.value.handleFocusPicker) {
  19029. event.preventDefault();
  19030. event.stopPropagation();
  19031. }
  19032. if (pickerVisible.value === false) {
  19033. pickerVisible.value = true;
  19034. await nextTick();
  19035. }
  19036. if (pickerOptions.value.handleFocusPicker) {
  19037. pickerOptions.value.handleFocusPicker();
  19038. return;
  19039. }
  19040. }
  19041. if (code === EVENT_CODE.tab) {
  19042. hasJustTabExitedInput = true;
  19043. return;
  19044. }
  19045. if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {
  19046. if (!pickerVisible.value) pickerVisible.value = true;
  19047. else if (userInput.value === null || userInput.value === "" || isValidValue(parseUserInputToDayjs(displayValue.value))) {
  19048. handleChange();
  19049. pickerVisible.value = false;
  19050. }
  19051. event.preventDefault();
  19052. event.stopPropagation();
  19053. return;
  19054. }
  19055. if (userInput.value) {
  19056. event.stopPropagation();
  19057. return;
  19058. }
  19059. if (pickerOptions.value.handleKeydownInput) pickerOptions.value.handleKeydownInput(event);
  19060. };
  19061. const onUserInput = (e) => {
  19062. userInput.value = e;
  19063. if (!pickerVisible.value) pickerVisible.value = true;
  19064. };
  19065. const handleStartInput = (event) => {
  19066. const target = event.target;
  19067. if (userInput.value) userInput.value = [target.value, userInput.value[1]];
  19068. else userInput.value = [target.value, null];
  19069. };
  19070. const handleEndInput = (event) => {
  19071. const target = event.target;
  19072. if (userInput.value) userInput.value = [userInput.value[0], target.value];
  19073. else userInput.value = [null, target.value];
  19074. };
  19075. const handleStartChange = () => {
  19076. const values = userInput.value;
  19077. const value = parseUserInputToDayjs(values && values[0]);
  19078. const parsedVal = unref(parsedValue);
  19079. if (value && value.isValid()) {
  19080. userInput.value = [formatToString(value), displayValue.value?.[1] || null];
  19081. const newValue = [value, parsedVal && (parsedVal[1] || null)];
  19082. if (isValidValue(newValue)) {
  19083. emitInput(dayOrDaysToDate(newValue));
  19084. userInput.value = null;
  19085. }
  19086. }
  19087. };
  19088. const handleEndChange = () => {
  19089. const values = unref(userInput);
  19090. const value = parseUserInputToDayjs(values && values[1]);
  19091. const parsedVal = unref(parsedValue);
  19092. if (value && value.isValid()) {
  19093. userInput.value = [unref(displayValue)?.[0] || null, formatToString(value)];
  19094. const newValue = [parsedVal && parsedVal[0], value];
  19095. if (isValidValue(newValue)) {
  19096. emitInput(dayOrDaysToDate(newValue));
  19097. userInput.value = null;
  19098. }
  19099. }
  19100. };
  19101. const focus = () => {
  19102. inputRef.value?.focus();
  19103. };
  19104. const blur = () => {
  19105. inputRef.value?.blur();
  19106. };
  19107. provide(PICKER_BASE_INJECTION_KEY, {
  19108. props,
  19109. emptyValues
  19110. });
  19111. provide(ROOT_COMMON_PICKER_INJECTION_KEY, commonPicker);
  19112. __expose({
  19113. /**
  19114. * @description focus input box.
  19115. */
  19116. focus,
  19117. /**
  19118. * @description blur input box.
  19119. */
  19120. blur,
  19121. /**
  19122. * @description opens picker
  19123. */
  19124. handleOpen,
  19125. /**
  19126. * @description closes picker
  19127. */
  19128. handleClose,
  19129. /**
  19130. * @description pick item manually
  19131. */
  19132. onPick
  19133. });
  19134. return (_ctx, _cache) => {
  19135. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  19136. ref_key: "refPopper",
  19137. ref: refPopper,
  19138. visible: unref(pickerVisible),
  19139. effect: "light",
  19140. pure: "",
  19141. trigger: "click"
  19142. }, _ctx.$attrs, {
  19143. role: "dialog",
  19144. teleported: "",
  19145. transition: `${unref(nsDate).namespace.value}-zoom-in-top`,
  19146. "popper-class": [`${unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass],
  19147. "popper-style": _ctx.popperStyle,
  19148. "popper-options": unref(elPopperOptions),
  19149. "fallback-placements": _ctx.fallbackPlacements,
  19150. "gpu-acceleration": false,
  19151. placement: _ctx.placement,
  19152. "stop-popper-mouse-event": false,
  19153. "hide-after": 0,
  19154. persistent: "",
  19155. onBeforeShow,
  19156. onShow,
  19157. onHide
  19158. }), {
  19159. default: withCtx(() => [!isRangeInput.value ? (openBlock(), createBlock(unref(ElInput), {
  19160. key: 0,
  19161. id: _ctx.id,
  19162. ref_key: "inputRef",
  19163. ref: inputRef,
  19164. "container-role": "combobox",
  19165. "model-value": displayValue.value,
  19166. name: _ctx.name,
  19167. size: unref(pickerSize),
  19168. disabled: unref(pickerDisabled),
  19169. placeholder: _ctx.placeholder,
  19170. class: normalizeClass([
  19171. unref(nsDate).b("editor"),
  19172. unref(nsDate).bm("editor", _ctx.type),
  19173. unref(nsDate).is("focus", unref(pickerVisible)),
  19174. _ctx.$attrs.class
  19175. ]),
  19176. style: normalizeStyle(_ctx.$attrs.style),
  19177. readonly: !_ctx.editable || _ctx.readonly || isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value || _ctx.type === "week",
  19178. "aria-label": _ctx.ariaLabel,
  19179. tabindex: _ctx.tabindex,
  19180. "validate-event": false,
  19181. onInput: onUserInput,
  19182. onFocus: unref(handleFocus),
  19183. onBlur: unref(handleBlur),
  19184. onKeydown: handleKeydownInput,
  19185. onChange: handleChange,
  19186. onMousedown: onMouseDownInput,
  19187. onMouseenter: onMouseEnter,
  19188. onMouseleave: onMouseLeave,
  19189. onTouchstartPassive: onTouchStartInput,
  19190. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  19191. }, {
  19192. prefix: withCtx(() => [triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  19193. key: 0,
  19194. class: normalizeClass(unref(nsInput).e("icon")),
  19195. onMousedown: withModifiers(onMouseDownInput, ["prevent"]),
  19196. onTouchstartPassive: onTouchStartInput
  19197. }, {
  19198. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value)))]),
  19199. _: 1
  19200. }, 8, ["class"])) : createCommentVNode("v-if", true)]),
  19201. suffix: withCtx(() => [showClearBtn.value && _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  19202. key: 0,
  19203. class: normalizeClass(`${unref(nsInput).e("icon")} clear-icon`),
  19204. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  19205. onClick: onClear
  19206. }, {
  19207. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  19208. _: 1
  19209. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)]),
  19210. _: 1
  19211. }, 8, [
  19212. "id",
  19213. "model-value",
  19214. "name",
  19215. "size",
  19216. "disabled",
  19217. "placeholder",
  19218. "class",
  19219. "style",
  19220. "readonly",
  19221. "aria-label",
  19222. "tabindex",
  19223. "onFocus",
  19224. "onBlur"
  19225. ])) : (openBlock(), createBlock(picker_range_trigger_default, {
  19226. key: 1,
  19227. id: _ctx.id,
  19228. ref_key: "inputRef",
  19229. ref: inputRef,
  19230. "model-value": displayValue.value,
  19231. name: _ctx.name,
  19232. disabled: unref(pickerDisabled),
  19233. readonly: !_ctx.editable || _ctx.readonly,
  19234. "start-placeholder": _ctx.startPlaceholder,
  19235. "end-placeholder": _ctx.endPlaceholder,
  19236. class: normalizeClass(rangeInputKls.value),
  19237. style: normalizeStyle(_ctx.$attrs.style),
  19238. "aria-label": _ctx.ariaLabel,
  19239. tabindex: _ctx.tabindex,
  19240. autocomplete: "off",
  19241. role: "combobox",
  19242. onClick: onMouseDownInput,
  19243. onFocus: unref(handleFocus),
  19244. onBlur: unref(handleBlur),
  19245. onStartInput: handleStartInput,
  19246. onStartChange: handleStartChange,
  19247. onEndInput: handleEndInput,
  19248. onEndChange: handleEndChange,
  19249. onMousedown: onMouseDownInput,
  19250. onMouseenter: onMouseEnter,
  19251. onMouseleave: onMouseLeave,
  19252. onTouchstartPassive: onTouchStartInput,
  19253. onKeydown: handleKeydownInput
  19254. }, {
  19255. prefix: withCtx(() => [triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  19256. key: 0,
  19257. class: normalizeClass([unref(nsInput).e("icon"), unref(nsRange).e("icon")])
  19258. }, {
  19259. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value)))]),
  19260. _: 1
  19261. }, 8, ["class"])) : createCommentVNode("v-if", true)]),
  19262. "range-separator": withCtx(() => [renderSlot(_ctx.$slots, "range-separator", {}, () => [createBaseVNode("span", { class: normalizeClass(unref(nsRange).b("separator")) }, toDisplayString(_ctx.rangeSeparator), 3)])]),
  19263. suffix: withCtx(() => [_ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  19264. key: 0,
  19265. class: normalizeClass(clearIconKls.value),
  19266. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  19267. onClick: onClear
  19268. }, {
  19269. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  19270. _: 1
  19271. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)]),
  19272. _: 3
  19273. }, 8, [
  19274. "id",
  19275. "model-value",
  19276. "name",
  19277. "disabled",
  19278. "readonly",
  19279. "start-placeholder",
  19280. "end-placeholder",
  19281. "class",
  19282. "style",
  19283. "aria-label",
  19284. "tabindex",
  19285. "onFocus",
  19286. "onBlur"
  19287. ]))]),
  19288. content: withCtx(() => [renderSlot(_ctx.$slots, "default", {
  19289. visible: unref(pickerVisible),
  19290. actualVisible: unref(pickerActualVisible),
  19291. parsedValue: unref(parsedValue),
  19292. format: _ctx.format,
  19293. dateFormat: _ctx.dateFormat,
  19294. timeFormat: _ctx.timeFormat,
  19295. unlinkPanels: _ctx.unlinkPanels,
  19296. type: _ctx.type,
  19297. defaultValue: _ctx.defaultValue,
  19298. showNow: _ctx.showNow,
  19299. showConfirm: _ctx.showConfirm,
  19300. showFooter: _ctx.showFooter,
  19301. showWeekNumber: _ctx.showWeekNumber,
  19302. singlePanel: _ctx.singlePanel,
  19303. onPick: _cache[1] || (_cache[1] = (...args) => unref(onPick) && unref(onPick)(...args)),
  19304. onSelectRange: setSelectionRange,
  19305. onSetPickerOption: _cache[2] || (_cache[2] = (...args) => unref(onSetPickerOption) && unref(onSetPickerOption)(...args)),
  19306. onCalendarChange: _cache[3] || (_cache[3] = (...args) => unref(onCalendarChange) && unref(onCalendarChange)(...args)),
  19307. onClear,
  19308. onPanelChange: _cache[4] || (_cache[4] = (...args) => unref(onPanelChange) && unref(onPanelChange)(...args)),
  19309. onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"]))
  19310. })]),
  19311. _: 3
  19312. }, 16, [
  19313. "visible",
  19314. "transition",
  19315. "popper-class",
  19316. "popper-style",
  19317. "popper-options",
  19318. "fallback-placements",
  19319. "placement"
  19320. ]);
  19321. };
  19322. }
  19323. });
  19324. //#endregion
  19325. //#region node_modules/element-plus/es/directives/click-outside/index.mjs
  19326. var nodeList = /* @__PURE__ */ new Map();
  19327. if (isClient) {
  19328. let startClick;
  19329. document.addEventListener("mousedown", (e) => startClick = e);
  19330. document.addEventListener("mouseup", (e) => {
  19331. if (startClick) {
  19332. for (const handlers of nodeList.values()) for (const { documentHandler } of handlers) documentHandler(e, startClick);
  19333. startClick = void 0;
  19334. }
  19335. });
  19336. }
  19337. function createDocumentHandler(el, binding) {
  19338. let excludes = [];
  19339. if (isArray$1(binding.arg)) excludes = binding.arg;
  19340. else if (isElement$1(binding.arg)) excludes.push(binding.arg);
  19341. return function(mouseup, mousedown) {
  19342. const popperRef = binding.instance.popperRef;
  19343. const mouseUpTarget = mouseup.target;
  19344. const mouseDownTarget = mousedown?.target;
  19345. const isBound = !binding || !binding.instance;
  19346. const isTargetExists = !mouseUpTarget || !mouseDownTarget;
  19347. const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
  19348. const isSelf = el === mouseUpTarget;
  19349. const isTargetExcluded = excludes.length && excludes.some((item) => item?.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget);
  19350. const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
  19351. if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) return;
  19352. binding.value(mouseup, mousedown);
  19353. };
  19354. }
  19355. var ClickOutside = {
  19356. beforeMount(el, binding) {
  19357. if (!nodeList.has(el)) nodeList.set(el, []);
  19358. nodeList.get(el).push({
  19359. documentHandler: createDocumentHandler(el, binding),
  19360. bindingFn: binding.value
  19361. });
  19362. },
  19363. updated(el, binding) {
  19364. if (!nodeList.has(el)) nodeList.set(el, []);
  19365. const handlers = nodeList.get(el);
  19366. const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
  19367. const newHandler = {
  19368. documentHandler: createDocumentHandler(el, binding),
  19369. bindingFn: binding.value
  19370. };
  19371. if (oldHandlerIndex >= 0) handlers.splice(oldHandlerIndex, 1, newHandler);
  19372. else handlers.push(newHandler);
  19373. },
  19374. unmounted(el) {
  19375. nodeList.delete(el);
  19376. }
  19377. };
  19378. //#endregion
  19379. //#region node_modules/element-plus/es/directives/repeat-click/index.mjs
  19380. var SCOPE$9 = "_RepeatClick";
  19381. var vRepeatClick = {
  19382. beforeMount(el, binding) {
  19383. const value = binding.value;
  19384. const { interval = 100, delay = 600 } = isFunction$1(value) ? {} : value;
  19385. let intervalId;
  19386. let delayId;
  19387. const handler = () => isFunction$1(value) ? value() : value.handler();
  19388. const clear = () => {
  19389. if (delayId) {
  19390. clearTimeout(delayId);
  19391. delayId = void 0;
  19392. }
  19393. if (intervalId) {
  19394. clearInterval(intervalId);
  19395. intervalId = void 0;
  19396. }
  19397. };
  19398. const start = (evt) => {
  19399. if (evt.button !== 0) return;
  19400. clear();
  19401. handler();
  19402. document.addEventListener("mouseup", clear, { once: true });
  19403. delayId = setTimeout(() => {
  19404. intervalId = setInterval(() => {
  19405. handler();
  19406. }, interval);
  19407. }, delay);
  19408. };
  19409. el[SCOPE$9] = {
  19410. start,
  19411. clear
  19412. };
  19413. el.addEventListener("mousedown", start);
  19414. },
  19415. unmounted(el) {
  19416. if (!el[SCOPE$9]) return;
  19417. const { start, clear } = el[SCOPE$9];
  19418. if (start) el.removeEventListener("mousedown", start);
  19419. if (clear) {
  19420. clear();
  19421. document.removeEventListener("mouseup", clear);
  19422. }
  19423. el[SCOPE$9] = null;
  19424. }
  19425. };
  19426. //#endregion
  19427. //#region node_modules/element-plus/es/directives/trap-focus/index.mjs
  19428. var FOCUSABLE_CHILDREN = "_trap-focus-children";
  19429. var FOCUS_STACK = [];
  19430. var FOCUS_HANDLER = (e) => {
  19431. if (FOCUS_STACK.length === 0) return;
  19432. const code = getEventCode(e);
  19433. const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];
  19434. if (focusableElement.length > 0 && code === EVENT_CODE.tab) {
  19435. if (focusableElement.length === 1) {
  19436. e.preventDefault();
  19437. if (document.activeElement !== focusableElement[0]) focusableElement[0].focus();
  19438. return;
  19439. }
  19440. const goingBackward = e.shiftKey;
  19441. const isFirst = e.target === focusableElement[0];
  19442. const isLast = e.target === focusableElement[focusableElement.length - 1];
  19443. if (isFirst && goingBackward) {
  19444. e.preventDefault();
  19445. focusableElement[focusableElement.length - 1].focus();
  19446. }
  19447. if (isLast && !goingBackward) {
  19448. e.preventDefault();
  19449. focusableElement[0].focus();
  19450. }
  19451. }
  19452. };
  19453. var TrapFocus = {
  19454. beforeMount(el) {
  19455. el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements$1(el);
  19456. FOCUS_STACK.push(el);
  19457. if (FOCUS_STACK.length <= 1) document.addEventListener("keydown", FOCUS_HANDLER);
  19458. },
  19459. updated(el) {
  19460. nextTick(() => {
  19461. el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements$1(el);
  19462. });
  19463. },
  19464. unmounted() {
  19465. FOCUS_STACK.shift();
  19466. if (FOCUS_STACK.length === 0) document.removeEventListener("keydown", FOCUS_HANDLER);
  19467. }
  19468. };
  19469. //#endregion
  19470. //#region node_modules/normalize-wheel-es/dist/index.mjs
  19471. var v = !1, o, f, s, u, d, N, l, p, m, w, D, x, E, M, F;
  19472. function a() {
  19473. if (!v) {
  19474. v = !0;
  19475. var e = navigator.userAgent, n = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), i = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
  19476. if (x = /\b(iPhone|iP[ao]d)/.exec(e), E = /\b(iP[ao]d)/.exec(e), w = /Android/i.exec(e), M = /FBAN\/\w+;/i.exec(e), F = /Mobile/i.exec(e), D = !!/Win64/.exec(e), n) {
  19477. o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode);
  19478. var r = /(?:Trident\/(\d+.\d+))/.exec(e);
  19479. N = r ? parseFloat(r[1]) + 4 : o, f = n[2] ? parseFloat(n[2]) : NaN, s = n[3] ? parseFloat(n[3]) : NaN, u = n[4] ? parseFloat(n[4]) : NaN, u ? (n = /(?:Chrome\/(\d+\.\d+))/.exec(e), d = n && n[1] ? parseFloat(n[1]) : NaN) : d = NaN;
  19480. } else o = f = s = d = u = NaN;
  19481. if (i) {
  19482. if (i[1]) {
  19483. var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
  19484. l = t ? parseFloat(t[1].replace("_", ".")) : !0;
  19485. } else l = !1;
  19486. p = !!i[2], m = !!i[3];
  19487. } else l = p = m = !1;
  19488. }
  19489. }
  19490. var _ = {
  19491. ie: function() {
  19492. return a() || o;
  19493. },
  19494. ieCompatibilityMode: function() {
  19495. return a() || N > o;
  19496. },
  19497. ie64: function() {
  19498. return _.ie() && D;
  19499. },
  19500. firefox: function() {
  19501. return a() || f;
  19502. },
  19503. opera: function() {
  19504. return a() || s;
  19505. },
  19506. webkit: function() {
  19507. return a() || u;
  19508. },
  19509. safari: function() {
  19510. return _.webkit();
  19511. },
  19512. chrome: function() {
  19513. return a() || d;
  19514. },
  19515. windows: function() {
  19516. return a() || p;
  19517. },
  19518. osx: function() {
  19519. return a() || l;
  19520. },
  19521. linux: function() {
  19522. return a() || m;
  19523. },
  19524. iphone: function() {
  19525. return a() || x;
  19526. },
  19527. mobile: function() {
  19528. return a() || x || E || w || F;
  19529. },
  19530. nativeApp: function() {
  19531. return a() || M;
  19532. },
  19533. android: function() {
  19534. return a() || w;
  19535. },
  19536. ipad: function() {
  19537. return a() || E;
  19538. }
  19539. }, A = _;
  19540. var c = !!(typeof window < "u" && window.document && window.document.createElement), h = {
  19541. canUseDOM: c,
  19542. canUseWorkers: typeof Worker < "u",
  19543. canUseEventListeners: c && !!(window.addEventListener || window.attachEvent),
  19544. canUseViewport: c && !!window.screen,
  19545. isInWorker: !c
  19546. };
  19547. var X;
  19548. h.canUseDOM && (X = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0);
  19549. function S(e, n) {
  19550. if (!h.canUseDOM || n && !("addEventListener" in document)) return !1;
  19551. var i = "on" + e, r = i in document;
  19552. if (!r) {
  19553. var t = document.createElement("div");
  19554. t.setAttribute(i, "return;"), r = typeof t[i] == "function";
  19555. }
  19556. return !r && X && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r;
  19557. }
  19558. var b = S;
  19559. var O = 10, I = 40, P = 800;
  19560. function T(e) {
  19561. var n = 0, i = 0, r = 0, t = 0;
  19562. return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (n = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (n = i, i = 0), r = n * O, t = i * O, "deltaY" in e && (t = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || t) && e.deltaMode && (e.deltaMode == 1 ? (r *= I, t *= I) : (r *= P, t *= P)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), {
  19563. spinX: n,
  19564. spinY: i,
  19565. pixelX: r,
  19566. pixelY: t
  19567. };
  19568. }
  19569. T.getEventType = function() {
  19570. return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel";
  19571. };
  19572. var Y = T;
  19573. /**
  19574. * Checks if an event is supported in the current execution environment.
  19575. *
  19576. * NOTE: This will not work correctly for non-generic events such as `change`,
  19577. * `reset`, `load`, `error`, and `select`.
  19578. *
  19579. * Borrows from Modernizr.
  19580. *
  19581. * @param {string} eventNameSuffix Event name, e.g. "click".
  19582. * @param {?boolean} capture Check if the capture phase is supported.
  19583. * @return {boolean} True if the event is supported.
  19584. * @internal
  19585. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  19586. */
  19587. //#endregion
  19588. //#region node_modules/element-plus/es/directives/mousewheel/index.mjs
  19589. var SCOPE$8 = "_Mousewheel";
  19590. var mousewheel = function(element, callback) {
  19591. if (element && element.addEventListener) {
  19592. removeWheelHandler(element);
  19593. const fn = function(event) {
  19594. const normalized = Y(event);
  19595. callback && Reflect.apply(callback, this, [event, normalized]);
  19596. };
  19597. element[SCOPE$8] = { wheelHandler: fn };
  19598. element.addEventListener("wheel", fn, { passive: true });
  19599. }
  19600. };
  19601. var removeWheelHandler = (element) => {
  19602. if (element["_Mousewheel"]?.wheelHandler) {
  19603. element.removeEventListener("wheel", element[SCOPE$8].wheelHandler);
  19604. element[SCOPE$8] = null;
  19605. }
  19606. };
  19607. var Mousewheel = {
  19608. beforeMount(el, binding) {
  19609. mousewheel(el, binding.value);
  19610. },
  19611. unmounted(el) {
  19612. removeWheelHandler(el);
  19613. },
  19614. updated(el, binding) {
  19615. if (binding.value !== binding.oldValue) mousewheel(el, binding.value);
  19616. }
  19617. };
  19618. //#endregion
  19619. //#region node_modules/element-plus/es/components/time-picker/src/props/panel-time-picker.mjs
  19620. var panelTimePickerProps = buildProps({
  19621. ...timePanelSharedProps,
  19622. datetimeRole: String,
  19623. parsedValue: { type: definePropType(Object) }
  19624. });
  19625. //#endregion
  19626. //#region node_modules/element-plus/es/components/time-picker/src/composables/use-time-panel.mjs
  19627. var useTimePanel = ({ getAvailableHours, getAvailableMinutes, getAvailableSeconds }) => {
  19628. const getAvailableTime = (date, role, first, compareDate) => {
  19629. const availableTimeGetters = {
  19630. hour: getAvailableHours,
  19631. minute: getAvailableMinutes,
  19632. second: getAvailableSeconds
  19633. };
  19634. let result = date;
  19635. [
  19636. "hour",
  19637. "minute",
  19638. "second"
  19639. ].forEach((type) => {
  19640. if (availableTimeGetters[type]) {
  19641. let availableTimeSlots;
  19642. const method = availableTimeGetters[type];
  19643. switch (type) {
  19644. case "minute":
  19645. availableTimeSlots = method(result.hour(), role, compareDate);
  19646. break;
  19647. case "second":
  19648. availableTimeSlots = method(result.hour(), result.minute(), role, compareDate);
  19649. break;
  19650. default:
  19651. availableTimeSlots = method(role, compareDate);
  19652. break;
  19653. }
  19654. if (availableTimeSlots?.length && !availableTimeSlots.includes(result[type]())) {
  19655. const pos = first ? 0 : availableTimeSlots.length - 1;
  19656. result = result[type](availableTimeSlots[pos]);
  19657. }
  19658. }
  19659. });
  19660. return result;
  19661. };
  19662. const timePickerOptions = {};
  19663. const onSetOption = ([key, val]) => {
  19664. timePickerOptions[key] = val;
  19665. };
  19666. return {
  19667. timePickerOptions,
  19668. getAvailableTime,
  19669. onSetOption
  19670. };
  19671. };
  19672. //#endregion
  19673. //#region node_modules/element-plus/es/components/time-picker/src/composables/use-time-picker.mjs
  19674. var makeAvailableArr = (disabledList) => {
  19675. const trueOrNumber = (isDisabled, index) => isDisabled || index;
  19676. const getNumber = (predicate) => predicate !== true;
  19677. return disabledList.map(trueOrNumber).filter(getNumber);
  19678. };
  19679. var getTimeLists = (disabledHours, disabledMinutes, disabledSeconds) => {
  19680. const getHoursList = (role, compare) => {
  19681. return makeList(24, disabledHours && (() => disabledHours?.(role, compare)));
  19682. };
  19683. const getMinutesList = (hour, role, compare) => {
  19684. return makeList(60, disabledMinutes && (() => disabledMinutes?.(hour, role, compare)));
  19685. };
  19686. const getSecondsList = (hour, minute, role, compare) => {
  19687. return makeList(60, disabledSeconds && (() => disabledSeconds?.(hour, minute, role, compare)));
  19688. };
  19689. return {
  19690. getHoursList,
  19691. getMinutesList,
  19692. getSecondsList
  19693. };
  19694. };
  19695. var buildAvailableTimeSlotGetter = (disabledHours, disabledMinutes, disabledSeconds) => {
  19696. const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(disabledHours, disabledMinutes, disabledSeconds);
  19697. const getAvailableHours = (role, compare) => {
  19698. return makeAvailableArr(getHoursList(role, compare));
  19699. };
  19700. const getAvailableMinutes = (hour, role, compare) => {
  19701. return makeAvailableArr(getMinutesList(hour, role, compare));
  19702. };
  19703. const getAvailableSeconds = (hour, minute, role, compare) => {
  19704. return makeAvailableArr(getSecondsList(hour, minute, role, compare));
  19705. };
  19706. return {
  19707. getAvailableHours,
  19708. getAvailableMinutes,
  19709. getAvailableSeconds
  19710. };
  19711. };
  19712. var useOldValue = (props, options) => {
  19713. const oldValue = ref(props.parsedValue);
  19714. watch(() => props.visible, (val) => {
  19715. const modelValue = toValue(options.modelValue);
  19716. const valueOnClear = toValue(options.valueOnClear);
  19717. if (val && modelValue === valueOnClear) {
  19718. oldValue.value = valueOnClear;
  19719. return;
  19720. }
  19721. if (!val) oldValue.value = props.parsedValue;
  19722. });
  19723. return oldValue;
  19724. };
  19725. //#endregion
  19726. //#region node_modules/element-plus/es/components/time-picker/src/props/basic-time-spinner.mjs
  19727. var basicTimeSpinnerProps = buildProps({
  19728. role: {
  19729. type: String,
  19730. required: true
  19731. },
  19732. spinnerDate: {
  19733. type: definePropType(Object),
  19734. required: true
  19735. },
  19736. showSeconds: {
  19737. type: Boolean,
  19738. default: true
  19739. },
  19740. arrowControl: Boolean,
  19741. amPmMode: {
  19742. type: definePropType(String),
  19743. default: ""
  19744. },
  19745. ...disabledTimeListsProps
  19746. });
  19747. //#endregion
  19748. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs
  19749. var _hoisted_1$71 = ["onClick"];
  19750. var _hoisted_2$40 = ["onMouseenter"];
  19751. //#endregion
  19752. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs
  19753. var basic_time_spinner_default = /* @__PURE__ */ defineComponent({
  19754. __name: "basic-time-spinner",
  19755. props: basicTimeSpinnerProps,
  19756. emits: [
  19757. CHANGE_EVENT,
  19758. "select-range",
  19759. "set-option"
  19760. ],
  19761. setup(__props, { emit: __emit }) {
  19762. const props = __props;
  19763. const { isRange, format, saveOnBlur } = inject(PICKER_BASE_INJECTION_KEY).props;
  19764. const emit = __emit;
  19765. const ns = useNamespace("time");
  19766. const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(props.disabledHours, props.disabledMinutes, props.disabledSeconds);
  19767. let isScrolling = false;
  19768. const ignoreScroll = {
  19769. hours: false,
  19770. minutes: false,
  19771. seconds: false
  19772. };
  19773. const currentScrollbar = ref();
  19774. const listRefsMap = {
  19775. hours: ref(),
  19776. minutes: ref(),
  19777. seconds: ref()
  19778. };
  19779. const spinnerItems = computed(() => {
  19780. return props.showSeconds ? timeUnits : timeUnits.slice(0, 2);
  19781. });
  19782. const timePartials = computed(() => {
  19783. const { spinnerDate } = props;
  19784. return {
  19785. hours: spinnerDate.hour(),
  19786. minutes: spinnerDate.minute(),
  19787. seconds: spinnerDate.second()
  19788. };
  19789. });
  19790. const timeList = computed(() => {
  19791. const { hours, minutes } = unref(timePartials);
  19792. const { role, spinnerDate } = props;
  19793. const compare = !isRange ? spinnerDate : void 0;
  19794. return {
  19795. hours: getHoursList(role, compare),
  19796. minutes: getMinutesList(hours, role, compare),
  19797. seconds: getSecondsList(hours, minutes, role, compare)
  19798. };
  19799. });
  19800. const arrowControlTimeList = computed(() => {
  19801. const { hours, minutes, seconds } = unref(timePartials);
  19802. return {
  19803. hours: buildTimeList(hours, 23),
  19804. minutes: buildTimeList(minutes, 59),
  19805. seconds: buildTimeList(seconds, 59)
  19806. };
  19807. });
  19808. const debouncedResetScroll = debounce((type) => {
  19809. isScrolling = false;
  19810. adjustCurrentSpinner(type);
  19811. }, 200);
  19812. const getAmPmFlag = (hour) => {
  19813. if (!!!props.amPmMode) return "";
  19814. const isCapital = props.amPmMode === "A";
  19815. let content = hour < 12 ? " am" : " pm";
  19816. if (isCapital) content = content.toUpperCase();
  19817. return content;
  19818. };
  19819. const emitSelectRange = (type) => {
  19820. let range = [0, 0];
  19821. const actualFormat = format || "HH:mm:ss";
  19822. const hourIndex = actualFormat.indexOf("HH");
  19823. const minuteIndex = actualFormat.indexOf("mm");
  19824. const secondIndex = actualFormat.indexOf("ss");
  19825. switch (type) {
  19826. case "hours":
  19827. if (hourIndex !== -1) range = [hourIndex, hourIndex + 2];
  19828. break;
  19829. case "minutes":
  19830. if (minuteIndex !== -1) range = [minuteIndex, minuteIndex + 2];
  19831. break;
  19832. case "seconds":
  19833. if (secondIndex !== -1) range = [secondIndex, secondIndex + 2];
  19834. break;
  19835. }
  19836. const [left, right] = range;
  19837. emit("select-range", left, right);
  19838. currentScrollbar.value = type;
  19839. };
  19840. const adjustCurrentSpinner = (type) => {
  19841. adjustSpinner(type, unref(timePartials)[type]);
  19842. };
  19843. const adjustSpinners = () => {
  19844. adjustCurrentSpinner("hours");
  19845. adjustCurrentSpinner("minutes");
  19846. adjustCurrentSpinner("seconds");
  19847. };
  19848. const getScrollbarElement = (el) => el.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
  19849. const adjustSpinner = (type, value) => {
  19850. if (props.arrowControl) return;
  19851. const scrollbar = unref(listRefsMap[type]);
  19852. if (scrollbar && scrollbar.$el) {
  19853. if (!saveOnBlur) {
  19854. ignoreScroll[type] = true;
  19855. rAF(() => {
  19856. ignoreScroll[type] = false;
  19857. });
  19858. }
  19859. getScrollbarElement(scrollbar.$el).scrollTop = Math.max(0, value * typeItemHeight(type));
  19860. }
  19861. };
  19862. const typeItemHeight = (type) => {
  19863. const listItem = unref(listRefsMap[type])?.$el.querySelector("li");
  19864. if (listItem) return Number.parseFloat(getStyle(listItem, "height")) || 0;
  19865. return 0;
  19866. };
  19867. const onIncrement = () => {
  19868. scrollDown(1);
  19869. };
  19870. const onDecrement = () => {
  19871. scrollDown(-1);
  19872. };
  19873. const scrollDown = (step) => {
  19874. if (!currentScrollbar.value) emitSelectRange("hours");
  19875. const label = currentScrollbar.value;
  19876. const now = unref(timePartials)[label];
  19877. const next = findNextUnDisabled(label, now, step, currentScrollbar.value === "hours" ? 24 : 60);
  19878. modifyDateField(label, next);
  19879. adjustSpinner(label, next);
  19880. nextTick(() => emitSelectRange(label));
  19881. };
  19882. const findNextUnDisabled = (type, now, step, total) => {
  19883. let next = (now + step + total) % total;
  19884. const list = unref(timeList)[type];
  19885. while (list[next] && next !== now) next = (next + step + total) % total;
  19886. return next;
  19887. };
  19888. const modifyDateField = (type, value) => {
  19889. if (unref(timeList)[type][value]) return;
  19890. const { hours, minutes, seconds } = unref(timePartials);
  19891. let changeTo;
  19892. switch (type) {
  19893. case "hours":
  19894. changeTo = props.spinnerDate.hour(value).minute(minutes).second(seconds);
  19895. break;
  19896. case "minutes":
  19897. changeTo = props.spinnerDate.hour(hours).minute(value).second(seconds);
  19898. break;
  19899. case "seconds":
  19900. changeTo = props.spinnerDate.hour(hours).minute(minutes).second(value);
  19901. break;
  19902. }
  19903. emit(CHANGE_EVENT, changeTo);
  19904. };
  19905. const handleClick = (type, { value, disabled }) => {
  19906. if (!disabled) {
  19907. modifyDateField(type, value);
  19908. emitSelectRange(type);
  19909. adjustSpinner(type, value);
  19910. }
  19911. };
  19912. const handleScroll = (type) => {
  19913. if (!saveOnBlur && ignoreScroll[type]) return;
  19914. const scrollbar = unref(listRefsMap[type]);
  19915. if (!scrollbar) return;
  19916. isScrolling = true;
  19917. debouncedResetScroll(type);
  19918. modifyDateField(type, Math.min(Math.round((getScrollbarElement(scrollbar.$el).scrollTop - (scrollBarHeight(type) * .5 - 10) / typeItemHeight(type) + 3) / typeItemHeight(type)), type === "hours" ? 23 : 59));
  19919. };
  19920. const scrollBarHeight = (type) => {
  19921. return unref(listRefsMap[type]).$el.offsetHeight;
  19922. };
  19923. const bindScrollEvent = () => {
  19924. const bindFunction = (type) => {
  19925. const scrollbar = unref(listRefsMap[type]);
  19926. if (scrollbar && scrollbar.$el) getScrollbarElement(scrollbar.$el).onscroll = () => {
  19927. handleScroll(type);
  19928. };
  19929. };
  19930. bindFunction("hours");
  19931. bindFunction("minutes");
  19932. bindFunction("seconds");
  19933. };
  19934. onMounted(() => {
  19935. nextTick(() => {
  19936. !props.arrowControl && bindScrollEvent();
  19937. adjustSpinners();
  19938. if (props.role === "start") emitSelectRange("hours");
  19939. });
  19940. });
  19941. const setRef = (scrollbar, type) => {
  19942. listRefsMap[type].value = scrollbar ?? void 0;
  19943. };
  19944. emit("set-option", [`${props.role}_scrollDown`, scrollDown]);
  19945. emit("set-option", [`${props.role}_emitSelectRange`, emitSelectRange]);
  19946. watch(() => props.spinnerDate, () => {
  19947. if (isScrolling) return;
  19948. adjustSpinners();
  19949. });
  19950. return (_ctx, _cache) => {
  19951. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("spinner"), { "has-seconds": _ctx.showSeconds }]) }, [!_ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(spinnerItems.value, (item) => {
  19952. return openBlock(), createBlock(unref(ElScrollbar), {
  19953. key: item,
  19954. ref_for: true,
  19955. ref: (scrollbar) => setRef(scrollbar, item),
  19956. class: normalizeClass(unref(ns).be("spinner", "wrapper")),
  19957. "wrap-style": "max-height: inherit;",
  19958. "view-class": unref(ns).be("spinner", "list"),
  19959. noresize: "",
  19960. tag: "ul",
  19961. onMouseenter: ($event) => emitSelectRange(item),
  19962. onMousemove: ($event) => adjustCurrentSpinner(item)
  19963. }, {
  19964. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(timeList.value[item], (disabled, key) => {
  19965. return openBlock(), createElementBlock("li", {
  19966. key,
  19967. class: normalizeClass([
  19968. unref(ns).be("spinner", "item"),
  19969. unref(ns).is("active", key === timePartials.value[item]),
  19970. unref(ns).is("disabled", disabled)
  19971. ]),
  19972. onClick: ($event) => handleClick(item, {
  19973. value: key,
  19974. disabled
  19975. })
  19976. }, [item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? key % 12 || 12 : key)).slice(-2)) + toDisplayString(getAmPmFlag(key)), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(("0" + key).slice(-2)), 1)], 64))], 10, _hoisted_1$71);
  19977. }), 128))]),
  19978. _: 2
  19979. }, 1032, [
  19980. "class",
  19981. "view-class",
  19982. "onMouseenter",
  19983. "onMousemove"
  19984. ]);
  19985. }), 128)) : createCommentVNode("v-if", true), _ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(spinnerItems.value, (item) => {
  19986. return openBlock(), createElementBlock("div", {
  19987. key: item,
  19988. class: normalizeClass([unref(ns).be("spinner", "wrapper"), unref(ns).is("arrow")]),
  19989. onMouseenter: ($event) => emitSelectRange(item)
  19990. }, [
  19991. withDirectives((openBlock(), createBlock(unref(ElIcon), { class: normalizeClass(["arrow-up", unref(ns).be("spinner", "arrow")]) }, {
  19992. default: withCtx(() => [createVNode(unref(arrow_up_default))]),
  19993. _: 1
  19994. }, 8, ["class"])), [[unref(vRepeatClick), onDecrement]]),
  19995. withDirectives((openBlock(), createBlock(unref(ElIcon), { class: normalizeClass(["arrow-down", unref(ns).be("spinner", "arrow")]) }, {
  19996. default: withCtx(() => [createVNode(unref(arrow_down_default))]),
  19997. _: 1
  19998. }, 8, ["class"])), [[unref(vRepeatClick), onIncrement]]),
  19999. createBaseVNode("ul", { class: normalizeClass(unref(ns).be("spinner", "list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(arrowControlTimeList.value[item], (time, key) => {
  20000. return openBlock(), createElementBlock("li", {
  20001. key,
  20002. class: normalizeClass([
  20003. unref(ns).be("spinner", "item"),
  20004. unref(ns).is("active", time === timePartials.value[item]),
  20005. unref(ns).is("disabled", timeList.value[item][time])
  20006. ])
  20007. }, [unref(isNumber)(time) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? time % 12 || 12 : time)).slice(-2)) + toDisplayString(getAmPmFlag(time)), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(("0" + time).slice(-2)), 1)], 64))], 64)) : createCommentVNode("v-if", true)], 2);
  20008. }), 128))], 2)
  20009. ], 42, _hoisted_2$40);
  20010. }), 128)) : createCommentVNode("v-if", true)], 2);
  20011. };
  20012. }
  20013. });
  20014. //#endregion
  20015. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs
  20016. var panel_time_pick_default = /* @__PURE__ */ defineComponent({
  20017. __name: "panel-time-pick",
  20018. props: panelTimePickerProps,
  20019. emits: [
  20020. "pick",
  20021. "select-range",
  20022. "set-picker-option"
  20023. ],
  20024. setup(__props, { emit: __emit }) {
  20025. const props = __props;
  20026. const emit = __emit;
  20027. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  20028. const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;
  20029. const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours, disabledMinutes, disabledSeconds);
  20030. const ns = useNamespace("time");
  20031. const { t, lang } = useLocale();
  20032. const selectionRange = ref([0, 2]);
  20033. const oldValue = useOldValue(props, {
  20034. modelValue: computed(() => pickerBase.props.modelValue),
  20035. valueOnClear: computed(() => pickerBase?.emptyValues ? pickerBase.emptyValues.valueOnClear.value : null)
  20036. });
  20037. const transitionName = computed(() => {
  20038. return isUndefined(props.actualVisible) ? `${ns.namespace.value}-zoom-in-top` : "";
  20039. });
  20040. const showSeconds = computed(() => {
  20041. return props.format.includes("ss");
  20042. });
  20043. const amPmMode = computed(() => {
  20044. if (props.format.includes("A")) return "A";
  20045. if (props.format.includes("a")) return "a";
  20046. return "";
  20047. });
  20048. const isValidValue = (_date) => {
  20049. const parsedDate = (0, import_dayjs_min.default)(_date).locale(lang.value);
  20050. const result = getRangeAvailableTime(parsedDate);
  20051. return parsedDate.isSame(result);
  20052. };
  20053. const handleCancel = () => {
  20054. const old = oldValue.value;
  20055. emit("pick", old, false);
  20056. nextTick(() => {
  20057. oldValue.value = old;
  20058. });
  20059. };
  20060. const handleConfirm = (visible = false, first = false) => {
  20061. if (first) return;
  20062. emit("pick", props.parsedValue, visible);
  20063. };
  20064. const handleChange = (_date) => {
  20065. if (!props.visible) return;
  20066. emit("pick", getRangeAvailableTime(_date).millisecond(0), true);
  20067. };
  20068. const setSelectionRange = (start, end) => {
  20069. emit("select-range", start, end);
  20070. selectionRange.value = [start, end];
  20071. };
  20072. const changeSelectionRange = (step) => {
  20073. const actualFormat = props.format;
  20074. const hourIndex = actualFormat.indexOf("HH");
  20075. const minuteIndex = actualFormat.indexOf("mm");
  20076. const secondIndex = actualFormat.indexOf("ss");
  20077. const list = [];
  20078. const mapping = [];
  20079. if (hourIndex !== -1) {
  20080. list.push(hourIndex);
  20081. mapping.push("hours");
  20082. }
  20083. if (minuteIndex !== -1) {
  20084. list.push(minuteIndex);
  20085. mapping.push("minutes");
  20086. }
  20087. if (secondIndex !== -1 && showSeconds.value) {
  20088. list.push(secondIndex);
  20089. mapping.push("seconds");
  20090. }
  20091. const next = (list.indexOf(selectionRange.value[0]) + step + list.length) % list.length;
  20092. timePickerOptions["start_emitSelectRange"](mapping[next]);
  20093. };
  20094. const handleKeydown = (event) => {
  20095. const code = getEventCode(event);
  20096. const { left, right, up, down } = EVENT_CODE;
  20097. if ([left, right].includes(code)) {
  20098. changeSelectionRange(code === left ? -1 : 1);
  20099. event.preventDefault();
  20100. return;
  20101. }
  20102. if ([up, down].includes(code)) {
  20103. const step = code === up ? -1 : 1;
  20104. timePickerOptions["start_scrollDown"](step);
  20105. event.preventDefault();
  20106. return;
  20107. }
  20108. };
  20109. const { timePickerOptions, onSetOption, getAvailableTime } = useTimePanel({
  20110. getAvailableHours,
  20111. getAvailableMinutes,
  20112. getAvailableSeconds
  20113. });
  20114. const getRangeAvailableTime = (date) => {
  20115. return getAvailableTime(date, props.datetimeRole || "", true);
  20116. };
  20117. const parseUserInput = (value) => {
  20118. if (!value) return null;
  20119. return (0, import_dayjs_min.default)(value, props.format).locale(lang.value);
  20120. };
  20121. const getDefaultValue = () => {
  20122. return (0, import_dayjs_min.default)(defaultValue).locale(lang.value);
  20123. };
  20124. emit("set-picker-option", ["isValidValue", isValidValue]);
  20125. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  20126. emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
  20127. emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
  20128. emit("set-picker-option", ["getDefaultValue", getDefaultValue]);
  20129. emit("set-picker-option", ["handleCancel", handleCancel]);
  20130. return (_ctx, _cache) => {
  20131. return openBlock(), createBlock(Transition, { name: transitionName.value }, {
  20132. default: withCtx(() => [_ctx.actualVisible || _ctx.visible ? (openBlock(), createElementBlock("div", {
  20133. key: 0,
  20134. class: normalizeClass(unref(ns).b("panel"))
  20135. }, [createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "content"), { "has-seconds": showSeconds.value }]) }, [createVNode(basic_time_spinner_default, {
  20136. ref: "spinner",
  20137. role: _ctx.datetimeRole || "start",
  20138. "arrow-control": unref(arrowControl),
  20139. "show-seconds": showSeconds.value,
  20140. "am-pm-mode": amPmMode.value,
  20141. "spinner-date": _ctx.parsedValue,
  20142. "disabled-hours": unref(disabledHours),
  20143. "disabled-minutes": unref(disabledMinutes),
  20144. "disabled-seconds": unref(disabledSeconds),
  20145. onChange: handleChange,
  20146. onSetOption: unref(onSetOption),
  20147. onSelectRange: setSelectionRange
  20148. }, null, 8, [
  20149. "role",
  20150. "arrow-control",
  20151. "show-seconds",
  20152. "am-pm-mode",
  20153. "spinner-date",
  20154. "disabled-hours",
  20155. "disabled-minutes",
  20156. "disabled-seconds",
  20157. "onSetOption"
  20158. ])], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).be("panel", "footer")) }, [createBaseVNode("button", {
  20159. type: "button",
  20160. class: normalizeClass([unref(ns).be("panel", "btn"), "cancel"]),
  20161. onClick: handleCancel
  20162. }, toDisplayString(unref(t)("el.datepicker.cancel")), 3), createBaseVNode("button", {
  20163. type: "button",
  20164. class: normalizeClass([unref(ns).be("panel", "btn"), "confirm"]),
  20165. onClick: _cache[0] || (_cache[0] = ($event) => handleConfirm())
  20166. }, toDisplayString(unref(t)("el.datepicker.confirm")), 3)], 2)], 2)) : createCommentVNode("v-if", true)]),
  20167. _: 1
  20168. }, 8, ["name"]);
  20169. };
  20170. }
  20171. });
  20172. //#endregion
  20173. //#region node_modules/element-plus/es/components/time-picker/src/props/panel-time-range.mjs
  20174. var panelTimeRangeProps = buildProps({
  20175. ...timePanelSharedProps,
  20176. parsedValue: { type: definePropType(Array) }
  20177. });
  20178. //#endregion
  20179. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.vue_vue_type_script_setup_true_lang.mjs
  20180. var _hoisted_1$70 = ["disabled"];
  20181. //#endregion
  20182. //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs
  20183. var panel_time_range_default = /* @__PURE__ */ defineComponent({
  20184. __name: "panel-time-range",
  20185. props: panelTimeRangeProps,
  20186. emits: [
  20187. "pick",
  20188. "select-range",
  20189. "set-picker-option"
  20190. ],
  20191. setup(__props, { emit: __emit }) {
  20192. const props = __props;
  20193. const emit = __emit;
  20194. const makeSelectRange = (start, end) => {
  20195. const result = [];
  20196. for (let i = start; i <= end; i++) result.push(i);
  20197. return result;
  20198. };
  20199. const { t, lang } = useLocale();
  20200. const nsTime = useNamespace("time");
  20201. const nsPicker = useNamespace("picker");
  20202. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  20203. const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;
  20204. const startContainerKls = computed(() => [
  20205. nsTime.be("range-picker", "body"),
  20206. nsTime.be("panel", "content"),
  20207. nsTime.is("arrow", arrowControl),
  20208. showSeconds.value ? "has-seconds" : ""
  20209. ]);
  20210. const endContainerKls = computed(() => [
  20211. nsTime.be("range-picker", "body"),
  20212. nsTime.be("panel", "content"),
  20213. nsTime.is("arrow", arrowControl),
  20214. showSeconds.value ? "has-seconds" : ""
  20215. ]);
  20216. const startTime = computed(() => props.parsedValue[0]);
  20217. const endTime = computed(() => props.parsedValue[1]);
  20218. const oldValue = useOldValue(props, {
  20219. modelValue: computed(() => pickerBase.props.modelValue),
  20220. valueOnClear: computed(() => pickerBase?.emptyValues ? pickerBase.emptyValues.valueOnClear.value : null)
  20221. });
  20222. const handleCancel = () => {
  20223. const old = oldValue.value;
  20224. emit("pick", old, false);
  20225. nextTick(() => {
  20226. oldValue.value = old;
  20227. });
  20228. };
  20229. const showSeconds = computed(() => {
  20230. return props.format.includes("ss");
  20231. });
  20232. const amPmMode = computed(() => {
  20233. if (props.format.includes("A")) return "A";
  20234. if (props.format.includes("a")) return "a";
  20235. return "";
  20236. });
  20237. const handleConfirm = (visible = false) => {
  20238. emit("pick", [startTime.value, endTime.value], visible);
  20239. };
  20240. const handleMinChange = (date) => {
  20241. handleChange(date.millisecond(0), endTime.value);
  20242. };
  20243. const handleMaxChange = (date) => {
  20244. handleChange(startTime.value, date.millisecond(0));
  20245. };
  20246. const isValidValue = (_date) => {
  20247. const parsedDate = _date.map((_) => (0, import_dayjs_min.default)(_).locale(lang.value));
  20248. const result = getRangeAvailableTime(parsedDate);
  20249. return parsedDate[0].isSame(result[0]) && parsedDate[1].isSame(result[1]);
  20250. };
  20251. const handleChange = (start, end) => {
  20252. if (!props.visible) return;
  20253. emit("pick", [start, end], true);
  20254. };
  20255. const btnConfirmDisabled = computed(() => {
  20256. return startTime.value > endTime.value;
  20257. });
  20258. const selectionRange = ref([0, 2]);
  20259. const setMinSelectionRange = (start, end) => {
  20260. emit("select-range", start, end, "min");
  20261. selectionRange.value = [start, end];
  20262. };
  20263. const offset = computed(() => showSeconds.value ? 11 : 8);
  20264. const setMaxSelectionRange = (start, end) => {
  20265. emit("select-range", start, end, "max");
  20266. const _offset = unref(offset);
  20267. selectionRange.value = [start + _offset, end + _offset];
  20268. };
  20269. const changeSelectionRange = (step) => {
  20270. const list = showSeconds.value ? [
  20271. 0,
  20272. 3,
  20273. 6,
  20274. 11,
  20275. 14,
  20276. 17
  20277. ] : [
  20278. 0,
  20279. 3,
  20280. 8,
  20281. 11
  20282. ];
  20283. const mapping = ["hours", "minutes"].concat(showSeconds.value ? ["seconds"] : []);
  20284. const next = (list.indexOf(selectionRange.value[0]) + step + list.length) % list.length;
  20285. const half = list.length / 2;
  20286. if (next < half) timePickerOptions["start_emitSelectRange"](mapping[next]);
  20287. else timePickerOptions["end_emitSelectRange"](mapping[next - half]);
  20288. };
  20289. const handleKeydown = (event) => {
  20290. const code = getEventCode(event);
  20291. const { left, right, up, down } = EVENT_CODE;
  20292. if ([left, right].includes(code)) {
  20293. changeSelectionRange(code === left ? -1 : 1);
  20294. event.preventDefault();
  20295. return;
  20296. }
  20297. if ([up, down].includes(code)) {
  20298. const step = code === up ? -1 : 1;
  20299. timePickerOptions[`${selectionRange.value[0] < offset.value ? "start" : "end"}_scrollDown`](step);
  20300. event.preventDefault();
  20301. return;
  20302. }
  20303. };
  20304. const disabledHours_ = (role, compare) => {
  20305. const defaultDisable = disabledHours ? disabledHours(role) : [];
  20306. const isStart = role === "start";
  20307. const compareHour = (compare || (isStart ? endTime.value : startTime.value)).hour();
  20308. return union(defaultDisable, isStart ? makeSelectRange(compareHour + 1, 23) : makeSelectRange(0, compareHour - 1));
  20309. };
  20310. const disabledMinutes_ = (hour, role, compare) => {
  20311. const defaultDisable = disabledMinutes ? disabledMinutes(hour, role) : [];
  20312. const isStart = role === "start";
  20313. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  20314. if (hour !== compareDate.hour()) return defaultDisable;
  20315. const compareMinute = compareDate.minute();
  20316. return union(defaultDisable, isStart ? makeSelectRange(compareMinute + 1, 59) : makeSelectRange(0, compareMinute - 1));
  20317. };
  20318. const disabledSeconds_ = (hour, minute, role, compare) => {
  20319. const defaultDisable = disabledSeconds ? disabledSeconds(hour, minute, role) : [];
  20320. const isStart = role === "start";
  20321. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  20322. const compareHour = compareDate.hour();
  20323. const compareMinute = compareDate.minute();
  20324. if (hour !== compareHour || minute !== compareMinute) return defaultDisable;
  20325. const compareSecond = compareDate.second();
  20326. return union(defaultDisable, isStart ? makeSelectRange(compareSecond + 1, 59) : makeSelectRange(0, compareSecond - 1));
  20327. };
  20328. const getRangeAvailableTime = ([start, end]) => {
  20329. return [getAvailableTime(start, "start", true, end), getAvailableTime(end, "end", false, start)];
  20330. };
  20331. const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours_, disabledMinutes_, disabledSeconds_);
  20332. const { timePickerOptions, getAvailableTime, onSetOption } = useTimePanel({
  20333. getAvailableHours,
  20334. getAvailableMinutes,
  20335. getAvailableSeconds
  20336. });
  20337. const parseUserInput = (days) => {
  20338. if (!days) return null;
  20339. if (isArray$1(days)) return days.map((d) => (0, import_dayjs_min.default)(d, props.format).locale(lang.value));
  20340. return (0, import_dayjs_min.default)(days, props.format).locale(lang.value);
  20341. };
  20342. const getDefaultValue = () => {
  20343. if (isArray$1(defaultValue)) return defaultValue.map((d) => (0, import_dayjs_min.default)(d).locale(lang.value));
  20344. const defaultDay = (0, import_dayjs_min.default)(defaultValue).locale(lang.value);
  20345. return [defaultDay, defaultDay.add(60, "m")];
  20346. };
  20347. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  20348. emit("set-picker-option", ["isValidValue", isValidValue]);
  20349. emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
  20350. emit("set-picker-option", ["getDefaultValue", getDefaultValue]);
  20351. emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
  20352. emit("set-picker-option", ["handleCancel", handleCancel]);
  20353. return (_ctx, _cache) => {
  20354. return _ctx.actualVisible ? (openBlock(), createElementBlock("div", {
  20355. key: 0,
  20356. class: normalizeClass([unref(nsTime).b("range-picker"), unref(nsPicker).b("panel")])
  20357. }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "content")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "cell")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.startTime")), 3), createBaseVNode("div", { class: normalizeClass(startContainerKls.value) }, [createVNode(basic_time_spinner_default, {
  20358. ref: "minSpinner",
  20359. role: "start",
  20360. "show-seconds": showSeconds.value,
  20361. "am-pm-mode": amPmMode.value,
  20362. "arrow-control": unref(arrowControl),
  20363. "spinner-date": startTime.value,
  20364. "disabled-hours": disabledHours_,
  20365. "disabled-minutes": disabledMinutes_,
  20366. "disabled-seconds": disabledSeconds_,
  20367. onChange: handleMinChange,
  20368. onSetOption: unref(onSetOption),
  20369. onSelectRange: setMinSelectionRange
  20370. }, null, 8, [
  20371. "show-seconds",
  20372. "am-pm-mode",
  20373. "arrow-control",
  20374. "spinner-date",
  20375. "onSetOption"
  20376. ])], 2)], 2), createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "cell")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.endTime")), 3), createBaseVNode("div", { class: normalizeClass(endContainerKls.value) }, [createVNode(basic_time_spinner_default, {
  20377. ref: "maxSpinner",
  20378. role: "end",
  20379. "show-seconds": showSeconds.value,
  20380. "am-pm-mode": amPmMode.value,
  20381. "arrow-control": unref(arrowControl),
  20382. "spinner-date": endTime.value,
  20383. "disabled-hours": disabledHours_,
  20384. "disabled-minutes": disabledMinutes_,
  20385. "disabled-seconds": disabledSeconds_,
  20386. onChange: handleMaxChange,
  20387. onSetOption: unref(onSetOption),
  20388. onSelectRange: setMaxSelectionRange
  20389. }, null, 8, [
  20390. "show-seconds",
  20391. "am-pm-mode",
  20392. "arrow-control",
  20393. "spinner-date",
  20394. "onSetOption"
  20395. ])], 2)], 2)], 2), createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("panel", "footer")) }, [createBaseVNode("button", {
  20396. type: "button",
  20397. class: normalizeClass([unref(nsTime).be("panel", "btn"), "cancel"]),
  20398. onClick: _cache[0] || (_cache[0] = ($event) => handleCancel())
  20399. }, toDisplayString(unref(t)("el.datepicker.cancel")), 3), createBaseVNode("button", {
  20400. type: "button",
  20401. class: normalizeClass([unref(nsTime).be("panel", "btn"), "confirm"]),
  20402. disabled: btnConfirmDisabled.value,
  20403. onClick: _cache[1] || (_cache[1] = ($event) => handleConfirm())
  20404. }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_1$70)], 2)], 2)) : createCommentVNode("v-if", true);
  20405. };
  20406. }
  20407. });
  20408. //#endregion
  20409. //#region node_modules/element-plus/es/components/time-picker/src/time-picker.mjs
  20410. var import_customParseFormat = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
  20411. (function(e, t) {
  20412. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
  20413. })(exports, (function() {
  20414. "use strict";
  20415. var e = {
  20416. LTS: "h:mm:ss A",
  20417. LT: "h:mm A",
  20418. L: "MM/DD/YYYY",
  20419. LL: "MMMM D, YYYY",
  20420. LLL: "MMMM D, YYYY h:mm A",
  20421. LLLL: "dddd, MMMM D, YYYY h:mm A"
  20422. }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e) {
  20423. return (e = +e) + (e > 68 ? 1900 : 2e3);
  20424. };
  20425. var f = function(e) {
  20426. return function(t) {
  20427. this[e] = +t;
  20428. };
  20429. }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e) {
  20430. (this.zone || (this.zone = {})).offset = function(e) {
  20431. if (!e) return 0;
  20432. if ("Z" === e) return 0;
  20433. var t = e.match(/([+-]|\d\d)/g), n = 60 * t[1] + (+t[2] || 0);
  20434. return 0 === n ? 0 : "+" === t[0] ? -n : n;
  20435. }(e);
  20436. }], u = function(e) {
  20437. var t = s[e];
  20438. return t && (t.indexOf ? t : t.s.concat(t.f));
  20439. }, d = function(e, t) {
  20440. var n, r = s.meridiem;
  20441. if (r) {
  20442. for (var i = 1; i <= 24; i += 1) if (e.indexOf(r(i, 0, t)) > -1) {
  20443. n = i > 12;
  20444. break;
  20445. }
  20446. } else n = e === (t ? "pm" : "PM");
  20447. return n;
  20448. }, c = {
  20449. A: [o, function(e) {
  20450. this.afternoon = d(e, !1);
  20451. }],
  20452. a: [o, function(e) {
  20453. this.afternoon = d(e, !0);
  20454. }],
  20455. Q: [n, function(e) {
  20456. this.month = 3 * (e - 1) + 1;
  20457. }],
  20458. S: [n, function(e) {
  20459. this.milliseconds = 100 * +e;
  20460. }],
  20461. SS: [r, function(e) {
  20462. this.milliseconds = 10 * +e;
  20463. }],
  20464. SSS: [/\d{3}/, function(e) {
  20465. this.milliseconds = +e;
  20466. }],
  20467. s: [i, f("seconds")],
  20468. ss: [i, f("seconds")],
  20469. m: [i, f("minutes")],
  20470. mm: [i, f("minutes")],
  20471. H: [i, f("hours")],
  20472. h: [i, f("hours")],
  20473. HH: [i, f("hours")],
  20474. hh: [i, f("hours")],
  20475. D: [i, f("day")],
  20476. DD: [r, f("day")],
  20477. Do: [o, function(e) {
  20478. var t = s.ordinal, n = e.match(/\d+/);
  20479. if (this.day = n[0], t) for (var r = 1; r <= 31; r += 1) t(r).replace(/\[|\]/g, "") === e && (this.day = r);
  20480. }],
  20481. w: [i, f("week")],
  20482. ww: [r, f("week")],
  20483. M: [i, f("month")],
  20484. MM: [r, f("month")],
  20485. MMM: [o, function(e) {
  20486. var t = u("months"), n = (u("monthsShort") || t.map((function(e) {
  20487. return e.slice(0, 3);
  20488. }))).indexOf(e) + 1;
  20489. if (n < 1) throw new Error();
  20490. this.month = n % 12 || n;
  20491. }],
  20492. MMMM: [o, function(e) {
  20493. var t = u("months").indexOf(e) + 1;
  20494. if (t < 1) throw new Error();
  20495. this.month = t % 12 || t;
  20496. }],
  20497. Y: [/[+-]?\d+/, f("year")],
  20498. YY: [r, function(e) {
  20499. this.year = a(e);
  20500. }],
  20501. YYYY: [/\d{4}/, f("year")],
  20502. Z: h,
  20503. ZZ: h
  20504. };
  20505. function l(n) {
  20506. var r = n, i = s && s.formats;
  20507. for (var o = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t, n, r) {
  20508. var o = r && r.toUpperCase();
  20509. return n || i[r] || e[r] || i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e, t, n) {
  20510. return t || n.slice(1);
  20511. }));
  20512. }))).match(t), a = o.length, f = 0; f < a; f += 1) {
  20513. var h = o[f], u = c[h], d = u && u[0], l = u && u[1];
  20514. o[f] = l ? {
  20515. regex: d,
  20516. parser: l
  20517. } : h.replace(/^\[|\]$/g, "");
  20518. }
  20519. return function(e) {
  20520. for (var t = {}, n = 0, r = 0; n < a; n += 1) {
  20521. var i = o[n];
  20522. if ("string" == typeof i) r += i.length;
  20523. else {
  20524. var s = i.regex, f = i.parser, h = e.slice(r), u = s.exec(h)[0];
  20525. f.call(t, u), e = e.replace(u, "");
  20526. }
  20527. }
  20528. return function(e) {
  20529. var t = e.afternoon;
  20530. if (void 0 !== t) {
  20531. var n = e.hours;
  20532. t ? n < 12 && (e.hours += 12) : 12 === n && (e.hours = 0), delete e.afternoon;
  20533. }
  20534. }(t), t;
  20535. };
  20536. }
  20537. return function(e, t, n) {
  20538. n.p.customParseFormat = !0, e && e.parseTwoDigitYear && (a = e.parseTwoDigitYear);
  20539. var r = t.prototype, i = r.parse;
  20540. r.parse = function(e) {
  20541. var t = e.date, r = e.utc, o = e.args;
  20542. this.$u = r;
  20543. var a = o[1];
  20544. if ("string" == typeof a) {
  20545. var f = !0 === o[2], h = !0 === o[3], u = f || h, d = o[2];
  20546. h && (d = o[2]), s = this.$locale(), !f && d && (s = n.Ls[d]), this.$d = function(e, t, n, r) {
  20547. try {
  20548. if (["x", "X"].indexOf(t) > -1) return /* @__PURE__ */ new Date(("X" === t ? 1e3 : 1) * e);
  20549. var i = l(t)(e), o = i.year, s = i.month, a = i.day, f = i.hours, h = i.minutes, u = i.seconds, d = i.milliseconds, c = i.zone, m = i.week, M = /* @__PURE__ */ new Date(), Y = a || (o || s ? 1 : M.getDate()), p = o || M.getFullYear(), v = 0;
  20550. o && !s || (v = s > 0 ? s - 1 : M.getMonth());
  20551. var D, w = f || 0, g = h || 0, y = u || 0, L = d || 0;
  20552. return c ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c.offset * 1e3)) : n ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m && (D = r(D).week(m).toDate()), D);
  20553. } catch (e) {
  20554. return /* @__PURE__ */ new Date("");
  20555. }
  20556. }(t, a, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(a) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
  20557. } else if (a instanceof Array) for (var c = a.length, m = 1; m <= c; m += 1) {
  20558. o[1] = a[m - 1];
  20559. var M = n.apply(this, o);
  20560. if (M.isValid()) {
  20561. this.$d = M.$d, this.$L = M.$L, this.init();
  20562. break;
  20563. }
  20564. m === c && (this.$d = /* @__PURE__ */ new Date(""));
  20565. }
  20566. else i.call(this, e);
  20567. };
  20568. };
  20569. }));
  20570. })))(), 1);
  20571. import_dayjs_min.default.extend(import_customParseFormat.default);
  20572. //#endregion
  20573. //#region node_modules/element-plus/es/components/time-picker/index.mjs
  20574. var ElTimePicker = withInstall(/* @__PURE__ */ defineComponent({
  20575. name: "ElTimePicker",
  20576. install: null,
  20577. props: {
  20578. ...timePickerDefaultProps,
  20579. /**
  20580. * @description whether to pick a time range
  20581. */
  20582. isRange: Boolean
  20583. },
  20584. emits: [UPDATE_MODEL_EVENT],
  20585. setup(props, ctx) {
  20586. const commonPicker = ref();
  20587. const [type, Panel] = props.isRange ? ["timerange", panel_time_range_default] : ["time", panel_time_pick_default];
  20588. const modelUpdater = (value) => ctx.emit(UPDATE_MODEL_EVENT, value);
  20589. provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, props.popperOptions);
  20590. ctx.expose({
  20591. /**
  20592. * @description focus the Input component
  20593. */
  20594. focus: () => {
  20595. commonPicker.value?.focus();
  20596. },
  20597. /**
  20598. * @description blur the Input component
  20599. */
  20600. blur: () => {
  20601. commonPicker.value?.blur();
  20602. },
  20603. /**
  20604. * @description open the TimePicker popper
  20605. */
  20606. handleOpen: () => {
  20607. commonPicker.value?.handleOpen();
  20608. },
  20609. /**
  20610. * @description close the TimePicker popper
  20611. */
  20612. handleClose: () => {
  20613. commonPicker.value?.handleClose();
  20614. }
  20615. });
  20616. return () => {
  20617. return createVNode(picker_default, mergeProps(props, {
  20618. "ref": commonPicker,
  20619. "type": type,
  20620. "format": props.format ?? "HH:mm:ss",
  20621. "onUpdate:modelValue": modelUpdater
  20622. }), { default: (props) => createVNode(Panel, props, null) });
  20623. };
  20624. }
  20625. }));
  20626. //#endregion
  20627. //#region node_modules/element-plus/es/components/tag/src/tag.mjs
  20628. /**
  20629. * @deprecated Removed after 3.0.0, Use `TagProps` instead.
  20630. */
  20631. var tagProps = buildProps({
  20632. /**
  20633. * @description type of Tag
  20634. */
  20635. type: {
  20636. type: String,
  20637. values: [
  20638. "primary",
  20639. "success",
  20640. "info",
  20641. "warning",
  20642. "danger"
  20643. ],
  20644. default: "primary"
  20645. },
  20646. /**
  20647. * @description whether Tag can be removed
  20648. */
  20649. closable: Boolean,
  20650. /**
  20651. * @description whether to disable animations
  20652. */
  20653. disableTransitions: Boolean,
  20654. /**
  20655. * @description whether Tag has a highlighted border
  20656. */
  20657. hit: Boolean,
  20658. /**
  20659. * @description background color of the Tag
  20660. */
  20661. color: String,
  20662. /**
  20663. * @description size of Tag
  20664. */
  20665. size: {
  20666. type: String,
  20667. values: componentSizes
  20668. },
  20669. /**
  20670. * @description theme of Tag
  20671. */
  20672. effect: {
  20673. type: String,
  20674. values: [
  20675. "dark",
  20676. "light",
  20677. "plain"
  20678. ],
  20679. default: "light"
  20680. },
  20681. /**
  20682. * @description whether Tag is rounded
  20683. */
  20684. round: Boolean
  20685. });
  20686. var tagEmits = {
  20687. close: (evt) => evt instanceof MouseEvent,
  20688. click: (evt) => evt instanceof MouseEvent
  20689. };
  20690. //#endregion
  20691. //#region node_modules/element-plus/es/components/tag/src/tag.vue_vue_type_script_setup_true_lang.mjs
  20692. var _hoisted_1$69 = ["aria-label"];
  20693. var _hoisted_2$39 = ["aria-label"];
  20694. //#endregion
  20695. //#region node_modules/element-plus/es/components/tag/index.mjs
  20696. var ElTag = withInstall(/* @__PURE__ */ defineComponent({
  20697. name: "ElTag",
  20698. __name: "tag",
  20699. props: tagProps,
  20700. emits: tagEmits,
  20701. setup(__props, { emit: __emit }) {
  20702. const props = __props;
  20703. const emit = __emit;
  20704. const tagSize = useFormSize();
  20705. const { t } = useLocale();
  20706. const ns = useNamespace("tag");
  20707. const containerKls = computed(() => {
  20708. const { type, hit, effect, closable, round } = props;
  20709. return [
  20710. ns.b(),
  20711. ns.is("closable", closable),
  20712. ns.m(type || "primary"),
  20713. ns.m(tagSize.value),
  20714. ns.m(effect),
  20715. ns.is("hit", hit),
  20716. ns.is("round", round)
  20717. ];
  20718. });
  20719. const handleClose = (event) => {
  20720. emit("close", event);
  20721. };
  20722. const handleClick = (event) => {
  20723. emit("click", event);
  20724. };
  20725. const handleVNodeMounted = (vnode) => {
  20726. if (vnode?.component?.subTree?.component?.bum) vnode.component.subTree.component.bum = null;
  20727. };
  20728. return (_ctx, _cache) => {
  20729. return __props.disableTransitions ? (openBlock(), createElementBlock("span", {
  20730. key: 0,
  20731. class: normalizeClass(containerKls.value),
  20732. style: normalizeStyle({ backgroundColor: __props.color }),
  20733. onClick: handleClick
  20734. }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2), __props.closable ? (openBlock(), createElementBlock("button", {
  20735. key: 0,
  20736. "aria-label": unref(t)("el.tag.close"),
  20737. class: normalizeClass(unref(ns).e("close")),
  20738. type: "button",
  20739. onClick: withModifiers(handleClose, ["stop"])
  20740. }, [createVNode(unref(ElIcon), null, {
  20741. default: withCtx(() => [createVNode(unref(close_default))]),
  20742. _: 1
  20743. })], 10, _hoisted_1$69)) : createCommentVNode("v-if", true)], 6)) : (openBlock(), createBlock(Transition, {
  20744. key: 1,
  20745. name: `${unref(ns).namespace.value}-zoom-in-center`,
  20746. appear: "",
  20747. onVnodeMounted: handleVNodeMounted
  20748. }, {
  20749. default: withCtx(() => [createBaseVNode("span", {
  20750. class: normalizeClass(containerKls.value),
  20751. style: normalizeStyle({ backgroundColor: __props.color }),
  20752. onClick: handleClick
  20753. }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2), __props.closable ? (openBlock(), createElementBlock("button", {
  20754. key: 0,
  20755. "aria-label": unref(t)("el.tag.close"),
  20756. class: normalizeClass(unref(ns).e("close")),
  20757. type: "button",
  20758. onClick: withModifiers(handleClose, ["stop"])
  20759. }, [createVNode(unref(ElIcon), null, {
  20760. default: withCtx(() => [createVNode(unref(close_default))]),
  20761. _: 1
  20762. })], 10, _hoisted_2$39)) : createCommentVNode("v-if", true)], 6)]),
  20763. _: 3
  20764. }, 8, ["name"]));
  20765. };
  20766. }
  20767. }));
  20768. //#endregion
  20769. //#region node_modules/element-plus/es/components/select/src/token.mjs
  20770. var selectGroupKey = Symbol("ElSelectGroup");
  20771. var selectKey = Symbol("ElSelect");
  20772. //#endregion
  20773. //#region node_modules/element-plus/es/components/select-v2/src/useProps.mjs
  20774. var defaultProps$2 = {
  20775. label: "label",
  20776. value: "value",
  20777. disabled: "disabled",
  20778. options: "options"
  20779. };
  20780. function useProps(props) {
  20781. const aliasProps = ref({
  20782. ...defaultProps$2,
  20783. ...props.props
  20784. });
  20785. let cache = { ...props.props };
  20786. watch(() => props.props, (val) => {
  20787. if (!isEqual$1(val, cache)) {
  20788. aliasProps.value = {
  20789. ...defaultProps$2,
  20790. ...val
  20791. };
  20792. cache = { ...val };
  20793. }
  20794. }, { deep: true });
  20795. const getLabel = (option) => get(option, aliasProps.value.label);
  20796. const getValue = (option) => get(option, aliasProps.value.value);
  20797. const getDisabled = (option) => get(option, aliasProps.value.disabled);
  20798. const getOptions = (option) => get(option, aliasProps.value.options);
  20799. return {
  20800. aliasProps,
  20801. getLabel,
  20802. getValue,
  20803. getDisabled,
  20804. getOptions
  20805. };
  20806. }
  20807. //#endregion
  20808. //#region node_modules/element-plus/es/components/select/src/select.mjs
  20809. var selectProps = buildProps({
  20810. /**
  20811. * @description the name attribute of select input
  20812. */
  20813. name: String,
  20814. /**
  20815. * @description native input id
  20816. */
  20817. id: String,
  20818. /**
  20819. * @description binding value
  20820. */
  20821. modelValue: {
  20822. type: definePropType([
  20823. Array,
  20824. String,
  20825. Number,
  20826. Boolean,
  20827. Object
  20828. ]),
  20829. default: void 0
  20830. },
  20831. /**
  20832. * @description the autocomplete attribute of select input
  20833. */
  20834. autocomplete: {
  20835. type: String,
  20836. default: "off"
  20837. },
  20838. /**
  20839. * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused
  20840. */
  20841. automaticDropdown: Boolean,
  20842. /**
  20843. * @description size of Input
  20844. */
  20845. size: useSizeProp,
  20846. /**
  20847. * @description tooltip theme, built-in theme: `dark` / `light`
  20848. */
  20849. effect: {
  20850. type: definePropType(String),
  20851. default: "light"
  20852. },
  20853. /**
  20854. * @description whether Select is disabled
  20855. */
  20856. disabled: {
  20857. type: Boolean,
  20858. default: void 0
  20859. },
  20860. /**
  20861. * @description whether select can be cleared
  20862. */
  20863. clearable: Boolean,
  20864. /**
  20865. * @description whether Select is filterable
  20866. */
  20867. filterable: Boolean,
  20868. /**
  20869. * @description whether creating new items is allowed. To use this, `filterable` must be true
  20870. */
  20871. allowCreate: Boolean,
  20872. /**
  20873. * @description whether Select is loading data from server
  20874. */
  20875. loading: Boolean,
  20876. /**
  20877. * @description custom class name for Select's dropdown
  20878. */
  20879. popperClass: {
  20880. type: String,
  20881. default: ""
  20882. },
  20883. /**
  20884. * @description custom style for Select's dropdown
  20885. */
  20886. popperStyle: { type: definePropType([String, Object]) },
  20887. /**
  20888. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  20889. */
  20890. popperOptions: {
  20891. type: definePropType(Object),
  20892. default: () => ({})
  20893. },
  20894. /**
  20895. * @description whether options are loaded from server
  20896. */
  20897. remote: Boolean,
  20898. /**
  20899. * @description debounce delay during remote search, in milliseconds
  20900. */
  20901. debounce: {
  20902. type: Number,
  20903. default: 300
  20904. },
  20905. /**
  20906. * @description displayed text while loading data from server, default is 'Loading'
  20907. */
  20908. loadingText: String,
  20909. /**
  20910. * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'
  20911. */
  20912. noMatchText: String,
  20913. /**
  20914. * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'
  20915. */
  20916. noDataText: String,
  20917. /**
  20918. * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true
  20919. */
  20920. remoteMethod: { type: definePropType(Function) },
  20921. /**
  20922. * @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true
  20923. */
  20924. filterMethod: { type: definePropType(Function) },
  20925. /**
  20926. * @description whether multiple-select is activated
  20927. */
  20928. multiple: Boolean,
  20929. /**
  20930. * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0
  20931. */
  20932. multipleLimit: {
  20933. type: Number,
  20934. default: 0
  20935. },
  20936. /**
  20937. * @description placeholder, default is 'Select'
  20938. */
  20939. placeholder: { type: String },
  20940. /**
  20941. * @description select first matching option on enter key. Use with `filterable` or `remote`
  20942. */
  20943. defaultFirstOption: Boolean,
  20944. /**
  20945. * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option
  20946. */
  20947. reserveKeyword: {
  20948. type: Boolean,
  20949. default: true
  20950. },
  20951. /**
  20952. * @description unique identity key name for value, required when value is an object
  20953. */
  20954. valueKey: {
  20955. type: String,
  20956. default: "value"
  20957. },
  20958. /**
  20959. * @description whether to collapse tags to a text when multiple selecting
  20960. */
  20961. collapseTags: Boolean,
  20962. /**
  20963. * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
  20964. */
  20965. collapseTagsTooltip: Boolean,
  20966. /**
  20967. * @description configuration object for the collapse-tags tooltip. To use this, `collapse-tags` and `collapse-tags-tooltip` must be true
  20968. */
  20969. tagTooltip: {
  20970. type: definePropType(Object),
  20971. default: () => ({})
  20972. },
  20973. /**
  20974. * @description the max tags number to be shown. To use this, `collapse-tags` must be true
  20975. */
  20976. maxCollapseTags: {
  20977. type: Number,
  20978. default: 1
  20979. },
  20980. /**
  20981. * @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets
  20982. */
  20983. teleported: useTooltipContentProps.teleported,
  20984. /**
  20985. * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed
  20986. */
  20987. persistent: {
  20988. type: Boolean,
  20989. default: true
  20990. },
  20991. /**
  20992. * @description custom clear icon component
  20993. */
  20994. clearIcon: {
  20995. type: iconPropType,
  20996. default: circle_close_default
  20997. },
  20998. /**
  20999. * @description whether the width of the dropdown is the same as the input
  21000. */
  21001. fitInputWidth: Boolean,
  21002. /**
  21003. * @description custom suffix icon component
  21004. */
  21005. suffixIcon: {
  21006. type: iconPropType,
  21007. default: arrow_down_default
  21008. },
  21009. /**
  21010. * @description tag type
  21011. */
  21012. tagType: {
  21013. ...tagProps.type,
  21014. default: "info"
  21015. },
  21016. /**
  21017. * @description tag effect
  21018. */
  21019. tagEffect: {
  21020. ...tagProps.effect,
  21021. default: "light"
  21022. },
  21023. /**
  21024. * @description whether to trigger form validation
  21025. */
  21026. validateEvent: {
  21027. type: Boolean,
  21028. default: true
  21029. },
  21030. /**
  21031. * @description in remote search method show suffix icon
  21032. */
  21033. remoteShowSuffix: Boolean,
  21034. /**
  21035. * @description determines whether the arrow is displayed
  21036. */
  21037. showArrow: {
  21038. type: Boolean,
  21039. default: true
  21040. },
  21041. /**
  21042. * @description offset of the dropdown
  21043. */
  21044. offset: {
  21045. type: Number,
  21046. default: 12
  21047. },
  21048. /**
  21049. * @description position of dropdown
  21050. */
  21051. placement: {
  21052. type: definePropType(String),
  21053. values: Ee,
  21054. default: "bottom-start"
  21055. },
  21056. /**
  21057. * @description list of possible positions for dropdown
  21058. */
  21059. fallbackPlacements: {
  21060. type: definePropType(Array),
  21061. default: [
  21062. "bottom-start",
  21063. "top-start",
  21064. "right",
  21065. "left"
  21066. ]
  21067. },
  21068. /**
  21069. * @description tabindex for input
  21070. */
  21071. tabindex: {
  21072. type: [String, Number],
  21073. default: 0
  21074. },
  21075. /**
  21076. * @description which element the selection dropdown appends to
  21077. */
  21078. appendTo: useTooltipContentProps.appendTo,
  21079. options: { type: definePropType(Array) },
  21080. props: {
  21081. type: definePropType(Object),
  21082. default: () => defaultProps$2
  21083. },
  21084. ...useEmptyValuesProps,
  21085. ...useAriaProps(["ariaLabel"])
  21086. });
  21087. var selectEmits = {
  21088. [UPDATE_MODEL_EVENT]: (val) => true,
  21089. [CHANGE_EVENT]: (val) => true,
  21090. "popup-scroll": scrollbarEmits.scroll,
  21091. "end-reached": scrollbarEmits["end-reached"],
  21092. "remove-tag": (val) => true,
  21093. "visible-change": (visible) => true,
  21094. focus: (evt) => evt instanceof FocusEvent,
  21095. blur: (evt) => evt instanceof FocusEvent,
  21096. clear: () => true
  21097. };
  21098. //#endregion
  21099. //#region node_modules/element-plus/es/components/select/src/option.mjs
  21100. var COMPONENT_NAME$14 = "ElOption";
  21101. var optionProps = buildProps({
  21102. /**
  21103. * @description value of option
  21104. */
  21105. value: {
  21106. type: [
  21107. String,
  21108. Number,
  21109. Boolean,
  21110. Object
  21111. ],
  21112. required: true
  21113. },
  21114. /**
  21115. * @description label of option, same as `value` if omitted
  21116. */
  21117. label: { type: [String, Number] },
  21118. created: Boolean,
  21119. /**
  21120. * @description whether option is disabled
  21121. */
  21122. disabled: Boolean
  21123. });
  21124. //#endregion
  21125. //#region node_modules/element-plus/es/components/select/src/useOption.mjs
  21126. function useOption$1(props, states) {
  21127. const select = inject(selectKey);
  21128. if (!select) throwError(COMPONENT_NAME$14, "usage: <el-select><el-option /></el-select/>");
  21129. const selectGroup = inject(selectGroupKey, { disabled: false });
  21130. const itemSelected = computed(() => {
  21131. return contains(castArray$1(select.props.modelValue), props.value);
  21132. });
  21133. const limitReached = computed(() => {
  21134. if (select.props.multiple) {
  21135. const modelValue = castArray$1(select.props.modelValue ?? []);
  21136. return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
  21137. } else return false;
  21138. });
  21139. const currentLabel = computed(() => {
  21140. return props.label ?? (isObject$2(props.value) ? "" : props.value);
  21141. });
  21142. const currentValue = computed(() => {
  21143. return props.value || props.label || "";
  21144. });
  21145. const isDisabled = computed(() => {
  21146. return props.disabled || states.groupDisabled || limitReached.value;
  21147. });
  21148. const instance = getCurrentInstance();
  21149. const contains = (arr = [], target) => {
  21150. if (!isObject$2(props.value)) return arr && arr.includes(target);
  21151. else {
  21152. const valueKey = select.props.valueKey;
  21153. return arr && arr.some((item) => {
  21154. return toRaw(get(item, valueKey)) === get(target, valueKey);
  21155. });
  21156. }
  21157. };
  21158. const hoverItem = () => {
  21159. if (!isDisabled.value) select.states.hoveringIndex = select.optionsArray.indexOf(instance.proxy);
  21160. };
  21161. const updateOption = (query) => {
  21162. states.visible = new RegExp(escapeStringRegexp(query), "i").test(String(currentLabel.value)) || props.created;
  21163. };
  21164. watch(() => currentLabel.value, () => {
  21165. if (!props.created && !select.props.remote) select.setSelected();
  21166. });
  21167. watch(() => props.value, (val, oldVal) => {
  21168. const { remote, valueKey } = select.props;
  21169. if (remote ? val !== oldVal : !isEqual$1(val, oldVal)) {
  21170. select.onOptionDestroy(oldVal, instance.proxy);
  21171. select.onOptionCreate(instance.proxy);
  21172. }
  21173. if (!props.created && !remote) {
  21174. if (valueKey && isObject$2(val) && isObject$2(oldVal) && val[valueKey] === oldVal[valueKey]) return;
  21175. select.setSelected();
  21176. }
  21177. });
  21178. watch(() => selectGroup.disabled, () => {
  21179. states.groupDisabled = selectGroup.disabled;
  21180. }, { immediate: true });
  21181. return {
  21182. select,
  21183. currentLabel,
  21184. currentValue,
  21185. itemSelected,
  21186. isDisabled,
  21187. hoverItem,
  21188. updateOption
  21189. };
  21190. }
  21191. //#endregion
  21192. //#region node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs
  21193. var option_vue_vue_type_script_lang_default = defineComponent({
  21194. name: COMPONENT_NAME$14,
  21195. componentName: COMPONENT_NAME$14,
  21196. props: optionProps,
  21197. setup(props) {
  21198. const ns = useNamespace("select");
  21199. const id = useId();
  21200. const containerKls = computed(() => [
  21201. ns.be("dropdown", "item"),
  21202. ns.is("disabled", unref(isDisabled)),
  21203. ns.is("selected", unref(itemSelected)),
  21204. ns.is("hovering", unref(hover))
  21205. ]);
  21206. const states = reactive({
  21207. index: -1,
  21208. groupDisabled: false,
  21209. visible: true,
  21210. hover: false
  21211. });
  21212. const mouseMoveEventName = isIOS ? null : "mousemove";
  21213. const { currentLabel, itemSelected, isDisabled, select, hoverItem, updateOption } = useOption$1(props, states);
  21214. const { visible, hover } = toRefs(states);
  21215. const vm = getCurrentInstance().proxy;
  21216. select.onOptionCreate(vm);
  21217. onBeforeUnmount(() => {
  21218. const key = vm.value;
  21219. nextTick(() => {
  21220. const { selected: selectedOptions } = select.states;
  21221. const doesSelected = selectedOptions.some((item) => {
  21222. return item.value === vm.value;
  21223. });
  21224. if (select.states.cachedOptions.get(key) === vm && !doesSelected) select.states.cachedOptions.delete(key);
  21225. });
  21226. select.onOptionDestroy(key, vm);
  21227. });
  21228. function selectOptionClick() {
  21229. if (!isDisabled.value) select.handleOptionSelect(vm);
  21230. }
  21231. const handleMousedown = (event) => {
  21232. let target = event.target;
  21233. const currentTarget = event.currentTarget;
  21234. while (target && target !== currentTarget) {
  21235. if (isFocusable(target)) return;
  21236. target = target.parentElement;
  21237. }
  21238. event.preventDefault();
  21239. };
  21240. return {
  21241. ns,
  21242. id,
  21243. containerKls,
  21244. currentLabel,
  21245. itemSelected,
  21246. isDisabled,
  21247. select,
  21248. visible,
  21249. hover,
  21250. states,
  21251. mouseMoveEventName,
  21252. hoverItem,
  21253. handleMousedown,
  21254. updateOption,
  21255. selectOptionClick
  21256. };
  21257. }
  21258. });
  21259. //#endregion
  21260. //#region node_modules/element-plus/es/components/select/src/option2.mjs
  21261. var _hoisted_1$68 = [
  21262. "id",
  21263. "aria-disabled",
  21264. "aria-selected"
  21265. ];
  21266. function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
  21267. return withDirectives((openBlock(), createElementBlock("li", mergeProps({
  21268. id: _ctx.id,
  21269. class: _ctx.containerKls,
  21270. role: "option",
  21271. "aria-disabled": _ctx.isDisabled || void 0,
  21272. "aria-selected": _ctx.itemSelected
  21273. }, { [toHandlerKey(_ctx.mouseMoveEventName)]: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)) }, {
  21274. onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
  21275. onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
  21276. }), [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentLabel), 1)])], 16, _hoisted_1$68)), [[vShow, _ctx.visible]]);
  21277. }
  21278. var option_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_vue_vue_type_script_lang_default, [["render", _sfc_render$19]]);
  21279. //#endregion
  21280. //#region node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs
  21281. var option_group_vue_vue_type_script_lang_default = defineComponent({
  21282. name: "ElOptionGroup",
  21283. componentName: "ElOptionGroup",
  21284. props: {
  21285. /**
  21286. * @description name of the group
  21287. */
  21288. label: String,
  21289. /**
  21290. * @description whether to disable all options in this group
  21291. */
  21292. disabled: Boolean
  21293. },
  21294. setup(props) {
  21295. const ns = useNamespace("select");
  21296. const groupRef = ref();
  21297. const instance = getCurrentInstance();
  21298. const children = ref([]);
  21299. provide(selectGroupKey, reactive({ ...toRefs(props) }));
  21300. const visible = computed(() => children.value.some((option) => option.visible === true));
  21301. const isOption = (node) => node.type.name === "ElOption" && !!node.component?.proxy;
  21302. const flattedChildren = (node) => {
  21303. const nodes = castArray$1(node);
  21304. const children = [];
  21305. nodes.forEach((child) => {
  21306. if (!isVNode(child)) return;
  21307. if (isOption(child)) children.push(child.component.proxy);
  21308. else if (isArray$1(child.children) && child.children.length) children.push(...flattedChildren(child.children));
  21309. else if (child.component?.subTree) children.push(...flattedChildren(child.component.subTree));
  21310. });
  21311. return children;
  21312. };
  21313. const updateChildren = () => {
  21314. children.value = flattedChildren(instance.subTree);
  21315. };
  21316. onMounted(() => {
  21317. updateChildren();
  21318. });
  21319. useMutationObserver(groupRef, updateChildren, {
  21320. attributes: true,
  21321. subtree: true,
  21322. childList: true
  21323. });
  21324. return {
  21325. groupRef,
  21326. visible,
  21327. ns
  21328. };
  21329. }
  21330. });
  21331. //#endregion
  21332. //#region node_modules/element-plus/es/components/select/src/option-group.mjs
  21333. function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
  21334. return withDirectives((openBlock(), createElementBlock("ul", {
  21335. ref: "groupRef",
  21336. class: normalizeClass(_ctx.ns.be("group", "wrap"))
  21337. }, [createBaseVNode("li", { class: normalizeClass(_ctx.ns.be("group", "title")) }, toDisplayString(_ctx.label), 3), createBaseVNode("li", null, [createBaseVNode("ul", { class: normalizeClass(_ctx.ns.b("group")) }, [renderSlot(_ctx.$slots, "default")], 2)])], 2)), [[vShow, _ctx.visible]]);
  21338. }
  21339. var option_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_group_vue_vue_type_script_lang_default, [["render", _sfc_render$18]]);
  21340. //#endregion
  21341. //#region node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs
  21342. var select_dropdown_vue_vue_type_script_lang_default = defineComponent({
  21343. name: "ElSelectDropdown",
  21344. componentName: "ElSelectDropdown",
  21345. setup() {
  21346. const select = inject(selectKey);
  21347. const ns = useNamespace("select");
  21348. const popperClass = computed(() => select.props.popperClass);
  21349. const isMultiple = computed(() => select.props.multiple);
  21350. const isFitInputWidth = computed(() => select.props.fitInputWidth);
  21351. const minWidth = ref("");
  21352. function updateMinWidth() {
  21353. const offsetWidth = select.selectRef?.offsetWidth;
  21354. if (offsetWidth) minWidth.value = `${offsetWidth - 2}px`;
  21355. else minWidth.value = "";
  21356. }
  21357. onMounted(() => {
  21358. updateMinWidth();
  21359. useResizeObserver(select.selectRef, updateMinWidth);
  21360. });
  21361. return {
  21362. ns,
  21363. minWidth,
  21364. popperClass,
  21365. isMultiple,
  21366. isFitInputWidth
  21367. };
  21368. }
  21369. });
  21370. //#endregion
  21371. //#region node_modules/element-plus/es/components/select/src/select-dropdown.mjs
  21372. function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
  21373. return openBlock(), createElementBlock("div", {
  21374. class: normalizeClass([
  21375. _ctx.ns.b("dropdown"),
  21376. _ctx.ns.is("multiple", _ctx.isMultiple),
  21377. _ctx.popperClass
  21378. ]),
  21379. style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
  21380. }, [
  21381. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  21382. key: 0,
  21383. class: normalizeClass(_ctx.ns.be("dropdown", "header"))
  21384. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  21385. renderSlot(_ctx.$slots, "default"),
  21386. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  21387. key: 1,
  21388. class: normalizeClass(_ctx.ns.be("dropdown", "footer"))
  21389. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  21390. ], 6);
  21391. }
  21392. var select_dropdown_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(select_dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render$17]]);
  21393. //#endregion
  21394. //#region node_modules/element-plus/es/components/select/src/useSelect.mjs
  21395. var useSelect$2 = (props, emit) => {
  21396. const { t } = useLocale();
  21397. const slots = useSlots();
  21398. const contentId = useId();
  21399. const nsSelect = useNamespace("select");
  21400. const nsInput = useNamespace("input");
  21401. const states = reactive({
  21402. inputValue: "",
  21403. options: /* @__PURE__ */ new Map(),
  21404. cachedOptions: /* @__PURE__ */ new Map(),
  21405. optionValues: [],
  21406. selected: [],
  21407. selectionWidth: 0,
  21408. collapseItemWidth: 0,
  21409. selectedLabel: "",
  21410. hoveringIndex: -1,
  21411. previousQuery: null,
  21412. inputHovering: false,
  21413. menuVisibleOnFocus: false,
  21414. isBeforeHide: false
  21415. });
  21416. const selectRef = ref();
  21417. const selectionRef = ref();
  21418. const tooltipRef = ref();
  21419. const tagTooltipRef = ref();
  21420. const inputRef = ref();
  21421. const prefixRef = ref();
  21422. const suffixRef = ref();
  21423. const menuRef = ref();
  21424. const tagMenuRef = ref();
  21425. const collapseItemRef = ref();
  21426. const scrollbarRef = ref();
  21427. const expanded = ref(false);
  21428. const hoverOption = ref();
  21429. const debouncing = ref(false);
  21430. const { form, formItem } = useFormItem();
  21431. const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
  21432. const { valueOnClear, isEmptyValue } = useEmptyValues(props);
  21433. const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: (e) => onInput(e) });
  21434. const selectDisabled = useFormDisabled();
  21435. const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
  21436. disabled: selectDisabled,
  21437. afterFocus() {
  21438. if (props.automaticDropdown && !expanded.value) {
  21439. expanded.value = true;
  21440. states.menuVisibleOnFocus = true;
  21441. }
  21442. },
  21443. beforeBlur(event) {
  21444. return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
  21445. },
  21446. afterBlur() {
  21447. expanded.value = false;
  21448. states.menuVisibleOnFocus = false;
  21449. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  21450. }
  21451. });
  21452. const hasModelValue = computed(() => {
  21453. return isArray$1(props.modelValue) ? props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
  21454. });
  21455. const needStatusIcon = computed(() => form?.statusIcon ?? false);
  21456. const showClearBtn = computed(() => {
  21457. return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
  21458. });
  21459. const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
  21460. const iconReverse = computed(() => nsSelect.is("reverse", !!(iconComponent.value && expanded.value)));
  21461. const validateState = computed(() => formItem?.validateState || "");
  21462. const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
  21463. const debounce = computed(() => props.remote ? props.debounce : 0);
  21464. const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && states.options.size === 0);
  21465. const emptyText = computed(() => {
  21466. if (props.loading) return props.loadingText || t("el.select.loading");
  21467. else {
  21468. if (props.filterable && states.inputValue && states.options.size > 0 && filteredOptionsCount.value === 0) return props.noMatchText || t("el.select.noMatch");
  21469. if (states.options.size === 0) return props.noDataText || t("el.select.noData");
  21470. }
  21471. return null;
  21472. });
  21473. const filteredOptionsCount = computed(() => optionsArray.value.filter((option) => option.visible).length);
  21474. const optionsArray = computed(() => {
  21475. const list = Array.from(states.options.values());
  21476. const newList = [];
  21477. states.optionValues.forEach((item) => {
  21478. const index = list.findIndex((i) => i.value === item);
  21479. if (index > -1) newList.push(list[index]);
  21480. });
  21481. return newList.length >= list.length ? newList : list;
  21482. });
  21483. const cachedOptionsArray = computed(() => Array.from(states.cachedOptions.values()));
  21484. const showNewOption = computed(() => {
  21485. const hasExistingOption = optionsArray.value.filter((option) => {
  21486. return !option.created;
  21487. }).some((option) => {
  21488. return option.currentLabel === states.inputValue;
  21489. });
  21490. return props.filterable && props.allowCreate && states.inputValue !== "" && !hasExistingOption;
  21491. });
  21492. const updateOptions = () => {
  21493. if (props.filterable && isFunction$1(props.filterMethod)) return;
  21494. if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) return;
  21495. optionsArray.value.forEach((option) => {
  21496. option.updateOption?.(states.inputValue);
  21497. });
  21498. };
  21499. const selectSize = useFormSize();
  21500. const collapseTagSize = computed(() => ["small"].includes(selectSize.value) ? "small" : "default");
  21501. const dropdownMenuVisible = computed({
  21502. get() {
  21503. return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery) || states.options.size > 0);
  21504. },
  21505. set(val) {
  21506. expanded.value = val;
  21507. }
  21508. });
  21509. const shouldShowPlaceholder = computed(() => {
  21510. if (props.multiple && !isUndefined(props.modelValue)) return castArray$1(props.modelValue).length === 0 && !states.inputValue;
  21511. const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
  21512. return props.filterable || isUndefined(value) ? !states.inputValue : true;
  21513. });
  21514. const currentPlaceholder = computed(() => {
  21515. const _placeholder = props.placeholder ?? t("el.select.placeholder");
  21516. return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
  21517. });
  21518. const mouseEnterEventName = isIOS ? null : "mouseenter";
  21519. watch(() => props.modelValue, (val, oldVal) => {
  21520. if (props.multiple) {
  21521. if (props.filterable && !props.reserveKeyword) {
  21522. states.inputValue = "";
  21523. handleQueryChange("");
  21524. }
  21525. }
  21526. setSelected();
  21527. if (!isEqual$1(val, oldVal) && props.validateEvent) formItem?.validate("change").catch(NOOP);
  21528. }, {
  21529. flush: "post",
  21530. deep: true
  21531. });
  21532. watch(() => expanded.value, (val) => {
  21533. if (val) handleQueryChange(states.inputValue);
  21534. else {
  21535. states.inputValue = "";
  21536. states.previousQuery = null;
  21537. states.isBeforeHide = true;
  21538. states.menuVisibleOnFocus = false;
  21539. }
  21540. });
  21541. watch(() => states.options.entries(), () => {
  21542. if (!isClient) return;
  21543. setSelected();
  21544. if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) checkDefaultFirstOption();
  21545. }, { flush: "post" });
  21546. watch([() => states.hoveringIndex, optionsArray], ([val]) => {
  21547. if (isNumber(val) && val > -1) hoverOption.value = optionsArray.value[val] || {};
  21548. else hoverOption.value = {};
  21549. optionsArray.value.forEach((option) => {
  21550. option.hover = hoverOption.value === option;
  21551. });
  21552. });
  21553. watchEffect(() => {
  21554. if (states.isBeforeHide) return;
  21555. updateOptions();
  21556. });
  21557. const handleQueryChange = (val) => {
  21558. if (states.previousQuery === val || isComposing.value) return;
  21559. states.previousQuery = val;
  21560. if (props.filterable && isFunction$1(props.filterMethod)) props.filterMethod(val);
  21561. else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) props.remoteMethod(val);
  21562. if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) nextTick(checkDefaultFirstOption);
  21563. else nextTick(updateHoveringIndex);
  21564. };
  21565. /**
  21566. * find and highlight first option as default selected
  21567. * @remark
  21568. * - if the first option in dropdown list is user-created,
  21569. * it would be at the end of the optionsArray
  21570. * so find it and set hover.
  21571. * (NOTE: there must be only one user-created option in dropdown list with query)
  21572. * - if there's no user-created option in list, just find the first one as usual
  21573. * (NOTE: exclude options that are disabled or in disabled-group)
  21574. */
  21575. const checkDefaultFirstOption = () => {
  21576. const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.states.groupDisabled);
  21577. const userCreatedOption = optionsInDropdown.find((n) => n.created);
  21578. const firstOriginOption = optionsInDropdown[0];
  21579. states.hoveringIndex = getValueIndex(optionsArray.value.map((item) => item.value), userCreatedOption || firstOriginOption);
  21580. };
  21581. const setSelected = () => {
  21582. if (!props.multiple) {
  21583. const option = getOption(isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue);
  21584. states.selectedLabel = option.currentLabel;
  21585. states.selected = [option];
  21586. return;
  21587. } else states.selectedLabel = "";
  21588. const result = [];
  21589. if (!isUndefined(props.modelValue)) castArray$1(props.modelValue).forEach((value) => {
  21590. result.push(getOption(value));
  21591. });
  21592. states.selected = result;
  21593. };
  21594. const getOption = (value) => {
  21595. let option;
  21596. const isObjectValue = isPlainObject$1(value);
  21597. for (let i = states.cachedOptions.size - 1; i >= 0; i--) {
  21598. const cachedOption = cachedOptionsArray.value[i];
  21599. if (isObjectValue ? get(cachedOption.value, props.valueKey) === get(value, props.valueKey) : cachedOption.value === value) {
  21600. option = {
  21601. index: optionsArray.value.filter((opt) => !opt.created).indexOf(cachedOption),
  21602. value,
  21603. currentLabel: cachedOption.currentLabel,
  21604. get isDisabled() {
  21605. return cachedOption.isDisabled;
  21606. }
  21607. };
  21608. break;
  21609. }
  21610. }
  21611. if (option) return option;
  21612. const existingSelected = states.selected.find((item) => isObjectValue ? get(item.value, props.valueKey) === get(value, props.valueKey) : item.value === value);
  21613. return {
  21614. index: -1,
  21615. value,
  21616. currentLabel: isObjectValue ? value.label : existingSelected ? existingSelected.currentLabel : value ?? ""
  21617. };
  21618. };
  21619. const updateHoveringIndex = () => {
  21620. const length = states.selected.length;
  21621. if (length > 0) {
  21622. const lastOption = states.selected[length - 1];
  21623. states.hoveringIndex = optionsArray.value.findIndex((item) => getValueKey(lastOption) === getValueKey(item));
  21624. } else states.hoveringIndex = -1;
  21625. };
  21626. const resetSelectionWidth = () => {
  21627. states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
  21628. };
  21629. const resetCollapseItemWidth = () => {
  21630. states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
  21631. };
  21632. const updateTooltip = () => {
  21633. tooltipRef.value?.updatePopper?.();
  21634. };
  21635. const updateTagTooltip = () => {
  21636. tagTooltipRef.value?.updatePopper?.();
  21637. };
  21638. const onInputChange = () => {
  21639. if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
  21640. handleQueryChange(states.inputValue);
  21641. };
  21642. const onInput = (event) => {
  21643. states.inputValue = event.target.value;
  21644. if (props.remote) {
  21645. debouncing.value = true;
  21646. debouncedOnInputChange();
  21647. } else return onInputChange();
  21648. };
  21649. const debouncedOnInputChange = useDebounceFn(() => {
  21650. onInputChange();
  21651. debouncing.value = false;
  21652. }, debounce);
  21653. const emitChange = (val) => {
  21654. if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
  21655. };
  21656. const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => {
  21657. const option = states.cachedOptions.get(it);
  21658. return !option?.disabled && !option?.states.groupDisabled;
  21659. });
  21660. const deletePrevTag = (e) => {
  21661. const code = getEventCode(e);
  21662. if (!props.multiple) return;
  21663. if (code === EVENT_CODE.delete) return;
  21664. if (e.target.value.length <= 0) {
  21665. const value = castArray$1(props.modelValue).slice();
  21666. const lastNotDisabledIndex = getLastNotDisabledIndex(value);
  21667. if (lastNotDisabledIndex < 0) return;
  21668. const removeTagValue = value[lastNotDisabledIndex];
  21669. value.splice(lastNotDisabledIndex, 1);
  21670. emit(UPDATE_MODEL_EVENT, value);
  21671. emitChange(value);
  21672. emit("remove-tag", removeTagValue);
  21673. }
  21674. };
  21675. const deleteTag = (event, tag) => {
  21676. const index = states.selected.indexOf(tag);
  21677. if (index > -1 && !selectDisabled.value) {
  21678. const value = castArray$1(props.modelValue).slice();
  21679. value.splice(index, 1);
  21680. emit(UPDATE_MODEL_EVENT, value);
  21681. emitChange(value);
  21682. emit("remove-tag", tag.value);
  21683. }
  21684. event.stopPropagation();
  21685. focus();
  21686. };
  21687. const deleteSelected = (event) => {
  21688. event.stopPropagation();
  21689. const value = props.multiple ? [] : valueOnClear.value;
  21690. if (props.multiple) {
  21691. for (const item of states.selected) if (item.isDisabled) value.push(item.value);
  21692. }
  21693. emit(UPDATE_MODEL_EVENT, value);
  21694. emitChange(value);
  21695. states.hoveringIndex = -1;
  21696. expanded.value = false;
  21697. emit("clear");
  21698. focus();
  21699. };
  21700. const handleOptionSelect = (option) => {
  21701. if (props.multiple) {
  21702. const value = castArray$1(props.modelValue ?? []).slice();
  21703. const optionIndex = getValueIndex(value, option);
  21704. if (optionIndex > -1) value.splice(optionIndex, 1);
  21705. else if (props.multipleLimit <= 0 || value.length < props.multipleLimit) value.push(option.value);
  21706. emit(UPDATE_MODEL_EVENT, value);
  21707. emitChange(value);
  21708. if (option.created) handleQueryChange("");
  21709. if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
  21710. } else {
  21711. !isEqual$1(props.modelValue, option.value) && emit("update:modelValue", option.value);
  21712. emitChange(option.value);
  21713. expanded.value = false;
  21714. }
  21715. focus();
  21716. if (expanded.value) return;
  21717. nextTick(() => {
  21718. scrollToOption(option);
  21719. });
  21720. };
  21721. const getValueIndex = (arr, option) => {
  21722. if (isUndefined(option)) return -1;
  21723. if (!isObject$2(option.value)) return arr.indexOf(option.value);
  21724. return arr.findIndex((item) => {
  21725. return isEqual$1(get(item, props.valueKey), getValueKey(option));
  21726. });
  21727. };
  21728. const scrollToOption = (option) => {
  21729. const targetOption = isArray$1(option) ? option[option.length - 1] : option;
  21730. let target = null;
  21731. if (!isNil(targetOption?.value)) {
  21732. const options = optionsArray.value.filter((item) => item.value === targetOption.value);
  21733. if (options.length > 0) target = options[0].$el;
  21734. }
  21735. if (tooltipRef.value && target) {
  21736. const menu = tooltipRef.value?.popperRef?.contentRef?.querySelector?.(`.${nsSelect.be("dropdown", "wrap")}`);
  21737. if (menu) scrollIntoView(menu, target);
  21738. }
  21739. scrollbarRef.value?.handleScroll();
  21740. };
  21741. const onOptionCreate = (vm) => {
  21742. states.options.set(vm.value, vm);
  21743. states.cachedOptions.set(vm.value, vm);
  21744. };
  21745. const onOptionDestroy = (key, vm) => {
  21746. if (states.options.get(key) === vm) states.options.delete(key);
  21747. };
  21748. const popperRef = computed(() => {
  21749. return tooltipRef.value?.popperRef?.contentRef;
  21750. });
  21751. const handleMenuEnter = () => {
  21752. states.isBeforeHide = false;
  21753. nextTick(() => {
  21754. scrollbarRef.value?.update();
  21755. scrollToOption(states.selected);
  21756. });
  21757. };
  21758. const focus = () => {
  21759. inputRef.value?.focus();
  21760. };
  21761. const blur = () => {
  21762. if (expanded.value) {
  21763. expanded.value = false;
  21764. nextTick(() => inputRef.value?.blur());
  21765. return;
  21766. }
  21767. inputRef.value?.blur();
  21768. };
  21769. const handleClearClick = (event) => {
  21770. deleteSelected(event);
  21771. };
  21772. const handleClickOutside = (event) => {
  21773. expanded.value = false;
  21774. if (isFocused.value) {
  21775. const _event = new FocusEvent("blur", event);
  21776. nextTick(() => handleBlur(_event));
  21777. }
  21778. };
  21779. const handleEsc = () => {
  21780. if (states.inputValue.length > 0) states.inputValue = "";
  21781. else expanded.value = false;
  21782. };
  21783. const toggleMenu = (event) => {
  21784. if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
  21785. if (isIOS) states.inputHovering = true;
  21786. if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
  21787. else expanded.value = !expanded.value;
  21788. };
  21789. const selectOption = () => {
  21790. if (!expanded.value) toggleMenu();
  21791. else {
  21792. const option = optionsArray.value[states.hoveringIndex];
  21793. if (option && !option.isDisabled) handleOptionSelect(option);
  21794. }
  21795. };
  21796. const getValueKey = (item) => {
  21797. return isObject$2(item.value) ? get(item.value, props.valueKey) : item.value;
  21798. };
  21799. const optionsAllDisabled = computed(() => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled));
  21800. const showTagList = computed(() => {
  21801. if (!props.multiple) return [];
  21802. return props.collapseTags ? states.selected.slice(0, props.maxCollapseTags) : states.selected;
  21803. });
  21804. const collapseTagList = computed(() => {
  21805. if (!props.multiple) return [];
  21806. return props.collapseTags ? states.selected.slice(props.maxCollapseTags) : [];
  21807. });
  21808. const navigateOptions = (direction) => {
  21809. if (!expanded.value) {
  21810. expanded.value = true;
  21811. return;
  21812. }
  21813. if (states.options.size === 0 || filteredOptionsCount.value === 0 || isComposing.value) return;
  21814. if (!optionsAllDisabled.value) {
  21815. if (direction === "next") {
  21816. states.hoveringIndex++;
  21817. if (states.hoveringIndex === states.options.size) states.hoveringIndex = 0;
  21818. } else if (direction === "prev") {
  21819. states.hoveringIndex--;
  21820. if (states.hoveringIndex < 0) states.hoveringIndex = states.options.size - 1;
  21821. }
  21822. const option = optionsArray.value[states.hoveringIndex];
  21823. if (option.isDisabled || !option.visible) navigateOptions(direction);
  21824. nextTick(() => scrollToOption(hoverOption.value));
  21825. }
  21826. };
  21827. const findFocusableIndex = (arr, start, step, len) => {
  21828. for (let i = start; i >= 0 && i < len; i += step) {
  21829. const obj = arr[i];
  21830. if (!obj?.isDisabled && obj?.visible) return i;
  21831. }
  21832. return null;
  21833. };
  21834. const focusOption = (targetIndex, mode) => {
  21835. const len = states.options.size;
  21836. if (len === 0) return;
  21837. const start = clamp$2(targetIndex, 0, len - 1);
  21838. const options = optionsArray.value;
  21839. const direction = mode === "up" ? -1 : 1;
  21840. const newIndex = findFocusableIndex(options, start, direction, len) ?? findFocusableIndex(options, start - direction, -direction, len);
  21841. if (newIndex != null) {
  21842. states.hoveringIndex = newIndex;
  21843. nextTick(() => scrollToOption(hoverOption.value));
  21844. }
  21845. };
  21846. const handleKeydown = (e) => {
  21847. const code = getEventCode(e);
  21848. let isPreventDefault = true;
  21849. switch (code) {
  21850. case EVENT_CODE.up:
  21851. navigateOptions("prev");
  21852. break;
  21853. case EVENT_CODE.down:
  21854. navigateOptions("next");
  21855. break;
  21856. case EVENT_CODE.enter:
  21857. case EVENT_CODE.numpadEnter:
  21858. if (!isComposing.value) selectOption();
  21859. break;
  21860. case EVENT_CODE.esc:
  21861. handleEsc();
  21862. break;
  21863. case EVENT_CODE.backspace:
  21864. isPreventDefault = false;
  21865. deletePrevTag(e);
  21866. return;
  21867. case EVENT_CODE.home:
  21868. if (!expanded.value) return;
  21869. focusOption(0, "down");
  21870. break;
  21871. case EVENT_CODE.end:
  21872. if (!expanded.value) return;
  21873. focusOption(states.options.size - 1, "up");
  21874. break;
  21875. case EVENT_CODE.pageUp:
  21876. if (!expanded.value) return;
  21877. focusOption(states.hoveringIndex - 10, "up");
  21878. break;
  21879. case EVENT_CODE.pageDown:
  21880. if (!expanded.value) return;
  21881. focusOption(states.hoveringIndex + 10, "down");
  21882. break;
  21883. default:
  21884. isPreventDefault = false;
  21885. break;
  21886. }
  21887. if (isPreventDefault) {
  21888. e.preventDefault();
  21889. e.stopPropagation();
  21890. }
  21891. };
  21892. const getGapWidth = () => {
  21893. if (!selectionRef.value) return 0;
  21894. const style = window.getComputedStyle(selectionRef.value);
  21895. return Number.parseFloat(style.gap || "6px");
  21896. };
  21897. const tagStyle = computed(() => {
  21898. const gapWidth = getGapWidth();
  21899. const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
  21900. return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
  21901. });
  21902. const collapseTagStyle = computed(() => {
  21903. return { maxWidth: `${states.selectionWidth}px` };
  21904. });
  21905. const popupScroll = (data) => {
  21906. emit("popup-scroll", data);
  21907. };
  21908. const endReached = (direction) => {
  21909. emit("end-reached", direction);
  21910. };
  21911. useResizeObserver(selectionRef, resetSelectionWidth);
  21912. useResizeObserver(wrapperRef, updateTooltip);
  21913. useResizeObserver(tagMenuRef, updateTagTooltip);
  21914. useResizeObserver(collapseItemRef, resetCollapseItemWidth);
  21915. let stop;
  21916. watch(() => dropdownMenuVisible.value, (newVal) => {
  21917. if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
  21918. else {
  21919. stop?.();
  21920. stop = void 0;
  21921. }
  21922. emit("visible-change", newVal);
  21923. });
  21924. onMounted(() => {
  21925. setSelected();
  21926. });
  21927. return {
  21928. inputId,
  21929. contentId,
  21930. nsSelect,
  21931. nsInput,
  21932. states,
  21933. isFocused,
  21934. expanded,
  21935. optionsArray,
  21936. hoverOption,
  21937. selectSize,
  21938. filteredOptionsCount,
  21939. updateTooltip,
  21940. updateTagTooltip,
  21941. debouncedOnInputChange,
  21942. onInput,
  21943. deletePrevTag,
  21944. deleteTag,
  21945. deleteSelected,
  21946. handleOptionSelect,
  21947. scrollToOption,
  21948. hasModelValue,
  21949. shouldShowPlaceholder,
  21950. currentPlaceholder,
  21951. mouseEnterEventName,
  21952. needStatusIcon,
  21953. showClearBtn,
  21954. iconComponent,
  21955. iconReverse,
  21956. validateState,
  21957. validateIcon,
  21958. showNewOption,
  21959. updateOptions,
  21960. collapseTagSize,
  21961. setSelected,
  21962. selectDisabled,
  21963. emptyText,
  21964. handleCompositionStart,
  21965. handleCompositionUpdate,
  21966. handleCompositionEnd,
  21967. handleKeydown,
  21968. onOptionCreate,
  21969. onOptionDestroy,
  21970. handleMenuEnter,
  21971. focus,
  21972. blur,
  21973. handleClearClick,
  21974. handleClickOutside,
  21975. handleEsc,
  21976. toggleMenu,
  21977. selectOption,
  21978. getValueKey,
  21979. navigateOptions,
  21980. dropdownMenuVisible,
  21981. showTagList,
  21982. collapseTagList,
  21983. popupScroll,
  21984. getOption,
  21985. endReached,
  21986. tagStyle,
  21987. collapseTagStyle,
  21988. popperRef,
  21989. inputRef,
  21990. tooltipRef,
  21991. tagTooltipRef,
  21992. prefixRef,
  21993. suffixRef,
  21994. selectRef,
  21995. wrapperRef,
  21996. selectionRef,
  21997. scrollbarRef,
  21998. menuRef,
  21999. tagMenuRef,
  22000. collapseItemRef
  22001. };
  22002. };
  22003. //#endregion
  22004. //#region node_modules/element-plus/es/components/select/src/options.mjs
  22005. var options_default = defineComponent({
  22006. name: "ElOptions",
  22007. setup(_, { slots }) {
  22008. const select = inject(selectKey);
  22009. let cachedValueList = [];
  22010. return () => {
  22011. const children = slots.default?.();
  22012. const valueList = [];
  22013. function filterOptions(children) {
  22014. if (!isArray$1(children)) return;
  22015. children.forEach((item) => {
  22016. const name = (item?.type || {})?.name;
  22017. if (name === "ElOptionGroup") filterOptions(!isString(item.children) && !isArray$1(item.children) && isFunction$1(item.children?.default) ? item.children?.default() : item.children);
  22018. else if (name === "ElOption") valueList.push(item.props?.value);
  22019. else if (isArray$1(item.children)) filterOptions(item.children);
  22020. });
  22021. }
  22022. if (children.length) filterOptions(children[0]?.children);
  22023. if (!isEqual$1(valueList, cachedValueList)) {
  22024. cachedValueList = valueList;
  22025. if (select) select.states.optionValues = valueList;
  22026. }
  22027. return children;
  22028. };
  22029. }
  22030. });
  22031. //#endregion
  22032. //#region node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs
  22033. var COMPONENT_NAME$13 = "ElSelect";
  22034. var warnHandlerMap = /* @__PURE__ */ new WeakMap();
  22035. var createSelectWarnHandler = (appContext) => {
  22036. return (...args) => {
  22037. const message = args[0];
  22038. if (!message || message.includes("Slot \"default\" invoked outside of the render function") && args[2]?.includes("ElTreeSelect")) return;
  22039. const original = warnHandlerMap.get(appContext)?.originalWarnHandler;
  22040. if (original) {
  22041. original(...args);
  22042. return;
  22043. }
  22044. console.warn(...args);
  22045. };
  22046. };
  22047. var getWarnHandlerRecord = (appContext) => {
  22048. let record = warnHandlerMap.get(appContext);
  22049. if (!record) {
  22050. record = {
  22051. originalWarnHandler: appContext.config.warnHandler,
  22052. handler: createSelectWarnHandler(appContext),
  22053. count: 0
  22054. };
  22055. warnHandlerMap.set(appContext, record);
  22056. }
  22057. return record;
  22058. };
  22059. var select_vue_vue_type_script_lang_default$1 = defineComponent({
  22060. name: COMPONENT_NAME$13,
  22061. componentName: COMPONENT_NAME$13,
  22062. components: {
  22063. ElSelectMenu: select_dropdown_default$1,
  22064. ElOption: option_default,
  22065. ElOptions: options_default,
  22066. ElOptionGroup: option_group_default,
  22067. ElTag,
  22068. ElScrollbar,
  22069. ElTooltip,
  22070. ElIcon
  22071. },
  22072. directives: { ClickOutside },
  22073. props: selectProps,
  22074. emits: selectEmits,
  22075. setup(props, { emit, slots }) {
  22076. const instance = getCurrentInstance();
  22077. const warnRecord = getWarnHandlerRecord(instance.appContext);
  22078. warnRecord.count += 1;
  22079. instance.appContext.config.warnHandler = warnRecord.handler;
  22080. const modelValue = computed(() => {
  22081. const { modelValue: rawModelValue, multiple } = props;
  22082. const fallback = multiple ? [] : void 0;
  22083. if (isArray$1(rawModelValue)) return multiple ? rawModelValue : fallback;
  22084. return multiple ? fallback : rawModelValue;
  22085. });
  22086. const _props = reactive({
  22087. ...toRefs(props),
  22088. modelValue
  22089. });
  22090. const API = useSelect$2(_props, emit);
  22091. const { calculatorRef, inputStyle } = useCalcInputWidth();
  22092. const { getLabel, getValue, getOptions, getDisabled } = useProps(props);
  22093. const getOptionProps = (option) => ({
  22094. label: getLabel(option),
  22095. value: getValue(option),
  22096. disabled: getDisabled(option)
  22097. });
  22098. const flatTreeSelectData = (data) => {
  22099. return data.reduce((acc, item) => {
  22100. acc.push(item);
  22101. if (item.children && item.children.length > 0) acc.push(...flatTreeSelectData(item.children));
  22102. return acc;
  22103. }, []);
  22104. };
  22105. const manuallyRenderSlots = (vnodes) => {
  22106. flattedChildren(vnodes || []).forEach((item) => {
  22107. if (isObject$2(item) && (item.type.name === "ElOption" || item.type.name === "ElTree")) {
  22108. const _name = item.type.name;
  22109. if (_name === "ElTree") flatTreeSelectData(item.props?.data || []).forEach((treeItem) => {
  22110. treeItem.currentLabel = treeItem.label ?? (isObject$2(treeItem.value) ? "" : treeItem.value);
  22111. API.onOptionCreate(treeItem);
  22112. });
  22113. else if (_name === "ElOption") {
  22114. const obj = { ...item.props };
  22115. obj.currentLabel = obj.label ?? (isObject$2(obj.value) ? "" : obj.value);
  22116. API.onOptionCreate(obj);
  22117. }
  22118. }
  22119. });
  22120. };
  22121. watch(() => [props.persistent || API.expanded.value || !slots.default ? void 0 : slots.default?.(), modelValue.value], () => {
  22122. if (props.persistent || API.expanded.value) return;
  22123. if (!slots.default) return;
  22124. API.states.options.clear();
  22125. manuallyRenderSlots(slots.default?.());
  22126. }, { immediate: true });
  22127. provide(selectKey, reactive({
  22128. props: _props,
  22129. states: API.states,
  22130. selectRef: API.selectRef,
  22131. optionsArray: API.optionsArray,
  22132. setSelected: API.setSelected,
  22133. handleOptionSelect: API.handleOptionSelect,
  22134. onOptionCreate: API.onOptionCreate,
  22135. onOptionDestroy: API.onOptionDestroy
  22136. }));
  22137. const selectedLabel = computed(() => {
  22138. if (!props.multiple) return API.states.selectedLabel;
  22139. return API.states.selected.map((i) => i.currentLabel);
  22140. });
  22141. onBeforeUnmount(() => {
  22142. const record = warnHandlerMap.get(instance.appContext);
  22143. if (!record) return;
  22144. record.count -= 1;
  22145. if (record.count <= 0) {
  22146. instance.appContext.config.warnHandler = record.originalWarnHandler;
  22147. warnHandlerMap.delete(instance.appContext);
  22148. }
  22149. });
  22150. return {
  22151. ...API,
  22152. modelValue,
  22153. selectedLabel,
  22154. calculatorRef,
  22155. inputStyle,
  22156. getLabel,
  22157. getValue,
  22158. getOptions,
  22159. getDisabled,
  22160. getOptionProps
  22161. };
  22162. }
  22163. });
  22164. //#endregion
  22165. //#region node_modules/element-plus/es/components/select/src/select2.mjs
  22166. var _hoisted_1$67 = [
  22167. "id",
  22168. "value",
  22169. "name",
  22170. "disabled",
  22171. "autocomplete",
  22172. "tabindex",
  22173. "readonly",
  22174. "aria-activedescendant",
  22175. "aria-controls",
  22176. "aria-expanded",
  22177. "aria-label"
  22178. ];
  22179. var _hoisted_2$38 = ["textContent"];
  22180. var _hoisted_3$18 = { key: 1 };
  22181. function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
  22182. const _component_el_tag = resolveComponent("el-tag");
  22183. const _component_el_tooltip = resolveComponent("el-tooltip");
  22184. const _component_el_icon = resolveComponent("el-icon");
  22185. const _component_el_option = resolveComponent("el-option");
  22186. const _component_el_option_group = resolveComponent("el-option-group");
  22187. const _component_el_options = resolveComponent("el-options");
  22188. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  22189. const _component_el_select_menu = resolveComponent("el-select-menu");
  22190. const _directive_click_outside = resolveDirective("click-outside");
  22191. return withDirectives((openBlock(), createElementBlock("div", mergeProps({
  22192. ref: "selectRef",
  22193. class: [_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]
  22194. }, { [toHandlerKey(_ctx.mouseEnterEventName)]: _cache[11] || (_cache[11] = ($event) => _ctx.states.inputHovering = true) }, { onMouseleave: _cache[12] || (_cache[12] = ($event) => _ctx.states.inputHovering = false) }), [createVNode(_component_el_tooltip, {
  22195. ref: "tooltipRef",
  22196. visible: _ctx.dropdownMenuVisible,
  22197. placement: _ctx.placement,
  22198. teleported: _ctx.teleported,
  22199. "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
  22200. "popper-style": _ctx.popperStyle,
  22201. "popper-options": _ctx.popperOptions,
  22202. "fallback-placements": _ctx.fallbackPlacements,
  22203. effect: _ctx.effect,
  22204. pure: "",
  22205. trigger: "click",
  22206. transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
  22207. "stop-popper-mouse-event": false,
  22208. "gpu-acceleration": false,
  22209. persistent: _ctx.persistent,
  22210. "append-to": _ctx.appendTo,
  22211. "show-arrow": _ctx.showArrow,
  22212. offset: _ctx.offset,
  22213. onBeforeShow: _ctx.handleMenuEnter,
  22214. onHide: _cache[10] || (_cache[10] = ($event) => _ctx.states.isBeforeHide = false)
  22215. }, {
  22216. default: withCtx(() => [createBaseVNode("div", {
  22217. ref: "wrapperRef",
  22218. class: normalizeClass([
  22219. _ctx.nsSelect.e("wrapper"),
  22220. _ctx.nsSelect.is("focused", _ctx.isFocused),
  22221. _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
  22222. _ctx.nsSelect.is("filterable", _ctx.filterable),
  22223. _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
  22224. ]),
  22225. onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
  22226. }, [
  22227. _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
  22228. key: 0,
  22229. ref: "prefixRef",
  22230. class: normalizeClass(_ctx.nsSelect.e("prefix"))
  22231. }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
  22232. createBaseVNode("div", {
  22233. ref: "selectionRef",
  22234. class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length)])
  22235. }, [
  22236. _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
  22237. key: 0,
  22238. data: _ctx.states.selected,
  22239. deleteTag: _ctx.deleteTag,
  22240. selectDisabled: _ctx.selectDisabled
  22241. }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
  22242. return openBlock(), createElementBlock("div", {
  22243. key: _ctx.getValueKey(item),
  22244. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  22245. }, [createVNode(_component_el_tag, {
  22246. closable: !_ctx.selectDisabled && !item.isDisabled,
  22247. size: _ctx.collapseTagSize,
  22248. type: _ctx.tagType,
  22249. effect: _ctx.tagEffect,
  22250. "disable-transitions": "",
  22251. style: normalizeStyle(_ctx.tagStyle),
  22252. onClose: ($event) => _ctx.deleteTag($event, item)
  22253. }, {
  22254. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  22255. index: item.index,
  22256. label: item.currentLabel,
  22257. value: item.value
  22258. }, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
  22259. _: 2
  22260. }, 1032, [
  22261. "closable",
  22262. "size",
  22263. "type",
  22264. "effect",
  22265. "style",
  22266. "onClose"
  22267. ])], 2);
  22268. }), 128)), _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
  22269. key: 0,
  22270. ref: "tagTooltipRef",
  22271. disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
  22272. "fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
  22273. "bottom",
  22274. "top",
  22275. "right",
  22276. "left"
  22277. ],
  22278. effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
  22279. placement: _ctx.tagTooltip?.placement ?? "bottom",
  22280. "popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
  22281. "popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
  22282. teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
  22283. "append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
  22284. "popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
  22285. transition: _ctx.tagTooltip?.transition,
  22286. "show-after": _ctx.tagTooltip?.showAfter,
  22287. "hide-after": _ctx.tagTooltip?.hideAfter,
  22288. "auto-close": _ctx.tagTooltip?.autoClose,
  22289. offset: _ctx.tagTooltip?.offset
  22290. }, {
  22291. default: withCtx(() => [createBaseVNode("div", {
  22292. ref: "collapseItemRef",
  22293. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  22294. }, [createVNode(_component_el_tag, {
  22295. closable: false,
  22296. size: _ctx.collapseTagSize,
  22297. type: _ctx.tagType,
  22298. effect: _ctx.tagEffect,
  22299. "disable-transitions": "",
  22300. style: normalizeStyle(_ctx.collapseTagStyle)
  22301. }, {
  22302. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), 3)]),
  22303. _: 1
  22304. }, 8, [
  22305. "size",
  22306. "type",
  22307. "effect",
  22308. "style"
  22309. ])], 2)]),
  22310. content: withCtx(() => [createBaseVNode("div", {
  22311. ref: "tagMenuRef",
  22312. class: normalizeClass(_ctx.nsSelect.e("selection"))
  22313. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (item) => {
  22314. return openBlock(), createElementBlock("div", {
  22315. key: _ctx.getValueKey(item),
  22316. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  22317. }, [createVNode(_component_el_tag, {
  22318. class: "in-tooltip",
  22319. closable: !_ctx.selectDisabled && !item.isDisabled,
  22320. size: _ctx.collapseTagSize,
  22321. type: _ctx.tagType,
  22322. effect: _ctx.tagEffect,
  22323. "disable-transitions": "",
  22324. onClose: ($event) => _ctx.deleteTag($event, item)
  22325. }, {
  22326. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  22327. index: item.index,
  22328. label: item.currentLabel,
  22329. value: item.value
  22330. }, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
  22331. _: 2
  22332. }, 1032, [
  22333. "closable",
  22334. "size",
  22335. "type",
  22336. "effect",
  22337. "onClose"
  22338. ])], 2);
  22339. }), 128))], 2)]),
  22340. _: 3
  22341. }, 8, [
  22342. "disabled",
  22343. "fallback-placements",
  22344. "effect",
  22345. "placement",
  22346. "popper-class",
  22347. "popper-style",
  22348. "teleported",
  22349. "append-to",
  22350. "popper-options",
  22351. "transition",
  22352. "show-after",
  22353. "hide-after",
  22354. "auto-close",
  22355. "offset"
  22356. ])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
  22357. createBaseVNode("div", { class: normalizeClass([
  22358. _ctx.nsSelect.e("selected-item"),
  22359. _ctx.nsSelect.e("input-wrapper"),
  22360. _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
  22361. ]) }, [createBaseVNode("input", {
  22362. id: _ctx.inputId,
  22363. ref: "inputRef",
  22364. value: _ctx.states.inputValue,
  22365. type: "text",
  22366. name: _ctx.name,
  22367. class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
  22368. disabled: _ctx.selectDisabled,
  22369. autocomplete: _ctx.autocomplete,
  22370. style: normalizeStyle(_ctx.inputStyle),
  22371. tabindex: _ctx.tabindex,
  22372. role: "combobox",
  22373. readonly: !_ctx.filterable,
  22374. spellcheck: "false",
  22375. "aria-activedescendant": _ctx.hoverOption?.id || "",
  22376. "aria-controls": _ctx.contentId,
  22377. "aria-expanded": _ctx.dropdownMenuVisible,
  22378. "aria-label": _ctx.ariaLabel,
  22379. "aria-autocomplete": "none",
  22380. "aria-haspopup": "listbox",
  22381. onKeydown: _cache[0] || (_cache[0] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
  22382. onCompositionstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
  22383. onCompositionupdate: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
  22384. onCompositionend: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
  22385. onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
  22386. onChange: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
  22387. onClick: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
  22388. }, null, 46, _hoisted_1$67), _ctx.filterable ? (openBlock(), createElementBlock("span", {
  22389. key: 0,
  22390. ref: "calculatorRef",
  22391. "aria-hidden": "true",
  22392. class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
  22393. textContent: toDisplayString(_ctx.states.inputValue)
  22394. }, null, 10, _hoisted_2$38)) : createCommentVNode("v-if", true)], 2),
  22395. _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
  22396. key: 1,
  22397. class: normalizeClass([
  22398. _ctx.nsSelect.e("selected-item"),
  22399. _ctx.nsSelect.e("placeholder"),
  22400. _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
  22401. ])
  22402. }, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
  22403. key: 0,
  22404. index: _ctx.getOption(_ctx.modelValue).index,
  22405. label: _ctx.currentPlaceholder,
  22406. value: _ctx.modelValue
  22407. }, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3$18, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
  22408. ], 2),
  22409. createBaseVNode("div", {
  22410. ref: "suffixRef",
  22411. class: normalizeClass(_ctx.nsSelect.e("suffix"))
  22412. }, [
  22413. _ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, {
  22414. key: 0,
  22415. class: normalizeClass([
  22416. _ctx.nsSelect.e("caret"),
  22417. _ctx.nsSelect.e("icon"),
  22418. _ctx.iconReverse
  22419. ])
  22420. }, {
  22421. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  22422. _: 1
  22423. }, 8, ["class"])) : createCommentVNode("v-if", true),
  22424. _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
  22425. key: 1,
  22426. class: normalizeClass([
  22427. _ctx.nsSelect.e("caret"),
  22428. _ctx.nsSelect.e("icon"),
  22429. _ctx.nsSelect.e("clear")
  22430. ]),
  22431. onClick: _ctx.handleClearClick
  22432. }, {
  22433. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  22434. _: 1
  22435. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  22436. _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
  22437. key: 2,
  22438. class: normalizeClass([
  22439. _ctx.nsInput.e("icon"),
  22440. _ctx.nsInput.e("validateIcon"),
  22441. _ctx.nsInput.is("loading", _ctx.validateState === "validating")
  22442. ])
  22443. }, {
  22444. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
  22445. _: 1
  22446. }, 8, ["class"])) : createCommentVNode("v-if", true)
  22447. ], 2)
  22448. ], 2)]),
  22449. content: withCtx(() => [createVNode(_component_el_select_menu, { ref: "menuRef" }, {
  22450. default: withCtx(() => [
  22451. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  22452. key: 0,
  22453. class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
  22454. onClick: _cache[8] || (_cache[8] = withModifiers(() => {}, ["stop"]))
  22455. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  22456. withDirectives(createVNode(_component_el_scrollbar, {
  22457. id: _ctx.contentId,
  22458. ref: "scrollbarRef",
  22459. tag: "ul",
  22460. "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
  22461. "view-class": _ctx.nsSelect.be("dropdown", "list"),
  22462. class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
  22463. role: "listbox",
  22464. "aria-label": _ctx.ariaLabel,
  22465. "aria-orientation": "vertical",
  22466. onScroll: _ctx.popupScroll,
  22467. onEndReached: _ctx.endReached
  22468. }, {
  22469. default: withCtx(() => [_ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
  22470. key: 0,
  22471. value: _ctx.states.inputValue,
  22472. created: true
  22473. }, null, 8, ["value"])) : createCommentVNode("v-if", true), createVNode(_component_el_options, null, {
  22474. default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
  22475. return openBlock(), createElementBlock(Fragment, { key: index }, [_ctx.getOptions(option)?.length ? (openBlock(), createBlock(_component_el_option_group, {
  22476. key: 0,
  22477. label: _ctx.getLabel(option),
  22478. disabled: _ctx.getDisabled(option)
  22479. }, {
  22480. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getOptions(option), (item) => {
  22481. return openBlock(), createBlock(_component_el_option, mergeProps({ key: _ctx.getValue(item) }, { ref_for: true }, _ctx.getOptionProps(item)), null, 16);
  22482. }), 128))]),
  22483. _: 2
  22484. }, 1032, ["label", "disabled"])) : (openBlock(), createBlock(_component_el_option, mergeProps({
  22485. key: 1,
  22486. ref_for: true
  22487. }, _ctx.getOptionProps(option)), null, 16))], 64);
  22488. }), 128))])]),
  22489. _: 3
  22490. })]),
  22491. _: 3
  22492. }, 8, [
  22493. "id",
  22494. "wrap-class",
  22495. "view-class",
  22496. "class",
  22497. "aria-label",
  22498. "onScroll",
  22499. "onEndReached"
  22500. ]), [[vShow, _ctx.states.options.size > 0 && !_ctx.loading]]),
  22501. _ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock("div", {
  22502. key: 1,
  22503. class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
  22504. }, [renderSlot(_ctx.$slots, "loading")], 2)) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
  22505. key: 2,
  22506. class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
  22507. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)) : createCommentVNode("v-if", true),
  22508. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  22509. key: 3,
  22510. class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
  22511. onClick: _cache[9] || (_cache[9] = withModifiers(() => {}, ["stop"]))
  22512. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  22513. ]),
  22514. _: 3
  22515. }, 512)]),
  22516. _: 3
  22517. }, 8, [
  22518. "visible",
  22519. "placement",
  22520. "teleported",
  22521. "popper-class",
  22522. "popper-style",
  22523. "popper-options",
  22524. "fallback-placements",
  22525. "effect",
  22526. "transition",
  22527. "persistent",
  22528. "append-to",
  22529. "show-arrow",
  22530. "offset",
  22531. "onBeforeShow"
  22532. ])], 16)), [[
  22533. _directive_click_outside,
  22534. _ctx.handleClickOutside,
  22535. _ctx.popperRef
  22536. ]]);
  22537. }
  22538. //#endregion
  22539. //#region node_modules/element-plus/es/components/select/index.mjs
  22540. var ElSelect = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default$1, [["render", _sfc_render$16]]), {
  22541. Option: option_default,
  22542. OptionGroup: option_group_default
  22543. });
  22544. var ElOption = withNoopInstall(option_default);
  22545. var ElOptionGroup = withNoopInstall(option_group_default);
  22546. //#endregion
  22547. //#region node_modules/element-plus/es/components/calendar/src/date-table.mjs
  22548. var getPrevMonthLastDays = (date, count) => {
  22549. const lastDay = date.subtract(1, "month").endOf("month").date();
  22550. return rangeArr(count).map((_, index) => lastDay - (count - index - 1));
  22551. };
  22552. var getMonthDays = (date) => {
  22553. return rangeArr(date.daysInMonth()).map((_, index) => index + 1);
  22554. };
  22555. var toNestedArr = (days) => rangeArr(days.length / 7).map((index) => {
  22556. const start = index * 7;
  22557. return days.slice(start, start + 7);
  22558. });
  22559. /**
  22560. * @deprecated Removed after 3.0.0, Use `DateTableProps` instead.
  22561. */
  22562. var dateTableProps = buildProps({
  22563. selectedDay: { type: definePropType(Object) },
  22564. range: { type: definePropType(Array) },
  22565. date: {
  22566. type: definePropType(Object),
  22567. required: true
  22568. },
  22569. hideHeader: { type: Boolean }
  22570. });
  22571. var dateTableEmits = { pick: (value) => isObject$2(value) };
  22572. //#endregion
  22573. //#region node_modules/element-plus/es/components/calendar/src/use-date-table.mjs
  22574. var import_localeData = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
  22575. (function(n, e) {
  22576. "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e();
  22577. })(exports, (function() {
  22578. "use strict";
  22579. return function(n, e, t) {
  22580. var r = e.prototype, o = function(n) {
  22581. return n && (n.indexOf ? n : n.s);
  22582. }, u = function(n, e, t, r, u) {
  22583. var i = n.name ? n : n.$locale(), a = o(i[e]), s = o(i[t]), f = a || s.map((function(n) {
  22584. return n.slice(0, r);
  22585. }));
  22586. if (!u) return f;
  22587. var d = i.weekStart;
  22588. return f.map((function(n, e) {
  22589. return f[(e + (d || 0)) % 7];
  22590. }));
  22591. }, i = function() {
  22592. return t.Ls[t.locale()];
  22593. }, a = function(n, e) {
  22594. return n.formats[e] || function(n) {
  22595. return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(n, e, t) {
  22596. return e || t.slice(1);
  22597. }));
  22598. }(n.formats[e.toUpperCase()]);
  22599. }, s = function() {
  22600. var n = this;
  22601. return {
  22602. months: function(e) {
  22603. return e ? e.format("MMMM") : u(n, "months");
  22604. },
  22605. monthsShort: function(e) {
  22606. return e ? e.format("MMM") : u(n, "monthsShort", "months", 3);
  22607. },
  22608. firstDayOfWeek: function() {
  22609. return n.$locale().weekStart || 0;
  22610. },
  22611. weekdays: function(e) {
  22612. return e ? e.format("dddd") : u(n, "weekdays");
  22613. },
  22614. weekdaysMin: function(e) {
  22615. return e ? e.format("dd") : u(n, "weekdaysMin", "weekdays", 2);
  22616. },
  22617. weekdaysShort: function(e) {
  22618. return e ? e.format("ddd") : u(n, "weekdaysShort", "weekdays", 3);
  22619. },
  22620. longDateFormat: function(e) {
  22621. return a(n.$locale(), e);
  22622. },
  22623. meridiem: this.$locale().meridiem,
  22624. ordinal: this.$locale().ordinal
  22625. };
  22626. };
  22627. r.localeData = function() {
  22628. return s.bind(this)();
  22629. }, t.localeData = function() {
  22630. var n = i();
  22631. return {
  22632. firstDayOfWeek: function() {
  22633. return n.weekStart || 0;
  22634. },
  22635. weekdays: function() {
  22636. return t.weekdays();
  22637. },
  22638. weekdaysShort: function() {
  22639. return t.weekdaysShort();
  22640. },
  22641. weekdaysMin: function() {
  22642. return t.weekdaysMin();
  22643. },
  22644. months: function() {
  22645. return t.months();
  22646. },
  22647. monthsShort: function() {
  22648. return t.monthsShort();
  22649. },
  22650. longDateFormat: function(e) {
  22651. return a(n, e);
  22652. },
  22653. meridiem: n.meridiem,
  22654. ordinal: n.ordinal
  22655. };
  22656. }, t.months = function() {
  22657. return u(i(), "months");
  22658. }, t.monthsShort = function() {
  22659. return u(i(), "monthsShort", "months", 3);
  22660. }, t.weekdays = function(n) {
  22661. return u(i(), "weekdays", null, null, n);
  22662. }, t.weekdaysShort = function(n) {
  22663. return u(i(), "weekdaysShort", "weekdays", 3, n);
  22664. }, t.weekdaysMin = function(n) {
  22665. return u(i(), "weekdaysMin", "weekdays", 2, n);
  22666. };
  22667. };
  22668. }));
  22669. })))(), 1);
  22670. var useDateTable = (props, emit) => {
  22671. import_dayjs_min.default.extend(import_localeData.default);
  22672. const firstDayOfWeek = import_dayjs_min.default.localeData().firstDayOfWeek();
  22673. const { t, lang } = useLocale();
  22674. const now = (0, import_dayjs_min.default)().locale(lang.value);
  22675. const isInRange = computed(() => !!props.range && !!props.range.length);
  22676. const rows = computed(() => {
  22677. let days = [];
  22678. if (isInRange.value) {
  22679. const [start, end] = props.range;
  22680. const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((index) => ({
  22681. text: start.date() + index,
  22682. type: "current"
  22683. }));
  22684. let remaining = currentMonthRange.length % 7;
  22685. remaining = remaining === 0 ? 0 : 7 - remaining;
  22686. const nextMonthRange = rangeArr(remaining).map((_, index) => ({
  22687. text: index + 1,
  22688. type: "next"
  22689. }));
  22690. days = currentMonthRange.concat(nextMonthRange);
  22691. } else {
  22692. const firstDay = props.date.startOf("month").day();
  22693. const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
  22694. text: day,
  22695. type: "prev"
  22696. }));
  22697. const currentMonthDays = getMonthDays(props.date).map((day) => ({
  22698. text: day,
  22699. type: "current"
  22700. }));
  22701. days = [...prevMonthDays, ...currentMonthDays];
  22702. const nextMonthDays = rangeArr(7 - (days.length % 7 || 7)).map((_, index) => ({
  22703. text: index + 1,
  22704. type: "next"
  22705. }));
  22706. days = days.concat(nextMonthDays);
  22707. }
  22708. return toNestedArr(days);
  22709. });
  22710. const weekDays = computed(() => {
  22711. const start = firstDayOfWeek;
  22712. if (start === 0) return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`));
  22713. else return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_) => t(`el.datepicker.weeks.${_}`));
  22714. });
  22715. const getFormattedDate = (day, type) => {
  22716. switch (type) {
  22717. case "prev": return props.date.startOf("month").subtract(1, "month").date(day);
  22718. case "next": return props.date.startOf("month").add(1, "month").date(day);
  22719. case "current": return props.date.date(day);
  22720. }
  22721. };
  22722. const handlePickDay = ({ text, type }) => {
  22723. emit("pick", getFormattedDate(text, type));
  22724. };
  22725. const getSlotData = ({ text, type }) => {
  22726. const day = getFormattedDate(text, type);
  22727. return {
  22728. isSelected: day.isSame(props.selectedDay),
  22729. type: `${type}-month`,
  22730. day: day.format(DEFAULT_FORMATS_DATE),
  22731. date: day.toDate()
  22732. };
  22733. };
  22734. return {
  22735. now,
  22736. isInRange,
  22737. rows,
  22738. weekDays,
  22739. getFormattedDate,
  22740. handlePickDay,
  22741. getSlotData
  22742. };
  22743. };
  22744. //#endregion
  22745. //#region node_modules/element-plus/es/components/calendar/src/date-table.vue_vue_type_script_setup_true_lang.mjs
  22746. var _hoisted_1$66 = { key: 0 };
  22747. var _hoisted_2$37 = ["onClick"];
  22748. //#endregion
  22749. //#region node_modules/element-plus/es/components/calendar/src/date-table2.mjs
  22750. var date_table_default = /* @__PURE__ */ defineComponent({
  22751. name: "DateTable",
  22752. __name: "date-table",
  22753. props: dateTableProps,
  22754. emits: dateTableEmits,
  22755. setup(__props, { expose: __expose, emit: __emit }) {
  22756. const props = __props;
  22757. const { isInRange, now, rows, weekDays, getFormattedDate, handlePickDay, getSlotData } = useDateTable(props, __emit);
  22758. const nsTable = useNamespace("calendar-table");
  22759. const nsDay = useNamespace("calendar-day");
  22760. const getCellClass = ({ text, type }) => {
  22761. const classes = [type];
  22762. if (type === "current") {
  22763. const date = getFormattedDate(text, type);
  22764. if (date.isSame(props.selectedDay, "day")) classes.push(nsDay.is("selected"));
  22765. if (date.isSame(now, "day")) classes.push(nsDay.is("today"));
  22766. }
  22767. return classes;
  22768. };
  22769. __expose({
  22770. /** @description toggle date panel */
  22771. getFormattedDate });
  22772. return (_ctx, _cache) => {
  22773. return openBlock(), createElementBlock("table", {
  22774. class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]),
  22775. cellspacing: "0",
  22776. cellpadding: "0"
  22777. }, [!__props.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_1$66, [createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
  22778. return openBlock(), createElementBlock("th", {
  22779. key: day,
  22780. scope: "col"
  22781. }, toDisplayString(day), 1);
  22782. }), 128))])])) : createCommentVNode("v-if", true), createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, index) => {
  22783. return openBlock(), createElementBlock("tr", {
  22784. key: index,
  22785. class: normalizeClass({
  22786. [unref(nsTable).e("row")]: true,
  22787. [unref(nsTable).em("row", "hide-border")]: index === 0 && __props.hideHeader
  22788. })
  22789. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key) => {
  22790. return openBlock(), createElementBlock("td", {
  22791. key,
  22792. class: normalizeClass(getCellClass(cell)),
  22793. onClick: ($event) => unref(handlePickDay)(cell)
  22794. }, [createBaseVNode("div", { class: normalizeClass(unref(nsDay).b()) }, [renderSlot(_ctx.$slots, "date-cell", { data: unref(getSlotData)(cell) }, () => [createBaseVNode("span", null, toDisplayString(cell.text), 1)])], 2)], 10, _hoisted_2$37);
  22795. }), 128))], 2);
  22796. }), 128))])], 2);
  22797. };
  22798. }
  22799. });
  22800. //#endregion
  22801. //#region node_modules/element-plus/es/components/calendar/src/use-calendar.mjs
  22802. var adjacentMonth = (start, end) => {
  22803. const firstMonthLastDay = start.endOf("month");
  22804. const lastMonthFirstDay = end.startOf("month");
  22805. const lastMonthStartDay = firstMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
  22806. return [[start, firstMonthLastDay], [lastMonthStartDay.startOf("week"), end]];
  22807. };
  22808. var threeConsecutiveMonth = (start, end) => {
  22809. const firstMonthLastDay = start.endOf("month");
  22810. const secondMonthFirstDay = start.add(1, "month").startOf("month");
  22811. const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
  22812. const secondMonthLastDay = secondMonthStartDay.endOf("month");
  22813. const lastMonthFirstDay = end.startOf("month");
  22814. const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
  22815. return [
  22816. [start, firstMonthLastDay],
  22817. [secondMonthStartDay.startOf("week"), secondMonthLastDay],
  22818. [lastMonthStartDay.startOf("week"), end]
  22819. ];
  22820. };
  22821. var useCalendar = (props, emit, componentName) => {
  22822. const { lang } = useLocale();
  22823. const selectedDay = ref();
  22824. const now = (0, import_dayjs_min.default)().locale(lang.value);
  22825. const realSelectedDay = computed({
  22826. get() {
  22827. if (!props.modelValue) return selectedDay.value;
  22828. return date.value;
  22829. },
  22830. set(val) {
  22831. if (!val) return;
  22832. selectedDay.value = val;
  22833. const result = val.toDate();
  22834. emit(INPUT_EVENT, result);
  22835. emit(UPDATE_MODEL_EVENT, result);
  22836. }
  22837. });
  22838. const validatedRange = computed(() => {
  22839. if (!props.range || !isArray$1(props.range) || props.range.length !== 2 || props.range.some((item) => !isDate(item))) return [];
  22840. const [startDayjs, endDayjs] = props.range.map((_) => (0, import_dayjs_min.default)(_).locale(lang.value));
  22841. if (startDayjs.isAfter(endDayjs)) {
  22842. debugWarn(componentName, "end time should be greater than start time");
  22843. return [];
  22844. }
  22845. if (startDayjs.isSame(endDayjs, "month")) return calculateValidatedDateRange(startDayjs, endDayjs);
  22846. else {
  22847. if (startDayjs.add(1, "month").month() !== endDayjs.month()) {
  22848. debugWarn(componentName, "start time and end time interval must not exceed two months");
  22849. return [];
  22850. }
  22851. return calculateValidatedDateRange(startDayjs, endDayjs);
  22852. }
  22853. });
  22854. const date = computed(() => {
  22855. if (!props.modelValue) return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
  22856. else return (0, import_dayjs_min.default)(props.modelValue).locale(lang.value);
  22857. });
  22858. const prevMonthDayjs = computed(() => date.value.subtract(1, "month").date(1));
  22859. const nextMonthDayjs = computed(() => date.value.add(1, "month").date(1));
  22860. const prevYearDayjs = computed(() => date.value.subtract(1, "year").date(1));
  22861. const nextYearDayjs = computed(() => date.value.add(1, "year").date(1));
  22862. const calculateValidatedDateRange = (startDayjs, endDayjs) => {
  22863. const firstDay = startDayjs.startOf("week");
  22864. const lastDay = endDayjs.endOf("week");
  22865. const firstMonth = firstDay.get("month");
  22866. const lastMonth = lastDay.get("month");
  22867. if (firstMonth === lastMonth) return [[firstDay, lastDay]];
  22868. else if ((firstMonth + 1) % 12 === lastMonth) return adjacentMonth(firstDay, lastDay);
  22869. else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) return threeConsecutiveMonth(firstDay, lastDay);
  22870. else {
  22871. debugWarn(componentName, "start time and end time interval must not exceed two months");
  22872. return [];
  22873. }
  22874. };
  22875. const pickDay = (day) => {
  22876. realSelectedDay.value = day;
  22877. };
  22878. const selectDate = (type) => {
  22879. const day = {
  22880. "prev-month": prevMonthDayjs.value,
  22881. "next-month": nextMonthDayjs.value,
  22882. "prev-year": prevYearDayjs.value,
  22883. "next-year": nextYearDayjs.value,
  22884. today: now
  22885. }[type];
  22886. if (!day.isSame(date.value, "day")) pickDay(day);
  22887. };
  22888. const handleDateChange = (date) => {
  22889. if (date === "today") selectDate("today");
  22890. else pickDay(date);
  22891. };
  22892. return {
  22893. calculateValidatedDateRange,
  22894. date,
  22895. realSelectedDay,
  22896. pickDay,
  22897. selectDate,
  22898. validatedRange,
  22899. handleDateChange
  22900. };
  22901. };
  22902. //#endregion
  22903. //#region node_modules/element-plus/es/components/calendar/src/select-controller2.mjs
  22904. var select_controller_default = /* @__PURE__ */ defineComponent({
  22905. name: "SelectController",
  22906. __name: "select-controller",
  22907. props: buildProps({
  22908. date: {
  22909. type: definePropType(Object),
  22910. required: true
  22911. },
  22912. formatter: { type: definePropType(Function) }
  22913. }),
  22914. emits: { "date-change": (date) => isObject$2(date) || isString(date) },
  22915. setup(__props, { emit: __emit }) {
  22916. const props = __props;
  22917. const emit = __emit;
  22918. const nsSelect = useNamespace("calendar-select");
  22919. const { t, lang } = useLocale();
  22920. const monthOptions = Array.from({ length: 12 }, (_, index) => {
  22921. const actualMonth = index + 1;
  22922. return {
  22923. value: actualMonth,
  22924. label: isFunction$1(props.formatter) ? props.formatter(actualMonth, "month") : actualMonth
  22925. };
  22926. });
  22927. const yearValue = computed(() => props.date.year());
  22928. const monthValue = computed(() => props.date.month() + 1);
  22929. const yearOptions = computed(() => {
  22930. const years = [];
  22931. for (let i = -10; i < 10; i++) {
  22932. const year = yearValue.value + i;
  22933. if (year > 0) {
  22934. const label = isFunction$1(props.formatter) ? props.formatter(year, "year") : year;
  22935. years.push({
  22936. value: year,
  22937. label
  22938. });
  22939. }
  22940. }
  22941. return years;
  22942. });
  22943. const handleYearChange = (year) => {
  22944. emit("date-change", (0, import_dayjs_min.default)(new Date(year, monthValue.value - 1, 1)).locale(lang.value));
  22945. };
  22946. const handleMonthChange = (month) => {
  22947. emit("date-change", (0, import_dayjs_min.default)(new Date(yearValue.value, month - 1, 1)).locale(lang.value));
  22948. };
  22949. const selectToday = () => {
  22950. emit("date-change", "today");
  22951. };
  22952. return (_ctx, _cache) => {
  22953. return openBlock(), createElementBlock(Fragment, null, [
  22954. createVNode(unref(ElSelect), {
  22955. "model-value": yearValue.value,
  22956. size: "small",
  22957. class: normalizeClass(unref(nsSelect).e("year")),
  22958. "validate-event": false,
  22959. options: yearOptions.value,
  22960. onChange: handleYearChange
  22961. }, null, 8, [
  22962. "model-value",
  22963. "class",
  22964. "options"
  22965. ]),
  22966. createVNode(unref(ElSelect), {
  22967. "model-value": monthValue.value,
  22968. size: "small",
  22969. class: normalizeClass(unref(nsSelect).e("month")),
  22970. "validate-event": false,
  22971. options: unref(monthOptions),
  22972. onChange: handleMonthChange
  22973. }, null, 8, [
  22974. "model-value",
  22975. "class",
  22976. "options"
  22977. ]),
  22978. createVNode(unref(ElButton), {
  22979. size: "small",
  22980. onClick: selectToday
  22981. }, {
  22982. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)]),
  22983. _: 1
  22984. })
  22985. ], 64);
  22986. };
  22987. }
  22988. });
  22989. //#endregion
  22990. //#region node_modules/element-plus/es/components/calendar/src/calendar.vue_vue_type_script_setup_true_lang.mjs
  22991. var COMPONENT_NAME$12 = "ElCalendar";
  22992. //#endregion
  22993. //#region node_modules/element-plus/es/components/calendar/index.mjs
  22994. var ElCalendar = withInstall(/* @__PURE__ */ defineComponent({
  22995. name: COMPONENT_NAME$12,
  22996. __name: "calendar",
  22997. props: calendarProps,
  22998. emits: calendarEmits,
  22999. setup(__props, { expose: __expose, emit: __emit }) {
  23000. const ns = useNamespace("calendar");
  23001. const { calculateValidatedDateRange, date, pickDay, realSelectedDay, selectDate, validatedRange, handleDateChange } = useCalendar(__props, __emit, COMPONENT_NAME$12);
  23002. const { t } = useLocale();
  23003. const i18nDate = computed(() => {
  23004. const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
  23005. return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
  23006. });
  23007. __expose({
  23008. /** @description currently selected date */
  23009. selectedDay: realSelectedDay,
  23010. /** @description select a specific date */
  23011. pickDay,
  23012. /** @description select date */
  23013. selectDate,
  23014. /** @description Calculate the validate date range according to the start and end dates */
  23015. calculateValidatedDateRange
  23016. });
  23017. return (_ctx, _cache) => {
  23018. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("header")) }, [renderSlot(_ctx.$slots, "header", { date: i18nDate.value }, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, toDisplayString(i18nDate.value), 3), unref(validatedRange).length === 0 && __props.controllerType === "button" ? (openBlock(), createElementBlock("div", {
  23019. key: 0,
  23020. class: normalizeClass(unref(ns).e("button-group"))
  23021. }, [createVNode(unref(ElButtonGroup), null, {
  23022. default: withCtx(() => [
  23023. createVNode(unref(ElButton), {
  23024. size: "small",
  23025. onClick: _cache[0] || (_cache[0] = ($event) => unref(selectDate)("prev-month"))
  23026. }, {
  23027. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)]),
  23028. _: 1
  23029. }),
  23030. createVNode(unref(ElButton), {
  23031. size: "small",
  23032. onClick: _cache[1] || (_cache[1] = ($event) => unref(selectDate)("today"))
  23033. }, {
  23034. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)]),
  23035. _: 1
  23036. }),
  23037. createVNode(unref(ElButton), {
  23038. size: "small",
  23039. onClick: _cache[2] || (_cache[2] = ($event) => unref(selectDate)("next-month"))
  23040. }, {
  23041. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)]),
  23042. _: 1
  23043. })
  23044. ]),
  23045. _: 1
  23046. })], 2)) : unref(validatedRange).length === 0 && __props.controllerType === "select" ? (openBlock(), createElementBlock("div", {
  23047. key: 1,
  23048. class: normalizeClass(unref(ns).e("select-controller"))
  23049. }, [createVNode(select_controller_default, {
  23050. date: unref(date),
  23051. formatter: __props.formatter,
  23052. onDateChange: unref(handleDateChange)
  23053. }, null, 8, [
  23054. "date",
  23055. "formatter",
  23056. "onDateChange"
  23057. ])], 2)) : createCommentVNode("v-if", true)])], 2), unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
  23058. key: 0,
  23059. class: normalizeClass(unref(ns).e("body"))
  23060. }, [createVNode(date_table_default, {
  23061. date: unref(date),
  23062. "selected-day": unref(realSelectedDay),
  23063. onPick: unref(pickDay)
  23064. }, createSlots({ _: 2 }, [_ctx.$slots["date-cell"] ? {
  23065. name: "date-cell",
  23066. fn: withCtx((data) => [renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))]),
  23067. key: "0"
  23068. } : void 0]), 1032, [
  23069. "date",
  23070. "selected-day",
  23071. "onPick"
  23072. ])], 2)) : (openBlock(), createElementBlock("div", {
  23073. key: 1,
  23074. class: normalizeClass(unref(ns).e("body"))
  23075. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
  23076. return openBlock(), createBlock(date_table_default, {
  23077. key: index,
  23078. date: range_[0],
  23079. "selected-day": unref(realSelectedDay),
  23080. range: range_,
  23081. "hide-header": index !== 0,
  23082. onPick: unref(pickDay)
  23083. }, createSlots({ _: 2 }, [_ctx.$slots["date-cell"] ? {
  23084. name: "date-cell",
  23085. fn: withCtx((data) => [renderSlot(_ctx.$slots, "date-cell", mergeProps({ ref_for: true }, data))]),
  23086. key: "0"
  23087. } : void 0]), 1032, [
  23088. "date",
  23089. "selected-day",
  23090. "range",
  23091. "hide-header",
  23092. "onPick"
  23093. ]);
  23094. }), 128))], 2))], 2);
  23095. };
  23096. }
  23097. }));
  23098. //#endregion
  23099. //#region node_modules/element-plus/es/components/card/src/card.mjs
  23100. /**
  23101. * @deprecated Removed after 3.0.0, Use `CardProps` instead.
  23102. */
  23103. var cardProps = buildProps({
  23104. /**
  23105. * @description title of the card. Also accepts a DOM passed by `slot#header`
  23106. */
  23107. header: {
  23108. type: String,
  23109. default: ""
  23110. },
  23111. /**
  23112. * @description content of footer. Also accepts a DOM passed by `slot#footer`
  23113. */
  23114. footer: {
  23115. type: String,
  23116. default: ""
  23117. },
  23118. /**
  23119. * @description CSS style of card body
  23120. */
  23121. bodyStyle: {
  23122. type: definePropType([
  23123. String,
  23124. Object,
  23125. Array,
  23126. Boolean
  23127. ]),
  23128. default: ""
  23129. },
  23130. /**
  23131. * @description custom class name of card footer
  23132. */
  23133. headerClass: String,
  23134. /**
  23135. * @description custom class name of card body
  23136. */
  23137. bodyClass: String,
  23138. /**
  23139. * @description custom class name of card footer
  23140. */
  23141. footerClass: String,
  23142. /**
  23143. * @description when to show card shadows
  23144. */
  23145. shadow: {
  23146. type: String,
  23147. values: [
  23148. "always",
  23149. "hover",
  23150. "never"
  23151. ],
  23152. default: void 0
  23153. }
  23154. });
  23155. var cardContextKey = Symbol("cardContextKey");
  23156. //#endregion
  23157. //#region node_modules/element-plus/es/components/card/index.mjs
  23158. var ElCard = withInstall(/* @__PURE__ */ defineComponent({
  23159. name: "ElCard",
  23160. __name: "card",
  23161. props: cardProps,
  23162. setup(__props) {
  23163. const globalConfig = useGlobalConfig("card");
  23164. const ns = useNamespace("card");
  23165. return (_ctx, _cache) => {
  23166. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).is(`${__props.shadow || unref(globalConfig)?.shadow || "always"}-shadow`)]) }, [
  23167. _ctx.$slots.header || __props.header ? (openBlock(), createElementBlock("div", {
  23168. key: 0,
  23169. class: normalizeClass([unref(ns).e("header"), __props.headerClass])
  23170. }, [renderSlot(_ctx.$slots, "header", {}, () => [createTextVNode(toDisplayString(__props.header), 1)])], 2)) : createCommentVNode("v-if", true),
  23171. createBaseVNode("div", {
  23172. class: normalizeClass([unref(ns).e("body"), __props.bodyClass]),
  23173. style: normalizeStyle(__props.bodyStyle)
  23174. }, [renderSlot(_ctx.$slots, "default")], 6),
  23175. _ctx.$slots.footer || __props.footer ? (openBlock(), createElementBlock("div", {
  23176. key: 1,
  23177. class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
  23178. }, [renderSlot(_ctx.$slots, "footer", {}, () => [createTextVNode(toDisplayString(__props.footer), 1)])], 2)) : createCommentVNode("v-if", true)
  23179. ], 2);
  23180. };
  23181. }
  23182. }));
  23183. //#endregion
  23184. //#region node_modules/element-plus/es/components/carousel/src/carousel.mjs
  23185. /**
  23186. * @deprecated Removed after 3.0.0, Use `CarouselProps` instead.
  23187. */
  23188. var carouselProps = buildProps({
  23189. /**
  23190. * @description index of the initially active slide (starting from 0)
  23191. */
  23192. initialIndex: {
  23193. type: Number,
  23194. default: 0
  23195. },
  23196. /**
  23197. * @description height of the carousel
  23198. */
  23199. height: {
  23200. type: String,
  23201. default: ""
  23202. },
  23203. /**
  23204. * @description how indicators are triggered
  23205. */
  23206. trigger: {
  23207. type: String,
  23208. values: ["hover", "click"],
  23209. default: "hover"
  23210. },
  23211. /**
  23212. * @description whether automatically loop the slides
  23213. */
  23214. autoplay: {
  23215. type: Boolean,
  23216. default: true
  23217. },
  23218. /**
  23219. * @description interval of the auto loop, in milliseconds
  23220. */
  23221. interval: {
  23222. type: Number,
  23223. default: 3e3
  23224. },
  23225. /**
  23226. * @description position of the indicators
  23227. */
  23228. indicatorPosition: {
  23229. type: String,
  23230. values: [
  23231. "",
  23232. "none",
  23233. "outside"
  23234. ],
  23235. default: ""
  23236. },
  23237. /**
  23238. * @description when arrows are shown
  23239. */
  23240. arrow: {
  23241. type: String,
  23242. values: [
  23243. "always",
  23244. "hover",
  23245. "never"
  23246. ],
  23247. default: "hover"
  23248. },
  23249. /**
  23250. * @description type of the Carousel
  23251. */
  23252. type: {
  23253. type: String,
  23254. values: ["", "card"],
  23255. default: ""
  23256. },
  23257. /**
  23258. * @description when type is card, scaled size of secondary cards
  23259. */
  23260. cardScale: {
  23261. type: Number,
  23262. default: .83
  23263. },
  23264. /**
  23265. * @description display the items in loop
  23266. */
  23267. loop: {
  23268. type: Boolean,
  23269. default: true
  23270. },
  23271. /**
  23272. * @description display direction
  23273. */
  23274. direction: {
  23275. type: String,
  23276. values: ["horizontal", "vertical"],
  23277. default: "horizontal"
  23278. },
  23279. /**
  23280. * @description pause autoplay when hover
  23281. */
  23282. pauseOnHover: {
  23283. type: Boolean,
  23284. default: true
  23285. },
  23286. /**
  23287. * @description infuse dynamism and smoothness into the carousel
  23288. */
  23289. motionBlur: Boolean
  23290. });
  23291. var carouselEmits = {
  23292. /**
  23293. * @description triggers when the active slide switches
  23294. * @param current index of the new active slide
  23295. * @param prev index of the old active slide
  23296. */
  23297. change: (current, prev) => [current, prev].every(isNumber) };
  23298. //#endregion
  23299. //#region node_modules/element-plus/es/components/carousel/src/constants.mjs
  23300. var carouselContextKey = Symbol("carouselContextKey");
  23301. var CAROUSEL_ITEM_NAME = "ElCarouselItem";
  23302. //#endregion
  23303. //#region node_modules/element-plus/es/components/carousel/src/carousel-item.mjs
  23304. /**
  23305. * @deprecated Removed after 3.0.0, Use `CarouselItemProps` instead.
  23306. */
  23307. var carouselItemProps = buildProps({
  23308. /**
  23309. * @description name of the item, can be used in `setActiveItem`
  23310. */
  23311. name: {
  23312. type: String,
  23313. default: ""
  23314. },
  23315. /**
  23316. * @description text content for the corresponding indicator
  23317. */
  23318. label: {
  23319. type: [String, Number],
  23320. default: ""
  23321. }
  23322. });
  23323. //#endregion
  23324. //#region node_modules/element-plus/es/components/carousel/src/use-carousel.mjs
  23325. var THROTTLE_TIME = 300;
  23326. var useCarousel = (props, emit, componentName) => {
  23327. const { children: items, addChild: addItem, removeChild: removeItem, ChildrenSorter: ItemsSorter } = useOrderedChildren(getCurrentInstance(), CAROUSEL_ITEM_NAME);
  23328. const slots = useSlots();
  23329. const activeIndex = ref(-1);
  23330. const timer = ref(null);
  23331. const hover = ref(false);
  23332. const root = ref();
  23333. const containerHeight = ref(0);
  23334. const isItemsTwoLength = ref(true);
  23335. const arrowDisplay = computed(() => props.arrow !== "never" && !unref(isVertical));
  23336. const hasLabel = computed(() => {
  23337. return items.value.some((item) => item.props.label.toString().length > 0);
  23338. });
  23339. const isCardType = computed(() => props.type === "card");
  23340. const isVertical = computed(() => props.direction === "vertical");
  23341. const containerStyle = computed(() => {
  23342. if (props.height !== "auto") return { height: props.height };
  23343. return {
  23344. height: `${containerHeight.value}px`,
  23345. overflow: "hidden"
  23346. };
  23347. });
  23348. const throttledArrowClick = throttle((index) => {
  23349. setActiveItem(index);
  23350. }, THROTTLE_TIME, { trailing: true });
  23351. const throttledIndicatorHover = throttle((index) => {
  23352. handleIndicatorHover(index);
  23353. }, THROTTLE_TIME);
  23354. const isTwoLengthShow = (index) => {
  23355. if (!isItemsTwoLength.value) return true;
  23356. return activeIndex.value <= 1 ? index <= 1 : index > 1;
  23357. };
  23358. function pauseTimer() {
  23359. if (timer.value) {
  23360. clearInterval(timer.value);
  23361. timer.value = null;
  23362. }
  23363. }
  23364. function startTimer() {
  23365. if (props.interval <= 0 || !props.autoplay || timer.value) return;
  23366. timer.value = setInterval(() => playSlides(), props.interval);
  23367. }
  23368. const playSlides = () => {
  23369. if (activeIndex.value < items.value.length - 1) activeIndex.value = activeIndex.value + 1;
  23370. else if (props.loop) activeIndex.value = 0;
  23371. };
  23372. function setActiveItem(index) {
  23373. if (isString(index)) {
  23374. const filteredItems = items.value.filter((item) => item.props.name === index);
  23375. if (filteredItems.length > 0) index = items.value.indexOf(filteredItems[0]);
  23376. }
  23377. index = Number(index);
  23378. if (Number.isNaN(index) || index !== Math.floor(index)) {
  23379. debugWarn(componentName, "index must be integer.");
  23380. return;
  23381. }
  23382. const itemCount = items.value.length;
  23383. const oldIndex = activeIndex.value;
  23384. if (index < 0) activeIndex.value = props.loop ? itemCount - 1 : 0;
  23385. else if (index >= itemCount) activeIndex.value = props.loop ? 0 : itemCount - 1;
  23386. else activeIndex.value = index;
  23387. if (oldIndex === activeIndex.value) resetItemPosition(oldIndex);
  23388. resetTimer();
  23389. }
  23390. function resetItemPosition(oldIndex) {
  23391. items.value.forEach((item, index) => {
  23392. item.translateItem(index, activeIndex.value, oldIndex);
  23393. });
  23394. }
  23395. function itemInStage(item, index) {
  23396. const _items = unref(items);
  23397. const itemCount = _items.length;
  23398. if (itemCount === 0 || !item.states.inStage) return false;
  23399. const nextItemIndex = index + 1;
  23400. const prevItemIndex = index - 1;
  23401. const lastItemIndex = itemCount - 1;
  23402. const isLastItemActive = _items[lastItemIndex].states.active;
  23403. const isFirstItemActive = _items[0].states.active;
  23404. const isNextItemActive = _items[nextItemIndex]?.states?.active;
  23405. const isPrevItemActive = _items[prevItemIndex]?.states?.active;
  23406. if (index === lastItemIndex && isFirstItemActive || isNextItemActive) return "left";
  23407. else if (index === 0 && isLastItemActive || isPrevItemActive) return "right";
  23408. return false;
  23409. }
  23410. function handleMouseEnter() {
  23411. hover.value = true;
  23412. if (props.pauseOnHover) pauseTimer();
  23413. }
  23414. function handleMouseLeave() {
  23415. hover.value = false;
  23416. startTimer();
  23417. }
  23418. function handleButtonEnter(arrow) {
  23419. if (unref(isVertical)) return;
  23420. items.value.forEach((item, index) => {
  23421. if (arrow === itemInStage(item, index)) item.states.hover = true;
  23422. });
  23423. }
  23424. function handleButtonLeave() {
  23425. if (unref(isVertical)) return;
  23426. items.value.forEach((item) => {
  23427. item.states.hover = false;
  23428. });
  23429. }
  23430. function handleIndicatorClick(index) {
  23431. activeIndex.value = index;
  23432. }
  23433. function handleIndicatorHover(index) {
  23434. if (props.trigger === "hover" && index !== activeIndex.value) activeIndex.value = index;
  23435. }
  23436. function prev() {
  23437. setActiveItem(activeIndex.value - 1);
  23438. }
  23439. function next() {
  23440. setActiveItem(activeIndex.value + 1);
  23441. }
  23442. function resetTimer() {
  23443. pauseTimer();
  23444. if (!props.pauseOnHover || !hover.value) startTimer();
  23445. }
  23446. function setContainerHeight(height) {
  23447. if (props.height !== "auto") return;
  23448. containerHeight.value = height;
  23449. }
  23450. function PlaceholderItem() {
  23451. const defaultSlots = slots.default?.();
  23452. if (!defaultSlots) return null;
  23453. const normalizeSlots = flattedChildren(defaultSlots).filter((slot) => {
  23454. return isVNode(slot) && slot.type.name === "ElCarouselItem";
  23455. });
  23456. if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {
  23457. isItemsTwoLength.value = true;
  23458. return normalizeSlots;
  23459. }
  23460. isItemsTwoLength.value = false;
  23461. return null;
  23462. }
  23463. watch(() => activeIndex.value, (current, prev) => {
  23464. resetItemPosition(prev);
  23465. if (isItemsTwoLength.value) {
  23466. current = current % 2;
  23467. prev = prev % 2;
  23468. }
  23469. if (prev > -1) emit(CHANGE_EVENT, current, prev);
  23470. });
  23471. const exposeActiveIndex = computed({
  23472. get: () => {
  23473. return isItemsTwoLength.value ? activeIndex.value % 2 : activeIndex.value;
  23474. },
  23475. set: (value) => activeIndex.value = value
  23476. });
  23477. watch(() => props.autoplay, (autoplay) => {
  23478. autoplay ? startTimer() : pauseTimer();
  23479. });
  23480. watch(() => props.loop, () => {
  23481. setActiveItem(activeIndex.value);
  23482. });
  23483. watch(() => props.interval, () => {
  23484. resetTimer();
  23485. });
  23486. const resizeObserver = shallowRef();
  23487. onMounted(() => {
  23488. watch(() => items.value, () => {
  23489. if (items.value.length > 0) setActiveItem(props.initialIndex);
  23490. }, { immediate: true });
  23491. resizeObserver.value = useResizeObserver(root.value, () => {
  23492. resetItemPosition();
  23493. });
  23494. startTimer();
  23495. });
  23496. onBeforeUnmount(() => {
  23497. pauseTimer();
  23498. if (root.value && resizeObserver.value) resizeObserver.value.stop();
  23499. });
  23500. provide(carouselContextKey, {
  23501. root,
  23502. isCardType,
  23503. isVertical,
  23504. items,
  23505. loop: props.loop,
  23506. cardScale: props.cardScale,
  23507. addItem,
  23508. removeItem,
  23509. setActiveItem,
  23510. setContainerHeight
  23511. });
  23512. return {
  23513. root,
  23514. activeIndex,
  23515. exposeActiveIndex,
  23516. arrowDisplay,
  23517. hasLabel,
  23518. hover,
  23519. isCardType,
  23520. items,
  23521. isVertical,
  23522. containerStyle,
  23523. isItemsTwoLength,
  23524. handleButtonEnter,
  23525. handleButtonLeave,
  23526. handleIndicatorClick,
  23527. handleMouseEnter,
  23528. handleMouseLeave,
  23529. setActiveItem,
  23530. prev,
  23531. next,
  23532. PlaceholderItem,
  23533. isTwoLengthShow,
  23534. ItemsSorter,
  23535. throttledArrowClick,
  23536. throttledIndicatorHover
  23537. };
  23538. };
  23539. //#endregion
  23540. //#region node_modules/element-plus/es/components/carousel/src/carousel.vue_vue_type_script_setup_true_lang.mjs
  23541. var _hoisted_1$65 = ["aria-label"];
  23542. var _hoisted_2$36 = ["aria-label"];
  23543. var _hoisted_3$17 = ["onMouseenter", "onClick"];
  23544. var _hoisted_4$12 = ["aria-label"];
  23545. var _hoisted_5$9 = { key: 0 };
  23546. var _hoisted_6$4 = {
  23547. key: 2,
  23548. xmlns: "http://www.w3.org/2000/svg",
  23549. version: "1.1",
  23550. style: { "display": "none" }
  23551. };
  23552. var COMPONENT_NAME$11 = "ElCarousel";
  23553. //#endregion
  23554. //#region node_modules/element-plus/es/components/carousel/src/carousel2.mjs
  23555. var carousel_default = /* @__PURE__ */ defineComponent({
  23556. name: COMPONENT_NAME$11,
  23557. __name: "carousel",
  23558. props: carouselProps,
  23559. emits: carouselEmits,
  23560. setup(__props, { expose: __expose, emit: __emit }) {
  23561. const props = __props;
  23562. const { root, activeIndex, exposeActiveIndex, arrowDisplay, hasLabel, hover, isCardType, items, isVertical, containerStyle, handleButtonEnter, handleButtonLeave, handleIndicatorClick, handleMouseEnter, handleMouseLeave, setActiveItem, prev, next, PlaceholderItem, isTwoLengthShow, ItemsSorter, throttledArrowClick, throttledIndicatorHover } = useCarousel(props, __emit, COMPONENT_NAME$11);
  23563. const ns = useNamespace("carousel");
  23564. const { t } = useLocale();
  23565. const carouselClasses = computed(() => {
  23566. const classes = [ns.b(), ns.m(props.direction)];
  23567. if (unref(isCardType)) classes.push(ns.m("card"));
  23568. classes.push(ns.is("vertical-outside", unref(isVertical) && props.indicatorPosition === "outside"));
  23569. return classes;
  23570. });
  23571. const indicatorsClasses = computed(() => {
  23572. const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
  23573. if (unref(hasLabel)) classes.push(ns.em("indicators", "labels"));
  23574. if (props.indicatorPosition === "outside") classes.push(ns.em("indicators", "outside"));
  23575. if (unref(isVertical)) classes.push(ns.em("indicators", "right"));
  23576. return classes;
  23577. });
  23578. function handleTransitionStart(e) {
  23579. if (!props.motionBlur) return;
  23580. const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
  23581. e.currentTarget.classList.add(kls);
  23582. }
  23583. function handleTransitionEnd(e) {
  23584. if (!props.motionBlur) return;
  23585. const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
  23586. e.currentTarget.classList.remove(kls);
  23587. }
  23588. __expose({
  23589. /** @description active slide index */
  23590. activeIndex: exposeActiveIndex,
  23591. /** @description manually switch slide, index of the slide to be switched to, starting from 0; or the `name` of corresponding `el-carousel-item` */
  23592. setActiveItem,
  23593. /** @description switch to the previous slide */
  23594. prev,
  23595. /** @description switch to the next slide */
  23596. next
  23597. });
  23598. return (_ctx, _cache) => {
  23599. return openBlock(), createElementBlock("div", {
  23600. ref_key: "root",
  23601. ref: root,
  23602. class: normalizeClass(carouselClasses.value),
  23603. onMouseenter: _cache[6] || (_cache[6] = withModifiers((...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args), ["stop"])),
  23604. onMouseleave: _cache[7] || (_cache[7] = withModifiers((...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args), ["stop"]))
  23605. }, [
  23606. unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
  23607. key: 0,
  23608. name: "carousel-arrow-left",
  23609. persisted: ""
  23610. }, {
  23611. default: withCtx(() => [withDirectives(createBaseVNode("button", {
  23612. type: "button",
  23613. class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "left")]),
  23614. "aria-label": unref(t)("el.carousel.leftArrow"),
  23615. onMouseenter: _cache[0] || (_cache[0] = ($event) => unref(handleButtonEnter)("left")),
  23616. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
  23617. onClick: _cache[2] || (_cache[2] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"]))
  23618. }, [createVNode(unref(ElIcon), null, {
  23619. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  23620. _: 1
  23621. })], 42, _hoisted_1$65), [[vShow, (__props.arrow === "always" || unref(hover)) && (__props.loop || unref(activeIndex) > 0)]])]),
  23622. _: 1
  23623. })) : createCommentVNode("v-if", true),
  23624. unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
  23625. key: 1,
  23626. name: "carousel-arrow-right",
  23627. persisted: ""
  23628. }, {
  23629. default: withCtx(() => [withDirectives(createBaseVNode("button", {
  23630. type: "button",
  23631. class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "right")]),
  23632. "aria-label": unref(t)("el.carousel.rightArrow"),
  23633. onMouseenter: _cache[3] || (_cache[3] = ($event) => unref(handleButtonEnter)("right")),
  23634. onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
  23635. onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"]))
  23636. }, [createVNode(unref(ElIcon), null, {
  23637. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  23638. _: 1
  23639. })], 42, _hoisted_2$36), [[vShow, (__props.arrow === "always" || unref(hover)) && (__props.loop || unref(activeIndex) < unref(items).length - 1)]])]),
  23640. _: 1
  23641. })) : createCommentVNode("v-if", true),
  23642. createBaseVNode("div", {
  23643. class: normalizeClass(unref(ns).e("container")),
  23644. style: normalizeStyle(unref(containerStyle)),
  23645. onTransitionstart: handleTransitionStart,
  23646. onTransitionend: handleTransitionEnd
  23647. }, [createVNode(unref(PlaceholderItem)), renderSlot(_ctx.$slots, "default")], 38),
  23648. createVNode(unref(ItemsSorter), null, {
  23649. default: withCtx(() => [__props.indicatorPosition !== "none" ? (openBlock(), createElementBlock("ul", {
  23650. key: 0,
  23651. class: normalizeClass(indicatorsClasses.value)
  23652. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
  23653. return withDirectives((openBlock(), createElementBlock("li", {
  23654. key: index,
  23655. class: normalizeClass([
  23656. unref(ns).e("indicator"),
  23657. unref(ns).em("indicator", __props.direction),
  23658. unref(ns).is("active", index === unref(activeIndex))
  23659. ]),
  23660. onMouseenter: ($event) => unref(throttledIndicatorHover)(index),
  23661. onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"])
  23662. }, [createBaseVNode("button", {
  23663. class: normalizeClass(unref(ns).e("button")),
  23664. "aria-label": unref(t)("el.carousel.indicator", { index: index + 1 })
  23665. }, [unref(hasLabel) ? (openBlock(), createElementBlock("span", _hoisted_5$9, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true)], 10, _hoisted_4$12)], 42, _hoisted_3$17)), [[vShow, unref(isTwoLengthShow)(index)]]);
  23666. }), 128))], 2)) : createCommentVNode("v-if", true)]),
  23667. _: 1
  23668. }),
  23669. __props.motionBlur ? (openBlock(), createElementBlock("svg", _hoisted_6$4, [..._cache[8] || (_cache[8] = [createBaseVNode("defs", null, [createBaseVNode("filter", { id: "elCarouselHorizontal" }, [createBaseVNode("feGaussianBlur", {
  23670. in: "SourceGraphic",
  23671. stdDeviation: "12,0"
  23672. })]), createBaseVNode("filter", { id: "elCarouselVertical" }, [createBaseVNode("feGaussianBlur", {
  23673. in: "SourceGraphic",
  23674. stdDeviation: "0,10"
  23675. })])], -1)])])) : createCommentVNode("v-if", true)
  23676. ], 34);
  23677. };
  23678. }
  23679. });
  23680. //#endregion
  23681. //#region node_modules/element-plus/es/components/carousel/src/use-carousel-item.mjs
  23682. var useCarouselItem = (props) => {
  23683. const carouselContext = inject(carouselContextKey);
  23684. const instance = getCurrentInstance();
  23685. if (!carouselContext) debugWarn(CAROUSEL_ITEM_NAME, "usage: <el-carousel></el-carousel-item></el-carousel>");
  23686. if (!instance) debugWarn(CAROUSEL_ITEM_NAME, "compositional hook can only be invoked inside setups");
  23687. const carouselItemRef = ref();
  23688. const hover = ref(false);
  23689. const translate = ref(0);
  23690. const scale = ref(1);
  23691. const active = ref(false);
  23692. const ready = ref(false);
  23693. const inStage = ref(false);
  23694. const animating = ref(false);
  23695. const { isCardType, isVertical, cardScale } = carouselContext;
  23696. function processIndex(index, activeIndex, length) {
  23697. const lastItemIndex = length - 1;
  23698. const prevItemIndex = activeIndex - 1;
  23699. const nextItemIndex = activeIndex + 1;
  23700. const halfItemIndex = length / 2;
  23701. if (activeIndex === 0 && index === lastItemIndex) return -1;
  23702. else if (activeIndex === lastItemIndex && index === 0) return length;
  23703. else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) return length + 1;
  23704. else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) return -2;
  23705. return index;
  23706. }
  23707. function calcCardTranslate(index, activeIndex) {
  23708. const parentWidth = unref(isVertical) ? carouselContext.root.value?.offsetHeight || 0 : carouselContext.root.value?.offsetWidth || 0;
  23709. if (inStage.value) return parentWidth * ((2 - cardScale) * (index - activeIndex) + 1) / 4;
  23710. else if (index < activeIndex) return -(1 + cardScale) * parentWidth / 4;
  23711. else return (3 + cardScale) * parentWidth / 4;
  23712. }
  23713. function calcTranslate(index, activeIndex, isVertical) {
  23714. const rootEl = carouselContext.root.value;
  23715. if (!rootEl) return 0;
  23716. return ((isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0) * (index - activeIndex);
  23717. }
  23718. const translateItem = (index, activeIndex, oldIndex) => {
  23719. const _isCardType = unref(isCardType);
  23720. const carouselItemLength = carouselContext.items.value.length ?? NaN;
  23721. const isActive = index === activeIndex;
  23722. if (!_isCardType && !isUndefined(oldIndex)) animating.value = isActive || index === oldIndex;
  23723. if (!isActive && carouselItemLength > 2 && carouselContext.loop) index = processIndex(index, activeIndex, carouselItemLength);
  23724. const _isVertical = unref(isVertical);
  23725. active.value = isActive;
  23726. if (_isCardType) {
  23727. inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
  23728. translate.value = calcCardTranslate(index, activeIndex);
  23729. scale.value = unref(active) ? 1 : cardScale;
  23730. } else translate.value = calcTranslate(index, activeIndex, _isVertical);
  23731. ready.value = true;
  23732. if (isActive && carouselItemRef.value) carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight);
  23733. };
  23734. function handleItemClick() {
  23735. if (carouselContext && unref(isCardType)) {
  23736. const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
  23737. carouselContext.setActiveItem(index);
  23738. }
  23739. }
  23740. const carouselItemContext = {
  23741. props,
  23742. states: reactive({
  23743. hover,
  23744. translate,
  23745. scale,
  23746. active,
  23747. ready,
  23748. inStage,
  23749. animating
  23750. }),
  23751. uid: instance.uid,
  23752. getVnode: () => instance.vnode,
  23753. translateItem
  23754. };
  23755. carouselContext.addItem(carouselItemContext);
  23756. onBeforeUnmount(() => {
  23757. carouselContext.removeItem(carouselItemContext);
  23758. });
  23759. return {
  23760. carouselItemRef,
  23761. active,
  23762. animating,
  23763. hover,
  23764. inStage,
  23765. isVertical,
  23766. translate,
  23767. isCardType,
  23768. scale,
  23769. ready,
  23770. handleItemClick
  23771. };
  23772. };
  23773. //#endregion
  23774. //#region node_modules/element-plus/es/components/carousel/src/carousel-item2.mjs
  23775. var carousel_item_default = /* @__PURE__ */ defineComponent({
  23776. name: CAROUSEL_ITEM_NAME,
  23777. __name: "carousel-item",
  23778. props: carouselItemProps,
  23779. setup(__props) {
  23780. const props = __props;
  23781. const ns = useNamespace("carousel");
  23782. const { carouselItemRef, active, animating, hover, inStage, isVertical, translate, isCardType, scale, ready, handleItemClick } = useCarouselItem(props);
  23783. const itemKls = computed(() => [
  23784. ns.e("item"),
  23785. ns.is("active", active.value),
  23786. ns.is("in-stage", inStage.value),
  23787. ns.is("hover", hover.value),
  23788. ns.is("animating", animating.value),
  23789. {
  23790. [ns.em("item", "card")]: isCardType.value,
  23791. [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
  23792. }
  23793. ]);
  23794. const itemStyle = computed(() => {
  23795. return { transform: [`${`translate${unref(isVertical) ? "Y" : "X"}`}(${unref(translate)}px)`, `scale(${unref(scale)})`].join(" ") };
  23796. });
  23797. return (_ctx, _cache) => {
  23798. return withDirectives((openBlock(), createElementBlock("div", {
  23799. ref_key: "carouselItemRef",
  23800. ref: carouselItemRef,
  23801. class: normalizeClass(itemKls.value),
  23802. style: normalizeStyle(itemStyle.value),
  23803. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args))
  23804. }, [unref(isCardType) ? withDirectives((openBlock(), createElementBlock("div", {
  23805. key: 0,
  23806. class: normalizeClass(unref(ns).e("mask"))
  23807. }, null, 2)), [[vShow, !unref(active)]]) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 6)), [[vShow, unref(ready)]]);
  23808. };
  23809. }
  23810. });
  23811. //#endregion
  23812. //#region node_modules/element-plus/es/components/carousel/index.mjs
  23813. var ElCarousel = withInstall(carousel_default, { CarouselItem: carousel_item_default });
  23814. var ElCarouselItem = withNoopInstall(carousel_item_default);
  23815. //#endregion
  23816. //#region node_modules/element-plus/es/components/cascader-panel/src/config.mjs
  23817. /**
  23818. * @description node height for virtual scrolling
  23819. */
  23820. var CASCADER_PANEL_ITEM_SIZE = 34;
  23821. /**
  23822. * @description menu height for virtual scrolling
  23823. */
  23824. var CASCADER_PANEL_HEIGHT = 204;
  23825. var CommonProps = buildProps({
  23826. /**
  23827. * @description specify which key of node object is used as the node's value
  23828. */
  23829. modelValue: { type: definePropType([
  23830. Number,
  23831. String,
  23832. Array,
  23833. Object
  23834. ]) },
  23835. /**
  23836. * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.
  23837. */
  23838. options: {
  23839. type: definePropType(Array),
  23840. default: () => []
  23841. },
  23842. /**
  23843. * @description configuration options, see the following `CascaderProps` table.
  23844. */
  23845. props: {
  23846. type: definePropType(Object),
  23847. default: () => ({})
  23848. },
  23849. /**
  23850. * @description whether to enable virtual scrolling
  23851. */
  23852. virtualScroll: Boolean,
  23853. /**
  23854. * @description node height for virtual scrolling
  23855. */
  23856. itemSize: {
  23857. type: Number,
  23858. default: 34
  23859. },
  23860. /**
  23861. * @description menu height for virtual scrolling
  23862. */
  23863. height: {
  23864. type: Number,
  23865. default: 204
  23866. }
  23867. });
  23868. var DefaultProps = {
  23869. /**
  23870. * @description trigger mode of expanding options
  23871. */
  23872. expandTrigger: "click",
  23873. /**
  23874. * @description whether multiple selection is enabled
  23875. */
  23876. multiple: false,
  23877. /**
  23878. * @description whether checked state of a node not affects its parent and child nodes
  23879. */
  23880. checkStrictly: false,
  23881. /**
  23882. * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.
  23883. */
  23884. emitPath: true,
  23885. /**
  23886. * @description whether to dynamic load child nodes, use with `lazyload` attribute
  23887. */
  23888. lazy: false,
  23889. /**
  23890. * @description method for loading child nodes data, only works when `lazy` is true
  23891. */
  23892. lazyLoad: NOOP,
  23893. /**
  23894. * @description specify which key of node object is used as the node's value
  23895. */
  23896. value: "value",
  23897. /**
  23898. * @description specify which key of node object is used as the node's label
  23899. */
  23900. label: "label",
  23901. /**
  23902. * @description specify which key of node object is used as the node's children
  23903. */
  23904. children: "children",
  23905. /**
  23906. * @description specify which key of node object is used as the node's leaf
  23907. */
  23908. leaf: "leaf",
  23909. /**
  23910. * @description specify which key of node object is used as the node's disabled
  23911. */
  23912. disabled: "disabled",
  23913. /**
  23914. * @description hover threshold of expanding options
  23915. */
  23916. hoverThreshold: 500,
  23917. /**
  23918. * @description whether to check or uncheck node when clicking on the node
  23919. */
  23920. checkOnClickNode: false,
  23921. /**
  23922. * @description whether to check or uncheck node when clicking on leaf node (last children).
  23923. */
  23924. checkOnClickLeaf: true,
  23925. /**
  23926. * @description whether to show the radio or checkbox prefix
  23927. */
  23928. showPrefix: true
  23929. };
  23930. /**
  23931. * @deprecated Removed after 3.0.0, Use `CascaderPanelProps` instead.
  23932. */
  23933. var cascaderPanelProps = buildProps({
  23934. ...CommonProps,
  23935. border: {
  23936. type: Boolean,
  23937. default: true
  23938. },
  23939. renderLabel: { type: Function }
  23940. });
  23941. var emitChangeFn$2 = (value) => true;
  23942. var cascaderPanelEmits = {
  23943. [UPDATE_MODEL_EVENT]: emitChangeFn$2,
  23944. [CHANGE_EVENT]: emitChangeFn$2,
  23945. close: () => true,
  23946. "expand-change": (value) => value
  23947. };
  23948. var useCascaderConfig = (props) => {
  23949. return computed(() => ({
  23950. ...DefaultProps,
  23951. ...props.props
  23952. }));
  23953. };
  23954. //#endregion
  23955. //#region node_modules/element-plus/es/components/virtual-list/src/defaults.mjs
  23956. var ITEM_RENDER_EVT = "itemRendered";
  23957. var SCROLL_EVT = "scroll";
  23958. var END_REACHED_EVT = "end-reached";
  23959. var FORWARD = "forward";
  23960. var BACKWARD = "backward";
  23961. var AUTO_ALIGNMENT = "auto";
  23962. var START_ALIGNMENT = "start";
  23963. var CENTERED_ALIGNMENT = "center";
  23964. var HORIZONTAL = "horizontal";
  23965. var VERTICAL = "vertical";
  23966. var RTL_OFFSET_NAG = "negative";
  23967. var RTL_OFFSET_POS_ASC = "positive-ascending";
  23968. var RTL_OFFSET_POS_DESC = "positive-descending";
  23969. var ScrollbarDirKey = {
  23970. [HORIZONTAL]: "left",
  23971. [VERTICAL]: "top"
  23972. };
  23973. //#endregion
  23974. //#region node_modules/element-plus/es/components/virtual-list/src/props.mjs
  23975. var itemSize$1 = buildProp({
  23976. type: definePropType([Number, Function]),
  23977. required: true
  23978. });
  23979. var estimatedItemSize = buildProp({ type: Number });
  23980. var cache = buildProp({
  23981. type: Number,
  23982. default: 2
  23983. });
  23984. var direction = buildProp({
  23985. type: String,
  23986. values: ["ltr", "rtl"],
  23987. default: "ltr"
  23988. });
  23989. var initScrollOffset = buildProp({
  23990. type: Number,
  23991. default: 0
  23992. });
  23993. var total = buildProp({
  23994. type: Number,
  23995. required: true
  23996. });
  23997. var layout = buildProp({
  23998. type: String,
  23999. values: ["horizontal", "vertical"],
  24000. default: VERTICAL
  24001. });
  24002. var virtualizedProps = buildProps({
  24003. className: {
  24004. type: String,
  24005. default: ""
  24006. },
  24007. containerElement: {
  24008. type: definePropType([String, Object]),
  24009. default: "div"
  24010. },
  24011. data: {
  24012. type: definePropType(Array),
  24013. default: () => mutable([])
  24014. },
  24015. /**
  24016. * @description controls the horizontal direction.
  24017. */
  24018. direction,
  24019. height: {
  24020. type: [String, Number],
  24021. required: true
  24022. },
  24023. innerElement: {
  24024. type: [String, Object],
  24025. default: "div"
  24026. },
  24027. innerProps: {
  24028. type: definePropType(Object),
  24029. default: () => ({})
  24030. },
  24031. style: {
  24032. type: definePropType([
  24033. Object,
  24034. String,
  24035. Array,
  24036. Boolean
  24037. ]),
  24038. default: void 0
  24039. },
  24040. useIsScrolling: Boolean,
  24041. width: {
  24042. type: [Number, String],
  24043. required: false
  24044. },
  24045. innerWidth: {
  24046. type: [Number, String],
  24047. required: false
  24048. },
  24049. perfMode: {
  24050. type: Boolean,
  24051. default: true
  24052. },
  24053. scrollbarAlwaysOn: Boolean
  24054. });
  24055. var virtualizedListProps = buildProps({
  24056. /**
  24057. * @description describes how many items should be pre rendered to the head
  24058. * and the tail of the window
  24059. */
  24060. cache,
  24061. estimatedItemSize,
  24062. /**
  24063. * @description controls the list's orientation
  24064. */
  24065. layout,
  24066. initScrollOffset,
  24067. /**
  24068. * @description describes the total number of the list.
  24069. */
  24070. total,
  24071. itemSize: itemSize$1,
  24072. ...virtualizedProps
  24073. });
  24074. var scrollbarSize = {
  24075. type: Number,
  24076. default: 6
  24077. };
  24078. var startGap = {
  24079. type: Number,
  24080. default: 0
  24081. };
  24082. var endGap = {
  24083. type: Number,
  24084. default: 2
  24085. };
  24086. var virtualizedGridProps = buildProps({
  24087. columnCache: cache,
  24088. columnWidth: itemSize$1,
  24089. estimatedColumnWidth: estimatedItemSize,
  24090. estimatedRowHeight: estimatedItemSize,
  24091. initScrollLeft: initScrollOffset,
  24092. initScrollTop: initScrollOffset,
  24093. itemKey: {
  24094. type: definePropType(Function),
  24095. default: ({ columnIndex, rowIndex }) => `${rowIndex}:${columnIndex}`
  24096. },
  24097. rowCache: cache,
  24098. rowHeight: itemSize$1,
  24099. totalColumn: total,
  24100. totalRow: total,
  24101. hScrollbarSize: scrollbarSize,
  24102. vScrollbarSize: scrollbarSize,
  24103. scrollbarStartGap: startGap,
  24104. scrollbarEndGap: endGap,
  24105. role: String,
  24106. ...virtualizedProps
  24107. });
  24108. var virtualizedScrollbarProps = buildProps({
  24109. alwaysOn: Boolean,
  24110. class: String,
  24111. layout,
  24112. total,
  24113. ratio: {
  24114. type: Number,
  24115. required: true
  24116. },
  24117. clientSize: {
  24118. type: Number,
  24119. required: true
  24120. },
  24121. scrollFrom: {
  24122. type: Number,
  24123. required: true
  24124. },
  24125. scrollbarSize,
  24126. startGap,
  24127. endGap,
  24128. visible: Boolean
  24129. });
  24130. //#endregion
  24131. //#region node_modules/element-plus/es/components/virtual-list/src/utils.mjs
  24132. var getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;
  24133. var isHorizontal = (dir) => dir === "ltr" || dir === "rtl" || dir === "horizontal";
  24134. var isRTL = (dir) => dir === "rtl";
  24135. var cachedRTLResult = null;
  24136. function getRTLOffsetType(recalculate = false) {
  24137. if (cachedRTLResult === null || recalculate) {
  24138. const outerDiv = document.createElement("div");
  24139. const outerStyle = outerDiv.style;
  24140. outerStyle.width = "50px";
  24141. outerStyle.height = "50px";
  24142. outerStyle.overflow = "scroll";
  24143. outerStyle.direction = "rtl";
  24144. const innerDiv = document.createElement("div");
  24145. const innerStyle = innerDiv.style;
  24146. innerStyle.width = "100px";
  24147. innerStyle.height = "100px";
  24148. outerDiv.appendChild(innerDiv);
  24149. document.body.appendChild(outerDiv);
  24150. if (outerDiv.scrollLeft > 0) cachedRTLResult = RTL_OFFSET_POS_DESC;
  24151. else {
  24152. outerDiv.scrollLeft = 1;
  24153. if (outerDiv.scrollLeft === 0) cachedRTLResult = RTL_OFFSET_NAG;
  24154. else cachedRTLResult = RTL_OFFSET_POS_ASC;
  24155. }
  24156. document.body.removeChild(outerDiv);
  24157. return cachedRTLResult;
  24158. }
  24159. return cachedRTLResult;
  24160. }
  24161. function renderThumbStyle$1({ move, size, bar }, layout) {
  24162. const style = {};
  24163. const translate = `translate${bar.axis}(${move}px)`;
  24164. style[bar.size] = size;
  24165. style.transform = translate;
  24166. if (layout === "horizontal") style.height = "100%";
  24167. else style.width = "100%";
  24168. return style;
  24169. }
  24170. //#endregion
  24171. //#region node_modules/memoize-one/dist/memoize-one.esm.js
  24172. var safeIsNaN = Number.isNaN || function ponyfill(value) {
  24173. return typeof value === "number" && value !== value;
  24174. };
  24175. function isEqual(first, second) {
  24176. if (first === second) return true;
  24177. if (safeIsNaN(first) && safeIsNaN(second)) return true;
  24178. return false;
  24179. }
  24180. function areInputsEqual(newInputs, lastInputs) {
  24181. if (newInputs.length !== lastInputs.length) return false;
  24182. for (var i = 0; i < newInputs.length; i++) if (!isEqual(newInputs[i], lastInputs[i])) return false;
  24183. return true;
  24184. }
  24185. function memoizeOne(resultFn, isEqual) {
  24186. if (isEqual === void 0) isEqual = areInputsEqual;
  24187. var cache = null;
  24188. function memoized() {
  24189. var newArgs = [];
  24190. for (var _i = 0; _i < arguments.length; _i++) newArgs[_i] = arguments[_i];
  24191. if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) return cache.lastResult;
  24192. var lastResult = resultFn.apply(this, newArgs);
  24193. cache = {
  24194. lastResult,
  24195. lastArgs: newArgs,
  24196. lastThis: this
  24197. };
  24198. return lastResult;
  24199. }
  24200. memoized.clear = function clear() {
  24201. cache = null;
  24202. };
  24203. return memoized;
  24204. }
  24205. //#endregion
  24206. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-cache.mjs
  24207. var useCache = () => {
  24208. const props = getCurrentInstance().proxy.$props;
  24209. return computed(() => {
  24210. const _getItemStyleCache = (_, __, ___) => ({});
  24211. return props.perfMode ? memoize(_getItemStyleCache) : memoizeOne(_getItemStyleCache);
  24212. });
  24213. };
  24214. //#endregion
  24215. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-wheel.mjs
  24216. var useWheel = ({ atEndEdge, atStartEdge, layout }, onWheelDelta) => {
  24217. let frameHandle;
  24218. let offset = 0;
  24219. const hasReachedEdge = (offset) => {
  24220. return offset < 0 && atStartEdge.value || offset > 0 && atEndEdge.value;
  24221. };
  24222. const onWheel = (e) => {
  24223. cAF(frameHandle);
  24224. let { deltaX, deltaY } = e;
  24225. if (e.shiftKey && deltaY !== 0) {
  24226. deltaX = deltaY;
  24227. deltaY = 0;
  24228. }
  24229. const newOffset = layout.value === "horizontal" ? deltaX : deltaY;
  24230. if (hasReachedEdge(newOffset)) return;
  24231. offset += newOffset;
  24232. if (!isFirefox() && newOffset !== 0) e.preventDefault();
  24233. frameHandle = rAF(() => {
  24234. onWheelDelta(offset);
  24235. offset = 0;
  24236. });
  24237. };
  24238. return {
  24239. hasReachedEdge,
  24240. onWheel
  24241. };
  24242. };
  24243. //#endregion
  24244. //#region node_modules/element-plus/es/components/virtual-list/src/components/scrollbar.mjs
  24245. var ScrollBar = defineComponent({
  24246. name: "ElVirtualScrollBar",
  24247. props: virtualizedScrollbarProps,
  24248. emits: [
  24249. "scroll",
  24250. "start-move",
  24251. "stop-move"
  24252. ],
  24253. setup(props, { emit }) {
  24254. const GAP = computed(() => props.startGap + props.endGap);
  24255. const nsVirtualScrollbar = useNamespace("virtual-scrollbar");
  24256. const nsScrollbar = useNamespace("scrollbar");
  24257. const trackRef = ref();
  24258. const thumbRef = ref();
  24259. let frameHandle = null;
  24260. let onselectstartStore = null;
  24261. const state = reactive({
  24262. isDragging: false,
  24263. traveled: 0
  24264. });
  24265. const bar = computed(() => BAR_MAP[props.layout]);
  24266. const trackSize = computed(() => props.clientSize - unref(GAP));
  24267. const trackStyle = computed(() => ({
  24268. position: "absolute",
  24269. width: `${"horizontal" === props.layout ? trackSize.value : props.scrollbarSize}px`,
  24270. height: `${"horizontal" === props.layout ? props.scrollbarSize : trackSize.value}px`,
  24271. [ScrollbarDirKey[props.layout]]: "2px",
  24272. right: "2px",
  24273. bottom: "2px",
  24274. borderRadius: "4px"
  24275. }));
  24276. const thumbSize = computed(() => {
  24277. const ratio = props.ratio;
  24278. if (ratio >= 100) return Number.POSITIVE_INFINITY;
  24279. if (ratio >= 50) return ratio * trackSize.value / 100;
  24280. const SCROLLBAR_MAX_SIZE = trackSize.value / 3;
  24281. return Math.floor(Math.min(Math.max(ratio * trackSize.value / 100, 20), SCROLLBAR_MAX_SIZE));
  24282. });
  24283. const thumbStyle = computed(() => {
  24284. if (!Number.isFinite(thumbSize.value)) return { display: "none" };
  24285. const thumb = `${thumbSize.value}px`;
  24286. return renderThumbStyle$1({
  24287. bar: bar.value,
  24288. size: thumb,
  24289. move: state.traveled
  24290. }, props.layout);
  24291. });
  24292. const totalSteps = computed(() => Math.ceil(props.clientSize - thumbSize.value - unref(GAP)));
  24293. const attachEvents = () => {
  24294. window.addEventListener("mousemove", onMouseMove);
  24295. window.addEventListener("mouseup", onMouseUp);
  24296. const thumbEl = unref(thumbRef);
  24297. if (!thumbEl) return;
  24298. onselectstartStore = document.onselectstart;
  24299. document.onselectstart = () => false;
  24300. thumbEl.addEventListener("touchmove", onMouseMove, { passive: true });
  24301. thumbEl.addEventListener("touchend", onMouseUp);
  24302. };
  24303. const detachEvents = () => {
  24304. window.removeEventListener("mousemove", onMouseMove);
  24305. window.removeEventListener("mouseup", onMouseUp);
  24306. document.onselectstart = onselectstartStore;
  24307. onselectstartStore = null;
  24308. const thumbEl = unref(thumbRef);
  24309. if (!thumbEl) return;
  24310. thumbEl.removeEventListener("touchmove", onMouseMove);
  24311. thumbEl.removeEventListener("touchend", onMouseUp);
  24312. };
  24313. const onThumbMouseDown = (e) => {
  24314. e.stopImmediatePropagation();
  24315. if (e.ctrlKey || [1, 2].includes(e.button)) return;
  24316. state.isDragging = true;
  24317. state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
  24318. emit("start-move");
  24319. attachEvents();
  24320. };
  24321. const onMouseUp = () => {
  24322. state.isDragging = false;
  24323. state[bar.value.axis] = 0;
  24324. emit("stop-move");
  24325. detachEvents();
  24326. };
  24327. const onMouseMove = (e) => {
  24328. const { isDragging } = state;
  24329. if (!isDragging) return;
  24330. if (!thumbRef.value || !trackRef.value) return;
  24331. const prevPage = state[bar.value.axis];
  24332. if (!prevPage) return;
  24333. cAF(frameHandle);
  24334. /**
  24335. * +--------------+ +--------------+
  24336. * | - <--------- thumb.offsetTop | |
  24337. * | |+| <--+ | |
  24338. * | - | | |
  24339. * | Content | | | |
  24340. * | | | | |
  24341. * | | | | |
  24342. * | | | | -
  24343. * | | +--> | |+|
  24344. * | | | -
  24345. * +--------------+ +--------------+
  24346. */
  24347. const distance = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1 - (thumbRef.value[bar.value.offset] - prevPage);
  24348. frameHandle = rAF(() => {
  24349. state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
  24350. emit("scroll", distance, totalSteps.value);
  24351. });
  24352. };
  24353. const clickTrackHandler = (e) => {
  24354. const distance = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) - thumbRef.value[bar.value.offset] / 2;
  24355. state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
  24356. emit("scroll", distance, totalSteps.value);
  24357. };
  24358. watch(() => props.scrollFrom, (v) => {
  24359. if (state.isDragging) return;
  24360. /**
  24361. * this is simply mapping the current scrollbar offset
  24362. *
  24363. * formula 1:
  24364. * v = scrollOffset / (estimatedTotalSize - clientSize)
  24365. * traveled = v * (clientSize - thumbSize - GAP) --> v * totalSteps
  24366. *
  24367. * formula 2:
  24368. * traveled = (v * clientSize) / (clientSize / totalSteps) --> (v * clientSize) * (totalSteps / clientSize) --> v * totalSteps
  24369. */
  24370. state.traveled = Math.ceil(v * totalSteps.value);
  24371. });
  24372. onBeforeUnmount(() => {
  24373. detachEvents();
  24374. });
  24375. return () => {
  24376. return h$1("div", {
  24377. role: "presentation",
  24378. ref: trackRef,
  24379. class: [
  24380. nsVirtualScrollbar.b(),
  24381. props.class,
  24382. (props.alwaysOn || state.isDragging) && "always-on"
  24383. ],
  24384. style: trackStyle.value,
  24385. onMousedown: withModifiers(clickTrackHandler, ["stop", "prevent"]),
  24386. onTouchstartPrevent: onThumbMouseDown
  24387. }, h$1("div", {
  24388. ref: thumbRef,
  24389. class: nsScrollbar.e("thumb"),
  24390. style: thumbStyle.value,
  24391. onMousedown: onThumbMouseDown
  24392. }, []));
  24393. };
  24394. }
  24395. });
  24396. //#endregion
  24397. //#region node_modules/element-plus/es/components/virtual-list/src/builders/build-list.mjs
  24398. var createList = ({ name, getOffset, getItemSize, getItemOffset, getEstimatedTotalSize, getStartIndexForOffset, getStopIndexForStartIndex, initCache, clearCache, validateProps }) => {
  24399. return defineComponent({
  24400. name: name ?? "ElVirtualList",
  24401. props: virtualizedListProps,
  24402. emits: [
  24403. ITEM_RENDER_EVT,
  24404. SCROLL_EVT,
  24405. END_REACHED_EVT
  24406. ],
  24407. setup(props, { emit, expose }) {
  24408. validateProps(props);
  24409. const instance = getCurrentInstance();
  24410. const ns = useNamespace("vl");
  24411. const dynamicSizeCache = ref(initCache(props, instance));
  24412. const getItemStyleCache = useCache();
  24413. const windowRef = ref();
  24414. const innerRef = ref();
  24415. const scrollbarRef = ref();
  24416. const states = ref({
  24417. isScrolling: false,
  24418. scrollDir: FORWARD,
  24419. scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0,
  24420. updateRequested: false,
  24421. isScrollbarDragging: false
  24422. });
  24423. const itemsToRender = computed(() => {
  24424. const { total, cache } = props;
  24425. const { isScrolling, scrollDir, scrollOffset } = unref(states);
  24426. if (total === 0) return [
  24427. 0,
  24428. 0,
  24429. 0,
  24430. 0
  24431. ];
  24432. const startIndex = getStartIndexForOffset(props, scrollOffset, unref(dynamicSizeCache));
  24433. const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, unref(dynamicSizeCache));
  24434. const cacheBackward = !isScrolling || scrollDir === "backward" ? Math.max(1, cache) : 1;
  24435. const cacheForward = !isScrolling || scrollDir === "forward" ? Math.max(1, cache) : 1;
  24436. return [
  24437. Math.max(0, startIndex - cacheBackward),
  24438. Math.max(0, Math.min(total - 1, stopIndex + cacheForward)),
  24439. startIndex,
  24440. stopIndex
  24441. ];
  24442. });
  24443. const estimatedTotalSize = computed(() => getEstimatedTotalSize(props, unref(dynamicSizeCache)));
  24444. const _isHorizontal = computed(() => isHorizontal(props.layout));
  24445. const windowStyle = computed(() => [
  24446. {
  24447. position: "relative",
  24448. [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll",
  24449. WebkitOverflowScrolling: "touch",
  24450. willChange: "transform"
  24451. },
  24452. {
  24453. direction: props.direction,
  24454. height: isNumber(props.height) ? `${props.height}px` : props.height,
  24455. width: isNumber(props.width) ? `${props.width}px` : props.width
  24456. },
  24457. props.style
  24458. ]);
  24459. const innerStyle = computed(() => {
  24460. const size = unref(estimatedTotalSize);
  24461. const horizontal = unref(_isHorizontal);
  24462. const innerWidth = props.innerWidth;
  24463. return {
  24464. height: horizontal ? "100%" : `${size}px`,
  24465. pointerEvents: unref(states).isScrolling ? "none" : void 0,
  24466. width: horizontal ? `${size}px` : innerWidth !== void 0 ? isNumber(innerWidth) ? `${innerWidth}px` : innerWidth : "100%",
  24467. margin: 0,
  24468. boxSizing: "border-box"
  24469. };
  24470. });
  24471. const clientSize = computed(() => _isHorizontal.value ? props.width : props.height);
  24472. const maxOffset = computed(() => Math.max(0, estimatedTotalSize.value - clientSize.value));
  24473. const normalizeOffset = (offset) => clamp$1(offset, 0, maxOffset.value);
  24474. const EDGE_TOLERANCE = 1;
  24475. const getEdgeState = (normalizedOffset) => ({
  24476. start: !isGreaterThan(normalizedOffset, 0, EDGE_TOLERANCE),
  24477. end: !isGreaterThan(maxOffset.value, normalizedOffset, EDGE_TOLERANCE)
  24478. });
  24479. const normalizedScrollOffset = computed(() => normalizeOffset(states.value.scrollOffset));
  24480. const currentEdgeState = computed(() => getEdgeState(normalizedScrollOffset.value));
  24481. let edgeState = currentEdgeState.value;
  24482. const { onWheel } = useWheel({
  24483. atStartEdge: computed(() => currentEdgeState.value.start),
  24484. atEndEdge: computed(() => currentEdgeState.value.end),
  24485. layout: computed(() => props.layout)
  24486. }, (offset) => {
  24487. scrollbarRef.value.onMouseUp?.();
  24488. scrollTo(Math.min(states.value.scrollOffset + offset, maxOffset.value));
  24489. });
  24490. useEventListener(windowRef, "wheel", onWheel, { passive: false });
  24491. const emitEvents = () => {
  24492. const { total } = props;
  24493. if (total > 0) {
  24494. const [cacheStart, cacheEnd, visibleStart, visibleEnd] = unref(itemsToRender);
  24495. emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);
  24496. }
  24497. const { scrollDir, scrollOffset, updateRequested } = unref(states);
  24498. emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);
  24499. };
  24500. const emitEndReached = (direction, offset) => {
  24501. const nextEdgeState = getEdgeState(offset);
  24502. const horizontalEnd = props.direction === "rtl" ? "left" : "right";
  24503. const horizontalStart = props.direction === "rtl" ? "right" : "left";
  24504. if (direction === "forward" && nextEdgeState.end && !edgeState.end) emit(END_REACHED_EVT, _isHorizontal.value ? horizontalEnd : "bottom");
  24505. if (direction === "backward" && nextEdgeState.start && !edgeState.start) emit(END_REACHED_EVT, _isHorizontal.value ? horizontalStart : "top");
  24506. edgeState = nextEdgeState;
  24507. };
  24508. const updateScrollOffset = (offset, { isScrolling, updateRequested }) => {
  24509. const currentState = unref(states);
  24510. const nextOffset = Math.max(offset, 0);
  24511. if (nextOffset === currentState.scrollOffset) return;
  24512. const scrollDir = getScrollDir(currentState.scrollOffset, nextOffset);
  24513. states.value = {
  24514. ...currentState,
  24515. isScrolling,
  24516. scrollDir,
  24517. scrollOffset: nextOffset,
  24518. updateRequested
  24519. };
  24520. emitEndReached(scrollDir, normalizeOffset(nextOffset));
  24521. nextTick(resetIsScrolling);
  24522. };
  24523. const scrollVertically = (e) => {
  24524. const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;
  24525. if (unref(states).scrollOffset === scrollTop) return;
  24526. updateScrollOffset(Math.min(scrollTop, scrollHeight - clientHeight), {
  24527. isScrolling: true,
  24528. updateRequested: false
  24529. });
  24530. };
  24531. const scrollHorizontally = (e) => {
  24532. const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;
  24533. if (unref(states).scrollOffset === scrollLeft) return;
  24534. const { direction } = props;
  24535. let scrollOffset = scrollLeft;
  24536. if (direction === "rtl") switch (getRTLOffsetType()) {
  24537. case RTL_OFFSET_NAG:
  24538. scrollOffset = -scrollLeft;
  24539. break;
  24540. case RTL_OFFSET_POS_DESC:
  24541. scrollOffset = scrollWidth - clientWidth - scrollLeft;
  24542. break;
  24543. }
  24544. updateScrollOffset(Math.min(scrollOffset, scrollWidth - clientWidth), {
  24545. isScrolling: true,
  24546. updateRequested: false
  24547. });
  24548. };
  24549. const onScroll = (e) => {
  24550. unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);
  24551. emitEvents();
  24552. };
  24553. const onScrollbarScroll = (distanceToGo, totalSteps) => {
  24554. const offset = maxOffset.value / totalSteps * distanceToGo;
  24555. scrollTo(Math.min(maxOffset.value, offset));
  24556. };
  24557. const scrollTo = (offset) => {
  24558. updateScrollOffset(offset, {
  24559. isScrolling: unref(states).isScrolling,
  24560. updateRequested: true
  24561. });
  24562. };
  24563. const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {
  24564. const { scrollOffset } = unref(states);
  24565. idx = Math.max(0, Math.min(idx, props.total - 1));
  24566. scrollTo(getOffset(props, idx, alignment, scrollOffset, unref(dynamicSizeCache)));
  24567. };
  24568. const getItemStyle = (idx) => {
  24569. const { direction, itemSize, layout } = props;
  24570. const itemStyleCache = getItemStyleCache.value(clearCache && itemSize, clearCache && layout, clearCache && direction);
  24571. let style;
  24572. if (hasOwn(itemStyleCache, String(idx))) style = itemStyleCache[idx];
  24573. else {
  24574. const offset = getItemOffset(props, idx, unref(dynamicSizeCache));
  24575. const size = getItemSize(props, idx, unref(dynamicSizeCache));
  24576. const horizontal = unref(_isHorizontal);
  24577. const isRtl = direction === "rtl";
  24578. const offsetHorizontal = horizontal ? offset : 0;
  24579. itemStyleCache[idx] = style = {
  24580. position: "absolute",
  24581. left: isRtl ? void 0 : `${offsetHorizontal}px`,
  24582. right: isRtl ? `${offsetHorizontal}px` : void 0,
  24583. top: !horizontal ? `${offset}px` : 0,
  24584. height: !horizontal ? `${size}px` : "100%",
  24585. width: horizontal ? `${size}px` : "100%"
  24586. };
  24587. }
  24588. return style;
  24589. };
  24590. const resetIsScrolling = () => {
  24591. states.value.isScrolling = false;
  24592. nextTick(() => {
  24593. getItemStyleCache.value(-1, null, null);
  24594. });
  24595. };
  24596. const resetScrollTop = () => {
  24597. const window = windowRef.value;
  24598. if (window) window.scrollTop = 0;
  24599. };
  24600. onMounted(() => {
  24601. if (!isClient) return;
  24602. const { initScrollOffset } = props;
  24603. const windowElement = unref(windowRef);
  24604. if (isNumber(initScrollOffset) && windowElement) if (unref(_isHorizontal)) windowElement.scrollLeft = initScrollOffset;
  24605. else windowElement.scrollTop = initScrollOffset;
  24606. emitEvents();
  24607. });
  24608. onUpdated(() => {
  24609. const { direction, layout } = props;
  24610. const { scrollOffset, updateRequested } = unref(states);
  24611. const windowElement = unref(windowRef);
  24612. if (updateRequested && windowElement) if (layout === "horizontal") if (direction === "rtl") switch (getRTLOffsetType()) {
  24613. case RTL_OFFSET_NAG:
  24614. windowElement.scrollLeft = -scrollOffset;
  24615. break;
  24616. case RTL_OFFSET_POS_ASC:
  24617. windowElement.scrollLeft = scrollOffset;
  24618. break;
  24619. default: {
  24620. const { clientWidth, scrollWidth } = windowElement;
  24621. windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;
  24622. break;
  24623. }
  24624. }
  24625. else windowElement.scrollLeft = scrollOffset;
  24626. else windowElement.scrollTop = scrollOffset;
  24627. });
  24628. onActivated(() => {
  24629. unref(windowRef).scrollTop = unref(states).scrollOffset;
  24630. });
  24631. watch(maxOffset, () => {
  24632. edgeState = currentEdgeState.value;
  24633. });
  24634. const api = {
  24635. ns,
  24636. clientSize,
  24637. estimatedTotalSize,
  24638. windowStyle,
  24639. windowRef,
  24640. innerRef,
  24641. innerStyle,
  24642. itemsToRender,
  24643. scrollbarRef,
  24644. states,
  24645. getItemStyle,
  24646. onScroll,
  24647. onScrollbarScroll,
  24648. onWheel,
  24649. scrollTo,
  24650. scrollToItem,
  24651. resetScrollTop
  24652. };
  24653. expose({
  24654. windowRef,
  24655. innerRef,
  24656. getItemStyleCache,
  24657. scrollTo,
  24658. scrollToItem,
  24659. resetScrollTop,
  24660. states
  24661. });
  24662. return api;
  24663. },
  24664. render(ctx) {
  24665. const { $slots, className, clientSize, containerElement, data, getItemStyle, innerElement, itemsToRender, innerStyle, layout, scrollbarAlwaysOn, total, onScroll, onScrollbarScroll, states, useIsScrolling, windowStyle, ns } = ctx;
  24666. const [start, end] = itemsToRender;
  24667. const Container = resolveDynamicComponent(containerElement);
  24668. const Inner = resolveDynamicComponent(innerElement);
  24669. const children = [];
  24670. if (total > 0) for (let i = start; i <= end; i++) children.push(h$1(Fragment, { key: i }, $slots.default?.({
  24671. data,
  24672. index: i,
  24673. isScrolling: useIsScrolling ? states.isScrolling : void 0,
  24674. style: getItemStyle(i)
  24675. })));
  24676. const InnerNode = [h$1(Inner, mergeProps(ctx.innerProps, {
  24677. style: innerStyle,
  24678. ref: "innerRef"
  24679. }), !isString(Inner) ? { default: () => children } : children)];
  24680. const scrollbar = h$1(ScrollBar, {
  24681. ref: "scrollbarRef",
  24682. clientSize,
  24683. layout,
  24684. onScroll: onScrollbarScroll,
  24685. ratio: clientSize * 100 / this.estimatedTotalSize,
  24686. scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),
  24687. total,
  24688. alwaysOn: scrollbarAlwaysOn
  24689. });
  24690. const listContainer = h$1(Container, {
  24691. class: [ns.e("window"), className],
  24692. style: windowStyle,
  24693. onScroll,
  24694. ref: "windowRef",
  24695. key: 0
  24696. }, !isString(Container) ? { default: () => [InnerNode] } : [InnerNode]);
  24697. return h$1("div", {
  24698. key: 0,
  24699. class: [ns.e("wrapper"), scrollbarAlwaysOn ? "always-on" : ""]
  24700. }, [listContainer, scrollbar]);
  24701. }
  24702. });
  24703. };
  24704. //#endregion
  24705. //#region node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-list.mjs
  24706. var FixedSizeList = createList({
  24707. name: "ElFixedSizeList",
  24708. getItemOffset: ({ itemSize }, index) => index * itemSize,
  24709. getItemSize: ({ itemSize }) => itemSize,
  24710. getEstimatedTotalSize: ({ total, itemSize }) => itemSize * total,
  24711. getOffset: ({ height, total, itemSize, layout, width }, index, alignment, scrollOffset) => {
  24712. const size = isHorizontal(layout) ? width : height;
  24713. if (isString(size)) throwError("[ElVirtualList]", `
  24714. You should set
  24715. width/height
  24716. to number when your layout is
  24717. horizontal/vertical
  24718. `);
  24719. const lastItemOffset = Math.max(0, total * itemSize - size);
  24720. const maxOffset = Math.min(lastItemOffset, index * itemSize);
  24721. const minOffset = Math.max(0, (index + 1) * itemSize - size);
  24722. if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
  24723. else alignment = CENTERED_ALIGNMENT;
  24724. switch (alignment) {
  24725. case START_ALIGNMENT: return maxOffset;
  24726. case "end": return minOffset;
  24727. case CENTERED_ALIGNMENT: {
  24728. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  24729. if (middleOffset < Math.ceil(size / 2)) return 0;
  24730. else if (middleOffset > lastItemOffset + Math.floor(size / 2)) return lastItemOffset;
  24731. else return middleOffset;
  24732. }
  24733. case AUTO_ALIGNMENT:
  24734. default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
  24735. else if (scrollOffset < minOffset) return minOffset;
  24736. else return maxOffset;
  24737. }
  24738. },
  24739. getStartIndexForOffset: ({ total, itemSize }, offset) => Math.max(0, Math.min(total - 1, Math.floor(offset / itemSize))),
  24740. getStopIndexForStartIndex: ({ height, total, itemSize, layout, width }, startIndex, scrollOffset) => {
  24741. const offset = startIndex * itemSize;
  24742. const size = isHorizontal(layout) ? width : height;
  24743. const numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);
  24744. return Math.max(0, Math.min(total - 1, startIndex + numVisibleItems - 1));
  24745. },
  24746. /**
  24747. * Fixed size list does not need this cache
  24748. * Using any to bypass it, TODO: Using type inference to fix this.
  24749. */
  24750. initCache() {},
  24751. clearCache: true,
  24752. validateProps() {}
  24753. });
  24754. //#endregion
  24755. //#region node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-list.mjs
  24756. var SCOPE$7 = "ElDynamicSizeList";
  24757. var getItemFromCache$1 = (props, index, listCache) => {
  24758. const { itemSize } = props;
  24759. const { items, lastVisitedIndex } = listCache;
  24760. if (index > lastVisitedIndex) {
  24761. let offset = 0;
  24762. if (lastVisitedIndex >= 0) {
  24763. const item = items[lastVisitedIndex];
  24764. offset = item.offset + item.size;
  24765. }
  24766. for (let i = lastVisitedIndex + 1; i <= index; i++) {
  24767. const size = itemSize(i);
  24768. items[i] = {
  24769. offset,
  24770. size
  24771. };
  24772. offset += size;
  24773. }
  24774. listCache.lastVisitedIndex = index;
  24775. }
  24776. return items[index];
  24777. };
  24778. var findItem$1 = (props, listCache, offset) => {
  24779. const { items, lastVisitedIndex } = listCache;
  24780. if ((lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0) >= offset) return bs$1(props, listCache, 0, lastVisitedIndex, offset);
  24781. return es$1(props, listCache, Math.max(0, lastVisitedIndex), offset);
  24782. };
  24783. var bs$1 = (props, listCache, low, high, offset) => {
  24784. while (low <= high) {
  24785. const mid = low + Math.floor((high - low) / 2);
  24786. const currentOffset = getItemFromCache$1(props, mid, listCache).offset;
  24787. if (currentOffset === offset) return mid;
  24788. else if (currentOffset < offset) low = mid + 1;
  24789. else if (currentOffset > offset) high = mid - 1;
  24790. }
  24791. return Math.max(0, low - 1);
  24792. };
  24793. var es$1 = (props, listCache, index, offset) => {
  24794. const { total } = props;
  24795. let exponent = 1;
  24796. while (index < total && getItemFromCache$1(props, index, listCache).offset < offset) {
  24797. index += exponent;
  24798. exponent *= 2;
  24799. }
  24800. return bs$1(props, listCache, Math.floor(index / 2), Math.min(index, total - 1), offset);
  24801. };
  24802. var getEstimatedTotalSize = ({ total }, { items, estimatedItemSize, lastVisitedIndex }) => {
  24803. let totalSizeOfMeasuredItems = 0;
  24804. if (lastVisitedIndex >= total) lastVisitedIndex = total - 1;
  24805. if (lastVisitedIndex >= 0) {
  24806. const item = items[lastVisitedIndex];
  24807. totalSizeOfMeasuredItems = item.offset + item.size;
  24808. }
  24809. const totalSizeOfUnmeasuredItems = (total - lastVisitedIndex - 1) * estimatedItemSize;
  24810. return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
  24811. };
  24812. var DynamicSizeList = createList({
  24813. name: "ElDynamicSizeList",
  24814. getItemOffset: (props, index, listCache) => getItemFromCache$1(props, index, listCache).offset,
  24815. getItemSize: (_, index, { items }) => items[index].size,
  24816. getEstimatedTotalSize,
  24817. getOffset: (props, index, alignment, scrollOffset, listCache) => {
  24818. const { height, layout, width } = props;
  24819. const size = isHorizontal(layout) ? width : height;
  24820. const item = getItemFromCache$1(props, index, listCache);
  24821. const estimatedTotalSize = getEstimatedTotalSize(props, listCache);
  24822. const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, item.offset));
  24823. const minOffset = Math.max(0, item.offset - size + item.size);
  24824. if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
  24825. else alignment = CENTERED_ALIGNMENT;
  24826. switch (alignment) {
  24827. case START_ALIGNMENT: return maxOffset;
  24828. case "end": return minOffset;
  24829. case CENTERED_ALIGNMENT: return Math.round(minOffset + (maxOffset - minOffset) / 2);
  24830. case AUTO_ALIGNMENT:
  24831. default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
  24832. else if (scrollOffset < minOffset) return minOffset;
  24833. else return maxOffset;
  24834. }
  24835. },
  24836. getStartIndexForOffset: (props, offset, listCache) => findItem$1(props, listCache, offset),
  24837. getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {
  24838. const { height, total, layout, width } = props;
  24839. const size = isHorizontal(layout) ? width : height;
  24840. const item = getItemFromCache$1(props, startIndex, listCache);
  24841. const maxOffset = scrollOffset + size;
  24842. let offset = item.offset + item.size;
  24843. let stopIndex = startIndex;
  24844. while (stopIndex < total - 1 && offset < maxOffset) {
  24845. stopIndex++;
  24846. offset += getItemFromCache$1(props, stopIndex, listCache).size;
  24847. }
  24848. return stopIndex;
  24849. },
  24850. initCache({ estimatedItemSize = 50 }, instance) {
  24851. const cache = {
  24852. items: {},
  24853. estimatedItemSize,
  24854. lastVisitedIndex: -1
  24855. };
  24856. cache.clearCacheAfterIndex = (index, forceUpdate = true) => {
  24857. cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1);
  24858. instance.exposed?.getItemStyleCache(-1);
  24859. if (forceUpdate) instance.proxy?.$forceUpdate();
  24860. };
  24861. return cache;
  24862. },
  24863. clearCache: false,
  24864. validateProps: ({ itemSize }) => {
  24865. if (typeof itemSize !== "function") throwError(SCOPE$7, `
  24866. itemSize is required as function, but the given value was ${typeof itemSize}
  24867. `);
  24868. }
  24869. });
  24870. //#endregion
  24871. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-wheel.mjs
  24872. var useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, onWheelDelta) => {
  24873. let frameHandle = null;
  24874. let xOffset = 0;
  24875. let yOffset = 0;
  24876. const hasReachedEdge = (x, y) => {
  24877. const xEdgeReached = x < 0 && atXStartEdge.value || x > 0 && atXEndEdge.value;
  24878. const yEdgeReached = y < 0 && atYStartEdge.value || y > 0 && atYEndEdge.value;
  24879. return xEdgeReached || yEdgeReached;
  24880. };
  24881. const onWheel = (e) => {
  24882. cAF(frameHandle);
  24883. let x = e.deltaX;
  24884. let y = e.deltaY;
  24885. if (Math.abs(x) > Math.abs(y)) y = 0;
  24886. else x = 0;
  24887. if (e.shiftKey && y !== 0) {
  24888. x = y;
  24889. y = 0;
  24890. }
  24891. if (hasReachedEdge(x, y)) {
  24892. if (e.deltaX !== 0 && x === 0) e.preventDefault();
  24893. return;
  24894. }
  24895. xOffset += x;
  24896. yOffset += y;
  24897. e.preventDefault();
  24898. frameHandle = rAF(() => {
  24899. onWheelDelta(xOffset, yOffset);
  24900. xOffset = 0;
  24901. yOffset = 0;
  24902. });
  24903. };
  24904. return {
  24905. hasReachedEdge,
  24906. onWheel
  24907. };
  24908. };
  24909. //#endregion
  24910. //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-touch.mjs
  24911. var useGridTouch = (windowRef, states, scrollTo, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight) => {
  24912. const touchStartX = ref(0);
  24913. const touchStartY = ref(0);
  24914. let frameHandle;
  24915. let deltaX = 0;
  24916. let deltaY = 0;
  24917. const handleTouchStart = (event) => {
  24918. cAF(frameHandle);
  24919. touchStartX.value = event.touches[0].clientX;
  24920. touchStartY.value = event.touches[0].clientY;
  24921. deltaX = 0;
  24922. deltaY = 0;
  24923. };
  24924. const handleTouchMove = (event) => {
  24925. event.preventDefault();
  24926. cAF(frameHandle);
  24927. deltaX += touchStartX.value - event.touches[0].clientX;
  24928. deltaY += touchStartY.value - event.touches[0].clientY;
  24929. touchStartX.value = event.touches[0].clientX;
  24930. touchStartY.value = event.touches[0].clientY;
  24931. frameHandle = rAF(() => {
  24932. const maxScrollLeft = estimatedTotalWidth.value - unref(parsedWidth);
  24933. const maxScrollTop = estimatedTotalHeight.value - unref(parsedHeight);
  24934. scrollTo({
  24935. scrollLeft: Math.min(states.value.scrollLeft + deltaX, maxScrollLeft),
  24936. scrollTop: Math.min(states.value.scrollTop + deltaY, maxScrollTop)
  24937. });
  24938. deltaX = 0;
  24939. deltaY = 0;
  24940. });
  24941. };
  24942. useEventListener(windowRef, "touchstart", handleTouchStart, { passive: true });
  24943. useEventListener(windowRef, "touchmove", handleTouchMove, { passive: false });
  24944. return {
  24945. touchStartX,
  24946. touchStartY,
  24947. handleTouchStart,
  24948. handleTouchMove
  24949. };
  24950. };
  24951. //#endregion
  24952. //#region node_modules/element-plus/es/components/virtual-list/src/builders/build-grid.mjs
  24953. var createGrid = ({ name, clearCache, getColumnPosition, getColumnStartIndexForOffset, getColumnStopIndexForStartIndex, getEstimatedTotalHeight, getEstimatedTotalWidth, getColumnOffset, getRowOffset, getRowPosition, getRowStartIndexForOffset, getRowStopIndexForStartIndex, initCache, injectToInstance, validateProps }) => {
  24954. return defineComponent({
  24955. name: name ?? "ElVirtualList",
  24956. props: virtualizedGridProps,
  24957. emits: [ITEM_RENDER_EVT, SCROLL_EVT],
  24958. setup(props, { emit, expose, slots }) {
  24959. const ns = useNamespace("vl");
  24960. validateProps(props);
  24961. const instance = getCurrentInstance();
  24962. const cache = ref(initCache(props, instance));
  24963. injectToInstance?.(instance, cache);
  24964. const windowRef = ref();
  24965. const hScrollbar = ref();
  24966. const vScrollbar = ref();
  24967. const innerRef = ref();
  24968. const states = ref({
  24969. isScrolling: false,
  24970. scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,
  24971. scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0,
  24972. updateRequested: false,
  24973. xAxisScrollDir: FORWARD,
  24974. yAxisScrollDir: FORWARD
  24975. });
  24976. const getItemStyleCache = useCache();
  24977. const parsedHeight = computed(() => Number.parseInt(`${props.height}`, 10));
  24978. const parsedWidth = computed(() => Number.parseInt(`${props.width}`, 10));
  24979. const columnsToRender = computed(() => {
  24980. const { totalColumn, totalRow, columnCache } = props;
  24981. const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states);
  24982. if (totalColumn === 0 || totalRow === 0) return [
  24983. 0,
  24984. 0,
  24985. 0,
  24986. 0
  24987. ];
  24988. const startIndex = getColumnStartIndexForOffset(props, scrollLeft, unref(cache));
  24989. const stopIndex = getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, unref(cache));
  24990. const cacheBackward = !isScrolling || xAxisScrollDir === "backward" ? Math.max(1, columnCache) : 1;
  24991. const cacheForward = !isScrolling || xAxisScrollDir === "forward" ? Math.max(1, columnCache) : 1;
  24992. return [
  24993. Math.max(0, startIndex - cacheBackward),
  24994. Math.max(0, Math.min(totalColumn - 1, stopIndex + cacheForward)),
  24995. startIndex,
  24996. stopIndex
  24997. ];
  24998. });
  24999. const rowsToRender = computed(() => {
  25000. const { totalColumn, totalRow, rowCache } = props;
  25001. const { isScrolling, yAxisScrollDir, scrollTop } = unref(states);
  25002. if (totalColumn === 0 || totalRow === 0) return [
  25003. 0,
  25004. 0,
  25005. 0,
  25006. 0
  25007. ];
  25008. const startIndex = getRowStartIndexForOffset(props, scrollTop, unref(cache));
  25009. const stopIndex = getRowStopIndexForStartIndex(props, startIndex, scrollTop, unref(cache));
  25010. const cacheBackward = !isScrolling || yAxisScrollDir === "backward" ? Math.max(1, rowCache) : 1;
  25011. const cacheForward = !isScrolling || yAxisScrollDir === "forward" ? Math.max(1, rowCache) : 1;
  25012. return [
  25013. Math.max(0, startIndex - cacheBackward),
  25014. Math.max(0, Math.min(totalRow - 1, stopIndex + cacheForward)),
  25015. startIndex,
  25016. stopIndex
  25017. ];
  25018. });
  25019. const estimatedTotalHeight = computed(() => getEstimatedTotalHeight(props, unref(cache)));
  25020. const estimatedTotalWidth = computed(() => getEstimatedTotalWidth(props, unref(cache)));
  25021. const windowStyle = computed(() => [
  25022. {
  25023. position: "relative",
  25024. overflow: "hidden",
  25025. WebkitOverflowScrolling: "touch",
  25026. willChange: "transform"
  25027. },
  25028. {
  25029. direction: props.direction,
  25030. height: isNumber(props.height) ? `${props.height}px` : props.height,
  25031. width: isNumber(props.width) ? `${props.width}px` : props.width
  25032. },
  25033. props.style ?? {}
  25034. ]);
  25035. const innerStyle = computed(() => {
  25036. const width = `${unref(estimatedTotalWidth)}px`;
  25037. return {
  25038. height: `${unref(estimatedTotalHeight)}px`,
  25039. pointerEvents: unref(states).isScrolling ? "none" : void 0,
  25040. width,
  25041. margin: 0,
  25042. boxSizing: "border-box"
  25043. };
  25044. });
  25045. const emitEvents = () => {
  25046. const { totalColumn, totalRow } = props;
  25047. if (totalColumn > 0 && totalRow > 0) {
  25048. const [columnCacheStart, columnCacheEnd, columnVisibleStart, columnVisibleEnd] = unref(columnsToRender);
  25049. const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] = unref(rowsToRender);
  25050. emit(ITEM_RENDER_EVT, {
  25051. columnCacheStart,
  25052. columnCacheEnd,
  25053. rowCacheStart,
  25054. rowCacheEnd,
  25055. columnVisibleStart,
  25056. columnVisibleEnd,
  25057. rowVisibleStart,
  25058. rowVisibleEnd
  25059. });
  25060. }
  25061. const { scrollLeft, scrollTop, updateRequested, xAxisScrollDir, yAxisScrollDir } = unref(states);
  25062. emit(SCROLL_EVT, {
  25063. xAxisScrollDir,
  25064. scrollLeft,
  25065. yAxisScrollDir,
  25066. scrollTop,
  25067. updateRequested
  25068. });
  25069. };
  25070. const onScroll = (e) => {
  25071. const { clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth } = e.currentTarget;
  25072. const _states = unref(states);
  25073. if (_states.scrollTop === scrollTop && _states.scrollLeft === scrollLeft) return;
  25074. let _scrollLeft = scrollLeft;
  25075. if (isRTL(props.direction)) switch (getRTLOffsetType()) {
  25076. case RTL_OFFSET_NAG:
  25077. _scrollLeft = -scrollLeft;
  25078. break;
  25079. case RTL_OFFSET_POS_DESC:
  25080. _scrollLeft = scrollWidth - clientWidth - scrollLeft;
  25081. break;
  25082. }
  25083. states.value = {
  25084. ..._states,
  25085. isScrolling: true,
  25086. scrollLeft: _scrollLeft,
  25087. scrollTop: Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight)),
  25088. updateRequested: true,
  25089. xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),
  25090. yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop)
  25091. };
  25092. nextTick(() => resetIsScrolling());
  25093. onUpdated();
  25094. emitEvents();
  25095. };
  25096. const onVerticalScroll = (distance, totalSteps) => {
  25097. const height = unref(parsedHeight);
  25098. const offset = (estimatedTotalHeight.value - height) / totalSteps * distance;
  25099. scrollTo({ scrollTop: Math.min(estimatedTotalHeight.value - height, offset) });
  25100. };
  25101. const onHorizontalScroll = (distance, totalSteps) => {
  25102. const width = unref(parsedWidth);
  25103. const offset = (estimatedTotalWidth.value - width) / totalSteps * distance;
  25104. scrollTo({ scrollLeft: Math.min(estimatedTotalWidth.value - width, offset) });
  25105. };
  25106. const { onWheel } = useGridWheel({
  25107. atXStartEdge: computed(() => states.value.scrollLeft <= 0),
  25108. atXEndEdge: computed(() => states.value.scrollLeft >= estimatedTotalWidth.value - unref(parsedWidth)),
  25109. atYStartEdge: computed(() => states.value.scrollTop <= 0),
  25110. atYEndEdge: computed(() => states.value.scrollTop >= estimatedTotalHeight.value - unref(parsedHeight))
  25111. }, (x, y) => {
  25112. hScrollbar.value?.onMouseUp?.();
  25113. vScrollbar.value?.onMouseUp?.();
  25114. const width = unref(parsedWidth);
  25115. const height = unref(parsedHeight);
  25116. scrollTo({
  25117. scrollLeft: Math.min(states.value.scrollLeft + x, estimatedTotalWidth.value - width),
  25118. scrollTop: Math.min(states.value.scrollTop + y, estimatedTotalHeight.value - height)
  25119. });
  25120. });
  25121. useEventListener(windowRef, "wheel", onWheel, { passive: false });
  25122. const scrollTo = ({ scrollLeft = states.value.scrollLeft, scrollTop = states.value.scrollTop }) => {
  25123. scrollLeft = Math.max(scrollLeft, 0);
  25124. scrollTop = Math.max(scrollTop, 0);
  25125. const _states = unref(states);
  25126. if (scrollTop === _states.scrollTop && scrollLeft === _states.scrollLeft) return;
  25127. states.value = {
  25128. ..._states,
  25129. xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),
  25130. yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),
  25131. scrollLeft,
  25132. scrollTop,
  25133. updateRequested: true
  25134. };
  25135. nextTick(() => resetIsScrolling());
  25136. onUpdated();
  25137. emitEvents();
  25138. };
  25139. const { touchStartX, touchStartY, handleTouchStart, handleTouchMove } = useGridTouch(windowRef, states, scrollTo, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight);
  25140. const scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => {
  25141. const _states = unref(states);
  25142. columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn - 1));
  25143. rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow - 1));
  25144. const scrollBarWidth = getScrollBarWidth(ns.namespace.value);
  25145. const _cache = unref(cache);
  25146. const estimatedHeight = getEstimatedTotalHeight(props, _cache);
  25147. const estimatedWidth = getEstimatedTotalWidth(props, _cache);
  25148. scrollTo({
  25149. scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth : 0),
  25150. scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth : 0)
  25151. });
  25152. };
  25153. const getItemStyle = (rowIndex, columnIndex) => {
  25154. const { columnWidth, direction, rowHeight } = props;
  25155. const itemStyleCache = getItemStyleCache.value(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction);
  25156. const key = `${rowIndex},${columnIndex}`;
  25157. if (hasOwn(itemStyleCache, key)) return itemStyleCache[key];
  25158. else {
  25159. const [, left] = getColumnPosition(props, columnIndex, unref(cache));
  25160. const _cache = unref(cache);
  25161. const rtl = isRTL(direction);
  25162. const [height, top] = getRowPosition(props, rowIndex, _cache);
  25163. const [width] = getColumnPosition(props, columnIndex, _cache);
  25164. itemStyleCache[key] = {
  25165. position: "absolute",
  25166. left: rtl ? void 0 : `${left}px`,
  25167. right: rtl ? `${left}px` : void 0,
  25168. top: `${top}px`,
  25169. height: `${height}px`,
  25170. width: `${width}px`
  25171. };
  25172. return itemStyleCache[key];
  25173. }
  25174. };
  25175. const resetIsScrolling = () => {
  25176. states.value.isScrolling = false;
  25177. nextTick(() => {
  25178. getItemStyleCache.value(-1, null, null);
  25179. });
  25180. };
  25181. onMounted(() => {
  25182. if (!isClient) return;
  25183. const { initScrollLeft, initScrollTop } = props;
  25184. const windowElement = unref(windowRef);
  25185. if (windowElement) {
  25186. if (isNumber(initScrollLeft)) windowElement.scrollLeft = initScrollLeft;
  25187. if (isNumber(initScrollTop)) windowElement.scrollTop = initScrollTop;
  25188. }
  25189. emitEvents();
  25190. });
  25191. const onUpdated = () => {
  25192. const { direction } = props;
  25193. const { scrollLeft, scrollTop, updateRequested } = unref(states);
  25194. const windowElement = unref(windowRef);
  25195. if (updateRequested && windowElement) {
  25196. if (direction === "rtl") switch (getRTLOffsetType()) {
  25197. case RTL_OFFSET_NAG:
  25198. windowElement.scrollLeft = -scrollLeft;
  25199. break;
  25200. case RTL_OFFSET_POS_ASC:
  25201. windowElement.scrollLeft = scrollLeft;
  25202. break;
  25203. default: {
  25204. const { clientWidth, scrollWidth } = windowElement;
  25205. windowElement.scrollLeft = scrollWidth - clientWidth - scrollLeft;
  25206. break;
  25207. }
  25208. }
  25209. else windowElement.scrollLeft = Math.max(0, scrollLeft);
  25210. windowElement.scrollTop = Math.max(0, scrollTop);
  25211. }
  25212. };
  25213. const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } = instance.proxy;
  25214. expose({
  25215. windowRef,
  25216. innerRef,
  25217. getItemStyleCache,
  25218. touchStartX,
  25219. touchStartY,
  25220. handleTouchStart,
  25221. handleTouchMove,
  25222. scrollTo,
  25223. scrollToItem,
  25224. states,
  25225. resetAfterColumnIndex,
  25226. resetAfterRowIndex,
  25227. resetAfter
  25228. });
  25229. const renderScrollbars = () => {
  25230. const { scrollbarAlwaysOn, scrollbarStartGap, scrollbarEndGap, totalColumn, totalRow } = props;
  25231. const width = unref(parsedWidth);
  25232. const height = unref(parsedHeight);
  25233. const estimatedWidth = unref(estimatedTotalWidth);
  25234. const estimatedHeight = unref(estimatedTotalHeight);
  25235. const { scrollLeft, scrollTop } = unref(states);
  25236. return {
  25237. horizontalScrollbar: h$1(ScrollBar, {
  25238. ref: hScrollbar,
  25239. alwaysOn: scrollbarAlwaysOn,
  25240. startGap: scrollbarStartGap,
  25241. endGap: scrollbarEndGap,
  25242. class: ns.e("horizontal"),
  25243. clientSize: width,
  25244. layout: "horizontal",
  25245. onScroll: onHorizontalScroll,
  25246. ratio: width * 100 / estimatedWidth,
  25247. scrollFrom: scrollLeft / (estimatedWidth - width),
  25248. total: totalRow,
  25249. visible: true
  25250. }),
  25251. verticalScrollbar: h$1(ScrollBar, {
  25252. ref: vScrollbar,
  25253. alwaysOn: scrollbarAlwaysOn,
  25254. startGap: scrollbarStartGap,
  25255. endGap: scrollbarEndGap,
  25256. class: ns.e("vertical"),
  25257. clientSize: height,
  25258. layout: "vertical",
  25259. onScroll: onVerticalScroll,
  25260. ratio: height * 100 / estimatedHeight,
  25261. scrollFrom: scrollTop / (estimatedHeight - height),
  25262. total: totalColumn,
  25263. visible: true
  25264. })
  25265. };
  25266. };
  25267. const renderItems = () => {
  25268. const [columnStart, columnEnd] = unref(columnsToRender);
  25269. const [rowStart, rowEnd] = unref(rowsToRender);
  25270. const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props;
  25271. const children = [];
  25272. if (totalRow > 0 && totalColumn > 0) for (let row = rowStart; row <= rowEnd; row++) for (let column = columnStart; column <= columnEnd; column++) {
  25273. const key = itemKey({
  25274. columnIndex: column,
  25275. data,
  25276. rowIndex: row
  25277. });
  25278. children.push(h$1(Fragment, { key }, slots.default?.({
  25279. columnIndex: column,
  25280. data,
  25281. isScrolling: useIsScrolling ? unref(states).isScrolling : void 0,
  25282. style: getItemStyle(row, column),
  25283. rowIndex: row
  25284. })));
  25285. }
  25286. return children;
  25287. };
  25288. const renderInner = () => {
  25289. const Inner = resolveDynamicComponent(props.innerElement);
  25290. const children = renderItems();
  25291. return [h$1(Inner, mergeProps(props.innerProps, {
  25292. style: unref(innerStyle),
  25293. ref: innerRef
  25294. }), !isString(Inner) ? { default: () => children } : children)];
  25295. };
  25296. const renderWindow = () => {
  25297. const Container = resolveDynamicComponent(props.containerElement);
  25298. const { horizontalScrollbar, verticalScrollbar } = renderScrollbars();
  25299. const Inner = renderInner();
  25300. return h$1("div", {
  25301. key: 0,
  25302. class: ns.e("wrapper"),
  25303. role: props.role
  25304. }, [
  25305. h$1(Container, {
  25306. class: props.className,
  25307. style: unref(windowStyle),
  25308. onScroll,
  25309. ref: windowRef
  25310. }, !isString(Container) ? { default: () => Inner } : Inner),
  25311. horizontalScrollbar,
  25312. verticalScrollbar
  25313. ]);
  25314. };
  25315. return renderWindow;
  25316. }
  25317. });
  25318. };
  25319. //#endregion
  25320. //#region node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs
  25321. var SCOPE$6 = "ElFixedSizeGrid";
  25322. var FixedSizeGrid = createGrid({
  25323. name: "ElFixedSizeGrid",
  25324. getColumnPosition: ({ columnWidth }, index) => [columnWidth, index * columnWidth],
  25325. getRowPosition: ({ rowHeight }, index) => [rowHeight, index * rowHeight],
  25326. getEstimatedTotalHeight: ({ totalRow, rowHeight }) => rowHeight * totalRow,
  25327. getEstimatedTotalWidth: ({ totalColumn, columnWidth }) => columnWidth * totalColumn,
  25328. getColumnOffset: ({ totalColumn, columnWidth, width }, columnIndex, alignment, scrollLeft, _, scrollBarWidth) => {
  25329. width = Number(width);
  25330. const lastColumnOffset = Math.max(0, totalColumn * columnWidth - width);
  25331. const maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);
  25332. const minOffset = Math.max(0, columnIndex * columnWidth - width + scrollBarWidth + columnWidth);
  25333. if (alignment === "smart") if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) alignment = AUTO_ALIGNMENT;
  25334. else alignment = CENTERED_ALIGNMENT;
  25335. switch (alignment) {
  25336. case START_ALIGNMENT: return maxOffset;
  25337. case "end": return minOffset;
  25338. case CENTERED_ALIGNMENT: {
  25339. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  25340. if (middleOffset < Math.ceil(width / 2)) return 0;
  25341. else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) return lastColumnOffset;
  25342. else return middleOffset;
  25343. }
  25344. case AUTO_ALIGNMENT:
  25345. default: if (scrollLeft >= minOffset && scrollLeft <= maxOffset) return scrollLeft;
  25346. else if (minOffset > maxOffset) return minOffset;
  25347. else if (scrollLeft < minOffset) return minOffset;
  25348. else return maxOffset;
  25349. }
  25350. },
  25351. getRowOffset: ({ rowHeight, height, totalRow }, rowIndex, align, scrollTop, _, scrollBarWidth) => {
  25352. height = Number(height);
  25353. const lastRowOffset = Math.max(0, totalRow * rowHeight - height);
  25354. const maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);
  25355. const minOffset = Math.max(0, rowIndex * rowHeight - height + scrollBarWidth + rowHeight);
  25356. if (align === "smart") if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) align = AUTO_ALIGNMENT;
  25357. else align = CENTERED_ALIGNMENT;
  25358. switch (align) {
  25359. case START_ALIGNMENT: return maxOffset;
  25360. case "end": return minOffset;
  25361. case CENTERED_ALIGNMENT: {
  25362. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  25363. if (middleOffset < Math.ceil(height / 2)) return 0;
  25364. else if (middleOffset > lastRowOffset + Math.floor(height / 2)) return lastRowOffset;
  25365. else return middleOffset;
  25366. }
  25367. case AUTO_ALIGNMENT:
  25368. default: if (scrollTop >= minOffset && scrollTop <= maxOffset) return scrollTop;
  25369. else if (minOffset > maxOffset) return minOffset;
  25370. else if (scrollTop < minOffset) return minOffset;
  25371. else return maxOffset;
  25372. }
  25373. },
  25374. getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max(0, Math.min(totalColumn - 1, Math.floor(scrollLeft / columnWidth))),
  25375. getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => {
  25376. const left = startIndex * columnWidth;
  25377. const visibleColumnsCount = Math.ceil((width + scrollLeft - left) / columnWidth);
  25378. return Math.max(0, Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1));
  25379. },
  25380. getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max(0, Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight))),
  25381. getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => {
  25382. const top = startIndex * rowHeight;
  25383. const numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);
  25384. return Math.max(0, Math.min(totalRow - 1, startIndex + numVisibleRows - 1));
  25385. },
  25386. /**
  25387. * Fixed size grid does not need this cache
  25388. * Using any to bypass it, TODO: Using type inference to fix this.
  25389. */
  25390. initCache: () => void 0,
  25391. clearCache: true,
  25392. validateProps: ({ columnWidth, rowHeight }) => {
  25393. if (!isNumber(columnWidth)) throwError(SCOPE$6, `
  25394. "columnWidth" must be passed as number,
  25395. instead ${typeof columnWidth} was given.
  25396. `);
  25397. if (!isNumber(rowHeight)) throwError(SCOPE$6, `
  25398. "columnWidth" must be passed as number,
  25399. instead ${typeof rowHeight} was given.
  25400. `);
  25401. }
  25402. });
  25403. //#endregion
  25404. //#region node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs
  25405. var { max, min, floor } = Math;
  25406. var SCOPE$5 = "ElDynamicSizeGrid";
  25407. var ACCESS_SIZER_KEY_MAP = {
  25408. column: "columnWidth",
  25409. row: "rowHeight"
  25410. };
  25411. var ACCESS_LAST_VISITED_KEY_MAP = {
  25412. column: "lastVisitedColumnIndex",
  25413. row: "lastVisitedRowIndex"
  25414. };
  25415. var getItemFromCache = (props, index, gridCache, type) => {
  25416. const [cachedItems, sizer, lastVisited] = [
  25417. gridCache[type],
  25418. props[ACCESS_SIZER_KEY_MAP[type]],
  25419. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]
  25420. ];
  25421. if (index > lastVisited) {
  25422. let offset = 0;
  25423. if (lastVisited >= 0) {
  25424. const item = cachedItems[lastVisited];
  25425. offset = item.offset + item.size;
  25426. }
  25427. for (let i = lastVisited + 1; i <= index; i++) {
  25428. const size = sizer(i);
  25429. cachedItems[i] = {
  25430. offset,
  25431. size
  25432. };
  25433. offset += size;
  25434. }
  25435. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]] = index;
  25436. }
  25437. return cachedItems[index];
  25438. };
  25439. var bs = (props, gridCache, low, high, offset, type) => {
  25440. while (low <= high) {
  25441. const mid = low + floor((high - low) / 2);
  25442. const currentOffset = getItemFromCache(props, mid, gridCache, type).offset;
  25443. if (currentOffset === offset) return mid;
  25444. else if (currentOffset < offset) low = mid + 1;
  25445. else high = mid - 1;
  25446. }
  25447. return max(0, low - 1);
  25448. };
  25449. var es = (props, gridCache, idx, offset, type) => {
  25450. const total = type === "column" ? props.totalColumn : props.totalRow;
  25451. let exponent = 1;
  25452. while (idx < total && getItemFromCache(props, idx, gridCache, type).offset < offset) {
  25453. idx += exponent;
  25454. exponent *= 2;
  25455. }
  25456. return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type);
  25457. };
  25458. var findItem = (props, gridCache, offset, type) => {
  25459. const [cache, lastVisitedIndex] = [gridCache[type], gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]];
  25460. if ((lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0) >= offset) return bs(props, gridCache, 0, lastVisitedIndex, offset, type);
  25461. return es(props, gridCache, max(0, lastVisitedIndex), offset, type);
  25462. };
  25463. var getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => {
  25464. let sizeOfVisitedRows = 0;
  25465. if (lastVisitedRowIndex >= totalRow) lastVisitedRowIndex = totalRow - 1;
  25466. if (lastVisitedRowIndex >= 0) {
  25467. const item = row[lastVisitedRowIndex];
  25468. sizeOfVisitedRows = item.offset + item.size;
  25469. }
  25470. const sizeOfUnvisitedItems = (totalRow - lastVisitedRowIndex - 1) * estimatedRowHeight;
  25471. return sizeOfVisitedRows + sizeOfUnvisitedItems;
  25472. };
  25473. var getEstimatedTotalWidth = ({ totalColumn }, { column, estimatedColumnWidth, lastVisitedColumnIndex }) => {
  25474. let sizeOfVisitedColumns = 0;
  25475. if (lastVisitedColumnIndex > totalColumn) lastVisitedColumnIndex = totalColumn - 1;
  25476. if (lastVisitedColumnIndex >= 0) {
  25477. const item = column[lastVisitedColumnIndex];
  25478. sizeOfVisitedColumns = item.offset + item.size;
  25479. }
  25480. const sizeOfUnvisitedItems = (totalColumn - lastVisitedColumnIndex - 1) * estimatedColumnWidth;
  25481. return sizeOfVisitedColumns + sizeOfUnvisitedItems;
  25482. };
  25483. var ACCESS_ESTIMATED_SIZE_KEY_MAP = {
  25484. column: getEstimatedTotalWidth,
  25485. row: getEstimatedTotalHeight
  25486. };
  25487. var getOffset$1 = (props, index, alignment, scrollOffset, cache, type, scrollBarWidth) => {
  25488. const [size, estimatedSizeAssociates] = [type === "row" ? props.height : props.width, ACCESS_ESTIMATED_SIZE_KEY_MAP[type]];
  25489. const item = getItemFromCache(props, index, cache, type);
  25490. const maxOffset = max(0, min(estimatedSizeAssociates(props, cache) - size, item.offset));
  25491. const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);
  25492. if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
  25493. else alignment = CENTERED_ALIGNMENT;
  25494. switch (alignment) {
  25495. case START_ALIGNMENT: return maxOffset;
  25496. case "end": return minOffset;
  25497. case CENTERED_ALIGNMENT: return Math.round(minOffset + (maxOffset - minOffset) / 2);
  25498. case AUTO_ALIGNMENT:
  25499. default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
  25500. else if (minOffset > maxOffset) return minOffset;
  25501. else if (scrollOffset < minOffset) return minOffset;
  25502. else return maxOffset;
  25503. }
  25504. };
  25505. var DynamicSizeGrid = createGrid({
  25506. name: "ElDynamicSizeGrid",
  25507. getColumnPosition: (props, idx, cache) => {
  25508. const item = getItemFromCache(props, idx, cache, "column");
  25509. return [item.size, item.offset];
  25510. },
  25511. getRowPosition: (props, idx, cache) => {
  25512. const item = getItemFromCache(props, idx, cache, "row");
  25513. return [item.size, item.offset];
  25514. },
  25515. getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset$1(props, columnIndex, alignment, scrollLeft, cache, "column", scrollBarWidth),
  25516. getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset$1(props, rowIndex, alignment, scrollTop, cache, "row", scrollBarWidth),
  25517. getColumnStartIndexForOffset: (props, scrollLeft, cache) => findItem(props, cache, scrollLeft, "column"),
  25518. getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {
  25519. const item = getItemFromCache(props, startIndex, cache, "column");
  25520. const maxOffset = scrollLeft + props.width;
  25521. let offset = item.offset + item.size;
  25522. let stopIndex = startIndex;
  25523. while (stopIndex < props.totalColumn - 1 && offset < maxOffset) {
  25524. stopIndex++;
  25525. offset += getItemFromCache(props, startIndex, cache, "column").size;
  25526. }
  25527. return stopIndex;
  25528. },
  25529. getEstimatedTotalHeight,
  25530. getEstimatedTotalWidth,
  25531. getRowStartIndexForOffset: (props, scrollTop, cache) => findItem(props, cache, scrollTop, "row"),
  25532. getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {
  25533. const { totalRow, height } = props;
  25534. const item = getItemFromCache(props, startIndex, cache, "row");
  25535. const maxOffset = scrollTop + height;
  25536. let offset = item.size + item.offset;
  25537. let stopIndex = startIndex;
  25538. while (stopIndex < totalRow - 1 && offset < maxOffset) {
  25539. stopIndex++;
  25540. offset += getItemFromCache(props, stopIndex, cache, "row").size;
  25541. }
  25542. return stopIndex;
  25543. },
  25544. injectToInstance: (instance, cache) => {
  25545. const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => {
  25546. forceUpdate = isUndefined(forceUpdate) ? true : forceUpdate;
  25547. if (isNumber(columnIndex)) cache.value.lastVisitedColumnIndex = Math.min(cache.value.lastVisitedColumnIndex, columnIndex - 1);
  25548. if (isNumber(rowIndex)) cache.value.lastVisitedRowIndex = Math.min(cache.value.lastVisitedRowIndex, rowIndex - 1);
  25549. instance.exposed?.getItemStyleCache.value(-1, null, null);
  25550. if (forceUpdate) instance.proxy?.$forceUpdate();
  25551. };
  25552. const resetAfterColumnIndex = (columnIndex, forceUpdate) => {
  25553. resetAfter({ columnIndex }, forceUpdate);
  25554. };
  25555. const resetAfterRowIndex = (rowIndex, forceUpdate) => {
  25556. resetAfter({ rowIndex }, forceUpdate);
  25557. };
  25558. Object.assign(instance.proxy, {
  25559. resetAfterColumnIndex,
  25560. resetAfterRowIndex,
  25561. resetAfter
  25562. });
  25563. },
  25564. initCache: ({ estimatedColumnWidth = 50, estimatedRowHeight = 50 }) => {
  25565. return {
  25566. column: {},
  25567. estimatedColumnWidth,
  25568. estimatedRowHeight,
  25569. lastVisitedColumnIndex: -1,
  25570. lastVisitedRowIndex: -1,
  25571. row: {}
  25572. };
  25573. },
  25574. clearCache: false,
  25575. validateProps: ({ columnWidth, rowHeight }) => {
  25576. if (!isFunction$1(columnWidth)) throwError(SCOPE$5, `
  25577. "columnWidth" must be passed as function,
  25578. instead ${typeof columnWidth} was given.
  25579. `);
  25580. if (!isFunction$1(rowHeight)) throwError(SCOPE$5, `
  25581. "rowHeight" must be passed as function,
  25582. instead ${typeof rowHeight} was given.
  25583. `);
  25584. }
  25585. });
  25586. //#endregion
  25587. //#region node_modules/element-plus/es/components/checkbox/src/checkbox.mjs
  25588. /**
  25589. * @deprecated Removed after 3.0.0, Use `CheckboxProps` instead.
  25590. */
  25591. var checkboxProps = {
  25592. /**
  25593. * @description binding value
  25594. */
  25595. modelValue: {
  25596. type: [
  25597. Number,
  25598. String,
  25599. Boolean
  25600. ],
  25601. default: void 0
  25602. },
  25603. /**
  25604. * @description label of the Checkbox when used inside a `checkbox-group`
  25605. */
  25606. label: {
  25607. type: [
  25608. String,
  25609. Boolean,
  25610. Number,
  25611. Object
  25612. ],
  25613. default: void 0
  25614. },
  25615. /**
  25616. * @description value of the Checkbox when used inside a `checkbox-group`
  25617. */
  25618. value: {
  25619. type: [
  25620. String,
  25621. Boolean,
  25622. Number,
  25623. Object
  25624. ],
  25625. default: void 0
  25626. },
  25627. /**
  25628. * @description Set indeterminate state, only responsible for style control
  25629. */
  25630. indeterminate: Boolean,
  25631. /**
  25632. * @description whether the Checkbox is disabled
  25633. */
  25634. disabled: {
  25635. type: Boolean,
  25636. default: void 0
  25637. },
  25638. /**
  25639. * @description if the Checkbox is checked
  25640. */
  25641. checked: Boolean,
  25642. /**
  25643. * @description native 'name' attribute
  25644. */
  25645. name: {
  25646. type: String,
  25647. default: void 0
  25648. },
  25649. /**
  25650. * @description value of the Checkbox if it's checked
  25651. */
  25652. trueValue: {
  25653. type: [String, Number],
  25654. default: void 0
  25655. },
  25656. /**
  25657. * @description value of the Checkbox if it's not checked
  25658. */
  25659. falseValue: {
  25660. type: [String, Number],
  25661. default: void 0
  25662. },
  25663. /**
  25664. * @deprecated use `trueValue` instead
  25665. * @description value of the Checkbox if it's checked
  25666. */
  25667. trueLabel: {
  25668. type: [String, Number],
  25669. default: void 0
  25670. },
  25671. /**
  25672. * @deprecated use `falseValue` instead
  25673. * @description value of the Checkbox if it's not checked
  25674. */
  25675. falseLabel: {
  25676. type: [String, Number],
  25677. default: void 0
  25678. },
  25679. /**
  25680. * @description input id
  25681. */
  25682. id: {
  25683. type: String,
  25684. default: void 0
  25685. },
  25686. /**
  25687. * @description whether to add a border around Checkbox
  25688. */
  25689. border: Boolean,
  25690. /**
  25691. * @description size of the Checkbox
  25692. */
  25693. size: useSizeProp,
  25694. /**
  25695. * @description input tabindex
  25696. */
  25697. tabindex: [String, Number],
  25698. /**
  25699. * @description whether to trigger form validation
  25700. */
  25701. validateEvent: {
  25702. type: Boolean,
  25703. default: true
  25704. },
  25705. ariaLabel: String,
  25706. ...useAriaProps(["ariaControls"])
  25707. };
  25708. var checkboxEmits = {
  25709. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
  25710. change: (val) => isString(val) || isNumber(val) || isBoolean(val)
  25711. };
  25712. var checkboxPropsDefaults = {
  25713. modelValue: void 0,
  25714. label: void 0,
  25715. value: void 0,
  25716. disabled: void 0,
  25717. name: void 0,
  25718. trueValue: void 0,
  25719. falseValue: void 0,
  25720. trueLabel: void 0,
  25721. falseLabel: void 0,
  25722. id: void 0,
  25723. validateEvent: true
  25724. };
  25725. //#endregion
  25726. //#region node_modules/element-plus/es/components/checkbox/src/constants.mjs
  25727. var checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
  25728. //#endregion
  25729. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-group.mjs
  25730. /**
  25731. * @deprecated Removed after 3.0.0, Use `CheckboxGroupProps` instead.
  25732. */
  25733. var checkboxGroupProps = buildProps({
  25734. /**
  25735. * @description binding value
  25736. */
  25737. modelValue: {
  25738. type: definePropType(Array),
  25739. default: () => []
  25740. },
  25741. /**
  25742. * @description whether the nesting checkboxes are disabled
  25743. */
  25744. disabled: {
  25745. type: Boolean,
  25746. default: void 0
  25747. },
  25748. /**
  25749. * @description minimum number of checkbox checked
  25750. */
  25751. min: Number,
  25752. /**
  25753. * @description maximum number of checkbox checked
  25754. */
  25755. max: Number,
  25756. /**
  25757. * @description size of checkbox
  25758. */
  25759. size: useSizeProp,
  25760. /**
  25761. * @description border and background color when button is active
  25762. */
  25763. fill: String,
  25764. /**
  25765. * @description font color when button is active
  25766. */
  25767. textColor: String,
  25768. /**
  25769. * @description element tag of the checkbox group
  25770. */
  25771. tag: {
  25772. type: String,
  25773. default: "div"
  25774. },
  25775. /**
  25776. * @description whether to trigger form validation
  25777. */
  25778. validateEvent: {
  25779. type: Boolean,
  25780. default: true
  25781. },
  25782. options: { type: definePropType(Array) },
  25783. props: {
  25784. type: definePropType(Object),
  25785. default: () => checkboxDefaultProps
  25786. },
  25787. type: {
  25788. type: String,
  25789. values: ["checkbox", "button"],
  25790. default: "checkbox"
  25791. },
  25792. ...useAriaProps(["ariaLabel"])
  25793. });
  25794. var checkboxGroupEmits = {
  25795. [UPDATE_MODEL_EVENT]: (val) => isArray$1(val),
  25796. change: (val) => isArray$1(val)
  25797. };
  25798. var checkboxDefaultProps = {
  25799. label: "label",
  25800. value: "value",
  25801. disabled: "disabled"
  25802. };
  25803. //#endregion
  25804. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-disabled.mjs
  25805. var useCheckboxDisabled = ({ model, isChecked }) => {
  25806. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  25807. const formContext = inject(formContextKey, void 0);
  25808. const isLimitDisabled = computed(() => {
  25809. const max = checkboxGroup?.max?.value;
  25810. const min = checkboxGroup?.min?.value;
  25811. return !isUndefined(max) && model.value.length >= max && !isChecked.value || !isUndefined(min) && model.value.length <= min && isChecked.value;
  25812. });
  25813. return {
  25814. isDisabled: useFormDisabled(computed(() => {
  25815. if (checkboxGroup === void 0) return formContext?.disabled ?? isLimitDisabled.value;
  25816. else return checkboxGroup.disabled?.value || isLimitDisabled.value;
  25817. })),
  25818. isLimitDisabled
  25819. };
  25820. };
  25821. //#endregion
  25822. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-event.mjs
  25823. var useCheckboxEvent = (props, { model, isLimitExceeded, hasOwnLabel, isDisabled, isLabeledByFormItem }) => {
  25824. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  25825. const { formItem } = useFormItem();
  25826. const { emit } = getCurrentInstance();
  25827. function getLabeledValue(value) {
  25828. return [
  25829. true,
  25830. props.trueValue,
  25831. props.trueLabel
  25832. ].includes(value) ? props.trueValue ?? props.trueLabel ?? true : props.falseValue ?? props.falseLabel ?? false;
  25833. }
  25834. function emitChangeEvent(checked, e) {
  25835. emit(CHANGE_EVENT, getLabeledValue(checked), e);
  25836. }
  25837. function handleChange(e) {
  25838. if (isLimitExceeded.value) return;
  25839. const target = e.target;
  25840. emit(CHANGE_EVENT, getLabeledValue(target.checked), e);
  25841. }
  25842. async function onClickRoot(e) {
  25843. if (isLimitExceeded.value) return;
  25844. if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
  25845. if (!e.composedPath().some((item) => item.tagName === "LABEL")) {
  25846. model.value = getLabeledValue([
  25847. false,
  25848. props.falseValue,
  25849. props.falseLabel
  25850. ].includes(model.value));
  25851. await nextTick();
  25852. emitChangeEvent(model.value, e);
  25853. }
  25854. }
  25855. }
  25856. const validateEvent = computed(() => checkboxGroup?.validateEvent || props.validateEvent);
  25857. watch(() => props.modelValue, () => {
  25858. if (validateEvent.value) formItem?.validate("change").catch(NOOP);
  25859. });
  25860. return {
  25861. handleChange,
  25862. onClickRoot
  25863. };
  25864. };
  25865. //#endregion
  25866. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-model.mjs
  25867. var useCheckboxModel = (props) => {
  25868. const selfModel = ref(false);
  25869. const { emit, vnode } = getCurrentInstance();
  25870. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  25871. const isGroup = computed(() => isUndefined(checkboxGroup) === false);
  25872. const isLimitExceeded = ref(false);
  25873. const isControlled = computed(() => {
  25874. const rawProps = vnode.props ?? {};
  25875. return "modelValue" in rawProps || "model-value" in rawProps;
  25876. });
  25877. const model = computed({
  25878. get() {
  25879. return isGroup.value ? checkboxGroup?.modelValue?.value : !isControlled.value ? selfModel.value : props.modelValue;
  25880. },
  25881. set(val) {
  25882. if (isGroup.value && isArray$1(val)) {
  25883. isLimitExceeded.value = checkboxGroup?.max?.value !== void 0 && val.length > checkboxGroup?.max.value && val.length > model.value.length;
  25884. isLimitExceeded.value === false && checkboxGroup?.changeEvent?.(val);
  25885. } else {
  25886. emit(UPDATE_MODEL_EVENT, val);
  25887. selfModel.value = val;
  25888. }
  25889. }
  25890. });
  25891. return {
  25892. model,
  25893. isGroup,
  25894. isLimitExceeded
  25895. };
  25896. };
  25897. //#endregion
  25898. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-status.mjs
  25899. var useCheckboxStatus = (props, slots, { model }) => {
  25900. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  25901. const isFocused = ref(false);
  25902. const actualValue = computed(() => {
  25903. if (!isPropAbsent(props.value)) return props.value;
  25904. return props.label;
  25905. });
  25906. const isChecked = computed(() => {
  25907. const value = model.value;
  25908. if (isBoolean(value)) return value;
  25909. else if (isArray$1(value)) if (isObject$2(actualValue.value)) return value.map(toRaw).some((o) => isEqual$1(o, actualValue.value));
  25910. else return value.map(toRaw).includes(actualValue.value);
  25911. else if (value !== null && value !== void 0) return value === props.trueValue || value === props.trueLabel;
  25912. else return !!value;
  25913. });
  25914. return {
  25915. checkboxButtonSize: useFormSize(computed(() => checkboxGroup?.size?.value), { prop: true }),
  25916. isChecked,
  25917. isFocused,
  25918. checkboxSize: useFormSize(computed(() => checkboxGroup?.size?.value)),
  25919. hasOwnLabel: computed(() => {
  25920. return !!slots.default || !isPropAbsent(actualValue.value);
  25921. }),
  25922. actualValue
  25923. };
  25924. };
  25925. //#endregion
  25926. //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox.mjs
  25927. var useCheckbox = (props, slots) => {
  25928. const { formItem: elFormItem } = useFormItem();
  25929. const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
  25930. const { isFocused, isChecked, checkboxButtonSize, checkboxSize, hasOwnLabel, actualValue } = useCheckboxStatus(props, slots, { model });
  25931. const { isDisabled } = useCheckboxDisabled({
  25932. model,
  25933. isChecked
  25934. });
  25935. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
  25936. formItemContext: elFormItem,
  25937. disableIdGeneration: hasOwnLabel,
  25938. disableIdManagement: isGroup
  25939. });
  25940. const { handleChange, onClickRoot } = useCheckboxEvent(props, {
  25941. model,
  25942. isLimitExceeded,
  25943. hasOwnLabel,
  25944. isDisabled,
  25945. isLabeledByFormItem
  25946. });
  25947. const setStoreValue = () => {
  25948. function addToStore() {
  25949. if (isArray$1(model.value) && !model.value.includes(actualValue.value)) model.value.push(actualValue.value);
  25950. else model.value = props.trueValue ?? props.trueLabel ?? true;
  25951. }
  25952. props.checked && addToStore();
  25953. };
  25954. setStoreValue();
  25955. useDeprecated({
  25956. from: "label act as value",
  25957. replacement: "value",
  25958. version: "3.0.0",
  25959. scope: "el-checkbox",
  25960. ref: "https://element-plus.org/en-US/component/checkbox.html"
  25961. }, computed(() => isGroup.value && isPropAbsent(props.value)));
  25962. useDeprecated({
  25963. from: "true-label",
  25964. replacement: "true-value",
  25965. version: "3.0.0",
  25966. scope: "el-checkbox",
  25967. ref: "https://element-plus.org/en-US/component/checkbox.html"
  25968. }, computed(() => !!props.trueLabel));
  25969. useDeprecated({
  25970. from: "false-label",
  25971. replacement: "false-value",
  25972. version: "3.0.0",
  25973. scope: "el-checkbox",
  25974. ref: "https://element-plus.org/en-US/component/checkbox.html"
  25975. }, computed(() => !!props.falseLabel));
  25976. return {
  25977. inputId,
  25978. isLabeledByFormItem,
  25979. isChecked,
  25980. isDisabled,
  25981. isFocused,
  25982. checkboxButtonSize,
  25983. checkboxSize,
  25984. hasOwnLabel,
  25985. model,
  25986. actualValue,
  25987. handleChange,
  25988. onClickRoot
  25989. };
  25990. };
  25991. //#endregion
  25992. //#region node_modules/element-plus/es/components/checkbox/src/checkbox.vue_vue_type_script_setup_true_lang.mjs
  25993. var _hoisted_1$64 = [
  25994. "id",
  25995. "indeterminate",
  25996. "name",
  25997. "tabindex",
  25998. "disabled"
  25999. ];
  26000. //#endregion
  26001. //#region node_modules/element-plus/es/components/checkbox/src/checkbox2.mjs
  26002. var checkbox_default = /* @__PURE__ */ defineComponent({
  26003. name: "ElCheckbox",
  26004. __name: "checkbox",
  26005. props: checkboxProps,
  26006. emits: checkboxEmits,
  26007. setup(__props) {
  26008. const props = __props;
  26009. const { inputId, isLabeledByFormItem, isChecked, isDisabled, isFocused, checkboxSize, hasOwnLabel, model, actualValue, handleChange, onClickRoot } = useCheckbox(props, useSlots());
  26010. const inputBindings = computed(() => {
  26011. if (props.trueValue || props.falseValue || props.trueLabel || props.falseLabel) return {
  26012. "true-value": props.trueValue ?? props.trueLabel ?? true,
  26013. "false-value": props.falseValue ?? props.falseLabel ?? false
  26014. };
  26015. return { value: actualValue.value };
  26016. });
  26017. const ns = useNamespace("checkbox");
  26018. const compKls = computed(() => {
  26019. return [
  26020. ns.b(),
  26021. ns.m(checkboxSize.value),
  26022. ns.is("disabled", isDisabled.value),
  26023. ns.is("bordered", props.border),
  26024. ns.is("checked", isChecked.value)
  26025. ];
  26026. });
  26027. const spanKls = computed(() => {
  26028. return [
  26029. ns.e("input"),
  26030. ns.is("disabled", isDisabled.value),
  26031. ns.is("checked", isChecked.value),
  26032. ns.is("indeterminate", props.indeterminate),
  26033. ns.is("focus", isFocused.value)
  26034. ];
  26035. });
  26036. return (_ctx, _cache) => {
  26037. return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
  26038. for: !unref(hasOwnLabel) && unref(isLabeledByFormItem) ? null : unref(inputId),
  26039. class: normalizeClass(compKls.value),
  26040. "aria-controls": __props.indeterminate ? __props.ariaControls : null,
  26041. "aria-checked": __props.indeterminate ? "mixed" : void 0,
  26042. "aria-label": __props.ariaLabel,
  26043. onClick: unref(onClickRoot)
  26044. }, {
  26045. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(spanKls.value) }, [withDirectives(createBaseVNode("input", mergeProps({
  26046. id: unref(inputId),
  26047. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
  26048. class: unref(ns).e("original"),
  26049. type: "checkbox",
  26050. indeterminate: __props.indeterminate,
  26051. name: __props.name,
  26052. tabindex: __props.tabindex,
  26053. disabled: unref(isDisabled)
  26054. }, inputBindings.value, {
  26055. onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  26056. onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
  26057. onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
  26058. onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  26059. }), null, 16, _hoisted_1$64), [[vModelCheckbox, unref(model)]]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2)], 2), unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
  26060. key: 0,
  26061. class: normalizeClass(unref(ns).e("label"))
  26062. }, [renderSlot(_ctx.$slots, "default"), !_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(__props.label), 1)], 64)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)]),
  26063. _: 3
  26064. }, 8, [
  26065. "for",
  26066. "class",
  26067. "aria-controls",
  26068. "aria-checked",
  26069. "aria-label",
  26070. "onClick"
  26071. ]);
  26072. };
  26073. }
  26074. });
  26075. //#endregion
  26076. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-button.vue_vue_type_script_setup_true_lang.mjs
  26077. var _hoisted_1$63 = [
  26078. "name",
  26079. "tabindex",
  26080. "disabled"
  26081. ];
  26082. //#endregion
  26083. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-button.mjs
  26084. var checkbox_button_default = /* @__PURE__ */ defineComponent({
  26085. name: "ElCheckboxButton",
  26086. __name: "checkbox-button",
  26087. props: checkboxProps,
  26088. emits: checkboxEmits,
  26089. setup(__props) {
  26090. const props = __props;
  26091. const { isFocused, isChecked, isDisabled, checkboxButtonSize, model, actualValue, handleChange } = useCheckbox(props, useSlots());
  26092. const inputBindings = computed(() => {
  26093. if (props.trueValue || props.falseValue || props.trueLabel || props.falseLabel) return {
  26094. "true-value": props.trueValue ?? props.trueLabel ?? true,
  26095. "false-value": props.falseValue ?? props.falseLabel ?? false
  26096. };
  26097. return { value: actualValue.value };
  26098. });
  26099. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  26100. const ns = useNamespace("checkbox");
  26101. const activeStyle = computed(() => {
  26102. const fillValue = checkboxGroup?.fill?.value ?? "";
  26103. return {
  26104. backgroundColor: fillValue,
  26105. borderColor: fillValue,
  26106. color: checkboxGroup?.textColor?.value ?? "",
  26107. boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
  26108. };
  26109. });
  26110. const labelKls = computed(() => {
  26111. return [
  26112. ns.b("button"),
  26113. ns.bm("button", checkboxButtonSize.value),
  26114. ns.is("disabled", isDisabled.value),
  26115. ns.is("checked", isChecked.value),
  26116. ns.is("focus", isFocused.value)
  26117. ];
  26118. });
  26119. return (_ctx, _cache) => {
  26120. return openBlock(), createElementBlock("label", { class: normalizeClass(labelKls.value) }, [withDirectives(createBaseVNode("input", mergeProps({
  26121. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
  26122. class: unref(ns).be("button", "original"),
  26123. type: "checkbox",
  26124. name: __props.name,
  26125. tabindex: __props.tabindex,
  26126. disabled: unref(isDisabled)
  26127. }, inputBindings.value, {
  26128. onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  26129. onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
  26130. onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
  26131. onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  26132. }), null, 16, _hoisted_1$63), [[vModelCheckbox, unref(model)]]), _ctx.$slots.default || __props.label ? (openBlock(), createElementBlock("span", {
  26133. key: 0,
  26134. class: normalizeClass(unref(ns).be("button", "inner")),
  26135. style: normalizeStyle(unref(isChecked) ? activeStyle.value : void 0)
  26136. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 6)) : createCommentVNode("v-if", true)], 2);
  26137. };
  26138. }
  26139. });
  26140. //#endregion
  26141. //#region node_modules/element-plus/es/components/checkbox/src/checkbox-group2.mjs
  26142. var checkbox_group_default = /* @__PURE__ */ defineComponent({
  26143. name: "ElCheckboxGroup",
  26144. __name: "checkbox-group",
  26145. props: checkboxGroupProps,
  26146. emits: checkboxGroupEmits,
  26147. setup(__props, { emit: __emit }) {
  26148. const props = __props;
  26149. const emit = __emit;
  26150. const ns = useNamespace("checkbox");
  26151. const checkboxDisabled = useFormDisabled();
  26152. const { formItem } = useFormItem();
  26153. const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  26154. const changeEvent = async (value) => {
  26155. emit(UPDATE_MODEL_EVENT, value);
  26156. await nextTick();
  26157. emit(CHANGE_EVENT, value);
  26158. };
  26159. const modelValue = computed({
  26160. get() {
  26161. return props.modelValue;
  26162. },
  26163. set(val) {
  26164. changeEvent(val);
  26165. }
  26166. });
  26167. const aliasProps = computed(() => ({
  26168. ...checkboxDefaultProps,
  26169. ...props.props
  26170. }));
  26171. const getOptionProps = (option) => {
  26172. const { label, value, disabled } = aliasProps.value;
  26173. const base = {
  26174. label: option[label],
  26175. value: option[value],
  26176. disabled: option[disabled]
  26177. };
  26178. return {
  26179. ...omit(option, [
  26180. label,
  26181. value,
  26182. disabled
  26183. ]),
  26184. ...base
  26185. };
  26186. };
  26187. const optionComponent = computed(() => props.type === "button" ? checkbox_button_default : checkbox_default);
  26188. provide(checkboxGroupContextKey, {
  26189. ...pick(toRefs(props), [
  26190. "size",
  26191. "min",
  26192. "max",
  26193. "validateEvent",
  26194. "fill",
  26195. "textColor"
  26196. ]),
  26197. disabled: checkboxDisabled,
  26198. modelValue,
  26199. changeEvent
  26200. });
  26201. watch(() => props.modelValue, (newVal, oldValue) => {
  26202. if (props.validateEvent && !isEqual$1(newVal, oldValue)) formItem?.validate("change").catch(NOOP);
  26203. });
  26204. return (_ctx, _cache) => {
  26205. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  26206. id: unref(groupId),
  26207. class: normalizeClass(unref(ns).b("group")),
  26208. role: "group",
  26209. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "checkbox-group" : void 0,
  26210. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem)?.labelId : void 0
  26211. }, {
  26212. default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  26213. return openBlock(), createBlock(resolveDynamicComponent(optionComponent.value), mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), null, 16);
  26214. }), 128))])]),
  26215. _: 3
  26216. }, 8, [
  26217. "id",
  26218. "class",
  26219. "aria-label",
  26220. "aria-labelledby"
  26221. ]);
  26222. };
  26223. }
  26224. });
  26225. //#endregion
  26226. //#region node_modules/element-plus/es/components/checkbox/index.mjs
  26227. var ElCheckbox = withInstall(checkbox_default, {
  26228. CheckboxButton: checkbox_button_default,
  26229. CheckboxGroup: checkbox_group_default
  26230. });
  26231. var ElCheckboxButton = withNoopInstall(checkbox_button_default);
  26232. var ElCheckboxGroup = withNoopInstall(checkbox_group_default);
  26233. //#endregion
  26234. //#region node_modules/element-plus/es/components/radio/src/radio.mjs
  26235. /**
  26236. * @deprecated Removed after 3.0.0, Use `RadioPropsBase` instead.
  26237. */
  26238. var radioPropsBase = buildProps({
  26239. /**
  26240. * @description binding value
  26241. */
  26242. modelValue: {
  26243. type: [
  26244. String,
  26245. Number,
  26246. Boolean
  26247. ],
  26248. default: void 0
  26249. },
  26250. /**
  26251. * @description size of the Radio
  26252. */
  26253. size: useSizeProp,
  26254. /**
  26255. * @description whether Radio is disabled
  26256. */
  26257. disabled: {
  26258. type: Boolean,
  26259. default: void 0
  26260. },
  26261. /**
  26262. * @description the label of Radio
  26263. */
  26264. label: {
  26265. type: [
  26266. String,
  26267. Number,
  26268. Boolean
  26269. ],
  26270. default: void 0
  26271. },
  26272. /**
  26273. * @description the value of Radio
  26274. */
  26275. value: {
  26276. type: [
  26277. String,
  26278. Number,
  26279. Boolean
  26280. ],
  26281. default: void 0
  26282. },
  26283. /**
  26284. * @description native `name` attribute
  26285. */
  26286. name: {
  26287. type: String,
  26288. default: void 0
  26289. }
  26290. });
  26291. /**
  26292. * @deprecated Removed after 3.0.0, Use `RadioProps` instead.
  26293. */
  26294. var radioProps = buildProps({
  26295. ...radioPropsBase,
  26296. /**
  26297. * @description whether to add a border around Radio
  26298. */
  26299. border: Boolean
  26300. });
  26301. var radioEmits = {
  26302. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
  26303. [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
  26304. };
  26305. /**
  26306. * @description default values for RadioProps
  26307. */
  26308. var radioPropsDefaults = {
  26309. modelValue: void 0,
  26310. disabled: void 0,
  26311. label: void 0,
  26312. value: void 0,
  26313. name: void 0,
  26314. border: false
  26315. };
  26316. //#endregion
  26317. //#region node_modules/element-plus/es/components/radio/src/constants.mjs
  26318. var radioGroupKey = Symbol("radioGroupKey");
  26319. //#endregion
  26320. //#region node_modules/element-plus/es/components/radio/src/radio-button.mjs
  26321. /**
  26322. * @deprecated Removed after 3.0.0, Use `RadioButtonProps` instead.
  26323. */
  26324. var radioButtonProps = buildProps({ ...radioPropsBase });
  26325. /**
  26326. * @description default values for RadioButtonProps
  26327. */
  26328. var radioButtonPropsDefaults = {
  26329. modelValue: void 0,
  26330. disabled: void 0,
  26331. label: void 0,
  26332. value: void 0,
  26333. name: void 0
  26334. };
  26335. //#endregion
  26336. //#region node_modules/element-plus/es/components/radio/src/radio-group.mjs
  26337. var radioDefaultProps = {
  26338. label: "label",
  26339. value: "value",
  26340. disabled: "disabled"
  26341. };
  26342. /**
  26343. * @deprecated Removed after 3.0.0, Use `RadioGroupProps` instead.
  26344. */
  26345. var radioGroupProps = buildProps({
  26346. /**
  26347. * @description native `id` attribute
  26348. */
  26349. id: {
  26350. type: String,
  26351. default: void 0
  26352. },
  26353. /**
  26354. * @description the size of radio buttons or bordered radios
  26355. */
  26356. size: useSizeProp,
  26357. /**
  26358. * @description whether the nesting radios are disabled
  26359. */
  26360. disabled: {
  26361. type: Boolean,
  26362. default: void 0
  26363. },
  26364. /**
  26365. * @description binding value
  26366. */
  26367. modelValue: {
  26368. type: [
  26369. String,
  26370. Number,
  26371. Boolean
  26372. ],
  26373. default: void 0
  26374. },
  26375. /**
  26376. * @description border and background color when button is active
  26377. */
  26378. fill: {
  26379. type: String,
  26380. default: ""
  26381. },
  26382. /**
  26383. * @description font color when button is active
  26384. */
  26385. textColor: {
  26386. type: String,
  26387. default: ""
  26388. },
  26389. /**
  26390. * @description native `name` attribute
  26391. */
  26392. name: {
  26393. type: String,
  26394. default: void 0
  26395. },
  26396. /**
  26397. * @description whether to trigger form validation
  26398. */
  26399. validateEvent: {
  26400. type: Boolean,
  26401. default: true
  26402. },
  26403. options: { type: definePropType(Array) },
  26404. props: {
  26405. type: definePropType(Object),
  26406. default: () => radioDefaultProps
  26407. },
  26408. type: {
  26409. type: String,
  26410. values: ["radio", "button"],
  26411. default: "radio"
  26412. },
  26413. ...useAriaProps(["ariaLabel"])
  26414. });
  26415. var radioGroupEmits = radioEmits;
  26416. /**
  26417. * @description default values for RadioGroupProps
  26418. */
  26419. var radioGroupPropsDefaults = {
  26420. id: void 0,
  26421. disabled: void 0,
  26422. modelValue: void 0,
  26423. fill: "",
  26424. textColor: "",
  26425. name: void 0,
  26426. validateEvent: true,
  26427. props: () => radioDefaultProps,
  26428. type: "radio"
  26429. };
  26430. //#endregion
  26431. //#region node_modules/element-plus/es/components/radio/src/use-radio.mjs
  26432. var useRadio = (props, emit) => {
  26433. const radioRef = ref();
  26434. const radioGroup = inject(radioGroupKey, void 0);
  26435. const isGroup = computed(() => !!radioGroup);
  26436. const actualValue = computed(() => {
  26437. if (!isPropAbsent(props.value)) return props.value;
  26438. return props.label;
  26439. });
  26440. const modelValue = computed({
  26441. get() {
  26442. return isGroup.value ? radioGroup.modelValue : props.modelValue;
  26443. },
  26444. set(val) {
  26445. if (isGroup.value) radioGroup.changeEvent(val);
  26446. else emit && emit("update:modelValue", val);
  26447. radioRef.value.checked = props.modelValue === actualValue.value;
  26448. }
  26449. });
  26450. const size = useFormSize(computed(() => radioGroup?.size));
  26451. const disabled = useFormDisabled(computed(() => radioGroup?.disabled));
  26452. const focus = ref(false);
  26453. const tabIndex = computed(() => {
  26454. return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
  26455. });
  26456. useDeprecated({
  26457. from: "label act as value",
  26458. replacement: "value",
  26459. version: "3.0.0",
  26460. scope: "el-radio",
  26461. ref: "https://element-plus.org/en-US/component/radio.html"
  26462. }, computed(() => isGroup.value && isPropAbsent(props.value)));
  26463. return {
  26464. radioRef,
  26465. isGroup,
  26466. radioGroup,
  26467. focus,
  26468. size,
  26469. disabled,
  26470. tabIndex,
  26471. modelValue,
  26472. actualValue
  26473. };
  26474. };
  26475. //#endregion
  26476. //#region node_modules/element-plus/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs
  26477. var _hoisted_1$62 = [
  26478. "value",
  26479. "name",
  26480. "disabled",
  26481. "checked"
  26482. ];
  26483. //#endregion
  26484. //#region node_modules/element-plus/es/components/radio/src/radio2.mjs
  26485. var radio_default = /* @__PURE__ */ defineComponent({
  26486. name: "ElRadio",
  26487. __name: "radio",
  26488. props: radioProps,
  26489. emits: radioEmits,
  26490. setup(__props, { emit: __emit }) {
  26491. const props = __props;
  26492. const emit = __emit;
  26493. const ns = useNamespace("radio");
  26494. const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
  26495. function handleChange() {
  26496. nextTick(() => emit(CHANGE_EVENT, modelValue.value));
  26497. }
  26498. return (_ctx, _cache) => {
  26499. return openBlock(), createElementBlock("label", { class: normalizeClass([
  26500. unref(ns).b(),
  26501. unref(ns).is("disabled", unref(disabled)),
  26502. unref(ns).is("focus", unref(focus)),
  26503. unref(ns).is("bordered", __props.border),
  26504. unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
  26505. unref(ns).m(unref(size))
  26506. ]) }, [createBaseVNode("span", { class: normalizeClass([
  26507. unref(ns).e("input"),
  26508. unref(ns).is("disabled", unref(disabled)),
  26509. unref(ns).is("checked", unref(modelValue) === unref(actualValue))
  26510. ]) }, [withDirectives(createBaseVNode("input", {
  26511. ref_key: "radioRef",
  26512. ref: radioRef,
  26513. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
  26514. class: normalizeClass(unref(ns).e("original")),
  26515. value: unref(actualValue),
  26516. name: __props.name || unref(radioGroup)?.name,
  26517. disabled: unref(disabled),
  26518. checked: unref(modelValue) === unref(actualValue),
  26519. type: "radio",
  26520. onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
  26521. onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
  26522. onChange: handleChange,
  26523. onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
  26524. }, null, 42, _hoisted_1$62), [[vModelRadio, unref(modelValue)]]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2)], 2), createBaseVNode("span", {
  26525. class: normalizeClass(unref(ns).e("label")),
  26526. onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  26527. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 34)], 2);
  26528. };
  26529. }
  26530. });
  26531. //#endregion
  26532. //#region node_modules/element-plus/es/components/radio/src/radio-button.vue_vue_type_script_setup_true_lang.mjs
  26533. var _hoisted_1$61 = [
  26534. "value",
  26535. "name",
  26536. "disabled"
  26537. ];
  26538. //#endregion
  26539. //#region node_modules/element-plus/es/components/radio/src/radio-button2.mjs
  26540. var radio_button_default = /* @__PURE__ */ defineComponent({
  26541. name: "ElRadioButton",
  26542. __name: "radio-button",
  26543. props: radioButtonProps,
  26544. setup(__props) {
  26545. const props = __props;
  26546. const ns = useNamespace("radio");
  26547. const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
  26548. const activeStyle = computed(() => {
  26549. return {
  26550. backgroundColor: radioGroup?.fill || "",
  26551. borderColor: radioGroup?.fill || "",
  26552. boxShadow: radioGroup?.fill ? `-1px 0 0 0 ${radioGroup.fill}` : "",
  26553. color: radioGroup?.textColor || ""
  26554. };
  26555. });
  26556. return (_ctx, _cache) => {
  26557. return openBlock(), createElementBlock("label", { class: normalizeClass([
  26558. unref(ns).b("button"),
  26559. unref(ns).is("active", unref(modelValue) === unref(actualValue)),
  26560. unref(ns).is("disabled", unref(disabled)),
  26561. unref(ns).is("focus", unref(focus)),
  26562. unref(ns).bm("button", unref(size))
  26563. ]) }, [withDirectives(createBaseVNode("input", {
  26564. ref_key: "radioRef",
  26565. ref: radioRef,
  26566. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
  26567. class: normalizeClass(unref(ns).be("button", "original-radio")),
  26568. value: unref(actualValue),
  26569. type: "radio",
  26570. name: __props.name || unref(radioGroup)?.name,
  26571. disabled: unref(disabled),
  26572. onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
  26573. onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
  26574. onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
  26575. }, null, 42, _hoisted_1$61), [[vModelRadio, unref(modelValue)]]), createBaseVNode("span", {
  26576. class: normalizeClass(unref(ns).be("button", "inner")),
  26577. style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
  26578. onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
  26579. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 38)], 2);
  26580. };
  26581. }
  26582. });
  26583. //#endregion
  26584. //#region node_modules/element-plus/es/components/radio/src/radio-group.vue_vue_type_script_setup_true_lang.mjs
  26585. var _hoisted_1$60 = [
  26586. "id",
  26587. "aria-label",
  26588. "aria-labelledby"
  26589. ];
  26590. //#endregion
  26591. //#region node_modules/element-plus/es/components/radio/src/radio-group2.mjs
  26592. var radio_group_default = /* @__PURE__ */ defineComponent({
  26593. name: "ElRadioGroup",
  26594. __name: "radio-group",
  26595. props: radioGroupProps,
  26596. emits: radioGroupEmits,
  26597. setup(__props, { emit: __emit }) {
  26598. const props = __props;
  26599. const emit = __emit;
  26600. const ns = useNamespace("radio");
  26601. const radioId = useId();
  26602. const radioGroupRef = ref();
  26603. const { formItem } = useFormItem();
  26604. const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  26605. const changeEvent = (value) => {
  26606. emit(UPDATE_MODEL_EVENT, value);
  26607. nextTick(() => emit(CHANGE_EVENT, value));
  26608. };
  26609. onMounted(() => {
  26610. const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
  26611. const firstLabel = radios[0];
  26612. if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) firstLabel.tabIndex = 0;
  26613. });
  26614. const name = computed(() => {
  26615. return props.name || radioId.value;
  26616. });
  26617. const aliasProps = computed(() => ({
  26618. ...radioDefaultProps,
  26619. ...props.props
  26620. }));
  26621. const getOptionProps = (option) => {
  26622. const { label, value, disabled } = aliasProps.value;
  26623. const base = {
  26624. label: option[label],
  26625. value: option[value],
  26626. disabled: option[disabled]
  26627. };
  26628. return {
  26629. ...omit(option, [
  26630. label,
  26631. value,
  26632. disabled
  26633. ]),
  26634. ...base
  26635. };
  26636. };
  26637. const optionComponent = computed(() => props.type === "button" ? radio_button_default : radio_default);
  26638. provide(radioGroupKey, reactive({
  26639. ...toRefs(props),
  26640. changeEvent,
  26641. name
  26642. }));
  26643. watch(() => props.modelValue, (newVal, oldValue) => {
  26644. if (props.validateEvent && !isEqual$1(newVal, oldValue)) formItem?.validate("change").catch(NOOP);
  26645. });
  26646. return (_ctx, _cache) => {
  26647. return openBlock(), createElementBlock("div", {
  26648. id: unref(groupId),
  26649. ref_key: "radioGroupRef",
  26650. ref: radioGroupRef,
  26651. class: normalizeClass(unref(ns).b("group")),
  26652. role: "radiogroup",
  26653. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "radio-group" : void 0,
  26654. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
  26655. }, [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  26656. return openBlock(), createBlock(resolveDynamicComponent(optionComponent.value), mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), null, 16);
  26657. }), 128))])], 10, _hoisted_1$60);
  26658. };
  26659. }
  26660. });
  26661. //#endregion
  26662. //#region node_modules/element-plus/es/components/radio/index.mjs
  26663. var ElRadio = withInstall(radio_default, {
  26664. RadioButton: radio_button_default,
  26665. RadioGroup: radio_group_default
  26666. });
  26667. var ElRadioGroup = withNoopInstall(radio_group_default);
  26668. var ElRadioButton = withNoopInstall(radio_button_default);
  26669. //#endregion
  26670. //#region node_modules/element-plus/es/components/cascader-panel/src/types.mjs
  26671. var CASCADER_PANEL_INJECTION_KEY = Symbol();
  26672. //#endregion
  26673. //#region node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
  26674. function isVNodeEmpty(vnodes) {
  26675. return !!(isArray$1(vnodes) ? vnodes.every(({ type }) => type === Comment) : vnodes?.type === Comment);
  26676. }
  26677. var node_content_default = /* @__PURE__ */ defineComponent({
  26678. name: "NodeContent",
  26679. props: { node: {
  26680. type: Object,
  26681. required: true
  26682. } },
  26683. setup(props) {
  26684. const ns = useNamespace("cascader-node");
  26685. const { renderLabelFn } = inject(CASCADER_PANEL_INJECTION_KEY);
  26686. const { node } = props;
  26687. const { data, label: nodeLabel } = node;
  26688. const label = () => {
  26689. const renderLabel = renderLabelFn?.({
  26690. node,
  26691. data
  26692. });
  26693. return isVNodeEmpty(renderLabel) ? nodeLabel : renderLabel ?? nodeLabel;
  26694. };
  26695. return () => createVNode("span", { "class": ns.e("label") }, [label()]);
  26696. }
  26697. });
  26698. //#endregion
  26699. //#region node_modules/element-plus/es/components/cascader-panel/src/node.vue_vue_type_script_setup_true_lang.mjs
  26700. var _hoisted_1$59 = [
  26701. "id",
  26702. "aria-haspopup",
  26703. "aria-owns",
  26704. "aria-expanded",
  26705. "tabindex"
  26706. ];
  26707. //#endregion
  26708. //#region node_modules/element-plus/es/components/cascader-panel/src/node2.mjs
  26709. var node_default = /* @__PURE__ */ defineComponent({
  26710. name: "ElCascaderNode",
  26711. __name: "node",
  26712. props: {
  26713. node: {
  26714. type: Object,
  26715. required: true
  26716. },
  26717. menuId: {
  26718. type: String,
  26719. required: false
  26720. }
  26721. },
  26722. emits: ["expand"],
  26723. setup(__props, { emit: __emit }) {
  26724. const props = __props;
  26725. const emit = __emit;
  26726. const panel = inject(CASCADER_PANEL_INJECTION_KEY);
  26727. const ns = useNamespace("cascader-node");
  26728. const isHoverMenu = computed(() => panel.isHoverMenu);
  26729. const multiple = computed(() => panel.config.multiple);
  26730. const checkStrictly = computed(() => panel.config.checkStrictly);
  26731. const showPrefix = computed(() => panel.config.showPrefix);
  26732. const checkedNodeId = computed(() => panel.checkedNodes[0]?.uid);
  26733. const isDisabled = computed(() => props.node.isDisabled);
  26734. const isLeaf = computed(() => props.node.isLeaf);
  26735. const expandable = computed(() => checkStrictly.value && !isLeaf.value || !isDisabled.value);
  26736. const inExpandingPath = computed(() => isInPath(panel.expandingNode));
  26737. const inCheckedPath = computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
  26738. const isInPath = (node) => {
  26739. const { level, uid } = props.node;
  26740. return node?.pathNodes[level - 1]?.uid === uid;
  26741. };
  26742. const doExpand = () => {
  26743. if (inExpandingPath.value) return;
  26744. panel.expandNode(props.node);
  26745. };
  26746. const doCheck = (checked) => {
  26747. const { node } = props;
  26748. if (checked === node.checked) return;
  26749. panel.handleCheckChange(node, checked);
  26750. };
  26751. const doLoad = () => {
  26752. panel.lazyLoad(props.node, () => {
  26753. if (!isLeaf.value) doExpand();
  26754. });
  26755. };
  26756. const handleHoverExpand = (e) => {
  26757. if (!isHoverMenu.value) return;
  26758. handleExpand();
  26759. !isLeaf.value && emit("expand", e);
  26760. };
  26761. const handleExpand = () => {
  26762. const { node } = props;
  26763. if (!expandable.value || node.loading) return;
  26764. node.loaded ? doExpand() : doLoad();
  26765. };
  26766. const handleClick = () => {
  26767. if (isLeaf.value && !isDisabled.value && !checkStrictly.value && !multiple.value) handleCheck(true);
  26768. else if ((panel.config.checkOnClickNode && (multiple.value || checkStrictly.value) || isLeaf.value && panel.config.checkOnClickLeaf) && !isDisabled.value) handleSelectCheck(!props.node.checked);
  26769. else if (!isHoverMenu.value) handleExpand();
  26770. };
  26771. const handleSelectCheck = (checked) => {
  26772. if (checkStrictly.value) {
  26773. doCheck(checked);
  26774. if (props.node.loaded) doExpand();
  26775. } else handleCheck(checked);
  26776. };
  26777. const handleCheck = (checked) => {
  26778. if (!props.node.loaded) doLoad();
  26779. else {
  26780. doCheck(checked);
  26781. !checkStrictly.value && doExpand();
  26782. }
  26783. };
  26784. return (_ctx, _cache) => {
  26785. return openBlock(), createElementBlock("li", {
  26786. id: `${__props.menuId}-${__props.node.uid}`,
  26787. role: "menuitem",
  26788. "aria-haspopup": !isLeaf.value,
  26789. "aria-owns": isLeaf.value ? void 0 : __props.menuId,
  26790. "aria-expanded": inExpandingPath.value,
  26791. tabindex: expandable.value ? -1 : void 0,
  26792. class: normalizeClass([
  26793. unref(ns).b(),
  26794. unref(ns).is("selectable", checkStrictly.value),
  26795. unref(ns).is("active", __props.node.checked),
  26796. unref(ns).is("disabled", !expandable.value),
  26797. inExpandingPath.value && "in-active-path",
  26798. inCheckedPath.value && "in-checked-path"
  26799. ]),
  26800. onMouseenter: handleHoverExpand,
  26801. onFocus: handleHoverExpand,
  26802. onClick: handleClick
  26803. }, [
  26804. createCommentVNode(" prefix "),
  26805. multiple.value && showPrefix.value ? (openBlock(), createBlock(unref(ElCheckbox), {
  26806. key: 0,
  26807. "model-value": __props.node.checked,
  26808. indeterminate: __props.node.indeterminate,
  26809. disabled: isDisabled.value,
  26810. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
  26811. "onUpdate:modelValue": handleSelectCheck
  26812. }, null, 8, [
  26813. "model-value",
  26814. "indeterminate",
  26815. "disabled"
  26816. ])) : checkStrictly.value && showPrefix.value ? (openBlock(), createBlock(unref(ElRadio), {
  26817. key: 1,
  26818. "model-value": checkedNodeId.value,
  26819. label: __props.node.uid,
  26820. disabled: isDisabled.value,
  26821. "onUpdate:modelValue": handleSelectCheck,
  26822. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  26823. }, {
  26824. default: withCtx(() => [createCommentVNode("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "), _cache[2] || (_cache[2] = createBaseVNode("span", null, null, -1))]),
  26825. _: 1
  26826. }, 8, [
  26827. "model-value",
  26828. "label",
  26829. "disabled"
  26830. ])) : isLeaf.value && __props.node.checked ? (openBlock(), createBlock(unref(ElIcon), {
  26831. key: 2,
  26832. class: normalizeClass(unref(ns).e("prefix"))
  26833. }, {
  26834. default: withCtx(() => [createVNode(unref(check_default))]),
  26835. _: 1
  26836. }, 8, ["class"])) : createCommentVNode("v-if", true),
  26837. createCommentVNode(" content "),
  26838. createVNode(unref(node_content_default), { node: __props.node }, null, 8, ["node"]),
  26839. createCommentVNode(" postfix "),
  26840. !isLeaf.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [__props.node.loading ? (openBlock(), createBlock(unref(ElIcon), {
  26841. key: 0,
  26842. class: normalizeClass([unref(ns).is("loading"), unref(ns).e("postfix")])
  26843. }, {
  26844. default: withCtx(() => [createVNode(unref(loading_default))]),
  26845. _: 1
  26846. }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
  26847. key: 1,
  26848. class: normalizeClass(["arrow-right", unref(ns).e("postfix")])
  26849. }, {
  26850. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  26851. _: 1
  26852. }, 8, ["class"]))], 64)) : createCommentVNode("v-if", true)
  26853. ], 42, _hoisted_1$59);
  26854. };
  26855. }
  26856. });
  26857. //#endregion
  26858. //#region node_modules/element-plus/es/components/cascader-panel/src/menu.mjs
  26859. var menu_default$1 = /* @__PURE__ */ defineComponent({
  26860. name: "ElCascaderMenu",
  26861. __name: "menu",
  26862. props: {
  26863. nodes: {
  26864. type: Array,
  26865. required: true
  26866. },
  26867. index: {
  26868. type: Number,
  26869. required: true
  26870. },
  26871. virtualScroll: {
  26872. type: Boolean,
  26873. required: false,
  26874. default: false
  26875. },
  26876. itemSize: {
  26877. type: Number,
  26878. required: false,
  26879. default: 34
  26880. },
  26881. height: {
  26882. type: Number,
  26883. required: false,
  26884. default: 204
  26885. }
  26886. },
  26887. setup(__props, { expose: __expose }) {
  26888. const props = __props;
  26889. const instance = getCurrentInstance();
  26890. const ns = useNamespace("cascader-menu");
  26891. const { t } = useLocale();
  26892. const id = useId();
  26893. let activeNode;
  26894. let hoverTimer;
  26895. const panel = inject(CASCADER_PANEL_INJECTION_KEY);
  26896. const hoverZone = ref();
  26897. const virtualListRef = ref();
  26898. const isEmpty = computed(() => !props.nodes.length);
  26899. const isLoading = computed(() => !panel.initialLoaded);
  26900. const menuId = computed(() => `${id.value}-${props.index}`);
  26901. const getActiveNodeIndex = () => {
  26902. let activeNodeId;
  26903. if (panel.expandingNode) {
  26904. const { level, pathNodes } = panel.expandingNode;
  26905. if (props.index < level) activeNodeId = pathNodes[props.index]?.uid;
  26906. else if (props.index === level && panel.checkedNodes.length > 0) activeNodeId = panel.checkedNodes[0]?.pathNodes[props.index]?.uid;
  26907. } else if (panel.checkedNodes.length > 0 && props.index < panel.checkedNodes[0].pathNodes.length) activeNodeId = panel.checkedNodes[0].pathNodes[props.index]?.uid;
  26908. return activeNodeId !== void 0 ? props.nodes.findIndex((node) => node.uid === activeNodeId) : -1;
  26909. };
  26910. const getNodeIndexById = (nodeId) => {
  26911. if (!nodeId) return -1;
  26912. return props.nodes.findIndex((node) => `${menuId.value}-${node.uid}` === nodeId);
  26913. };
  26914. const scrollToItem = (index) => {
  26915. const targetIndex = clamp$2(index, 0, props.nodes.length - 1);
  26916. virtualListRef.value?.scrollToItem(targetIndex);
  26917. };
  26918. const focusNodeAt = (index) => {
  26919. if (!props.nodes.length) return;
  26920. const targetIndex = clamp$2(index, 0, props.nodes.length - 1);
  26921. scrollToItem(targetIndex);
  26922. nextTick(() => {
  26923. const node = instance.vnode.el?.querySelector(`#${menuId.value}-${props.nodes[targetIndex].uid}`);
  26924. if (node) focusNode(node);
  26925. });
  26926. };
  26927. const handleExpand = (e) => {
  26928. activeNode = e.target;
  26929. };
  26930. const handleMouseMove = (e) => {
  26931. if (!panel.isHoverMenu || !activeNode || !hoverZone.value) return;
  26932. if (activeNode.contains(e.target)) {
  26933. clearHoverTimer();
  26934. const el = instance.vnode.el;
  26935. const { left } = el.getBoundingClientRect();
  26936. const { offsetWidth, offsetHeight } = el;
  26937. const startX = e.clientX - left;
  26938. const top = activeNode.offsetTop;
  26939. const bottom = top + activeNode.offsetHeight;
  26940. const scrollTop = props.virtualScroll ? virtualListRef.value?.states?.scrollOffset || 0 : el.querySelector(`.${ns.e("wrap")}`)?.scrollTop || 0;
  26941. hoverZone.value.innerHTML = `
  26942. <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${top} L${offsetWidth} ${scrollTop} V${top} Z" />
  26943. <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${bottom} L${offsetWidth} ${offsetHeight + scrollTop} V${bottom} Z" />
  26944. `;
  26945. } else if (!hoverTimer) hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);
  26946. };
  26947. const clearHoverTimer = () => {
  26948. if (!hoverTimer) return;
  26949. clearTimeout(hoverTimer);
  26950. hoverTimer = void 0;
  26951. };
  26952. const clearHoverZone = () => {
  26953. if (!hoverZone.value) return;
  26954. hoverZone.value.innerHTML = "";
  26955. clearHoverTimer();
  26956. };
  26957. __expose({
  26958. getActiveNodeIndex,
  26959. getNodeIndexById,
  26960. scrollToItem,
  26961. focusNodeAt,
  26962. virtualListRef,
  26963. get $el() {
  26964. return instance.vnode.el;
  26965. }
  26966. });
  26967. return (_ctx, _cache) => {
  26968. return __props.virtualScroll ? (openBlock(), createElementBlock("div", {
  26969. key: menuId.value,
  26970. class: normalizeClass(unref(ns).b()),
  26971. onMousemove: handleMouseMove,
  26972. onMouseleave: clearHoverZone
  26973. }, [
  26974. createVNode(unref(FixedSizeList), {
  26975. ref_key: "virtualListRef",
  26976. ref: virtualListRef,
  26977. height: __props.height,
  26978. "item-size": __props.itemSize,
  26979. data: __props.nodes,
  26980. total: __props.nodes.length,
  26981. "class-name": unref(ns).e("list"),
  26982. "inner-element": "ul",
  26983. "inner-props": {
  26984. role: "menu",
  26985. class: unref(ns).is("empty", isEmpty.value)
  26986. }
  26987. }, {
  26988. default: withCtx(({ data, index: nodeIndex, style }) => [(openBlock(), createBlock(node_default, {
  26989. key: data[nodeIndex].uid,
  26990. node: data[nodeIndex],
  26991. "menu-id": menuId.value,
  26992. style: normalizeStyle(style),
  26993. onExpand: handleExpand
  26994. }, null, 8, [
  26995. "node",
  26996. "menu-id",
  26997. "style"
  26998. ]))]),
  26999. _: 1
  27000. }, 8, [
  27001. "height",
  27002. "item-size",
  27003. "data",
  27004. "total",
  27005. "class-name",
  27006. "inner-props"
  27007. ]),
  27008. isLoading.value ? (openBlock(), createElementBlock("div", {
  27009. key: 0,
  27010. class: normalizeClass(unref(ns).e("empty-text"))
  27011. }, [createVNode(unref(ElIcon), {
  27012. size: 14,
  27013. class: normalizeClass(unref(ns).is("loading"))
  27014. }, {
  27015. default: withCtx(() => [createVNode(unref(loading_default))]),
  27016. _: 1
  27017. }, 8, ["class"]), createTextVNode(" " + toDisplayString(unref(t)("el.cascader.loading")), 1)], 2)) : isEmpty.value ? (openBlock(), createElementBlock("div", {
  27018. key: 1,
  27019. class: normalizeClass(unref(ns).e("empty-text"))
  27020. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref(t)("el.cascader.noData")), 1)])], 2)) : unref(panel)?.isHoverMenu ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" eslint-disable vue/html-self-closing "), (openBlock(), createElementBlock("svg", {
  27021. ref_key: "hoverZone",
  27022. ref: hoverZone,
  27023. class: normalizeClass(unref(ns).e("hover-zone"))
  27024. }, null, 2))], 2112)) : createCommentVNode("v-if", true),
  27025. createCommentVNode(" eslint-enable vue/html-self-closing ")
  27026. ], 34)) : (openBlock(), createBlock(unref(ElScrollbar), {
  27027. key: menuId.value,
  27028. tag: "ul",
  27029. role: "menu",
  27030. class: normalizeClass(unref(ns).b()),
  27031. "wrap-class": unref(ns).e("wrap"),
  27032. "view-class": [unref(ns).e("list"), unref(ns).is("empty", isEmpty.value)],
  27033. onMousemove: handleMouseMove,
  27034. onMouseleave: clearHoverZone
  27035. }, {
  27036. default: withCtx(() => [
  27037. (openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes, (node) => {
  27038. return openBlock(), createBlock(node_default, {
  27039. key: node.uid,
  27040. node,
  27041. "menu-id": menuId.value,
  27042. onExpand: handleExpand
  27043. }, null, 8, ["node", "menu-id"]);
  27044. }), 128)),
  27045. isLoading.value ? (openBlock(), createElementBlock("div", {
  27046. key: 0,
  27047. class: normalizeClass(unref(ns).e("empty-text"))
  27048. }, [createVNode(unref(ElIcon), {
  27049. size: 14,
  27050. class: normalizeClass(unref(ns).is("loading"))
  27051. }, {
  27052. default: withCtx(() => [createVNode(unref(loading_default))]),
  27053. _: 1
  27054. }, 8, ["class"]), createTextVNode(" " + toDisplayString(unref(t)("el.cascader.loading")), 1)], 2)) : isEmpty.value ? (openBlock(), createElementBlock("div", {
  27055. key: 1,
  27056. class: normalizeClass(unref(ns).e("empty-text"))
  27057. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref(t)("el.cascader.noData")), 1)])], 2)) : unref(panel)?.isHoverMenu ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" eslint-disable vue/html-self-closing "), (openBlock(), createElementBlock("svg", {
  27058. ref_key: "hoverZone",
  27059. ref: hoverZone,
  27060. class: normalizeClass(unref(ns).e("hover-zone"))
  27061. }, null, 2))], 2112)) : createCommentVNode("v-if", true),
  27062. createCommentVNode(" eslint-enable vue/html-self-closing ")
  27063. ]),
  27064. _: 3
  27065. }, 8, [
  27066. "class",
  27067. "wrap-class",
  27068. "view-class"
  27069. ]));
  27070. };
  27071. }
  27072. });
  27073. //#endregion
  27074. //#region node_modules/element-plus/es/components/cascader-panel/src/node.mjs
  27075. var uid = 0;
  27076. var calculatePathNodes = (node) => {
  27077. const nodes = [node];
  27078. let { parent } = node;
  27079. while (parent) {
  27080. nodes.unshift(parent);
  27081. parent = parent.parent;
  27082. }
  27083. return nodes;
  27084. };
  27085. var Node$2 = class Node {
  27086. constructor(data, config, parent, root = false) {
  27087. this.data = data;
  27088. this.config = config;
  27089. this.parent = parent;
  27090. this.root = root;
  27091. this.uid = uid++;
  27092. this.checked = false;
  27093. this.indeterminate = false;
  27094. this.loading = false;
  27095. const { value: valueKey, label: labelKey, children: childrenKey } = config;
  27096. const childrenData = data[childrenKey];
  27097. const pathNodes = calculatePathNodes(this);
  27098. this.level = root ? 0 : parent ? parent.level + 1 : 1;
  27099. this.value = data[valueKey];
  27100. this.label = data[labelKey];
  27101. this.pathNodes = pathNodes;
  27102. this.pathValues = pathNodes.map((node) => node.value);
  27103. this.pathLabels = pathNodes.map((node) => node.label);
  27104. this.childrenData = childrenData;
  27105. this.children = (childrenData || []).map((child) => new Node(child, config, this));
  27106. this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
  27107. this.text = "";
  27108. }
  27109. get isDisabled() {
  27110. const { data, parent, config } = this;
  27111. const { disabled, checkStrictly } = config;
  27112. return (isFunction$1(disabled) ? disabled(data, this) : !!data[disabled]) || !checkStrictly && !!parent?.isDisabled;
  27113. }
  27114. get isLeaf() {
  27115. const { data, config, childrenData, loaded } = this;
  27116. const { lazy, leaf } = config;
  27117. const isLeaf = isFunction$1(leaf) ? leaf(data, this) : data[leaf];
  27118. return isUndefined(isLeaf) ? lazy && !loaded ? false : !(isArray$1(childrenData) && childrenData.length) : !!isLeaf;
  27119. }
  27120. get valueByOption() {
  27121. return this.config.emitPath ? this.pathValues : this.value;
  27122. }
  27123. appendChild(childData) {
  27124. const { childrenData, children } = this;
  27125. const node = new Node(childData, this.config, this);
  27126. if (isArray$1(childrenData)) childrenData.push(childData);
  27127. else this.childrenData = [childData];
  27128. children.push(node);
  27129. return node;
  27130. }
  27131. calcText(allLevels, separator) {
  27132. const text = allLevels ? this.pathLabels.join(separator) : this.label;
  27133. this.text = text;
  27134. return text;
  27135. }
  27136. broadcast(checked) {
  27137. this.children.forEach((child) => {
  27138. if (child) {
  27139. child.broadcast(checked);
  27140. child.onParentCheck?.(checked);
  27141. }
  27142. });
  27143. }
  27144. emit() {
  27145. const { parent } = this;
  27146. if (parent) {
  27147. parent.onChildCheck?.();
  27148. parent.emit();
  27149. }
  27150. }
  27151. onParentCheck(checked) {
  27152. if (!this.isDisabled) this.setCheckState(checked);
  27153. }
  27154. onChildCheck() {
  27155. const { children } = this;
  27156. const validChildren = children.filter((child) => !child.isDisabled);
  27157. const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
  27158. this.setCheckState(checked);
  27159. }
  27160. setCheckState(checked) {
  27161. const totalNum = this.children.length;
  27162. const checkedNum = this.children.reduce((c, p) => {
  27163. return c + (p.checked ? 1 : p.indeterminate ? .5 : 0);
  27164. }, 0);
  27165. this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
  27166. this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
  27167. }
  27168. doCheck(checked) {
  27169. if (this.checked === checked) return;
  27170. const { checkStrictly, multiple } = this.config;
  27171. if (checkStrictly || !multiple) this.checked = checked;
  27172. else {
  27173. this.broadcast(checked);
  27174. this.setCheckState(checked);
  27175. this.emit();
  27176. }
  27177. }
  27178. };
  27179. //#endregion
  27180. //#region node_modules/element-plus/es/components/cascader-panel/src/store.mjs
  27181. var flatNodes = (nodes, leafOnly) => {
  27182. return nodes.reduce((res, node) => {
  27183. if (node.isLeaf) res.push(node);
  27184. else {
  27185. !leafOnly && res.push(node);
  27186. res = res.concat(flatNodes(node.children, leafOnly));
  27187. }
  27188. return res;
  27189. }, []);
  27190. };
  27191. var Store = class {
  27192. constructor(data, config) {
  27193. this.config = config;
  27194. const nodes = (data || []).map((nodeData) => new Node$2(nodeData, this.config));
  27195. this.nodes = nodes;
  27196. this.allNodes = flatNodes(nodes, false);
  27197. this.leafNodes = flatNodes(nodes, true);
  27198. }
  27199. getNodes() {
  27200. return this.nodes;
  27201. }
  27202. getFlattedNodes(leafOnly) {
  27203. return leafOnly ? this.leafNodes : this.allNodes;
  27204. }
  27205. appendNode(nodeData, parentNode) {
  27206. const node = parentNode ? parentNode.appendChild(nodeData) : new Node$2(nodeData, this.config);
  27207. if (!parentNode) this.nodes.push(node);
  27208. this.appendAllNodesAndLeafNodes(node);
  27209. }
  27210. appendNodes(nodeDataList, parentNode) {
  27211. if (nodeDataList.length > 0) nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));
  27212. else parentNode && parentNode.isLeaf && this.leafNodes.push(parentNode);
  27213. }
  27214. appendAllNodesAndLeafNodes(node) {
  27215. this.allNodes.push(node);
  27216. node.isLeaf && this.leafNodes.push(node);
  27217. if (node.children) node.children.forEach((subNode) => {
  27218. this.appendAllNodesAndLeafNodes(subNode);
  27219. });
  27220. }
  27221. getNodeByValue(value, leafOnly = false) {
  27222. if (isPropAbsent(value)) return null;
  27223. return this.getFlattedNodes(leafOnly).find((node) => isEqual$1(node.value, value) || isEqual$1(node.pathValues, value)) || null;
  27224. }
  27225. getSameNode(node) {
  27226. if (!node) return null;
  27227. return this.getFlattedNodes(false).find(({ value, level }) => isEqual$1(node.value, value) && node.level === level) || null;
  27228. }
  27229. };
  27230. //#endregion
  27231. //#region node_modules/element-plus/es/components/cascader-panel/src/utils.mjs
  27232. var getMenuIndex = (el) => {
  27233. if (!el) return 0;
  27234. const pieces = el.id.split("-");
  27235. return Number(pieces[pieces.length - 2]);
  27236. };
  27237. var checkNode = (el) => {
  27238. if (!el) return;
  27239. const input = el.querySelector("input");
  27240. if (input) input.click();
  27241. else if (isLeaf(el)) el.click();
  27242. };
  27243. var sortByOriginalOrder = (oldNodes, newNodes) => {
  27244. const newNodesCopy = newNodes.slice(0);
  27245. const newIds = newNodesCopy.map((node) => node.uid);
  27246. const res = oldNodes.reduce((acc, item) => {
  27247. const index = newIds.indexOf(item.uid);
  27248. if (index > -1) {
  27249. acc.push(item);
  27250. newNodesCopy.splice(index, 1);
  27251. newIds.splice(index, 1);
  27252. }
  27253. return acc;
  27254. }, []);
  27255. res.push(...newNodesCopy);
  27256. return res;
  27257. };
  27258. //#endregion
  27259. //#region node_modules/element-plus/es/components/cascader-panel/index.mjs
  27260. var ElCascaderPanel = withInstall(/* @__PURE__ */ defineComponent({
  27261. name: "ElCascaderPanel",
  27262. __name: "index",
  27263. props: cascaderPanelProps,
  27264. emits: cascaderPanelEmits,
  27265. setup(__props, { expose: __expose, emit: __emit }) {
  27266. const props = __props;
  27267. const emit = __emit;
  27268. let manualChecked = false;
  27269. const ns = useNamespace("cascader");
  27270. const config = useCascaderConfig(props);
  27271. const slots = useSlots();
  27272. let store;
  27273. const initialLoaded = ref(true);
  27274. const initialLoadedOnce = ref(false);
  27275. const menuList = ref([]);
  27276. const checkedValue = ref();
  27277. const menus = ref([]);
  27278. const expandingNode = ref();
  27279. const checkedNodes = ref([]);
  27280. const isHoverMenu = computed(() => config.value.expandTrigger === "hover");
  27281. const renderLabelFn = computed(() => props.renderLabel || slots.default);
  27282. const virtualScroll = computed(() => props.virtualScroll);
  27283. const itemSize = computed(() => props.itemSize);
  27284. const height = computed(() => props.height);
  27285. const initStore = () => {
  27286. const { options } = props;
  27287. const cfg = config.value;
  27288. manualChecked = false;
  27289. store = new Store(options, cfg);
  27290. menus.value = [store.getNodes()];
  27291. if (cfg.lazy && isEmpty(props.options)) {
  27292. initialLoaded.value = false;
  27293. lazyLoad(void 0, (list) => {
  27294. if (list) {
  27295. store = new Store(list, cfg);
  27296. menus.value = [store.getNodes()];
  27297. }
  27298. initialLoaded.value = true;
  27299. syncCheckedValue(false, true);
  27300. });
  27301. } else syncCheckedValue(false, true);
  27302. };
  27303. const lazyLoad = (node, cb) => {
  27304. const cfg = config.value;
  27305. node = node || new Node$2({}, cfg, void 0, true);
  27306. node.loading = true;
  27307. const resolve = (dataList) => {
  27308. const _node = node;
  27309. const parent = _node.root ? null : _node;
  27310. _node.loading = false;
  27311. _node.loaded = true;
  27312. _node.childrenData = _node.childrenData || [];
  27313. dataList && store?.appendNodes(dataList, parent);
  27314. dataList && cb?.(dataList);
  27315. if (node.level === 0) initialLoadedOnce.value = true;
  27316. };
  27317. const reject = () => {
  27318. node.loading = false;
  27319. node.loaded = false;
  27320. if (node.level === 0) initialLoaded.value = true;
  27321. };
  27322. cfg.lazyLoad(node, resolve, reject);
  27323. };
  27324. const expandNode = (node, silent) => {
  27325. const { level } = node;
  27326. const newMenus = menus.value.slice(0, level);
  27327. let newExpandingNode;
  27328. if (node.isLeaf) newExpandingNode = node.pathNodes[level - 2];
  27329. else {
  27330. newExpandingNode = node;
  27331. newMenus.push(node.children);
  27332. }
  27333. if (expandingNode.value?.uid !== newExpandingNode?.uid) {
  27334. expandingNode.value = node;
  27335. menus.value = newMenus;
  27336. !silent && emit("expand-change", node?.pathValues || []);
  27337. }
  27338. };
  27339. const handleCheckChange = (node, checked, emitClose = true) => {
  27340. const { checkStrictly, multiple } = config.value;
  27341. const oldNode = checkedNodes.value[0];
  27342. manualChecked = true;
  27343. !multiple && oldNode?.doCheck(false);
  27344. node.doCheck(checked);
  27345. calculateCheckedValue();
  27346. emitClose && !multiple && !checkStrictly && emit("close");
  27347. !emitClose && !multiple && expandParentNode(node);
  27348. };
  27349. const expandParentNode = (node) => {
  27350. if (!node) return;
  27351. node = node.parent;
  27352. expandParentNode(node);
  27353. node && expandNode(node);
  27354. };
  27355. const getFlattedNodes = (leafOnly) => store?.getFlattedNodes(leafOnly);
  27356. const getCheckedNodes = (leafOnly) => {
  27357. return getFlattedNodes(leafOnly)?.filter(({ checked }) => checked !== false);
  27358. };
  27359. const clearCheckedNodes = () => {
  27360. checkedNodes.value.forEach((node) => node.doCheck(false));
  27361. calculateCheckedValue();
  27362. menus.value = menus.value.slice(0, 1);
  27363. expandingNode.value = void 0;
  27364. emit("expand-change", []);
  27365. };
  27366. const calculateCheckedValue = () => {
  27367. const { checkStrictly, multiple } = config.value;
  27368. const oldNodes = checkedNodes.value;
  27369. const nodes = sortByOriginalOrder(oldNodes, getCheckedNodes(!checkStrictly));
  27370. const values = nodes.map((node) => node.valueByOption);
  27371. checkedNodes.value = nodes;
  27372. checkedValue.value = multiple ? values : values[0] ?? null;
  27373. };
  27374. const syncCheckedValue = (loaded = false, forced = false) => {
  27375. const { modelValue } = props;
  27376. const { lazy, multiple, checkStrictly } = config.value;
  27377. const leafOnly = !checkStrictly;
  27378. if (!initialLoaded.value || manualChecked || !forced && isEqual$1(modelValue, checkedValue.value)) return;
  27379. if (lazy && !loaded) {
  27380. const nodes = unique(flattenDeep(castArray(modelValue))).map((val) => store?.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);
  27381. if (nodes.length) nodes.forEach((node) => {
  27382. lazyLoad(node, () => syncCheckedValue(false, forced));
  27383. });
  27384. else syncCheckedValue(true, forced);
  27385. } else {
  27386. syncMenuState(unique((multiple ? castArray(modelValue) : [modelValue]).map((val) => store?.getNodeByValue(val, leafOnly))), forced);
  27387. checkedValue.value = cloneDeep(modelValue ?? void 0);
  27388. }
  27389. };
  27390. const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {
  27391. const { checkStrictly } = config.value;
  27392. const oldNodes = checkedNodes.value;
  27393. const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));
  27394. const oldExpandingNode = store?.getSameNode(expandingNode.value);
  27395. const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];
  27396. if (newExpandingNode) newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));
  27397. else expandingNode.value = void 0;
  27398. oldNodes.forEach((node) => node.doCheck(false));
  27399. reactive(newNodes).forEach((node) => node.doCheck(true));
  27400. checkedNodes.value = newNodes;
  27401. nextTick(scrollToExpandingNode);
  27402. };
  27403. const scrollToExpandingNode = () => {
  27404. if (!isClient) return;
  27405. menuList.value.forEach((menu) => {
  27406. const menuElement = menu?.$el;
  27407. if (menuElement) if (virtualScroll.value) {
  27408. const activeIndex = menu?.getActiveNodeIndex?.();
  27409. if (activeIndex !== void 0 && activeIndex >= 0) menu?.scrollToItem?.(activeIndex);
  27410. } else {
  27411. const container = menuElement.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
  27412. let activeNode = menuElement.querySelector(`.${ns.b("node")}.in-active-path`);
  27413. if (!activeNode) {
  27414. const activeElements = menuElement.querySelectorAll(`.${ns.b("node")}.${ns.is("active")}`);
  27415. activeNode = activeElements[activeElements.length - 1];
  27416. }
  27417. scrollIntoView(container, activeNode);
  27418. }
  27419. });
  27420. };
  27421. const handleKeyDown = (e) => {
  27422. const target = e.target;
  27423. const code = getEventCode(e);
  27424. switch (code) {
  27425. case EVENT_CODE.up:
  27426. case EVENT_CODE.down: {
  27427. e.preventDefault();
  27428. const distance = code === EVENT_CODE.up ? -1 : 1;
  27429. if (virtualScroll.value) {
  27430. const menuIndex = getMenuIndex(target);
  27431. const menu = menuList.value[menuIndex];
  27432. if (menu) {
  27433. const currentIndex = menu.getNodeIndexById(target.id);
  27434. if (currentIndex >= 0) {
  27435. const nodesInMenu = menus.value[menuIndex] ?? [];
  27436. const nodesCount = nodesInMenu.length;
  27437. let targetIndex = currentIndex + distance;
  27438. while (targetIndex >= 0 && targetIndex < nodesCount) {
  27439. if (!nodesInMenu[targetIndex].isDisabled) {
  27440. menu.focusNodeAt(targetIndex);
  27441. return;
  27442. }
  27443. targetIndex += distance;
  27444. }
  27445. }
  27446. }
  27447. }
  27448. focusNode(getSibling(target, distance, `.${ns.b("node")}[tabindex="-1"]`));
  27449. break;
  27450. }
  27451. case EVENT_CODE.left: {
  27452. e.preventDefault();
  27453. const expandedNode = menuList.value[getMenuIndex(target) - 1]?.$el.querySelector(`.${ns.b("node")}[aria-expanded="true"]`);
  27454. focusNode(expandedNode);
  27455. break;
  27456. }
  27457. case EVENT_CODE.right: {
  27458. e.preventDefault();
  27459. const firstNode = menuList.value[getMenuIndex(target) + 1]?.$el.querySelector(`.${ns.b("node")}[tabindex="-1"]`);
  27460. focusNode(firstNode);
  27461. break;
  27462. }
  27463. case EVENT_CODE.enter:
  27464. case EVENT_CODE.numpadEnter:
  27465. checkNode(target);
  27466. break;
  27467. }
  27468. };
  27469. provide(CASCADER_PANEL_INJECTION_KEY, reactive({
  27470. config,
  27471. expandingNode,
  27472. checkedNodes,
  27473. isHoverMenu,
  27474. initialLoaded,
  27475. renderLabelFn,
  27476. virtualScroll,
  27477. itemSize,
  27478. height,
  27479. lazyLoad,
  27480. expandNode,
  27481. handleCheckChange
  27482. }));
  27483. watch(config, (newVal, oldVal) => {
  27484. if (isEqual$1(newVal, oldVal)) return;
  27485. initStore();
  27486. }, { immediate: true });
  27487. watch(() => props.options, initStore, { deep: true });
  27488. watch(() => props.modelValue, () => {
  27489. manualChecked = false;
  27490. syncCheckedValue();
  27491. }, { deep: true });
  27492. watch(() => checkedValue.value, (val) => {
  27493. if (!isEqual$1(val, props.modelValue)) {
  27494. emit(UPDATE_MODEL_EVENT, val);
  27495. emit(CHANGE_EVENT, val);
  27496. }
  27497. });
  27498. const loadLazyRootNodes = () => {
  27499. if (initialLoadedOnce.value || !initialLoaded.value) return;
  27500. initStore();
  27501. };
  27502. onBeforeUpdate(() => menuList.value = []);
  27503. onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue());
  27504. __expose({
  27505. menuList,
  27506. menus,
  27507. checkedNodes,
  27508. handleKeyDown,
  27509. handleCheckChange,
  27510. getFlattedNodes,
  27511. /**
  27512. * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`
  27513. */
  27514. getCheckedNodes,
  27515. /**
  27516. * @description clear checked nodes
  27517. */
  27518. clearCheckedNodes,
  27519. calculateCheckedValue,
  27520. scrollToExpandingNode,
  27521. loadLazyRootNodes
  27522. });
  27523. return (_ctx, _cache) => {
  27524. return openBlock(), createElementBlock("div", {
  27525. class: normalizeClass([unref(ns).b("panel"), unref(ns).is("bordered", __props.border)]),
  27526. onKeydown: handleKeyDown
  27527. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(menus.value, (menu, index) => {
  27528. return openBlock(), createBlock(menu_default$1, {
  27529. key: index,
  27530. ref_for: true,
  27531. ref: (item) => menuList.value[index] = item,
  27532. index,
  27533. nodes: [...menu],
  27534. "virtual-scroll": virtualScroll.value,
  27535. "item-size": itemSize.value,
  27536. height: height.value
  27537. }, {
  27538. empty: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
  27539. _: 3
  27540. }, 8, [
  27541. "index",
  27542. "nodes",
  27543. "virtual-scroll",
  27544. "item-size",
  27545. "height"
  27546. ]);
  27547. }), 128))], 34);
  27548. };
  27549. }
  27550. }));
  27551. //#endregion
  27552. //#region node_modules/element-plus/es/components/cascader/src/cascader.mjs
  27553. /**
  27554. * @deprecated Removed after 3.0.0, Use `CascaderComponentProps` instead.
  27555. */
  27556. var cascaderProps = buildProps({
  27557. ...CommonProps,
  27558. /**
  27559. * @description size of input
  27560. */
  27561. size: useSizeProp,
  27562. /**
  27563. * @description placeholder of input
  27564. */
  27565. placeholder: String,
  27566. /**
  27567. * @description whether Cascader is disabled
  27568. */
  27569. disabled: {
  27570. type: Boolean,
  27571. default: void 0
  27572. },
  27573. /**
  27574. * @description whether selected value can be cleared
  27575. */
  27576. clearable: Boolean,
  27577. /**
  27578. * @description custom clear icon component
  27579. */
  27580. clearIcon: {
  27581. type: iconPropType,
  27582. default: circle_close_default
  27583. },
  27584. /**
  27585. * @description whether the options can be searched
  27586. */
  27587. filterable: Boolean,
  27588. /**
  27589. * @description customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits.
  27590. */
  27591. filterMethod: {
  27592. type: definePropType(Function),
  27593. default: (node, keyword) => node.text.includes(keyword)
  27594. },
  27595. /**
  27596. * @description option label separator
  27597. */
  27598. separator: {
  27599. type: String,
  27600. default: " / "
  27601. },
  27602. /**
  27603. * @description whether to display all levels of the selected value in the input
  27604. */
  27605. showAllLevels: {
  27606. type: Boolean,
  27607. default: true
  27608. },
  27609. /**
  27610. * @description whether to collapse tags in multiple selection mode
  27611. */
  27612. collapseTags: Boolean,
  27613. /**
  27614. * @description The max tags number to be shown. To use this, collapse-tags must be true
  27615. */
  27616. maxCollapseTags: {
  27617. type: Number,
  27618. default: 1
  27619. },
  27620. /**
  27621. * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, collapse-tags must be true
  27622. */
  27623. collapseTagsTooltip: Boolean,
  27624. /**
  27625. * @description The max height of collapse tags tooltip, in pixels. To use this, collapse-tags-tooltip must be true
  27626. */
  27627. maxCollapseTagsTooltipHeight: { type: [String, Number] },
  27628. /**
  27629. * @description debounce delay when typing filter keyword, in milliseconds
  27630. */
  27631. debounce: {
  27632. type: Number,
  27633. default: 300
  27634. },
  27635. /**
  27636. * @description hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted
  27637. */
  27638. beforeFilter: {
  27639. type: definePropType(Function),
  27640. default: () => true
  27641. },
  27642. /**
  27643. * @description position of dropdown
  27644. */
  27645. placement: {
  27646. type: definePropType(String),
  27647. values: Ee,
  27648. default: "bottom-start"
  27649. },
  27650. /**
  27651. * @description list of possible positions for dropdown
  27652. */
  27653. fallbackPlacements: {
  27654. type: definePropType(Array),
  27655. default: [
  27656. "bottom-start",
  27657. "bottom",
  27658. "top-start",
  27659. "top",
  27660. "right",
  27661. "left"
  27662. ]
  27663. },
  27664. /**
  27665. * @description custom class name for Cascader's dropdown
  27666. */
  27667. popperClass: useTooltipContentProps.popperClass,
  27668. /**
  27669. * @description custom style for Cascader's dropdown
  27670. */
  27671. popperStyle: useTooltipContentProps.popperStyle,
  27672. /**
  27673. * @description whether cascader popup is teleported
  27674. */
  27675. teleported: useTooltipContentProps.teleported,
  27676. /**
  27677. * @description tooltip theme, built-in theme: `dark` / `light`
  27678. */
  27679. effect: {
  27680. type: definePropType(String),
  27681. default: "light"
  27682. },
  27683. /**
  27684. * @description tag type
  27685. */
  27686. tagType: {
  27687. ...tagProps.type,
  27688. default: "info"
  27689. },
  27690. /**
  27691. * @description tag effect
  27692. */
  27693. tagEffect: {
  27694. ...tagProps.effect,
  27695. default: "light"
  27696. },
  27697. /**
  27698. * @description whether to trigger form validation
  27699. */
  27700. validateEvent: {
  27701. type: Boolean,
  27702. default: true
  27703. },
  27704. /**
  27705. * @description when dropdown is inactive and `persistent` is `false`, dropdown will be destroyed
  27706. */
  27707. persistent: {
  27708. type: Boolean,
  27709. default: true
  27710. },
  27711. /**
  27712. * @description Use `parent` when you want things tidy (like "Entire Collection" instead of listing 100 items)
  27713. * Use `child` when every single item matters (like important settings)
  27714. */
  27715. showCheckedStrategy: {
  27716. type: String,
  27717. values: ["parent", "child"],
  27718. default: "child"
  27719. },
  27720. /**
  27721. * @description whether to check or uncheck node when clicking on the node
  27722. */
  27723. checkOnClickNode: Boolean,
  27724. /**
  27725. * @description whether to show the radio or checkbox prefix
  27726. */
  27727. showPrefix: {
  27728. type: Boolean,
  27729. default: true
  27730. },
  27731. /**
  27732. * @description whether the width of the suggestion panel is the same as the input, if the value is `number`, then the width is fixed
  27733. */
  27734. fitInputWidth: {
  27735. type: [Boolean, Number],
  27736. default: false
  27737. },
  27738. ...useEmptyValuesProps
  27739. });
  27740. var emitChangeFn$1 = (value) => true;
  27741. var cascaderEmits = {
  27742. [UPDATE_MODEL_EVENT]: emitChangeFn$1,
  27743. [CHANGE_EVENT]: emitChangeFn$1,
  27744. focus: (evt) => evt instanceof FocusEvent,
  27745. blur: (evt) => evt instanceof FocusEvent,
  27746. clear: () => true,
  27747. visibleChange: (val) => isBoolean(val),
  27748. expandChange: (val) => !!val,
  27749. removeTag: (val) => !!val
  27750. };
  27751. //#endregion
  27752. //#region node_modules/element-plus/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs
  27753. var _hoisted_1$58 = ["placeholder"];
  27754. var _hoisted_2$35 = ["onClick"];
  27755. var _hoisted_3$16 = [
  27756. "id",
  27757. "data-suggestion-index",
  27758. "onClick"
  27759. ];
  27760. var SUGGESTION_ITEM_EXTRA_WIDTH = 34;
  27761. //#endregion
  27762. //#region node_modules/element-plus/es/components/cascader/index.mjs
  27763. var ElCascader = withInstall(/* @__PURE__ */ defineComponent({
  27764. name: "ElCascader",
  27765. __name: "cascader",
  27766. props: cascaderProps,
  27767. emits: cascaderEmits,
  27768. setup(__props, { expose: __expose, emit: __emit }) {
  27769. const popperOptions = { modifiers: [{
  27770. name: "arrowPosition",
  27771. enabled: true,
  27772. phase: "main",
  27773. fn: ({ state }) => {
  27774. const { modifiersData, placement } = state;
  27775. if ([
  27776. "right",
  27777. "left",
  27778. "bottom",
  27779. "top"
  27780. ].includes(placement)) return;
  27781. if (modifiersData.arrow) modifiersData.arrow.x = 35;
  27782. },
  27783. requires: ["arrow"]
  27784. }] };
  27785. const props = __props;
  27786. const emit = __emit;
  27787. const attrs = useAttrs$1();
  27788. const slots = useSlots();
  27789. let inputInitialHeight = 0;
  27790. let pressDeleteCount = 0;
  27791. const nsCascader = useNamespace("cascader");
  27792. const nsInput = useNamespace("input");
  27793. const sizeMapPadding = {
  27794. small: 7,
  27795. default: 11,
  27796. large: 15
  27797. };
  27798. const { t } = useLocale();
  27799. const { formItem } = useFormItem();
  27800. const isDisabled = useFormDisabled();
  27801. const { valueOnClear } = useEmptyValues(props);
  27802. const { isComposing, handleComposition } = useComposition({ afterComposition(event) {
  27803. const text = event.target?.value;
  27804. handleInput(text);
  27805. } });
  27806. const tooltipRef = ref();
  27807. const tagTooltipRef = ref();
  27808. const inputRef = ref();
  27809. const tagWrapper = ref();
  27810. const cascaderPanelRef = ref();
  27811. const suggestionPanel = ref();
  27812. const suggestionVirtualListRef = ref();
  27813. const popperVisible = ref(false);
  27814. const inputHover = ref(false);
  27815. const filtering = ref(false);
  27816. const inputValue = ref("");
  27817. const searchInputValue = ref("");
  27818. const tags = ref([]);
  27819. const suggestions = ref([]);
  27820. const suggestionListWidth = ref("100%");
  27821. const hasCustomSuggestionItemSlot = computed(() => !!slots["suggestion-item"]);
  27822. const clampedSuggestionListHeight = computed(() => clamp$2(suggestions.value.length * props.itemSize, props.itemSize, props.height));
  27823. const showTagList = computed(() => {
  27824. if (!props.props.multiple) return [];
  27825. return props.collapseTags ? tags.value.slice(0, props.maxCollapseTags) : tags.value;
  27826. });
  27827. const collapseTagList = computed(() => {
  27828. if (!props.props.multiple) return [];
  27829. return props.collapseTags ? tags.value.slice(props.maxCollapseTags) : [];
  27830. });
  27831. const cascaderStyle = computed(() => {
  27832. return attrs.style;
  27833. });
  27834. const inputPlaceholder = computed(() => props.placeholder ?? t("el.cascader.placeholder"));
  27835. const currentPlaceholder = computed(() => searchInputValue.value || tags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value);
  27836. const realSize = useFormSize();
  27837. const tagSize = computed(() => realSize.value === "small" ? "small" : "default");
  27838. const multiple = computed(() => !!props.props.multiple);
  27839. const readonly = computed(() => !props.filterable || multiple.value);
  27840. const searchKeyword = computed(() => multiple.value ? searchInputValue.value : inputValue.value);
  27841. const checkedNodes = computed(() => cascaderPanelRef.value?.checkedNodes || []);
  27842. const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
  27843. disabled: isDisabled,
  27844. beforeBlur(event) {
  27845. return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
  27846. },
  27847. afterBlur() {
  27848. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  27849. }
  27850. });
  27851. const clearBtnVisible = computed(() => {
  27852. if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value && !isFocused.value) return false;
  27853. return !!checkedNodes.value.length;
  27854. });
  27855. const presentText = computed(() => {
  27856. const { showAllLevels, separator } = props;
  27857. const nodes = checkedNodes.value;
  27858. return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
  27859. });
  27860. const validateState = computed(() => formItem?.validateState || "");
  27861. const checkedValue = computed({
  27862. get() {
  27863. return cloneDeep(props.modelValue);
  27864. },
  27865. set(val) {
  27866. const value = val ?? valueOnClear.value;
  27867. emit(UPDATE_MODEL_EVENT, value);
  27868. emit(CHANGE_EVENT, value);
  27869. if (props.validateEvent) formItem?.validate("change").catch(NOOP);
  27870. }
  27871. });
  27872. const cascaderKls = computed(() => {
  27873. return [
  27874. nsCascader.b(),
  27875. nsCascader.m(realSize.value),
  27876. nsCascader.is("disabled", isDisabled.value),
  27877. attrs.class
  27878. ];
  27879. });
  27880. const cascaderIconKls = computed(() => {
  27881. return [
  27882. nsInput.e("icon"),
  27883. "icon-arrow-down",
  27884. nsCascader.is("reverse", popperVisible.value)
  27885. ];
  27886. });
  27887. const inputClass = computed(() => nsCascader.is("focus", isFocused.value));
  27888. const contentRef = computed(() => {
  27889. return tooltipRef.value?.popperRef?.contentRef;
  27890. });
  27891. const handleClickOutside = (event) => {
  27892. if (isFocused.value) handleBlur(new FocusEvent("blur", event));
  27893. togglePopperVisible(false);
  27894. };
  27895. const togglePopperVisible = (visible) => {
  27896. if (isDisabled.value) return;
  27897. visible = visible ?? !popperVisible.value;
  27898. if (visible !== popperVisible.value) {
  27899. popperVisible.value = visible;
  27900. inputRef.value?.input?.setAttribute("aria-expanded", `${visible}`);
  27901. if (visible) {
  27902. updatePopperPosition();
  27903. cascaderPanelRef.value && nextTick(cascaderPanelRef.value.scrollToExpandingNode);
  27904. } else if (props.filterable) syncPresentTextValue();
  27905. emit("visibleChange", visible);
  27906. }
  27907. };
  27908. const updatePopperPosition = () => {
  27909. nextTick(() => {
  27910. tooltipRef.value?.updatePopper();
  27911. });
  27912. };
  27913. const hideSuggestionPanel = () => {
  27914. filtering.value = false;
  27915. };
  27916. const genTag = (node) => {
  27917. const { showAllLevels, separator } = props;
  27918. return {
  27919. node,
  27920. key: node.uid,
  27921. text: node.calcText(showAllLevels, separator),
  27922. hitState: false,
  27923. closable: !isDisabled.value && !node.isDisabled
  27924. };
  27925. };
  27926. const deleteTag = (tag) => {
  27927. const node = tag.node;
  27928. node.doCheck(false);
  27929. cascaderPanelRef.value?.calculateCheckedValue();
  27930. emit("removeTag", node.valueByOption);
  27931. };
  27932. const getStrategyCheckedNodes = () => {
  27933. switch (props.showCheckedStrategy) {
  27934. case "child": return checkedNodes.value;
  27935. case "parent": {
  27936. const clickedNodes = getCheckedNodes(false);
  27937. const clickedNodesValue = clickedNodes.map((o) => o.value);
  27938. return clickedNodes.filter((o) => !o.parent || !clickedNodesValue.includes(o.parent.value));
  27939. }
  27940. default: return [];
  27941. }
  27942. };
  27943. const calculatePresentTags = () => {
  27944. if (!multiple.value) return;
  27945. const nodes = getStrategyCheckedNodes();
  27946. const allTags = [];
  27947. nodes.forEach((node) => allTags.push(genTag(node)));
  27948. tags.value = allTags;
  27949. };
  27950. const calculateSuggestions = () => {
  27951. const { filterMethod, showAllLevels, separator } = props;
  27952. const res = cascaderPanelRef.value?.getFlattedNodes(!props.props.checkStrictly)?.filter((node) => {
  27953. if (node.isDisabled) return false;
  27954. node.calcText(showAllLevels, separator);
  27955. return filterMethod(node, searchKeyword.value);
  27956. });
  27957. if (multiple.value) tags.value.forEach((tag) => {
  27958. tag.hitState = false;
  27959. });
  27960. filtering.value = true;
  27961. suggestions.value = res;
  27962. nextTick(() => {
  27963. if (props.virtualScroll && suggestions.value.length > 0) suggestionVirtualListRef.value?.scrollToItem(0);
  27964. updateStyle();
  27965. });
  27966. updatePopperPosition();
  27967. };
  27968. const getSuggestionPanelEl = (selector) => {
  27969. const el = suggestionPanel.value;
  27970. return selector ? el?.querySelector(selector) ?? void 0 : el;
  27971. };
  27972. const focusFirstNode = () => {
  27973. let firstNode;
  27974. if (filtering.value && suggestionPanel.value) firstNode = getSuggestionPanelEl(`.${nsCascader.e("suggestion-item")}`);
  27975. else firstNode = cascaderPanelRef.value?.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
  27976. if (firstNode) {
  27977. firstNode.focus();
  27978. if (!filtering.value && firstNode.getAttribute("aria-haspopup") === "true") firstNode.click();
  27979. }
  27980. };
  27981. const updateSuggestionPanelWidth = (inputWidth) => {
  27982. const suggestionPanelEl = getSuggestionPanelEl();
  27983. if (!suggestionPanelEl) return;
  27984. const panelWidth = isNumber(props.fitInputWidth) ? `${props.fitInputWidth}px` : `${inputWidth}px`;
  27985. const setPanelStyle = (el) => {
  27986. if (props.fitInputWidth !== false) {
  27987. el.style.width = panelWidth;
  27988. el.style.minWidth = "";
  27989. } else {
  27990. el.style.width = "";
  27991. el.style.minWidth = panelWidth;
  27992. }
  27993. };
  27994. setPanelStyle(suggestionPanelEl);
  27995. if (props.virtualScroll) {
  27996. suggestionListWidth.value = props.fitInputWidth !== false ? panelWidth : hasCustomSuggestionItemSlot.value ? `${inputWidth}px` : `${Math.max(inputWidth, calculateSuggestionMaxWidth())}px`;
  27997. return;
  27998. }
  27999. const suggestionList = getSuggestionPanelEl(`.${nsCascader.e("suggestion-list")}`);
  28000. if (suggestionList) setPanelStyle(suggestionList);
  28001. };
  28002. const getTagWrapperLeft = () => {
  28003. if (!slots.prefix) return 0;
  28004. const prefix = inputRef.value?.$el.querySelector(`.${nsInput.e("prefix")}`);
  28005. if (!prefix) return 0;
  28006. const prefixWidth = prefix.getBoundingClientRect().width;
  28007. if (prefixWidth <= 0) return 0;
  28008. return prefixWidth + sizeMapPadding[realSize.value || "default"];
  28009. };
  28010. const updateStyle = () => {
  28011. const inputInner = inputRef.value?.input;
  28012. const inputWrapper = inputRef.value?.$el;
  28013. if (!isClient || !inputInner || !inputWrapper) return;
  28014. if (suggestionPanel.value) updateSuggestionPanelWidth(inputWrapper.getBoundingClientRect().width);
  28015. const tagWrapperEl = tagWrapper.value;
  28016. if (tagWrapperEl) {
  28017. const height = tags.value.length > 0 ? `${Math.max(tagWrapperEl.offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`;
  28018. inputInner.style.height = height;
  28019. tagWrapperEl.style.left = `${getTagWrapperLeft()}px`;
  28020. updatePopperPosition();
  28021. }
  28022. };
  28023. const calculateSuggestionMaxWidth = () => {
  28024. if (hasCustomSuggestionItemSlot.value) return 0;
  28025. if (!suggestions.value.length) return 0;
  28026. const ctx = document.createElement("canvas").getContext("2d");
  28027. if (!ctx) return 0;
  28028. const renderedSuggestion = getSuggestionPanelEl(`.${nsCascader.e("suggestion-item")}`);
  28029. if (!renderedSuggestion || !isClient) return 0;
  28030. const style = getComputedStyle(renderedSuggestion);
  28031. const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight);
  28032. ctx.font = `bold ${style.fontSize} ${style.fontFamily}`;
  28033. let maxWidth = 0;
  28034. let hasChecked = false;
  28035. for (const suggestion of suggestions.value) {
  28036. const text = suggestion.text || "";
  28037. const metrics = ctx.measureText(text);
  28038. maxWidth = Math.max(maxWidth, metrics.width);
  28039. if (suggestion.checked && !hasChecked) hasChecked = true;
  28040. }
  28041. return maxWidth + padding + (hasChecked ? SUGGESTION_ITEM_EXTRA_WIDTH : 0);
  28042. };
  28043. const getCheckedNodes = (leafOnly) => {
  28044. return cascaderPanelRef.value?.getCheckedNodes(leafOnly);
  28045. };
  28046. const handleExpandChange = (value) => {
  28047. updatePopperPosition();
  28048. emit("expandChange", value);
  28049. };
  28050. const handleKeyDown = (e) => {
  28051. if (isComposing.value) return;
  28052. switch (getEventCode(e)) {
  28053. case EVENT_CODE.enter:
  28054. case EVENT_CODE.numpadEnter:
  28055. togglePopperVisible();
  28056. break;
  28057. case EVENT_CODE.down:
  28058. togglePopperVisible(true);
  28059. nextTick(focusFirstNode);
  28060. e.preventDefault();
  28061. break;
  28062. case EVENT_CODE.esc:
  28063. if (popperVisible.value === true) {
  28064. e.preventDefault();
  28065. e.stopPropagation();
  28066. togglePopperVisible(false);
  28067. }
  28068. break;
  28069. case EVENT_CODE.tab:
  28070. togglePopperVisible(false);
  28071. break;
  28072. }
  28073. };
  28074. const handleClear = () => {
  28075. cascaderPanelRef.value?.clearCheckedNodes();
  28076. if (!popperVisible.value && props.filterable) syncPresentTextValue();
  28077. togglePopperVisible(false);
  28078. emit("clear");
  28079. };
  28080. const syncPresentTextValue = () => {
  28081. const { value } = presentText;
  28082. inputValue.value = value;
  28083. searchInputValue.value = value;
  28084. };
  28085. const handleSuggestionClick = (node) => {
  28086. const { checked } = node;
  28087. if (multiple.value) cascaderPanelRef.value?.handleCheckChange(node, !checked, false);
  28088. else {
  28089. !checked && cascaderPanelRef.value?.handleCheckChange(node, true, false);
  28090. togglePopperVisible(false);
  28091. }
  28092. };
  28093. const getSuggestionIndexFromTarget = (target) => {
  28094. const indexStr = target.closest("[data-suggestion-index]")?.dataset.suggestionIndex;
  28095. if (!indexStr) return -1;
  28096. const index = Number.parseInt(indexStr, 10);
  28097. if (Number.isNaN(index) || index < 0 || index >= suggestions.value.length) return -1;
  28098. return index;
  28099. };
  28100. const handleSuggestionKeyDown = (e) => {
  28101. const target = e.target;
  28102. const code = getEventCode(e);
  28103. switch (code) {
  28104. case EVENT_CODE.up:
  28105. case EVENT_CODE.down: {
  28106. e.preventDefault();
  28107. const distance = code === EVENT_CODE.up ? -1 : 1;
  28108. if (props.virtualScroll && suggestionVirtualListRef.value) {
  28109. const currentIndex = getSuggestionIndexFromTarget(target);
  28110. if (currentIndex >= 0) {
  28111. const length = suggestions.value.length;
  28112. const targetIndex = (currentIndex + distance + length) % length;
  28113. suggestionVirtualListRef.value.scrollToItem(targetIndex);
  28114. nextTick(() => {
  28115. const targetItem = getSuggestionPanelEl(`#suggestion-${suggestions.value[targetIndex].uid}`);
  28116. targetItem && focusNode(targetItem);
  28117. });
  28118. return;
  28119. }
  28120. }
  28121. focusNode(getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
  28122. break;
  28123. }
  28124. case EVENT_CODE.enter:
  28125. case EVENT_CODE.numpadEnter:
  28126. target.click();
  28127. break;
  28128. }
  28129. };
  28130. const handleDelete = () => {
  28131. const lastTag = tags.value[tags.value.length - 1];
  28132. pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
  28133. if (!lastTag || !pressDeleteCount || props.collapseTags && tags.value.length > 1) return;
  28134. if (lastTag.hitState) deleteTag(lastTag);
  28135. else lastTag.hitState = true;
  28136. };
  28137. const handleFilter = useDebounceFn(() => {
  28138. const { value } = searchKeyword;
  28139. if (!value) return;
  28140. const passed = props.beforeFilter(value);
  28141. if (isPromise(passed)) passed.then(calculateSuggestions).catch(() => {});
  28142. else if (passed !== false) calculateSuggestions();
  28143. else hideSuggestionPanel();
  28144. }, computed(() => props.debounce));
  28145. const handleInput = (val, e) => {
  28146. !popperVisible.value && togglePopperVisible(true);
  28147. if (e?.isComposing) return;
  28148. if (val) handleFilter();
  28149. else {
  28150. const passed = props.beforeFilter("");
  28151. if (isPromise(passed)) passed.catch(() => {});
  28152. hideSuggestionPanel();
  28153. }
  28154. };
  28155. const getInputInnerHeight = (inputInner) => Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
  28156. const focus = () => {
  28157. inputRef.value?.focus();
  28158. };
  28159. const blur = () => {
  28160. inputRef.value?.blur();
  28161. };
  28162. watch(filtering, updatePopperPosition);
  28163. watch([
  28164. checkedNodes,
  28165. isDisabled,
  28166. () => props.collapseTags,
  28167. () => props.maxCollapseTags
  28168. ], calculatePresentTags);
  28169. watch(tags, () => {
  28170. nextTick(() => updateStyle());
  28171. });
  28172. watch(realSize, async () => {
  28173. await nextTick();
  28174. const inputInner = inputRef.value.input;
  28175. inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
  28176. updateStyle();
  28177. });
  28178. watch(presentText, syncPresentTextValue, { immediate: true });
  28179. watch(() => popperVisible.value, (val) => {
  28180. if (val && props.props.lazy && props.props.lazyLoad) cascaderPanelRef.value?.loadLazyRootNodes();
  28181. });
  28182. onMounted(() => {
  28183. const inputInner = inputRef.value.input;
  28184. const inputWrapper = inputRef.value.$el;
  28185. const inputInnerHeight = getInputInnerHeight(inputInner);
  28186. inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
  28187. useResizeObserver(inputWrapper, updateStyle);
  28188. });
  28189. __expose({
  28190. /**
  28191. * @description get an array of currently selected node,(leafOnly) whether only return the leaf checked nodes, default is `false`
  28192. */
  28193. getCheckedNodes,
  28194. /**
  28195. * @description cascader panel ref
  28196. */
  28197. cascaderPanelRef,
  28198. /**
  28199. * @description toggle the visible of popper
  28200. */
  28201. togglePopperVisible,
  28202. /**
  28203. * @description cascader content ref
  28204. */
  28205. contentRef,
  28206. /**
  28207. * @description selected content text
  28208. */
  28209. presentText,
  28210. /** @description focus the input element */
  28211. focus,
  28212. /** @description blur the input element */
  28213. blur
  28214. });
  28215. return (_ctx, _cache) => {
  28216. return openBlock(), createBlock(unref(ElTooltip), {
  28217. ref_key: "tooltipRef",
  28218. ref: tooltipRef,
  28219. visible: popperVisible.value,
  28220. teleported: __props.teleported,
  28221. "popper-class": [unref(nsCascader).e("dropdown"), __props.popperClass],
  28222. "popper-style": __props.popperStyle,
  28223. "popper-options": popperOptions,
  28224. "fallback-placements": __props.fallbackPlacements,
  28225. "stop-popper-mouse-event": false,
  28226. "gpu-acceleration": false,
  28227. placement: __props.placement,
  28228. transition: `${unref(nsCascader).namespace.value}-zoom-in-top`,
  28229. effect: __props.effect,
  28230. pure: "",
  28231. persistent: __props.persistent,
  28232. onHide: hideSuggestionPanel
  28233. }, {
  28234. default: withCtx(() => [withDirectives((openBlock(), createElementBlock("div", {
  28235. ref_key: "wrapperRef",
  28236. ref: wrapperRef,
  28237. class: normalizeClass(cascaderKls.value),
  28238. style: normalizeStyle(cascaderStyle.value),
  28239. onClick: _cache[8] || (_cache[8] = () => togglePopperVisible(readonly.value ? void 0 : true)),
  28240. onKeydown: handleKeyDown,
  28241. onMouseenter: _cache[9] || (_cache[9] = ($event) => inputHover.value = true),
  28242. onMouseleave: _cache[10] || (_cache[10] = ($event) => inputHover.value = false)
  28243. }, [createVNode(unref(ElInput), {
  28244. ref_key: "inputRef",
  28245. ref: inputRef,
  28246. modelValue: inputValue.value,
  28247. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event),
  28248. placeholder: currentPlaceholder.value,
  28249. readonly: readonly.value,
  28250. disabled: unref(isDisabled),
  28251. "validate-event": false,
  28252. size: unref(realSize),
  28253. class: normalizeClass(inputClass.value),
  28254. tabindex: multiple.value && __props.filterable && !unref(isDisabled) ? -1 : void 0,
  28255. onCompositionstart: unref(handleComposition),
  28256. onCompositionupdate: unref(handleComposition),
  28257. onCompositionend: unref(handleComposition),
  28258. onInput: handleInput
  28259. }, createSlots({
  28260. suffix: withCtx(() => [clearBtnVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
  28261. key: "clear",
  28262. class: normalizeClass([unref(nsInput).e("icon"), "icon-circle-close"]),
  28263. onClick: withModifiers(handleClear, ["stop"])
  28264. }, {
  28265. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  28266. _: 1
  28267. }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
  28268. key: "arrow-down",
  28269. class: normalizeClass(cascaderIconKls.value),
  28270. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => togglePopperVisible(), ["stop"]))
  28271. }, {
  28272. default: withCtx(() => [createVNode(unref(arrow_down_default))]),
  28273. _: 1
  28274. }, 8, ["class"]))]),
  28275. _: 2
  28276. }, [_ctx.$slots.prefix ? {
  28277. name: "prefix",
  28278. fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
  28279. key: "0"
  28280. } : void 0]), 1032, [
  28281. "modelValue",
  28282. "placeholder",
  28283. "readonly",
  28284. "disabled",
  28285. "size",
  28286. "class",
  28287. "tabindex",
  28288. "onCompositionstart",
  28289. "onCompositionupdate",
  28290. "onCompositionend"
  28291. ]), multiple.value ? (openBlock(), createElementBlock("div", {
  28292. key: 0,
  28293. ref_key: "tagWrapper",
  28294. ref: tagWrapper,
  28295. class: normalizeClass([unref(nsCascader).e("tags"), unref(nsCascader).is("validate", Boolean(validateState.value))])
  28296. }, [
  28297. renderSlot(_ctx.$slots, "tag", {
  28298. data: tags.value,
  28299. deleteTag
  28300. }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(showTagList.value, (tag) => {
  28301. return openBlock(), createBlock(unref(ElTag), {
  28302. key: tag.key,
  28303. type: __props.tagType,
  28304. size: tagSize.value,
  28305. effect: __props.tagEffect,
  28306. hit: tag.hitState,
  28307. closable: tag.closable,
  28308. "disable-transitions": "",
  28309. onClose: ($event) => deleteTag(tag)
  28310. }, {
  28311. default: withCtx(() => [createBaseVNode("span", null, toDisplayString(tag.text), 1)]),
  28312. _: 2
  28313. }, 1032, [
  28314. "type",
  28315. "size",
  28316. "effect",
  28317. "hit",
  28318. "closable",
  28319. "onClose"
  28320. ]);
  28321. }), 128))]),
  28322. __props.collapseTags && tags.value.length > __props.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
  28323. key: 0,
  28324. ref_key: "tagTooltipRef",
  28325. ref: tagTooltipRef,
  28326. disabled: popperVisible.value || !__props.collapseTagsTooltip,
  28327. "fallback-placements": [
  28328. "bottom",
  28329. "top",
  28330. "right",
  28331. "left"
  28332. ],
  28333. placement: "bottom",
  28334. "popper-class": __props.popperClass,
  28335. "popper-style": __props.popperStyle,
  28336. effect: __props.effect,
  28337. persistent: __props.persistent
  28338. }, {
  28339. default: withCtx(() => [createVNode(unref(ElTag), {
  28340. closable: false,
  28341. size: tagSize.value,
  28342. type: __props.tagType,
  28343. effect: __props.tagEffect,
  28344. "disable-transitions": ""
  28345. }, {
  28346. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(unref(nsCascader).e("tags-text")) }, " + " + toDisplayString(tags.value.length - __props.maxCollapseTags), 3)]),
  28347. _: 1
  28348. }, 8, [
  28349. "size",
  28350. "type",
  28351. "effect"
  28352. ])]),
  28353. content: withCtx(() => [createVNode(unref(ElScrollbar), { "max-height": __props.maxCollapseTagsTooltipHeight }, {
  28354. default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(nsCascader).e("collapse-tags")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(collapseTagList.value, (tag, idx) => {
  28355. return openBlock(), createElementBlock("div", {
  28356. key: idx,
  28357. class: normalizeClass(unref(nsCascader).e("collapse-tag"))
  28358. }, [(openBlock(), createBlock(unref(ElTag), {
  28359. key: tag.key,
  28360. class: "in-tooltip",
  28361. type: __props.tagType,
  28362. size: tagSize.value,
  28363. effect: __props.tagEffect,
  28364. hit: tag.hitState,
  28365. closable: tag.closable,
  28366. "disable-transitions": "",
  28367. onClose: ($event) => deleteTag(tag)
  28368. }, {
  28369. default: withCtx(() => [createBaseVNode("span", null, toDisplayString(tag.text), 1)]),
  28370. _: 2
  28371. }, 1032, [
  28372. "type",
  28373. "size",
  28374. "effect",
  28375. "hit",
  28376. "closable",
  28377. "onClose"
  28378. ]))], 2);
  28379. }), 128))], 2)]),
  28380. _: 1
  28381. }, 8, ["max-height"])]),
  28382. _: 1
  28383. }, 8, [
  28384. "disabled",
  28385. "popper-class",
  28386. "popper-style",
  28387. "effect",
  28388. "persistent"
  28389. ])) : createCommentVNode("v-if", true),
  28390. __props.filterable && !unref(isDisabled) ? withDirectives((openBlock(), createElementBlock("input", {
  28391. key: 1,
  28392. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchInputValue.value = $event),
  28393. type: "text",
  28394. class: normalizeClass(unref(nsCascader).e("search-input")),
  28395. placeholder: presentText.value ? "" : inputPlaceholder.value,
  28396. onInput: _cache[3] || (_cache[3] = (e) => handleInput(searchInputValue.value, e)),
  28397. onClick: _cache[4] || (_cache[4] = withModifiers(($event) => togglePopperVisible(true), ["stop"])),
  28398. onKeydown: withKeys(handleDelete, ["delete"]),
  28399. onCompositionstart: _cache[5] || (_cache[5] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
  28400. onCompositionupdate: _cache[6] || (_cache[6] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
  28401. onCompositionend: _cache[7] || (_cache[7] = (...args) => unref(handleComposition) && unref(handleComposition)(...args))
  28402. }, null, 42, _hoisted_1$58)), [[vModelText, searchInputValue.value]]) : createCommentVNode("v-if", true)
  28403. ], 2)) : createCommentVNode("v-if", true)], 38)), [[
  28404. unref(ClickOutside),
  28405. handleClickOutside,
  28406. contentRef.value
  28407. ]])]),
  28408. content: withCtx(() => [
  28409. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  28410. key: 0,
  28411. class: normalizeClass(unref(nsCascader).e("header")),
  28412. onClick: _cache[11] || (_cache[11] = withModifiers(() => {}, ["stop"]))
  28413. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  28414. withDirectives(createVNode(unref(ElCascaderPanel), {
  28415. ref_key: "cascaderPanelRef",
  28416. ref: cascaderPanelRef,
  28417. modelValue: checkedValue.value,
  28418. "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => checkedValue.value = $event),
  28419. options: __props.options,
  28420. props: props.props,
  28421. border: false,
  28422. "render-label": _ctx.$slots.default,
  28423. "virtual-scroll": __props.virtualScroll,
  28424. "item-size": __props.itemSize,
  28425. height: __props.height,
  28426. onExpandChange: handleExpandChange,
  28427. onClose: _cache[13] || (_cache[13] = ($event) => _ctx.$nextTick(() => togglePopperVisible(false)))
  28428. }, {
  28429. empty: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
  28430. _: 3
  28431. }, 8, [
  28432. "modelValue",
  28433. "options",
  28434. "props",
  28435. "render-label",
  28436. "virtual-scroll",
  28437. "item-size",
  28438. "height"
  28439. ]), [[vShow, !filtering.value]]),
  28440. __props.filterable ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [!__props.virtualScroll ? withDirectives((openBlock(), createBlock(unref(ElScrollbar), {
  28441. key: 0,
  28442. ref: (ref) => suggestionPanel.value = ref?.$el,
  28443. tag: "ul",
  28444. class: normalizeClass(unref(nsCascader).e("suggestion-panel")),
  28445. "wrap-class": unref(nsCascader).e("suggestion-wrap"),
  28446. "view-class": unref(nsCascader).e("suggestion-list"),
  28447. onKeydown: handleSuggestionKeyDown
  28448. }, {
  28449. default: withCtx(() => [suggestions.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(suggestions.value, (item) => {
  28450. return openBlock(), createElementBlock("li", {
  28451. key: item.uid,
  28452. class: normalizeClass([unref(nsCascader).e("suggestion-item"), unref(nsCascader).is("checked", item.checked)]),
  28453. tabindex: -1,
  28454. onClick: ($event) => handleSuggestionClick(item)
  28455. }, [renderSlot(_ctx.$slots, "suggestion-item", { item }, () => [createBaseVNode("span", null, toDisplayString(item.text), 1), item.checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  28456. default: withCtx(() => [createVNode(unref(check_default))]),
  28457. _: 1
  28458. })) : createCommentVNode("v-if", true)])], 10, _hoisted_2$35);
  28459. }), 128)) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [createBaseVNode("li", { class: normalizeClass(unref(nsCascader).e("empty-text")) }, toDisplayString(unref(t)("el.cascader.noMatch")), 3)])]),
  28460. _: 3
  28461. }, 8, [
  28462. "class",
  28463. "wrap-class",
  28464. "view-class"
  28465. ])), [[vShow, filtering.value]]) : withDirectives((openBlock(), createElementBlock("div", {
  28466. key: 1,
  28467. ref_key: "suggestionPanel",
  28468. ref: suggestionPanel,
  28469. class: normalizeClass(unref(nsCascader).e("suggestion-panel")),
  28470. onKeydown: handleSuggestionKeyDown
  28471. }, [withDirectives(createVNode(unref(FixedSizeList), {
  28472. ref_key: "suggestionVirtualListRef",
  28473. ref: suggestionVirtualListRef,
  28474. height: clampedSuggestionListHeight.value,
  28475. "item-size": __props.itemSize,
  28476. data: suggestions.value,
  28477. total: suggestions.value.length,
  28478. "class-name": unref(nsCascader).e("suggestion-list"),
  28479. "inner-element": "ul",
  28480. "inner-width": suggestionListWidth.value
  28481. }, {
  28482. default: withCtx(({ data, index, style }) => [(openBlock(), createElementBlock("li", {
  28483. id: `suggestion-${data[index].uid}`,
  28484. key: data[index].uid,
  28485. "data-suggestion-index": index,
  28486. class: normalizeClass([unref(nsCascader).e("suggestion-item"), unref(nsCascader).is("checked", data[index].checked)]),
  28487. tabindex: -1,
  28488. style: normalizeStyle(style),
  28489. onClick: ($event) => handleSuggestionClick(data[index])
  28490. }, [renderSlot(_ctx.$slots, "suggestion-item", { item: data[index] }, () => [createBaseVNode("span", null, toDisplayString(data[index].text), 1), data[index].checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  28491. default: withCtx(() => [createVNode(unref(check_default))]),
  28492. _: 1
  28493. })) : createCommentVNode("v-if", true)])], 14, _hoisted_3$16))]),
  28494. _: 3
  28495. }, 8, [
  28496. "height",
  28497. "item-size",
  28498. "data",
  28499. "total",
  28500. "class-name",
  28501. "inner-width"
  28502. ]), [[vShow, suggestions.value.length]]), !suggestions.value.length ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [createBaseVNode("ul", { class: normalizeClass(unref(nsCascader).e("suggestion-list")) }, [createBaseVNode("li", { class: normalizeClass(unref(nsCascader).e("empty-text")) }, toDisplayString(unref(t)("el.cascader.noMatch")), 3)], 2)]) : createCommentVNode("v-if", true)], 34)), [[vShow, filtering.value]])], 64)) : createCommentVNode("v-if", true),
  28503. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  28504. key: 2,
  28505. class: normalizeClass(unref(nsCascader).e("footer")),
  28506. onClick: _cache[14] || (_cache[14] = withModifiers(() => {}, ["stop"]))
  28507. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  28508. ]),
  28509. _: 3
  28510. }, 8, [
  28511. "visible",
  28512. "teleported",
  28513. "popper-class",
  28514. "popper-style",
  28515. "fallback-placements",
  28516. "placement",
  28517. "transition",
  28518. "effect",
  28519. "persistent"
  28520. ]);
  28521. };
  28522. }
  28523. }));
  28524. //#endregion
  28525. //#region node_modules/element-plus/es/components/check-tag/src/check-tag.mjs
  28526. /**
  28527. * @deprecated Removed after 3.0.0, Use `CheckTagProps` instead.
  28528. */
  28529. var checkTagProps = buildProps({
  28530. /**
  28531. * @description is checked
  28532. */
  28533. checked: Boolean,
  28534. /**
  28535. * @description whether the check-tag is disabled
  28536. */
  28537. disabled: Boolean,
  28538. /**
  28539. * @description type of Tag
  28540. */
  28541. type: {
  28542. type: String,
  28543. values: [
  28544. "primary",
  28545. "success",
  28546. "info",
  28547. "warning",
  28548. "danger"
  28549. ],
  28550. default: "primary"
  28551. }
  28552. });
  28553. var checkTagEmits = {
  28554. "update:checked": (value) => isBoolean(value),
  28555. [CHANGE_EVENT]: (value) => isBoolean(value)
  28556. };
  28557. //#endregion
  28558. //#region node_modules/element-plus/es/components/check-tag/index.mjs
  28559. var ElCheckTag = withInstall(/* @__PURE__ */ defineComponent({
  28560. name: "ElCheckTag",
  28561. __name: "check-tag",
  28562. props: checkTagProps,
  28563. emits: checkTagEmits,
  28564. setup(__props, { emit: __emit }) {
  28565. const props = __props;
  28566. const emit = __emit;
  28567. const ns = useNamespace("check-tag");
  28568. const containerKls = computed(() => [
  28569. ns.b(),
  28570. ns.is("checked", props.checked),
  28571. ns.is("disabled", props.disabled),
  28572. ns.m(props.type || "primary")
  28573. ]);
  28574. const handleChange = () => {
  28575. if (props.disabled) return;
  28576. const checked = !props.checked;
  28577. emit(CHANGE_EVENT, checked);
  28578. emit("update:checked", checked);
  28579. };
  28580. return (_ctx, _cache) => {
  28581. return openBlock(), createElementBlock("span", {
  28582. class: normalizeClass(containerKls.value),
  28583. onClick: handleChange
  28584. }, [renderSlot(_ctx.$slots, "default")], 2);
  28585. };
  28586. }
  28587. }));
  28588. //#endregion
  28589. //#region node_modules/element-plus/es/components/col/src/col.mjs
  28590. /**
  28591. * @deprecated Removed after 3.0.0, Use `ColProps` instead.
  28592. */
  28593. var colProps = buildProps({
  28594. /**
  28595. * @description custom element tag
  28596. */
  28597. tag: {
  28598. type: String,
  28599. default: "div"
  28600. },
  28601. /**
  28602. * @description number of column the grid spans
  28603. */
  28604. span: {
  28605. type: Number,
  28606. default: 24
  28607. },
  28608. /**
  28609. * @description number of spacing on the left side of the grid
  28610. */
  28611. offset: {
  28612. type: Number,
  28613. default: 0
  28614. },
  28615. /**
  28616. * @description number of columns that grid moves to the left
  28617. */
  28618. pull: {
  28619. type: Number,
  28620. default: 0
  28621. },
  28622. /**
  28623. * @description number of columns that grid moves to the right
  28624. */
  28625. push: {
  28626. type: Number,
  28627. default: 0
  28628. },
  28629. /**
  28630. * @description `<768px` Responsive columns or column props object
  28631. */
  28632. xs: {
  28633. type: definePropType([Number, Object]),
  28634. default: () => mutable({})
  28635. },
  28636. /**
  28637. * @description `≥768px` Responsive columns or column props object
  28638. */
  28639. sm: {
  28640. type: definePropType([Number, Object]),
  28641. default: () => mutable({})
  28642. },
  28643. /**
  28644. * @description `≥992px` Responsive columns or column props object
  28645. */
  28646. md: {
  28647. type: definePropType([Number, Object]),
  28648. default: () => mutable({})
  28649. },
  28650. /**
  28651. * @description `≥1200px` Responsive columns or column props object
  28652. */
  28653. lg: {
  28654. type: definePropType([Number, Object]),
  28655. default: () => mutable({})
  28656. },
  28657. /**
  28658. * @description `≥1920px` Responsive columns or column props object
  28659. */
  28660. xl: {
  28661. type: definePropType([Number, Object]),
  28662. default: () => mutable({})
  28663. }
  28664. });
  28665. //#endregion
  28666. //#region node_modules/element-plus/es/components/row/src/row.mjs
  28667. var RowJustify = [
  28668. "start",
  28669. "center",
  28670. "end",
  28671. "space-around",
  28672. "space-between",
  28673. "space-evenly"
  28674. ];
  28675. var RowAlign = [
  28676. "top",
  28677. "middle",
  28678. "bottom"
  28679. ];
  28680. /**
  28681. * @deprecated Removed after 3.0.0, Use `RowProps` instead.
  28682. */
  28683. var rowProps = buildProps({
  28684. /**
  28685. * @description custom element tag
  28686. */
  28687. tag: {
  28688. type: String,
  28689. default: "div"
  28690. },
  28691. /**
  28692. * @description grid spacing
  28693. */
  28694. gutter: {
  28695. type: Number,
  28696. default: 0
  28697. },
  28698. /**
  28699. * @description horizontal alignment of flex layout
  28700. */
  28701. justify: {
  28702. type: String,
  28703. values: RowJustify,
  28704. default: "start"
  28705. },
  28706. /**
  28707. * @description vertical alignment of flex layout
  28708. */
  28709. align: {
  28710. type: String,
  28711. values: RowAlign
  28712. }
  28713. });
  28714. //#endregion
  28715. //#region node_modules/element-plus/es/components/row/src/constants.mjs
  28716. var rowContextKey = Symbol("rowContextKey");
  28717. //#endregion
  28718. //#region node_modules/element-plus/es/components/row/index.mjs
  28719. var ElRow = withInstall(/* @__PURE__ */ defineComponent({
  28720. name: "ElRow",
  28721. __name: "row",
  28722. props: rowProps,
  28723. setup(__props) {
  28724. const props = __props;
  28725. const ns = useNamespace("row");
  28726. provide(rowContextKey, { gutter: computed(() => props.gutter) });
  28727. const style = computed(() => {
  28728. const styles = {};
  28729. if (!props.gutter) return styles;
  28730. styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`;
  28731. return styles;
  28732. });
  28733. const rowKls = computed(() => [
  28734. ns.b(),
  28735. ns.is(`justify-${props.justify}`, props.justify !== "start"),
  28736. ns.is(`align-${props.align}`, !!props.align)
  28737. ]);
  28738. return (_ctx, _cache) => {
  28739. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  28740. class: normalizeClass(rowKls.value),
  28741. style: normalizeStyle(style.value)
  28742. }, {
  28743. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  28744. _: 3
  28745. }, 8, ["class", "style"]);
  28746. };
  28747. }
  28748. }));
  28749. //#endregion
  28750. //#region node_modules/element-plus/es/components/col/index.mjs
  28751. var ElCol = withInstall(/* @__PURE__ */ defineComponent({
  28752. name: "ElCol",
  28753. __name: "col",
  28754. props: colProps,
  28755. setup(__props) {
  28756. const props = __props;
  28757. const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) });
  28758. const ns = useNamespace("col");
  28759. const style = computed(() => {
  28760. const styles = {};
  28761. if (gutter.value) styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
  28762. return styles;
  28763. });
  28764. const colKls = computed(() => {
  28765. const classes = [];
  28766. [
  28767. "span",
  28768. "offset",
  28769. "pull",
  28770. "push"
  28771. ].forEach((prop) => {
  28772. const size = props[prop];
  28773. if (isNumber(size)) {
  28774. if (prop === "span") classes.push(ns.b(`${props[prop]}`));
  28775. else if (size > 0) classes.push(ns.b(`${prop}-${props[prop]}`));
  28776. }
  28777. });
  28778. [
  28779. "xs",
  28780. "sm",
  28781. "md",
  28782. "lg",
  28783. "xl"
  28784. ].forEach((size) => {
  28785. if (isNumber(props[size])) classes.push(ns.b(`${size}-${props[size]}`));
  28786. else if (isObject$2(props[size])) Object.entries(props[size]).forEach(([prop, sizeProp]) => {
  28787. classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
  28788. });
  28789. });
  28790. if (gutter.value) classes.push(ns.is("guttered"));
  28791. return [ns.b(), classes];
  28792. });
  28793. return (_ctx, _cache) => {
  28794. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  28795. class: normalizeClass(colKls.value),
  28796. style: normalizeStyle(style.value)
  28797. }, {
  28798. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  28799. _: 3
  28800. }, 8, ["class", "style"]);
  28801. };
  28802. }
  28803. }));
  28804. //#endregion
  28805. //#region node_modules/element-plus/es/components/collapse/src/collapse.mjs
  28806. var emitChangeFn = (value) => isNumber(value) || isString(value) || isArray$1(value);
  28807. /**
  28808. * @deprecated Removed after 3.0.0, Use `CollapseProps` instead.
  28809. */
  28810. var collapseProps = buildProps({
  28811. /**
  28812. * @description whether to activate accordion mode
  28813. */
  28814. accordion: Boolean,
  28815. /**
  28816. * @description currently active panel, the type is `string` in accordion mode, otherwise it is `array`
  28817. */
  28818. modelValue: {
  28819. type: definePropType([
  28820. Array,
  28821. String,
  28822. Number
  28823. ]),
  28824. default: () => mutable([])
  28825. },
  28826. /**
  28827. * @description set expand icon position
  28828. */
  28829. expandIconPosition: {
  28830. type: definePropType([String]),
  28831. default: "right"
  28832. },
  28833. /**
  28834. * @description before-collapse hook before the collapse state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop collapsing
  28835. */
  28836. beforeCollapse: { type: definePropType(Function) }
  28837. });
  28838. var collapseEmits = {
  28839. [UPDATE_MODEL_EVENT]: emitChangeFn,
  28840. [CHANGE_EVENT]: emitChangeFn
  28841. };
  28842. //#endregion
  28843. //#region node_modules/element-plus/es/components/collapse/src/constants.mjs
  28844. var collapseContextKey = Symbol("collapseContextKey");
  28845. //#endregion
  28846. //#region node_modules/element-plus/es/components/collapse/src/collapse-item.mjs
  28847. /**
  28848. * @deprecated Removed after 3.0.0, Use `CollapseItemProps` instead.
  28849. */
  28850. var collapseItemProps = buildProps({
  28851. /**
  28852. * @description title of the panel
  28853. */
  28854. title: {
  28855. type: String,
  28856. default: ""
  28857. },
  28858. /**
  28859. * @description unique identification of the panel
  28860. */
  28861. name: {
  28862. type: definePropType([String, Number]),
  28863. default: void 0
  28864. },
  28865. /**
  28866. * @description icon of the collapse item
  28867. */
  28868. icon: {
  28869. type: iconPropType,
  28870. default: arrow_right_default
  28871. },
  28872. /**
  28873. * @description disable the collapse item
  28874. */
  28875. disabled: Boolean
  28876. });
  28877. //#endregion
  28878. //#region node_modules/element-plus/es/components/collapse-transition/index.mjs
  28879. var ElCollapseTransition = withInstall(/* @__PURE__ */ defineComponent({
  28880. name: "ElCollapseTransition",
  28881. __name: "collapse-transition",
  28882. setup(__props) {
  28883. const ns = useNamespace("collapse-transition");
  28884. const reset = (el) => {
  28885. el.style.maxHeight = "";
  28886. el.style.overflow = el.dataset.oldOverflow;
  28887. el.style.paddingTop = el.dataset.oldPaddingTop;
  28888. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  28889. };
  28890. const on = {
  28891. beforeEnter(el) {
  28892. if (!el.dataset) el.dataset = {};
  28893. el.dataset.oldPaddingTop = el.style.paddingTop;
  28894. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  28895. if (el.style.height) el.dataset.elExistsHeight = el.style.height;
  28896. el.style.maxHeight = 0;
  28897. el.style.paddingTop = 0;
  28898. el.style.paddingBottom = 0;
  28899. },
  28900. enter(el) {
  28901. requestAnimationFrame(() => {
  28902. el.dataset.oldOverflow = el.style.overflow;
  28903. if (el.dataset.elExistsHeight) el.style.maxHeight = el.dataset.elExistsHeight;
  28904. else if (el.scrollHeight !== 0) el.style.maxHeight = `${el.scrollHeight}px`;
  28905. else el.style.maxHeight = 0;
  28906. el.style.paddingTop = el.dataset.oldPaddingTop;
  28907. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  28908. el.style.overflow = "hidden";
  28909. });
  28910. },
  28911. afterEnter(el) {
  28912. el.style.maxHeight = "";
  28913. el.style.overflow = el.dataset.oldOverflow;
  28914. },
  28915. enterCancelled(el) {
  28916. reset(el);
  28917. },
  28918. beforeLeave(el) {
  28919. if (!el.dataset) el.dataset = {};
  28920. el.dataset.oldPaddingTop = el.style.paddingTop;
  28921. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  28922. el.dataset.oldOverflow = el.style.overflow;
  28923. el.style.maxHeight = `${el.scrollHeight}px`;
  28924. el.style.overflow = "hidden";
  28925. },
  28926. leave(el) {
  28927. if (el.scrollHeight !== 0) {
  28928. el.style.maxHeight = 0;
  28929. el.style.paddingTop = 0;
  28930. el.style.paddingBottom = 0;
  28931. }
  28932. },
  28933. afterLeave(el) {
  28934. reset(el);
  28935. },
  28936. leaveCancelled(el) {
  28937. reset(el);
  28938. }
  28939. };
  28940. return (_ctx, _cache) => {
  28941. return openBlock(), createBlock(Transition, mergeProps({ name: unref(ns).b() }, toHandlers(on)), {
  28942. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  28943. _: 3
  28944. }, 16, ["name"]);
  28945. };
  28946. }
  28947. }));
  28948. //#endregion
  28949. //#region node_modules/element-plus/es/components/collapse/src/use-collapse.mjs
  28950. var SCOPE$4 = "ElCollapse";
  28951. var useCollapse = (props, emit) => {
  28952. const activeNames = ref(castArray$1(props.modelValue));
  28953. const setActiveNames = (_activeNames) => {
  28954. activeNames.value = _activeNames;
  28955. const value = props.accordion ? activeNames.value[0] : activeNames.value;
  28956. emit(UPDATE_MODEL_EVENT, value);
  28957. emit(CHANGE_EVENT, value);
  28958. };
  28959. const handleChange = (name) => {
  28960. if (props.accordion) setActiveNames([activeNames.value[0] === name ? "" : name]);
  28961. else {
  28962. const _activeNames = [...activeNames.value];
  28963. const index = _activeNames.indexOf(name);
  28964. if (index > -1) _activeNames.splice(index, 1);
  28965. else _activeNames.push(name);
  28966. setActiveNames(_activeNames);
  28967. }
  28968. };
  28969. const handleItemClick = async (name) => {
  28970. const { beforeCollapse } = props;
  28971. if (!beforeCollapse) {
  28972. handleChange(name);
  28973. return;
  28974. }
  28975. const shouldChange = beforeCollapse(name);
  28976. if (![isPromise(shouldChange), isBoolean(shouldChange)].includes(true)) throwError(SCOPE$4, "beforeCollapse must return type `Promise<boolean>` or `boolean`");
  28977. if (isPromise(shouldChange)) shouldChange.then((result) => {
  28978. if (result !== false) handleChange(name);
  28979. }).catch((e) => {
  28980. debugWarn(SCOPE$4, `some error occurred: ${e}`);
  28981. });
  28982. else if (shouldChange) handleChange(name);
  28983. };
  28984. watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
  28985. provide(collapseContextKey, {
  28986. activeNames,
  28987. handleItemClick
  28988. });
  28989. return {
  28990. activeNames,
  28991. setActiveNames
  28992. };
  28993. };
  28994. var useCollapseDOM = (props) => {
  28995. const ns = useNamespace("collapse");
  28996. return { rootKls: computed(() => [ns.b(), ns.b(`icon-position-${props.expandIconPosition}`)]) };
  28997. };
  28998. //#endregion
  28999. //#region node_modules/element-plus/es/components/collapse/src/collapse2.mjs
  29000. var collapse_default = /* @__PURE__ */ defineComponent({
  29001. name: "ElCollapse",
  29002. __name: "collapse",
  29003. props: collapseProps,
  29004. emits: collapseEmits,
  29005. setup(__props, { expose: __expose, emit: __emit }) {
  29006. const props = __props;
  29007. const { activeNames, setActiveNames } = useCollapse(props, __emit);
  29008. const { rootKls } = useCollapseDOM(props);
  29009. __expose({
  29010. /** @description active names */
  29011. activeNames,
  29012. /** @description set active names */
  29013. setActiveNames
  29014. });
  29015. return (_ctx, _cache) => {
  29016. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [renderSlot(_ctx.$slots, "default")], 2);
  29017. };
  29018. }
  29019. });
  29020. //#endregion
  29021. //#region node_modules/element-plus/es/components/collapse/src/use-collapse-item.mjs
  29022. var useCollapseItem = (props) => {
  29023. const collapse = inject(collapseContextKey);
  29024. const { namespace } = useNamespace("collapse");
  29025. const focusing = ref(false);
  29026. const isClick = ref(false);
  29027. const idInjection = useIdInjection();
  29028. const id = computed(() => idInjection.current++);
  29029. const name = computed(() => {
  29030. return props.name ?? `${namespace.value}-id-${idInjection.prefix}-${unref(id)}`;
  29031. });
  29032. const isActive = computed(() => collapse?.activeNames.value.includes(unref(name)));
  29033. const handleFocus = () => {
  29034. setTimeout(() => {
  29035. if (!isClick.value) focusing.value = true;
  29036. else isClick.value = false;
  29037. }, 50);
  29038. };
  29039. const handleHeaderClick = (e) => {
  29040. if (props.disabled) return;
  29041. if (e.target?.closest("input, textarea, select")) return;
  29042. collapse?.handleItemClick(unref(name));
  29043. focusing.value = false;
  29044. isClick.value = true;
  29045. };
  29046. const handleEnterClick = (e) => {
  29047. if (e.target?.closest("input, textarea, select")) return;
  29048. e.preventDefault();
  29049. collapse?.handleItemClick(unref(name));
  29050. };
  29051. return {
  29052. focusing,
  29053. id,
  29054. isActive,
  29055. handleFocus,
  29056. handleHeaderClick,
  29057. handleEnterClick
  29058. };
  29059. };
  29060. var useCollapseItemDOM = (props, { focusing, isActive, id }) => {
  29061. const ns = useNamespace("collapse");
  29062. const rootKls = computed(() => [
  29063. ns.b("item"),
  29064. ns.is("active", unref(isActive)),
  29065. ns.is("disabled", props.disabled)
  29066. ]);
  29067. const headKls = computed(() => [
  29068. ns.be("item", "header"),
  29069. ns.is("active", unref(isActive)),
  29070. { focusing: unref(focusing) && !props.disabled }
  29071. ]);
  29072. const arrowKls = computed(() => [ns.be("item", "arrow"), ns.is("active", unref(isActive))]);
  29073. return {
  29074. itemTitleKls: computed(() => [ns.be("item", "title")]),
  29075. arrowKls,
  29076. headKls,
  29077. rootKls,
  29078. itemWrapperKls: computed(() => ns.be("item", "wrap")),
  29079. itemContentKls: computed(() => ns.be("item", "content")),
  29080. scopedContentId: computed(() => ns.b(`content-${unref(id)}`)),
  29081. scopedHeadId: computed(() => ns.b(`head-${unref(id)}`))
  29082. };
  29083. };
  29084. //#endregion
  29085. //#region node_modules/element-plus/es/components/collapse/src/collapse-item.vue_vue_type_script_setup_true_lang.mjs
  29086. var _hoisted_1$57 = [
  29087. "id",
  29088. "aria-expanded",
  29089. "aria-controls",
  29090. "aria-describedby",
  29091. "tabindex",
  29092. "aria-disabled"
  29093. ];
  29094. var _hoisted_2$34 = [
  29095. "id",
  29096. "aria-hidden",
  29097. "aria-labelledby"
  29098. ];
  29099. //#endregion
  29100. //#region node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs
  29101. var collapse_item_default = /* @__PURE__ */ defineComponent({
  29102. name: "ElCollapseItem",
  29103. __name: "collapse-item",
  29104. props: collapseItemProps,
  29105. setup(__props, { expose: __expose }) {
  29106. const props = __props;
  29107. const { focusing, id, isActive, handleFocus, handleHeaderClick, handleEnterClick } = useCollapseItem(props);
  29108. const { arrowKls, headKls, rootKls, itemTitleKls, itemWrapperKls, itemContentKls, scopedContentId, scopedHeadId } = useCollapseItemDOM(props, {
  29109. focusing,
  29110. isActive,
  29111. id
  29112. });
  29113. __expose({
  29114. /** @description current collapse-item whether active */
  29115. isActive });
  29116. return (_ctx, _cache) => {
  29117. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
  29118. id: unref(scopedHeadId),
  29119. class: normalizeClass(unref(headKls)),
  29120. "aria-expanded": unref(isActive),
  29121. "aria-controls": unref(scopedContentId),
  29122. "aria-describedby": unref(scopedContentId),
  29123. tabindex: __props.disabled ? void 0 : 0,
  29124. "aria-disabled": __props.disabled,
  29125. role: "button",
  29126. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)),
  29127. onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop"]), ["space", "enter"])),
  29128. onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  29129. onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false)
  29130. }, [createBaseVNode("span", { class: normalizeClass(unref(itemTitleKls)) }, [renderSlot(_ctx.$slots, "title", { isActive: unref(isActive) }, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), renderSlot(_ctx.$slots, "icon", { isActive: unref(isActive) }, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(arrowKls)) }, {
  29131. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  29132. _: 1
  29133. }, 8, ["class"])])], 42, _hoisted_1$57), createVNode(unref(ElCollapseTransition), null, {
  29134. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  29135. id: unref(scopedContentId),
  29136. role: "region",
  29137. class: normalizeClass(unref(itemWrapperKls)),
  29138. "aria-hidden": !unref(isActive),
  29139. "aria-labelledby": unref(scopedHeadId)
  29140. }, [createBaseVNode("div", { class: normalizeClass(unref(itemContentKls)) }, [renderSlot(_ctx.$slots, "default")], 2)], 10, _hoisted_2$34), [[vShow, unref(isActive)]])]),
  29141. _: 3
  29142. })], 2);
  29143. };
  29144. }
  29145. });
  29146. //#endregion
  29147. //#region node_modules/element-plus/es/components/collapse/index.mjs
  29148. var ElCollapse = withInstall(collapse_default, { CollapseItem: collapse_item_default });
  29149. var ElCollapseItem = withNoopInstall(collapse_item_default);
  29150. //#endregion
  29151. //#region node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel.mjs
  29152. /**
  29153. * @deprecated Removed after 3.0.0, Use `ColorPickerPanelProps` instead.
  29154. */
  29155. var colorPickerPanelProps = buildProps({
  29156. /**
  29157. * @description binding value
  29158. */
  29159. modelValue: {
  29160. type: definePropType(String),
  29161. default: void 0
  29162. },
  29163. /**
  29164. * @description whether the color picker is bordered
  29165. */
  29166. border: {
  29167. type: Boolean,
  29168. default: true
  29169. },
  29170. /**
  29171. * @description whether to display the alpha slider
  29172. */
  29173. showAlpha: Boolean,
  29174. /**
  29175. * @description color format of v-model
  29176. */
  29177. colorFormat: { type: definePropType(String) },
  29178. /**
  29179. * @description whether to disable the color picker
  29180. */
  29181. disabled: Boolean,
  29182. /**
  29183. * @description predefined color options
  29184. */
  29185. predefine: { type: definePropType(Array) },
  29186. /**
  29187. * @description whether to trigger form validation
  29188. */
  29189. validateEvent: {
  29190. type: Boolean,
  29191. default: true
  29192. },
  29193. /**
  29194. * @description class names will be passed to <hue-slider />
  29195. */
  29196. hueSliderClass: { type: definePropType([
  29197. String,
  29198. Array,
  29199. Object
  29200. ]) },
  29201. /**
  29202. * @description styles will be passed to <hue-slider />
  29203. */
  29204. hueSliderStyle: {
  29205. type: definePropType([
  29206. String,
  29207. Array,
  29208. Object,
  29209. Boolean
  29210. ]),
  29211. default: void 0
  29212. }
  29213. });
  29214. var colorPickerPanelEmits = { [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val) };
  29215. var ROOT_COMMON_COLOR_INJECTION_KEY = Symbol("colorCommonPickerKey");
  29216. var colorPickerPanelContextKey = Symbol("colorPickerPanelContextKey");
  29217. //#endregion
  29218. //#region node_modules/element-plus/es/components/color-picker-panel/src/props/slider.mjs
  29219. /**
  29220. * @deprecated Removed after 3.0.0, Use `AlphaSliderProps` instead.
  29221. */
  29222. var alphaSliderProps = buildProps({
  29223. color: {
  29224. type: definePropType(Object),
  29225. required: true
  29226. },
  29227. vertical: Boolean,
  29228. disabled: Boolean
  29229. });
  29230. /**
  29231. * @deprecated Removed after 3.0.0, Use `HueSliderProps` instead.
  29232. */
  29233. var hueSliderProps = alphaSliderProps;
  29234. //#endregion
  29235. //#region node_modules/element-plus/es/utils/dom/position.mjs
  29236. var getOffsetTop = (el) => {
  29237. let offset = 0;
  29238. let parent = el;
  29239. while (parent) {
  29240. offset += parent.offsetTop;
  29241. parent = parent.offsetParent;
  29242. }
  29243. return offset;
  29244. };
  29245. var getOffsetTopDistance = (el, containerEl) => {
  29246. return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));
  29247. };
  29248. var getClientXY = (event) => {
  29249. let clientX;
  29250. let clientY;
  29251. if (event.type === "touchend") {
  29252. clientY = event.changedTouches[0].clientY;
  29253. clientX = event.changedTouches[0].clientX;
  29254. } else if (event.type.startsWith("touch")) {
  29255. clientY = event.touches[0].clientY;
  29256. clientX = event.touches[0].clientX;
  29257. } else {
  29258. clientY = event.clientY;
  29259. clientX = event.clientX;
  29260. }
  29261. return {
  29262. clientX,
  29263. clientY
  29264. };
  29265. };
  29266. //#endregion
  29267. //#region node_modules/element-plus/es/components/color-picker-panel/src/utils/draggable.mjs
  29268. var isDragging = false;
  29269. function draggable(element, options) {
  29270. if (!isClient) return;
  29271. const moveFn = function(event) {
  29272. options.drag?.(event);
  29273. };
  29274. const upFn = function(event) {
  29275. document.removeEventListener("mousemove", moveFn);
  29276. document.removeEventListener("mouseup", upFn);
  29277. document.removeEventListener("touchmove", moveFn);
  29278. document.removeEventListener("touchend", upFn);
  29279. document.onselectstart = null;
  29280. document.ondragstart = null;
  29281. isDragging = false;
  29282. options.end?.(event);
  29283. };
  29284. const downFn = function(event) {
  29285. if (isDragging) return;
  29286. document.onselectstart = () => false;
  29287. document.ondragstart = () => false;
  29288. document.addEventListener("mousemove", moveFn);
  29289. document.addEventListener("mouseup", upFn);
  29290. document.addEventListener("touchmove", moveFn);
  29291. document.addEventListener("touchend", upFn);
  29292. isDragging = true;
  29293. options.start?.(event);
  29294. };
  29295. element.addEventListener("mousedown", downFn);
  29296. element.addEventListener("touchstart", downFn, { passive: false });
  29297. }
  29298. //#endregion
  29299. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-slider.mjs
  29300. var useSlider = (props, { key, minValue, maxValue }) => {
  29301. const instance = getCurrentInstance();
  29302. const thumb = shallowRef();
  29303. const bar = shallowRef();
  29304. const currentValue = computed(() => props.color.get(key));
  29305. function handleClick(event) {
  29306. if (props.disabled) return;
  29307. if (event.target !== thumb.value) handleDrag(event);
  29308. thumb.value?.focus();
  29309. }
  29310. function handleDrag(event) {
  29311. if (!bar.value || !thumb.value || props.disabled) return;
  29312. const rect = instance.vnode.el.getBoundingClientRect();
  29313. const { clientX, clientY } = getClientXY(event);
  29314. let value;
  29315. if (!props.vertical) {
  29316. let left = clientX - rect.left;
  29317. left = Math.max(thumb.value.offsetWidth / 2, left);
  29318. left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);
  29319. value = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * maxValue);
  29320. } else {
  29321. let top = clientY - rect.top;
  29322. top = Math.max(thumb.value.offsetHeight / 2, top);
  29323. top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
  29324. value = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * maxValue);
  29325. }
  29326. props.color.set(key, value);
  29327. }
  29328. function handleKeydown(event) {
  29329. if (props.disabled) return;
  29330. const { shiftKey } = event;
  29331. const code = getEventCode(event);
  29332. const step = shiftKey ? 10 : 1;
  29333. const reverse = key === "hue" ? -1 : 1;
  29334. let isPreventDefault = true;
  29335. switch (code) {
  29336. case EVENT_CODE.left:
  29337. case EVENT_CODE.down:
  29338. incrementPosition(-step * reverse);
  29339. break;
  29340. case EVENT_CODE.right:
  29341. case EVENT_CODE.up:
  29342. incrementPosition(step * reverse);
  29343. break;
  29344. case EVENT_CODE.home:
  29345. props.color.set(key, key === "hue" ? maxValue : minValue);
  29346. break;
  29347. case EVENT_CODE.end:
  29348. props.color.set(key, key === "hue" ? minValue : maxValue);
  29349. break;
  29350. case EVENT_CODE.pageDown:
  29351. incrementPosition(-4 * reverse);
  29352. break;
  29353. case EVENT_CODE.pageUp:
  29354. incrementPosition(4 * reverse);
  29355. break;
  29356. default:
  29357. isPreventDefault = false;
  29358. break;
  29359. }
  29360. isPreventDefault && event.preventDefault();
  29361. }
  29362. function incrementPosition(step) {
  29363. let next = currentValue.value + step;
  29364. next = next < minValue ? minValue : next > maxValue ? maxValue : next;
  29365. props.color.set(key, next);
  29366. }
  29367. return {
  29368. thumb,
  29369. bar,
  29370. currentValue,
  29371. handleDrag,
  29372. handleClick,
  29373. handleKeydown
  29374. };
  29375. };
  29376. var useSliderDOM = (props, { namespace, maxValue, bar, thumb, currentValue, handleDrag, getBackground }) => {
  29377. const instance = getCurrentInstance();
  29378. const ns = useNamespace(namespace);
  29379. const thumbLeft = ref(0);
  29380. const thumbTop = ref(0);
  29381. const background = ref();
  29382. function getThumbLeft() {
  29383. if (!thumb.value) return 0;
  29384. if (props.vertical) return 0;
  29385. const el = instance.vnode.el;
  29386. const value = currentValue.value;
  29387. if (!el) return 0;
  29388. return Math.round(value * (el.offsetWidth - thumb.value.offsetWidth / 2) / maxValue);
  29389. }
  29390. function getThumbTop() {
  29391. if (!thumb.value) return 0;
  29392. const el = instance.vnode.el;
  29393. if (!props.vertical) return 0;
  29394. const value = currentValue.value;
  29395. if (!el) return 0;
  29396. return Math.round(value * (el.offsetHeight - thumb.value.offsetHeight / 2) / maxValue);
  29397. }
  29398. function update() {
  29399. thumbLeft.value = getThumbLeft();
  29400. thumbTop.value = getThumbTop();
  29401. background.value = getBackground?.();
  29402. }
  29403. onMounted(() => {
  29404. if (!bar.value || !thumb.value) return;
  29405. const dragConfig = {
  29406. drag: (event) => {
  29407. handleDrag(event);
  29408. },
  29409. end: (event) => {
  29410. handleDrag(event);
  29411. }
  29412. };
  29413. draggable(bar.value, dragConfig);
  29414. draggable(thumb.value, dragConfig);
  29415. update();
  29416. });
  29417. watch(currentValue, () => update());
  29418. watch(() => props.color.value, () => update());
  29419. const rootKls = computed(() => [
  29420. ns.b(),
  29421. ns.is("vertical", props.vertical),
  29422. ns.is("disabled", props.disabled)
  29423. ]);
  29424. const barKls = computed(() => ns.e("bar"));
  29425. const thumbKls = computed(() => ns.e("thumb"));
  29426. return {
  29427. rootKls,
  29428. barKls,
  29429. barStyle: computed(() => ({ background: background.value })),
  29430. thumbKls,
  29431. thumbStyle: computed(() => ({
  29432. left: addUnit(thumbLeft.value),
  29433. top: addUnit(thumbTop.value)
  29434. })),
  29435. thumbLeft,
  29436. thumbTop,
  29437. update
  29438. };
  29439. };
  29440. //#endregion
  29441. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.vue_vue_type_script_setup_true_lang.mjs
  29442. var _hoisted_1$56 = [
  29443. "aria-label",
  29444. "aria-valuenow",
  29445. "aria-valuetext",
  29446. "aria-orientation",
  29447. "tabindex",
  29448. "aria-disabled"
  29449. ];
  29450. var minValue$1 = 0;
  29451. var maxValue$1 = 100;
  29452. //#endregion
  29453. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.mjs
  29454. var alpha_slider_default = /* @__PURE__ */ defineComponent({
  29455. name: "ElColorAlphaSlider",
  29456. __name: "alpha-slider",
  29457. props: alphaSliderProps,
  29458. setup(__props, { expose: __expose }) {
  29459. const props = __props;
  29460. const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, {
  29461. key: "alpha",
  29462. minValue: minValue$1,
  29463. maxValue: maxValue$1
  29464. });
  29465. const { rootKls, barKls, barStyle, thumbKls, thumbStyle, update } = useSliderDOM(props, {
  29466. namespace: "color-alpha-slider",
  29467. maxValue: maxValue$1,
  29468. currentValue,
  29469. bar,
  29470. thumb,
  29471. handleDrag,
  29472. getBackground
  29473. });
  29474. const { t } = useLocale();
  29475. const ariaLabel = computed(() => t("el.colorpicker.alphaLabel"));
  29476. const ariaValuetext = computed(() => {
  29477. return t("el.colorpicker.alphaDescription", {
  29478. alpha: currentValue.value,
  29479. color: props.color.value
  29480. });
  29481. });
  29482. function getBackground() {
  29483. if (props.color && props.color.value) {
  29484. const { r, g, b } = props.color.toRgb();
  29485. return `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`;
  29486. }
  29487. return "";
  29488. }
  29489. __expose({
  29490. /**
  29491. * @description update alpha slider manually
  29492. * @type {Function}
  29493. */
  29494. update,
  29495. /**
  29496. * @description bar element ref
  29497. * @type {HTMLElement}
  29498. */
  29499. bar,
  29500. /**
  29501. * @description thumb element ref
  29502. * @type {HTMLElement}
  29503. */
  29504. thumb
  29505. });
  29506. return (_ctx, _cache) => {
  29507. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
  29508. ref_key: "bar",
  29509. ref: bar,
  29510. class: normalizeClass(unref(barKls)),
  29511. style: normalizeStyle(unref(barStyle)),
  29512. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  29513. }, null, 6), createBaseVNode("div", {
  29514. ref_key: "thumb",
  29515. ref: thumb,
  29516. class: normalizeClass(unref(thumbKls)),
  29517. style: normalizeStyle(unref(thumbStyle)),
  29518. "aria-label": ariaLabel.value,
  29519. "aria-valuenow": unref(currentValue),
  29520. "aria-valuetext": ariaValuetext.value,
  29521. "aria-orientation": __props.vertical ? "vertical" : "horizontal",
  29522. "aria-valuemin": minValue$1,
  29523. "aria-valuemax": maxValue$1,
  29524. role: "slider",
  29525. tabindex: __props.disabled ? void 0 : 0,
  29526. "aria-disabled": __props.disabled,
  29527. onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
  29528. }, null, 46, _hoisted_1$56)], 2);
  29529. };
  29530. }
  29531. });
  29532. //#endregion
  29533. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.vue_vue_type_script_setup_true_lang.mjs
  29534. var _hoisted_1$55 = [
  29535. "aria-label",
  29536. "aria-valuenow",
  29537. "aria-valuetext",
  29538. "aria-orientation",
  29539. "tabindex",
  29540. "aria-disabled"
  29541. ];
  29542. var minValue = 0;
  29543. var maxValue = 360;
  29544. //#endregion
  29545. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.mjs
  29546. var hue_slider_default = /* @__PURE__ */ defineComponent({
  29547. name: "ElColorHueSlider",
  29548. __name: "hue-slider",
  29549. props: hueSliderProps,
  29550. setup(__props, { expose: __expose }) {
  29551. const props = __props;
  29552. const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, {
  29553. key: "hue",
  29554. minValue,
  29555. maxValue
  29556. });
  29557. const { rootKls, barKls, thumbKls, thumbStyle, thumbTop, update } = useSliderDOM(props, {
  29558. namespace: "color-hue-slider",
  29559. maxValue,
  29560. currentValue,
  29561. bar,
  29562. thumb,
  29563. handleDrag
  29564. });
  29565. const { t } = useLocale();
  29566. const ariaLabel = computed(() => t("el.colorpicker.hueLabel"));
  29567. const ariaValuetext = computed(() => {
  29568. return t("el.colorpicker.hueDescription", {
  29569. hue: currentValue.value,
  29570. color: props.color.value
  29571. });
  29572. });
  29573. __expose({
  29574. /**
  29575. * @description bar element ref
  29576. */
  29577. bar,
  29578. /**
  29579. * @description thumb element ref
  29580. */
  29581. thumb,
  29582. /**
  29583. * @description thumb top position, only for vertical slider
  29584. */
  29585. thumbTop,
  29586. /**
  29587. * @description update hue slider manually
  29588. */
  29589. update
  29590. });
  29591. return (_ctx, _cache) => {
  29592. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
  29593. ref_key: "bar",
  29594. ref: bar,
  29595. class: normalizeClass(unref(barKls)),
  29596. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  29597. }, null, 2), createBaseVNode("div", {
  29598. ref_key: "thumb",
  29599. ref: thumb,
  29600. class: normalizeClass(unref(thumbKls)),
  29601. style: normalizeStyle(unref(thumbStyle)),
  29602. "aria-label": ariaLabel.value,
  29603. "aria-valuenow": unref(currentValue),
  29604. "aria-valuetext": ariaValuetext.value,
  29605. "aria-orientation": __props.vertical ? "vertical" : "horizontal",
  29606. "aria-valuemin": minValue,
  29607. "aria-valuemax": maxValue,
  29608. role: "slider",
  29609. tabindex: __props.disabled ? void 0 : 0,
  29610. "aria-disabled": __props.disabled,
  29611. onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
  29612. }, null, 46, _hoisted_1$55)], 2);
  29613. };
  29614. }
  29615. });
  29616. //#endregion
  29617. //#region node_modules/element-plus/es/components/color-picker-panel/src/props/predefine.mjs
  29618. /**
  29619. * @deprecated Removed after 3.0.0, Use `PredefineProps` instead.
  29620. */
  29621. var predefineProps = buildProps({
  29622. colors: {
  29623. type: definePropType(Array),
  29624. required: true
  29625. },
  29626. color: {
  29627. type: definePropType(Object),
  29628. required: true
  29629. },
  29630. enableAlpha: {
  29631. type: Boolean,
  29632. required: true
  29633. },
  29634. disabled: Boolean
  29635. });
  29636. //#endregion
  29637. //#region node_modules/element-plus/es/components/color-picker-panel/src/utils/color.mjs
  29638. var Color = class {
  29639. constructor(options = {}) {
  29640. this._hue = 0;
  29641. this._saturation = 100;
  29642. this._value = 100;
  29643. this._alpha = 100;
  29644. this._tiny = new TinyColor();
  29645. this._isValid = false;
  29646. this.enableAlpha = false;
  29647. this.format = "";
  29648. this.value = "";
  29649. for (const option in options) if (hasOwn(options, option)) this[option] = options[option];
  29650. if (options.value) this.fromString(options.value);
  29651. else this.doOnChange();
  29652. }
  29653. set(prop, value) {
  29654. if (arguments.length === 1 && typeof prop === "object") {
  29655. for (const p in prop) if (hasOwn(prop, p)) this.set(p, prop[p]);
  29656. return;
  29657. }
  29658. this[`_${prop}`] = value;
  29659. this._isValid = true;
  29660. this.doOnChange();
  29661. }
  29662. get(prop) {
  29663. if ([
  29664. "hue",
  29665. "saturation",
  29666. "value",
  29667. "alpha"
  29668. ].includes(prop)) return Math.round(this[`_${prop}`]);
  29669. return this[`_${prop}`];
  29670. }
  29671. toRgb() {
  29672. return this._isValid ? this._tiny.toRgb() : {
  29673. r: 255,
  29674. g: 255,
  29675. b: 255,
  29676. a: 0
  29677. };
  29678. }
  29679. fromString(value) {
  29680. const color = new TinyColor(value);
  29681. this._isValid = color.isValid;
  29682. if (color.isValid) {
  29683. const { h, s, v, a } = color.toHsv();
  29684. this._hue = h;
  29685. this._saturation = s * 100;
  29686. this._value = v * 100;
  29687. this._alpha = a * 100;
  29688. } else {
  29689. this._hue = 0;
  29690. this._saturation = 100;
  29691. this._value = 100;
  29692. this._alpha = 100;
  29693. }
  29694. this.doOnChange();
  29695. }
  29696. clear() {
  29697. this._isValid = false;
  29698. this.value = "";
  29699. this._hue = 0;
  29700. this._saturation = 100;
  29701. this._value = 100;
  29702. this._alpha = 100;
  29703. }
  29704. compare(color) {
  29705. const compareColor = new TinyColor({
  29706. h: color._hue,
  29707. s: color._saturation / 100,
  29708. v: color._value / 100,
  29709. a: color._alpha / 100
  29710. });
  29711. return this._tiny.equals(compareColor);
  29712. }
  29713. doOnChange() {
  29714. const { _hue, _saturation, _value, _alpha, format, enableAlpha } = this;
  29715. let _format = format || (enableAlpha ? "rgb" : "hex");
  29716. if (format === "hex" && enableAlpha) _format = "hex8";
  29717. this._tiny = new TinyColor({
  29718. h: _hue,
  29719. s: _saturation / 100,
  29720. v: _value / 100,
  29721. a: _alpha / 100
  29722. });
  29723. this.value = this._isValid ? this._tiny.toString(_format) : "";
  29724. }
  29725. };
  29726. //#endregion
  29727. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-predefine.mjs
  29728. var usePredefine = (props) => {
  29729. const { currentColor } = inject(colorPickerPanelContextKey);
  29730. const rgbaColors = ref(parseColors(props.colors, props.color));
  29731. watch(() => currentColor.value, (val) => {
  29732. const color = new Color({
  29733. value: val,
  29734. enableAlpha: props.enableAlpha
  29735. });
  29736. rgbaColors.value.forEach((item) => {
  29737. item.selected = color.compare(item);
  29738. });
  29739. });
  29740. watchEffect(() => {
  29741. rgbaColors.value = parseColors(props.colors, props.color);
  29742. });
  29743. function handleSelect(index) {
  29744. props.color.fromString(props.colors[index]);
  29745. }
  29746. function parseColors(colors, color) {
  29747. return colors.map((value) => {
  29748. const c = new Color({
  29749. value,
  29750. enableAlpha: props.enableAlpha
  29751. });
  29752. c.selected = c.compare(color);
  29753. return c;
  29754. });
  29755. }
  29756. return {
  29757. rgbaColors,
  29758. handleSelect
  29759. };
  29760. };
  29761. var usePredefineDOM = (props) => {
  29762. const ns = useNamespace("color-predefine");
  29763. const rootKls = computed(() => [ns.b(), ns.is("disabled", props.disabled)]);
  29764. const colorsKls = computed(() => ns.e("colors"));
  29765. function colorSelectorKls(item) {
  29766. return [
  29767. ns.e("color-selector"),
  29768. ns.is("alpha", item.get("alpha") < 100),
  29769. { selected: item.selected }
  29770. ];
  29771. }
  29772. return {
  29773. rootKls,
  29774. colorsKls,
  29775. colorSelectorKls
  29776. };
  29777. };
  29778. //#endregion
  29779. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.vue_vue_type_script_setup_true_lang.mjs
  29780. var _hoisted_1$54 = [
  29781. "disabled",
  29782. "aria-label",
  29783. "onClick"
  29784. ];
  29785. //#endregion
  29786. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.mjs
  29787. var predefine_default = /* @__PURE__ */ defineComponent({
  29788. name: "ElColorPredefine",
  29789. __name: "predefine",
  29790. props: predefineProps,
  29791. setup(__props) {
  29792. const props = __props;
  29793. const { rgbaColors, handleSelect } = usePredefine(props);
  29794. const { rootKls, colorsKls, colorSelectorKls } = usePredefineDOM(props);
  29795. const { t } = useLocale();
  29796. const ariaLabel = (value) => {
  29797. return t("el.colorpicker.predefineDescription", { value });
  29798. };
  29799. return (_ctx, _cache) => {
  29800. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", { class: normalizeClass(unref(colorsKls)) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rgbaColors), (item, index) => {
  29801. return openBlock(), createElementBlock("button", {
  29802. key: __props.colors[index],
  29803. type: "button",
  29804. disabled: __props.disabled,
  29805. "aria-label": ariaLabel(item.value),
  29806. class: normalizeClass(unref(colorSelectorKls)(item)),
  29807. onClick: ($event) => unref(handleSelect)(index)
  29808. }, [createBaseVNode("div", { style: normalizeStyle({ backgroundColor: item.value }) }, null, 4)], 10, _hoisted_1$54);
  29809. }), 128))], 2)], 2);
  29810. };
  29811. }
  29812. });
  29813. //#endregion
  29814. //#region node_modules/element-plus/es/components/color-picker-panel/src/props/sv-panel.mjs
  29815. /**
  29816. * @deprecated Removed after 3.0.0, Use `SvPanelProps` instead.
  29817. */
  29818. var svPanelProps = buildProps({
  29819. color: {
  29820. type: definePropType(Object),
  29821. required: true
  29822. },
  29823. disabled: Boolean
  29824. });
  29825. //#endregion
  29826. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-sv-panel.mjs
  29827. var useSvPanel = (props) => {
  29828. const instance = getCurrentInstance();
  29829. const cursorRef = ref();
  29830. const cursorTop = ref(0);
  29831. const cursorLeft = ref(0);
  29832. const background = ref("hsl(0, 100%, 50%)");
  29833. const saturation = computed(() => props.color.get("saturation"));
  29834. const brightness = computed(() => props.color.get("value"));
  29835. const hue = computed(() => props.color.get("hue"));
  29836. function handleClick(event) {
  29837. if (props.disabled) return;
  29838. if (event.target !== cursorRef.value) handleDrag(event);
  29839. cursorRef.value?.focus({ preventScroll: true });
  29840. }
  29841. function handleDrag(event) {
  29842. if (props.disabled) return;
  29843. const rect = instance.vnode.el.getBoundingClientRect();
  29844. const { clientX, clientY } = getClientXY(event);
  29845. let left = clientX - rect.left;
  29846. let top = clientY - rect.top;
  29847. left = Math.max(0, left);
  29848. left = Math.min(left, rect.width);
  29849. top = Math.max(0, top);
  29850. top = Math.min(top, rect.height);
  29851. cursorLeft.value = left;
  29852. cursorTop.value = top;
  29853. props.color.set({
  29854. saturation: left / rect.width * 100,
  29855. value: 100 - top / rect.height * 100
  29856. });
  29857. }
  29858. function handleKeydown(event) {
  29859. if (props.disabled) return;
  29860. const { shiftKey } = event;
  29861. const code = getEventCode(event);
  29862. const step = shiftKey ? 10 : 1;
  29863. let isPreventDefault = true;
  29864. switch (code) {
  29865. case EVENT_CODE.left:
  29866. incrementSaturation(-step);
  29867. break;
  29868. case EVENT_CODE.right:
  29869. incrementSaturation(step);
  29870. break;
  29871. case EVENT_CODE.up:
  29872. incrementBrightness(step);
  29873. break;
  29874. case EVENT_CODE.down:
  29875. incrementBrightness(-step);
  29876. break;
  29877. default:
  29878. isPreventDefault = false;
  29879. break;
  29880. }
  29881. isPreventDefault && event.preventDefault();
  29882. }
  29883. function incrementSaturation(step) {
  29884. let next = saturation.value + step;
  29885. next = next < 0 ? 0 : next > 100 ? 100 : next;
  29886. props.color.set("saturation", next);
  29887. }
  29888. function incrementBrightness(step) {
  29889. let next = brightness.value + step;
  29890. next = next < 0 ? 0 : next > 100 ? 100 : next;
  29891. props.color.set("value", next);
  29892. }
  29893. return {
  29894. cursorRef,
  29895. cursorTop,
  29896. cursorLeft,
  29897. background,
  29898. saturation,
  29899. brightness,
  29900. hue,
  29901. handleClick,
  29902. handleDrag,
  29903. handleKeydown
  29904. };
  29905. };
  29906. var useSvPanelDOM = (props, { cursorTop, cursorLeft, background, handleDrag }) => {
  29907. const instance = getCurrentInstance();
  29908. const ns = useNamespace("color-svpanel");
  29909. function update() {
  29910. const saturation = props.color.get("saturation");
  29911. const brightness = props.color.get("value");
  29912. const { clientWidth: width, clientHeight: height } = instance.vnode.el;
  29913. cursorLeft.value = saturation * width / 100;
  29914. cursorTop.value = (100 - brightness) * height / 100;
  29915. background.value = `hsl(${props.color.get("hue")}, 100%, 50%)`;
  29916. }
  29917. onMounted(() => {
  29918. draggable(instance.vnode.el, {
  29919. drag: (event) => {
  29920. handleDrag(event);
  29921. },
  29922. end: (event) => {
  29923. handleDrag(event);
  29924. }
  29925. });
  29926. update();
  29927. });
  29928. watch([
  29929. () => props.color.get("hue"),
  29930. () => props.color.get("value"),
  29931. () => props.color.value
  29932. ], () => update());
  29933. return {
  29934. rootKls: computed(() => ns.b()),
  29935. cursorKls: computed(() => ns.e("cursor")),
  29936. rootStyle: computed(() => ({ backgroundColor: background.value })),
  29937. cursorStyle: computed(() => ({
  29938. top: addUnit(cursorTop.value),
  29939. left: addUnit(cursorLeft.value)
  29940. })),
  29941. update
  29942. };
  29943. };
  29944. //#endregion
  29945. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.vue_vue_type_script_setup_true_lang.mjs
  29946. var _hoisted_1$53 = [
  29947. "tabindex",
  29948. "aria-disabled",
  29949. "aria-label",
  29950. "aria-valuenow",
  29951. "aria-valuetext"
  29952. ];
  29953. //#endregion
  29954. //#region node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.mjs
  29955. var sv_panel_default = /* @__PURE__ */ defineComponent({
  29956. name: "ElSvPanel",
  29957. __name: "sv-panel",
  29958. props: svPanelProps,
  29959. setup(__props, { expose: __expose }) {
  29960. const props = __props;
  29961. const { cursorRef, cursorTop, cursorLeft, background, saturation, brightness, handleClick, handleDrag, handleKeydown } = useSvPanel(props);
  29962. const { rootKls, cursorKls, rootStyle, cursorStyle, update } = useSvPanelDOM(props, {
  29963. cursorTop,
  29964. cursorLeft,
  29965. background,
  29966. handleDrag
  29967. });
  29968. const { t } = useLocale();
  29969. const ariaLabel = computed(() => t("el.colorpicker.svLabel"));
  29970. const ariaValuetext = computed(() => {
  29971. return t("el.colorpicker.svDescription", {
  29972. saturation: saturation.value,
  29973. brightness: brightness.value,
  29974. color: props.color.value
  29975. });
  29976. });
  29977. __expose({
  29978. /**
  29979. * @description update sv panel manually
  29980. */
  29981. update });
  29982. return (_ctx, _cache) => {
  29983. return openBlock(), createElementBlock("div", {
  29984. class: normalizeClass(unref(rootKls)),
  29985. style: normalizeStyle(unref(rootStyle)),
  29986. onClick: _cache[1] || (_cache[1] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  29987. }, [createBaseVNode("div", {
  29988. ref_key: "cursorRef",
  29989. ref: cursorRef,
  29990. class: normalizeClass(unref(cursorKls)),
  29991. style: normalizeStyle(unref(cursorStyle)),
  29992. tabindex: __props.disabled ? void 0 : 0,
  29993. "aria-disabled": __props.disabled,
  29994. role: "slider",
  29995. "aria-valuemin": "0,0",
  29996. "aria-valuemax": "100,100",
  29997. "aria-label": ariaLabel.value,
  29998. "aria-valuenow": `${unref(saturation)},${unref(brightness)}`,
  29999. "aria-valuetext": ariaValuetext.value,
  30000. onKeydown: _cache[0] || (_cache[0] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
  30001. }, null, 46, _hoisted_1$53)], 6);
  30002. };
  30003. }
  30004. });
  30005. //#endregion
  30006. //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-common-color.mjs
  30007. var useCommonColor = (props, emit) => {
  30008. const color = reactive(new Color({
  30009. enableAlpha: props.showAlpha,
  30010. format: props.colorFormat || "",
  30011. value: props.modelValue
  30012. }));
  30013. watch(() => [props.colorFormat, props.showAlpha], () => {
  30014. color.enableAlpha = props.showAlpha;
  30015. color.format = props.colorFormat || color.format;
  30016. color.doOnChange();
  30017. emit(UPDATE_MODEL_EVENT, color.value);
  30018. });
  30019. return { color };
  30020. };
  30021. //#endregion
  30022. //#region node_modules/element-plus/es/components/color-picker-panel/index.mjs
  30023. var ElColorPickerPanel = withInstall(/* @__PURE__ */ defineComponent({
  30024. name: "ElColorPickerPanel",
  30025. __name: "color-picker-panel",
  30026. props: colorPickerPanelProps,
  30027. emits: colorPickerPanelEmits,
  30028. setup(__props, { expose: __expose, emit: __emit }) {
  30029. const props = __props;
  30030. const emit = __emit;
  30031. const ns = useNamespace("color-picker-panel");
  30032. const { formItem } = useFormItem();
  30033. const disabled = useFormDisabled();
  30034. const hueRef = ref();
  30035. const svRef = ref();
  30036. const alphaRef = ref();
  30037. const inputRef = ref();
  30038. const customInput = ref("");
  30039. const { color } = inject(ROOT_COMMON_COLOR_INJECTION_KEY, () => useCommonColor(props, emit), true);
  30040. function handleConfirm() {
  30041. color.fromString(customInput.value);
  30042. if (color.value !== customInput.value) customInput.value = color.value;
  30043. }
  30044. function handleFocusout() {
  30045. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  30046. }
  30047. function update() {
  30048. hueRef.value?.update();
  30049. svRef.value?.update();
  30050. alphaRef.value?.update();
  30051. }
  30052. onMounted(() => {
  30053. if (props.modelValue) customInput.value = color.value;
  30054. nextTick(update);
  30055. });
  30056. watch(() => props.modelValue, (newVal) => {
  30057. if (newVal !== color.value) newVal ? color.fromString(newVal) : color.clear();
  30058. });
  30059. watch(() => color.value, (val) => {
  30060. emit(UPDATE_MODEL_EVENT, val);
  30061. customInput.value = val;
  30062. if (props.validateEvent) formItem?.validate("change").catch(NOOP);
  30063. });
  30064. provide(colorPickerPanelContextKey, { currentColor: computed(() => color.value) });
  30065. __expose({
  30066. /**
  30067. * @description current color object
  30068. */
  30069. color,
  30070. /**
  30071. * @description custom input ref
  30072. */
  30073. inputRef,
  30074. /**
  30075. * @description update sub components
  30076. */
  30077. update
  30078. });
  30079. return (_ctx, _cache) => {
  30080. return openBlock(), createElementBlock("div", {
  30081. class: normalizeClass([
  30082. unref(ns).b(),
  30083. unref(ns).is("disabled", unref(disabled)),
  30084. unref(ns).is("border", __props.border)
  30085. ]),
  30086. onFocusout: handleFocusout
  30087. }, [
  30088. createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [createVNode(hue_slider_default, {
  30089. ref_key: "hueRef",
  30090. ref: hueRef,
  30091. color: unref(color),
  30092. vertical: "",
  30093. disabled: unref(disabled),
  30094. class: normalizeClass(["hue-slider", __props.hueSliderClass]),
  30095. style: normalizeStyle(__props.hueSliderStyle)
  30096. }, null, 8, [
  30097. "color",
  30098. "disabled",
  30099. "class",
  30100. "style"
  30101. ]), createVNode(sv_panel_default, {
  30102. ref_key: "svRef",
  30103. ref: svRef,
  30104. color: unref(color),
  30105. disabled: unref(disabled)
  30106. }, null, 8, ["color", "disabled"])], 2),
  30107. __props.showAlpha ? (openBlock(), createBlock(alpha_slider_default, {
  30108. key: 0,
  30109. ref_key: "alphaRef",
  30110. ref: alphaRef,
  30111. color: unref(color),
  30112. disabled: unref(disabled)
  30113. }, null, 8, ["color", "disabled"])) : createCommentVNode("v-if", true),
  30114. __props.predefine ? (openBlock(), createBlock(predefine_default, {
  30115. key: 1,
  30116. ref: "predefine",
  30117. "enable-alpha": __props.showAlpha,
  30118. color: unref(color),
  30119. colors: __props.predefine,
  30120. disabled: unref(disabled)
  30121. }, null, 8, [
  30122. "enable-alpha",
  30123. "color",
  30124. "colors",
  30125. "disabled"
  30126. ])) : createCommentVNode("v-if", true),
  30127. createBaseVNode("div", { class: normalizeClass(unref(ns).e("footer")) }, [createVNode(unref(ElInput), {
  30128. ref_key: "inputRef",
  30129. ref: inputRef,
  30130. modelValue: customInput.value,
  30131. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
  30132. "validate-event": false,
  30133. size: "small",
  30134. disabled: unref(disabled),
  30135. onChange: handleConfirm
  30136. }, null, 8, ["modelValue", "disabled"]), renderSlot(_ctx.$slots, "footer")], 2)
  30137. ], 34);
  30138. };
  30139. }
  30140. }));
  30141. //#endregion
  30142. //#region node_modules/element-plus/es/components/color-picker/src/color-picker.mjs
  30143. /**
  30144. * @deprecated Removed after 3.0.0, Use `ColorPickerProps` instead.
  30145. */
  30146. var colorPickerProps = buildProps({
  30147. /**
  30148. * @description when color-picker inactive and persistent is false, the color panel will be destroyed
  30149. */
  30150. persistent: {
  30151. type: Boolean,
  30152. default: true
  30153. },
  30154. /**
  30155. * @description binding value
  30156. */
  30157. modelValue: {
  30158. type: definePropType(String),
  30159. default: void 0
  30160. },
  30161. /**
  30162. * @description ColorPicker id
  30163. */
  30164. id: String,
  30165. /**
  30166. * @description whether to display the alpha slider
  30167. */
  30168. showAlpha: Boolean,
  30169. /**
  30170. * @description color format of v-model
  30171. */
  30172. colorFormat: { type: definePropType(String) },
  30173. /**
  30174. * @description whether to disable the ColorPicker
  30175. */
  30176. disabled: {
  30177. type: Boolean,
  30178. default: void 0
  30179. },
  30180. /**
  30181. * @description whether to show clear button
  30182. */
  30183. clearable: {
  30184. type: Boolean,
  30185. default: true
  30186. },
  30187. /**
  30188. * @description size of ColorPicker
  30189. */
  30190. size: useSizeProp,
  30191. /**
  30192. * @description custom class name for ColorPicker's dropdown
  30193. */
  30194. popperClass: useTooltipContentProps.popperClass,
  30195. /**
  30196. * @description custom style for ColorPicker's dropdown
  30197. */
  30198. popperStyle: useTooltipContentProps.popperStyle,
  30199. /**
  30200. * @description ColorPicker tabindex
  30201. */
  30202. tabindex: {
  30203. type: [String, Number],
  30204. default: 0
  30205. },
  30206. /**
  30207. * @description whether color-picker popper is teleported to the body
  30208. */
  30209. teleported: useTooltipContentProps.teleported,
  30210. /**
  30211. * @description which color-picker panel appends to
  30212. */
  30213. appendTo: useTooltipContentProps.appendTo,
  30214. /**
  30215. * @description predefined color options
  30216. */
  30217. predefine: { type: definePropType(Array) },
  30218. /**
  30219. * @description whether to trigger form validation
  30220. */
  30221. validateEvent: {
  30222. type: Boolean,
  30223. default: true
  30224. },
  30225. ...useEmptyValuesProps,
  30226. ...useAriaProps(["ariaLabel"])
  30227. });
  30228. var colorPickerEmits = {
  30229. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
  30230. [CHANGE_EVENT]: (val) => isString(val) || isNil(val),
  30231. activeChange: (val) => isString(val) || isNil(val),
  30232. focus: (evt) => evt instanceof FocusEvent,
  30233. blur: (evt) => evt instanceof FocusEvent,
  30234. clear: () => true
  30235. };
  30236. /**
  30237. * @description default values for ColorPickerProps, used in components that extend ColorPickerProps
  30238. */
  30239. var colorPickerPropsDefaults = {
  30240. persistent: true,
  30241. modelValue: void 0,
  30242. disabled: void 0,
  30243. clearable: true,
  30244. popperStyle: void 0,
  30245. tabindex: 0,
  30246. teleported: true,
  30247. validateEvent: true,
  30248. valueOnClear: void 0
  30249. };
  30250. //#endregion
  30251. //#region node_modules/element-plus/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs
  30252. var _hoisted_1$52 = [
  30253. "id",
  30254. "aria-label",
  30255. "aria-labelledby",
  30256. "aria-description",
  30257. "aria-disabled",
  30258. "tabindex"
  30259. ];
  30260. //#endregion
  30261. //#region node_modules/element-plus/es/components/color-picker/index.mjs
  30262. var ElColorPicker = withInstall(/* @__PURE__ */ defineComponent({
  30263. name: "ElColorPicker",
  30264. __name: "color-picker",
  30265. props: colorPickerProps,
  30266. emits: colorPickerEmits,
  30267. setup(__props, { expose: __expose, emit: __emit }) {
  30268. const props = __props;
  30269. const emit = __emit;
  30270. const { t } = useLocale();
  30271. const ns = useNamespace("color");
  30272. const { formItem } = useFormItem();
  30273. const colorSize = useFormSize();
  30274. const colorDisabled = useFormDisabled();
  30275. const { valueOnClear, isEmptyValue } = useEmptyValues(props, null);
  30276. const commonColor = useCommonColor(props, emit);
  30277. const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  30278. const popper = ref();
  30279. const triggerRef = ref();
  30280. const pickerPanelRef = ref();
  30281. const showPicker = ref(false);
  30282. const showPanelColor = ref(false);
  30283. let shouldActiveChange = true;
  30284. const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {
  30285. disabled: colorDisabled,
  30286. beforeBlur(event) {
  30287. return popper.value?.isFocusInsideContent(event);
  30288. },
  30289. afterBlur() {
  30290. setShowPicker(false);
  30291. resetColor();
  30292. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  30293. }
  30294. });
  30295. const color = reactiveComputed(() => pickerPanelRef.value?.color ?? commonColor.color);
  30296. const panelProps = computed(() => pick(props, Object.keys(colorPickerPanelProps)));
  30297. const displayedColor = computed(() => {
  30298. if (!props.modelValue && !showPanelColor.value) return "transparent";
  30299. return displayedRgb(color, props.showAlpha);
  30300. });
  30301. const currentColor = computed(() => {
  30302. return !props.modelValue && !showPanelColor.value ? "" : color.value;
  30303. });
  30304. const buttonAriaLabel = computed(() => {
  30305. return !isLabeledByFormItem.value ? props.ariaLabel || t("el.colorpicker.defaultLabel") : void 0;
  30306. });
  30307. const buttonAriaLabelledby = computed(() => {
  30308. return isLabeledByFormItem.value ? formItem?.labelId : void 0;
  30309. });
  30310. const btnKls = computed(() => {
  30311. return [
  30312. ns.b("picker"),
  30313. ns.is("disabled", colorDisabled.value),
  30314. ns.bm("picker", colorSize.value),
  30315. ns.is("focused", isFocused.value)
  30316. ];
  30317. });
  30318. function displayedRgb(color, showAlpha) {
  30319. const { r, g, b, a } = color.toRgb();
  30320. return showAlpha ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
  30321. }
  30322. function setShowPicker(value) {
  30323. showPicker.value = value;
  30324. }
  30325. const debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true });
  30326. function show() {
  30327. if (colorDisabled.value) return;
  30328. setShowPicker(true);
  30329. }
  30330. function hide() {
  30331. debounceSetShowPicker(false);
  30332. resetColor();
  30333. }
  30334. function resetColor() {
  30335. nextTick(() => {
  30336. if (props.modelValue) color.fromString(props.modelValue);
  30337. else {
  30338. color.value = "";
  30339. nextTick(() => {
  30340. showPanelColor.value = false;
  30341. });
  30342. }
  30343. });
  30344. }
  30345. function handleTrigger() {
  30346. if (colorDisabled.value) return;
  30347. if (showPicker.value) resetColor();
  30348. debounceSetShowPicker(!showPicker.value);
  30349. }
  30350. function confirmValue() {
  30351. const value = isEmptyValue(color.value) ? valueOnClear.value : color.value;
  30352. emit(UPDATE_MODEL_EVENT, value);
  30353. emit(CHANGE_EVENT, value);
  30354. if (props.validateEvent) formItem?.validate("change").catch(NOOP);
  30355. debounceSetShowPicker(false);
  30356. nextTick(() => {
  30357. const newColor = new Color({
  30358. enableAlpha: props.showAlpha,
  30359. format: props.colorFormat || "",
  30360. value: props.modelValue
  30361. });
  30362. if (!color.compare(newColor)) resetColor();
  30363. });
  30364. }
  30365. function clear() {
  30366. debounceSetShowPicker(false);
  30367. emit(UPDATE_MODEL_EVENT, valueOnClear.value);
  30368. emit(CHANGE_EVENT, valueOnClear.value);
  30369. if (props.modelValue !== valueOnClear.value && props.validateEvent) formItem?.validate("change").catch(NOOP);
  30370. resetColor();
  30371. emit("clear");
  30372. }
  30373. function handleShowTooltip() {
  30374. pickerPanelRef?.value?.inputRef?.focus();
  30375. }
  30376. function handleClickOutside() {
  30377. if (!showPicker.value) return;
  30378. hide();
  30379. isFocused.value && focus();
  30380. }
  30381. function handleEsc(event) {
  30382. event.preventDefault();
  30383. event.stopPropagation();
  30384. setShowPicker(false);
  30385. resetColor();
  30386. }
  30387. function handleKeyDown(event) {
  30388. switch (getEventCode(event)) {
  30389. case EVENT_CODE.enter:
  30390. case EVENT_CODE.numpadEnter:
  30391. case EVENT_CODE.space:
  30392. event.preventDefault();
  30393. event.stopPropagation();
  30394. show();
  30395. break;
  30396. case EVENT_CODE.esc:
  30397. handleEsc(event);
  30398. break;
  30399. }
  30400. }
  30401. function focus() {
  30402. triggerRef.value.focus();
  30403. }
  30404. function blur() {
  30405. triggerRef.value.blur();
  30406. }
  30407. watch(() => currentColor.value, (val) => {
  30408. shouldActiveChange && emit("activeChange", val);
  30409. shouldActiveChange = true;
  30410. });
  30411. watch(() => color.value, () => {
  30412. if (!props.modelValue && !showPanelColor.value) showPanelColor.value = true;
  30413. });
  30414. watch(() => props.modelValue, (newVal) => {
  30415. if (!newVal) showPanelColor.value = false;
  30416. else if (newVal && newVal !== color.value) {
  30417. shouldActiveChange = false;
  30418. color.fromString(newVal);
  30419. }
  30420. });
  30421. watch(() => showPicker.value, () => {
  30422. pickerPanelRef.value && nextTick(pickerPanelRef.value.update);
  30423. });
  30424. provide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor);
  30425. __expose({
  30426. /**
  30427. * @description current color object
  30428. */
  30429. color,
  30430. /**
  30431. * @description manually show ColorPicker
  30432. */
  30433. show,
  30434. /**
  30435. * @description manually hide ColorPicker
  30436. */
  30437. hide,
  30438. /**
  30439. * @description focus the input element
  30440. */
  30441. focus,
  30442. /**
  30443. * @description blur the input element
  30444. */
  30445. blur
  30446. });
  30447. return (_ctx, _cache) => {
  30448. return openBlock(), createBlock(unref(ElTooltip), {
  30449. ref_key: "popper",
  30450. ref: popper,
  30451. visible: showPicker.value,
  30452. "show-arrow": false,
  30453. "fallback-placements": [
  30454. "bottom",
  30455. "top",
  30456. "right",
  30457. "left"
  30458. ],
  30459. offset: 0,
  30460. "gpu-acceleration": false,
  30461. "popper-class": [unref(ns).be("picker", "panel"), __props.popperClass],
  30462. "popper-style": __props.popperStyle,
  30463. "stop-popper-mouse-event": false,
  30464. pure: "",
  30465. loop: "",
  30466. role: "dialog",
  30467. effect: "light",
  30468. trigger: "click",
  30469. teleported: __props.teleported,
  30470. transition: `${unref(ns).namespace.value}-zoom-in-top`,
  30471. persistent: __props.persistent,
  30472. "append-to": __props.appendTo,
  30473. onShow: handleShowTooltip,
  30474. onHide: _cache[2] || (_cache[2] = ($event) => setShowPicker(false))
  30475. }, {
  30476. content: withCtx(() => [withDirectives((openBlock(), createBlock(unref(ElColorPickerPanel), mergeProps({
  30477. ref_key: "pickerPanelRef",
  30478. ref: pickerPanelRef
  30479. }, panelProps.value, {
  30480. border: false,
  30481. "validate-event": false,
  30482. onKeydown: withKeys(handleEsc, ["esc"])
  30483. }), {
  30484. footer: withCtx(() => [createBaseVNode("div", null, [__props.clearable ? (openBlock(), createBlock(unref(ElButton), {
  30485. key: 0,
  30486. class: normalizeClass(unref(ns).be("footer", "link-btn")),
  30487. text: "",
  30488. size: "small",
  30489. onClick: clear
  30490. }, {
  30491. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.colorpicker.clear")), 1)]),
  30492. _: 1
  30493. }, 8, ["class"])) : createCommentVNode("v-if", true), createVNode(unref(ElButton), {
  30494. plain: "",
  30495. size: "small",
  30496. class: normalizeClass(unref(ns).be("footer", "btn")),
  30497. onClick: confirmValue
  30498. }, {
  30499. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.colorpicker.confirm")), 1)]),
  30500. _: 1
  30501. }, 8, ["class"])])]),
  30502. _: 1
  30503. }, 16)), [[
  30504. unref(ClickOutside),
  30505. handleClickOutside,
  30506. triggerRef.value
  30507. ]])]),
  30508. default: withCtx(() => [createBaseVNode("div", mergeProps({
  30509. id: unref(buttonId),
  30510. ref_key: "triggerRef",
  30511. ref: triggerRef
  30512. }, _ctx.$attrs, {
  30513. class: btnKls.value,
  30514. role: "button",
  30515. "aria-label": buttonAriaLabel.value,
  30516. "aria-labelledby": buttonAriaLabelledby.value,
  30517. "aria-description": unref(t)("el.colorpicker.description", { color: __props.modelValue || "" }),
  30518. "aria-disabled": unref(colorDisabled),
  30519. tabindex: unref(colorDisabled) ? void 0 : __props.tabindex,
  30520. onKeydown: handleKeyDown,
  30521. onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  30522. onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args))
  30523. }), [createBaseVNode("div", {
  30524. class: normalizeClass(unref(ns).be("picker", "trigger")),
  30525. onClick: handleTrigger
  30526. }, [createBaseVNode("span", { class: normalizeClass([unref(ns).be("picker", "color"), unref(ns).is("alpha", __props.showAlpha)]) }, [createBaseVNode("span", {
  30527. class: normalizeClass(unref(ns).be("picker", "color-inner")),
  30528. style: normalizeStyle({ backgroundColor: displayedColor.value })
  30529. }, [withDirectives(createVNode(unref(ElIcon), { class: normalizeClass([unref(ns).be("picker", "icon"), unref(ns).is("icon-arrow-down")]) }, {
  30530. default: withCtx(() => [createVNode(unref(arrow_down_default))]),
  30531. _: 1
  30532. }, 8, ["class"]), [[vShow, __props.modelValue || showPanelColor.value]]), withDirectives(createVNode(unref(ElIcon), { class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")]) }, {
  30533. default: withCtx(() => [createVNode(unref(close_default))]),
  30534. _: 1
  30535. }, 8, ["class"]), [[vShow, !__props.modelValue && !showPanelColor.value]])], 6)], 2)], 2)], 16, _hoisted_1$52)]),
  30536. _: 1
  30537. }, 8, [
  30538. "visible",
  30539. "popper-class",
  30540. "popper-style",
  30541. "teleported",
  30542. "transition",
  30543. "persistent",
  30544. "append-to"
  30545. ]);
  30546. };
  30547. }
  30548. }));
  30549. //#endregion
  30550. //#region node_modules/element-plus/es/components/container/src/container.mjs
  30551. var container_default = /* @__PURE__ */ defineComponent({
  30552. name: "ElContainer",
  30553. __name: "container",
  30554. props: { direction: {
  30555. type: String,
  30556. required: false
  30557. } },
  30558. setup(__props) {
  30559. const props = __props;
  30560. const slots = useSlots();
  30561. const ns = useNamespace("container");
  30562. const isVertical = computed(() => {
  30563. if (props.direction === "vertical") return true;
  30564. else if (props.direction === "horizontal") return false;
  30565. if (slots && slots.default) return slots.default().some((vNode) => {
  30566. const tag = vNode.type.name;
  30567. return tag === "ElHeader" || tag === "ElFooter";
  30568. });
  30569. else return false;
  30570. });
  30571. return (_ctx, _cache) => {
  30572. return openBlock(), createElementBlock("section", { class: normalizeClass([unref(ns).b(), unref(ns).is("vertical", isVertical.value)]) }, [renderSlot(_ctx.$slots, "default")], 2);
  30573. };
  30574. }
  30575. });
  30576. //#endregion
  30577. //#region node_modules/element-plus/es/components/container/src/aside.mjs
  30578. var aside_default = /* @__PURE__ */ defineComponent({
  30579. name: "ElAside",
  30580. __name: "aside",
  30581. props: { width: {
  30582. type: [String, null],
  30583. required: false,
  30584. default: null
  30585. } },
  30586. setup(__props) {
  30587. const props = __props;
  30588. const ns = useNamespace("aside");
  30589. const style = computed(() => props.width ? ns.cssVarBlock({ width: props.width }) : {});
  30590. return (_ctx, _cache) => {
  30591. return openBlock(), createElementBlock("aside", {
  30592. class: normalizeClass(unref(ns).b()),
  30593. style: normalizeStyle(style.value)
  30594. }, [renderSlot(_ctx.$slots, "default")], 6);
  30595. };
  30596. }
  30597. });
  30598. //#endregion
  30599. //#region node_modules/element-plus/es/components/container/src/footer.mjs
  30600. var footer_default = /* @__PURE__ */ defineComponent({
  30601. name: "ElFooter",
  30602. __name: "footer",
  30603. props: { height: {
  30604. type: [String, null],
  30605. required: false,
  30606. default: null
  30607. } },
  30608. setup(__props) {
  30609. const props = __props;
  30610. const ns = useNamespace("footer");
  30611. const style = computed(() => props.height ? ns.cssVarBlock({ height: props.height }) : {});
  30612. return (_ctx, _cache) => {
  30613. return openBlock(), createElementBlock("footer", {
  30614. class: normalizeClass(unref(ns).b()),
  30615. style: normalizeStyle(style.value)
  30616. }, [renderSlot(_ctx.$slots, "default")], 6);
  30617. };
  30618. }
  30619. });
  30620. //#endregion
  30621. //#region node_modules/element-plus/es/components/container/src/header.mjs
  30622. var header_default = /* @__PURE__ */ defineComponent({
  30623. name: "ElHeader",
  30624. __name: "header",
  30625. props: { height: {
  30626. type: [String, null],
  30627. required: false,
  30628. default: null
  30629. } },
  30630. setup(__props) {
  30631. const props = __props;
  30632. const ns = useNamespace("header");
  30633. const style = computed(() => {
  30634. return props.height ? ns.cssVarBlock({ height: props.height }) : {};
  30635. });
  30636. return (_ctx, _cache) => {
  30637. return openBlock(), createElementBlock("header", {
  30638. class: normalizeClass(unref(ns).b()),
  30639. style: normalizeStyle(style.value)
  30640. }, [renderSlot(_ctx.$slots, "default")], 6);
  30641. };
  30642. }
  30643. });
  30644. //#endregion
  30645. //#region node_modules/element-plus/es/components/container/src/main.mjs
  30646. var main_default = /* @__PURE__ */ defineComponent({
  30647. name: "ElMain",
  30648. __name: "main",
  30649. setup(__props) {
  30650. const ns = useNamespace("main");
  30651. return (_ctx, _cache) => {
  30652. return openBlock(), createElementBlock("main", { class: normalizeClass(unref(ns).b()) }, [renderSlot(_ctx.$slots, "default")], 2);
  30653. };
  30654. }
  30655. });
  30656. //#endregion
  30657. //#region node_modules/element-plus/es/components/container/index.mjs
  30658. var ElContainer = withInstall(container_default, {
  30659. Aside: aside_default,
  30660. Footer: footer_default,
  30661. Header: header_default,
  30662. Main: main_default
  30663. });
  30664. var ElAside = withNoopInstall(aside_default);
  30665. var ElFooter = withNoopInstall(footer_default);
  30666. var ElHeader = withNoopInstall(header_default);
  30667. var ElMain = withNoopInstall(main_default);
  30668. //#endregion
  30669. //#region node_modules/element-plus/es/components/countdown/src/countdown.mjs
  30670. /**
  30671. * @deprecated Removed after 3.0.0, Use `CountdownProps` instead.
  30672. */
  30673. var countdownProps = buildProps({
  30674. /**
  30675. * @description Formatting the countdown display
  30676. */
  30677. format: {
  30678. type: String,
  30679. default: "HH:mm:ss"
  30680. },
  30681. /**
  30682. * @description Sets the prefix of a countdown
  30683. */
  30684. prefix: String,
  30685. /**
  30686. * @description Sets the suffix of a countdown
  30687. */
  30688. suffix: String,
  30689. /**
  30690. * @description countdown titles
  30691. */
  30692. title: String,
  30693. /**
  30694. * @description target time
  30695. */
  30696. value: {
  30697. type: definePropType([Number, Object]),
  30698. default: 0
  30699. },
  30700. /**
  30701. * @description Styles countdown values
  30702. */
  30703. valueStyle: {
  30704. type: definePropType([
  30705. String,
  30706. Object,
  30707. Array,
  30708. Boolean
  30709. ]),
  30710. default: void 0
  30711. }
  30712. });
  30713. var countdownEmits = {
  30714. finish: () => true,
  30715. [CHANGE_EVENT]: (value) => isNumber(value)
  30716. };
  30717. //#endregion
  30718. //#region node_modules/element-plus/es/components/statistic/src/statistic.mjs
  30719. /**
  30720. * @deprecated Removed after 3.0.0, Use `StatisticProps` instead.
  30721. */
  30722. var statisticProps = buildProps({
  30723. /**
  30724. * @description Setting the decimal point
  30725. */
  30726. decimalSeparator: {
  30727. type: String,
  30728. default: "."
  30729. },
  30730. /**
  30731. * @description Sets the thousandth identifier
  30732. */
  30733. groupSeparator: {
  30734. type: String,
  30735. default: ","
  30736. },
  30737. /**
  30738. * @description numerical precision
  30739. */
  30740. precision: {
  30741. type: Number,
  30742. default: 0
  30743. },
  30744. /**
  30745. * @description Custom numerical presentation
  30746. */
  30747. formatter: Function,
  30748. /**
  30749. * @description Numerical content
  30750. */
  30751. value: {
  30752. type: definePropType([Number, Object]),
  30753. default: 0
  30754. },
  30755. /**
  30756. * @description Sets the prefix of a number
  30757. */
  30758. prefix: String,
  30759. /**
  30760. * @description Sets the suffix of a number
  30761. */
  30762. suffix: String,
  30763. /**
  30764. * @description Numeric titles
  30765. */
  30766. title: String,
  30767. /**
  30768. * @description Styles numeric values
  30769. */
  30770. valueStyle: {
  30771. type: definePropType([
  30772. String,
  30773. Object,
  30774. Array,
  30775. Boolean
  30776. ]),
  30777. default: void 0
  30778. }
  30779. });
  30780. //#endregion
  30781. //#region node_modules/element-plus/es/components/statistic/index.mjs
  30782. var ElStatistic = withInstall(/* @__PURE__ */ defineComponent({
  30783. name: "ElStatistic",
  30784. __name: "statistic",
  30785. props: statisticProps,
  30786. setup(__props, { expose: __expose }) {
  30787. const props = __props;
  30788. const ns = useNamespace("statistic");
  30789. const displayValue = computed(() => {
  30790. const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
  30791. if (isFunction$1(formatter)) return formatter(value);
  30792. if (!isNumber(value) || Number.isNaN(value)) return value;
  30793. let [integer, decimal = ""] = String(value).split(".");
  30794. decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
  30795. integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
  30796. return [integer, decimal].join(decimal ? decimalSeparator : "");
  30797. });
  30798. __expose({
  30799. /**
  30800. * @description current display value
  30801. */
  30802. displayValue });
  30803. return (_ctx, _cache) => {
  30804. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [_ctx.$slots.title || __props.title ? (openBlock(), createElementBlock("div", {
  30805. key: 0,
  30806. class: normalizeClass(unref(ns).e("head"))
  30807. }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [
  30808. _ctx.$slots.prefix || __props.prefix ? (openBlock(), createElementBlock("div", {
  30809. key: 0,
  30810. class: normalizeClass(unref(ns).e("prefix"))
  30811. }, [renderSlot(_ctx.$slots, "prefix", {}, () => [createBaseVNode("span", null, toDisplayString(__props.prefix), 1)])], 2)) : createCommentVNode("v-if", true),
  30812. createBaseVNode("span", {
  30813. class: normalizeClass(unref(ns).e("number")),
  30814. style: normalizeStyle(__props.valueStyle)
  30815. }, toDisplayString(displayValue.value), 7),
  30816. _ctx.$slots.suffix || __props.suffix ? (openBlock(), createElementBlock("div", {
  30817. key: 1,
  30818. class: normalizeClass(unref(ns).e("suffix"))
  30819. }, [renderSlot(_ctx.$slots, "suffix", {}, () => [createBaseVNode("span", null, toDisplayString(__props.suffix), 1)])], 2)) : createCommentVNode("v-if", true)
  30820. ], 2)], 2);
  30821. };
  30822. }
  30823. }));
  30824. //#endregion
  30825. //#region node_modules/element-plus/es/components/countdown/src/utils.mjs
  30826. var timeUnits$1 = [
  30827. ["Y", 1e3 * 60 * 60 * 24 * 365],
  30828. ["M", 1e3 * 60 * 60 * 24 * 30],
  30829. ["D", 1e3 * 60 * 60 * 24],
  30830. ["H", 1e3 * 60 * 60],
  30831. ["m", 1e3 * 60],
  30832. ["s", 1e3],
  30833. ["S", 1]
  30834. ];
  30835. var getTime = (value) => {
  30836. return isNumber(value) ? new Date(value).getTime() : value.valueOf();
  30837. };
  30838. var formatTime$1 = (timestamp, format) => {
  30839. let timeLeft = timestamp;
  30840. return timeUnits$1.reduce((current, [name, unit]) => {
  30841. const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g");
  30842. if (replaceRegex.test(current)) {
  30843. const value = Math.floor(timeLeft / unit);
  30844. timeLeft -= value * unit;
  30845. return current.replace(replaceRegex, (match) => String(value).padStart(match.length, "0"));
  30846. }
  30847. return current;
  30848. }, format).replace(/\[([^\]]*)]/g, "$1");
  30849. };
  30850. //#endregion
  30851. //#region node_modules/element-plus/es/components/countdown/index.mjs
  30852. var ElCountdown = withInstall(/* @__PURE__ */ defineComponent({
  30853. name: "ElCountdown",
  30854. __name: "countdown",
  30855. props: countdownProps,
  30856. emits: countdownEmits,
  30857. setup(__props, { expose: __expose, emit: __emit }) {
  30858. const props = __props;
  30859. const emit = __emit;
  30860. let timer;
  30861. const rawValue = ref(0);
  30862. const displayValue = computed(() => formatTime$1(rawValue.value, props.format));
  30863. const formatter = (val) => formatTime$1(val, props.format);
  30864. const stopTimer = () => {
  30865. if (timer) {
  30866. cAF(timer);
  30867. timer = void 0;
  30868. }
  30869. };
  30870. const startTimer = () => {
  30871. const timestamp = getTime(props.value);
  30872. const frameFunc = () => {
  30873. let diff = timestamp - Date.now();
  30874. emit(CHANGE_EVENT, diff);
  30875. if (diff <= 0) {
  30876. diff = 0;
  30877. stopTimer();
  30878. emit("finish");
  30879. } else timer = rAF(frameFunc);
  30880. rawValue.value = diff;
  30881. };
  30882. timer = rAF(frameFunc);
  30883. };
  30884. onMounted(() => {
  30885. rawValue.value = getTime(props.value) - Date.now();
  30886. watch(() => [props.value, props.format], () => {
  30887. stopTimer();
  30888. startTimer();
  30889. }, { immediate: true });
  30890. });
  30891. onBeforeUnmount(() => {
  30892. stopTimer();
  30893. });
  30894. __expose({
  30895. /**
  30896. * @description current display value
  30897. */
  30898. displayValue });
  30899. return (_ctx, _cache) => {
  30900. return openBlock(), createBlock(unref(ElStatistic), {
  30901. value: rawValue.value,
  30902. title: __props.title,
  30903. prefix: __props.prefix,
  30904. suffix: __props.suffix,
  30905. "value-style": __props.valueStyle,
  30906. formatter
  30907. }, createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
  30908. return {
  30909. name,
  30910. fn: withCtx(() => [renderSlot(_ctx.$slots, name)])
  30911. };
  30912. })]), 1032, [
  30913. "value",
  30914. "title",
  30915. "prefix",
  30916. "suffix",
  30917. "value-style"
  30918. ]);
  30919. };
  30920. }
  30921. }));
  30922. //#endregion
  30923. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/date-picker-panel.mjs
  30924. var datePickerPanelProps = buildProps({
  30925. /**
  30926. * @description optional, format of binding value. If not specified, the binding value will be a Date object
  30927. */
  30928. valueFormat: String,
  30929. /**
  30930. * @description optional, format of the date displayed in input's inner panel
  30931. */
  30932. dateFormat: String,
  30933. /**
  30934. * @description optional, format of the time displayed in input's inner panel
  30935. */
  30936. timeFormat: String,
  30937. /**
  30938. * @description whether picker is disabled
  30939. */
  30940. disabled: {
  30941. type: Boolean,
  30942. default: void 0
  30943. },
  30944. /**
  30945. * @description binding value, if it is an array, the length should be 2
  30946. */
  30947. modelValue: {
  30948. type: definePropType([
  30949. Date,
  30950. Array,
  30951. String,
  30952. Number
  30953. ]),
  30954. default: ""
  30955. },
  30956. /**
  30957. * @description optional, default date of the calendar
  30958. */
  30959. defaultValue: { type: definePropType([Date, Array]) },
  30960. /**
  30961. * @description optional, the time value to use when selecting date range
  30962. */
  30963. defaultTime: { type: definePropType([Date, Array]) },
  30964. /**
  30965. * @description whether to pick a time range
  30966. */
  30967. isRange: Boolean,
  30968. ...disabledTimeListsProps,
  30969. /**
  30970. * @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean
  30971. */
  30972. disabledDate: { type: Function },
  30973. /**
  30974. * @description set custom className
  30975. */
  30976. cellClassName: { type: Function },
  30977. /**
  30978. * @description an object array to set shortcut options
  30979. */
  30980. shortcuts: {
  30981. type: Array,
  30982. default: () => []
  30983. },
  30984. /**
  30985. * @description whether to pick time using arrow buttons
  30986. */
  30987. arrowControl: Boolean,
  30988. /**
  30989. * @description unlink two date-panels in range-picker
  30990. */
  30991. unlinkPanels: Boolean,
  30992. /**
  30993. * @description whether to show the now button
  30994. */
  30995. showNow: {
  30996. type: Boolean,
  30997. default: true
  30998. },
  30999. /**
  31000. * @description whether to show the confirm button
  31001. */
  31002. showConfirm: Boolean,
  31003. /**
  31004. * @description whether to show footer
  31005. */
  31006. showFooter: Boolean,
  31007. /**
  31008. * @description whether to show the number of the calendar week
  31009. */
  31010. showWeekNumber: Boolean,
  31011. /**
  31012. * @description type of the picker
  31013. */
  31014. type: {
  31015. type: definePropType(String),
  31016. default: "date"
  31017. },
  31018. /**
  31019. * @description whether to show clear button in range mode
  31020. */
  31021. clearable: {
  31022. type: Boolean,
  31023. default: true
  31024. },
  31025. /**
  31026. * @description whether the date picker is bordered
  31027. */
  31028. border: {
  31029. type: Boolean,
  31030. default: true
  31031. },
  31032. /**
  31033. * @description whether the input is editable
  31034. */
  31035. editable: {
  31036. type: Boolean,
  31037. default: true
  31038. }
  31039. });
  31040. //#endregion
  31041. //#region node_modules/element-plus/es/components/date-picker-panel/src/constants.mjs
  31042. var ROOT_PICKER_INJECTION_KEY = Symbol("rootPickerContextKey");
  31043. var ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY = "ElIsDefaultFormat";
  31044. //#endregion
  31045. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/shared.mjs
  31046. var selectionModes = [
  31047. "date",
  31048. "dates",
  31049. "year",
  31050. "years",
  31051. "month",
  31052. "months",
  31053. "week",
  31054. "range"
  31055. ];
  31056. var datePickerSharedProps = buildProps({
  31057. cellClassName: { type: definePropType(Function) },
  31058. disabledDate: { type: definePropType(Function) },
  31059. date: {
  31060. type: definePropType(Object),
  31061. required: true
  31062. },
  31063. minDate: { type: definePropType(Object) },
  31064. maxDate: { type: definePropType(Object) },
  31065. parsedValue: { type: definePropType([Object, Array]) },
  31066. rangeState: {
  31067. type: definePropType(Object),
  31068. default: () => ({
  31069. endDate: null,
  31070. selecting: false
  31071. })
  31072. },
  31073. disabled: Boolean
  31074. });
  31075. var panelSharedProps = buildProps({
  31076. type: {
  31077. type: definePropType(String),
  31078. required: true,
  31079. values: datePickTypes
  31080. },
  31081. dateFormat: String,
  31082. timeFormat: String,
  31083. showNow: {
  31084. type: Boolean,
  31085. default: true
  31086. },
  31087. showConfirm: Boolean,
  31088. showFooter: {
  31089. type: Boolean,
  31090. default: true
  31091. },
  31092. showWeekNumber: Boolean,
  31093. border: Boolean,
  31094. disabled: Boolean,
  31095. editable: {
  31096. type: Boolean,
  31097. default: true
  31098. }
  31099. });
  31100. var panelRangeSharedProps = buildProps({
  31101. unlinkPanels: Boolean,
  31102. visible: {
  31103. type: Boolean,
  31104. default: true
  31105. },
  31106. showConfirm: Boolean,
  31107. showFooter: {
  31108. type: Boolean,
  31109. default: true
  31110. },
  31111. border: Boolean,
  31112. disabled: Boolean,
  31113. parsedValue: { type: definePropType(Array) },
  31114. singlePanel: Boolean
  31115. });
  31116. var selectionModeWithDefault = (mode) => {
  31117. return {
  31118. type: String,
  31119. values: selectionModes,
  31120. default: mode
  31121. };
  31122. };
  31123. //#endregion
  31124. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-pick.mjs
  31125. var panelDatePickProps = buildProps({
  31126. ...panelSharedProps,
  31127. parsedValue: { type: definePropType([Object, Array]) },
  31128. visible: {
  31129. type: Boolean,
  31130. default: true
  31131. },
  31132. format: {
  31133. type: String,
  31134. default: ""
  31135. }
  31136. });
  31137. //#endregion
  31138. //#region node_modules/element-plus/es/components/date-picker-panel/src/utils.mjs
  31139. var isValidRange = (range) => {
  31140. if (!isArray$1(range)) return false;
  31141. const [left, right] = range;
  31142. return import_dayjs_min.default.isDayjs(left) && import_dayjs_min.default.isDayjs(right) && (0, import_dayjs_min.default)(left).isValid() && (0, import_dayjs_min.default)(right).isValid() && left.isSameOrBefore(right);
  31143. };
  31144. var getDefaultValue = (defaultValue, { lang, step = 1, unit, unlinkPanels }) => {
  31145. let start;
  31146. if (isArray$1(defaultValue)) {
  31147. let [left, right] = defaultValue.map((d) => (0, import_dayjs_min.default)(d).locale(lang));
  31148. if (!unlinkPanels) right = left.add(step, unit);
  31149. return [left, right];
  31150. } else if (defaultValue) start = (0, import_dayjs_min.default)(defaultValue);
  31151. else start = (0, import_dayjs_min.default)();
  31152. start = start.locale(lang);
  31153. return [start, start.add(step, unit)];
  31154. };
  31155. var buildPickerTable = (dimension, rows, { columnIndexOffset, startDate, nextEndDate, now, unit, relativeDateGetter, setCellMetadata, setRowMetadata }) => {
  31156. for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {
  31157. const row = rows[rowIndex];
  31158. for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {
  31159. let cell = row[columnIndex + columnIndexOffset];
  31160. if (!cell) cell = {
  31161. row: rowIndex,
  31162. column: columnIndex,
  31163. type: "normal",
  31164. inRange: false,
  31165. start: false,
  31166. end: false
  31167. };
  31168. const nextStartDate = relativeDateGetter(rowIndex * dimension.column + columnIndex);
  31169. cell.dayjs = nextStartDate;
  31170. cell.date = nextStartDate.toDate();
  31171. cell.timestamp = nextStartDate.valueOf();
  31172. cell.type = "normal";
  31173. cell.inRange = !!(startDate && nextStartDate.isSameOrAfter(startDate, unit) && nextEndDate && nextStartDate.isSameOrBefore(nextEndDate, unit)) || !!(startDate && nextStartDate.isSameOrBefore(startDate, unit) && nextEndDate && nextStartDate.isSameOrAfter(nextEndDate, unit));
  31174. if (startDate?.isSameOrAfter(nextEndDate)) {
  31175. cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit);
  31176. cell.end = startDate && nextStartDate.isSame(startDate, unit);
  31177. } else {
  31178. cell.start = !!startDate && nextStartDate.isSame(startDate, unit);
  31179. cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit);
  31180. }
  31181. if (nextStartDate.isSame(now, unit)) cell.type = "today";
  31182. setCellMetadata?.(cell, {
  31183. rowIndex,
  31184. columnIndex
  31185. });
  31186. row[columnIndex + columnIndexOffset] = cell;
  31187. }
  31188. setRowMetadata?.(row);
  31189. }
  31190. };
  31191. var datesInMonth = (date, year, month, lang) => {
  31192. const firstDay = (0, import_dayjs_min.default)().locale(lang).startOf("month").month(month).year(year).hour(date.hour()).minute(date.minute()).second(date.second());
  31193. return rangeArr(firstDay.daysInMonth()).map((n) => firstDay.add(n, "day").toDate());
  31194. };
  31195. var getValidDateOfMonth = (date, year, month, lang, disabledDate) => {
  31196. const _value = (0, import_dayjs_min.default)().year(year).month(month).startOf("month").hour(date.hour()).minute(date.minute()).second(date.second());
  31197. const _date = datesInMonth(date, year, month, lang).find((date) => {
  31198. return !disabledDate?.(date);
  31199. });
  31200. if (_date) return (0, import_dayjs_min.default)(_date).locale(lang);
  31201. return _value.locale(lang);
  31202. };
  31203. var getValidDateOfYear = (value, lang, disabledDate) => {
  31204. const year = value.year();
  31205. if (!disabledDate?.(value.toDate())) return value.locale(lang);
  31206. const month = value.month();
  31207. if (!datesInMonth(value, year, month, lang).every(disabledDate)) return getValidDateOfMonth(value, year, month, lang, disabledDate);
  31208. for (let i = 0; i < 12; i++) if (!datesInMonth(value, year, i, lang).every(disabledDate)) return getValidDateOfMonth(value, year, i, lang, disabledDate);
  31209. return value;
  31210. };
  31211. var correctlyParseUserInput = (value, format, lang, defaultFormat) => {
  31212. if (isArray$1(value)) return value.map((v) => correctlyParseUserInput(v, format, lang, defaultFormat));
  31213. if (isString(value)) {
  31214. const dayjsValue = defaultFormat?.value ? (0, import_dayjs_min.default)(value) : (0, import_dayjs_min.default)(value, format);
  31215. if (!dayjsValue.isValid()) return dayjsValue;
  31216. }
  31217. return (0, import_dayjs_min.default)(value, format).locale(lang);
  31218. };
  31219. //#endregion
  31220. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-date-table.mjs
  31221. var basicDateTableProps = buildProps({
  31222. ...datePickerSharedProps,
  31223. showWeekNumber: Boolean,
  31224. selectionMode: selectionModeWithDefault("date")
  31225. });
  31226. var basicDateTableEmits = [
  31227. "changerange",
  31228. "pick",
  31229. "select"
  31230. ];
  31231. //#endregion
  31232. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs
  31233. var isNormalDay = (type = "") => {
  31234. return ["normal", "today"].includes(type);
  31235. };
  31236. var useBasicDateTable = (props, emit) => {
  31237. const { lang } = useLocale();
  31238. const tbodyRef = ref();
  31239. const currentCellRef = ref();
  31240. const lastRow = ref();
  31241. const lastColumn = ref();
  31242. const tableRows = ref([
  31243. [],
  31244. [],
  31245. [],
  31246. [],
  31247. [],
  31248. []
  31249. ]);
  31250. let focusWithClick = false;
  31251. const firstDayOfWeek = props.date.$locale().weekStart || 7;
  31252. const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_) => _.toLowerCase());
  31253. const offsetDay = computed(() => {
  31254. return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek;
  31255. });
  31256. const startDate = computed(() => {
  31257. const startDayOfMonth = props.date.startOf("month");
  31258. return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day");
  31259. });
  31260. const WEEKS = computed(() => {
  31261. return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7);
  31262. });
  31263. const hasCurrent = computed(() => {
  31264. return flatten(unref(rows)).some((row) => {
  31265. return row.isCurrent;
  31266. });
  31267. });
  31268. const days = computed(() => {
  31269. const startOfMonth = props.date.startOf("month");
  31270. return {
  31271. startOfMonthDay: startOfMonth.day() || 7,
  31272. dateCountOfMonth: startOfMonth.daysInMonth(),
  31273. dateCountOfLastMonth: startOfMonth.subtract(1, "month").daysInMonth()
  31274. };
  31275. });
  31276. const selectedDate = computed(() => {
  31277. return props.selectionMode === "dates" ? castArray(props.parsedValue) : [];
  31278. });
  31279. const setDateText = (cell, { count, rowIndex, columnIndex }) => {
  31280. const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days);
  31281. const offset = unref(offsetDay);
  31282. if (rowIndex >= 0 && rowIndex <= 1) {
  31283. const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
  31284. if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {
  31285. cell.text = count;
  31286. return true;
  31287. } else {
  31288. cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7;
  31289. cell.type = "prev-month";
  31290. }
  31291. } else {
  31292. if (count <= dateCountOfMonth) cell.text = count;
  31293. else {
  31294. cell.text = count - dateCountOfMonth;
  31295. cell.type = "next-month";
  31296. }
  31297. return true;
  31298. }
  31299. return false;
  31300. };
  31301. const setCellMetadata = (cell, { columnIndex, rowIndex }, count) => {
  31302. const { disabledDate, cellClassName } = props;
  31303. const _selectedDate = unref(selectedDate);
  31304. const shouldIncrement = setDateText(cell, {
  31305. count,
  31306. rowIndex,
  31307. columnIndex
  31308. });
  31309. const cellDate = cell.dayjs.toDate();
  31310. cell.selected = _selectedDate.find((d) => d.isSame(cell.dayjs, "day"));
  31311. cell.isSelected = !!cell.selected;
  31312. cell.isCurrent = isCurrent(cell);
  31313. cell.disabled = disabledDate?.(cellDate);
  31314. cell.customClass = cellClassName?.(cellDate);
  31315. return shouldIncrement;
  31316. };
  31317. const setRowMetadata = (row) => {
  31318. if (props.selectionMode === "week") {
  31319. const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6];
  31320. const isActive = isWeekActive(row[start + 1]);
  31321. row[start].inRange = isActive;
  31322. row[start].start = isActive;
  31323. row[end].inRange = isActive;
  31324. row[end].end = isActive;
  31325. }
  31326. };
  31327. const rows = computed(() => {
  31328. const { minDate, maxDate, rangeState, showWeekNumber } = props;
  31329. const offset = unref(offsetDay);
  31330. const rows_ = unref(tableRows);
  31331. const dateUnit = "day";
  31332. let count = 1;
  31333. buildPickerTable({
  31334. row: 6,
  31335. column: 7
  31336. }, rows_, {
  31337. startDate: minDate,
  31338. columnIndexOffset: showWeekNumber ? 1 : 0,
  31339. nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null,
  31340. now: (0, import_dayjs_min.default)().locale(unref(lang)).startOf(dateUnit),
  31341. unit: dateUnit,
  31342. relativeDateGetter: (idx) => unref(startDate).add(idx - offset, dateUnit),
  31343. setCellMetadata: (...args) => {
  31344. if (setCellMetadata(...args, count)) count += 1;
  31345. },
  31346. setRowMetadata
  31347. });
  31348. if (showWeekNumber) {
  31349. for (let rowIndex = 0; rowIndex < 6; rowIndex++) if (rows_[rowIndex][1].dayjs) rows_[rowIndex][0] = {
  31350. type: "week",
  31351. text: rows_[rowIndex][1].dayjs.week()
  31352. };
  31353. }
  31354. return rows_;
  31355. });
  31356. watch(() => props.date, async () => {
  31357. if (unref(tbodyRef)?.contains(document.activeElement)) {
  31358. await nextTick();
  31359. await focus();
  31360. }
  31361. });
  31362. const focus = async () => unref(currentCellRef)?.focus();
  31363. const isCurrent = (cell) => {
  31364. return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue);
  31365. };
  31366. const cellMatchesDate = (cell, date) => {
  31367. if (!date) return false;
  31368. return (0, import_dayjs_min.default)(date).locale(unref(lang)).isSame(props.date.date(Number(cell.text)), "day");
  31369. };
  31370. const getDateOfCell = (row, column) => {
  31371. const startOfMonthDay = unref(days).startOfMonthDay;
  31372. const offset = unref(offsetDay);
  31373. const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
  31374. const offsetFromStart = row * 7 + (column - (props.showWeekNumber ? 1 : 0));
  31375. return props.date.startOf("month").subtract(numberOfDaysFromPreviousMonth, "day").add(offsetFromStart, "day");
  31376. };
  31377. const handleMouseMove = (event) => {
  31378. if (!props.rangeState.selecting) return;
  31379. let target = event.target;
  31380. if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
  31381. if (target.tagName === "DIV") target = target.parentNode;
  31382. if (target.tagName !== "TD") return;
  31383. const row = target.parentNode.rowIndex - 1;
  31384. const column = target.cellIndex;
  31385. if (unref(rows)[row][column].disabled) return;
  31386. if (row !== unref(lastRow) || column !== unref(lastColumn)) {
  31387. lastRow.value = row;
  31388. lastColumn.value = column;
  31389. emit("changerange", {
  31390. selecting: true,
  31391. endDate: getDateOfCell(row, column)
  31392. });
  31393. }
  31394. };
  31395. const isSelectedCell = (cell) => {
  31396. return !unref(hasCurrent) && cell?.text === 1 && isNormalDay(cell.type) || cell.isCurrent;
  31397. };
  31398. const handleFocus = (event) => {
  31399. if (focusWithClick || unref(hasCurrent) || props.selectionMode !== "date") return;
  31400. handlePickDate(event, true);
  31401. };
  31402. const handleMouseDown = (event) => {
  31403. if (!event.target.closest("td")) return;
  31404. focusWithClick = true;
  31405. };
  31406. const handleMouseUp = (event) => {
  31407. if (!event.target.closest("td")) return;
  31408. focusWithClick = false;
  31409. };
  31410. const handleRangePick = (newDate) => {
  31411. if (!props.rangeState.selecting || !props.minDate) {
  31412. emit("pick", {
  31413. minDate: newDate,
  31414. maxDate: null
  31415. });
  31416. emit("select", true);
  31417. } else {
  31418. if (newDate >= props.minDate) emit("pick", {
  31419. minDate: props.minDate,
  31420. maxDate: newDate
  31421. });
  31422. else emit("pick", {
  31423. minDate: newDate,
  31424. maxDate: props.minDate
  31425. });
  31426. emit("select", false);
  31427. }
  31428. };
  31429. const handleWeekPick = (newDate) => {
  31430. const weekNumber = newDate.week();
  31431. const value = `${newDate.year()}w${weekNumber}`;
  31432. emit("pick", {
  31433. year: newDate.year(),
  31434. week: weekNumber,
  31435. value,
  31436. date: newDate.startOf("week")
  31437. });
  31438. };
  31439. const handleDatesPick = (newDate, selected) => {
  31440. emit("pick", selected ? castArray(props.parsedValue).filter((d) => d?.valueOf() !== newDate.valueOf()) : castArray(props.parsedValue).concat([newDate]));
  31441. };
  31442. const handlePickDate = (event, isKeyboardMovement = false) => {
  31443. if (props.disabled) return;
  31444. const target = event.target.closest("td");
  31445. if (!target) return;
  31446. const row = target.parentNode.rowIndex - 1;
  31447. const column = target.cellIndex;
  31448. const cell = unref(rows)[row][column];
  31449. if (cell.disabled || cell.type === "week") return;
  31450. const newDate = getDateOfCell(row, column);
  31451. switch (props.selectionMode) {
  31452. case "range":
  31453. handleRangePick(newDate);
  31454. break;
  31455. case "date":
  31456. emit("pick", newDate, isKeyboardMovement);
  31457. break;
  31458. case "week":
  31459. handleWeekPick(newDate);
  31460. break;
  31461. case "dates":
  31462. handleDatesPick(newDate, !!cell.selected);
  31463. break;
  31464. default: break;
  31465. }
  31466. };
  31467. const isWeekActive = (cell) => {
  31468. if (props.selectionMode !== "week") return false;
  31469. let newDate = props.date.startOf("day");
  31470. if (cell.type === "prev-month") newDate = newDate.subtract(1, "month");
  31471. if (cell.type === "next-month") newDate = newDate.add(1, "month");
  31472. newDate = newDate.date(Number.parseInt(cell.text, 10));
  31473. if (props.parsedValue && !isArray$1(props.parsedValue)) {
  31474. const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1;
  31475. return props.parsedValue.subtract(dayOffset, "day").isSame(newDate, "day");
  31476. }
  31477. return false;
  31478. };
  31479. return {
  31480. WEEKS,
  31481. rows,
  31482. tbodyRef,
  31483. currentCellRef,
  31484. focus,
  31485. isCurrent,
  31486. isWeekActive,
  31487. isSelectedCell,
  31488. handlePickDate,
  31489. handleMouseUp,
  31490. handleMouseDown,
  31491. handleMouseMove,
  31492. handleFocus
  31493. };
  31494. };
  31495. var useBasicDateTableDOM = (props, { isCurrent, isWeekActive }) => {
  31496. const ns = useNamespace("date-table");
  31497. const { t } = useLocale();
  31498. const tableKls = computed(() => [ns.b(), ns.is("week-mode", props.selectionMode === "week" && !props.disabled)]);
  31499. const tableLabel = computed(() => t("el.datepicker.dateTablePrompt"));
  31500. const getCellClasses = (cell) => {
  31501. const classes = [];
  31502. if (isNormalDay(cell.type) && !cell.disabled) {
  31503. classes.push("available");
  31504. if (cell.type === "today") classes.push("today");
  31505. } else classes.push(cell.type);
  31506. if (isCurrent(cell)) classes.push("current");
  31507. if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) {
  31508. classes.push("in-range");
  31509. if (cell.start) classes.push("start-date");
  31510. if (cell.end) classes.push("end-date");
  31511. }
  31512. if (cell.disabled || props.disabled) classes.push("disabled");
  31513. if (cell.selected) classes.push("selected");
  31514. if (cell.customClass) classes.push(cell.customClass);
  31515. return classes.join(" ");
  31516. };
  31517. const getRowKls = (cell) => [ns.e("row"), { current: isWeekActive(cell) }];
  31518. return {
  31519. tableKls,
  31520. tableLabel,
  31521. weekHeaderClass: ns.e("week-header"),
  31522. getCellClasses,
  31523. getRowKls,
  31524. t
  31525. };
  31526. };
  31527. //#endregion
  31528. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-cell-render.mjs
  31529. var basic_cell_render_default = /* @__PURE__ */ defineComponent({
  31530. name: "ElDatePickerCell",
  31531. props: buildProps({ cell: { type: definePropType(Object) } }),
  31532. setup(props) {
  31533. const ns = useNamespace("date-table-cell");
  31534. const { slots } = inject(ROOT_PICKER_INJECTION_KEY);
  31535. return () => {
  31536. const { cell } = props;
  31537. return renderSlot(slots, "default", { ...cell }, () => [createVNode("div", { "class": ns.b() }, [createVNode("span", { "class": ns.e("text") }, [cell?.renderText ?? cell?.text])])]);
  31538. };
  31539. }
  31540. });
  31541. //#endregion
  31542. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.vue_vue_type_script_setup_true_lang.mjs
  31543. var _hoisted_1$51 = ["aria-label"];
  31544. var _hoisted_2$33 = ["aria-label"];
  31545. var _hoisted_3$15 = [
  31546. "aria-current",
  31547. "aria-selected",
  31548. "tabindex",
  31549. "aria-disabled"
  31550. ];
  31551. //#endregion
  31552. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.mjs
  31553. var basic_date_table_default = /* @__PURE__ */ defineComponent({
  31554. __name: "basic-date-table",
  31555. props: basicDateTableProps,
  31556. emits: basicDateTableEmits,
  31557. setup(__props, { expose: __expose, emit: __emit }) {
  31558. const props = __props;
  31559. const { WEEKS, rows, tbodyRef, currentCellRef, focus, isCurrent, isWeekActive, isSelectedCell, handlePickDate, handleMouseUp, handleMouseDown, handleMouseMove, handleFocus } = useBasicDateTable(props, __emit);
  31560. const { tableLabel, tableKls, getCellClasses, getRowKls, weekHeaderClass, t } = useBasicDateTableDOM(props, {
  31561. isCurrent,
  31562. isWeekActive
  31563. });
  31564. let isUnmounting = false;
  31565. onBeforeUnmount(() => {
  31566. isUnmounting = true;
  31567. });
  31568. __expose({
  31569. /**
  31570. * @description focus on current cell
  31571. */
  31572. focus });
  31573. return (_ctx, _cache) => {
  31574. return openBlock(), createElementBlock("table", {
  31575. "aria-label": unref(tableLabel),
  31576. class: normalizeClass(unref(tableKls)),
  31577. cellspacing: "0",
  31578. cellpadding: "0",
  31579. role: "grid",
  31580. onClick: _cache[1] || (_cache[1] = (...args) => unref(handlePickDate) && unref(handlePickDate)(...args)),
  31581. onMousemove: _cache[2] || (_cache[2] = (...args) => unref(handleMouseMove) && unref(handleMouseMove)(...args)),
  31582. onMousedown: _cache[3] || (_cache[3] = (...args) => unref(handleMouseDown) && unref(handleMouseDown)(...args)),
  31583. onMouseup: _cache[4] || (_cache[4] = (...args) => unref(handleMouseUp) && unref(handleMouseUp)(...args))
  31584. }, [createBaseVNode("tbody", {
  31585. ref_key: "tbodyRef",
  31586. ref: tbodyRef
  31587. }, [createBaseVNode("tr", null, [_ctx.showWeekNumber ? (openBlock(), createElementBlock("th", {
  31588. key: 0,
  31589. scope: "col",
  31590. class: normalizeClass(unref(weekHeaderClass))
  31591. }, null, 2)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEKS), (week, key) => {
  31592. return openBlock(), createElementBlock("th", {
  31593. key,
  31594. "aria-label": unref(t)("el.datepicker.weeksFull." + week),
  31595. scope: "col"
  31596. }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_2$33);
  31597. }), 128))]), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, rowKey) => {
  31598. return openBlock(), createElementBlock("tr", {
  31599. key: rowKey,
  31600. class: normalizeClass(unref(getRowKls)(_ctx.showWeekNumber ? row[2] : row[1]))
  31601. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, columnKey) => {
  31602. return openBlock(), createElementBlock("td", {
  31603. key: `${rowKey}.${columnKey}`,
  31604. ref_for: true,
  31605. ref: (el) => !unref(isUnmounting) && unref(isSelectedCell)(cell) && (currentCellRef.value = el),
  31606. class: normalizeClass(unref(getCellClasses)(cell)),
  31607. "aria-current": cell.isCurrent ? "date" : void 0,
  31608. "aria-selected": cell.isCurrent,
  31609. tabindex: _ctx.disabled ? void 0 : unref(isSelectedCell)(cell) ? 0 : -1,
  31610. "aria-disabled": _ctx.disabled,
  31611. onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args))
  31612. }, [createVNode(unref(basic_cell_render_default), { cell }, null, 8, ["cell"])], 42, _hoisted_3$15);
  31613. }), 128))], 2);
  31614. }), 128))], 512)], 42, _hoisted_1$51);
  31615. };
  31616. }
  31617. });
  31618. //#endregion
  31619. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-month-table.mjs
  31620. var basicMonthTableProps = buildProps({
  31621. ...datePickerSharedProps,
  31622. selectionMode: selectionModeWithDefault("month")
  31623. });
  31624. //#endregion
  31625. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.vue_vue_type_script_setup_true_lang.mjs
  31626. var _hoisted_1$50 = ["aria-label"];
  31627. var _hoisted_2$32 = [
  31628. "aria-selected",
  31629. "aria-label",
  31630. "tabindex",
  31631. "onKeydown"
  31632. ];
  31633. //#endregion
  31634. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.mjs
  31635. var basic_month_table_default = /* @__PURE__ */ defineComponent({
  31636. __name: "basic-month-table",
  31637. props: basicMonthTableProps,
  31638. emits: [
  31639. "changerange",
  31640. "pick",
  31641. "select"
  31642. ],
  31643. setup(__props, { expose: __expose, emit: __emit }) {
  31644. const props = __props;
  31645. const emit = __emit;
  31646. const ns = useNamespace("month-table");
  31647. const { t, lang } = useLocale();
  31648. const tbodyRef = ref();
  31649. const currentCellRef = ref();
  31650. const months = ref(props.date.locale("en").localeData().monthsShort().map((_) => _.toLowerCase()));
  31651. const tableRows = ref([
  31652. [],
  31653. [],
  31654. []
  31655. ]);
  31656. const lastRow = ref();
  31657. const lastColumn = ref();
  31658. const rows = computed(() => {
  31659. const rows = tableRows.value;
  31660. const now = (0, import_dayjs_min.default)().locale(lang.value).startOf("month");
  31661. for (let i = 0; i < 3; i++) {
  31662. const row = rows[i];
  31663. for (let j = 0; j < 4; j++) {
  31664. const cell = row[j] ||= {
  31665. row: i,
  31666. column: j,
  31667. type: "normal",
  31668. inRange: false,
  31669. start: false,
  31670. end: false,
  31671. text: -1,
  31672. disabled: false,
  31673. isSelected: false,
  31674. customClass: void 0,
  31675. date: void 0,
  31676. dayjs: void 0,
  31677. isCurrent: void 0,
  31678. selected: void 0,
  31679. renderText: void 0,
  31680. timestamp: void 0
  31681. };
  31682. cell.type = "normal";
  31683. const index = i * 4 + j;
  31684. const calTime = props.date.startOf("year").month(index);
  31685. const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
  31686. cell.inRange = !!(props.minDate && calTime.isSameOrAfter(props.minDate, "month") && calEndDate && calTime.isSameOrBefore(calEndDate, "month")) || !!(props.minDate && calTime.isSameOrBefore(props.minDate, "month") && calEndDate && calTime.isSameOrAfter(calEndDate, "month"));
  31687. if (props.minDate?.isSameOrAfter(calEndDate)) {
  31688. cell.start = !!(calEndDate && calTime.isSame(calEndDate, "month"));
  31689. cell.end = props.minDate && calTime.isSame(props.minDate, "month");
  31690. } else {
  31691. cell.start = !!(props.minDate && calTime.isSame(props.minDate, "month"));
  31692. cell.end = !!(calEndDate && calTime.isSame(calEndDate, "month"));
  31693. }
  31694. if (now.isSame(calTime)) cell.type = "today";
  31695. const cellDate = calTime.toDate();
  31696. cell.text = index;
  31697. cell.disabled = props.disabledDate?.(cellDate) || false;
  31698. cell.date = cellDate;
  31699. cell.customClass = props.cellClassName?.(cellDate);
  31700. cell.dayjs = calTime;
  31701. cell.timestamp = calTime.valueOf();
  31702. cell.isSelected = isSelectedCell(cell);
  31703. }
  31704. }
  31705. return rows;
  31706. });
  31707. const focus = () => {
  31708. currentCellRef.value?.focus();
  31709. };
  31710. const getCellStyle = (cell) => {
  31711. const style = {};
  31712. const year = props.date.year();
  31713. const today = /* @__PURE__ */ new Date();
  31714. const month = cell.text;
  31715. style.disabled = props.disabled || (props.disabledDate ? datesInMonth(props.date, year, month, lang.value).every(props.disabledDate) : false);
  31716. style.current = castArray(props.parsedValue).some((date) => import_dayjs_min.default.isDayjs(date) && date.year() === year && date.month() === month);
  31717. style.today = today.getFullYear() === year && today.getMonth() === month;
  31718. if (cell.customClass) style[cell.customClass] = true;
  31719. if (cell.inRange) {
  31720. style["in-range"] = true;
  31721. if (cell.start) style["start-date"] = true;
  31722. if (cell.end) style["end-date"] = true;
  31723. }
  31724. return style;
  31725. };
  31726. const isSelectedCell = (cell) => {
  31727. const year = props.date.year();
  31728. const month = cell.text;
  31729. return castArray(props.date).some((date) => date.year() === year && date.month() === month);
  31730. };
  31731. const handleMouseMove = (event) => {
  31732. if (!props.rangeState.selecting) return;
  31733. let target = event.target;
  31734. if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
  31735. if (target.tagName === "DIV") target = target.parentNode;
  31736. if (target.tagName !== "TD") return;
  31737. const row = target.parentNode.rowIndex;
  31738. const column = target.cellIndex;
  31739. if (rows.value[row][column].disabled) return;
  31740. if (row !== lastRow.value || column !== lastColumn.value) {
  31741. lastRow.value = row;
  31742. lastColumn.value = column;
  31743. emit("changerange", {
  31744. selecting: true,
  31745. endDate: props.date.startOf("year").month(row * 4 + column)
  31746. });
  31747. }
  31748. };
  31749. const handleMonthTableClick = (event) => {
  31750. if (props.disabled) return;
  31751. const target = event.target?.closest("td");
  31752. if (target?.tagName !== "TD") return;
  31753. if (hasClass(target, "disabled")) return;
  31754. const column = target.cellIndex;
  31755. const month = target.parentNode.rowIndex * 4 + column;
  31756. const newDate = props.date.startOf("year").month(month);
  31757. if (props.selectionMode === "months") {
  31758. if (event.type === "keydown") {
  31759. emit("pick", castArray(props.parsedValue), false);
  31760. return;
  31761. }
  31762. const newMonth = getValidDateOfMonth(props.date, props.date.year(), month, lang.value, props.disabledDate);
  31763. emit("pick", hasClass(target, "current") ? castArray(props.parsedValue).filter((d) => d?.year() !== newMonth.year() || d?.month() !== newMonth.month()) : castArray(props.parsedValue).concat([(0, import_dayjs_min.default)(newMonth)]));
  31764. } else if (props.selectionMode === "range") if (!props.rangeState.selecting) {
  31765. emit("pick", {
  31766. minDate: newDate,
  31767. maxDate: null
  31768. });
  31769. emit("select", true);
  31770. } else {
  31771. if (props.minDate && newDate >= props.minDate) emit("pick", {
  31772. minDate: props.minDate,
  31773. maxDate: newDate
  31774. });
  31775. else emit("pick", {
  31776. minDate: newDate,
  31777. maxDate: props.minDate
  31778. });
  31779. emit("select", false);
  31780. }
  31781. else emit("pick", month);
  31782. };
  31783. watch(() => props.date, async () => {
  31784. if (tbodyRef.value?.contains(document.activeElement)) {
  31785. await nextTick();
  31786. currentCellRef.value?.focus();
  31787. }
  31788. });
  31789. __expose({
  31790. /**
  31791. * @description focus current cell
  31792. */
  31793. focus });
  31794. return (_ctx, _cache) => {
  31795. return openBlock(), createElementBlock("table", {
  31796. role: "grid",
  31797. "aria-label": unref(t)("el.datepicker.monthTablePrompt"),
  31798. class: normalizeClass(unref(ns).b()),
  31799. onClick: handleMonthTableClick,
  31800. onMousemove: handleMouseMove
  31801. }, [createBaseVNode("tbody", {
  31802. ref_key: "tbodyRef",
  31803. ref: tbodyRef
  31804. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, key) => {
  31805. return openBlock(), createElementBlock("tr", { key }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key_) => {
  31806. return openBlock(), createElementBlock("td", {
  31807. key: key_,
  31808. ref_for: true,
  31809. ref: (el) => cell.isSelected && (currentCellRef.value = el),
  31810. class: normalizeClass(getCellStyle(cell)),
  31811. "aria-selected": !!cell.isSelected,
  31812. "aria-label": unref(t)(`el.datepicker.month${+cell.text + 1}`),
  31813. tabindex: cell.isSelected ? 0 : -1,
  31814. onKeydown: [withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["space"]), withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["enter"])]
  31815. }, [createVNode(unref(basic_cell_render_default), { cell: {
  31816. ...cell,
  31817. renderText: unref(t)("el.datepicker.months." + months.value[cell.text])
  31818. } }, null, 8, ["cell"])], 42, _hoisted_2$32);
  31819. }), 128))]);
  31820. }), 128))], 512)], 42, _hoisted_1$50);
  31821. };
  31822. }
  31823. });
  31824. //#endregion
  31825. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-year-table.mjs
  31826. var basicYearTableProps = buildProps({
  31827. ...datePickerSharedProps,
  31828. selectionMode: selectionModeWithDefault("year")
  31829. });
  31830. //#endregion
  31831. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.vue_vue_type_script_setup_true_lang.mjs
  31832. var _hoisted_1$49 = ["aria-label"];
  31833. var _hoisted_2$31 = [
  31834. "aria-selected",
  31835. "aria-label",
  31836. "tabindex",
  31837. "onKeydown"
  31838. ];
  31839. //#endregion
  31840. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.mjs
  31841. var basic_year_table_default = /* @__PURE__ */ defineComponent({
  31842. __name: "basic-year-table",
  31843. props: basicYearTableProps,
  31844. emits: [
  31845. "changerange",
  31846. "pick",
  31847. "select"
  31848. ],
  31849. setup(__props, { expose: __expose, emit: __emit }) {
  31850. const datesInYear = (year, lang) => {
  31851. const firstDay = (0, import_dayjs_min.default)(String(year)).locale(lang).startOf("year");
  31852. return rangeArr(firstDay.endOf("year").dayOfYear()).map((n) => firstDay.add(n, "day").toDate());
  31853. };
  31854. const props = __props;
  31855. const emit = __emit;
  31856. const ns = useNamespace("year-table");
  31857. const { t, lang } = useLocale();
  31858. const tbodyRef = ref();
  31859. const currentCellRef = ref();
  31860. const startYear = computed(() => {
  31861. return Math.floor(props.date.year() / 10) * 10;
  31862. });
  31863. const tableRows = ref([
  31864. [],
  31865. [],
  31866. []
  31867. ]);
  31868. const lastRow = ref();
  31869. const lastColumn = ref();
  31870. const rows = computed(() => {
  31871. const rows = tableRows.value;
  31872. const now = (0, import_dayjs_min.default)().locale(lang.value).startOf("year");
  31873. for (let i = 0; i < 3; i++) {
  31874. const row = rows[i];
  31875. for (let j = 0; j < 4; j++) {
  31876. if (i * 4 + j >= 10) break;
  31877. let cell = row[j];
  31878. if (!cell) cell = {
  31879. row: i,
  31880. column: j,
  31881. type: "normal",
  31882. inRange: false,
  31883. start: false,
  31884. end: false,
  31885. text: -1,
  31886. disabled: false,
  31887. isSelected: false,
  31888. customClass: void 0,
  31889. date: void 0,
  31890. dayjs: void 0,
  31891. isCurrent: void 0,
  31892. selected: void 0,
  31893. renderText: void 0,
  31894. timestamp: void 0
  31895. };
  31896. cell.type = "normal";
  31897. const index = i * 4 + j + startYear.value;
  31898. const calTime = (0, import_dayjs_min.default)().year(index);
  31899. const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
  31900. cell.inRange = !!(props.minDate && calTime.isSameOrAfter(props.minDate, "year") && calEndDate && calTime.isSameOrBefore(calEndDate, "year")) || !!(props.minDate && calTime.isSameOrBefore(props.minDate, "year") && calEndDate && calTime.isSameOrAfter(calEndDate, "year"));
  31901. if (props.minDate?.isSameOrAfter(calEndDate)) {
  31902. cell.start = !!(calEndDate && calTime.isSame(calEndDate, "year"));
  31903. cell.end = !!(props.minDate && calTime.isSame(props.minDate, "year"));
  31904. } else {
  31905. cell.start = !!(props.minDate && calTime.isSame(props.minDate, "year"));
  31906. cell.end = !!(calEndDate && calTime.isSame(calEndDate, "year"));
  31907. }
  31908. if (now.isSame(calTime)) cell.type = "today";
  31909. cell.text = index;
  31910. const cellDate = calTime.toDate();
  31911. cell.disabled = props.disabledDate?.(cellDate) || false;
  31912. cell.date = cellDate;
  31913. cell.customClass = props.cellClassName?.(cellDate);
  31914. cell.dayjs = calTime;
  31915. cell.timestamp = calTime.valueOf();
  31916. cell.isSelected = isSelectedCell(cell);
  31917. row[j] = cell;
  31918. }
  31919. }
  31920. return rows;
  31921. });
  31922. const focus = () => {
  31923. currentCellRef.value?.focus();
  31924. };
  31925. const getCellKls = (cell) => {
  31926. const kls = {};
  31927. const today = (0, import_dayjs_min.default)().locale(lang.value);
  31928. const year = cell.text;
  31929. kls.disabled = props.disabled || (props.disabledDate ? datesInYear(year, lang.value).every(props.disabledDate) : false);
  31930. kls.today = today.year() === year;
  31931. kls.current = castArray(props.parsedValue).some((d) => d.year() === year);
  31932. if (cell.customClass) kls[cell.customClass] = true;
  31933. if (cell.inRange) {
  31934. kls["in-range"] = true;
  31935. if (cell.start) kls["start-date"] = true;
  31936. if (cell.end) kls["end-date"] = true;
  31937. }
  31938. return kls;
  31939. };
  31940. const isSelectedCell = (cell) => {
  31941. const year = cell.text;
  31942. return castArray(props.date).some((date) => date.year() === year);
  31943. };
  31944. const handleYearTableClick = (event) => {
  31945. if (props.disabled) return;
  31946. const target = event.target?.closest("td");
  31947. if (!target || !target.textContent || hasClass(target, "disabled")) return;
  31948. const column = target.cellIndex;
  31949. const selectedYear = target.parentNode.rowIndex * 4 + column + startYear.value;
  31950. const newDate = (0, import_dayjs_min.default)().year(selectedYear);
  31951. if (props.selectionMode === "range") if (!props.rangeState.selecting) {
  31952. emit("pick", {
  31953. minDate: newDate,
  31954. maxDate: null
  31955. });
  31956. emit("select", true);
  31957. } else {
  31958. if (props.minDate && newDate >= props.minDate) emit("pick", {
  31959. minDate: props.minDate,
  31960. maxDate: newDate
  31961. });
  31962. else emit("pick", {
  31963. minDate: newDate,
  31964. maxDate: props.minDate
  31965. });
  31966. emit("select", false);
  31967. }
  31968. else if (props.selectionMode === "years") {
  31969. if (event.type === "keydown") {
  31970. emit("pick", castArray(props.parsedValue), false);
  31971. return;
  31972. }
  31973. const vaildYear = getValidDateOfYear(newDate.startOf("year"), lang.value, props.disabledDate);
  31974. emit("pick", hasClass(target, "current") ? castArray(props.parsedValue).filter((d) => d?.year() !== selectedYear) : castArray(props.parsedValue).concat([vaildYear]));
  31975. } else emit("pick", selectedYear);
  31976. };
  31977. const handleMouseMove = (event) => {
  31978. if (!props.rangeState.selecting) return;
  31979. const target = event.target?.closest("td");
  31980. if (!target) return;
  31981. const row = target.parentNode.rowIndex;
  31982. const column = target.cellIndex;
  31983. if (rows.value[row][column].disabled) return;
  31984. if (row !== lastRow.value || column !== lastColumn.value) {
  31985. lastRow.value = row;
  31986. lastColumn.value = column;
  31987. emit("changerange", {
  31988. selecting: true,
  31989. endDate: (0, import_dayjs_min.default)().year(startYear.value).add(row * 4 + column, "year")
  31990. });
  31991. }
  31992. };
  31993. watch(() => props.date, async () => {
  31994. if (tbodyRef.value?.contains(document.activeElement)) {
  31995. await nextTick();
  31996. currentCellRef.value?.focus();
  31997. }
  31998. });
  31999. __expose({
  32000. /**
  32001. * @description focus on the current cell
  32002. */
  32003. focus });
  32004. return (_ctx, _cache) => {
  32005. return openBlock(), createElementBlock("table", {
  32006. role: "grid",
  32007. "aria-label": unref(t)("el.datepicker.yearTablePrompt"),
  32008. class: normalizeClass(unref(ns).b()),
  32009. onClick: handleYearTableClick,
  32010. onMousemove: handleMouseMove
  32011. }, [createBaseVNode("tbody", {
  32012. ref_key: "tbodyRef",
  32013. ref: tbodyRef
  32014. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, rowKey) => {
  32015. return openBlock(), createElementBlock("tr", { key: rowKey }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, cellKey) => {
  32016. return openBlock(), createElementBlock("td", {
  32017. key: `${rowKey}_${cellKey}`,
  32018. ref_for: true,
  32019. ref: (el) => cell.isSelected && (currentCellRef.value = el),
  32020. class: normalizeClass(["available", getCellKls(cell)]),
  32021. "aria-selected": cell.isSelected,
  32022. "aria-label": String(cell.text),
  32023. tabindex: cell.isSelected ? 0 : -1,
  32024. onKeydown: [withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["space"]), withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["enter"])]
  32025. }, [createVNode(unref(basic_cell_render_default), { cell }, null, 8, ["cell"])], 42, _hoisted_2$31);
  32026. }), 128))]);
  32027. }), 128))], 512)], 42, _hoisted_1$49);
  32028. };
  32029. }
  32030. });
  32031. //#endregion
  32032. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs
  32033. var _hoisted_1$48 = ["disabled", "onClick"];
  32034. var _hoisted_2$30 = ["aria-label", "disabled"];
  32035. var _hoisted_3$14 = ["aria-label", "disabled"];
  32036. var _hoisted_4$11 = ["tabindex", "aria-disabled"];
  32037. var _hoisted_5$8 = ["tabindex", "aria-disabled"];
  32038. var _hoisted_6$3 = ["aria-label", "disabled"];
  32039. var _hoisted_7$2 = ["aria-label", "disabled"];
  32040. //#endregion
  32041. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs
  32042. var panel_date_pick_default = /* @__PURE__ */ defineComponent({
  32043. __name: "panel-date-pick",
  32044. props: panelDatePickProps,
  32045. emits: [
  32046. "pick",
  32047. "set-picker-option",
  32048. "panel-change"
  32049. ],
  32050. setup(__props, { emit: __emit }) {
  32051. const timeWithinRange = (_, __, ___) => true;
  32052. const props = __props;
  32053. const contextEmit = __emit;
  32054. const ppNs = useNamespace("picker-panel");
  32055. const dpNs = useNamespace("date-picker");
  32056. const attrs = useAttrs$1();
  32057. const slots = useSlots();
  32058. const { t, lang } = useLocale();
  32059. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  32060. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  32061. const { shortcuts, disabledDate, cellClassName, defaultTime } = pickerBase.props;
  32062. const defaultValue = toRef(pickerBase.props, "defaultValue");
  32063. const currentViewRef = ref();
  32064. const innerDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  32065. const isChangeToNow = ref(false);
  32066. let isShortcut = false;
  32067. const defaultTimeD = computed(() => {
  32068. return (0, import_dayjs_min.default)(defaultTime).locale(lang.value);
  32069. });
  32070. const month = computed(() => {
  32071. return innerDate.value.month();
  32072. });
  32073. const year = computed(() => {
  32074. return innerDate.value.year();
  32075. });
  32076. const selectableRange = ref([]);
  32077. const userInputDate = ref(null);
  32078. const userInputTime = ref(null);
  32079. const checkDateWithinRange = (date) => {
  32080. return selectableRange.value.length > 0 ? timeWithinRange(date, selectableRange.value, props.format || "HH:mm:ss") : true;
  32081. };
  32082. const formatEmit = (emitDayjs) => {
  32083. if (defaultTime && !visibleTime.value && !isChangeToNow.value && !isShortcut) return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
  32084. if (showTime.value) return emitDayjs.millisecond(0);
  32085. return emitDayjs.startOf("day");
  32086. };
  32087. const emit = (value, ...args) => {
  32088. if (!value) contextEmit("pick", value, ...args);
  32089. else if (isArray$1(value)) contextEmit("pick", value.map(formatEmit), ...args);
  32090. else contextEmit("pick", formatEmit(value), ...args);
  32091. userInputDate.value = null;
  32092. userInputTime.value = null;
  32093. isChangeToNow.value = false;
  32094. isShortcut = false;
  32095. };
  32096. const handleDatePick = async (value, keepOpen) => {
  32097. if (selectionMode.value === "date" && import_dayjs_min.default.isDayjs(value)) {
  32098. const parsedDateValue = extractFirst(props.parsedValue);
  32099. let newDate = parsedDateValue ? parsedDateValue.year(value.year()).month(value.month()).date(value.date()) : value;
  32100. if (!checkDateWithinRange(newDate)) newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());
  32101. innerDate.value = newDate;
  32102. emit(newDate, showTime.value || keepOpen);
  32103. } else if (selectionMode.value === "week") emit(value.date);
  32104. else if (selectionMode.value === "dates") emit(value, true);
  32105. };
  32106. const moveByMonth = (forward) => {
  32107. const action = forward ? "add" : "subtract";
  32108. innerDate.value = innerDate.value[action](1, "month");
  32109. handlePanelChange("month");
  32110. };
  32111. const moveByYear = (forward) => {
  32112. const currentDate = innerDate.value;
  32113. const action = forward ? "add" : "subtract";
  32114. innerDate.value = currentView.value === "year" ? currentDate[action](10, "year") : currentDate[action](1, "year");
  32115. handlePanelChange("year");
  32116. };
  32117. const currentView = ref("date");
  32118. const yearLabel = computed(() => {
  32119. const yearTranslation = t("el.datepicker.year");
  32120. if (currentView.value === "year") {
  32121. const startYear = Math.floor(year.value / 10) * 10;
  32122. if (yearTranslation) return `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}`;
  32123. return `${startYear} - ${startYear + 9}`;
  32124. }
  32125. return `${year.value} ${yearTranslation}`;
  32126. });
  32127. const handleShortcutClick = (shortcut) => {
  32128. const shortcutValue = isFunction$1(shortcut.value) ? shortcut.value() : shortcut.value;
  32129. if (shortcutValue) {
  32130. isShortcut = true;
  32131. emit((0, import_dayjs_min.default)(shortcutValue).locale(lang.value));
  32132. return;
  32133. }
  32134. if (shortcut.onClick) shortcut.onClick({
  32135. attrs,
  32136. slots,
  32137. emit: contextEmit
  32138. });
  32139. };
  32140. const selectionMode = computed(() => {
  32141. const { type } = props;
  32142. if ([
  32143. "week",
  32144. "month",
  32145. "months",
  32146. "year",
  32147. "years",
  32148. "dates"
  32149. ].includes(type)) return type;
  32150. return "date";
  32151. });
  32152. const isMultipleType = computed(() => {
  32153. return selectionMode.value === "dates" || selectionMode.value === "months" || selectionMode.value === "years";
  32154. });
  32155. const keyboardMode = computed(() => {
  32156. return selectionMode.value === "date" ? currentView.value : selectionMode.value;
  32157. });
  32158. const hasShortcuts = computed(() => !!shortcuts.length);
  32159. const handleMonthPick = async (month, keepOpen) => {
  32160. if (selectionMode.value === "month") {
  32161. innerDate.value = getValidDateOfMonth(innerDate.value, innerDate.value.year(), month, lang.value, disabledDate);
  32162. emit(innerDate.value, false);
  32163. } else if (selectionMode.value === "months") emit(month, keepOpen ?? true);
  32164. else {
  32165. innerDate.value = getValidDateOfMonth(innerDate.value, innerDate.value.year(), month, lang.value, disabledDate);
  32166. currentView.value = "date";
  32167. if ([
  32168. "month",
  32169. "year",
  32170. "date",
  32171. "week"
  32172. ].includes(selectionMode.value)) {
  32173. emit(innerDate.value, true);
  32174. await nextTick();
  32175. handleFocusPicker();
  32176. }
  32177. }
  32178. handlePanelChange("month");
  32179. };
  32180. const handleYearPick = async (year, keepOpen) => {
  32181. if (selectionMode.value === "year") {
  32182. innerDate.value = getValidDateOfYear(innerDate.value.startOf("year").year(year), lang.value, disabledDate);
  32183. emit(innerDate.value, false);
  32184. } else if (selectionMode.value === "years") emit(year, keepOpen ?? true);
  32185. else {
  32186. innerDate.value = getValidDateOfYear(innerDate.value.year(year), lang.value, disabledDate);
  32187. currentView.value = "month";
  32188. if ([
  32189. "month",
  32190. "year",
  32191. "date",
  32192. "week"
  32193. ].includes(selectionMode.value)) {
  32194. emit(innerDate.value, true);
  32195. await nextTick();
  32196. handleFocusPicker();
  32197. }
  32198. }
  32199. handlePanelChange("year");
  32200. };
  32201. const dateDisabled = useFormDisabled();
  32202. const showPicker = async (view) => {
  32203. if (dateDisabled.value) return;
  32204. currentView.value = view;
  32205. await nextTick();
  32206. handleFocusPicker();
  32207. };
  32208. const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
  32209. const footerVisible = computed(() => {
  32210. const showDateFooter = showTime.value || selectionMode.value === "dates";
  32211. const showYearFooter = selectionMode.value === "years";
  32212. const showMonthFooter = selectionMode.value === "months";
  32213. const isDateView = currentView.value === "date";
  32214. const isYearView = currentView.value === "year";
  32215. const isMonthView = currentView.value === "month";
  32216. return showDateFooter && isDateView || showYearFooter && isYearView || showMonthFooter && isMonthView;
  32217. });
  32218. const footerFilled = computed(() => !isMultipleType.value && props.showNow || props.showConfirm);
  32219. const disabledConfirm = computed(() => {
  32220. if (!disabledDate) return false;
  32221. if (!props.parsedValue) return true;
  32222. if (isArray$1(props.parsedValue)) return disabledDate(props.parsedValue[0].toDate());
  32223. return disabledDate(props.parsedValue.toDate());
  32224. });
  32225. const onConfirm = () => {
  32226. if (isMultipleType.value) emit(props.parsedValue);
  32227. else {
  32228. let result = extractFirst(props.parsedValue);
  32229. if (!result) {
  32230. const defaultTimeD = (0, import_dayjs_min.default)(defaultTime).locale(lang.value);
  32231. const defaultValueD = getDefaultValue();
  32232. result = defaultTimeD.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date());
  32233. }
  32234. innerDate.value = result;
  32235. emit(result);
  32236. }
  32237. };
  32238. const disabledNow = computed(() => {
  32239. if (!disabledDate) return false;
  32240. return disabledDate((0, import_dayjs_min.default)().locale(lang.value).toDate());
  32241. });
  32242. const changeToNow = () => {
  32243. const nowDate = (0, import_dayjs_min.default)().locale(lang.value).toDate();
  32244. isChangeToNow.value = true;
  32245. if ((!disabledDate || !disabledDate(nowDate)) && checkDateWithinRange(nowDate)) {
  32246. innerDate.value = (0, import_dayjs_min.default)().locale(lang.value);
  32247. emit(innerDate.value);
  32248. }
  32249. };
  32250. const timeFormat = computed(() => {
  32251. return props.timeFormat || extractTimeFormat(props.format) || "HH:mm:ss";
  32252. });
  32253. const dateFormat = computed(() => {
  32254. return props.dateFormat || extractDateFormat(props.format) || "YYYY-MM-DD";
  32255. });
  32256. const visibleTime = computed(() => {
  32257. if (userInputTime.value) return userInputTime.value;
  32258. if (!props.parsedValue && !defaultValue.value) return;
  32259. return (extractFirst(props.parsedValue) || innerDate.value).format(timeFormat.value);
  32260. });
  32261. const visibleDate = computed(() => {
  32262. if (userInputDate.value) return userInputDate.value;
  32263. if (!props.parsedValue && !defaultValue.value) return;
  32264. return (extractFirst(props.parsedValue) || innerDate.value).format(dateFormat.value);
  32265. });
  32266. const timePickerVisible = ref(false);
  32267. const onTimePickerInputFocus = () => {
  32268. timePickerVisible.value = true;
  32269. };
  32270. const handleTimePickClose = () => {
  32271. timePickerVisible.value = false;
  32272. };
  32273. const getUnits = (date) => {
  32274. return {
  32275. hour: date.hour(),
  32276. minute: date.minute(),
  32277. second: date.second(),
  32278. year: date.year(),
  32279. month: date.month(),
  32280. date: date.date()
  32281. };
  32282. };
  32283. const handleTimePick = (value, visible, first) => {
  32284. const { hour, minute, second } = getUnits(value);
  32285. const parsedDateValue = extractFirst(props.parsedValue);
  32286. innerDate.value = parsedDateValue ? parsedDateValue.hour(hour).minute(minute).second(second) : value;
  32287. emit(innerDate.value, true);
  32288. if (!first) timePickerVisible.value = visible;
  32289. };
  32290. const handleVisibleTimeChange = (value) => {
  32291. const newDate = (0, import_dayjs_min.default)(value, timeFormat.value).locale(lang.value);
  32292. if (newDate.isValid() && checkDateWithinRange(newDate)) {
  32293. const { year, month, date } = getUnits(innerDate.value);
  32294. innerDate.value = newDate.year(year).month(month).date(date);
  32295. userInputTime.value = null;
  32296. timePickerVisible.value = false;
  32297. emit(innerDate.value, true);
  32298. }
  32299. };
  32300. const handleVisibleDateChange = (value) => {
  32301. const newDate = correctlyParseUserInput(value, dateFormat.value, lang.value, isDefaultFormat);
  32302. if (newDate.isValid()) {
  32303. if (disabledDate && disabledDate(newDate.toDate())) return;
  32304. const { hour, minute, second } = getUnits(innerDate.value);
  32305. innerDate.value = newDate.hour(hour).minute(minute).second(second);
  32306. userInputDate.value = null;
  32307. emit(innerDate.value, true);
  32308. }
  32309. };
  32310. const isValidValue = (date) => {
  32311. return import_dayjs_min.default.isDayjs(date) && date.isValid() && (disabledDate ? !disabledDate(date.toDate()) : true);
  32312. };
  32313. const parseUserInput = (value) => {
  32314. return correctlyParseUserInput(value, props.format, lang.value, isDefaultFormat);
  32315. };
  32316. const getDefaultValue = () => {
  32317. const parseDate = (0, import_dayjs_min.default)(defaultValue.value).locale(lang.value);
  32318. if (!defaultValue.value) {
  32319. const defaultTimeDValue = defaultTimeD.value;
  32320. return (0, import_dayjs_min.default)().hour(defaultTimeDValue.hour()).minute(defaultTimeDValue.minute()).second(defaultTimeDValue.second()).locale(lang.value);
  32321. }
  32322. return parseDate;
  32323. };
  32324. const handleFocusPicker = () => {
  32325. if ([
  32326. "week",
  32327. "month",
  32328. "year",
  32329. "date"
  32330. ].includes(selectionMode.value)) currentViewRef.value?.focus();
  32331. };
  32332. const _handleFocusPicker = () => {
  32333. handleFocusPicker();
  32334. if (selectionMode.value === "week") handleKeyControl(EVENT_CODE.down);
  32335. };
  32336. const handleKeydownTable = (event) => {
  32337. const code = getEventCode(event);
  32338. if ([
  32339. EVENT_CODE.up,
  32340. EVENT_CODE.down,
  32341. EVENT_CODE.left,
  32342. EVENT_CODE.right,
  32343. EVENT_CODE.home,
  32344. EVENT_CODE.end,
  32345. EVENT_CODE.pageUp,
  32346. EVENT_CODE.pageDown
  32347. ].includes(code)) {
  32348. handleKeyControl(code);
  32349. event.stopPropagation();
  32350. event.preventDefault();
  32351. }
  32352. if ([
  32353. EVENT_CODE.enter,
  32354. EVENT_CODE.space,
  32355. EVENT_CODE.numpadEnter
  32356. ].includes(code) && userInputDate.value === null && userInputTime.value === null) {
  32357. event.preventDefault();
  32358. emit(innerDate.value, false);
  32359. }
  32360. };
  32361. const handleKeyControl = (code) => {
  32362. const { up, down, left, right, home, end, pageUp, pageDown } = EVENT_CODE;
  32363. const mapping = {
  32364. year: {
  32365. [up]: -4,
  32366. [down]: 4,
  32367. [left]: -1,
  32368. [right]: 1,
  32369. offset: (date, step) => date.setFullYear(date.getFullYear() + step)
  32370. },
  32371. month: {
  32372. [up]: -4,
  32373. [down]: 4,
  32374. [left]: -1,
  32375. [right]: 1,
  32376. offset: (date, step) => date.setMonth(date.getMonth() + step)
  32377. },
  32378. week: {
  32379. [up]: -1,
  32380. [down]: 1,
  32381. [left]: -1,
  32382. [right]: 1,
  32383. offset: (date, step) => date.setDate(date.getDate() + step * 7)
  32384. },
  32385. date: {
  32386. [up]: -7,
  32387. [down]: 7,
  32388. [left]: -1,
  32389. [right]: 1,
  32390. [home]: (date) => -date.getDay(),
  32391. [end]: (date) => -date.getDay() + 6,
  32392. [pageUp]: (date) => -new Date(date.getFullYear(), date.getMonth(), 0).getDate(),
  32393. [pageDown]: (date) => new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(),
  32394. offset: (date, step) => date.setDate(date.getDate() + step)
  32395. }
  32396. };
  32397. const newDate = innerDate.value.toDate();
  32398. while (Math.abs(innerDate.value.diff(newDate, "year", true)) < 1) {
  32399. const map = mapping[keyboardMode.value];
  32400. if (!map) return;
  32401. map.offset(newDate, isFunction$1(map[code]) ? map[code](newDate) : map[code] ?? 0);
  32402. if (disabledDate && disabledDate(newDate)) break;
  32403. const result = (0, import_dayjs_min.default)(newDate).locale(lang.value);
  32404. innerDate.value = result;
  32405. contextEmit("pick", result, true);
  32406. break;
  32407. }
  32408. };
  32409. const handlePanelChange = (mode) => {
  32410. contextEmit("panel-change", innerDate.value.toDate(), mode, currentView.value);
  32411. };
  32412. watch(() => selectionMode.value, (val) => {
  32413. if (["month", "year"].includes(val)) {
  32414. currentView.value = val;
  32415. return;
  32416. } else if (val === "years") {
  32417. currentView.value = "year";
  32418. return;
  32419. } else if (val === "months") {
  32420. currentView.value = "month";
  32421. return;
  32422. }
  32423. currentView.value = "date";
  32424. }, { immediate: true });
  32425. watch(() => defaultValue.value, (val) => {
  32426. if (val) innerDate.value = getDefaultValue();
  32427. }, { immediate: true });
  32428. watch(() => props.parsedValue, (val) => {
  32429. if (val) {
  32430. if (isMultipleType.value) return;
  32431. if (isArray$1(val)) return;
  32432. innerDate.value = val;
  32433. } else innerDate.value = getDefaultValue();
  32434. }, { immediate: true });
  32435. contextEmit("set-picker-option", ["isValidValue", isValidValue]);
  32436. contextEmit("set-picker-option", ["parseUserInput", parseUserInput]);
  32437. contextEmit("set-picker-option", ["handleFocusPicker", _handleFocusPicker]);
  32438. return (_ctx, _cache) => {
  32439. return openBlock(), createElementBlock("div", { class: normalizeClass([
  32440. unref(ppNs).b(),
  32441. unref(dpNs).b(),
  32442. unref(ppNs).is("border", _ctx.border),
  32443. unref(ppNs).is("disabled", unref(dateDisabled)),
  32444. {
  32445. "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value,
  32446. "has-time": showTime.value
  32447. }
  32448. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  32449. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  32450. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  32451. key: 0,
  32452. class: normalizeClass(unref(ppNs).e("sidebar"))
  32453. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  32454. return openBlock(), createElementBlock("button", {
  32455. key,
  32456. type: "button",
  32457. disabled: unref(dateDisabled),
  32458. class: normalizeClass(unref(ppNs).e("shortcut")),
  32459. onClick: ($event) => handleShortcutClick(shortcut)
  32460. }, toDisplayString(shortcut.text), 11, _hoisted_1$48);
  32461. }), 128))], 2)) : createCommentVNode("v-if", true),
  32462. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [
  32463. showTime.value ? (openBlock(), createElementBlock("div", {
  32464. key: 0,
  32465. class: normalizeClass(unref(dpNs).e("time-header"))
  32466. }, [createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("editor-wrap")) }, [createVNode(unref(ElInput), {
  32467. placeholder: unref(t)("el.datepicker.selectDate"),
  32468. "model-value": visibleDate.value,
  32469. size: "small",
  32470. "validate-event": false,
  32471. disabled: unref(dateDisabled),
  32472. readonly: !_ctx.editable,
  32473. onInput: _cache[0] || (_cache[0] = (val) => userInputDate.value = val),
  32474. onChange: handleVisibleDateChange
  32475. }, null, 8, [
  32476. "placeholder",
  32477. "model-value",
  32478. "disabled",
  32479. "readonly"
  32480. ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(dpNs).e("editor-wrap")) }, [createVNode(unref(ElInput), {
  32481. placeholder: unref(t)("el.datepicker.selectTime"),
  32482. "model-value": visibleTime.value,
  32483. size: "small",
  32484. "validate-event": false,
  32485. disabled: unref(dateDisabled),
  32486. readonly: !_ctx.editable,
  32487. onFocus: onTimePickerInputFocus,
  32488. onInput: _cache[1] || (_cache[1] = (val) => userInputTime.value = val),
  32489. onChange: handleVisibleTimeChange
  32490. }, null, 8, [
  32491. "placeholder",
  32492. "model-value",
  32493. "disabled",
  32494. "readonly"
  32495. ]), createVNode(unref(panel_time_pick_default), {
  32496. visible: timePickerVisible.value,
  32497. format: timeFormat.value,
  32498. "parsed-value": innerDate.value,
  32499. onPick: handleTimePick
  32500. }, null, 8, [
  32501. "visible",
  32502. "format",
  32503. "parsed-value"
  32504. ])], 2)), [[unref(ClickOutside), handleTimePickClose]])], 2)) : createCommentVNode("v-if", true),
  32505. withDirectives(createBaseVNode("div", { class: normalizeClass([unref(dpNs).e("header"), (currentView.value === "year" || currentView.value === "month") && unref(dpNs).em("header", "bordered")]) }, [
  32506. createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("prev-btn")) }, [createBaseVNode("button", {
  32507. type: "button",
  32508. "aria-label": unref(t)(`el.datepicker.prevYear`),
  32509. class: normalizeClass(["d-arrow-left", unref(ppNs).e("icon-btn")]),
  32510. disabled: unref(dateDisabled),
  32511. onClick: _cache[2] || (_cache[2] = ($event) => moveByYear(false))
  32512. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  32513. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  32514. _: 1
  32515. })])], 10, _hoisted_2$30), withDirectives(createBaseVNode("button", {
  32516. type: "button",
  32517. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  32518. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
  32519. disabled: unref(dateDisabled),
  32520. onClick: _cache[3] || (_cache[3] = ($event) => moveByMonth(false))
  32521. }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
  32522. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  32523. _: 1
  32524. })])], 10, _hoisted_3$14), [[vShow, currentView.value === "date"]])], 2),
  32525. createBaseVNode("span", {
  32526. role: "button",
  32527. class: normalizeClass(unref(dpNs).e("header-label")),
  32528. "aria-live": "polite",
  32529. tabindex: _ctx.disabled ? void 0 : 0,
  32530. "aria-disabled": _ctx.disabled,
  32531. onKeydown: _cache[4] || (_cache[4] = withKeys(($event) => showPicker("year"), ["enter"])),
  32532. onClick: _cache[5] || (_cache[5] = ($event) => showPicker("year"))
  32533. }, toDisplayString(yearLabel.value), 43, _hoisted_4$11),
  32534. withDirectives(createBaseVNode("span", {
  32535. role: "button",
  32536. "aria-live": "polite",
  32537. tabindex: _ctx.disabled ? void 0 : 0,
  32538. "aria-disabled": _ctx.disabled,
  32539. class: normalizeClass([unref(dpNs).e("header-label"), { active: currentView.value === "month" }]),
  32540. onKeydown: _cache[6] || (_cache[6] = withKeys(($event) => showPicker("month"), ["enter"])),
  32541. onClick: _cache[7] || (_cache[7] = ($event) => showPicker("month"))
  32542. }, toDisplayString(unref(t)(`el.datepicker.month${month.value + 1}`)), 43, _hoisted_5$8), [[vShow, currentView.value === "date"]]),
  32543. createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("next-btn")) }, [withDirectives(createBaseVNode("button", {
  32544. type: "button",
  32545. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  32546. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
  32547. disabled: unref(dateDisabled),
  32548. onClick: _cache[8] || (_cache[8] = ($event) => moveByMonth(true))
  32549. }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
  32550. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  32551. _: 1
  32552. })])], 10, _hoisted_6$3), [[vShow, currentView.value === "date"]]), createBaseVNode("button", {
  32553. type: "button",
  32554. "aria-label": unref(t)(`el.datepicker.nextYear`),
  32555. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  32556. disabled: unref(dateDisabled),
  32557. onClick: _cache[9] || (_cache[9] = ($event) => moveByYear(true))
  32558. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  32559. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  32560. _: 1
  32561. })])], 10, _hoisted_7$2)], 2)
  32562. ], 2), [[vShow, currentView.value !== "time"]]),
  32563. createBaseVNode("div", {
  32564. class: normalizeClass(unref(ppNs).e("content")),
  32565. onKeydown: handleKeydownTable
  32566. }, [
  32567. currentView.value === "date" ? (openBlock(), createBlock(basic_date_table_default, {
  32568. key: 0,
  32569. ref_key: "currentViewRef",
  32570. ref: currentViewRef,
  32571. "selection-mode": selectionMode.value,
  32572. date: innerDate.value,
  32573. "parsed-value": _ctx.parsedValue,
  32574. "disabled-date": unref(disabledDate),
  32575. disabled: unref(dateDisabled),
  32576. "cell-class-name": unref(cellClassName),
  32577. "show-week-number": _ctx.showWeekNumber,
  32578. onPick: handleDatePick
  32579. }, null, 8, [
  32580. "selection-mode",
  32581. "date",
  32582. "parsed-value",
  32583. "disabled-date",
  32584. "disabled",
  32585. "cell-class-name",
  32586. "show-week-number"
  32587. ])) : createCommentVNode("v-if", true),
  32588. currentView.value === "year" ? (openBlock(), createBlock(basic_year_table_default, {
  32589. key: 1,
  32590. ref_key: "currentViewRef",
  32591. ref: currentViewRef,
  32592. "selection-mode": selectionMode.value,
  32593. date: innerDate.value,
  32594. "disabled-date": unref(disabledDate),
  32595. disabled: unref(dateDisabled),
  32596. "parsed-value": _ctx.parsedValue,
  32597. "cell-class-name": unref(cellClassName),
  32598. onPick: handleYearPick
  32599. }, null, 8, [
  32600. "selection-mode",
  32601. "date",
  32602. "disabled-date",
  32603. "disabled",
  32604. "parsed-value",
  32605. "cell-class-name"
  32606. ])) : createCommentVNode("v-if", true),
  32607. currentView.value === "month" ? (openBlock(), createBlock(basic_month_table_default, {
  32608. key: 2,
  32609. ref_key: "currentViewRef",
  32610. ref: currentViewRef,
  32611. "selection-mode": selectionMode.value,
  32612. date: innerDate.value,
  32613. "parsed-value": _ctx.parsedValue,
  32614. "disabled-date": unref(disabledDate),
  32615. disabled: unref(dateDisabled),
  32616. "cell-class-name": unref(cellClassName),
  32617. onPick: handleMonthPick
  32618. }, null, 8, [
  32619. "selection-mode",
  32620. "date",
  32621. "parsed-value",
  32622. "disabled-date",
  32623. "disabled",
  32624. "cell-class-name"
  32625. ])) : createCommentVNode("v-if", true)
  32626. ], 34)
  32627. ], 2)
  32628. ], 2), _ctx.showFooter && footerVisible.value && footerFilled.value ? (openBlock(), createElementBlock("div", {
  32629. key: 0,
  32630. class: normalizeClass(unref(ppNs).e("footer"))
  32631. }, [withDirectives(createVNode(unref(ElButton), {
  32632. text: "",
  32633. size: "small",
  32634. class: normalizeClass(unref(ppNs).e("link-btn")),
  32635. disabled: disabledNow.value,
  32636. onClick: changeToNow
  32637. }, {
  32638. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.now")), 1)]),
  32639. _: 1
  32640. }, 8, ["class", "disabled"]), [[vShow, !isMultipleType.value && _ctx.showNow]]), _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
  32641. key: 0,
  32642. plain: "",
  32643. size: "small",
  32644. class: normalizeClass(unref(ppNs).e("link-btn")),
  32645. disabled: disabledConfirm.value,
  32646. onClick: onConfirm
  32647. }, {
  32648. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)]),
  32649. _: 1
  32650. }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2);
  32651. };
  32652. }
  32653. });
  32654. //#endregion
  32655. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-range.mjs
  32656. var panelDateRangeProps = buildProps({
  32657. ...panelSharedProps,
  32658. ...panelRangeSharedProps
  32659. });
  32660. //#endregion
  32661. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-shortcut.mjs
  32662. var useShortcut = (lang) => {
  32663. const { emit } = getCurrentInstance();
  32664. const attrs = useAttrs$1();
  32665. const slots = useSlots();
  32666. const handleShortcutClick = (shortcut) => {
  32667. const shortcutValues = isFunction$1(shortcut.value) ? shortcut.value() : shortcut.value;
  32668. if (shortcutValues) {
  32669. emit("pick", [(0, import_dayjs_min.default)(shortcutValues[0]).locale(lang.value), (0, import_dayjs_min.default)(shortcutValues[1]).locale(lang.value)]);
  32670. return;
  32671. }
  32672. if (shortcut.onClick) shortcut.onClick({
  32673. attrs,
  32674. slots,
  32675. emit
  32676. });
  32677. };
  32678. return handleShortcutClick;
  32679. };
  32680. //#endregion
  32681. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-range-picker.mjs
  32682. var useRangePicker = (props, { defaultValue, defaultTime, leftDate, rightDate, step, unit, sortDates }) => {
  32683. const { emit } = getCurrentInstance();
  32684. const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY);
  32685. const drpNs = useNamespace("date-range-picker");
  32686. const { t, lang } = useLocale();
  32687. const handleShortcutClick = useShortcut(lang);
  32688. const minDate = ref();
  32689. const maxDate = ref();
  32690. const rangeState = ref({
  32691. endDate: null,
  32692. selecting: false
  32693. });
  32694. const handleChangeRange = (val) => {
  32695. rangeState.value = val;
  32696. };
  32697. const handleRangeConfirm = (visible = false) => {
  32698. const _minDate = unref(minDate);
  32699. const _maxDate = unref(maxDate);
  32700. if (isValidRange([_minDate, _maxDate])) emit("pick", [_minDate, _maxDate], visible);
  32701. };
  32702. const onSelect = (selecting) => {
  32703. rangeState.value.selecting = selecting;
  32704. if (!selecting) rangeState.value.endDate = null;
  32705. };
  32706. const parseValue = (parsedValue) => {
  32707. if (isArray$1(parsedValue) && parsedValue.length === 2) {
  32708. const [start, end] = parsedValue;
  32709. minDate.value = start;
  32710. leftDate.value = start;
  32711. maxDate.value = end;
  32712. sortDates(unref(minDate), unref(maxDate));
  32713. } else restoreDefault();
  32714. };
  32715. const restoreDefault = () => {
  32716. let [start, end] = getDefaultValue(unref(defaultValue), {
  32717. lang: unref(lang),
  32718. step,
  32719. unit,
  32720. unlinkPanels: props.unlinkPanels
  32721. });
  32722. const getShift = (day) => {
  32723. return day.diff(day.startOf("d"), "ms");
  32724. };
  32725. const maybeTimes = unref(defaultTime);
  32726. if (maybeTimes) {
  32727. let leftShift = 0;
  32728. let rightShift = 0;
  32729. if (isArray$1(maybeTimes)) {
  32730. const [timeStart, timeEnd] = maybeTimes.map(import_dayjs_min.default);
  32731. leftShift = getShift(timeStart);
  32732. rightShift = getShift(timeEnd);
  32733. } else {
  32734. const shift = getShift((0, import_dayjs_min.default)(maybeTimes));
  32735. leftShift = shift;
  32736. rightShift = shift;
  32737. }
  32738. start = start.startOf("d").add(leftShift, "ms");
  32739. end = end.startOf("d").add(rightShift, "ms");
  32740. }
  32741. minDate.value = void 0;
  32742. maxDate.value = void 0;
  32743. leftDate.value = start;
  32744. rightDate.value = end;
  32745. };
  32746. watch(defaultValue, (val) => {
  32747. if (val) restoreDefault();
  32748. }, { immediate: true });
  32749. watch(() => props.parsedValue, (parsedValue) => {
  32750. if (!parsedValue?.length || !isEqual$1(parsedValue, [minDate.value, maxDate.value])) parseValue(parsedValue);
  32751. }, { immediate: true });
  32752. watch(() => props.visible, () => {
  32753. if (props.visible) parseValue(props.parsedValue);
  32754. }, { immediate: true });
  32755. return {
  32756. minDate,
  32757. maxDate,
  32758. rangeState,
  32759. lang,
  32760. ppNs: pickerNs,
  32761. drpNs,
  32762. handleChangeRange,
  32763. handleRangeConfirm,
  32764. handleShortcutClick,
  32765. onSelect,
  32766. parseValue,
  32767. t
  32768. };
  32769. };
  32770. //#endregion
  32771. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-panel-date-range.mjs
  32772. var usePanelDateRange = (props, emit, leftDate, rightDate) => {
  32773. const leftCurrentView = ref("date");
  32774. const leftCurrentViewRef = ref();
  32775. const rightCurrentView = ref("date");
  32776. const rightCurrentViewRef = ref();
  32777. const { disabledDate } = inject(PICKER_BASE_INJECTION_KEY).props;
  32778. const { t, lang } = useLocale();
  32779. const leftYear = computed(() => {
  32780. return leftDate.value.year();
  32781. });
  32782. const leftMonth = computed(() => {
  32783. return leftDate.value.month();
  32784. });
  32785. const rightYear = computed(() => {
  32786. return rightDate.value.year();
  32787. });
  32788. const rightMonth = computed(() => {
  32789. return rightDate.value.month();
  32790. });
  32791. function computedYearLabel(currentView, yearValue) {
  32792. const yearTranslation = t("el.datepicker.year");
  32793. if (currentView.value === "year") {
  32794. const startYear = Math.floor(yearValue.value / 10) * 10;
  32795. return yearTranslation ? `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}` : `${startYear} - ${startYear + 9}`;
  32796. }
  32797. return `${yearValue.value} ${yearTranslation}`;
  32798. }
  32799. function focusPicker(currentViewRef) {
  32800. currentViewRef?.focus();
  32801. }
  32802. async function showPicker(pickerType, view) {
  32803. if (props.disabled) return;
  32804. const currentView = pickerType === "left" ? leftCurrentView : rightCurrentView;
  32805. const currentViewRef = pickerType === "left" ? leftCurrentViewRef : rightCurrentViewRef;
  32806. currentView.value = view;
  32807. await nextTick();
  32808. focusPicker(currentViewRef.value);
  32809. }
  32810. async function handlePick(mode, pickerType, value) {
  32811. if (props.disabled) return;
  32812. const isLeftPicker = pickerType === "left";
  32813. const startDate = isLeftPicker ? leftDate : rightDate;
  32814. const endDate = isLeftPicker ? rightDate : leftDate;
  32815. const currentView = isLeftPicker ? leftCurrentView : rightCurrentView;
  32816. const currentViewRef = isLeftPicker ? leftCurrentViewRef : rightCurrentViewRef;
  32817. if (mode === "year") startDate.value = getValidDateOfYear(startDate.value.year(value), lang.value, disabledDate);
  32818. if (mode === "month") startDate.value = getValidDateOfMonth(startDate.value, startDate.value.year(), value, lang.value, disabledDate);
  32819. if (!props.unlinkPanels) endDate.value = pickerType === "left" ? startDate.value.add(1, "month") : startDate.value.subtract(1, "month");
  32820. currentView.value = mode === "year" ? "month" : "date";
  32821. await nextTick();
  32822. focusPicker(currentViewRef.value);
  32823. handlePanelChange(mode);
  32824. }
  32825. function handlePanelChange(mode) {
  32826. emit("panel-change", [leftDate.value.toDate(), rightDate.value.toDate()], mode);
  32827. }
  32828. function adjustDateByView(currentView, date, forward) {
  32829. const action = forward ? "add" : "subtract";
  32830. return currentView === "year" ? date[action](10, "year") : date[action](1, "year");
  32831. }
  32832. return {
  32833. leftCurrentView,
  32834. rightCurrentView,
  32835. leftCurrentViewRef,
  32836. rightCurrentViewRef,
  32837. leftYear,
  32838. rightYear,
  32839. leftMonth,
  32840. rightMonth,
  32841. leftYearLabel: computed(() => computedYearLabel(leftCurrentView, leftYear)),
  32842. rightYearLabel: computed(() => computedYearLabel(rightCurrentView, rightYear)),
  32843. showLeftPicker: (view) => showPicker("left", view),
  32844. showRightPicker: (view) => showPicker("right", view),
  32845. handleLeftYearPick: (year) => handlePick("year", "left", year),
  32846. handleRightYearPick: (year) => handlePick("year", "right", year),
  32847. handleLeftMonthPick: (month) => handlePick("month", "left", month),
  32848. handleRightMonthPick: (month) => handlePick("month", "right", month),
  32849. handlePanelChange,
  32850. adjustDateByView
  32851. };
  32852. };
  32853. //#endregion
  32854. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs
  32855. var _hoisted_1$47 = ["disabled", "onClick"];
  32856. var _hoisted_2$29 = ["aria-label", "disabled"];
  32857. var _hoisted_3$13 = ["aria-label", "disabled"];
  32858. var _hoisted_4$10 = ["disabled", "aria-label"];
  32859. var _hoisted_5$7 = ["disabled", "aria-label"];
  32860. var _hoisted_6$2 = ["tabindex", "aria-disabled"];
  32861. var _hoisted_7$1 = ["tabindex", "aria-disabled"];
  32862. var _hoisted_8$1 = ["disabled", "aria-label"];
  32863. var _hoisted_9$1 = ["disabled", "aria-label"];
  32864. var _hoisted_10$1 = ["aria-label", "disabled"];
  32865. var _hoisted_11$1 = ["disabled", "aria-label"];
  32866. var _hoisted_12$1 = ["tabindex", "aria-disabled"];
  32867. var _hoisted_13$1 = ["tabindex", "aria-disabled"];
  32868. var unit$2 = "month";
  32869. //#endregion
  32870. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs
  32871. var panel_date_range_default = /* @__PURE__ */ defineComponent({
  32872. __name: "panel-date-range",
  32873. props: panelDateRangeProps,
  32874. emits: [
  32875. "pick",
  32876. "set-picker-option",
  32877. "calendar-change",
  32878. "panel-change",
  32879. "clear"
  32880. ],
  32881. setup(__props, { emit: __emit }) {
  32882. const props = __props;
  32883. const emit = __emit;
  32884. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  32885. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  32886. const { disabledDate, cellClassName, defaultTime, clearable } = pickerBase.props;
  32887. const format = toRef(pickerBase.props, "format");
  32888. const shortcuts = toRef(pickerBase.props, "shortcuts");
  32889. const defaultValue = toRef(pickerBase.props, "defaultValue");
  32890. const { lang } = useLocale();
  32891. const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  32892. const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(1, unit$2));
  32893. const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue, t } = useRangePicker(props, {
  32894. defaultValue,
  32895. defaultTime,
  32896. leftDate,
  32897. rightDate,
  32898. unit: unit$2,
  32899. sortDates
  32900. });
  32901. watch(() => props.visible, (visible) => {
  32902. if (!visible && rangeState.value.selecting) {
  32903. parseValue(props.parsedValue);
  32904. onSelect(false);
  32905. }
  32906. });
  32907. const dateUserInput = ref({
  32908. min: null,
  32909. max: null
  32910. });
  32911. const timeUserInput = ref({
  32912. min: null,
  32913. max: null
  32914. });
  32915. const { leftCurrentView, rightCurrentView, leftCurrentViewRef, rightCurrentViewRef, leftYear, rightYear, leftMonth, rightMonth, leftYearLabel, rightYearLabel, showLeftPicker, showRightPicker, handleLeftYearPick, handleRightYearPick, handleLeftMonthPick, handleRightMonthPick, handlePanelChange, adjustDateByView } = usePanelDateRange(props, emit, leftDate, rightDate);
  32916. const hasShortcuts = computed(() => !!shortcuts.value.length);
  32917. const minVisibleDate = computed(() => {
  32918. if (dateUserInput.value.min !== null) return dateUserInput.value.min;
  32919. if (minDate.value) return minDate.value.format(dateFormat.value);
  32920. return "";
  32921. });
  32922. const maxVisibleDate = computed(() => {
  32923. if (dateUserInput.value.max !== null) return dateUserInput.value.max;
  32924. if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(dateFormat.value);
  32925. return "";
  32926. });
  32927. const minVisibleTime = computed(() => {
  32928. if (timeUserInput.value.min !== null) return timeUserInput.value.min;
  32929. if (minDate.value) return minDate.value.format(timeFormat.value);
  32930. return "";
  32931. });
  32932. const maxVisibleTime = computed(() => {
  32933. if (timeUserInput.value.max !== null) return timeUserInput.value.max;
  32934. if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(timeFormat.value);
  32935. return "";
  32936. });
  32937. const timeFormat = computed(() => {
  32938. return props.timeFormat || extractTimeFormat(format.value || "") || "HH:mm:ss";
  32939. });
  32940. const dateFormat = computed(() => {
  32941. return props.dateFormat || extractDateFormat(format.value || "") || "YYYY-MM-DD";
  32942. });
  32943. const isValidValue = (date) => {
  32944. return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true);
  32945. };
  32946. const leftPrevYear = () => {
  32947. leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, false);
  32948. if (!props.unlinkPanels) rightDate.value = leftDate.value.add(1, "month");
  32949. handlePanelChange("year");
  32950. };
  32951. const leftPrevMonth = () => {
  32952. leftDate.value = leftDate.value.subtract(1, "month");
  32953. if (!props.unlinkPanels) rightDate.value = leftDate.value.add(1, "month");
  32954. handlePanelChange("month");
  32955. };
  32956. const rightNextYear = () => {
  32957. if (!props.unlinkPanels) {
  32958. leftDate.value = adjustDateByView(rightCurrentView.value, leftDate.value, true);
  32959. rightDate.value = leftDate.value.add(1, "month");
  32960. } else rightDate.value = adjustDateByView(rightCurrentView.value, rightDate.value, true);
  32961. handlePanelChange("year");
  32962. };
  32963. const rightNextMonth = () => {
  32964. if (!props.unlinkPanels) {
  32965. leftDate.value = leftDate.value.add(1, "month");
  32966. rightDate.value = leftDate.value.add(1, "month");
  32967. } else rightDate.value = rightDate.value.add(1, "month");
  32968. handlePanelChange("month");
  32969. };
  32970. const leftNextYear = () => {
  32971. leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, true);
  32972. handlePanelChange("year");
  32973. };
  32974. const leftNextMonth = () => {
  32975. leftDate.value = leftDate.value.add(1, "month");
  32976. handlePanelChange("month");
  32977. };
  32978. const rightPrevYear = () => {
  32979. rightDate.value = adjustDateByView(rightCurrentView.value, rightDate.value, false);
  32980. handlePanelChange("year");
  32981. };
  32982. const rightPrevMonth = () => {
  32983. rightDate.value = rightDate.value.subtract(1, "month");
  32984. handlePanelChange("month");
  32985. };
  32986. const enableMonthArrow = computed(() => {
  32987. const nextMonth = (leftMonth.value + 1) % 12;
  32988. const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0;
  32989. return props.singlePanel || props.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value);
  32990. });
  32991. const enableYearArrow = computed(() => {
  32992. return props.singlePanel || props.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12;
  32993. });
  32994. const dateRangeDisabled = useFormDisabled();
  32995. const btnDisabled = computed(() => {
  32996. return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidRange([minDate.value, maxDate.value]) && !dateRangeDisabled.value);
  32997. });
  32998. const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
  32999. const formatEmit = (emitDayjs, index) => {
  33000. if (!emitDayjs) return;
  33001. if (defaultTime) return (0, import_dayjs_min.default)(defaultTime[index] || defaultTime).locale(lang.value).year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
  33002. return emitDayjs;
  33003. };
  33004. const handleRangePick = (val, close = true) => {
  33005. const min_ = val.minDate;
  33006. const max_ = val.maxDate;
  33007. const minDate_ = formatEmit(min_, 0);
  33008. const maxDate_ = formatEmit(max_, 1);
  33009. if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
  33010. emit("calendar-change", [min_.toDate(), max_ && max_.toDate()]);
  33011. maxDate.value = maxDate_;
  33012. minDate.value = minDate_;
  33013. if (!showTime.value && close) close = !minDate_ || !maxDate_;
  33014. handleRangeConfirm(close);
  33015. };
  33016. const minTimePickerVisible = ref(false);
  33017. const maxTimePickerVisible = ref(false);
  33018. const handleMinTimeClose = () => {
  33019. minTimePickerVisible.value = false;
  33020. };
  33021. const handleMaxTimeClose = () => {
  33022. maxTimePickerVisible.value = false;
  33023. };
  33024. const findValidDateToward = (from, toward) => {
  33025. if (!disabledDate || !disabledDate(from.toDate())) return from;
  33026. const forward = from.isBefore(toward);
  33027. let cursor = from;
  33028. while (forward ? cursor.isBefore(toward) : cursor.isAfter(toward)) {
  33029. cursor = forward ? cursor.add(1, "day") : cursor.subtract(1, "day");
  33030. if (!disabledDate(cursor.toDate())) return cursor;
  33031. }
  33032. return from;
  33033. };
  33034. const handleDateInput = (value, type) => {
  33035. dateUserInput.value[type] = value;
  33036. const parsedValueD = (0, import_dayjs_min.default)(value, dateFormat.value).locale(lang.value);
  33037. if (parsedValueD.isValid()) {
  33038. if (disabledDate && disabledDate(parsedValueD.toDate())) return;
  33039. if (type === "min") {
  33040. leftDate.value = parsedValueD;
  33041. minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
  33042. if (!props.unlinkPanels && !maxDate.value) {
  33043. const adjustedMax = findValidDateToward(minDate.value.add(1, "month"), minDate.value);
  33044. rightDate.value = adjustedMax;
  33045. maxDate.value = adjustedMax;
  33046. }
  33047. } else {
  33048. rightDate.value = parsedValueD;
  33049. maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
  33050. if (!props.unlinkPanels && !minDate.value) {
  33051. const adjustedMin = findValidDateToward(maxDate.value.subtract(1, "month"), maxDate.value);
  33052. leftDate.value = adjustedMin;
  33053. minDate.value = adjustedMin;
  33054. }
  33055. }
  33056. sortDates(minDate.value, maxDate.value);
  33057. handleRangeConfirm(true);
  33058. }
  33059. };
  33060. const handleDateChange = (_, type) => {
  33061. dateUserInput.value[type] = null;
  33062. if (type === "min") {
  33063. if (!props.unlinkPanels && maxDate.value && minDate.value && maxDate.value.isBefore(minDate.value)) {
  33064. const adjustedMax = findValidDateToward(minDate.value.add(1, "month"), minDate.value);
  33065. rightDate.value = adjustedMax;
  33066. maxDate.value = adjustedMax;
  33067. }
  33068. } else if (!props.unlinkPanels && minDate.value && maxDate.value && minDate.value.isAfter(maxDate.value)) {
  33069. const adjustedMin = findValidDateToward(maxDate.value.subtract(1, "month"), maxDate.value);
  33070. leftDate.value = adjustedMin;
  33071. minDate.value = adjustedMin;
  33072. }
  33073. sortDates(minDate.value, maxDate.value);
  33074. handleRangeConfirm(true);
  33075. };
  33076. const handleTimeInput = (value, type) => {
  33077. timeUserInput.value[type] = value;
  33078. const parsedValueD = (0, import_dayjs_min.default)(value, timeFormat.value).locale(lang.value);
  33079. if (parsedValueD.isValid()) if (type === "min") {
  33080. minTimePickerVisible.value = true;
  33081. minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
  33082. leftDate.value = minDate.value;
  33083. } else {
  33084. maxTimePickerVisible.value = true;
  33085. maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
  33086. rightDate.value = maxDate.value;
  33087. }
  33088. };
  33089. const handleTimeChange = (_value, type) => {
  33090. timeUserInput.value[type] = null;
  33091. if (type === "min") {
  33092. leftDate.value = minDate.value;
  33093. minTimePickerVisible.value = false;
  33094. if (!maxDate.value || maxDate.value.isBefore(minDate.value)) maxDate.value = minDate.value;
  33095. } else {
  33096. rightDate.value = maxDate.value;
  33097. maxTimePickerVisible.value = false;
  33098. if (maxDate.value && maxDate.value.isBefore(minDate.value)) minDate.value = maxDate.value;
  33099. }
  33100. handleRangeConfirm(true);
  33101. };
  33102. const handleMinTimePick = (value, visible, first) => {
  33103. if (timeUserInput.value.min) return;
  33104. if (value) minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
  33105. if (!first) minTimePickerVisible.value = visible;
  33106. if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {
  33107. maxDate.value = minDate.value;
  33108. rightDate.value = value;
  33109. nextTick(() => {
  33110. parseValue(props.parsedValue);
  33111. });
  33112. }
  33113. handleRangeConfirm(true);
  33114. };
  33115. const handleMaxTimePick = (value, visible, first) => {
  33116. if (timeUserInput.value.max) return;
  33117. if (value) maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
  33118. if (!first) maxTimePickerVisible.value = visible;
  33119. if (maxDate.value && maxDate.value.isBefore(minDate.value)) minDate.value = maxDate.value;
  33120. handleRangeConfirm(true);
  33121. };
  33122. const onClear = () => {
  33123. handleClear();
  33124. emit("clear");
  33125. };
  33126. const handleClear = () => {
  33127. let valueOnClear = null;
  33128. if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
  33129. leftDate.value = getDefaultValue(unref(defaultValue), {
  33130. lang: unref(lang),
  33131. unit: "month",
  33132. unlinkPanels: props.unlinkPanels
  33133. })[0];
  33134. rightDate.value = leftDate.value.add(1, "month");
  33135. maxDate.value = void 0;
  33136. minDate.value = void 0;
  33137. handleRangeConfirm(true);
  33138. emit("pick", valueOnClear);
  33139. };
  33140. const parseUserInput = (value) => {
  33141. return correctlyParseUserInput(value, format.value || "", lang.value, isDefaultFormat);
  33142. };
  33143. function sortDates(minDate, maxDate) {
  33144. if (props.unlinkPanels && maxDate) {
  33145. const minDateYear = minDate?.year() || 0;
  33146. const minDateMonth = minDate?.month() || 0;
  33147. const maxDateYear = maxDate.year();
  33148. const maxDateMonth = maxDate.month();
  33149. rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate.add(1, unit$2) : maxDate;
  33150. } else {
  33151. rightDate.value = leftDate.value.add(1, unit$2);
  33152. if (maxDate) rightDate.value = rightDate.value.hour(maxDate.hour()).minute(maxDate.minute()).second(maxDate.second());
  33153. }
  33154. }
  33155. emit("set-picker-option", ["isValidValue", isValidValue]);
  33156. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  33157. emit("set-picker-option", ["handleClear", handleClear]);
  33158. return (_ctx, _cache) => {
  33159. return openBlock(), createElementBlock("div", { class: normalizeClass([
  33160. unref(ppNs).b(),
  33161. unref(drpNs).b(),
  33162. unref(ppNs).is("border", _ctx.border),
  33163. unref(ppNs).is("disabled", unref(dateRangeDisabled)),
  33164. {
  33165. "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value,
  33166. "has-time": showTime.value,
  33167. "single-panel": _ctx.singlePanel
  33168. }
  33169. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  33170. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  33171. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  33172. key: 0,
  33173. class: normalizeClass(unref(ppNs).e("sidebar"))
  33174. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(shortcuts.value, (shortcut, key) => {
  33175. return openBlock(), createElementBlock("button", {
  33176. key,
  33177. type: "button",
  33178. disabled: unref(dateRangeDisabled),
  33179. class: normalizeClass(unref(ppNs).e("shortcut")),
  33180. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  33181. }, toDisplayString(shortcut.text), 11, _hoisted_1$47);
  33182. }), 128))], 2)) : createCommentVNode("v-if", true),
  33183. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [
  33184. showTime.value ? (openBlock(), createElementBlock("div", {
  33185. key: 0,
  33186. class: normalizeClass(unref(drpNs).e("time-header"))
  33187. }, [
  33188. createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("editors-wrap")) }, [createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  33189. size: "small",
  33190. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  33191. placeholder: unref(t)("el.datepicker.startDate"),
  33192. class: normalizeClass(unref(drpNs).e("editor")),
  33193. "model-value": minVisibleDate.value,
  33194. "validate-event": false,
  33195. readonly: !_ctx.editable,
  33196. onInput: _cache[0] || (_cache[0] = (val) => handleDateInput(val, "min")),
  33197. onChange: _cache[1] || (_cache[1] = (val) => handleDateChange(val, "min"))
  33198. }, null, 8, [
  33199. "disabled",
  33200. "placeholder",
  33201. "class",
  33202. "model-value",
  33203. "readonly"
  33204. ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  33205. size: "small",
  33206. class: normalizeClass(unref(drpNs).e("editor")),
  33207. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  33208. placeholder: unref(t)("el.datepicker.startTime"),
  33209. "model-value": minVisibleTime.value,
  33210. "validate-event": false,
  33211. readonly: !_ctx.editable,
  33212. onFocus: _cache[2] || (_cache[2] = ($event) => minTimePickerVisible.value = true),
  33213. onInput: _cache[3] || (_cache[3] = (val) => handleTimeInput(val, "min")),
  33214. onChange: _cache[4] || (_cache[4] = (val) => handleTimeChange(val, "min"))
  33215. }, null, 8, [
  33216. "class",
  33217. "disabled",
  33218. "placeholder",
  33219. "model-value",
  33220. "readonly"
  33221. ]), createVNode(unref(panel_time_pick_default), {
  33222. visible: minTimePickerVisible.value,
  33223. format: timeFormat.value,
  33224. "datetime-role": "start",
  33225. "parsed-value": unref(minDate) || leftDate.value,
  33226. onPick: handleMinTimePick
  33227. }, null, 8, [
  33228. "visible",
  33229. "format",
  33230. "parsed-value"
  33231. ])], 2)), [[unref(ClickOutside), handleMinTimeClose]])], 2),
  33232. createBaseVNode("span", null, [createVNode(unref(ElIcon), null, {
  33233. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  33234. _: 1
  33235. })]),
  33236. createBaseVNode("span", { class: normalizeClass([unref(drpNs).e("editors-wrap"), "is-right"]) }, [createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  33237. size: "small",
  33238. class: normalizeClass(unref(drpNs).e("editor")),
  33239. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  33240. placeholder: unref(t)("el.datepicker.endDate"),
  33241. "model-value": maxVisibleDate.value,
  33242. readonly: !unref(minDate) || !_ctx.editable,
  33243. "validate-event": false,
  33244. onInput: _cache[5] || (_cache[5] = (val) => handleDateInput(val, "max")),
  33245. onChange: _cache[6] || (_cache[6] = (val) => handleDateChange(val, "max"))
  33246. }, null, 8, [
  33247. "class",
  33248. "disabled",
  33249. "placeholder",
  33250. "model-value",
  33251. "readonly"
  33252. ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
  33253. size: "small",
  33254. class: normalizeClass(unref(drpNs).e("editor")),
  33255. disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
  33256. placeholder: unref(t)("el.datepicker.endTime"),
  33257. "model-value": maxVisibleTime.value,
  33258. readonly: !unref(minDate) || !_ctx.editable,
  33259. "validate-event": false,
  33260. onFocus: _cache[7] || (_cache[7] = ($event) => unref(minDate) && (maxTimePickerVisible.value = true)),
  33261. onInput: _cache[8] || (_cache[8] = (val) => handleTimeInput(val, "max")),
  33262. onChange: _cache[9] || (_cache[9] = (val) => handleTimeChange(val, "max"))
  33263. }, null, 8, [
  33264. "class",
  33265. "disabled",
  33266. "placeholder",
  33267. "model-value",
  33268. "readonly"
  33269. ]), createVNode(unref(panel_time_pick_default), {
  33270. "datetime-role": "end",
  33271. visible: maxTimePickerVisible.value,
  33272. format: timeFormat.value,
  33273. "parsed-value": unref(maxDate) || rightDate.value,
  33274. onPick: handleMaxTimePick
  33275. }, null, 8, [
  33276. "visible",
  33277. "format",
  33278. "parsed-value"
  33279. ])], 2)), [[unref(ClickOutside), handleMaxTimeClose]])], 2)
  33280. ], 2)) : createCommentVNode("v-if", true),
  33281. createBaseVNode("div", { class: normalizeClass([
  33282. unref(ppNs).e("content"),
  33283. unref(drpNs).e("content"),
  33284. unref(drpNs).is("left", !_ctx.singlePanel)
  33285. ]) }, [
  33286. createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  33287. createBaseVNode("button", {
  33288. type: "button",
  33289. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
  33290. "aria-label": unref(t)(`el.datepicker.prevYear`),
  33291. disabled: unref(dateRangeDisabled),
  33292. onClick: leftPrevYear
  33293. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  33294. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  33295. _: 1
  33296. })])], 10, _hoisted_2$29),
  33297. withDirectives(createBaseVNode("button", {
  33298. type: "button",
  33299. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
  33300. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  33301. disabled: unref(dateRangeDisabled),
  33302. onClick: leftPrevMonth
  33303. }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
  33304. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  33305. _: 1
  33306. })])], 10, _hoisted_3$13), [[vShow, unref(leftCurrentView) === "date"]]),
  33307. _ctx.unlinkPanels || _ctx.singlePanel ? (openBlock(), createElementBlock("button", {
  33308. key: 0,
  33309. type: "button",
  33310. disabled: !enableYearArrow.value || unref(dateRangeDisabled),
  33311. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled))], "d-arrow-right"]),
  33312. "aria-label": unref(t)(`el.datepicker.nextYear`),
  33313. onClick: leftNextYear
  33314. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  33315. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  33316. _: 1
  33317. })])], 10, _hoisted_4$10)) : createCommentVNode("v-if", true),
  33318. _ctx.unlinkPanels && unref(leftCurrentView) === "date" || _ctx.singlePanel ? (openBlock(), createElementBlock("button", {
  33319. key: 1,
  33320. type: "button",
  33321. disabled: !enableMonthArrow.value || unref(dateRangeDisabled),
  33322. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled))], "arrow-right"]),
  33323. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  33324. onClick: leftNextMonth
  33325. }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
  33326. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  33327. _: 1
  33328. })])], 10, _hoisted_5$7)) : createCommentVNode("v-if", true),
  33329. createBaseVNode("div", null, [createBaseVNode("span", {
  33330. role: "button",
  33331. class: normalizeClass(unref(drpNs).e("header-label")),
  33332. "aria-live": "polite",
  33333. tabindex: _ctx.disabled ? void 0 : 0,
  33334. "aria-disabled": _ctx.disabled,
  33335. onKeydown: _cache[10] || (_cache[10] = withKeys(($event) => unref(showLeftPicker)("year"), ["enter"])),
  33336. onClick: _cache[11] || (_cache[11] = ($event) => unref(showLeftPicker)("year"))
  33337. }, toDisplayString(unref(leftYearLabel)), 43, _hoisted_6$2), withDirectives(createBaseVNode("span", {
  33338. role: "button",
  33339. "aria-live": "polite",
  33340. tabindex: _ctx.disabled ? void 0 : 0,
  33341. "aria-disabled": _ctx.disabled,
  33342. class: normalizeClass([unref(drpNs).e("header-label"), { active: unref(leftCurrentView) === "month" }]),
  33343. onKeydown: _cache[12] || (_cache[12] = withKeys(($event) => unref(showLeftPicker)("month"), ["enter"])),
  33344. onClick: _cache[13] || (_cache[13] = ($event) => unref(showLeftPicker)("month"))
  33345. }, toDisplayString(unref(t)(`el.datepicker.month${leftDate.value.month() + 1}`)), 43, _hoisted_7$1), [[vShow, unref(leftCurrentView) === "date"]])])
  33346. ], 2),
  33347. unref(leftCurrentView) === "date" ? (openBlock(), createBlock(basic_date_table_default, {
  33348. key: 0,
  33349. ref_key: "leftCurrentViewRef",
  33350. ref: leftCurrentViewRef,
  33351. "selection-mode": "range",
  33352. date: leftDate.value,
  33353. "min-date": unref(minDate),
  33354. "max-date": unref(maxDate),
  33355. "range-state": unref(rangeState),
  33356. "disabled-date": unref(disabledDate),
  33357. "cell-class-name": unref(cellClassName),
  33358. "show-week-number": _ctx.showWeekNumber,
  33359. disabled: unref(dateRangeDisabled),
  33360. onChangerange: unref(handleChangeRange),
  33361. onPick: handleRangePick,
  33362. onSelect: unref(onSelect)
  33363. }, null, 8, [
  33364. "date",
  33365. "min-date",
  33366. "max-date",
  33367. "range-state",
  33368. "disabled-date",
  33369. "cell-class-name",
  33370. "show-week-number",
  33371. "disabled",
  33372. "onChangerange",
  33373. "onSelect"
  33374. ])) : createCommentVNode("v-if", true),
  33375. unref(leftCurrentView) === "year" ? (openBlock(), createBlock(basic_year_table_default, {
  33376. key: 1,
  33377. ref_key: "leftCurrentViewRef",
  33378. ref: leftCurrentViewRef,
  33379. "selection-mode": "year",
  33380. date: leftDate.value,
  33381. "disabled-date": unref(disabledDate),
  33382. "parsed-value": _ctx.parsedValue,
  33383. disabled: unref(dateRangeDisabled),
  33384. onPick: unref(handleLeftYearPick)
  33385. }, null, 8, [
  33386. "date",
  33387. "disabled-date",
  33388. "parsed-value",
  33389. "disabled",
  33390. "onPick"
  33391. ])) : createCommentVNode("v-if", true),
  33392. unref(leftCurrentView) === "month" ? (openBlock(), createBlock(basic_month_table_default, {
  33393. key: 2,
  33394. ref_key: "leftCurrentViewRef",
  33395. ref: leftCurrentViewRef,
  33396. "selection-mode": "month",
  33397. date: leftDate.value,
  33398. "parsed-value": _ctx.parsedValue,
  33399. "disabled-date": unref(disabledDate),
  33400. disabled: unref(dateRangeDisabled),
  33401. onPick: unref(handleLeftMonthPick)
  33402. }, null, 8, [
  33403. "date",
  33404. "parsed-value",
  33405. "disabled-date",
  33406. "disabled",
  33407. "onPick"
  33408. ])) : createCommentVNode("v-if", true)
  33409. ], 2),
  33410. !_ctx.singlePanel ? (openBlock(), createElementBlock("div", {
  33411. key: 1,
  33412. class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"])
  33413. }, [
  33414. createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  33415. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  33416. key: 0,
  33417. type: "button",
  33418. disabled: !enableYearArrow.value || unref(dateRangeDisabled),
  33419. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled))], "d-arrow-left"]),
  33420. "aria-label": unref(t)(`el.datepicker.prevYear`),
  33421. onClick: rightPrevYear
  33422. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  33423. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  33424. _: 1
  33425. })])], 10, _hoisted_8$1)) : createCommentVNode("v-if", true),
  33426. _ctx.unlinkPanels && unref(rightCurrentView) === "date" ? (openBlock(), createElementBlock("button", {
  33427. key: 1,
  33428. type: "button",
  33429. disabled: !enableMonthArrow.value || unref(dateRangeDisabled),
  33430. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled))], "arrow-left"]),
  33431. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  33432. onClick: rightPrevMonth
  33433. }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
  33434. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  33435. _: 1
  33436. })])], 10, _hoisted_9$1)) : createCommentVNode("v-if", true),
  33437. createBaseVNode("button", {
  33438. type: "button",
  33439. "aria-label": unref(t)(`el.datepicker.nextYear`),
  33440. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  33441. disabled: unref(dateRangeDisabled),
  33442. onClick: rightNextYear
  33443. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  33444. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  33445. _: 1
  33446. })])], 10, _hoisted_10$1),
  33447. withDirectives(createBaseVNode("button", {
  33448. type: "button",
  33449. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
  33450. disabled: unref(dateRangeDisabled),
  33451. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  33452. onClick: rightNextMonth
  33453. }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
  33454. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  33455. _: 1
  33456. })])], 10, _hoisted_11$1), [[vShow, unref(rightCurrentView) === "date"]]),
  33457. createBaseVNode("div", null, [createBaseVNode("span", {
  33458. role: "button",
  33459. class: normalizeClass(unref(drpNs).e("header-label")),
  33460. "aria-live": "polite",
  33461. tabindex: _ctx.disabled ? void 0 : 0,
  33462. "aria-disabled": _ctx.disabled,
  33463. onKeydown: _cache[14] || (_cache[14] = withKeys(($event) => unref(showRightPicker)("year"), ["enter"])),
  33464. onClick: _cache[15] || (_cache[15] = ($event) => unref(showRightPicker)("year"))
  33465. }, toDisplayString(unref(rightYearLabel)), 43, _hoisted_12$1), withDirectives(createBaseVNode("span", {
  33466. role: "button",
  33467. "aria-live": "polite",
  33468. tabindex: _ctx.disabled ? void 0 : 0,
  33469. "aria-disabled": _ctx.disabled,
  33470. class: normalizeClass([unref(drpNs).e("header-label"), { active: unref(rightCurrentView) === "month" }]),
  33471. onKeydown: _cache[16] || (_cache[16] = withKeys(($event) => unref(showRightPicker)("month"), ["enter"])),
  33472. onClick: _cache[17] || (_cache[17] = ($event) => unref(showRightPicker)("month"))
  33473. }, toDisplayString(unref(t)(`el.datepicker.month${rightDate.value.month() + 1}`)), 43, _hoisted_13$1), [[vShow, unref(rightCurrentView) === "date"]])])
  33474. ], 2),
  33475. unref(rightCurrentView) === "date" ? (openBlock(), createBlock(basic_date_table_default, {
  33476. key: 0,
  33477. ref_key: "rightCurrentViewRef",
  33478. ref: rightCurrentViewRef,
  33479. "selection-mode": "range",
  33480. date: rightDate.value,
  33481. "min-date": unref(minDate),
  33482. "max-date": unref(maxDate),
  33483. "range-state": unref(rangeState),
  33484. "disabled-date": unref(disabledDate),
  33485. "cell-class-name": unref(cellClassName),
  33486. "show-week-number": _ctx.showWeekNumber,
  33487. disabled: unref(dateRangeDisabled),
  33488. onChangerange: unref(handleChangeRange),
  33489. onPick: handleRangePick,
  33490. onSelect: unref(onSelect)
  33491. }, null, 8, [
  33492. "date",
  33493. "min-date",
  33494. "max-date",
  33495. "range-state",
  33496. "disabled-date",
  33497. "cell-class-name",
  33498. "show-week-number",
  33499. "disabled",
  33500. "onChangerange",
  33501. "onSelect"
  33502. ])) : createCommentVNode("v-if", true),
  33503. unref(rightCurrentView) === "year" ? (openBlock(), createBlock(basic_year_table_default, {
  33504. key: 1,
  33505. ref_key: "rightCurrentViewRef",
  33506. ref: rightCurrentViewRef,
  33507. "selection-mode": "year",
  33508. date: rightDate.value,
  33509. "disabled-date": unref(disabledDate),
  33510. "parsed-value": _ctx.parsedValue,
  33511. disabled: unref(dateRangeDisabled),
  33512. onPick: unref(handleRightYearPick)
  33513. }, null, 8, [
  33514. "date",
  33515. "disabled-date",
  33516. "parsed-value",
  33517. "disabled",
  33518. "onPick"
  33519. ])) : createCommentVNode("v-if", true),
  33520. unref(rightCurrentView) === "month" ? (openBlock(), createBlock(basic_month_table_default, {
  33521. key: 2,
  33522. ref_key: "rightCurrentViewRef",
  33523. ref: rightCurrentViewRef,
  33524. "selection-mode": "month",
  33525. date: rightDate.value,
  33526. "parsed-value": _ctx.parsedValue,
  33527. "disabled-date": unref(disabledDate),
  33528. disabled: unref(dateRangeDisabled),
  33529. onPick: unref(handleRightMonthPick)
  33530. }, null, 8, [
  33531. "date",
  33532. "parsed-value",
  33533. "disabled-date",
  33534. "disabled",
  33535. "onPick"
  33536. ])) : createCommentVNode("v-if", true)
  33537. ], 2)) : createCommentVNode("v-if", true)
  33538. ], 2)
  33539. ], 2), _ctx.showFooter && showTime.value && (_ctx.showConfirm || unref(clearable)) ? (openBlock(), createElementBlock("div", {
  33540. key: 0,
  33541. class: normalizeClass(unref(ppNs).e("footer"))
  33542. }, [unref(clearable) ? (openBlock(), createBlock(unref(ElButton), {
  33543. key: 0,
  33544. text: "",
  33545. size: "small",
  33546. class: normalizeClass(unref(ppNs).e("link-btn")),
  33547. onClick: onClear
  33548. }, {
  33549. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.clear")), 1)]),
  33550. _: 1
  33551. }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
  33552. key: 1,
  33553. plain: "",
  33554. size: "small",
  33555. class: normalizeClass(unref(ppNs).e("link-btn")),
  33556. disabled: btnDisabled.value,
  33557. onClick: _cache[18] || (_cache[18] = ($event) => unref(handleRangeConfirm)(false))
  33558. }, {
  33559. default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)]),
  33560. _: 1
  33561. }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2);
  33562. };
  33563. }
  33564. });
  33565. //#endregion
  33566. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-month-range.mjs
  33567. var panelMonthRangeProps = buildProps({ ...panelRangeSharedProps });
  33568. var panelMonthRangeEmits = [
  33569. "pick",
  33570. "set-picker-option",
  33571. "calendar-change"
  33572. ];
  33573. //#endregion
  33574. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-month-range-header.mjs
  33575. var useMonthRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
  33576. const { t } = useLocale();
  33577. const leftPrevYear = () => {
  33578. leftDate.value = leftDate.value.subtract(1, "year");
  33579. if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(1, "year");
  33580. };
  33581. const rightNextYear = () => {
  33582. if (!unlinkPanels.value) leftDate.value = leftDate.value.add(1, "year");
  33583. rightDate.value = rightDate.value.add(1, "year");
  33584. };
  33585. const leftNextYear = () => {
  33586. leftDate.value = leftDate.value.add(1, "year");
  33587. };
  33588. const rightPrevYear = () => {
  33589. rightDate.value = rightDate.value.subtract(1, "year");
  33590. };
  33591. return {
  33592. leftPrevYear,
  33593. rightNextYear,
  33594. leftNextYear,
  33595. rightPrevYear,
  33596. leftLabel: computed(() => {
  33597. return `${leftDate.value.year()} ${t("el.datepicker.year")}`;
  33598. }),
  33599. rightLabel: computed(() => {
  33600. return `${rightDate.value.year()} ${t("el.datepicker.year")}`;
  33601. }),
  33602. leftYear: computed(() => {
  33603. return leftDate.value.year();
  33604. }),
  33605. rightYear: computed(() => {
  33606. return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year();
  33607. })
  33608. };
  33609. };
  33610. //#endregion
  33611. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue_vue_type_script_setup_true_lang.mjs
  33612. var _hoisted_1$46 = ["disabled", "onClick"];
  33613. var _hoisted_2$28 = ["disabled"];
  33614. var _hoisted_3$12 = ["disabled"];
  33615. var _hoisted_4$9 = ["disabled"];
  33616. var _hoisted_5$6 = ["disabled"];
  33617. var unit$1 = "year";
  33618. //#endregion
  33619. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs
  33620. var panel_month_range_default = /* @__PURE__ */ defineComponent({
  33621. name: "DatePickerMonthRange",
  33622. __name: "panel-month-range",
  33623. props: panelMonthRangeProps,
  33624. emits: panelMonthRangeEmits,
  33625. setup(__props, { emit: __emit }) {
  33626. const props = __props;
  33627. const emit = __emit;
  33628. const { lang } = useLocale();
  33629. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  33630. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  33631. const { shortcuts, disabledDate, cellClassName } = pickerBase.props;
  33632. const format = toRef(pickerBase.props, "format");
  33633. const defaultValue = toRef(pickerBase.props, "defaultValue");
  33634. const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  33635. const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(1, unit$1));
  33636. const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue } = useRangePicker(props, {
  33637. defaultValue,
  33638. leftDate,
  33639. rightDate,
  33640. unit: unit$1,
  33641. sortDates
  33642. });
  33643. const hasShortcuts = computed(() => !!shortcuts.length);
  33644. const { leftPrevYear, rightNextYear, leftNextYear, rightPrevYear, leftLabel, rightLabel, leftYear, rightYear } = useMonthRangeHeader({
  33645. unlinkPanels: toRef(props, "unlinkPanels"),
  33646. leftDate,
  33647. rightDate
  33648. });
  33649. const enableYearArrow = computed(() => {
  33650. return props.singlePanel || props.unlinkPanels && rightYear.value > leftYear.value + 1;
  33651. });
  33652. const handleRangePick = (val, close = true) => {
  33653. const minDate_ = val.minDate;
  33654. const maxDate_ = val.maxDate;
  33655. if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
  33656. emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]);
  33657. maxDate.value = maxDate_;
  33658. minDate.value = minDate_;
  33659. if (!close) return;
  33660. handleRangeConfirm();
  33661. };
  33662. const handleClear = () => {
  33663. let valueOnClear = null;
  33664. if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
  33665. leftDate.value = getDefaultValue(unref(defaultValue), {
  33666. lang: unref(lang),
  33667. unit: "year",
  33668. unlinkPanels: props.unlinkPanels
  33669. })[0];
  33670. rightDate.value = leftDate.value.add(1, "year");
  33671. emit("pick", valueOnClear);
  33672. };
  33673. const parseUserInput = (value) => {
  33674. return correctlyParseUserInput(value, format.value, lang.value, isDefaultFormat);
  33675. };
  33676. function sortDates(minDate, maxDate) {
  33677. if (props.unlinkPanels && maxDate) rightDate.value = (minDate?.year() || 0) === maxDate.year() ? maxDate.add(1, unit$1) : maxDate;
  33678. else rightDate.value = leftDate.value.add(1, unit$1);
  33679. }
  33680. const monthRangeDisabled = useFormDisabled();
  33681. watch(() => props.visible, (visible) => {
  33682. if (!visible && rangeState.value.selecting) {
  33683. parseValue(props.parsedValue);
  33684. onSelect(false);
  33685. }
  33686. });
  33687. emit("set-picker-option", ["isValidValue", isValidRange]);
  33688. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  33689. emit("set-picker-option", ["handleClear", handleClear]);
  33690. return (_ctx, _cache) => {
  33691. return openBlock(), createElementBlock("div", { class: normalizeClass([
  33692. unref(ppNs).b(),
  33693. unref(drpNs).b(),
  33694. unref(ppNs).is("border", _ctx.border),
  33695. unref(ppNs).is("disabled", unref(monthRangeDisabled)),
  33696. {
  33697. "has-sidebar": Boolean(_ctx.$slots.sidebar) || hasShortcuts.value,
  33698. "single-panel": _ctx.singlePanel
  33699. }
  33700. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  33701. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  33702. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  33703. key: 0,
  33704. class: normalizeClass(unref(ppNs).e("sidebar"))
  33705. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  33706. return openBlock(), createElementBlock("button", {
  33707. key,
  33708. type: "button",
  33709. class: normalizeClass(unref(ppNs).e("shortcut")),
  33710. disabled: unref(monthRangeDisabled),
  33711. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  33712. }, toDisplayString(shortcut.text), 11, _hoisted_1$46);
  33713. }), 128))], 2)) : createCommentVNode("v-if", true),
  33714. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [createBaseVNode("div", { class: normalizeClass([
  33715. unref(ppNs).e("content"),
  33716. unref(drpNs).e("content"),
  33717. unref(drpNs).is("left", !_ctx.singlePanel)
  33718. ]) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  33719. createBaseVNode("button", {
  33720. type: "button",
  33721. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
  33722. disabled: unref(monthRangeDisabled),
  33723. onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
  33724. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  33725. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  33726. _: 1
  33727. })])], 10, _hoisted_2$28),
  33728. _ctx.unlinkPanels || _ctx.singlePanel ? (openBlock(), createElementBlock("button", {
  33729. key: 0,
  33730. type: "button",
  33731. disabled: !enableYearArrow.value || unref(monthRangeDisabled),
  33732. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled))], "d-arrow-right"]),
  33733. onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
  33734. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  33735. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  33736. _: 1
  33737. })])], 10, _hoisted_3$12)) : createCommentVNode("v-if", true),
  33738. createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
  33739. ], 2), createVNode(basic_month_table_default, {
  33740. "selection-mode": "range",
  33741. date: leftDate.value,
  33742. "min-date": unref(minDate),
  33743. "max-date": unref(maxDate),
  33744. "range-state": unref(rangeState),
  33745. "disabled-date": unref(disabledDate),
  33746. disabled: unref(monthRangeDisabled),
  33747. "cell-class-name": unref(cellClassName),
  33748. onChangerange: unref(handleChangeRange),
  33749. onPick: handleRangePick,
  33750. onSelect: unref(onSelect)
  33751. }, null, 8, [
  33752. "date",
  33753. "min-date",
  33754. "max-date",
  33755. "range-state",
  33756. "disabled-date",
  33757. "disabled",
  33758. "cell-class-name",
  33759. "onChangerange",
  33760. "onSelect"
  33761. ])], 2), !_ctx.singlePanel ? (openBlock(), createElementBlock("div", {
  33762. key: 0,
  33763. class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"])
  33764. }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  33765. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  33766. key: 0,
  33767. type: "button",
  33768. disabled: !enableYearArrow.value || unref(monthRangeDisabled),
  33769. class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled))], "d-arrow-left"]),
  33770. onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
  33771. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  33772. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  33773. _: 1
  33774. })])], 10, _hoisted_4$9)) : createCommentVNode("v-if", true),
  33775. createBaseVNode("button", {
  33776. type: "button",
  33777. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  33778. disabled: unref(monthRangeDisabled),
  33779. onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
  33780. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  33781. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  33782. _: 1
  33783. })])], 10, _hoisted_5$6),
  33784. createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
  33785. ], 2), createVNode(basic_month_table_default, {
  33786. "selection-mode": "range",
  33787. date: rightDate.value,
  33788. "min-date": unref(minDate),
  33789. "max-date": unref(maxDate),
  33790. "range-state": unref(rangeState),
  33791. "disabled-date": unref(disabledDate),
  33792. disabled: unref(monthRangeDisabled),
  33793. "cell-class-name": unref(cellClassName),
  33794. onChangerange: unref(handleChangeRange),
  33795. onPick: handleRangePick,
  33796. onSelect: unref(onSelect)
  33797. }, null, 8, [
  33798. "date",
  33799. "min-date",
  33800. "max-date",
  33801. "range-state",
  33802. "disabled-date",
  33803. "disabled",
  33804. "cell-class-name",
  33805. "onChangerange",
  33806. "onSelect"
  33807. ])], 2)) : createCommentVNode("v-if", true)], 2)
  33808. ], 2)], 2);
  33809. };
  33810. }
  33811. });
  33812. //#endregion
  33813. //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-year-range.mjs
  33814. var panelYearRangeProps = buildProps({ ...panelRangeSharedProps });
  33815. var panelYearRangeEmits = [
  33816. "pick",
  33817. "set-picker-option",
  33818. "calendar-change"
  33819. ];
  33820. //#endregion
  33821. //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-year-range-header.mjs
  33822. var useYearRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
  33823. const leftPrevYear = () => {
  33824. leftDate.value = leftDate.value.subtract(10, "year");
  33825. if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(10, "year");
  33826. };
  33827. const rightNextYear = () => {
  33828. if (!unlinkPanels.value) leftDate.value = leftDate.value.add(10, "year");
  33829. rightDate.value = rightDate.value.add(10, "year");
  33830. };
  33831. const leftNextYear = () => {
  33832. leftDate.value = leftDate.value.add(10, "year");
  33833. };
  33834. const rightPrevYear = () => {
  33835. rightDate.value = rightDate.value.subtract(10, "year");
  33836. };
  33837. return {
  33838. leftPrevYear,
  33839. rightNextYear,
  33840. leftNextYear,
  33841. rightPrevYear,
  33842. leftLabel: computed(() => {
  33843. const leftStartDate = Math.floor(leftDate.value.year() / 10) * 10;
  33844. return `${leftStartDate}-${leftStartDate + 9}`;
  33845. }),
  33846. rightLabel: computed(() => {
  33847. const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10;
  33848. return `${rightStartDate}-${rightStartDate + 9}`;
  33849. }),
  33850. leftYear: computed(() => {
  33851. return Math.floor(leftDate.value.year() / 10) * 10 + 9;
  33852. }),
  33853. rightYear: computed(() => {
  33854. return Math.floor(rightDate.value.year() / 10) * 10;
  33855. })
  33856. };
  33857. };
  33858. //#endregion
  33859. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue_vue_type_script_setup_true_lang.mjs
  33860. var _hoisted_1$45 = ["disabled", "onClick"];
  33861. var _hoisted_2$27 = ["disabled"];
  33862. var _hoisted_3$11 = ["disabled"];
  33863. var _hoisted_4$8 = ["disabled"];
  33864. var _hoisted_5$5 = ["disabled"];
  33865. var step = 10;
  33866. var unit = "year";
  33867. //#endregion
  33868. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs
  33869. var panel_year_range_default = /* @__PURE__ */ defineComponent({
  33870. name: "DatePickerYearRange",
  33871. __name: "panel-year-range",
  33872. props: panelYearRangeProps,
  33873. emits: panelYearRangeEmits,
  33874. setup(__props, { emit: __emit }) {
  33875. const props = __props;
  33876. const emit = __emit;
  33877. const { lang } = useLocale();
  33878. const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
  33879. const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(step, unit));
  33880. const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
  33881. const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
  33882. const { shortcuts, disabledDate, cellClassName } = pickerBase.props;
  33883. const format = toRef(pickerBase.props, "format");
  33884. const defaultValue = toRef(pickerBase.props, "defaultValue");
  33885. const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue } = useRangePicker(props, {
  33886. defaultValue,
  33887. leftDate,
  33888. rightDate,
  33889. step,
  33890. unit,
  33891. sortDates
  33892. });
  33893. const { leftPrevYear, rightNextYear, leftNextYear, rightPrevYear, leftLabel, rightLabel, leftYear, rightYear } = useYearRangeHeader({
  33894. unlinkPanels: toRef(props, "unlinkPanels"),
  33895. leftDate,
  33896. rightDate
  33897. });
  33898. const yearRangeDisabled = useFormDisabled();
  33899. const hasShortcuts = computed(() => !!shortcuts.length);
  33900. const panelKls = computed(() => [
  33901. ppNs.b(),
  33902. drpNs.b(),
  33903. ppNs.is("border", props.border),
  33904. ppNs.is("disabled", yearRangeDisabled.value),
  33905. {
  33906. "has-sidebar": Boolean(useSlots().sidebar) || hasShortcuts.value,
  33907. "single-panel": props.singlePanel
  33908. }
  33909. ]);
  33910. const leftPanelKls = computed(() => {
  33911. return {
  33912. content: [
  33913. ppNs.e("content"),
  33914. drpNs.e("content"),
  33915. drpNs.is("left", !props.singlePanel)
  33916. ],
  33917. arrowLeftBtn: [ppNs.e("icon-btn"), "d-arrow-left"],
  33918. arrowRightBtn: [
  33919. ppNs.e("icon-btn"),
  33920. ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value),
  33921. "d-arrow-right"
  33922. ]
  33923. };
  33924. });
  33925. const rightPanelKls = computed(() => {
  33926. return {
  33927. content: [
  33928. ppNs.e("content"),
  33929. drpNs.e("content"),
  33930. "is-right"
  33931. ],
  33932. arrowLeftBtn: [
  33933. ppNs.e("icon-btn"),
  33934. ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value),
  33935. "d-arrow-left"
  33936. ],
  33937. arrowRightBtn: [ppNs.e("icon-btn"), "d-arrow-right"]
  33938. };
  33939. });
  33940. const enableYearArrow = computed(() => {
  33941. return props.singlePanel || props.unlinkPanels && rightYear.value > leftYear.value + 1;
  33942. });
  33943. const handleRangePick = (val, close = true) => {
  33944. const minDate_ = val.minDate;
  33945. const maxDate_ = val.maxDate;
  33946. if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
  33947. emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]);
  33948. maxDate.value = maxDate_;
  33949. minDate.value = minDate_;
  33950. if (!close) return;
  33951. handleRangeConfirm();
  33952. };
  33953. const parseUserInput = (value) => {
  33954. return correctlyParseUserInput(value, format.value, lang.value, isDefaultFormat);
  33955. };
  33956. const isValidValue = (date) => {
  33957. return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true);
  33958. };
  33959. const handleClear = () => {
  33960. let valueOnClear = null;
  33961. if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
  33962. const defaultArr = getDefaultValue(unref(defaultValue), {
  33963. lang: unref(lang),
  33964. step,
  33965. unit,
  33966. unlinkPanels: props.unlinkPanels
  33967. });
  33968. leftDate.value = defaultArr[0];
  33969. rightDate.value = defaultArr[1];
  33970. emit("pick", valueOnClear);
  33971. };
  33972. function sortDates(minDate, maxDate) {
  33973. if (props.unlinkPanels && maxDate) {
  33974. const minDateYear = minDate?.year() || 0;
  33975. const maxDateYear = maxDate.year();
  33976. rightDate.value = minDateYear + step > maxDateYear ? maxDate.add(step, unit) : maxDate;
  33977. } else rightDate.value = leftDate.value.add(step, unit);
  33978. }
  33979. watch(() => props.visible, (visible) => {
  33980. if (!visible && rangeState.value.selecting) {
  33981. parseValue(props.parsedValue);
  33982. onSelect(false);
  33983. }
  33984. });
  33985. emit("set-picker-option", ["isValidValue", isValidValue]);
  33986. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  33987. emit("set-picker-option", ["handleClear", handleClear]);
  33988. return (_ctx, _cache) => {
  33989. return openBlock(), createElementBlock("div", { class: normalizeClass(panelKls.value) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
  33990. renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
  33991. hasShortcuts.value ? (openBlock(), createElementBlock("div", {
  33992. key: 0,
  33993. class: normalizeClass(unref(ppNs).e("sidebar"))
  33994. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  33995. return openBlock(), createElementBlock("button", {
  33996. key,
  33997. type: "button",
  33998. class: normalizeClass(unref(ppNs).e("shortcut")),
  33999. disabled: unref(yearRangeDisabled),
  34000. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  34001. }, toDisplayString(shortcut.text), 11, _hoisted_1$45);
  34002. }), 128))], 2)) : createCommentVNode("v-if", true),
  34003. createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [createBaseVNode("div", { class: normalizeClass(leftPanelKls.value.content) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  34004. createBaseVNode("button", {
  34005. type: "button",
  34006. class: normalizeClass(leftPanelKls.value.arrowLeftBtn),
  34007. disabled: unref(yearRangeDisabled),
  34008. onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
  34009. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  34010. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  34011. _: 1
  34012. })])], 10, _hoisted_2$27),
  34013. _ctx.unlinkPanels || _ctx.singlePanel ? (openBlock(), createElementBlock("button", {
  34014. key: 0,
  34015. type: "button",
  34016. disabled: !enableYearArrow.value || unref(yearRangeDisabled),
  34017. class: normalizeClass(leftPanelKls.value.arrowRightBtn),
  34018. onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
  34019. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  34020. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  34021. _: 1
  34022. })])], 10, _hoisted_3$11)) : createCommentVNode("v-if", true),
  34023. createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
  34024. ], 2), createVNode(basic_year_table_default, {
  34025. "selection-mode": "range",
  34026. date: leftDate.value,
  34027. "min-date": unref(minDate),
  34028. "max-date": unref(maxDate),
  34029. "range-state": unref(rangeState),
  34030. "disabled-date": unref(disabledDate),
  34031. disabled: unref(yearRangeDisabled),
  34032. "cell-class-name": unref(cellClassName),
  34033. onChangerange: unref(handleChangeRange),
  34034. onPick: handleRangePick,
  34035. onSelect: unref(onSelect)
  34036. }, null, 8, [
  34037. "date",
  34038. "min-date",
  34039. "max-date",
  34040. "range-state",
  34041. "disabled-date",
  34042. "disabled",
  34043. "cell-class-name",
  34044. "onChangerange",
  34045. "onSelect"
  34046. ])], 2), !_ctx.singlePanel ? (openBlock(), createElementBlock("div", {
  34047. key: 0,
  34048. class: normalizeClass(rightPanelKls.value.content)
  34049. }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
  34050. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  34051. key: 0,
  34052. type: "button",
  34053. disabled: !enableYearArrow.value || unref(yearRangeDisabled),
  34054. class: normalizeClass(rightPanelKls.value.arrowLeftBtn),
  34055. onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
  34056. }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
  34057. default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
  34058. _: 1
  34059. })])], 10, _hoisted_4$8)) : createCommentVNode("v-if", true),
  34060. createBaseVNode("button", {
  34061. type: "button",
  34062. class: normalizeClass(rightPanelKls.value.arrowRightBtn),
  34063. disabled: unref(yearRangeDisabled),
  34064. onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
  34065. }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
  34066. default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
  34067. _: 1
  34068. })])], 10, _hoisted_5$5),
  34069. createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
  34070. ], 2), createVNode(basic_year_table_default, {
  34071. "selection-mode": "range",
  34072. date: rightDate.value,
  34073. "min-date": unref(minDate),
  34074. "max-date": unref(maxDate),
  34075. "range-state": unref(rangeState),
  34076. "disabled-date": unref(disabledDate),
  34077. disabled: unref(yearRangeDisabled),
  34078. "cell-class-name": unref(cellClassName),
  34079. onChangerange: unref(handleChangeRange),
  34080. onPick: handleRangePick,
  34081. onSelect: unref(onSelect)
  34082. }, null, 8, [
  34083. "date",
  34084. "min-date",
  34085. "max-date",
  34086. "range-state",
  34087. "disabled-date",
  34088. "disabled",
  34089. "cell-class-name",
  34090. "onChangerange",
  34091. "onSelect"
  34092. ])], 2)) : createCommentVNode("v-if", true)], 2)
  34093. ], 2)], 2);
  34094. };
  34095. }
  34096. });
  34097. //#endregion
  34098. //#region node_modules/element-plus/es/components/date-picker-panel/src/panel-utils.mjs
  34099. var getPanel = function(type) {
  34100. switch (type) {
  34101. case "daterange":
  34102. case "datetimerange": return panel_date_range_default;
  34103. case "monthrange": return panel_month_range_default;
  34104. case "yearrange": return panel_year_range_default;
  34105. default: return panel_date_pick_default;
  34106. }
  34107. };
  34108. //#endregion
  34109. //#region node_modules/dayjs/plugin/advancedFormat.js
  34110. var require_advancedFormat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  34111. (function(e, t) {
  34112. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t();
  34113. })(exports, (function() {
  34114. "use strict";
  34115. return function(e, t) {
  34116. var r = t.prototype, n = r.format;
  34117. r.format = function(e) {
  34118. var t = this, r = this.$locale();
  34119. if (!this.isValid()) return n.bind(this)(e);
  34120. var s = this.$utils(), a = (e || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, (function(e) {
  34121. switch (e) {
  34122. case "Q": return Math.ceil((t.$M + 1) / 3);
  34123. case "Do": return r.ordinal(t.$D);
  34124. case "gggg": return t.weekYear();
  34125. case "GGGG": return t.isoWeekYear();
  34126. case "wo": return r.ordinal(t.week(), "W");
  34127. case "w":
  34128. case "ww": return s.s(t.week(), "w" === e ? 1 : 2, "0");
  34129. case "W":
  34130. case "WW": return s.s(t.isoWeek(), "W" === e ? 1 : 2, "0");
  34131. case "k":
  34132. case "kk": return s.s(String(0 === t.$H ? 24 : t.$H), "k" === e ? 1 : 2, "0");
  34133. case "X": return Math.floor(t.$d.getTime() / 1e3);
  34134. case "x": return t.$d.getTime();
  34135. case "z": return "[" + t.offsetName() + "]";
  34136. case "zzz": return "[" + t.offsetName("long") + "]";
  34137. default: return e;
  34138. }
  34139. }));
  34140. return n.bind(this)(a);
  34141. };
  34142. };
  34143. }));
  34144. }));
  34145. //#endregion
  34146. //#region node_modules/dayjs/plugin/weekOfYear.js
  34147. var require_weekOfYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  34148. (function(e, t) {
  34149. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t();
  34150. })(exports, (function() {
  34151. "use strict";
  34152. var e = "week", t = "year";
  34153. return function(i, n, r) {
  34154. var f = n.prototype;
  34155. f.week = function(i) {
  34156. if (void 0 === i && (i = null), null !== i) return this.add(7 * (i - this.week()), "day");
  34157. var n = this.$locale().yearStart || 1;
  34158. if (11 === this.month() && this.date() > 25) {
  34159. var f = r(this).startOf(t).add(1, t).date(n), s = r(this).endOf(e);
  34160. if (f.isBefore(s)) return 1;
  34161. }
  34162. var a = r(this).startOf(t).date(n).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, !0);
  34163. return o < 0 ? r(this).startOf("week").week() : Math.ceil(o);
  34164. }, f.weeks = function(e) {
  34165. return void 0 === e && (e = null), this.week(e);
  34166. };
  34167. };
  34168. }));
  34169. }));
  34170. //#endregion
  34171. //#region node_modules/dayjs/plugin/weekYear.js
  34172. var require_weekYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  34173. (function(e, t) {
  34174. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t();
  34175. })(exports, (function() {
  34176. "use strict";
  34177. return function(e, t) {
  34178. t.prototype.weekYear = function() {
  34179. var e = this.month(), t = this.week(), n = this.year();
  34180. return 1 === t && 11 === e ? n + 1 : 0 === e && t >= 52 ? n - 1 : n;
  34181. };
  34182. };
  34183. }));
  34184. }));
  34185. //#endregion
  34186. //#region node_modules/dayjs/plugin/dayOfYear.js
  34187. var require_dayOfYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  34188. (function(e, t) {
  34189. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_dayOfYear = t();
  34190. })(exports, (function() {
  34191. "use strict";
  34192. return function(e, t, n) {
  34193. t.prototype.dayOfYear = function(e) {
  34194. var t = Math.round((n(this).startOf("day") - n(this).startOf("year")) / 864e5) + 1;
  34195. return null == e ? t : this.add(e - t, "day");
  34196. };
  34197. };
  34198. }));
  34199. }));
  34200. //#endregion
  34201. //#region node_modules/dayjs/plugin/isSameOrAfter.js
  34202. var require_isSameOrAfter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  34203. (function(e, t) {
  34204. "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t();
  34205. })(exports, (function() {
  34206. "use strict";
  34207. return function(e, t) {
  34208. t.prototype.isSameOrAfter = function(e, t) {
  34209. return this.isSame(e, t) || this.isAfter(e, t);
  34210. };
  34211. };
  34212. }));
  34213. }));
  34214. //#endregion
  34215. //#region node_modules/dayjs/plugin/isSameOrBefore.js
  34216. var require_isSameOrBefore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
  34217. (function(e, i) {
  34218. "object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i();
  34219. })(exports, (function() {
  34220. "use strict";
  34221. return function(e, i) {
  34222. i.prototype.isSameOrBefore = function(e, i) {
  34223. return this.isSame(e, i) || this.isBefore(e, i);
  34224. };
  34225. };
  34226. }));
  34227. }));
  34228. //#endregion
  34229. //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-panel.mjs
  34230. var import_advancedFormat = /* @__PURE__ */ __toESM(require_advancedFormat(), 1);
  34231. var import_weekOfYear = /* @__PURE__ */ __toESM(require_weekOfYear(), 1);
  34232. var import_weekYear = /* @__PURE__ */ __toESM(require_weekYear(), 1);
  34233. var import_dayOfYear = /* @__PURE__ */ __toESM(require_dayOfYear(), 1);
  34234. var import_isSameOrAfter = /* @__PURE__ */ __toESM(require_isSameOrAfter(), 1);
  34235. var import_isSameOrBefore = /* @__PURE__ */ __toESM(require_isSameOrBefore(), 1);
  34236. function _isSlot$7(s) {
  34237. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  34238. }
  34239. import_dayjs_min.default.extend(import_localeData.default);
  34240. import_dayjs_min.default.extend(import_advancedFormat.default);
  34241. import_dayjs_min.default.extend(import_customParseFormat.default);
  34242. import_dayjs_min.default.extend(import_weekOfYear.default);
  34243. import_dayjs_min.default.extend(import_weekYear.default);
  34244. import_dayjs_min.default.extend(import_dayOfYear.default);
  34245. import_dayjs_min.default.extend(import_isSameOrAfter.default);
  34246. import_dayjs_min.default.extend(import_isSameOrBefore.default);
  34247. //#endregion
  34248. //#region node_modules/element-plus/es/components/date-picker-panel/index.mjs
  34249. var ElDatePickerPanel = withInstall(/* @__PURE__ */ defineComponent({
  34250. name: "ElDatePickerPanel",
  34251. install: null,
  34252. inheritAttrs: false,
  34253. props: datePickerPanelProps,
  34254. emits: [
  34255. UPDATE_MODEL_EVENT,
  34256. "calendar-change",
  34257. "panel-change",
  34258. "visible-change",
  34259. "clear"
  34260. ],
  34261. setup(props, { slots, emit, attrs }) {
  34262. const ns = useNamespace("picker-panel");
  34263. if (isUndefined(inject("EP_PICKER_BASE", void 0))) provide(PICKER_BASE_INJECTION_KEY, { props: reactive({ ...toRefs(props) }) });
  34264. provide(ROOT_PICKER_INJECTION_KEY, {
  34265. slots,
  34266. pickerNs: ns
  34267. });
  34268. const { parsedValue, onCalendarChange, onPanelChange, onSetPickerOption, onPick } = inject(ROOT_COMMON_PICKER_INJECTION_KEY, () => useCommonPicker(props, emit), true);
  34269. return () => {
  34270. return createVNode(getPanel(props.type), mergeProps(omit(attrs, "onPick"), props, {
  34271. "parsedValue": parsedValue.value,
  34272. "onSet-picker-option": onSetPickerOption,
  34273. "onCalendar-change": onCalendarChange,
  34274. "onPanel-change": onPanelChange,
  34275. "onClear": () => emit("clear"),
  34276. "onPick": onPick
  34277. }), _isSlot$7(slots) ? slots : { default: () => [slots] });
  34278. };
  34279. }
  34280. }));
  34281. //#endregion
  34282. //#region node_modules/element-plus/es/components/date-picker/src/props.mjs
  34283. var datePickerProps = buildProps({
  34284. ...timePickerDefaultProps,
  34285. /**
  34286. * @description type of the picker
  34287. */
  34288. type: {
  34289. type: definePropType(String),
  34290. default: "date"
  34291. }
  34292. });
  34293. //#endregion
  34294. //#region node_modules/element-plus/es/components/date-picker/src/date-picker.mjs
  34295. function _isSlot$6(s) {
  34296. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  34297. }
  34298. //#endregion
  34299. //#region node_modules/element-plus/es/components/date-picker/index.mjs
  34300. var ElDatePicker = withInstall(/* @__PURE__ */ defineComponent({
  34301. name: "ElDatePicker",
  34302. install: null,
  34303. props: datePickerProps,
  34304. emits: [UPDATE_MODEL_EVENT],
  34305. setup(props, { expose, emit, slots }) {
  34306. provide(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, computed(() => {
  34307. return !props.format;
  34308. }));
  34309. provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, reactive(toRef(props, "popperOptions")));
  34310. const commonPicker = ref();
  34311. expose({
  34312. focus: () => {
  34313. commonPicker.value?.focus();
  34314. },
  34315. blur: () => {
  34316. commonPicker.value?.blur();
  34317. },
  34318. handleOpen: () => {
  34319. commonPicker.value?.handleOpen();
  34320. },
  34321. handleClose: () => {
  34322. commonPicker.value?.handleClose();
  34323. }
  34324. });
  34325. const onModelValueUpdated = (val) => {
  34326. emit(UPDATE_MODEL_EVENT, val);
  34327. };
  34328. return () => {
  34329. return createVNode(picker_default, mergeProps(props, {
  34330. "format": props.format ?? (DEFAULT_FORMATS_DATEPICKER[props.type] || "YYYY-MM-DD"),
  34331. "type": props.type,
  34332. "ref": commonPicker,
  34333. "onUpdate:modelValue": onModelValueUpdated
  34334. }), {
  34335. default: (scopedProps) => createVNode(ElDatePickerPanel, mergeProps({
  34336. "disabled": props.disabled,
  34337. "editable": props.editable,
  34338. "border": false
  34339. }, scopedProps), _isSlot$6(slots) ? slots : { default: () => [slots] }),
  34340. "range-separator": slots["range-separator"]
  34341. });
  34342. };
  34343. }
  34344. }));
  34345. //#endregion
  34346. //#region node_modules/element-plus/es/components/descriptions/src/description.mjs
  34347. /**
  34348. * @deprecated Removed after 3.0.0, Use `DescriptionProps` instead.
  34349. */
  34350. var descriptionProps = buildProps({
  34351. /**
  34352. * @description with or without border
  34353. */
  34354. border: Boolean,
  34355. /**
  34356. * @description numbers of `Descriptions Item` in one line
  34357. */
  34358. column: {
  34359. type: Number,
  34360. default: 3
  34361. },
  34362. /**
  34363. * @description direction of list
  34364. */
  34365. direction: {
  34366. type: String,
  34367. values: ["horizontal", "vertical"],
  34368. default: "horizontal"
  34369. },
  34370. /**
  34371. * @description size of list
  34372. */
  34373. size: useSizeProp,
  34374. /**
  34375. * @description title text, display on the top left
  34376. */
  34377. title: {
  34378. type: String,
  34379. default: ""
  34380. },
  34381. /**
  34382. * @description extra text, display on the top right
  34383. */
  34384. extra: {
  34385. type: String,
  34386. default: ""
  34387. },
  34388. /**
  34389. * @description width of every label column
  34390. */
  34391. labelWidth: { type: [String, Number] }
  34392. });
  34393. //#endregion
  34394. //#region node_modules/element-plus/es/components/descriptions/src/constants.mjs
  34395. var COMPONENT_NAME$10 = "ElDescriptionsItem";
  34396. //#endregion
  34397. //#region node_modules/element-plus/es/components/descriptions/src/description-item.mjs
  34398. var descriptionItemProps = buildProps({
  34399. /**
  34400. * @description label text
  34401. */
  34402. label: {
  34403. type: String,
  34404. default: ""
  34405. },
  34406. /**
  34407. * @description colspan of column
  34408. */
  34409. span: {
  34410. type: Number,
  34411. default: 1
  34412. },
  34413. /**
  34414. * @description the number of rows a cell should span
  34415. */
  34416. rowspan: {
  34417. type: Number,
  34418. default: 1
  34419. },
  34420. /**
  34421. * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)
  34422. */
  34423. width: {
  34424. type: [String, Number],
  34425. default: ""
  34426. },
  34427. /**
  34428. * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)
  34429. */
  34430. minWidth: {
  34431. type: [String, Number],
  34432. default: ""
  34433. },
  34434. /**
  34435. * @description column label width, if not set, it will be the same as the width of the column. Higher priority than the `label-width` of `Descriptions`
  34436. */
  34437. labelWidth: { type: [String, Number] },
  34438. /**
  34439. * @description column content alignment (If no `border`, effective for both label and content)
  34440. */
  34441. align: {
  34442. type: String,
  34443. values: columnAlignment,
  34444. default: "left"
  34445. },
  34446. /**
  34447. * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)
  34448. */
  34449. labelAlign: {
  34450. type: String,
  34451. values: columnAlignment
  34452. },
  34453. /**
  34454. * @description column content custom class name
  34455. */
  34456. className: {
  34457. type: String,
  34458. default: ""
  34459. },
  34460. /**
  34461. * @description column label custom class name
  34462. */
  34463. labelClassName: {
  34464. type: String,
  34465. default: ""
  34466. }
  34467. });
  34468. var DescriptionItem = defineComponent({
  34469. name: COMPONENT_NAME$10,
  34470. props: descriptionItemProps
  34471. });
  34472. //#endregion
  34473. //#region node_modules/element-plus/es/components/descriptions/src/token.mjs
  34474. var descriptionsKey = Symbol("elDescriptions");
  34475. //#endregion
  34476. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row.mjs
  34477. /**
  34478. * @deprecated Removed after 3.0.0, Use `DescriptionsRowProps` instead.
  34479. */
  34480. var descriptionsRowProps = buildProps({ row: {
  34481. type: definePropType(Array),
  34482. default: () => []
  34483. } });
  34484. //#endregion
  34485. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-cell.mjs
  34486. var descriptions_cell_default = defineComponent({
  34487. name: "ElDescriptionsCell",
  34488. props: {
  34489. cell: { type: Object },
  34490. tag: {
  34491. type: String,
  34492. default: "td"
  34493. },
  34494. type: { type: String }
  34495. },
  34496. setup() {
  34497. return { descriptions: inject(descriptionsKey, {}) };
  34498. },
  34499. render() {
  34500. const item = getNormalizedProps(this.cell);
  34501. const directives = (this.cell?.dirs || []).map((dire) => {
  34502. const { dir, arg, modifiers, value } = dire;
  34503. return [
  34504. dir,
  34505. value,
  34506. arg,
  34507. modifiers
  34508. ];
  34509. });
  34510. const { border, direction } = this.descriptions;
  34511. const isVertical = direction === "vertical";
  34512. const renderLabel = () => this.cell?.children?.label?.() || item.label;
  34513. const renderContent = () => this.cell?.children?.default?.();
  34514. const span = item.span;
  34515. const rowspan = item.rowspan;
  34516. const align = item.align ? `is-${item.align}` : "";
  34517. const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align;
  34518. const className = item.className;
  34519. const labelClassName = item.labelClassName;
  34520. const style = {
  34521. width: addUnit(this.type === "label" ? item.labelWidth ?? this.descriptions.labelWidth ?? item.width : item.width),
  34522. minWidth: addUnit(item.minWidth)
  34523. };
  34524. const ns = useNamespace("descriptions");
  34525. switch (this.type) {
  34526. case "label": return withDirectives(h$1(this.tag, {
  34527. style,
  34528. class: [
  34529. ns.e("cell"),
  34530. ns.e("label"),
  34531. ns.is("bordered-label", border),
  34532. ns.is("vertical-label", isVertical),
  34533. labelAlign,
  34534. labelClassName
  34535. ],
  34536. colSpan: isVertical ? span : 1,
  34537. rowspan: isVertical ? 1 : rowspan
  34538. }, renderLabel()), directives);
  34539. case "content": return withDirectives(h$1(this.tag, {
  34540. style,
  34541. class: [
  34542. ns.e("cell"),
  34543. ns.e("content"),
  34544. ns.is("bordered-content", border),
  34545. ns.is("vertical-content", isVertical),
  34546. align,
  34547. className
  34548. ],
  34549. colSpan: isVertical ? span : span * 2 - 1,
  34550. rowspan: isVertical ? rowspan * 2 - 1 : rowspan
  34551. }, renderContent()), directives);
  34552. default: {
  34553. const label = renderLabel();
  34554. const labelStyle = {};
  34555. const width = addUnit(item.labelWidth ?? this.descriptions.labelWidth);
  34556. if (width) {
  34557. labelStyle.width = width;
  34558. labelStyle.display = "inline-block";
  34559. }
  34560. return withDirectives(h$1("td", {
  34561. style,
  34562. class: [ns.e("cell"), align],
  34563. colSpan: span,
  34564. rowspan
  34565. }, [!isNil(label) ? h$1("span", {
  34566. style: labelStyle,
  34567. class: [ns.e("label"), labelClassName]
  34568. }, label) : void 0, h$1("span", { class: [ns.e("content"), className] }, renderContent())]), directives);
  34569. }
  34570. }
  34571. }
  34572. });
  34573. //#endregion
  34574. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row.vue_vue_type_script_setup_true_lang.mjs
  34575. var _hoisted_1$44 = { key: 1 };
  34576. //#endregion
  34577. //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs
  34578. var descriptions_row_default = /* @__PURE__ */ defineComponent({
  34579. name: "ElDescriptionsRow",
  34580. __name: "descriptions-row",
  34581. props: descriptionsRowProps,
  34582. setup(__props) {
  34583. const descriptions = inject(descriptionsKey, {});
  34584. return (_ctx, _cache) => {
  34585. return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
  34586. return openBlock(), createBlock(unref(descriptions_cell_default), {
  34587. key: `tr1-${_index}`,
  34588. cell,
  34589. tag: "th",
  34590. type: "label"
  34591. }, null, 8, ["cell"]);
  34592. }), 128))]), createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
  34593. return openBlock(), createBlock(unref(descriptions_cell_default), {
  34594. key: `tr2-${_index}`,
  34595. cell,
  34596. tag: "td",
  34597. type: "content"
  34598. }, null, 8, ["cell"]);
  34599. }), 128))])], 64)) : (openBlock(), createElementBlock("tr", _hoisted_1$44, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
  34600. return openBlock(), createElementBlock(Fragment, { key: `tr3-${_index}` }, [unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(descriptions_cell_default), {
  34601. cell,
  34602. tag: "td",
  34603. type: "label"
  34604. }, null, 8, ["cell"]), createVNode(unref(descriptions_cell_default), {
  34605. cell,
  34606. tag: "td",
  34607. type: "content"
  34608. }, null, 8, ["cell"])], 64)) : (openBlock(), createBlock(unref(descriptions_cell_default), {
  34609. key: 1,
  34610. cell,
  34611. tag: "td",
  34612. type: "both"
  34613. }, null, 8, ["cell"]))], 64);
  34614. }), 128))]));
  34615. };
  34616. }
  34617. });
  34618. //#endregion
  34619. //#region node_modules/element-plus/es/components/descriptions/index.mjs
  34620. var ElDescriptions = withInstall(/* @__PURE__ */ defineComponent({
  34621. name: "ElDescriptions",
  34622. __name: "description",
  34623. props: descriptionProps,
  34624. setup(__props) {
  34625. const props = __props;
  34626. const ns = useNamespace("descriptions");
  34627. const descriptionsSize = useFormSize();
  34628. const slots = useSlots();
  34629. provide(descriptionsKey, props);
  34630. const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
  34631. const filledNode = (node, span, count, isLast = false) => {
  34632. if (!node.props) node.props = {};
  34633. if (span > count) node.props.span = count;
  34634. if (isLast) node.props.span = span;
  34635. return node;
  34636. };
  34637. const getRows = () => {
  34638. if (!slots.default) return [];
  34639. const children = flattedChildren(slots.default()).filter((node) => node?.type?.name === COMPONENT_NAME$10);
  34640. const rows = [];
  34641. let temp = [];
  34642. let count = props.column;
  34643. let totalSpan = 0;
  34644. const rowspanTemp = [];
  34645. children.forEach((node, index) => {
  34646. const span = node.props?.span || 1;
  34647. const rowspan = node.props?.rowspan || 1;
  34648. const rowNo = rows.length;
  34649. rowspanTemp[rowNo] ||= 0;
  34650. if (rowspan > 1) for (let i = 1; i < rowspan; i++) {
  34651. rowspanTemp[rowNo + i] ||= 0;
  34652. rowspanTemp[rowNo + i]++;
  34653. totalSpan++;
  34654. }
  34655. if (rowspanTemp[rowNo] > 0) {
  34656. count -= rowspanTemp[rowNo];
  34657. rowspanTemp[rowNo] = 0;
  34658. }
  34659. if (index < children.length - 1) totalSpan += span > count ? count : span;
  34660. if (index === children.length - 1) {
  34661. const lastSpan = props.column - totalSpan % props.column;
  34662. temp.push(filledNode(node, lastSpan, count, true));
  34663. rows.push(temp);
  34664. return;
  34665. }
  34666. if (span < count) {
  34667. count -= span;
  34668. temp.push(node);
  34669. } else {
  34670. temp.push(filledNode(node, span, count));
  34671. rows.push(temp);
  34672. count = props.column;
  34673. temp = [];
  34674. }
  34675. });
  34676. return rows;
  34677. };
  34678. return (_ctx, _cache) => {
  34679. return openBlock(), createElementBlock("div", { class: normalizeClass(descriptionKls.value) }, [__props.title || __props.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  34680. key: 0,
  34681. class: normalizeClass(unref(ns).e("header"))
  34682. }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).e("extra")) }, [renderSlot(_ctx.$slots, "extra", {}, () => [createTextVNode(toDisplayString(__props.extra), 1)])], 2)], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("body")) }, [createBaseVNode("table", { class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", __props.border)]) }, [createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, _index) => {
  34683. return openBlock(), createBlock(descriptions_row_default, {
  34684. key: _index,
  34685. row
  34686. }, null, 8, ["row"]);
  34687. }), 128))])], 2)], 2)], 2);
  34688. };
  34689. }
  34690. }), { DescriptionsItem: DescriptionItem });
  34691. var ElDescriptionsItem = withNoopInstall(DescriptionItem);
  34692. //#endregion
  34693. //#region node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
  34694. /**
  34695. * @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.
  34696. */
  34697. var dialogContentProps = buildProps({
  34698. /**
  34699. * @description whether to align the header and footer in center
  34700. */
  34701. center: Boolean,
  34702. /**
  34703. * @description whether to align the dialog both horizontally and vertically
  34704. */
  34705. alignCenter: {
  34706. type: Boolean,
  34707. default: void 0
  34708. },
  34709. /**
  34710. * @description custom close icon, default is Close
  34711. */
  34712. closeIcon: { type: iconPropType },
  34713. /**
  34714. * @description enable dragging feature for Dialog
  34715. */
  34716. draggable: {
  34717. type: Boolean,
  34718. default: void 0
  34719. },
  34720. /**
  34721. * @description draggable Dialog can overflow the viewport
  34722. */
  34723. overflow: {
  34724. type: Boolean,
  34725. default: void 0
  34726. },
  34727. /**
  34728. * @description whether the Dialog takes up full screen
  34729. */
  34730. fullscreen: Boolean,
  34731. /**
  34732. * @description custom class names for header wrapper
  34733. */
  34734. headerClass: String,
  34735. /**
  34736. * @description custom class names for body wrapper
  34737. */
  34738. bodyClass: String,
  34739. /**
  34740. * @description custom class names for footer wrapper
  34741. */
  34742. footerClass: String,
  34743. /**
  34744. * @description whether to show a close button
  34745. */
  34746. showClose: {
  34747. type: Boolean,
  34748. default: true
  34749. },
  34750. /**
  34751. * @description title of Dialog. Can also be passed with a named slot (see the following table)
  34752. */
  34753. title: {
  34754. type: String,
  34755. default: ""
  34756. },
  34757. /**
  34758. * @description header's aria-level attribute
  34759. */
  34760. ariaLevel: {
  34761. type: String,
  34762. default: "2"
  34763. }
  34764. });
  34765. var dialogContentEmits = { close: () => true };
  34766. var dialogContentPropsDefaults = {
  34767. alignCenter: void 0,
  34768. draggable: void 0,
  34769. overflow: void 0,
  34770. showClose: true,
  34771. title: "",
  34772. ariaLevel: "2"
  34773. };
  34774. //#endregion
  34775. //#region node_modules/element-plus/es/components/dialog/src/dialog.mjs
  34776. /**
  34777. * @deprecated Removed after 3.0.0, Use `DialogProps` instead.
  34778. */
  34779. var dialogProps = buildProps({
  34780. ...dialogContentProps,
  34781. /**
  34782. * @description whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true`
  34783. */
  34784. appendToBody: Boolean,
  34785. /**
  34786. * @description which element the Dialog appends to
  34787. */
  34788. appendTo: {
  34789. type: definePropType([String, Object]),
  34790. default: "body"
  34791. },
  34792. /**
  34793. * @description callback before Dialog closes, and it will prevent Dialog from closing, use done to close the dialog
  34794. */
  34795. beforeClose: { type: definePropType(Function) },
  34796. /**
  34797. * @description destroy elements in Dialog when closed
  34798. */
  34799. destroyOnClose: Boolean,
  34800. /**
  34801. * @description whether the Dialog can be closed by clicking the mask
  34802. */
  34803. closeOnClickModal: {
  34804. type: Boolean,
  34805. default: true
  34806. },
  34807. /**
  34808. * @description whether the Dialog can be closed by pressing ESC
  34809. */
  34810. closeOnPressEscape: {
  34811. type: Boolean,
  34812. default: true
  34813. },
  34814. /**
  34815. * @description whether scroll of body is disabled while Dialog is displayed
  34816. */
  34817. lockScroll: {
  34818. type: Boolean,
  34819. default: true
  34820. },
  34821. /**
  34822. * @description whether a mask is displayed
  34823. */
  34824. modal: {
  34825. type: Boolean,
  34826. default: true
  34827. },
  34828. /**
  34829. * @description whether the mask is penetrable
  34830. */
  34831. modalPenetrable: Boolean,
  34832. /**
  34833. * @description the Time(milliseconds) before open
  34834. */
  34835. openDelay: {
  34836. type: Number,
  34837. default: 0
  34838. },
  34839. /**
  34840. * @description the Time(milliseconds) before close
  34841. */
  34842. closeDelay: {
  34843. type: Number,
  34844. default: 0
  34845. },
  34846. /**
  34847. * @description value for `margin-top` of Dialog CSS, default is 15vh
  34848. */
  34849. top: { type: String },
  34850. /**
  34851. * @description visibility of Dialog
  34852. */
  34853. modelValue: Boolean,
  34854. /**
  34855. * @description custom class names for mask
  34856. */
  34857. modalClass: String,
  34858. /**
  34859. * @description custom class names for header wrapper
  34860. */
  34861. headerClass: String,
  34862. /**
  34863. * @description custom class names for body wrapper
  34864. */
  34865. bodyClass: String,
  34866. /**
  34867. * @description custom class names for footer wrapper
  34868. */
  34869. footerClass: String,
  34870. /**
  34871. * @description width of Dialog, default is 50%
  34872. */
  34873. width: { type: [String, Number] },
  34874. /**
  34875. * @description same as z-index in native CSS, z-order of dialog
  34876. */
  34877. zIndex: { type: Number },
  34878. trapFocus: Boolean,
  34879. /**
  34880. * @description header's aria-level attribute
  34881. */
  34882. headerAriaLevel: {
  34883. type: String,
  34884. default: "2"
  34885. },
  34886. /**
  34887. * @description custom transition configuration for dialog animation, it can be a string (transition name) or an object with Vue transition props
  34888. */
  34889. transition: {
  34890. type: definePropType([String, Object]),
  34891. default: void 0
  34892. }
  34893. });
  34894. var dialogEmits = {
  34895. open: () => true,
  34896. opened: () => true,
  34897. close: () => true,
  34898. closed: () => true,
  34899. [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
  34900. openAutoFocus: () => true,
  34901. closeAutoFocus: () => true
  34902. };
  34903. var dialogContextKey = Symbol("dialogContextKey");
  34904. var dialogPropsDefaults = {
  34905. ...dialogContentPropsDefaults,
  34906. appendTo: "body",
  34907. closeOnClickModal: true,
  34908. closeOnPressEscape: true,
  34909. lockScroll: true,
  34910. modal: true,
  34911. openDelay: 0,
  34912. closeDelay: 0,
  34913. headerAriaLevel: "2",
  34914. transition: void 0
  34915. };
  34916. //#endregion
  34917. //#region node_modules/element-plus/es/components/overlay/src/overlay.mjs
  34918. var overlayProps = buildProps({
  34919. mask: {
  34920. type: Boolean,
  34921. default: true
  34922. },
  34923. customMaskEvent: Boolean,
  34924. overlayClass: { type: definePropType([
  34925. String,
  34926. Array,
  34927. Object
  34928. ]) },
  34929. zIndex: { type: definePropType([String, Number]) }
  34930. });
  34931. var overlayEmits = { click: (evt) => evt instanceof MouseEvent };
  34932. var BLOCK = "overlay";
  34933. //#endregion
  34934. //#region node_modules/element-plus/es/components/overlay/index.mjs
  34935. var ElOverlay = defineComponent({
  34936. name: "ElOverlay",
  34937. props: overlayProps,
  34938. emits: overlayEmits,
  34939. setup(props, { slots, emit }) {
  34940. const ns = useNamespace(BLOCK);
  34941. const onMaskClick = (e) => {
  34942. emit("click", e);
  34943. };
  34944. const { onClick, onMousedown, onMouseup } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
  34945. return () => {
  34946. return props.mask ? createVNode("div", {
  34947. class: [ns.b(), props.overlayClass],
  34948. style: { zIndex: props.zIndex },
  34949. onClick,
  34950. onMousedown,
  34951. onMouseup
  34952. }, [renderSlot(slots, "default")], 14, [
  34953. "onClick",
  34954. "onMouseup",
  34955. "onMousedown"
  34956. ]) : h$1("div", {
  34957. class: props.overlayClass,
  34958. style: {
  34959. zIndex: props.zIndex,
  34960. position: "fixed",
  34961. top: "0px",
  34962. right: "0px",
  34963. bottom: "0px",
  34964. left: "0px"
  34965. }
  34966. }, [renderSlot(slots, "default")]);
  34967. };
  34968. }
  34969. });
  34970. //#endregion
  34971. //#region node_modules/element-plus/es/components/dialog/src/constants.mjs
  34972. var dialogInjectionKey = Symbol("dialogInjectionKey");
  34973. var DEFAULT_DIALOG_TRANSITION = "dialog-fade";
  34974. //#endregion
  34975. //#region node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
  34976. var COMPONENT_NAME$9 = "ElDialog";
  34977. var useDialog = (props, targetRef) => {
  34978. const emit = getCurrentInstance().emit;
  34979. const { nextZIndex } = useZIndex();
  34980. let lastPosition = "";
  34981. const titleId = useId();
  34982. const bodyId = useId();
  34983. const visible = ref(false);
  34984. const closed = ref(false);
  34985. const rendered = ref(false);
  34986. const zIndex = ref(props.zIndex ?? nextZIndex());
  34987. const closing = ref(false);
  34988. let openTimer = void 0;
  34989. let closeTimer = void 0;
  34990. const config = useGlobalConfig();
  34991. const namespace = computed(() => config.value?.namespace ?? "el");
  34992. const globalConfig = computed(() => config.value?.dialog);
  34993. const style = computed(() => {
  34994. const style = {};
  34995. const varPrefix = `--${namespace.value}-dialog`;
  34996. if (!props.fullscreen) {
  34997. if (props.top) style[`${varPrefix}-margin-top`] = props.top;
  34998. const width = addUnit(props.width);
  34999. if (width) style[`${varPrefix}-width`] = width;
  35000. }
  35001. return style;
  35002. });
  35003. const _draggable = computed(() => (props.draggable ?? globalConfig.value?.draggable ?? false) && !props.fullscreen);
  35004. const _alignCenter = computed(() => props.alignCenter ?? globalConfig.value?.alignCenter ?? false);
  35005. const _overflow = computed(() => props.overflow ?? globalConfig.value?.overflow ?? false);
  35006. const penetrable = computed(() => props.modalPenetrable && !props.modal && !props.fullscreen);
  35007. const overlayDialogStyle = computed(() => {
  35008. if (_alignCenter.value) return { display: "flex" };
  35009. return {};
  35010. });
  35011. const transitionConfig = computed(() => {
  35012. const transition = props.transition ?? globalConfig.value?.transition ?? "dialog-fade";
  35013. const baseConfig = {
  35014. name: transition,
  35015. onAfterEnter: afterEnter,
  35016. onBeforeLeave: beforeLeave,
  35017. onAfterLeave: afterLeave
  35018. };
  35019. if (isObject$2(transition)) {
  35020. const config = { ...transition };
  35021. const _mergeHook = (userHook, defaultHook) => {
  35022. return (el) => {
  35023. if (isArray$1(userHook)) userHook.forEach((fn) => {
  35024. if (isFunction$1(fn)) fn(el);
  35025. });
  35026. else if (isFunction$1(userHook)) userHook(el);
  35027. defaultHook();
  35028. };
  35029. };
  35030. config.onAfterEnter = _mergeHook(config.onAfterEnter, afterEnter);
  35031. config.onBeforeLeave = _mergeHook(config.onBeforeLeave, beforeLeave);
  35032. config.onAfterLeave = _mergeHook(config.onAfterLeave, afterLeave);
  35033. if (!config.name) {
  35034. config.name = DEFAULT_DIALOG_TRANSITION;
  35035. debugWarn(COMPONENT_NAME$9, `transition.name is missing when using object syntax, fallback to '${DEFAULT_DIALOG_TRANSITION}'`);
  35036. }
  35037. return config;
  35038. }
  35039. return baseConfig;
  35040. });
  35041. function afterEnter() {
  35042. emit("opened");
  35043. }
  35044. function afterLeave() {
  35045. emit("closed");
  35046. emit(UPDATE_MODEL_EVENT, false);
  35047. if (props.destroyOnClose) rendered.value = false;
  35048. closing.value = false;
  35049. }
  35050. function beforeLeave() {
  35051. closing.value = true;
  35052. emit("close");
  35053. }
  35054. function open() {
  35055. closeTimer?.();
  35056. openTimer?.();
  35057. if (props.openDelay && props.openDelay > 0) ({stop: openTimer} = useTimeoutFn(() => doOpen(), props.openDelay));
  35058. else doOpen();
  35059. }
  35060. function close() {
  35061. openTimer?.();
  35062. closeTimer?.();
  35063. if (props.closeDelay && props.closeDelay > 0) ({stop: closeTimer} = useTimeoutFn(() => doClose(), props.closeDelay));
  35064. else doClose();
  35065. }
  35066. function handleClose() {
  35067. function hide(shouldCancel) {
  35068. if (shouldCancel) return;
  35069. closed.value = true;
  35070. visible.value = false;
  35071. }
  35072. if (props.beforeClose) props.beforeClose(hide);
  35073. else close();
  35074. }
  35075. function onModalClick() {
  35076. if (props.closeOnClickModal) handleClose();
  35077. }
  35078. function doOpen() {
  35079. if (!isClient) return;
  35080. visible.value = true;
  35081. }
  35082. function doClose() {
  35083. visible.value = false;
  35084. }
  35085. function onOpenAutoFocus() {
  35086. emit("openAutoFocus");
  35087. }
  35088. function onCloseAutoFocus() {
  35089. emit("closeAutoFocus");
  35090. }
  35091. function onFocusoutPrevented(event) {
  35092. if (event.detail?.focusReason === "pointer") event.preventDefault();
  35093. }
  35094. if (props.lockScroll) useLockscreen(visible);
  35095. function onCloseRequested() {
  35096. if (props.closeOnPressEscape) handleClose();
  35097. }
  35098. function bringToFront() {
  35099. if (!visible.value || !penetrable.value || props.zIndex !== void 0) return;
  35100. zIndex.value = nextZIndex();
  35101. }
  35102. watch(() => props.zIndex, () => {
  35103. zIndex.value = props.zIndex ?? nextZIndex();
  35104. });
  35105. watch(() => props.modelValue, (val) => {
  35106. if (val) {
  35107. closed.value = false;
  35108. closing.value = false;
  35109. open();
  35110. rendered.value = true;
  35111. zIndex.value = props.zIndex ?? nextZIndex();
  35112. nextTick(() => {
  35113. emit("open");
  35114. if (targetRef.value) {
  35115. targetRef.value.parentElement.scrollTop = 0;
  35116. targetRef.value.parentElement.scrollLeft = 0;
  35117. targetRef.value.scrollTop = 0;
  35118. }
  35119. });
  35120. } else if (visible.value) close();
  35121. });
  35122. watch(() => props.fullscreen, (val) => {
  35123. if (!targetRef.value) return;
  35124. if (val) {
  35125. lastPosition = targetRef.value.style.transform;
  35126. targetRef.value.style.transform = "";
  35127. } else targetRef.value.style.transform = lastPosition;
  35128. });
  35129. onMounted(() => {
  35130. if (props.modelValue) {
  35131. visible.value = true;
  35132. rendered.value = true;
  35133. open();
  35134. }
  35135. });
  35136. return {
  35137. afterEnter,
  35138. afterLeave,
  35139. beforeLeave,
  35140. handleClose,
  35141. onModalClick,
  35142. close,
  35143. doClose,
  35144. onOpenAutoFocus,
  35145. onCloseAutoFocus,
  35146. onCloseRequested,
  35147. onFocusoutPrevented,
  35148. bringToFront,
  35149. titleId,
  35150. bodyId,
  35151. closed,
  35152. style,
  35153. overlayDialogStyle,
  35154. rendered,
  35155. visible,
  35156. zIndex,
  35157. transitionConfig,
  35158. _draggable,
  35159. _alignCenter,
  35160. _overflow,
  35161. closing,
  35162. penetrable
  35163. };
  35164. };
  35165. //#endregion
  35166. //#region node_modules/element-plus/es/utils/vue/refs.mjs
  35167. var composeRefs = (...refs) => {
  35168. return (el) => {
  35169. refs.forEach((ref) => {
  35170. ref.value = el;
  35171. });
  35172. };
  35173. };
  35174. //#endregion
  35175. //#region node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs
  35176. var _hoisted_1$43 = ["aria-level"];
  35177. var _hoisted_2$26 = ["aria-label"];
  35178. var _hoisted_3$10 = ["id"];
  35179. //#endregion
  35180. //#region node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
  35181. var dialog_content_default = /* @__PURE__ */ defineComponent({
  35182. name: "ElDialogContent",
  35183. __name: "dialog-content",
  35184. props: dialogContentProps,
  35185. emits: dialogContentEmits,
  35186. setup(__props, { expose: __expose }) {
  35187. const { t } = useLocale();
  35188. const { Close } = CloseComponents;
  35189. const props = __props;
  35190. const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey);
  35191. const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
  35192. const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
  35193. const draggable = computed(() => !!props.draggable);
  35194. const { resetPosition, updatePosition, isDragging } = useDraggable(dialogRef, headerRef, draggable, computed(() => !!props.overflow));
  35195. const dialogKls = computed(() => [
  35196. ns.b(),
  35197. ns.is("fullscreen", props.fullscreen),
  35198. ns.is("draggable", draggable.value),
  35199. ns.is("dragging", isDragging.value),
  35200. ns.is("align-center", !!props.alignCenter),
  35201. { [ns.m("center")]: props.center }
  35202. ]);
  35203. __expose({
  35204. resetPosition,
  35205. updatePosition
  35206. });
  35207. return (_ctx, _cache) => {
  35208. return openBlock(), createElementBlock("div", {
  35209. ref: unref(composedDialogRef),
  35210. class: normalizeClass(dialogKls.value),
  35211. style: normalizeStyle(unref(style)),
  35212. tabindex: "-1"
  35213. }, [
  35214. createBaseVNode("header", {
  35215. ref_key: "headerRef",
  35216. ref: headerRef,
  35217. class: normalizeClass([
  35218. unref(ns).e("header"),
  35219. __props.headerClass,
  35220. { "show-close": __props.showClose }
  35221. ])
  35222. }, [renderSlot(_ctx.$slots, "header", {}, () => [createBaseVNode("span", {
  35223. role: "heading",
  35224. "aria-level": __props.ariaLevel,
  35225. class: normalizeClass(unref(ns).e("title"))
  35226. }, toDisplayString(__props.title), 11, _hoisted_1$43)]), __props.showClose ? (openBlock(), createElementBlock("button", {
  35227. key: 0,
  35228. "aria-label": unref(t)("el.dialog.close"),
  35229. class: normalizeClass(unref(ns).e("headerbtn")),
  35230. type: "button",
  35231. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
  35232. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
  35233. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon || unref(Close))))]),
  35234. _: 1
  35235. }, 8, ["class"])], 10, _hoisted_2$26)) : createCommentVNode("v-if", true)], 2),
  35236. createBaseVNode("div", {
  35237. id: unref(bodyId),
  35238. class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
  35239. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_3$10),
  35240. _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
  35241. key: 0,
  35242. class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
  35243. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  35244. ], 6);
  35245. };
  35246. }
  35247. });
  35248. //#endregion
  35249. //#region node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs
  35250. var _hoisted_1$42 = [
  35251. "aria-label",
  35252. "aria-labelledby",
  35253. "aria-describedby"
  35254. ];
  35255. //#endregion
  35256. //#region node_modules/element-plus/es/components/dialog/index.mjs
  35257. var ElDialog = withInstall(/* @__PURE__ */ defineComponent({
  35258. name: "ElDialog",
  35259. inheritAttrs: false,
  35260. __name: "dialog",
  35261. props: dialogProps,
  35262. emits: dialogEmits,
  35263. setup(__props, { expose: __expose }) {
  35264. const props = __props;
  35265. const slots = useSlots();
  35266. useDeprecated({
  35267. scope: "el-dialog",
  35268. from: "the title slot",
  35269. replacement: "the header slot",
  35270. version: "3.0.0",
  35271. ref: "https://element-plus.org/en-US/component/dialog.html#slots"
  35272. }, computed(() => !!slots.title));
  35273. const ns = useNamespace("dialog");
  35274. const dialogRef = ref();
  35275. const headerRef = ref();
  35276. const dialogContentRef = ref();
  35277. const { visible, titleId, bodyId, style, overlayDialogStyle, rendered, transitionConfig, zIndex, _draggable, _alignCenter, _overflow, penetrable, handleClose, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onCloseRequested, onFocusoutPrevented, bringToFront, closing } = useDialog(props, dialogRef);
  35278. provide(dialogInjectionKey, {
  35279. dialogRef,
  35280. headerRef,
  35281. bodyId,
  35282. ns,
  35283. rendered,
  35284. style
  35285. });
  35286. const overlayEvent = useSameTarget(onModalClick);
  35287. const resetPosition = () => {
  35288. dialogContentRef.value?.resetPosition();
  35289. };
  35290. __expose({
  35291. /** @description whether the dialog is visible */
  35292. visible,
  35293. dialogContentRef,
  35294. resetPosition,
  35295. handleClose
  35296. });
  35297. return (_ctx, _cache) => {
  35298. return openBlock(), createBlock(Teleport, {
  35299. to: __props.appendTo,
  35300. disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
  35301. }, [createVNode(Transition, mergeProps(unref(transitionConfig), { persisted: "" }), {
  35302. default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
  35303. "custom-mask-event": "",
  35304. mask: __props.modal,
  35305. "overlay-class": [
  35306. __props.modalClass ?? "",
  35307. `${unref(ns).namespace.value}-modal-dialog`,
  35308. unref(ns).is("penetrable", unref(penetrable))
  35309. ],
  35310. "z-index": unref(zIndex)
  35311. }, {
  35312. default: withCtx(() => [createBaseVNode("div", {
  35313. role: "dialog",
  35314. "aria-modal": "true",
  35315. "aria-label": __props.title || void 0,
  35316. "aria-labelledby": !__props.title ? unref(titleId) : void 0,
  35317. "aria-describedby": unref(bodyId),
  35318. class: normalizeClass([`${unref(ns).namespace.value}-overlay-dialog`, unref(ns).is("closing", unref(closing))]),
  35319. style: normalizeStyle(unref(overlayDialogStyle)),
  35320. onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
  35321. onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
  35322. onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
  35323. }, [createVNode(unref(focus_trap_default$1), {
  35324. loop: "",
  35325. trapped: unref(visible),
  35326. "focus-start-el": "container",
  35327. onFocusAfterTrapped: unref(onOpenAutoFocus),
  35328. onFocusAfterReleased: unref(onCloseAutoFocus),
  35329. onFocusoutPrevented: unref(onFocusoutPrevented),
  35330. onReleaseRequested: unref(onCloseRequested)
  35331. }, {
  35332. default: withCtx(() => [unref(rendered) ? (openBlock(), createBlock(dialog_content_default, mergeProps({
  35333. key: 0,
  35334. ref_key: "dialogContentRef",
  35335. ref: dialogContentRef
  35336. }, _ctx.$attrs, {
  35337. center: __props.center,
  35338. "align-center": unref(_alignCenter),
  35339. "close-icon": __props.closeIcon,
  35340. draggable: unref(_draggable),
  35341. overflow: unref(_overflow),
  35342. fullscreen: __props.fullscreen,
  35343. "header-class": __props.headerClass,
  35344. "body-class": __props.bodyClass,
  35345. "footer-class": __props.footerClass,
  35346. "show-close": __props.showClose,
  35347. title: __props.title,
  35348. "aria-level": __props.headerAriaLevel,
  35349. onClose: unref(handleClose),
  35350. onMousedown: unref(bringToFront)
  35351. }), createSlots({
  35352. header: withCtx(() => [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
  35353. key: 0,
  35354. close: unref(handleClose),
  35355. titleId: unref(titleId),
  35356. titleClass: unref(ns).e("title")
  35357. }) : renderSlot(_ctx.$slots, "title", { key: 1 })]),
  35358. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  35359. _: 2
  35360. }, [_ctx.$slots.footer ? {
  35361. name: "footer",
  35362. fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
  35363. key: "0"
  35364. } : void 0]), 1040, [
  35365. "center",
  35366. "align-center",
  35367. "close-icon",
  35368. "draggable",
  35369. "overflow",
  35370. "fullscreen",
  35371. "header-class",
  35372. "body-class",
  35373. "footer-class",
  35374. "show-close",
  35375. "title",
  35376. "aria-level",
  35377. "onClose",
  35378. "onMousedown"
  35379. ])) : createCommentVNode("v-if", true)]),
  35380. _: 3
  35381. }, 8, [
  35382. "trapped",
  35383. "onFocusAfterTrapped",
  35384. "onFocusAfterReleased",
  35385. "onFocusoutPrevented",
  35386. "onReleaseRequested"
  35387. ])], 46, _hoisted_1$42)]),
  35388. _: 3
  35389. }, 8, [
  35390. "mask",
  35391. "overlay-class",
  35392. "z-index"
  35393. ]), [[vShow, unref(visible)]])]),
  35394. _: 3
  35395. }, 16)], 8, ["to", "disabled"]);
  35396. };
  35397. }
  35398. }));
  35399. //#endregion
  35400. //#region node_modules/element-plus/es/components/divider/src/divider.mjs
  35401. /**
  35402. * @deprecated Removed after 3.0.0, Use `DividerProps` instead.
  35403. */
  35404. var dividerProps = buildProps({
  35405. /**
  35406. * @description Set divider's direction
  35407. */
  35408. direction: {
  35409. type: String,
  35410. values: ["horizontal", "vertical"],
  35411. default: "horizontal"
  35412. },
  35413. /**
  35414. * @description The position of the customized content on the divider line
  35415. */
  35416. contentPosition: {
  35417. type: String,
  35418. values: [
  35419. "left",
  35420. "center",
  35421. "right"
  35422. ],
  35423. default: "center"
  35424. },
  35425. /**
  35426. * @description Set the style of divider
  35427. */
  35428. borderStyle: {
  35429. type: definePropType(String),
  35430. default: "solid"
  35431. }
  35432. });
  35433. //#endregion
  35434. //#region node_modules/element-plus/es/components/divider/index.mjs
  35435. var ElDivider = withInstall(/* @__PURE__ */ defineComponent({
  35436. name: "ElDivider",
  35437. __name: "divider",
  35438. props: dividerProps,
  35439. setup(__props) {
  35440. const props = __props;
  35441. const ns = useNamespace("divider");
  35442. const dividerStyle = computed(() => {
  35443. return ns.cssVar({ "border-style": props.borderStyle });
  35444. });
  35445. return (_ctx, _cache) => {
  35446. return openBlock(), createElementBlock("div", {
  35447. class: normalizeClass([unref(ns).b(), unref(ns).m(__props.direction)]),
  35448. style: normalizeStyle(dividerStyle.value),
  35449. role: "separator"
  35450. }, [_ctx.$slots.default && __props.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
  35451. key: 0,
  35452. class: normalizeClass([unref(ns).e("text"), unref(ns).is(__props.contentPosition)])
  35453. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)], 6);
  35454. };
  35455. }
  35456. }));
  35457. //#endregion
  35458. //#region node_modules/element-plus/es/components/drawer/src/drawer.mjs
  35459. /**
  35460. * @deprecated Removed after 3.0.0, Use `DrawerProps` instead.
  35461. */
  35462. var drawerProps = buildProps({
  35463. ...dialogProps,
  35464. direction: {
  35465. type: String,
  35466. default: "rtl",
  35467. values: [
  35468. "ltr",
  35469. "rtl",
  35470. "ttb",
  35471. "btt"
  35472. ]
  35473. },
  35474. resizable: Boolean,
  35475. size: {
  35476. type: [String, Number],
  35477. default: "30%"
  35478. },
  35479. withHeader: {
  35480. type: Boolean,
  35481. default: true
  35482. },
  35483. modalFade: {
  35484. type: Boolean,
  35485. default: true
  35486. },
  35487. headerAriaLevel: {
  35488. type: String,
  35489. default: "2"
  35490. }
  35491. });
  35492. var drawerEmits = {
  35493. ...dialogEmits,
  35494. "resize-start": (evt, size) => evt instanceof MouseEvent && typeof size === "number",
  35495. resize: (evt, size) => evt instanceof MouseEvent && typeof size === "number",
  35496. "resize-end": (evt, size) => evt instanceof MouseEvent && typeof size === "number"
  35497. };
  35498. //#endregion
  35499. //#region node_modules/element-plus/es/components/drawer/src/composables/useResizable.mjs
  35500. function useResizable(props, target, emit) {
  35501. const { width, height } = useWindowSize();
  35502. const isHorizontal = computed(() => ["ltr", "rtl"].includes(props.direction));
  35503. const sign = computed(() => ["ltr", "ttb"].includes(props.direction) ? 1 : -1);
  35504. const windowSize = computed(() => isHorizontal.value ? width.value : height.value);
  35505. const getSize = computed(() => {
  35506. return clamp$1(startSize.value + sign.value * offset.value, 4, windowSize.value);
  35507. });
  35508. const startSize = ref(0);
  35509. const offset = ref(0);
  35510. const isResizing = ref(false);
  35511. const hasStartedDragging = ref(false);
  35512. let startPos = [];
  35513. let cleanups = [];
  35514. const getActualSize = () => {
  35515. const drawerEl = target.value?.closest("[aria-modal=\"true\"]");
  35516. if (drawerEl) return isHorizontal.value ? drawerEl.offsetWidth : drawerEl.offsetHeight;
  35517. return 100;
  35518. };
  35519. watch(() => [props.size, props.resizable], () => {
  35520. hasStartedDragging.value = false;
  35521. startSize.value = 0;
  35522. offset.value = 0;
  35523. onMouseUp();
  35524. });
  35525. const onMousedown = (e) => {
  35526. if (!props.resizable) return;
  35527. if (!hasStartedDragging.value) {
  35528. startSize.value = getActualSize();
  35529. hasStartedDragging.value = true;
  35530. }
  35531. startPos = [e.pageX, e.pageY];
  35532. isResizing.value = true;
  35533. emit("resize-start", e, startSize.value);
  35534. cleanups.push(useEventListener(window, "mouseup", onMouseUp), useEventListener(window, "mousemove", onMouseMove));
  35535. };
  35536. const onMouseMove = (e) => {
  35537. const { pageX, pageY } = e;
  35538. const offsetX = pageX - startPos[0];
  35539. const offsetY = pageY - startPos[1];
  35540. offset.value = isHorizontal.value ? offsetX : offsetY;
  35541. emit("resize", e, getSize.value);
  35542. };
  35543. const onMouseUp = (e) => {
  35544. if (!isResizing.value) return;
  35545. startPos = [];
  35546. startSize.value = getSize.value;
  35547. offset.value = 0;
  35548. isResizing.value = false;
  35549. cleanups.forEach((cleanup) => cleanup?.());
  35550. cleanups = [];
  35551. if (e) emit("resize-end", e, startSize.value);
  35552. };
  35553. const cleanup = useEventListener(target, "mousedown", onMousedown);
  35554. onBeforeUnmount(() => {
  35555. cleanup();
  35556. onMouseUp();
  35557. });
  35558. return {
  35559. size: computed(() => {
  35560. return hasStartedDragging.value ? `${getSize.value}px` : addUnit(props.size);
  35561. }),
  35562. isResizing,
  35563. isHorizontal
  35564. };
  35565. }
  35566. //#endregion
  35567. //#region node_modules/element-plus/es/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.mjs
  35568. var _hoisted_1$41 = [
  35569. "aria-label",
  35570. "aria-labelledby",
  35571. "aria-describedby"
  35572. ];
  35573. var _hoisted_2$25 = ["id", "aria-level"];
  35574. var _hoisted_3$9 = ["aria-label"];
  35575. var _hoisted_4$7 = ["id"];
  35576. //#endregion
  35577. //#region node_modules/element-plus/es/components/drawer/index.mjs
  35578. var ElDrawer = withInstall(/* @__PURE__ */ defineComponent({
  35579. name: "ElDrawer",
  35580. inheritAttrs: false,
  35581. __name: "drawer",
  35582. props: drawerProps,
  35583. emits: drawerEmits,
  35584. setup(__props, { expose: __expose, emit: __emit }) {
  35585. const props = __props;
  35586. const emit = __emit;
  35587. const slots = useSlots();
  35588. useDeprecated({
  35589. scope: "el-drawer",
  35590. from: "the title slot",
  35591. replacement: "the header slot",
  35592. version: "3.0.0",
  35593. ref: "https://element-plus.org/en-US/component/drawer.html#slots"
  35594. }, computed(() => !!slots.title));
  35595. const drawerRef = ref();
  35596. const focusStartRef = ref();
  35597. const draggerRef = ref();
  35598. const ns = useNamespace("drawer");
  35599. const { t } = useLocale();
  35600. const { afterEnter, afterLeave, beforeLeave, visible, rendered, titleId, bodyId, zIndex, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onFocusoutPrevented, onCloseRequested, handleClose } = useDialog(props, drawerRef);
  35601. const { isHorizontal, size, isResizing } = useResizable(props, draggerRef, emit);
  35602. const penetrable = computed(() => props.modalPenetrable && !props.modal);
  35603. __expose({ handleClose });
  35604. return (_ctx, _cache) => {
  35605. return openBlock(), createBlock(Teleport, {
  35606. to: __props.appendTo,
  35607. disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
  35608. }, [createVNode(Transition, {
  35609. name: unref(ns).b("fade"),
  35610. onAfterEnter: unref(afterEnter),
  35611. onAfterLeave: unref(afterLeave),
  35612. onBeforeLeave: unref(beforeLeave),
  35613. persisted: ""
  35614. }, {
  35615. default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
  35616. mask: __props.modal,
  35617. "overlay-class": [
  35618. unref(ns).is("drawer"),
  35619. __props.modalClass ?? "",
  35620. `${unref(ns).namespace.value}-modal-drawer`,
  35621. unref(ns).is("penetrable", penetrable.value)
  35622. ],
  35623. "z-index": unref(zIndex),
  35624. onClick: unref(onModalClick)
  35625. }, {
  35626. default: withCtx(() => [createVNode(unref(focus_trap_default$1), {
  35627. loop: "",
  35628. trapped: unref(visible),
  35629. "focus-trap-el": drawerRef.value,
  35630. "focus-start-el": focusStartRef.value,
  35631. onFocusAfterTrapped: unref(onOpenAutoFocus),
  35632. onFocusAfterReleased: unref(onCloseAutoFocus),
  35633. onFocusoutPrevented: unref(onFocusoutPrevented),
  35634. onReleaseRequested: unref(onCloseRequested)
  35635. }, {
  35636. default: withCtx(() => [createBaseVNode("div", mergeProps({
  35637. ref_key: "drawerRef",
  35638. ref: drawerRef,
  35639. "aria-modal": "true",
  35640. "aria-label": __props.title || void 0,
  35641. "aria-labelledby": !__props.title ? unref(titleId) : void 0,
  35642. "aria-describedby": unref(bodyId)
  35643. }, _ctx.$attrs, {
  35644. class: [
  35645. unref(ns).b(),
  35646. __props.direction,
  35647. unref(visible) && "open",
  35648. unref(ns).is("dragging", unref(isResizing))
  35649. ],
  35650. style: { [unref(isHorizontal) ? "width" : "height"]: unref(size) },
  35651. role: "dialog",
  35652. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  35653. }), [
  35654. createBaseVNode("span", {
  35655. ref_key: "focusStartRef",
  35656. ref: focusStartRef,
  35657. class: normalizeClass(unref(ns).e("sr-focus")),
  35658. tabindex: "-1"
  35659. }, null, 2),
  35660. __props.withHeader ? (openBlock(), createElementBlock("header", {
  35661. key: 0,
  35662. class: normalizeClass([unref(ns).e("header"), __props.headerClass])
  35663. }, [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
  35664. key: 0,
  35665. close: unref(handleClose),
  35666. titleId: unref(titleId),
  35667. titleClass: unref(ns).e("title")
  35668. }, () => [createBaseVNode("span", {
  35669. id: unref(titleId),
  35670. role: "heading",
  35671. "aria-level": __props.headerAriaLevel,
  35672. class: normalizeClass(unref(ns).e("title"))
  35673. }, toDisplayString(__props.title), 11, _hoisted_2$25)]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [createCommentVNode(" DEPRECATED SLOT ")]), __props.showClose ? (openBlock(), createElementBlock("button", {
  35674. key: 2,
  35675. "aria-label": unref(t)("el.drawer.close"),
  35676. class: normalizeClass(unref(ns).e("close-btn")),
  35677. type: "button",
  35678. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClose) && unref(handleClose)(...args))
  35679. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
  35680. default: withCtx(() => [createVNode(unref(close_default))]),
  35681. _: 1
  35682. }, 8, ["class"])], 10, _hoisted_3$9)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
  35683. unref(rendered) ? (openBlock(), createElementBlock("div", {
  35684. key: 1,
  35685. id: unref(bodyId),
  35686. class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
  35687. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_4$7)) : createCommentVNode("v-if", true),
  35688. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  35689. key: 2,
  35690. class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
  35691. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true),
  35692. __props.resizable ? (openBlock(), createElementBlock("div", {
  35693. key: 3,
  35694. ref_key: "draggerRef",
  35695. ref: draggerRef,
  35696. style: normalizeStyle({ zIndex: unref(zIndex) }),
  35697. class: normalizeClass(unref(ns).e("dragger"))
  35698. }, null, 6)) : createCommentVNode("v-if", true)
  35699. ], 16, _hoisted_1$41)]),
  35700. _: 3
  35701. }, 8, [
  35702. "trapped",
  35703. "focus-trap-el",
  35704. "focus-start-el",
  35705. "onFocusAfterTrapped",
  35706. "onFocusAfterReleased",
  35707. "onFocusoutPrevented",
  35708. "onReleaseRequested"
  35709. ])]),
  35710. _: 3
  35711. }, 8, [
  35712. "mask",
  35713. "overlay-class",
  35714. "z-index",
  35715. "onClick"
  35716. ]), [[vShow, unref(visible)]])]),
  35717. _: 3
  35718. }, 8, [
  35719. "name",
  35720. "onAfterEnter",
  35721. "onAfterLeave",
  35722. "onBeforeLeave"
  35723. ])], 8, ["to", "disabled"]);
  35724. };
  35725. }
  35726. }));
  35727. //#endregion
  35728. //#region node_modules/element-plus/es/components/dropdown/src/dropdown.mjs
  35729. var dropdownProps = buildProps({
  35730. /**
  35731. * @description how to trigger
  35732. */
  35733. trigger: {
  35734. ...useTooltipTriggerProps.trigger,
  35735. type: definePropType([String, Array])
  35736. },
  35737. triggerKeys: {
  35738. type: definePropType(Array),
  35739. default: () => [
  35740. EVENT_CODE.enter,
  35741. EVENT_CODE.numpadEnter,
  35742. EVENT_CODE.space,
  35743. EVENT_CODE.down
  35744. ]
  35745. },
  35746. /**
  35747. * @description Indicates whether virtual triggering is enabled
  35748. */
  35749. virtualTriggering: useTooltipTriggerProps.virtualTriggering,
  35750. /**
  35751. * @description Indicates the reference element to which the dropdown is attached
  35752. */
  35753. virtualRef: useTooltipTriggerProps.virtualRef,
  35754. /**
  35755. * @description Tooltip theme, built-in theme: `dark` / `light`
  35756. */
  35757. effect: {
  35758. ...useTooltipContentProps.effect,
  35759. default: "light"
  35760. },
  35761. /**
  35762. * @description menu button type, refer to `Button` Component, only works when `split-button` is true
  35763. */
  35764. type: { type: definePropType(String) },
  35765. /**
  35766. * @description placement of pop menu
  35767. */
  35768. placement: {
  35769. type: definePropType(String),
  35770. default: "bottom"
  35771. },
  35772. /**
  35773. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  35774. */
  35775. popperOptions: {
  35776. type: definePropType(Object),
  35777. default: () => ({})
  35778. },
  35779. id: String,
  35780. /**
  35781. * @description menu size, also works on the split button
  35782. */
  35783. size: {
  35784. type: String,
  35785. default: ""
  35786. },
  35787. /**
  35788. * @description whether a button group is displayed
  35789. */
  35790. splitButton: Boolean,
  35791. /**
  35792. * @description whether to hide menu after clicking menu-item
  35793. */
  35794. hideOnClick: {
  35795. type: Boolean,
  35796. default: true
  35797. },
  35798. loop: {
  35799. type: Boolean,
  35800. default: true
  35801. },
  35802. /**
  35803. * @description whether the tooltip content has an arrow
  35804. */
  35805. showArrow: {
  35806. type: Boolean,
  35807. default: true
  35808. },
  35809. /**
  35810. * @description delay time before show a dropdown (only works when trigger is `hover`)
  35811. */
  35812. showTimeout: {
  35813. type: Number,
  35814. default: 150
  35815. },
  35816. /**
  35817. * @description delay time before hide a dropdown (only works when trigger is `hover`)
  35818. */
  35819. hideTimeout: {
  35820. type: Number,
  35821. default: 150
  35822. },
  35823. /**
  35824. * @description [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Dropdown
  35825. */
  35826. tabindex: {
  35827. type: definePropType([Number, String]),
  35828. default: 0
  35829. },
  35830. /**
  35831. * @description the max height of menu
  35832. */
  35833. maxHeight: {
  35834. type: definePropType([Number, String]),
  35835. default: ""
  35836. },
  35837. /**
  35838. * @description custom class name for Dropdown's dropdown
  35839. */
  35840. popperClass: useTooltipContentProps.popperClass,
  35841. /**
  35842. * @description custom style for Dropdown's dropdown
  35843. */
  35844. popperStyle: useTooltipContentProps.popperStyle,
  35845. /**
  35846. * @description whether to disable
  35847. */
  35848. disabled: Boolean,
  35849. /**
  35850. * @description the ARIA role attribute for the dropdown menu. Depending on the use case, you may want to change this to 'navigation'
  35851. */
  35852. role: {
  35853. type: String,
  35854. values: roleTypes,
  35855. default: "menu"
  35856. },
  35857. buttonProps: { type: definePropType(Object) },
  35858. /**
  35859. * @description whether the dropdown popup is teleported to the body
  35860. */
  35861. teleported: useTooltipContentProps.teleported,
  35862. /**
  35863. * @description which element the dropdown CONTENT appends to
  35864. */
  35865. appendTo: useTooltipContentProps.appendTo,
  35866. /**
  35867. * @description when dropdown inactive and `persistent` is `false` , dropdown menu will be destroyed
  35868. */
  35869. persistent: {
  35870. type: Boolean,
  35871. default: true
  35872. }
  35873. });
  35874. var dropdownItemProps = buildProps({
  35875. /**
  35876. * @description a command to be dispatched to Dropdown's `command` callback
  35877. */
  35878. command: {
  35879. type: [
  35880. Object,
  35881. String,
  35882. Number
  35883. ],
  35884. default: () => ({})
  35885. },
  35886. /**
  35887. * @description whether the item is disabled
  35888. */
  35889. disabled: Boolean,
  35890. /**
  35891. * @description whether a divider is displayed
  35892. */
  35893. divided: Boolean,
  35894. textValue: String,
  35895. /**
  35896. * @description custom icon
  35897. */
  35898. icon: { type: iconPropType }
  35899. });
  35900. var dropdownMenuProps = buildProps({ onKeydown: { type: definePropType(Function) } });
  35901. var FIRST_KEYS = [
  35902. EVENT_CODE.down,
  35903. EVENT_CODE.pageDown,
  35904. EVENT_CODE.home
  35905. ];
  35906. var LAST_KEYS = [
  35907. EVENT_CODE.up,
  35908. EVENT_CODE.pageUp,
  35909. EVENT_CODE.end
  35910. ];
  35911. var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
  35912. //#endregion
  35913. //#region node_modules/element-plus/es/components/dropdown/src/tokens.mjs
  35914. var DROPDOWN_INJECTION_KEY = Symbol("elDropdown");
  35915. var DROPDOWN_INSTANCE_INJECTION_KEY = "elDropdown";
  35916. //#endregion
  35917. //#region node_modules/element-plus/es/components/collection/src/collection.vue_vue_type_script_lang.mjs
  35918. var collection_vue_vue_type_script_lang_default = defineComponent({ inheritAttrs: false });
  35919. //#endregion
  35920. //#region node_modules/element-plus/es/components/collection/src/collection2.mjs
  35921. function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
  35922. return renderSlot(_ctx.$slots, "default");
  35923. }
  35924. var collection_default = /* @__PURE__ */ _plugin_vue_export_helper_default(collection_vue_vue_type_script_lang_default, [["render", _sfc_render$15]]);
  35925. //#endregion
  35926. //#region node_modules/element-plus/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs
  35927. var collection_item_vue_vue_type_script_lang_default = defineComponent({
  35928. name: "ElCollectionItem",
  35929. inheritAttrs: false
  35930. });
  35931. //#endregion
  35932. //#region node_modules/element-plus/es/components/collection/src/collection-item.mjs
  35933. function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
  35934. return renderSlot(_ctx.$slots, "default");
  35935. }
  35936. var collection_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(collection_item_vue_vue_type_script_lang_default, [["render", _sfc_render$14]]);
  35937. //#endregion
  35938. //#region node_modules/element-plus/es/components/collection/src/collection.mjs
  35939. var COLLECTION_ITEM_SIGN = `data-el-collection-item`;
  35940. var createCollectionWithScope = (name) => {
  35941. const COLLECTION_NAME = `El${name}Collection`;
  35942. const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
  35943. const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
  35944. const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
  35945. return {
  35946. COLLECTION_INJECTION_KEY,
  35947. COLLECTION_ITEM_INJECTION_KEY,
  35948. ElCollection: Object.assign({}, collection_default, {
  35949. name: COLLECTION_NAME,
  35950. setup() {
  35951. const collectionRef = ref();
  35952. const itemMap = /* @__PURE__ */ new Map();
  35953. const getItems = (() => {
  35954. const collectionEl = unref(collectionRef);
  35955. if (!collectionEl) return [];
  35956. const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
  35957. return [...itemMap.values()].sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
  35958. });
  35959. provide(COLLECTION_INJECTION_KEY, {
  35960. itemMap,
  35961. getItems,
  35962. collectionRef
  35963. });
  35964. }
  35965. }),
  35966. ElCollectionItem: Object.assign({}, collection_item_default, {
  35967. name: COLLECTION_ITEM_NAME,
  35968. setup(_, { attrs }) {
  35969. const collectionItemRef = ref();
  35970. const collectionInjection = inject(COLLECTION_INJECTION_KEY, void 0);
  35971. provide(COLLECTION_ITEM_INJECTION_KEY, { collectionItemRef });
  35972. onMounted(() => {
  35973. const collectionItemEl = unref(collectionItemRef);
  35974. if (collectionItemEl) collectionInjection.itemMap.set(collectionItemEl, {
  35975. ref: collectionItemEl,
  35976. ...attrs
  35977. });
  35978. });
  35979. onBeforeUnmount(() => {
  35980. const collectionItemEl = unref(collectionItemRef);
  35981. collectionInjection.itemMap.delete(collectionItemEl);
  35982. });
  35983. }
  35984. })
  35985. };
  35986. };
  35987. //#endregion
  35988. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
  35989. var rovingFocusGroupProps = buildProps({
  35990. style: {
  35991. type: definePropType([
  35992. String,
  35993. Array,
  35994. Object,
  35995. Boolean
  35996. ]),
  35997. default: void 0
  35998. },
  35999. currentTabId: { type: definePropType(String) },
  36000. defaultCurrentTabId: String,
  36001. loop: Boolean,
  36002. dir: {
  36003. type: String,
  36004. values: ["ltr", "rtl"],
  36005. default: "ltr"
  36006. },
  36007. orientation: { type: definePropType(String) },
  36008. onBlur: Function,
  36009. onFocus: Function,
  36010. onMousedown: Function
  36011. });
  36012. var { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY } = createCollectionWithScope("RovingFocusGroup");
  36013. //#endregion
  36014. //#region node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
  36015. var ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
  36016. var ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
  36017. //#endregion
  36018. //#region node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
  36019. var MAP_KEY_TO_FOCUS_INTENT = {
  36020. ArrowLeft: "prev",
  36021. ArrowUp: "prev",
  36022. ArrowRight: "next",
  36023. ArrowDown: "next",
  36024. PageUp: "first",
  36025. Home: "first",
  36026. PageDown: "last",
  36027. End: "last"
  36028. };
  36029. var getDirectionAwareKey = (key, dir) => {
  36030. if (dir !== "rtl") return key;
  36031. switch (key) {
  36032. case EVENT_CODE.right: return EVENT_CODE.left;
  36033. case EVENT_CODE.left: return EVENT_CODE.right;
  36034. default: return key;
  36035. }
  36036. };
  36037. var getFocusIntent = (event, orientation, dir) => {
  36038. const key = getDirectionAwareKey(getEventCode(event), dir);
  36039. if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key)) return void 0;
  36040. if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key)) return void 0;
  36041. return MAP_KEY_TO_FOCUS_INTENT[key];
  36042. };
  36043. var reorderArray = (array, atIdx) => {
  36044. return array.map((_, idx) => array[(idx + atIdx) % array.length]);
  36045. };
  36046. var focusFirst = (elements) => {
  36047. const { activeElement: prevActive } = document;
  36048. for (const element of elements) {
  36049. if (element === prevActive) return;
  36050. element.focus();
  36051. if (prevActive !== document.activeElement) return;
  36052. }
  36053. };
  36054. //#endregion
  36055. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs
  36056. var CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
  36057. var ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
  36058. var EVT_OPTS = {
  36059. bubbles: false,
  36060. cancelable: true
  36061. };
  36062. var roving_focus_group_impl_vue_vue_type_script_lang_default = defineComponent({
  36063. name: "ElRovingFocusGroupImpl",
  36064. inheritAttrs: false,
  36065. props: rovingFocusGroupProps,
  36066. emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
  36067. setup(props, { emit }) {
  36068. const currentTabbedId = ref((props.currentTabId || props.defaultCurrentTabId) ?? null);
  36069. const isBackingOut = ref(false);
  36070. const isClickFocus = ref(false);
  36071. const rovingFocusGroupRef = ref();
  36072. const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
  36073. const rovingFocusGroupRootStyle = computed(() => {
  36074. return [{ outline: "none" }, props.style];
  36075. });
  36076. const onItemFocus = (tabbedId) => {
  36077. emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId);
  36078. };
  36079. const onItemShiftTab = () => {
  36080. isBackingOut.value = true;
  36081. };
  36082. const onMousedown = composeEventHandlers((e) => {
  36083. props.onMousedown?.(e);
  36084. }, () => {
  36085. isClickFocus.value = true;
  36086. });
  36087. const onFocus = composeEventHandlers((e) => {
  36088. props.onFocus?.(e);
  36089. }, (e) => {
  36090. const isKeyboardFocus = !unref(isClickFocus);
  36091. const { target, currentTarget } = e;
  36092. if (target === currentTarget && isKeyboardFocus && !unref(isBackingOut)) {
  36093. const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS);
  36094. currentTarget?.dispatchEvent(entryFocusEvt);
  36095. if (!entryFocusEvt.defaultPrevented) {
  36096. const items = getItems().filter((item) => item.focusable);
  36097. focusFirst([
  36098. items.find((item) => item.active),
  36099. items.find((item) => item.id === unref(currentTabbedId)),
  36100. ...items
  36101. ].filter(Boolean).map((item) => item.ref));
  36102. }
  36103. }
  36104. isClickFocus.value = false;
  36105. });
  36106. const onBlur = composeEventHandlers((e) => {
  36107. props.onBlur?.(e);
  36108. }, () => {
  36109. isBackingOut.value = false;
  36110. });
  36111. const handleEntryFocus = (...args) => {
  36112. emit("entryFocus", ...args);
  36113. };
  36114. const onKeydown = (e) => {
  36115. const focusIntent = getFocusIntent(e);
  36116. if (focusIntent) {
  36117. e.preventDefault();
  36118. let elements = getItems().filter((item) => item.focusable).map((item) => item.ref);
  36119. switch (focusIntent) {
  36120. case "last":
  36121. elements.reverse();
  36122. break;
  36123. case "prev":
  36124. case "next": {
  36125. if (focusIntent === "prev") elements.reverse();
  36126. const currentIdx = elements.indexOf(e.currentTarget);
  36127. elements = props.loop ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1);
  36128. break;
  36129. }
  36130. default: break;
  36131. }
  36132. nextTick(() => {
  36133. focusFirst(elements);
  36134. });
  36135. }
  36136. };
  36137. provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {
  36138. currentTabbedId: readonly(currentTabbedId),
  36139. loop: toRef(props, "loop"),
  36140. tabIndex: computed(() => {
  36141. return unref(isBackingOut) ? -1 : 0;
  36142. }),
  36143. rovingFocusGroupRef,
  36144. rovingFocusGroupRootStyle,
  36145. orientation: toRef(props, "orientation"),
  36146. dir: toRef(props, "dir"),
  36147. onItemFocus,
  36148. onItemShiftTab,
  36149. onBlur,
  36150. onFocus,
  36151. onMousedown,
  36152. onKeydown
  36153. });
  36154. watch(() => props.currentTabId, (val) => {
  36155. currentTabbedId.value = val ?? null;
  36156. });
  36157. useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
  36158. }
  36159. });
  36160. //#endregion
  36161. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
  36162. function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
  36163. return renderSlot(_ctx.$slots, "default");
  36164. }
  36165. //#endregion
  36166. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs
  36167. var roving_focus_group_vue_vue_type_script_lang_default = defineComponent({
  36168. name: "ElRovingFocusGroup",
  36169. components: {
  36170. ElFocusGroupCollection: ElCollection,
  36171. ElRovingFocusGroupImpl: /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_impl_vue_vue_type_script_lang_default, [["render", _sfc_render$13]])
  36172. }
  36173. });
  36174. //#endregion
  36175. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
  36176. function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
  36177. const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
  36178. const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
  36179. return openBlock(), createBlock(_component_el_focus_group_collection, null, {
  36180. default: withCtx(() => [createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
  36181. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  36182. _: 3
  36183. }, 16)]),
  36184. _: 3
  36185. });
  36186. }
  36187. var roving_focus_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_vue_vue_type_script_lang_default, [["render", _sfc_render$12]]);
  36188. //#endregion
  36189. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs
  36190. var roving_focus_item_vue_vue_type_script_lang_default = defineComponent({
  36191. components: { ElRovingFocusCollectionItem: ElCollectionItem },
  36192. props: {
  36193. focusable: {
  36194. type: Boolean,
  36195. default: true
  36196. },
  36197. active: Boolean
  36198. },
  36199. emits: [
  36200. "mousedown",
  36201. "focus",
  36202. "keydown"
  36203. ],
  36204. setup(props, { emit }) {
  36205. const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
  36206. const id = useId();
  36207. const rovingFocusGroupItemRef = ref();
  36208. const handleMousedown = composeEventHandlers((e) => {
  36209. emit("mousedown", e);
  36210. }, (e) => {
  36211. if (!props.focusable) e.preventDefault();
  36212. else onItemFocus(unref(id));
  36213. });
  36214. const handleFocus = composeEventHandlers((e) => {
  36215. emit("focus", e);
  36216. }, () => {
  36217. onItemFocus(unref(id));
  36218. });
  36219. const handleKeydown = composeEventHandlers((e) => {
  36220. emit("keydown", e);
  36221. }, (e) => {
  36222. const { shiftKey, target, currentTarget } = e;
  36223. if (getEventCode(e) === EVENT_CODE.tab && shiftKey) {
  36224. onItemShiftTab();
  36225. return;
  36226. }
  36227. if (target !== currentTarget) return;
  36228. onKeydown(e);
  36229. });
  36230. const isCurrentTab = computed(() => currentTabbedId.value === unref(id));
  36231. provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {
  36232. rovingFocusGroupItemRef,
  36233. tabIndex: computed(() => unref(isCurrentTab) ? 0 : -1),
  36234. handleMousedown,
  36235. handleFocus,
  36236. handleKeydown
  36237. });
  36238. return {
  36239. id,
  36240. handleKeydown,
  36241. handleFocus,
  36242. handleMousedown
  36243. };
  36244. }
  36245. });
  36246. //#endregion
  36247. //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
  36248. function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
  36249. const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item");
  36250. return openBlock(), createBlock(_component_el_roving_focus_collection_item, {
  36251. id: _ctx.id,
  36252. focusable: _ctx.focusable,
  36253. active: _ctx.active
  36254. }, {
  36255. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  36256. _: 3
  36257. }, 8, [
  36258. "id",
  36259. "focusable",
  36260. "active"
  36261. ]);
  36262. }
  36263. var roving_focus_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_item_vue_vue_type_script_lang_default, [["render", _sfc_render$11]]);
  36264. //#endregion
  36265. //#region node_modules/element-plus/es/components/roving-focus-group/index.mjs
  36266. var roving_focus_group_default$1 = roving_focus_group_default;
  36267. //#endregion
  36268. //#region node_modules/element-plus/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs
  36269. var { ButtonGroup: ElButtonGroup$1 } = ElButton;
  36270. var dropdown_vue_vue_type_script_lang_default = defineComponent({
  36271. name: "ElDropdown",
  36272. components: {
  36273. ElButton,
  36274. ElButtonGroup: ElButtonGroup$1,
  36275. ElScrollbar,
  36276. ElTooltip,
  36277. ElRovingFocusGroup: roving_focus_group_default$1,
  36278. ElOnlyChild: OnlyChild,
  36279. ElIcon,
  36280. ArrowDown: arrow_down_default
  36281. },
  36282. props: dropdownProps,
  36283. emits: [
  36284. "visible-change",
  36285. "click",
  36286. "command"
  36287. ],
  36288. setup(props, { emit }) {
  36289. const _instance = getCurrentInstance();
  36290. const ns = useNamespace("dropdown");
  36291. const { t } = useLocale();
  36292. const triggeringElementRef = ref();
  36293. const referenceElementRef = ref();
  36294. const popperRef = ref();
  36295. const contentRef = ref();
  36296. const scrollbar = ref(null);
  36297. const currentTabId = ref(null);
  36298. const isUsingKeyboard = ref(false);
  36299. const wrapStyle = computed(() => ({ maxHeight: addUnit(props.maxHeight) }));
  36300. const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)]);
  36301. const trigger = computed(() => castArray$1(props.trigger));
  36302. const defaultTriggerId = useId().value;
  36303. const triggerId = computed(() => props.id || defaultTriggerId);
  36304. function handleClick() {
  36305. popperRef.value?.onClose(void 0, 0);
  36306. }
  36307. function handleClose() {
  36308. popperRef.value?.onClose();
  36309. }
  36310. function handleOpen() {
  36311. popperRef.value?.onOpen();
  36312. }
  36313. const dropdownSize = useFormSize();
  36314. function commandHandler(...args) {
  36315. emit("command", ...args);
  36316. }
  36317. function onItemEnter() {}
  36318. function onItemLeave() {
  36319. const contentEl = unref(contentRef);
  36320. trigger.value.includes("hover") && contentEl?.focus({ preventScroll: true });
  36321. currentTabId.value = null;
  36322. }
  36323. function handleCurrentTabIdChange(id) {
  36324. currentTabId.value = id;
  36325. }
  36326. function handleBeforeShowTooltip() {
  36327. emit("visible-change", true);
  36328. }
  36329. function handleShowTooltip(event) {
  36330. isUsingKeyboard.value = event?.type === "keydown";
  36331. contentRef.value?.focus();
  36332. }
  36333. function handleBeforeHideTooltip() {
  36334. emit("visible-change", false);
  36335. }
  36336. provide(DROPDOWN_INJECTION_KEY, {
  36337. contentRef,
  36338. role: computed(() => props.role),
  36339. triggerId,
  36340. isUsingKeyboard,
  36341. onItemEnter,
  36342. onItemLeave,
  36343. handleClose
  36344. });
  36345. provide(DROPDOWN_INSTANCE_INJECTION_KEY, {
  36346. instance: _instance,
  36347. dropdownSize,
  36348. handleClick,
  36349. commandHandler,
  36350. trigger: toRef(props, "trigger"),
  36351. hideOnClick: toRef(props, "hideOnClick")
  36352. });
  36353. const handlerMainButtonClick = (event) => {
  36354. emit("click", event);
  36355. };
  36356. return {
  36357. t,
  36358. ns,
  36359. scrollbar,
  36360. wrapStyle,
  36361. dropdownTriggerKls,
  36362. dropdownSize,
  36363. triggerId,
  36364. currentTabId,
  36365. handleCurrentTabIdChange,
  36366. handlerMainButtonClick,
  36367. handleClose,
  36368. handleOpen,
  36369. handleBeforeShowTooltip,
  36370. handleShowTooltip,
  36371. handleBeforeHideTooltip,
  36372. popperRef,
  36373. contentRef,
  36374. triggeringElementRef,
  36375. referenceElementRef
  36376. };
  36377. }
  36378. });
  36379. //#endregion
  36380. //#region node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs
  36381. function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
  36382. const _component_el_roving_focus_group = resolveComponent("el-roving-focus-group");
  36383. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  36384. const _component_el_only_child = resolveComponent("el-only-child");
  36385. const _component_el_tooltip = resolveComponent("el-tooltip");
  36386. const _component_el_button = resolveComponent("el-button");
  36387. const _component_arrow_down = resolveComponent("arrow-down");
  36388. const _component_el_icon = resolveComponent("el-icon");
  36389. const _component_el_button_group = resolveComponent("el-button-group");
  36390. return openBlock(), createElementBlock("div", { class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("disabled", _ctx.disabled)]) }, [createVNode(_component_el_tooltip, {
  36391. ref: "popperRef",
  36392. role: _ctx.role,
  36393. effect: _ctx.effect,
  36394. "fallback-placements": ["bottom", "top"],
  36395. "popper-options": _ctx.popperOptions,
  36396. "gpu-acceleration": false,
  36397. placement: _ctx.placement,
  36398. "popper-class": [_ctx.ns.e("popper"), _ctx.popperClass],
  36399. "popper-style": _ctx.popperStyle,
  36400. trigger: _ctx.trigger,
  36401. "trigger-keys": _ctx.triggerKeys,
  36402. "trigger-target-el": _ctx.contentRef,
  36403. "show-arrow": _ctx.showArrow,
  36404. "show-after": _ctx.trigger === "hover" ? _ctx.showTimeout : 0,
  36405. "hide-after": _ctx.trigger === "hover" ? _ctx.hideTimeout : 0,
  36406. "virtual-ref": _ctx.virtualRef ?? _ctx.triggeringElementRef,
  36407. "virtual-triggering": _ctx.virtualTriggering || _ctx.splitButton,
  36408. disabled: _ctx.disabled,
  36409. transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
  36410. teleported: _ctx.teleported,
  36411. "append-to": _ctx.appendTo,
  36412. pure: "",
  36413. "focus-on-target": "",
  36414. persistent: _ctx.persistent,
  36415. onBeforeShow: _ctx.handleBeforeShowTooltip,
  36416. onShow: _ctx.handleShowTooltip,
  36417. onBeforeHide: _ctx.handleBeforeHideTooltip
  36418. }, createSlots({
  36419. content: withCtx(() => [createVNode(_component_el_scrollbar, {
  36420. ref: "scrollbar",
  36421. "wrap-style": _ctx.wrapStyle,
  36422. tag: "div",
  36423. "view-class": _ctx.ns.e("list")
  36424. }, {
  36425. default: withCtx(() => [createVNode(_component_el_roving_focus_group, {
  36426. loop: _ctx.loop,
  36427. "current-tab-id": _ctx.currentTabId,
  36428. orientation: "horizontal",
  36429. onCurrentTabIdChange: _ctx.handleCurrentTabIdChange
  36430. }, {
  36431. default: withCtx(() => [renderSlot(_ctx.$slots, "dropdown")]),
  36432. _: 3
  36433. }, 8, [
  36434. "loop",
  36435. "current-tab-id",
  36436. "onCurrentTabIdChange"
  36437. ])]),
  36438. _: 3
  36439. }, 8, ["wrap-style", "view-class"])]),
  36440. _: 2
  36441. }, [!_ctx.splitButton ? {
  36442. name: "default",
  36443. fn: withCtx(() => [createVNode(_component_el_only_child, {
  36444. id: _ctx.triggerId,
  36445. ref: "triggeringElementRef",
  36446. role: "button",
  36447. tabindex: _ctx.tabindex
  36448. }, {
  36449. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  36450. _: 3
  36451. }, 8, ["id", "tabindex"])]),
  36452. key: "0"
  36453. } : void 0]), 1032, [
  36454. "role",
  36455. "effect",
  36456. "popper-options",
  36457. "placement",
  36458. "popper-class",
  36459. "popper-style",
  36460. "trigger",
  36461. "trigger-keys",
  36462. "trigger-target-el",
  36463. "show-arrow",
  36464. "show-after",
  36465. "hide-after",
  36466. "virtual-ref",
  36467. "virtual-triggering",
  36468. "disabled",
  36469. "transition",
  36470. "teleported",
  36471. "append-to",
  36472. "persistent",
  36473. "onBeforeShow",
  36474. "onShow",
  36475. "onBeforeHide"
  36476. ]), _ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, {
  36477. default: withCtx(() => [createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
  36478. size: _ctx.dropdownSize,
  36479. type: _ctx.type,
  36480. disabled: _ctx.disabled,
  36481. tabindex: _ctx.tabindex,
  36482. onClick: _ctx.handlerMainButtonClick
  36483. }), {
  36484. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  36485. _: 3
  36486. }, 16, [
  36487. "size",
  36488. "type",
  36489. "disabled",
  36490. "tabindex",
  36491. "onClick"
  36492. ]), createVNode(_component_el_button, mergeProps({
  36493. id: _ctx.triggerId,
  36494. ref: "triggeringElementRef"
  36495. }, _ctx.buttonProps, {
  36496. role: "button",
  36497. size: _ctx.dropdownSize,
  36498. type: _ctx.type,
  36499. class: _ctx.ns.e("caret-button"),
  36500. disabled: _ctx.disabled,
  36501. tabindex: _ctx.tabindex,
  36502. "aria-label": _ctx.t("el.dropdown.toggleDropdown")
  36503. }), {
  36504. default: withCtx(() => [createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("icon")) }, {
  36505. default: withCtx(() => [createVNode(_component_arrow_down)]),
  36506. _: 1
  36507. }, 8, ["class"])]),
  36508. _: 1
  36509. }, 16, [
  36510. "id",
  36511. "size",
  36512. "type",
  36513. "class",
  36514. "disabled",
  36515. "tabindex",
  36516. "aria-label"
  36517. ])]),
  36518. _: 3
  36519. })) : createCommentVNode("v-if", true)], 2);
  36520. }
  36521. var dropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render$10]]);
  36522. //#endregion
  36523. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs
  36524. var dropdown_item_impl_vue_vue_type_script_lang_default = defineComponent({
  36525. name: "DropdownItemImpl",
  36526. components: { ElIcon },
  36527. props: dropdownItemProps,
  36528. emits: [
  36529. "pointermove",
  36530. "pointerleave",
  36531. "click",
  36532. "clickimpl"
  36533. ],
  36534. setup(_, { emit }) {
  36535. const ns = useNamespace("dropdown");
  36536. const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, void 0);
  36537. const { collectionItemRef: rovingFocusCollectionItemRef } = inject(COLLECTION_ITEM_INJECTION_KEY, void 0);
  36538. const { rovingFocusGroupItemRef, tabIndex, handleFocus, handleKeydown: handleItemKeydown, handleMousedown } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, void 0);
  36539. const itemRef = composeRefs(rovingFocusCollectionItemRef, rovingFocusGroupItemRef);
  36540. const role = computed(() => {
  36541. if (menuRole.value === "menu") return "menuitem";
  36542. else if (menuRole.value === "navigation") return "link";
  36543. return "button";
  36544. });
  36545. const handleKeydown = composeEventHandlers((e) => {
  36546. const code = getEventCode(e);
  36547. if ([
  36548. EVENT_CODE.enter,
  36549. EVENT_CODE.numpadEnter,
  36550. EVENT_CODE.space
  36551. ].includes(code)) {
  36552. e.preventDefault();
  36553. e.stopImmediatePropagation();
  36554. emit("clickimpl", e);
  36555. return true;
  36556. }
  36557. }, handleItemKeydown);
  36558. return {
  36559. ns,
  36560. itemRef,
  36561. dataset: { [COLLECTION_ITEM_SIGN]: "" },
  36562. role,
  36563. tabIndex,
  36564. handleFocus,
  36565. handleKeydown,
  36566. handleMousedown
  36567. };
  36568. }
  36569. });
  36570. //#endregion
  36571. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.mjs
  36572. var _hoisted_1$40 = [
  36573. "aria-disabled",
  36574. "tabindex",
  36575. "role"
  36576. ];
  36577. function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  36578. const _component_el_icon = resolveComponent("el-icon");
  36579. return openBlock(), createElementBlock(Fragment, null, [_ctx.divided ? (openBlock(), createElementBlock("li", {
  36580. key: 0,
  36581. role: "separator",
  36582. class: normalizeClass(_ctx.ns.bem("menu", "item", "divided"))
  36583. }, null, 2)) : createCommentVNode("v-if", true), createBaseVNode("li", mergeProps({ ref: _ctx.itemRef }, {
  36584. ..._ctx.dataset,
  36585. ..._ctx.$attrs
  36586. }, {
  36587. "aria-disabled": _ctx.disabled,
  36588. class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)],
  36589. tabindex: _ctx.tabIndex,
  36590. role: _ctx.role,
  36591. onClick: _cache[0] || (_cache[0] = (e) => _ctx.$emit("clickimpl", e)),
  36592. onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  36593. onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])),
  36594. onMousedown: _cache[3] || (_cache[3] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
  36595. onPointermove: _cache[4] || (_cache[4] = (e) => _ctx.$emit("pointermove", e)),
  36596. onPointerleave: _cache[5] || (_cache[5] = (e) => _ctx.$emit("pointerleave", e))
  36597. }), [_ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
  36598. default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))])]),
  36599. _: 3
  36600. })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$40)], 64);
  36601. }
  36602. var dropdown_item_impl_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_item_impl_vue_vue_type_script_lang_default, [["render", _sfc_render$9]]);
  36603. //#endregion
  36604. //#region node_modules/element-plus/es/components/dropdown/src/useDropdown.mjs
  36605. var useDropdown = () => {
  36606. const elDropdown = inject(DROPDOWN_INSTANCE_INJECTION_KEY, {});
  36607. return {
  36608. elDropdown,
  36609. _elDropdownSize: computed(() => elDropdown?.dropdownSize)
  36610. };
  36611. };
  36612. //#endregion
  36613. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs
  36614. var dropdown_item_vue_vue_type_script_lang_default = defineComponent({
  36615. name: "ElDropdownItem",
  36616. components: {
  36617. ElRovingFocusItem: roving_focus_item_default,
  36618. ElDropdownItemImpl: dropdown_item_impl_default
  36619. },
  36620. inheritAttrs: false,
  36621. props: dropdownItemProps,
  36622. emits: [
  36623. "pointermove",
  36624. "pointerleave",
  36625. "click"
  36626. ],
  36627. setup(props, { emit, attrs }) {
  36628. const { elDropdown } = useDropdown();
  36629. const _instance = getCurrentInstance();
  36630. const { onItemEnter, onItemLeave } = inject(DROPDOWN_INJECTION_KEY, void 0);
  36631. const handlePointerMove = composeEventHandlers((e) => {
  36632. emit("pointermove", e);
  36633. return e.defaultPrevented;
  36634. }, whenMouse((e) => {
  36635. if (props.disabled) {
  36636. onItemLeave(e);
  36637. return;
  36638. }
  36639. const target = e.currentTarget;
  36640. /**
  36641. * This handles the following scenario:
  36642. * when the item contains a form element such as input element
  36643. * when the mouse is moving over the element itself which is contained by
  36644. * the item, the default focusing logic should be prevented so that
  36645. * it won't cause weird action.
  36646. */
  36647. if (target === document.activeElement || target.contains(document.activeElement)) return;
  36648. onItemEnter(e);
  36649. if (!e.defaultPrevented) target?.focus({ preventScroll: true });
  36650. }));
  36651. const handlePointerLeave = composeEventHandlers((e) => {
  36652. emit("pointerleave", e);
  36653. return e.defaultPrevented;
  36654. }, whenMouse(onItemLeave));
  36655. return {
  36656. handleClick: composeEventHandlers((e) => {
  36657. if (props.disabled) return;
  36658. emit("click", e);
  36659. return e.type !== "keydown" && e.defaultPrevented;
  36660. }, (e) => {
  36661. if (props.disabled) {
  36662. e.stopImmediatePropagation();
  36663. return;
  36664. }
  36665. if (elDropdown?.hideOnClick?.value) elDropdown.handleClick?.();
  36666. elDropdown.commandHandler?.(props.command, _instance, e);
  36667. }),
  36668. handlePointerMove,
  36669. handlePointerLeave,
  36670. propsAndAttrs: computed(() => ({
  36671. ...props,
  36672. ...attrs
  36673. }))
  36674. };
  36675. }
  36676. });
  36677. //#endregion
  36678. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs
  36679. function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  36680. const _component_el_dropdown_item_impl = resolveComponent("el-dropdown-item-impl");
  36681. const _component_el_roving_focus_item = resolveComponent("el-roving-focus-item");
  36682. return openBlock(), createBlock(_component_el_roving_focus_item, { focusable: !_ctx.disabled }, {
  36683. default: withCtx(() => [createVNode(_component_el_dropdown_item_impl, mergeProps(_ctx.propsAndAttrs, {
  36684. onPointerleave: _ctx.handlePointerLeave,
  36685. onPointermove: _ctx.handlePointerMove,
  36686. onClickimpl: _ctx.handleClick
  36687. }), createSlots({
  36688. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  36689. _: 2
  36690. }, [_ctx.$slots.icon ? {
  36691. name: "icon",
  36692. fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
  36693. key: "0"
  36694. } : void 0]), 1040, [
  36695. "onPointerleave",
  36696. "onPointermove",
  36697. "onClickimpl"
  36698. ])]),
  36699. _: 3
  36700. }, 8, ["focusable"]);
  36701. }
  36702. var dropdown_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_item_vue_vue_type_script_lang_default, [["render", _sfc_render$8]]);
  36703. //#endregion
  36704. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs
  36705. var dropdown_menu_vue_vue_type_script_lang_default = defineComponent({
  36706. name: "ElDropdownMenu",
  36707. props: dropdownMenuProps,
  36708. setup(props) {
  36709. const ns = useNamespace("dropdown");
  36710. const { _elDropdownSize } = useDropdown();
  36711. const size = _elDropdownSize.value;
  36712. const { contentRef, role, triggerId, isUsingKeyboard, handleClose } = inject(DROPDOWN_INJECTION_KEY, void 0);
  36713. const { rovingFocusGroupRef, rovingFocusGroupRootStyle, onBlur, onFocus, onKeydown, onMousedown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
  36714. const { collectionRef: rovingFocusGroupCollectionRef } = inject(COLLECTION_INJECTION_KEY, void 0);
  36715. const dropdownKls = computed(() => {
  36716. return [ns.b("menu"), ns.bm("menu", size?.value)];
  36717. });
  36718. const dropdownListWrapperRef = composeRefs(contentRef, rovingFocusGroupRef, rovingFocusGroupCollectionRef);
  36719. const handleKeydown = composeEventHandlers((e) => {
  36720. props.onKeydown?.(e);
  36721. }, (e) => {
  36722. const { currentTarget, target } = e;
  36723. const code = getEventCode(e);
  36724. if (currentTarget.contains(target)) {}
  36725. if (EVENT_CODE.tab === code) return handleClose();
  36726. onKeydown(e);
  36727. });
  36728. function handleFocus(e) {
  36729. isUsingKeyboard.value && onFocus(e);
  36730. }
  36731. return {
  36732. size,
  36733. rovingFocusGroupRootStyle,
  36734. dropdownKls,
  36735. role,
  36736. triggerId,
  36737. dropdownListWrapperRef,
  36738. handleKeydown,
  36739. onBlur,
  36740. handleFocus,
  36741. onMousedown
  36742. };
  36743. }
  36744. });
  36745. //#endregion
  36746. //#region node_modules/element-plus/es/components/dropdown/src/dropdown-menu.mjs
  36747. var _hoisted_1$39 = ["role", "aria-labelledby"];
  36748. function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  36749. return openBlock(), createElementBlock("ul", {
  36750. ref: _ctx.dropdownListWrapperRef,
  36751. class: normalizeClass(_ctx.dropdownKls),
  36752. style: normalizeStyle(_ctx.rovingFocusGroupRootStyle),
  36753. tabindex: -1,
  36754. role: _ctx.role,
  36755. "aria-labelledby": _ctx.triggerId,
  36756. onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  36757. onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
  36758. onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])),
  36759. onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.onMousedown && _ctx.onMousedown(...args), ["self"]))
  36760. }, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_1$39);
  36761. }
  36762. var dropdown_menu_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_menu_vue_vue_type_script_lang_default, [["render", _sfc_render$7]]);
  36763. //#endregion
  36764. //#region node_modules/element-plus/es/components/dropdown/index.mjs
  36765. var ElDropdown = withInstall(dropdown_default, {
  36766. DropdownItem: dropdown_item_default,
  36767. DropdownMenu: dropdown_menu_default
  36768. });
  36769. var ElDropdownItem = withNoopInstall(dropdown_item_default);
  36770. var ElDropdownMenu = withNoopInstall(dropdown_menu_default);
  36771. //#endregion
  36772. //#region node_modules/element-plus/es/components/empty/src/empty.mjs
  36773. /**
  36774. * @deprecated Removed after 3.0.0, Use `EmptyProps` instead.
  36775. */
  36776. var emptyProps = buildProps({
  36777. /**
  36778. * @description image URL of empty
  36779. */
  36780. image: {
  36781. type: String,
  36782. default: ""
  36783. },
  36784. /**
  36785. * @description image size (width) of empty
  36786. */
  36787. imageSize: Number,
  36788. /**
  36789. * @description description of empty
  36790. */
  36791. description: {
  36792. type: String,
  36793. default: ""
  36794. }
  36795. });
  36796. //#endregion
  36797. //#region node_modules/element-plus/es/components/empty/src/img-empty.vue_vue_type_script_setup_true_lang.mjs
  36798. var _hoisted_1$38 = {
  36799. viewBox: "0 0 79 86",
  36800. version: "1.1",
  36801. xmlns: "http://www.w3.org/2000/svg",
  36802. "xmlns:xlink": "http://www.w3.org/1999/xlink"
  36803. };
  36804. var _hoisted_2$24 = ["id"];
  36805. var _hoisted_3$8 = ["stop-color"];
  36806. var _hoisted_4$6 = ["stop-color"];
  36807. var _hoisted_5$4 = ["id"];
  36808. var _hoisted_6$1 = ["stop-color"];
  36809. var _hoisted_7 = ["stop-color"];
  36810. var _hoisted_8 = ["id"];
  36811. var _hoisted_9 = {
  36812. stroke: "none",
  36813. "stroke-width": "1",
  36814. fill: "none",
  36815. "fill-rule": "evenodd"
  36816. };
  36817. var _hoisted_10 = { transform: "translate(-1268.000000, -535.000000)" };
  36818. var _hoisted_11 = { transform: "translate(1268.000000, 535.000000)" };
  36819. var _hoisted_12 = ["fill"];
  36820. var _hoisted_13 = ["fill"];
  36821. var _hoisted_14 = { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" };
  36822. var _hoisted_15 = ["fill"];
  36823. var _hoisted_16 = ["fill"];
  36824. var _hoisted_17 = ["fill"];
  36825. var _hoisted_18 = ["fill"];
  36826. var _hoisted_19 = ["fill"];
  36827. var _hoisted_20 = { transform: "translate(53.000000, 45.000000)" };
  36828. var _hoisted_21 = ["fill", "xlink:href"];
  36829. var _hoisted_22 = ["fill", "mask"];
  36830. var _hoisted_23 = ["fill"];
  36831. //#endregion
  36832. //#region node_modules/element-plus/es/components/empty/src/img-empty.mjs
  36833. var img_empty_default = /* @__PURE__ */ defineComponent({
  36834. name: "ImgEmpty",
  36835. __name: "img-empty",
  36836. setup(__props) {
  36837. const ns = useNamespace("empty");
  36838. const id = useId();
  36839. return (_ctx, _cache) => {
  36840. return openBlock(), createElementBlock("svg", _hoisted_1$38, [createBaseVNode("defs", null, [
  36841. createBaseVNode("linearGradient", {
  36842. id: `linearGradient-1-${unref(id)}`,
  36843. x1: "38.8503086%",
  36844. y1: "0%",
  36845. x2: "61.1496914%",
  36846. y2: "100%"
  36847. }, [createBaseVNode("stop", {
  36848. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
  36849. offset: "0%"
  36850. }, null, 8, _hoisted_3$8), createBaseVNode("stop", {
  36851. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-4")})`,
  36852. offset: "100%"
  36853. }, null, 8, _hoisted_4$6)], 8, _hoisted_2$24),
  36854. createBaseVNode("linearGradient", {
  36855. id: `linearGradient-2-${unref(id)}`,
  36856. x1: "0%",
  36857. y1: "9.5%",
  36858. x2: "100%",
  36859. y2: "90.5%"
  36860. }, [createBaseVNode("stop", {
  36861. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
  36862. offset: "0%"
  36863. }, null, 8, _hoisted_6$1), createBaseVNode("stop", {
  36864. "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`,
  36865. offset: "100%"
  36866. }, null, 8, _hoisted_7)], 8, _hoisted_5$4),
  36867. createBaseVNode("rect", {
  36868. id: `path-3-${unref(id)}`,
  36869. x: "0",
  36870. y: "0",
  36871. width: "17",
  36872. height: "36"
  36873. }, null, 8, _hoisted_8)
  36874. ]), createBaseVNode("g", _hoisted_9, [createBaseVNode("g", _hoisted_10, [createBaseVNode("g", _hoisted_11, [
  36875. createBaseVNode("path", {
  36876. d: "M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",
  36877. fill: `var(${unref(ns).cssVarBlockName("fill-color-3")})`
  36878. }, null, 8, _hoisted_12),
  36879. createBaseVNode("polygon", {
  36880. fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
  36881. transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
  36882. points: "13 58 53 58 42 45 2 45"
  36883. }, null, 8, _hoisted_13),
  36884. createBaseVNode("g", _hoisted_14, [
  36885. createBaseVNode("polygon", {
  36886. fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
  36887. transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
  36888. points: "2.84078316e-14 3 18 3 23 7 5 7"
  36889. }, null, 8, _hoisted_15),
  36890. createBaseVNode("polygon", {
  36891. fill: `var(${unref(ns).cssVarBlockName("fill-color-5")})`,
  36892. points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
  36893. }, null, 8, _hoisted_16),
  36894. createBaseVNode("rect", {
  36895. fill: `url(#linearGradient-1-${unref(id)})`,
  36896. transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
  36897. x: "38",
  36898. y: "7",
  36899. width: "17",
  36900. height: "36"
  36901. }, null, 8, _hoisted_17),
  36902. createBaseVNode("polygon", {
  36903. fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
  36904. transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
  36905. points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
  36906. }, null, 8, _hoisted_18)
  36907. ]),
  36908. createBaseVNode("rect", {
  36909. fill: `url(#linearGradient-2-${unref(id)})`,
  36910. x: "13",
  36911. y: "45",
  36912. width: "40",
  36913. height: "36"
  36914. }, null, 8, _hoisted_19),
  36915. createBaseVNode("g", _hoisted_20, [createBaseVNode("use", {
  36916. fill: `var(${unref(ns).cssVarBlockName("fill-color-8")})`,
  36917. transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
  36918. "xlink:href": `#path-3-${unref(id)}`
  36919. }, null, 8, _hoisted_21), createBaseVNode("polygon", {
  36920. fill: `var(${unref(ns).cssVarBlockName("fill-color-9")})`,
  36921. mask: `url(#mask-4-${unref(id)})`,
  36922. transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
  36923. points: "7 0 24 0 20 18 7 16.5"
  36924. }, null, 8, _hoisted_22)]),
  36925. createBaseVNode("polygon", {
  36926. fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
  36927. transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
  36928. points: "62 45 79 45 70 58 53 58"
  36929. }, null, 8, _hoisted_23)
  36930. ])])])]);
  36931. };
  36932. }
  36933. });
  36934. //#endregion
  36935. //#region node_modules/element-plus/es/components/empty/src/empty.vue_vue_type_script_setup_true_lang.mjs
  36936. var _hoisted_1$37 = ["src"];
  36937. var _hoisted_2$23 = { key: 1 };
  36938. //#endregion
  36939. //#region node_modules/element-plus/es/components/empty/index.mjs
  36940. var ElEmpty = withInstall(/* @__PURE__ */ defineComponent({
  36941. name: "ElEmpty",
  36942. __name: "empty",
  36943. props: emptyProps,
  36944. setup(__props) {
  36945. const props = __props;
  36946. const { t } = useLocale();
  36947. const ns = useNamespace("empty");
  36948. const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
  36949. const imageStyle = computed(() => ({ width: addUnit(props.imageSize) }));
  36950. return (_ctx, _cache) => {
  36951. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
  36952. createBaseVNode("div", {
  36953. class: normalizeClass(unref(ns).e("image")),
  36954. style: normalizeStyle(imageStyle.value)
  36955. }, [__props.image ? (openBlock(), createElementBlock("img", {
  36956. key: 0,
  36957. src: __props.image,
  36958. ondragstart: "return false"
  36959. }, null, 8, _hoisted_1$37)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [createVNode(img_empty_default)])], 6),
  36960. createBaseVNode("div", { class: normalizeClass(unref(ns).e("description")) }, [_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", _hoisted_2$23, toDisplayString(emptyDescription.value), 1))], 2),
  36961. _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
  36962. key: 0,
  36963. class: normalizeClass(unref(ns).e("bottom"))
  36964. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
  36965. ], 2);
  36966. };
  36967. }
  36968. }));
  36969. //#endregion
  36970. //#region node_modules/element-plus/es/components/image/src/image.mjs
  36971. /**
  36972. * @deprecated Removed after 3.0.0, Use `ImageProps` instead.
  36973. */
  36974. var imageProps = buildProps({
  36975. /**
  36976. * @description when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode.
  36977. */
  36978. hideOnClickModal: Boolean,
  36979. /**
  36980. * @description image source, same as native.
  36981. */
  36982. src: {
  36983. type: String,
  36984. default: ""
  36985. },
  36986. /**
  36987. * @description indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit).
  36988. */
  36989. fit: {
  36990. type: String,
  36991. values: [
  36992. "",
  36993. "contain",
  36994. "cover",
  36995. "fill",
  36996. "none",
  36997. "scale-down"
  36998. ],
  36999. default: ""
  37000. },
  37001. /**
  37002. * @description Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#loading)
  37003. */
  37004. loading: {
  37005. type: String,
  37006. values: ["eager", "lazy"]
  37007. },
  37008. /**
  37009. * @description whether to use lazy load.
  37010. */
  37011. lazy: Boolean,
  37012. /**
  37013. * @description the container to add scroll listener when using lazy load.
  37014. */
  37015. scrollContainer: { type: definePropType([String, Object]) },
  37016. /**
  37017. * @description allow big image preview.
  37018. */
  37019. previewSrcList: {
  37020. type: definePropType(Array),
  37021. default: () => mutable([])
  37022. },
  37023. /**
  37024. * @description whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`.
  37025. */
  37026. previewTeleported: Boolean,
  37027. /**
  37028. * @description set image preview z-index.
  37029. */
  37030. zIndex: { type: Number },
  37031. /**
  37032. * @description initial preview image index, less than the length of `url-list`.
  37033. */
  37034. initialIndex: {
  37035. type: Number,
  37036. default: 0
  37037. },
  37038. /**
  37039. * @description whether the viewer preview is infinite.
  37040. */
  37041. infinite: {
  37042. type: Boolean,
  37043. default: true
  37044. },
  37045. /**
  37046. * @description whether the image-viewer can be closed by pressing ESC.
  37047. */
  37048. closeOnPressEscape: {
  37049. type: Boolean,
  37050. default: true
  37051. },
  37052. /**
  37053. * @description the zoom rate of the image viewer zoom event
  37054. */
  37055. zoomRate: {
  37056. type: Number,
  37057. default: 1.2
  37058. },
  37059. /**
  37060. * @description preview image scale.
  37061. */
  37062. scale: {
  37063. type: Number,
  37064. default: 1
  37065. },
  37066. /**
  37067. * @description the min scale of the image viewer zoom event.
  37068. */
  37069. minScale: {
  37070. type: Number,
  37071. default: .2
  37072. },
  37073. /**
  37074. * @description the max scale of the image viewer zoom event.
  37075. */
  37076. maxScale: {
  37077. type: Number,
  37078. default: 7
  37079. },
  37080. /**
  37081. * @description show preview image progress content.
  37082. */
  37083. showProgress: Boolean,
  37084. /**
  37085. * @description set HTML attribute: crossorigin.
  37086. */
  37087. crossorigin: { type: definePropType(String) }
  37088. });
  37089. var imageEmits = {
  37090. load: (evt) => evt instanceof Event,
  37091. error: (evt) => evt instanceof Event,
  37092. switch: (val) => isNumber(val),
  37093. close: () => true,
  37094. show: () => true
  37095. };
  37096. //#endregion
  37097. //#region node_modules/element-plus/es/components/image-viewer/src/image-viewer.mjs
  37098. /**
  37099. * @deprecated Removed after 3.0.0, Use `ImageViewerProps` instead.
  37100. */
  37101. var imageViewerProps = buildProps({
  37102. /**
  37103. * @description preview link list.
  37104. */
  37105. urlList: {
  37106. type: definePropType(Array),
  37107. default: () => mutable([])
  37108. },
  37109. /**
  37110. * @description preview backdrop z-index.
  37111. */
  37112. zIndex: { type: Number },
  37113. /**
  37114. * @description the initial preview image index, less than or equal to the length of `url-list`.
  37115. */
  37116. initialIndex: {
  37117. type: Number,
  37118. default: 0
  37119. },
  37120. /**
  37121. * @description whether preview is infinite.
  37122. */
  37123. infinite: {
  37124. type: Boolean,
  37125. default: true
  37126. },
  37127. /**
  37128. * @description whether user can emit close event when clicking backdrop.
  37129. */
  37130. hideOnClickModal: Boolean,
  37131. /**
  37132. * @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.
  37133. */
  37134. teleported: Boolean,
  37135. /**
  37136. * @description whether the image-viewer can be closed by pressing ESC.
  37137. */
  37138. closeOnPressEscape: {
  37139. type: Boolean,
  37140. default: true
  37141. },
  37142. /**
  37143. * @description the zoom rate of the image viewer zoom event.
  37144. */
  37145. zoomRate: {
  37146. type: Number,
  37147. default: 1.2
  37148. },
  37149. /**
  37150. * @description preview image scale.
  37151. */
  37152. scale: {
  37153. type: Number,
  37154. default: 1
  37155. },
  37156. /**
  37157. * @description the min scale of the image viewer zoom event.
  37158. */
  37159. minScale: {
  37160. type: Number,
  37161. default: .2
  37162. },
  37163. /**
  37164. * @description the max scale of the image viewer zoom event.
  37165. */
  37166. maxScale: {
  37167. type: Number,
  37168. default: 7
  37169. },
  37170. /**
  37171. * @description show preview image progress content.
  37172. */
  37173. showProgress: Boolean,
  37174. /**
  37175. * @description set HTML attribute: crossorigin.
  37176. */
  37177. crossorigin: { type: definePropType(String) }
  37178. });
  37179. var imageViewerEmits = {
  37180. close: () => true,
  37181. error: (evt) => evt instanceof Event,
  37182. switch: (index) => isNumber(index),
  37183. rotate: (deg) => isNumber(deg)
  37184. };
  37185. //#endregion
  37186. //#region node_modules/element-plus/es/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.mjs
  37187. var _hoisted_1$36 = ["src", "crossorigin"];
  37188. //#endregion
  37189. //#region node_modules/element-plus/es/components/image-viewer/index.mjs
  37190. var ElImageViewer = withInstall(/* @__PURE__ */ defineComponent({
  37191. name: "ElImageViewer",
  37192. __name: "image-viewer",
  37193. props: imageViewerProps,
  37194. emits: imageViewerEmits,
  37195. setup(__props, { expose: __expose, emit: __emit }) {
  37196. const modes = {
  37197. CONTAIN: {
  37198. name: "contain",
  37199. icon: markRaw(full_screen_default)
  37200. },
  37201. ORIGINAL: {
  37202. name: "original",
  37203. icon: markRaw(scale_to_original_default)
  37204. }
  37205. };
  37206. const props = __props;
  37207. const emit = __emit;
  37208. let stopWheelListener;
  37209. const { t } = useLocale();
  37210. const ns = useNamespace("image-viewer");
  37211. const { nextZIndex } = useZIndex();
  37212. const wrapper = ref();
  37213. const imgRef = ref();
  37214. const scopeEventListener = effectScope();
  37215. const scaleClamped = computed(() => {
  37216. const { scale, minScale, maxScale } = props;
  37217. return clamp$1(scale, minScale, maxScale);
  37218. });
  37219. const loading = ref(true);
  37220. const loadError = ref(false);
  37221. const visible = ref(false);
  37222. const activeIndex = ref(props.initialIndex);
  37223. const mode = shallowRef(modes.CONTAIN);
  37224. const transform = ref({
  37225. scale: scaleClamped.value,
  37226. deg: 0,
  37227. offsetX: 0,
  37228. offsetY: 0,
  37229. enableTransition: false
  37230. });
  37231. const zIndex = ref(props.zIndex ?? nextZIndex());
  37232. useLockscreen(visible, { ns });
  37233. const isSingle = computed(() => {
  37234. const { urlList } = props;
  37235. return urlList.length <= 1;
  37236. });
  37237. const isFirst = computed(() => activeIndex.value === 0);
  37238. const isLast = computed(() => activeIndex.value === props.urlList.length - 1);
  37239. const currentImg = computed(() => props.urlList[activeIndex.value]);
  37240. const arrowPrevKls = computed(() => [
  37241. ns.e("btn"),
  37242. ns.e("prev"),
  37243. ns.is("disabled", !props.infinite && isFirst.value)
  37244. ]);
  37245. const arrowNextKls = computed(() => [
  37246. ns.e("btn"),
  37247. ns.e("next"),
  37248. ns.is("disabled", !props.infinite && isLast.value)
  37249. ]);
  37250. const imgStyle = computed(() => {
  37251. const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
  37252. let translateX = offsetX / scale;
  37253. let translateY = offsetY / scale;
  37254. const radian = deg * Math.PI / 180;
  37255. const cosRadian = Math.cos(radian);
  37256. const sinRadian = Math.sin(radian);
  37257. translateX = translateX * cosRadian + translateY * sinRadian;
  37258. translateY = translateY * cosRadian - offsetX / scale * sinRadian;
  37259. const style = {
  37260. transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
  37261. transition: enableTransition ? "transform .3s" : ""
  37262. };
  37263. if (mode.value.name === modes.CONTAIN.name) style.maxWidth = style.maxHeight = "100%";
  37264. return style;
  37265. });
  37266. const progress = computed(() => `${activeIndex.value + 1} / ${props.urlList.length}`);
  37267. function hide() {
  37268. unregisterEventListener();
  37269. stopWheelListener?.();
  37270. visible.value = false;
  37271. emit("close");
  37272. }
  37273. function registerEventListener() {
  37274. const keydownHandler = throttle((e) => {
  37275. switch (getEventCode(e)) {
  37276. case EVENT_CODE.esc:
  37277. props.closeOnPressEscape && hide();
  37278. break;
  37279. case EVENT_CODE.space:
  37280. toggleMode();
  37281. break;
  37282. case EVENT_CODE.left:
  37283. prev();
  37284. break;
  37285. case EVENT_CODE.up:
  37286. handleActions("zoomIn");
  37287. break;
  37288. case EVENT_CODE.right:
  37289. next();
  37290. break;
  37291. case EVENT_CODE.down:
  37292. handleActions("zoomOut");
  37293. break;
  37294. }
  37295. });
  37296. const mousewheelHandler = throttle((e) => {
  37297. handleActions((e.deltaY || e.deltaX) < 0 ? "zoomIn" : "zoomOut", {
  37298. zoomRate: props.zoomRate,
  37299. enableTransition: false
  37300. });
  37301. });
  37302. scopeEventListener.run(() => {
  37303. useEventListener(document, "keydown", keydownHandler);
  37304. useEventListener(wrapper, "wheel", mousewheelHandler);
  37305. });
  37306. }
  37307. function unregisterEventListener() {
  37308. scopeEventListener.stop();
  37309. }
  37310. function handleImgLoad() {
  37311. loading.value = false;
  37312. }
  37313. function handleImgError(e) {
  37314. loadError.value = true;
  37315. loading.value = false;
  37316. emit("error", e);
  37317. e.target.alt = t("el.image.error");
  37318. }
  37319. function handleMouseDown(e) {
  37320. if (loading.value || e.button !== 0 || !wrapper.value) return;
  37321. transform.value.enableTransition = false;
  37322. const { offsetX, offsetY } = transform.value;
  37323. const startX = e.pageX;
  37324. const startY = e.pageY;
  37325. const dragHandler = throttle((ev) => {
  37326. transform.value = {
  37327. ...transform.value,
  37328. offsetX: offsetX + ev.pageX - startX,
  37329. offsetY: offsetY + ev.pageY - startY
  37330. };
  37331. });
  37332. const removeMousemove = useEventListener(document, "mousemove", dragHandler);
  37333. const removeMouseup = useEventListener(document, "mouseup", () => {
  37334. removeMousemove();
  37335. removeMouseup();
  37336. });
  37337. e.preventDefault();
  37338. }
  37339. function handleTouchStart(e) {
  37340. if (loading.value || !wrapper.value || e.touches.length !== 1) return;
  37341. transform.value.enableTransition = false;
  37342. const { offsetX, offsetY } = transform.value;
  37343. const { pageX: startX, pageY: startY } = e.touches[0];
  37344. const dragHandler = throttle((ev) => {
  37345. const targetTouch = ev.touches[0];
  37346. transform.value = {
  37347. ...transform.value,
  37348. offsetX: offsetX + targetTouch.pageX - startX,
  37349. offsetY: offsetY + targetTouch.pageY - startY
  37350. };
  37351. });
  37352. const removeTouchmove = useEventListener(document, "touchmove", dragHandler);
  37353. const removeTouchend = useEventListener(document, "touchend", () => {
  37354. removeTouchmove();
  37355. removeTouchend();
  37356. });
  37357. e.preventDefault();
  37358. }
  37359. function reset() {
  37360. transform.value = {
  37361. scale: scaleClamped.value,
  37362. deg: 0,
  37363. offsetX: 0,
  37364. offsetY: 0,
  37365. enableTransition: false
  37366. };
  37367. }
  37368. function toggleMode() {
  37369. if (loading.value || loadError.value) return;
  37370. const modeNames = keysOf(modes);
  37371. const modeValues = Object.values(modes);
  37372. const currentMode = mode.value.name;
  37373. mode.value = modes[modeNames[(modeValues.findIndex((i) => i.name === currentMode) + 1) % modeNames.length]];
  37374. reset();
  37375. }
  37376. function setActiveItem(index) {
  37377. loadError.value = false;
  37378. const len = props.urlList.length;
  37379. activeIndex.value = (index + len) % len;
  37380. }
  37381. function prev() {
  37382. if (isFirst.value && !props.infinite) return;
  37383. setActiveItem(activeIndex.value - 1);
  37384. }
  37385. function next() {
  37386. if (isLast.value && !props.infinite) return;
  37387. setActiveItem(activeIndex.value + 1);
  37388. }
  37389. function handleActions(action, options = {}) {
  37390. if (loading.value || loadError.value) return;
  37391. const { minScale, maxScale } = props;
  37392. const { zoomRate, rotateDeg, enableTransition } = {
  37393. zoomRate: props.zoomRate,
  37394. rotateDeg: 90,
  37395. enableTransition: true,
  37396. ...options
  37397. };
  37398. switch (action) {
  37399. case "zoomOut":
  37400. if (transform.value.scale > minScale) transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
  37401. break;
  37402. case "zoomIn":
  37403. if (transform.value.scale < maxScale) transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
  37404. break;
  37405. case "clockwise":
  37406. transform.value.deg += rotateDeg;
  37407. emit("rotate", transform.value.deg);
  37408. break;
  37409. case "anticlockwise":
  37410. transform.value.deg -= rotateDeg;
  37411. emit("rotate", transform.value.deg);
  37412. break;
  37413. }
  37414. transform.value.enableTransition = enableTransition;
  37415. }
  37416. function onFocusoutPrevented(event) {
  37417. if (event.detail?.focusReason === "pointer") event.preventDefault();
  37418. }
  37419. function onCloseRequested() {
  37420. if (props.closeOnPressEscape) hide();
  37421. }
  37422. function wheelHandler(e) {
  37423. if (!e.ctrlKey) return;
  37424. if (e.deltaY < 0) {
  37425. e.preventDefault();
  37426. return false;
  37427. } else if (e.deltaY > 0) {
  37428. e.preventDefault();
  37429. return false;
  37430. }
  37431. }
  37432. watch(() => scaleClamped.value, (val) => {
  37433. transform.value.scale = val;
  37434. });
  37435. watch(currentImg, () => {
  37436. nextTick(() => {
  37437. if (!imgRef.value?.complete) loading.value = true;
  37438. });
  37439. });
  37440. watch(activeIndex, (val) => {
  37441. reset();
  37442. emit("switch", val);
  37443. });
  37444. onMounted(() => {
  37445. visible.value = true;
  37446. registerEventListener();
  37447. stopWheelListener = useEventListener("wheel", wheelHandler, { passive: false });
  37448. });
  37449. __expose({
  37450. /**
  37451. * @description manually switch image
  37452. */
  37453. setActiveItem });
  37454. return (_ctx, _cache) => {
  37455. return openBlock(), createBlock(Teleport, {
  37456. to: "body",
  37457. disabled: !__props.teleported
  37458. }, [createVNode(Transition, {
  37459. name: "viewer-fade",
  37460. appear: ""
  37461. }, {
  37462. default: withCtx(() => [createBaseVNode("div", {
  37463. ref_key: "wrapper",
  37464. ref: wrapper,
  37465. tabindex: -1,
  37466. class: normalizeClass(unref(ns).e("wrapper")),
  37467. style: normalizeStyle({ zIndex: zIndex.value })
  37468. }, [createVNode(unref(focus_trap_default$1), {
  37469. loop: "",
  37470. trapped: "",
  37471. "focus-trap-el": wrapper.value,
  37472. "focus-start-el": "container",
  37473. onFocusoutPrevented,
  37474. onReleaseRequested: onCloseRequested
  37475. }, {
  37476. default: withCtx(() => [
  37477. createBaseVNode("div", {
  37478. class: normalizeClass(unref(ns).e("mask")),
  37479. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => __props.hideOnClickModal && hide(), ["self"]))
  37480. }, null, 2),
  37481. createCommentVNode(" CLOSE "),
  37482. createBaseVNode("span", {
  37483. class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
  37484. onClick: hide
  37485. }, [createVNode(unref(ElIcon), null, {
  37486. default: withCtx(() => [createVNode(unref(close_default))]),
  37487. _: 1
  37488. })], 2),
  37489. createCommentVNode(" ARROW "),
  37490. !isSingle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("span", {
  37491. class: normalizeClass(arrowPrevKls.value),
  37492. onClick: prev
  37493. }, [createVNode(unref(ElIcon), null, {
  37494. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  37495. _: 1
  37496. })], 2), createBaseVNode("span", {
  37497. class: normalizeClass(arrowNextKls.value),
  37498. onClick: next
  37499. }, [createVNode(unref(ElIcon), null, {
  37500. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  37501. _: 1
  37502. })], 2)], 64)) : createCommentVNode("v-if", true),
  37503. _ctx.$slots.progress || __props.showProgress ? (openBlock(), createElementBlock("div", {
  37504. key: 1,
  37505. class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
  37506. }, [renderSlot(_ctx.$slots, "progress", {
  37507. activeIndex: activeIndex.value,
  37508. total: __props.urlList.length
  37509. }, () => [createTextVNode(toDisplayString(progress.value), 1)])], 2)) : createCommentVNode("v-if", true),
  37510. createCommentVNode(" ACTIONS "),
  37511. createBaseVNode("div", { class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")]) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("actions__inner")) }, [renderSlot(_ctx.$slots, "toolbar", {
  37512. actions: handleActions,
  37513. prev,
  37514. next,
  37515. reset: toggleMode,
  37516. activeIndex: activeIndex.value,
  37517. setActiveItem
  37518. }, () => [
  37519. createVNode(unref(ElIcon), { onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut")) }, {
  37520. default: withCtx(() => [createVNode(unref(zoom_out_default))]),
  37521. _: 1
  37522. }),
  37523. createVNode(unref(ElIcon), { onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn")) }, {
  37524. default: withCtx(() => [createVNode(unref(zoom_in_default))]),
  37525. _: 1
  37526. }),
  37527. createBaseVNode("i", { class: normalizeClass(unref(ns).e("actions__divider")) }, null, 2),
  37528. createVNode(unref(ElIcon), { onClick: toggleMode }, {
  37529. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(mode.value.icon)))]),
  37530. _: 1
  37531. }),
  37532. createBaseVNode("i", { class: normalizeClass(unref(ns).e("actions__divider")) }, null, 2),
  37533. createVNode(unref(ElIcon), { onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise")) }, {
  37534. default: withCtx(() => [createVNode(unref(refresh_left_default))]),
  37535. _: 1
  37536. }),
  37537. createVNode(unref(ElIcon), { onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise")) }, {
  37538. default: withCtx(() => [createVNode(unref(refresh_right_default))]),
  37539. _: 1
  37540. })
  37541. ])], 2)], 2),
  37542. createCommentVNode(" CANVAS "),
  37543. createBaseVNode("div", { class: normalizeClass(unref(ns).e("canvas")) }, [loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", {
  37544. key: 0,
  37545. activeIndex: activeIndex.value,
  37546. src: currentImg.value
  37547. }) : (openBlock(), createElementBlock("img", {
  37548. ref_key: "imgRef",
  37549. ref: imgRef,
  37550. key: currentImg.value,
  37551. src: currentImg.value,
  37552. style: normalizeStyle(imgStyle.value),
  37553. class: normalizeClass(unref(ns).e("img")),
  37554. crossorigin: __props.crossorigin,
  37555. onLoad: handleImgLoad,
  37556. onError: handleImgError,
  37557. onMousedown: handleMouseDown,
  37558. onTouchstart: handleTouchStart
  37559. }, null, 46, _hoisted_1$36))], 2),
  37560. renderSlot(_ctx.$slots, "default")
  37561. ]),
  37562. _: 3
  37563. }, 8, ["focus-trap-el"])], 6)]),
  37564. _: 3
  37565. })], 8, ["disabled"]);
  37566. };
  37567. }
  37568. }));
  37569. //#endregion
  37570. //#region node_modules/element-plus/es/components/image/src/image.vue_vue_type_script_setup_true_lang.mjs
  37571. var _hoisted_1$35 = [
  37572. "src",
  37573. "loading",
  37574. "crossorigin"
  37575. ];
  37576. var _hoisted_2$22 = { key: 0 };
  37577. //#endregion
  37578. //#region node_modules/element-plus/es/components/image/index.mjs
  37579. var ElImage = withInstall(/* @__PURE__ */ defineComponent({
  37580. name: "ElImage",
  37581. inheritAttrs: false,
  37582. __name: "image",
  37583. props: imageProps,
  37584. emits: imageEmits,
  37585. setup(__props, { expose: __expose, emit: __emit }) {
  37586. const props = __props;
  37587. const emit = __emit;
  37588. const { t } = useLocale();
  37589. const ns = useNamespace("image");
  37590. const rawAttrs = useAttrs$1();
  37591. const containerAttrs = computed(() => {
  37592. return fromPairs(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
  37593. });
  37594. const imgAttrs = useAttrs({
  37595. excludeListeners: true,
  37596. excludeKeys: computed(() => {
  37597. return Object.keys(containerAttrs.value);
  37598. })
  37599. });
  37600. const imageSrc = ref();
  37601. const hasLoadError = ref(false);
  37602. const isLoading = ref(true);
  37603. const showViewer = ref(false);
  37604. const container = ref();
  37605. const _scrollContainer = ref();
  37606. const supportLoading = isClient && "loading" in HTMLImageElement.prototype;
  37607. let stopScrollListener;
  37608. const imageKls = computed(() => [
  37609. ns.e("inner"),
  37610. preview.value && ns.e("preview"),
  37611. isLoading.value && ns.is("loading")
  37612. ]);
  37613. const imageStyle = computed(() => {
  37614. const { fit } = props;
  37615. if (isClient && fit) return { objectFit: fit };
  37616. return {};
  37617. });
  37618. const preview = computed(() => {
  37619. const { previewSrcList } = props;
  37620. return isArray$1(previewSrcList) && previewSrcList.length > 0;
  37621. });
  37622. const imageIndex = computed(() => {
  37623. const { previewSrcList, initialIndex } = props;
  37624. let previewIndex = initialIndex;
  37625. if (initialIndex > previewSrcList.length - 1) previewIndex = 0;
  37626. return previewIndex;
  37627. });
  37628. const isManual = computed(() => {
  37629. if (props.loading === "eager") return false;
  37630. return !supportLoading && props.loading === "lazy" || props.lazy;
  37631. });
  37632. const loadImage = () => {
  37633. if (!isClient) return;
  37634. isLoading.value = true;
  37635. hasLoadError.value = false;
  37636. imageSrc.value = props.src;
  37637. };
  37638. function handleLoad(event) {
  37639. isLoading.value = false;
  37640. hasLoadError.value = false;
  37641. emit("load", event);
  37642. }
  37643. function handleError(event) {
  37644. isLoading.value = false;
  37645. hasLoadError.value = true;
  37646. emit("error", event);
  37647. }
  37648. function handleLazyLoad(isIntersecting) {
  37649. if (isIntersecting) {
  37650. loadImage();
  37651. removeLazyLoadListener();
  37652. }
  37653. }
  37654. const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true);
  37655. async function addLazyLoadListener() {
  37656. if (!isClient) return;
  37657. await nextTick();
  37658. const { scrollContainer } = props;
  37659. if (isElement$1(scrollContainer)) _scrollContainer.value = scrollContainer;
  37660. else if (isString(scrollContainer) && scrollContainer !== "") _scrollContainer.value = document.querySelector(scrollContainer) ?? void 0;
  37661. else if (container.value) {
  37662. const scrollContainer = getScrollContainer(container.value);
  37663. _scrollContainer.value = isWindow(scrollContainer) ? void 0 : scrollContainer;
  37664. }
  37665. const { stop } = useIntersectionObserver(container, ([entry]) => {
  37666. lazyLoadHandler(entry.isIntersecting);
  37667. }, { root: _scrollContainer });
  37668. stopScrollListener = stop;
  37669. }
  37670. function removeLazyLoadListener() {
  37671. if (!isClient || !lazyLoadHandler) return;
  37672. stopScrollListener?.();
  37673. _scrollContainer.value = void 0;
  37674. stopScrollListener = void 0;
  37675. }
  37676. function clickHandler() {
  37677. if (!preview.value) return;
  37678. showViewer.value = true;
  37679. emit("show");
  37680. }
  37681. function closeViewer() {
  37682. showViewer.value = false;
  37683. emit("close");
  37684. }
  37685. function switchViewer(val) {
  37686. emit("switch", val);
  37687. }
  37688. watch(() => props.src, () => {
  37689. if (isManual.value) {
  37690. isLoading.value = true;
  37691. hasLoadError.value = false;
  37692. removeLazyLoadListener();
  37693. addLazyLoadListener();
  37694. } else loadImage();
  37695. });
  37696. onMounted(() => {
  37697. if (isManual.value) addLazyLoadListener();
  37698. else loadImage();
  37699. });
  37700. __expose({
  37701. /** @description manually open preview */
  37702. showPreview: clickHandler });
  37703. return (_ctx, _cache) => {
  37704. return openBlock(), createElementBlock("div", mergeProps({
  37705. ref_key: "container",
  37706. ref: container
  37707. }, containerAttrs.value, { class: [unref(ns).b(), _ctx.$attrs.class] }), [hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("error")) }, toDisplayString(unref(t)("el.image.error")), 3)]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
  37708. src: imageSrc.value,
  37709. loading: __props.loading,
  37710. style: imageStyle.value,
  37711. class: imageKls.value,
  37712. crossorigin: __props.crossorigin,
  37713. onClick: clickHandler,
  37714. onLoad: handleLoad,
  37715. onError: handleError
  37716. }), null, 16, _hoisted_1$35)) : createCommentVNode("v-if", true), isLoading.value ? (openBlock(), createElementBlock("div", {
  37717. key: 1,
  37718. class: normalizeClass(unref(ns).e("wrapper"))
  37719. }, [renderSlot(_ctx.$slots, "placeholder", {}, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("placeholder")) }, null, 2)])], 2)) : createCommentVNode("v-if", true)], 64)), preview.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
  37720. key: 0,
  37721. "z-index": __props.zIndex,
  37722. "initial-index": imageIndex.value,
  37723. infinite: __props.infinite,
  37724. "zoom-rate": __props.zoomRate,
  37725. "min-scale": __props.minScale,
  37726. "max-scale": __props.maxScale,
  37727. "show-progress": __props.showProgress,
  37728. "url-list": __props.previewSrcList,
  37729. scale: __props.scale,
  37730. crossorigin: __props.crossorigin,
  37731. "hide-on-click-modal": __props.hideOnClickModal,
  37732. teleported: __props.previewTeleported,
  37733. "close-on-press-escape": __props.closeOnPressEscape,
  37734. onClose: closeViewer,
  37735. onSwitch: switchViewer
  37736. }, createSlots({
  37737. toolbar: withCtx((toolbar) => [renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))]),
  37738. default: withCtx(() => [_ctx.$slots.viewer ? (openBlock(), createElementBlock("div", _hoisted_2$22, [renderSlot(_ctx.$slots, "viewer")])) : createCommentVNode("v-if", true)]),
  37739. _: 2
  37740. }, [_ctx.$slots.progress ? {
  37741. name: "progress",
  37742. fn: withCtx((progress) => [renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))]),
  37743. key: "0"
  37744. } : void 0, _ctx.$slots["viewer-error"] ? {
  37745. name: "viewer-error",
  37746. fn: withCtx((viewerError) => [renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError)))]),
  37747. key: "1"
  37748. } : void 0]), 1032, [
  37749. "z-index",
  37750. "initial-index",
  37751. "infinite",
  37752. "zoom-rate",
  37753. "min-scale",
  37754. "max-scale",
  37755. "show-progress",
  37756. "url-list",
  37757. "scale",
  37758. "crossorigin",
  37759. "hide-on-click-modal",
  37760. "teleported",
  37761. "close-on-press-escape"
  37762. ])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true)], 16);
  37763. };
  37764. }
  37765. }));
  37766. //#endregion
  37767. //#region node_modules/element-plus/es/components/input-number/src/input-number.mjs
  37768. /**
  37769. * @deprecated Removed after 3.0.0, Use `InputNumberProps` instead.
  37770. */
  37771. var inputNumberProps = buildProps({
  37772. /**
  37773. * @description same as `id` in native input
  37774. */
  37775. id: {
  37776. type: String,
  37777. default: void 0
  37778. },
  37779. /**
  37780. * @description incremental step
  37781. */
  37782. step: {
  37783. type: Number,
  37784. default: 1
  37785. },
  37786. /**
  37787. * @description whether input value can only be multiple of step
  37788. */
  37789. stepStrictly: Boolean,
  37790. /**
  37791. * @description the maximum allowed value
  37792. */
  37793. max: {
  37794. type: Number,
  37795. default: Number.MAX_SAFE_INTEGER
  37796. },
  37797. /**
  37798. * @description the minimum allowed value
  37799. */
  37800. min: {
  37801. type: Number,
  37802. default: Number.MIN_SAFE_INTEGER
  37803. },
  37804. /**
  37805. * @description binding value
  37806. */
  37807. modelValue: { type: [Number, null] },
  37808. /**
  37809. * @description same as `readonly` in native input
  37810. */
  37811. readonly: Boolean,
  37812. /**
  37813. * @description whether the component is disabled
  37814. */
  37815. disabled: {
  37816. type: Boolean,
  37817. default: void 0
  37818. },
  37819. /**
  37820. * @description size of the component
  37821. */
  37822. size: useSizeProp,
  37823. /**
  37824. * @description whether to enable the control buttons
  37825. */
  37826. controls: {
  37827. type: Boolean,
  37828. default: true
  37829. },
  37830. /**
  37831. * @description position of the control buttons
  37832. */
  37833. controlsPosition: {
  37834. type: String,
  37835. default: "",
  37836. values: ["", "right"]
  37837. },
  37838. /**
  37839. * @description value should be set when input box is cleared
  37840. */
  37841. valueOnClear: {
  37842. type: definePropType([
  37843. String,
  37844. Number,
  37845. null
  37846. ]),
  37847. validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val),
  37848. default: null
  37849. },
  37850. /**
  37851. * @description same as `name` in native input
  37852. */
  37853. name: String,
  37854. /**
  37855. * @description same as `placeholder` in native input
  37856. */
  37857. placeholder: String,
  37858. /**
  37859. * @description precision of input value
  37860. */
  37861. precision: {
  37862. type: Number,
  37863. validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
  37864. },
  37865. /**
  37866. * @description whether to trigger form validation
  37867. */
  37868. validateEvent: {
  37869. type: Boolean,
  37870. default: true
  37871. },
  37872. ...useAriaProps(["ariaLabel"]),
  37873. /**
  37874. * @description native input mode for virtual keyboards
  37875. */
  37876. inputmode: {
  37877. type: definePropType(String),
  37878. default: void 0
  37879. },
  37880. /**
  37881. * @description alignment for the inner input text
  37882. */
  37883. align: {
  37884. type: definePropType(String),
  37885. default: "center"
  37886. },
  37887. /**
  37888. * @description whether to disable scientific notation input (e.g. 'e', 'E')
  37889. */
  37890. disabledScientific: Boolean,
  37891. /**
  37892. * @description specifies the format of the value presented in the input
  37893. */
  37894. formatter: { type: Function },
  37895. /**
  37896. * @description specifies the value extracted from the formatted input
  37897. */
  37898. parser: { type: Function },
  37899. /**
  37900. * @description same as `tabindex` in native input
  37901. */
  37902. tabindex: {
  37903. type: [String, Number],
  37904. default: 0
  37905. }
  37906. });
  37907. var inputNumberEmits = {
  37908. [CHANGE_EVENT]: (cur, prev) => prev !== cur,
  37909. blur: (e) => e instanceof FocusEvent,
  37910. focus: (e) => e instanceof FocusEvent,
  37911. [INPUT_EVENT]: (val) => isNumber(val) || isNil(val),
  37912. [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
  37913. };
  37914. //#endregion
  37915. //#region node_modules/element-plus/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs
  37916. var _hoisted_1$34 = ["aria-label"];
  37917. var _hoisted_2$21 = ["aria-label"];
  37918. //#endregion
  37919. //#region node_modules/element-plus/es/components/input-number/index.mjs
  37920. var ElInputNumber = withInstall(/* @__PURE__ */ defineComponent({
  37921. name: "ElInputNumber",
  37922. __name: "input-number",
  37923. props: inputNumberProps,
  37924. emits: inputNumberEmits,
  37925. setup(__props, { expose: __expose, emit: __emit }) {
  37926. const props = __props;
  37927. const emit = __emit;
  37928. const { t } = useLocale();
  37929. const ns = useNamespace("input-number");
  37930. const input = ref();
  37931. const data = reactive({
  37932. currentValue: props.modelValue,
  37933. userInput: null
  37934. });
  37935. const { formItem } = useFormItem();
  37936. const minDisabled = computed(() => isNumber(props.modelValue) && props.modelValue <= props.min);
  37937. const maxDisabled = computed(() => isNumber(props.modelValue) && props.modelValue >= props.max);
  37938. const numPrecision = computed(() => {
  37939. const stepPrecision = getPrecision(props.step);
  37940. if (!isUndefined(props.precision)) {
  37941. if (stepPrecision > props.precision) debugWarn("InputNumber", "precision should not be less than the decimal places of step");
  37942. return props.precision;
  37943. } else return Math.max(getPrecision(props.modelValue), stepPrecision);
  37944. });
  37945. const controlsAtRight = computed(() => {
  37946. return props.controls && props.controlsPosition === "right";
  37947. });
  37948. const inputNumberSize = useFormSize();
  37949. const inputNumberDisabled = useFormDisabled();
  37950. const displayValue = computed(() => {
  37951. if (data.userInput !== null) return data.userInput;
  37952. let currentValue = data.currentValue;
  37953. if (isNil(currentValue)) return "";
  37954. if (isNumber(currentValue)) {
  37955. if (Number.isNaN(currentValue)) return "";
  37956. if (!isUndefined(props.precision)) currentValue = currentValue.toFixed(props.precision);
  37957. }
  37958. return currentValue;
  37959. });
  37960. const toPrecision = (num, pre) => {
  37961. if (isUndefined(pre)) pre = numPrecision.value;
  37962. if (pre === 0) return Math.round(num);
  37963. let snum = String(num);
  37964. const pointPos = snum.indexOf(".");
  37965. if (pointPos === -1) return num;
  37966. if (!snum.replace(".", "").split("")[pointPos + pre]) return num;
  37967. const length = snum.length;
  37968. if (snum.charAt(length - 1) === "5") snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
  37969. return Number.parseFloat(Number(snum).toFixed(pre));
  37970. };
  37971. const getPrecision = (value) => {
  37972. if (isNil(value)) return 0;
  37973. const valueString = value.toString();
  37974. const dotPosition = valueString.indexOf(".");
  37975. let precision = 0;
  37976. if (dotPosition !== -1) precision = valueString.length - dotPosition - 1;
  37977. return precision;
  37978. };
  37979. const ensurePrecision = (val, coefficient = 1) => {
  37980. if (!isNumber(val)) return data.currentValue;
  37981. if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {
  37982. debugWarn("InputNumber", "The value has reached the maximum safe integer limit.");
  37983. return val;
  37984. } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {
  37985. debugWarn("InputNumber", "The value has reached the minimum safe integer limit.");
  37986. return val;
  37987. }
  37988. return toPrecision(val + props.step * coefficient);
  37989. };
  37990. const handleKeydown = (event) => {
  37991. const code = getEventCode(event);
  37992. const key = getEventKey(event);
  37993. if (props.disabledScientific && ["e", "E"].includes(key)) {
  37994. event.preventDefault();
  37995. return;
  37996. }
  37997. switch (code) {
  37998. case EVENT_CODE.up:
  37999. event.preventDefault();
  38000. increase();
  38001. break;
  38002. case EVENT_CODE.down:
  38003. event.preventDefault();
  38004. decrease();
  38005. break;
  38006. }
  38007. };
  38008. const increase = () => {
  38009. if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return;
  38010. setCurrentValue(ensurePrecision(Number(displayValue.value) || 0));
  38011. emit(INPUT_EVENT, data.currentValue);
  38012. setCurrentValueToModelValue();
  38013. };
  38014. const decrease = () => {
  38015. if (props.readonly || inputNumberDisabled.value || minDisabled.value) return;
  38016. setCurrentValue(ensurePrecision(Number(displayValue.value) || 0, -1));
  38017. emit(INPUT_EVENT, data.currentValue);
  38018. setCurrentValueToModelValue();
  38019. };
  38020. const verifyValue = (value, update) => {
  38021. const { max, min, step, precision, stepStrictly, valueOnClear } = props;
  38022. if (max < min) throwError("InputNumber", "min should not be greater than max.");
  38023. let newVal = !value ? Number(value) : Number.parseFloat(String(value));
  38024. if (isNil(value) || Number.isNaN(newVal)) return null;
  38025. if (value === "") {
  38026. if (valueOnClear === null) return null;
  38027. newVal = isString(valueOnClear) ? {
  38028. min,
  38029. max
  38030. }[valueOnClear] : valueOnClear;
  38031. }
  38032. if (stepStrictly) {
  38033. newVal = toPrecision(Math.round(toPrecision(newVal / step)) * step, precision);
  38034. if (newVal !== value) update && emit("update:modelValue", newVal);
  38035. }
  38036. if (!isUndefined(precision)) newVal = toPrecision(newVal, precision);
  38037. if (newVal > max || newVal < min) {
  38038. newVal = newVal > max ? max : min;
  38039. update && emit("update:modelValue", newVal);
  38040. }
  38041. return newVal;
  38042. };
  38043. const setCurrentValue = (value, emitChange = true) => {
  38044. const oldVal = data.currentValue;
  38045. const newVal = verifyValue(value);
  38046. if (!emitChange) {
  38047. emit(UPDATE_MODEL_EVENT, newVal);
  38048. return;
  38049. }
  38050. data.userInput = null;
  38051. if (oldVal === newVal && value) return;
  38052. emit(UPDATE_MODEL_EVENT, newVal);
  38053. if (oldVal !== newVal) emit(CHANGE_EVENT, newVal, oldVal);
  38054. if (props.validateEvent) formItem?.validate?.("change").catch(NOOP);
  38055. data.currentValue = newVal;
  38056. };
  38057. const handleInput = (value) => {
  38058. data.userInput = value;
  38059. let newVal = value === "" ? null : Number.parseFloat(value);
  38060. if (Number.isNaN(newVal)) newVal = null;
  38061. emit(INPUT_EVENT, newVal);
  38062. setCurrentValue(newVal, false);
  38063. };
  38064. const handleInputChange = (value) => {
  38065. const newVal = value !== "" ? Number.parseFloat(value) : "";
  38066. if (isNumber(newVal) && !Number.isNaN(newVal) || props.formatter && Number.isNaN(newVal) || newVal === "") setCurrentValue(newVal);
  38067. setCurrentValueToModelValue();
  38068. data.userInput = null;
  38069. };
  38070. const focus = () => {
  38071. input.value?.focus?.();
  38072. };
  38073. const blur = () => {
  38074. input.value?.blur?.();
  38075. };
  38076. const handleFocus = (event) => {
  38077. emit("focus", event);
  38078. };
  38079. const handleBlur = (event) => {
  38080. data.userInput = null;
  38081. if (data.currentValue === null && input.value?.input) input.value.input.value = props.formatter?.("") ?? "";
  38082. emit("blur", event);
  38083. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  38084. };
  38085. const setCurrentValueToModelValue = () => {
  38086. if (data.currentValue !== props.modelValue) data.currentValue = props.modelValue;
  38087. };
  38088. const handleWheel = (e) => {
  38089. if (document.activeElement === e.target) e.preventDefault();
  38090. };
  38091. watch(() => props.modelValue, (value, oldValue) => {
  38092. const newValue = verifyValue(value, true);
  38093. if (data.userInput === null && newValue !== oldValue) data.currentValue = newValue;
  38094. }, { immediate: true });
  38095. watch(() => props.precision, () => {
  38096. data.currentValue = verifyValue(props.modelValue);
  38097. });
  38098. onMounted(() => {
  38099. const { min, max, modelValue } = props;
  38100. const innerInput = input.value?.input;
  38101. innerInput.setAttribute("role", "spinbutton");
  38102. if (Number.isFinite(max)) innerInput.setAttribute("aria-valuemax", String(max));
  38103. else innerInput.removeAttribute("aria-valuemax");
  38104. if (Number.isFinite(min)) innerInput.setAttribute("aria-valuemin", String(min));
  38105. else innerInput.removeAttribute("aria-valuemin");
  38106. innerInput.setAttribute("aria-valuenow", data.currentValue || data.currentValue === 0 ? String(data.currentValue) : "");
  38107. innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
  38108. if (!isNumber(modelValue) && modelValue != null) {
  38109. let val = Number(modelValue);
  38110. if (Number.isNaN(val)) val = null;
  38111. emit(UPDATE_MODEL_EVENT, val);
  38112. }
  38113. innerInput.addEventListener("wheel", handleWheel, { passive: false });
  38114. });
  38115. onUpdated(() => {
  38116. (input.value?.input)?.setAttribute("aria-valuenow", `${data.currentValue ?? ""}`);
  38117. });
  38118. __expose({
  38119. /** @description get focus the input component */
  38120. focus,
  38121. /** @description remove focus the input component */
  38122. blur
  38123. });
  38124. return (_ctx, _cache) => {
  38125. return openBlock(), createElementBlock("div", {
  38126. class: normalizeClass([
  38127. unref(ns).b(),
  38128. unref(ns).m(unref(inputNumberSize)),
  38129. unref(ns).is("disabled", unref(inputNumberDisabled)),
  38130. unref(ns).is("without-controls", !__props.controls),
  38131. unref(ns).is("controls-right", controlsAtRight.value),
  38132. unref(ns).is(__props.align, !!__props.align)
  38133. ]),
  38134. onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"]))
  38135. }, [
  38136. __props.controls ? withDirectives((openBlock(), createElementBlock("span", {
  38137. key: 0,
  38138. role: "button",
  38139. "aria-label": unref(t)("el.inputNumber.decrease"),
  38140. class: normalizeClass([unref(ns).e("decrease"), unref(ns).is("disabled", minDisabled.value)]),
  38141. onKeydown: withKeys(decrease, ["enter"])
  38142. }, [renderSlot(_ctx.$slots, "decrease-icon", {}, () => [createVNode(unref(ElIcon), null, {
  38143. default: withCtx(() => [controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_down_default), { key: 0 })) : (openBlock(), createBlock(unref(minus_default), { key: 1 }))]),
  38144. _: 1
  38145. })])], 42, _hoisted_1$34)), [[unref(vRepeatClick), decrease]]) : createCommentVNode("v-if", true),
  38146. __props.controls ? withDirectives((openBlock(), createElementBlock("span", {
  38147. key: 1,
  38148. role: "button",
  38149. "aria-label": unref(t)("el.inputNumber.increase"),
  38150. class: normalizeClass([unref(ns).e("increase"), unref(ns).is("disabled", maxDisabled.value)]),
  38151. onKeydown: withKeys(increase, ["enter"])
  38152. }, [renderSlot(_ctx.$slots, "increase-icon", {}, () => [createVNode(unref(ElIcon), null, {
  38153. default: withCtx(() => [controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_up_default), { key: 0 })) : (openBlock(), createBlock(unref(plus_default), { key: 1 }))]),
  38154. _: 1
  38155. })])], 42, _hoisted_2$21)), [[unref(vRepeatClick), increase]]) : createCommentVNode("v-if", true),
  38156. createVNode(unref(ElInput), {
  38157. id: __props.id,
  38158. ref_key: "input",
  38159. ref: input,
  38160. type: __props.formatter ? "text" : "number",
  38161. step: __props.step,
  38162. "model-value": displayValue.value,
  38163. placeholder: __props.placeholder,
  38164. readonly: __props.readonly,
  38165. disabled: unref(inputNumberDisabled),
  38166. size: unref(inputNumberSize),
  38167. max: __props.max,
  38168. min: __props.min,
  38169. name: __props.name,
  38170. "aria-label": __props.ariaLabel,
  38171. "validate-event": false,
  38172. inputmode: __props.inputmode,
  38173. formatter: __props.formatter,
  38174. parser: __props.parser,
  38175. tabindex: __props.tabindex,
  38176. onKeydown: handleKeydown,
  38177. onBlur: handleBlur,
  38178. onFocus: handleFocus,
  38179. onInput: handleInput,
  38180. onChange: handleInputChange
  38181. }, createSlots({ _: 2 }, [_ctx.$slots.prefix ? {
  38182. name: "prefix",
  38183. fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
  38184. key: "0"
  38185. } : void 0, _ctx.$slots.suffix ? {
  38186. name: "suffix",
  38187. fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
  38188. key: "1"
  38189. } : void 0]), 1032, [
  38190. "id",
  38191. "type",
  38192. "step",
  38193. "model-value",
  38194. "placeholder",
  38195. "readonly",
  38196. "disabled",
  38197. "size",
  38198. "max",
  38199. "min",
  38200. "name",
  38201. "aria-label",
  38202. "inputmode",
  38203. "formatter",
  38204. "parser",
  38205. "tabindex"
  38206. ])
  38207. ], 34);
  38208. };
  38209. }
  38210. }));
  38211. //#endregion
  38212. //#region node_modules/element-plus/es/components/input-tag/src/input-tag.mjs
  38213. /**
  38214. * @deprecated Removed after 3.0.0, Use `InputTagProps` instead.
  38215. */
  38216. var inputTagProps = buildProps({
  38217. /**
  38218. * @description binding value
  38219. */
  38220. modelValue: { type: definePropType(Array) },
  38221. /**
  38222. * @description max number tags that can be enter
  38223. */
  38224. max: Number,
  38225. /**
  38226. * @description tag type
  38227. */
  38228. tagType: {
  38229. ...tagProps.type,
  38230. default: "info"
  38231. },
  38232. /**
  38233. * @description tag effect
  38234. */
  38235. tagEffect: tagProps.effect,
  38236. /**
  38237. * @description tooltip theme, built-in theme: `dark` / `light`
  38238. */
  38239. effect: {
  38240. type: definePropType(String),
  38241. default: "light"
  38242. },
  38243. /**
  38244. * @description the key to trigger input tag
  38245. */
  38246. trigger: {
  38247. type: definePropType(String),
  38248. default: EVENT_CODE.enter
  38249. },
  38250. /**
  38251. * @description whether tags can be dragged
  38252. */
  38253. draggable: Boolean,
  38254. /**
  38255. * @description add a tag when a delimiter is matched
  38256. */
  38257. delimiter: {
  38258. type: [String, RegExp],
  38259. default: ""
  38260. },
  38261. /**
  38262. * @description input box size
  38263. */
  38264. size: useSizeProp,
  38265. /**
  38266. * @description whether to show clear button
  38267. */
  38268. clearable: Boolean,
  38269. /**
  38270. * @description custom clear icon component
  38271. */
  38272. clearIcon: {
  38273. type: iconPropType,
  38274. default: circle_close_default
  38275. },
  38276. /**
  38277. * @description whether to disable input-tag
  38278. */
  38279. disabled: {
  38280. type: Boolean,
  38281. default: void 0
  38282. },
  38283. /**
  38284. * @description whether to trigger form validation
  38285. */
  38286. validateEvent: {
  38287. type: Boolean,
  38288. default: true
  38289. },
  38290. /**
  38291. * @description native input readonly
  38292. */
  38293. readonly: Boolean,
  38294. /**
  38295. * @description native input autofocus
  38296. */
  38297. autofocus: Boolean,
  38298. /**
  38299. * @description same as `id` in native input
  38300. */
  38301. id: {
  38302. type: String,
  38303. default: void 0
  38304. },
  38305. /**
  38306. * @description same as `tabindex` in native input
  38307. */
  38308. tabindex: {
  38309. type: [String, Number],
  38310. default: 0
  38311. },
  38312. /**
  38313. * @description same as `maxlength` in native input
  38314. */
  38315. maxlength: { type: [String, Number] },
  38316. /**
  38317. * @description same as `minlength` in native input
  38318. */
  38319. minlength: { type: [String, Number] },
  38320. /**
  38321. * @description placeholder of input
  38322. */
  38323. placeholder: String,
  38324. /**
  38325. * @description native input autocomplete
  38326. */
  38327. autocomplete: {
  38328. type: definePropType(String),
  38329. default: "off"
  38330. },
  38331. /**
  38332. * @description whether to save the input value when the input loses focus
  38333. */
  38334. saveOnBlur: {
  38335. type: Boolean,
  38336. default: true
  38337. },
  38338. /**
  38339. * @description whether to collapse tags to a text
  38340. */
  38341. collapseTags: Boolean,
  38342. /**
  38343. * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
  38344. */
  38345. collapseTagsTooltip: Boolean,
  38346. /**
  38347. * @description the max tags number to be shown. To use this, `collapse-tags` must be true
  38348. */
  38349. maxCollapseTags: {
  38350. type: Number,
  38351. default: 1
  38352. },
  38353. /**
  38354. * @description native `aria-label` attribute
  38355. */
  38356. ariaLabel: String
  38357. });
  38358. var inputTagEmits = {
  38359. [UPDATE_MODEL_EVENT]: (value) => isArray$1(value) || isUndefined(value),
  38360. [CHANGE_EVENT]: (value) => isArray$1(value) || isUndefined(value),
  38361. [INPUT_EVENT]: (value) => isString(value),
  38362. "add-tag": (value) => isString(value) || isArray$1(value),
  38363. "remove-tag": (value, index) => isString(value) && isNumber(index),
  38364. "drag-tag": (oldIndex, newIndex, value) => isNumber(oldIndex) && isNumber(newIndex) && isString(value),
  38365. focus: (evt) => evt instanceof FocusEvent,
  38366. blur: (evt) => evt instanceof FocusEvent,
  38367. clear: () => true
  38368. };
  38369. //#endregion
  38370. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-drag-tag.mjs
  38371. function useDragTag({ wrapperRef, handleDragged, afterDragged }) {
  38372. const ns = useNamespace("input-tag");
  38373. const dropIndicatorRef = shallowRef();
  38374. const showDropIndicator = ref(false);
  38375. let draggingIndex;
  38376. let draggingTag;
  38377. let dropIndex;
  38378. let dropType;
  38379. function getTagClassName(index) {
  38380. return `.${ns.e("inner")} .${ns.namespace.value}-tag:nth-child(${index + 1})`;
  38381. }
  38382. function handleDragStart(event, index) {
  38383. draggingIndex = index;
  38384. draggingTag = wrapperRef.value.querySelector(getTagClassName(index));
  38385. if (draggingTag) draggingTag.style.opacity = "0.5";
  38386. event.dataTransfer.effectAllowed = "move";
  38387. }
  38388. function handleDragOver(event, index) {
  38389. dropIndex = index;
  38390. event.preventDefault();
  38391. event.dataTransfer.dropEffect = "move";
  38392. if (isUndefined(draggingIndex) || draggingIndex === index) {
  38393. showDropIndicator.value = false;
  38394. return;
  38395. }
  38396. const dropPosition = wrapperRef.value.querySelector(getTagClassName(index)).getBoundingClientRect();
  38397. const dropPrev = !(draggingIndex + 1 === index);
  38398. const dropNext = !(draggingIndex - 1 === index);
  38399. const distance = event.clientX - dropPosition.left;
  38400. const prevPercent = dropPrev ? dropNext ? .5 : 1 : -1;
  38401. const nextPercent = dropNext ? dropPrev ? .5 : 0 : 1;
  38402. if (distance <= dropPosition.width * prevPercent) dropType = "before";
  38403. else if (distance > dropPosition.width * nextPercent) dropType = "after";
  38404. else dropType = void 0;
  38405. const innerEl = wrapperRef.value.querySelector(`.${ns.e("inner")}`);
  38406. const innerPosition = innerEl.getBoundingClientRect();
  38407. const gap = Number.parseFloat(getStyle(innerEl, "gap")) / 2;
  38408. const indicatorTop = dropPosition.top - innerPosition.top;
  38409. let indicatorLeft = -9999;
  38410. if (dropType === "before") indicatorLeft = Math.max(dropPosition.left - innerPosition.left - gap, Math.floor(-gap / 2));
  38411. else if (dropType === "after") {
  38412. const left = dropPosition.right - innerPosition.left;
  38413. indicatorLeft = left + (innerPosition.width === left ? Math.floor(gap / 2) : gap);
  38414. }
  38415. setStyle(dropIndicatorRef.value, {
  38416. top: `${indicatorTop}px`,
  38417. left: `${indicatorLeft}px`
  38418. });
  38419. showDropIndicator.value = !!dropType;
  38420. }
  38421. function handleDragEnd(event) {
  38422. event.preventDefault();
  38423. if (draggingTag) draggingTag.style.opacity = "";
  38424. if (dropType && !isUndefined(draggingIndex) && !isUndefined(dropIndex) && draggingIndex !== dropIndex) handleDragged(draggingIndex, dropIndex, dropType);
  38425. showDropIndicator.value = false;
  38426. draggingIndex = void 0;
  38427. draggingTag = null;
  38428. dropIndex = void 0;
  38429. dropType = void 0;
  38430. afterDragged?.();
  38431. }
  38432. return {
  38433. dropIndicatorRef,
  38434. showDropIndicator,
  38435. handleDragStart,
  38436. handleDragOver,
  38437. handleDragEnd
  38438. };
  38439. }
  38440. //#endregion
  38441. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-hovering.mjs
  38442. function useHovering() {
  38443. const hovering = ref(false);
  38444. const handleMouseEnter = () => {
  38445. hovering.value = true;
  38446. };
  38447. const handleMouseLeave = () => {
  38448. hovering.value = false;
  38449. };
  38450. return {
  38451. hovering,
  38452. handleMouseEnter,
  38453. handleMouseLeave
  38454. };
  38455. }
  38456. //#endregion
  38457. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag.mjs
  38458. function useInputTag({ props, emit, formItem }) {
  38459. const disabled = useFormDisabled();
  38460. const size = useFormSize();
  38461. const inputRef = shallowRef();
  38462. const inputValue = ref();
  38463. const tagTooltipRef = ref();
  38464. const tagSize = computed(() => {
  38465. return ["small"].includes(size.value) ? "small" : "default";
  38466. });
  38467. const placeholder = computed(() => {
  38468. return props.modelValue?.length ? void 0 : props.placeholder;
  38469. });
  38470. const closable = computed(() => !(props.readonly || disabled.value));
  38471. const inputLimit = computed(() => {
  38472. return isUndefined(props.max) ? false : (props.modelValue?.length ?? 0) >= props.max;
  38473. });
  38474. const showTagList = computed(() => {
  38475. return props.collapseTags ? props.modelValue?.slice(0, props.maxCollapseTags) : props.modelValue;
  38476. });
  38477. const collapseTagList = computed(() => {
  38478. return props.collapseTags ? props.modelValue?.slice(props.maxCollapseTags) : [];
  38479. });
  38480. const addTagsEmit = (value) => {
  38481. const list = [...props.modelValue ?? [], ...castArray$1(value)];
  38482. emit(UPDATE_MODEL_EVENT, list);
  38483. emit(CHANGE_EVENT, list);
  38484. emit("add-tag", value);
  38485. inputValue.value = void 0;
  38486. };
  38487. const getDelimitedTags = (input) => {
  38488. const parts = input.split(props.delimiter);
  38489. const tags = parts.length > 1 ? parts.map((val) => val.trim()).filter(Boolean) : [];
  38490. if (props.max) {
  38491. const maxInsert = props.max - (props.modelValue?.length ?? 0);
  38492. tags.splice(maxInsert);
  38493. }
  38494. return tags.length === 1 ? tags[0] : tags;
  38495. };
  38496. const handlePaste = (event) => {
  38497. const pasted = event.clipboardData?.getData("text");
  38498. if (props.readonly || inputLimit.value || !props.delimiter || !pasted) return;
  38499. const { selectionStart = 0, selectionEnd = 0, value } = event.target;
  38500. const nextValue = value.slice(0, selectionStart) + pasted + value.slice(selectionEnd);
  38501. const tags = getDelimitedTags(nextValue);
  38502. if (tags.length) {
  38503. addTagsEmit(tags);
  38504. emit(INPUT_EVENT, nextValue);
  38505. event.preventDefault();
  38506. }
  38507. };
  38508. const handleInput = (event) => {
  38509. if (inputLimit.value) {
  38510. inputValue.value = void 0;
  38511. return;
  38512. }
  38513. if (isComposing.value) return;
  38514. if (props.delimiter && inputValue.value) {
  38515. const tags = getDelimitedTags(inputValue.value);
  38516. if (tags.length) addTagsEmit(tags);
  38517. }
  38518. emit(INPUT_EVENT, event.target.value);
  38519. };
  38520. const handleKeydown = (event) => {
  38521. if (isComposing.value) return;
  38522. switch (getEventCode(event)) {
  38523. case props.trigger:
  38524. event.preventDefault();
  38525. event.stopPropagation();
  38526. handleAddTag();
  38527. break;
  38528. case EVENT_CODE.numpadEnter:
  38529. if (props.trigger === EVENT_CODE.enter) {
  38530. event.preventDefault();
  38531. event.stopPropagation();
  38532. handleAddTag();
  38533. }
  38534. break;
  38535. case EVENT_CODE.backspace:
  38536. if (!inputValue.value && props.modelValue?.length) {
  38537. event.preventDefault();
  38538. event.stopPropagation();
  38539. handleRemoveTag(props.modelValue.length - 1);
  38540. }
  38541. break;
  38542. }
  38543. };
  38544. const handleKeyup = (event) => {
  38545. if (isComposing.value || !isAndroid()) return;
  38546. switch (getEventCode(event)) {
  38547. case EVENT_CODE.space:
  38548. if (props.trigger === EVENT_CODE.space) {
  38549. event.preventDefault();
  38550. event.stopPropagation();
  38551. handleAddTag();
  38552. }
  38553. break;
  38554. }
  38555. };
  38556. const handleAddTag = () => {
  38557. const value = inputValue.value?.trim();
  38558. if (!value || inputLimit.value) return;
  38559. addTagsEmit(value);
  38560. };
  38561. const handleRemoveTag = (index) => {
  38562. const value = (props.modelValue ?? []).slice();
  38563. const [item] = value.splice(index, 1);
  38564. emit(UPDATE_MODEL_EVENT, value);
  38565. emit(CHANGE_EVENT, value);
  38566. emit("remove-tag", item, index);
  38567. };
  38568. const handleClear = () => {
  38569. inputValue.value = void 0;
  38570. emit(UPDATE_MODEL_EVENT, void 0);
  38571. emit(CHANGE_EVENT, void 0);
  38572. emit("clear");
  38573. };
  38574. const handleDragged = (draggingIndex, dropIndex, type) => {
  38575. const value = (props.modelValue ?? []).slice();
  38576. const [draggedItem] = value.splice(draggingIndex, 1);
  38577. const step = dropIndex > draggingIndex && type === "before" ? -1 : dropIndex < draggingIndex && type === "after" ? 1 : 0;
  38578. value.splice(dropIndex + step, 0, draggedItem);
  38579. emit(UPDATE_MODEL_EVENT, value);
  38580. emit(CHANGE_EVENT, value);
  38581. emit("drag-tag", draggingIndex, dropIndex + step, draggedItem);
  38582. };
  38583. const focus = () => {
  38584. inputRef.value?.focus();
  38585. };
  38586. const blur = () => {
  38587. inputRef.value?.blur();
  38588. };
  38589. const { wrapperRef, isFocused } = useFocusController(inputRef, {
  38590. disabled,
  38591. beforeBlur(event) {
  38592. return tagTooltipRef.value?.isFocusInsideContent(event);
  38593. },
  38594. afterBlur() {
  38595. if (props.saveOnBlur) handleAddTag();
  38596. else inputValue.value = void 0;
  38597. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  38598. }
  38599. });
  38600. const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: handleInput });
  38601. watch(() => props.modelValue, () => {
  38602. if (props.validateEvent) formItem?.validate?.(CHANGE_EVENT).catch(NOOP);
  38603. });
  38604. return {
  38605. inputRef,
  38606. wrapperRef,
  38607. tagTooltipRef,
  38608. isFocused,
  38609. isComposing,
  38610. inputValue,
  38611. size,
  38612. tagSize,
  38613. placeholder,
  38614. closable,
  38615. disabled,
  38616. inputLimit,
  38617. showTagList,
  38618. collapseTagList,
  38619. handleDragged,
  38620. handlePaste,
  38621. handleInput,
  38622. handleKeydown,
  38623. handleKeyup,
  38624. handleAddTag,
  38625. handleRemoveTag,
  38626. handleClear,
  38627. handleCompositionStart,
  38628. handleCompositionUpdate,
  38629. handleCompositionEnd,
  38630. focus,
  38631. blur
  38632. };
  38633. }
  38634. //#endregion
  38635. //#region node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag-dom.mjs
  38636. function useInputTagDom({ props, isFocused, hovering, disabled, inputValue, size, validateState, validateIcon, needStatusIcon }) {
  38637. const attrs = useAttrs$1();
  38638. const slots = useSlots();
  38639. const ns = useNamespace("input-tag");
  38640. const nsInput = useNamespace("input");
  38641. const collapseItemRef = ref();
  38642. const innerRef = ref();
  38643. const containerKls = computed(() => [
  38644. ns.b(),
  38645. ns.is("focused", isFocused.value),
  38646. ns.is("hovering", hovering.value),
  38647. ns.is("disabled", disabled.value),
  38648. ns.m(size.value),
  38649. ns.e("wrapper"),
  38650. attrs.class
  38651. ]);
  38652. const containerStyle = computed(() => [attrs.style]);
  38653. const innerKls = computed(() => [
  38654. ns.e("inner"),
  38655. ns.is("draggable", props.draggable),
  38656. ns.is("left-space", !props.modelValue?.length && !slots.prefix),
  38657. ns.is("right-space", !props.modelValue?.length && !showSuffix.value)
  38658. ]);
  38659. const showClear = computed(() => {
  38660. return props.clearable && !disabled.value && !props.readonly && (props.modelValue?.length || inputValue.value) && (isFocused.value || hovering.value);
  38661. });
  38662. const showSuffix = computed(() => {
  38663. return slots.suffix || showClear.value || validateState.value && validateIcon.value && needStatusIcon.value;
  38664. });
  38665. const states = reactive({
  38666. innerWidth: 0,
  38667. collapseItemWidth: 0
  38668. });
  38669. const getGapWidth = () => {
  38670. if (!innerRef.value) return 0;
  38671. const style = window.getComputedStyle(innerRef.value);
  38672. return Number.parseFloat(style.gap || "6px");
  38673. };
  38674. const resetInnerWidth = () => {
  38675. states.innerWidth = Number.parseFloat(window.getComputedStyle(innerRef.value).width);
  38676. };
  38677. const resetCollapseItemWidth = () => {
  38678. states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
  38679. };
  38680. const tagStyle = computed(() => {
  38681. if (!props.collapseTags) return {};
  38682. const gapWidth = getGapWidth();
  38683. const inputSlotWidth = gapWidth + 11;
  38684. const maxWidth = collapseItemRef.value && props.maxCollapseTags === 1 ? states.innerWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.innerWidth - inputSlotWidth;
  38685. return { maxWidth: `${Math.max(maxWidth, 0)}px` };
  38686. });
  38687. useResizeObserver(innerRef, resetInnerWidth);
  38688. useResizeObserver(collapseItemRef, resetCollapseItemWidth);
  38689. return {
  38690. ns,
  38691. nsInput,
  38692. containerKls,
  38693. containerStyle,
  38694. innerKls,
  38695. showClear,
  38696. showSuffix,
  38697. tagStyle,
  38698. collapseItemRef,
  38699. innerRef
  38700. };
  38701. }
  38702. //#endregion
  38703. //#region node_modules/element-plus/es/components/input-tag/src/input-tag.vue_vue_type_script_setup_true_lang.mjs
  38704. var _hoisted_1$33 = [
  38705. "id",
  38706. "minlength",
  38707. "maxlength",
  38708. "disabled",
  38709. "readonly",
  38710. "autocomplete",
  38711. "tabindex",
  38712. "placeholder",
  38713. "autofocus",
  38714. "ariaLabel"
  38715. ];
  38716. var _hoisted_2$20 = ["textContent"];
  38717. //#endregion
  38718. //#region node_modules/element-plus/es/components/input-tag/index.mjs
  38719. var ElInputTag = withInstall(/* @__PURE__ */ defineComponent({
  38720. name: "ElInputTag",
  38721. inheritAttrs: false,
  38722. __name: "input-tag",
  38723. props: inputTagProps,
  38724. emits: inputTagEmits,
  38725. setup(__props, { expose: __expose, emit: __emit }) {
  38726. const props = __props;
  38727. const emit = __emit;
  38728. const attrs = useAttrs();
  38729. const slots = useSlots();
  38730. const { form, formItem } = useFormItem();
  38731. const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
  38732. const needStatusIcon = computed(() => form?.statusIcon ?? false);
  38733. const validateState = computed(() => formItem?.validateState || "");
  38734. const validateIcon = computed(() => {
  38735. return validateState.value && ValidateComponentsMap[validateState.value];
  38736. });
  38737. const { inputRef, wrapperRef, tagTooltipRef, isFocused, inputValue, size, tagSize, placeholder, closable, disabled, showTagList, collapseTagList, handleDragged, handlePaste, handleInput, handleKeydown, handleKeyup, handleRemoveTag, handleClear, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd, focus, blur } = useInputTag({
  38738. props,
  38739. emit,
  38740. formItem
  38741. });
  38742. const { hovering, handleMouseEnter, handleMouseLeave } = useHovering();
  38743. const { calculatorRef, inputStyle } = useCalcInputWidth();
  38744. const { dropIndicatorRef, showDropIndicator, handleDragStart, handleDragOver, handleDragEnd } = useDragTag({
  38745. wrapperRef,
  38746. handleDragged,
  38747. afterDragged: focus
  38748. });
  38749. const { ns, nsInput, containerKls, containerStyle, innerKls, showClear, showSuffix, tagStyle, collapseItemRef, innerRef } = useInputTagDom({
  38750. props,
  38751. hovering,
  38752. isFocused,
  38753. inputValue,
  38754. disabled,
  38755. size,
  38756. validateState,
  38757. validateIcon,
  38758. needStatusIcon
  38759. });
  38760. __expose({
  38761. focus,
  38762. blur
  38763. });
  38764. return (_ctx, _cache) => {
  38765. return openBlock(), createElementBlock("div", {
  38766. ref_key: "wrapperRef",
  38767. ref: wrapperRef,
  38768. class: normalizeClass(unref(containerKls)),
  38769. style: normalizeStyle(unref(containerStyle)),
  38770. onMouseenter: _cache[9] || (_cache[9] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  38771. onMouseleave: _cache[10] || (_cache[10] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args))
  38772. }, [
  38773. unref(slots).prefix ? (openBlock(), createElementBlock("div", {
  38774. key: 0,
  38775. class: normalizeClass(unref(ns).e("prefix"))
  38776. }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
  38777. createBaseVNode("div", {
  38778. ref_key: "innerRef",
  38779. ref: innerRef,
  38780. class: normalizeClass(unref(innerKls))
  38781. }, [
  38782. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(showTagList), (item, index) => {
  38783. return openBlock(), createBlock(unref(ElTag), {
  38784. key: index,
  38785. size: unref(tagSize),
  38786. closable: unref(closable),
  38787. type: __props.tagType,
  38788. effect: __props.tagEffect,
  38789. draggable: unref(closable) && __props.draggable,
  38790. style: normalizeStyle(unref(tagStyle)),
  38791. "disable-transitions": "",
  38792. onClose: ($event) => unref(handleRemoveTag)(index),
  38793. onDragstart: (event) => unref(handleDragStart)(event, index),
  38794. onDragover: (event) => unref(handleDragOver)(event, index),
  38795. onDragend: unref(handleDragEnd),
  38796. onDrop: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  38797. }, {
  38798. default: withCtx(() => [renderSlot(_ctx.$slots, "tag", {
  38799. value: item,
  38800. index
  38801. }, () => [createTextVNode(toDisplayString(item), 1)])]),
  38802. _: 2
  38803. }, 1032, [
  38804. "size",
  38805. "closable",
  38806. "type",
  38807. "effect",
  38808. "draggable",
  38809. "style",
  38810. "onClose",
  38811. "onDragstart",
  38812. "onDragover",
  38813. "onDragend"
  38814. ]);
  38815. }), 128)),
  38816. __props.collapseTags && __props.modelValue && __props.modelValue.length > __props.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
  38817. key: 0,
  38818. ref_key: "tagTooltipRef",
  38819. ref: tagTooltipRef,
  38820. disabled: !__props.collapseTagsTooltip,
  38821. "fallback-placements": [
  38822. "bottom",
  38823. "top",
  38824. "right",
  38825. "left"
  38826. ],
  38827. effect: __props.effect,
  38828. placement: "bottom"
  38829. }, {
  38830. default: withCtx(() => [createBaseVNode("div", {
  38831. ref_key: "collapseItemRef",
  38832. ref: collapseItemRef,
  38833. class: normalizeClass(unref(ns).e("collapse-tag"))
  38834. }, [createVNode(unref(ElTag), {
  38835. closable: false,
  38836. size: unref(tagSize),
  38837. type: __props.tagType,
  38838. effect: __props.tagEffect,
  38839. "disable-transitions": ""
  38840. }, {
  38841. default: withCtx(() => [createTextVNode(" + " + toDisplayString(__props.modelValue.length - __props.maxCollapseTags), 1)]),
  38842. _: 1
  38843. }, 8, [
  38844. "size",
  38845. "type",
  38846. "effect"
  38847. ])], 2)]),
  38848. content: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("input-tag-list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(collapseTagList), (item, index) => {
  38849. return openBlock(), createBlock(unref(ElTag), {
  38850. key: index,
  38851. size: unref(tagSize),
  38852. closable: unref(closable),
  38853. type: __props.tagType,
  38854. effect: __props.tagEffect,
  38855. "disable-transitions": "",
  38856. onClose: ($event) => unref(handleRemoveTag)(index + __props.maxCollapseTags)
  38857. }, {
  38858. default: withCtx(() => [renderSlot(_ctx.$slots, "tag", {
  38859. value: item,
  38860. index: index + __props.maxCollapseTags
  38861. }, () => [createTextVNode(toDisplayString(item), 1)])]),
  38862. _: 2
  38863. }, 1032, [
  38864. "size",
  38865. "closable",
  38866. "type",
  38867. "effect",
  38868. "onClose"
  38869. ]);
  38870. }), 128))], 2)]),
  38871. _: 3
  38872. }, 8, ["disabled", "effect"])) : createCommentVNode("v-if", true),
  38873. createBaseVNode("div", { class: normalizeClass(unref(ns).e("input-wrapper")) }, [withDirectives(createBaseVNode("input", mergeProps({
  38874. id: unref(inputId),
  38875. ref_key: "inputRef",
  38876. ref: inputRef,
  38877. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null)
  38878. }, unref(attrs), {
  38879. type: "text",
  38880. minlength: __props.minlength,
  38881. maxlength: __props.maxlength,
  38882. disabled: unref(disabled),
  38883. readonly: __props.readonly,
  38884. autocomplete: __props.autocomplete,
  38885. tabindex: __props.tabindex,
  38886. placeholder: unref(placeholder),
  38887. autofocus: __props.autofocus,
  38888. ariaLabel: __props.ariaLabel,
  38889. class: unref(ns).e("input"),
  38890. style: unref(inputStyle),
  38891. onCompositionstart: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
  38892. onCompositionupdate: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
  38893. onCompositionend: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
  38894. onPaste: _cache[5] || (_cache[5] = (...args) => unref(handlePaste) && unref(handlePaste)(...args)),
  38895. onInput: _cache[6] || (_cache[6] = (...args) => unref(handleInput) && unref(handleInput)(...args)),
  38896. onKeydown: _cache[7] || (_cache[7] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)),
  38897. onKeyup: _cache[8] || (_cache[8] = (...args) => unref(handleKeyup) && unref(handleKeyup)(...args))
  38898. }), null, 16, _hoisted_1$33), [[vModelText, unref(inputValue)]]), createBaseVNode("span", {
  38899. ref_key: "calculatorRef",
  38900. ref: calculatorRef,
  38901. "aria-hidden": "true",
  38902. class: normalizeClass(unref(ns).e("input-calculator")),
  38903. textContent: toDisplayString(unref(inputValue))
  38904. }, null, 10, _hoisted_2$20)], 2),
  38905. withDirectives(createBaseVNode("div", {
  38906. ref_key: "dropIndicatorRef",
  38907. ref: dropIndicatorRef,
  38908. class: normalizeClass(unref(ns).e("drop-indicator"))
  38909. }, null, 2), [[vShow, unref(showDropIndicator)]])
  38910. ], 2),
  38911. unref(showSuffix) ? (openBlock(), createElementBlock("div", {
  38912. key: 1,
  38913. class: normalizeClass(unref(ns).e("suffix"))
  38914. }, [
  38915. renderSlot(_ctx.$slots, "suffix"),
  38916. unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
  38917. key: 0,
  38918. class: normalizeClass([unref(ns).e("icon"), unref(ns).e("clear")]),
  38919. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  38920. onClick: unref(handleClear)
  38921. }, {
  38922. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
  38923. _: 1
  38924. }, 8, [
  38925. "class",
  38926. "onMousedown",
  38927. "onClick"
  38928. ])) : createCommentVNode("v-if", true),
  38929. validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
  38930. key: 1,
  38931. class: normalizeClass([
  38932. unref(nsInput).e("icon"),
  38933. unref(nsInput).e("validateIcon"),
  38934. unref(nsInput).is("loading", validateState.value === "validating")
  38935. ])
  38936. }, {
  38937. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(validateIcon.value)))]),
  38938. _: 1
  38939. }, 8, ["class"])) : createCommentVNode("v-if", true)
  38940. ], 2)) : createCommentVNode("v-if", true)
  38941. ], 38);
  38942. };
  38943. }
  38944. }));
  38945. //#endregion
  38946. //#region node_modules/element-plus/es/components/input-otp/src/input-otp.mjs
  38947. var inputOtpEmits = {
  38948. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  38949. [CHANGE_EVENT]: (value) => isString(value),
  38950. finish: (value) => isString(value),
  38951. focus: (eve) => eve instanceof FocusEvent,
  38952. blur: (eve) => eve instanceof FocusEvent
  38953. };
  38954. //#endregion
  38955. //#region node_modules/element-plus/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs
  38956. var _hoisted_1$32 = [
  38957. "id",
  38958. "aria-label",
  38959. "aria-labelledby"
  38960. ];
  38961. var _hoisted_2$19 = [
  38962. "value",
  38963. "type",
  38964. "disabled",
  38965. "readonly",
  38966. "inputmode",
  38967. "aria-label",
  38968. "onClick",
  38969. "onKeydown",
  38970. "onInput"
  38971. ];
  38972. //#endregion
  38973. //#region node_modules/element-plus/es/components/input-otp/index.mjs
  38974. var ElInputOtp = withInstall(/* @__PURE__ */ defineComponent({
  38975. name: "ElInputOtp",
  38976. __name: "input-otp",
  38977. props: {
  38978. modelValue: {
  38979. type: [String, Number],
  38980. required: false
  38981. },
  38982. length: {
  38983. type: Number,
  38984. required: false,
  38985. default: 6
  38986. },
  38987. validator: {
  38988. type: Function,
  38989. required: false,
  38990. default: () => true
  38991. },
  38992. inputmode: {
  38993. type: null,
  38994. required: false
  38995. },
  38996. type: {
  38997. type: String,
  38998. required: false,
  38999. default: "outlined"
  39000. },
  39001. size: {
  39002. type: null,
  39003. required: false,
  39004. default: "default"
  39005. },
  39006. mask: {
  39007. type: Boolean,
  39008. required: false
  39009. },
  39010. disabled: {
  39011. type: Boolean,
  39012. required: false,
  39013. default: void 0
  39014. },
  39015. readonly: {
  39016. type: Boolean,
  39017. required: false
  39018. },
  39019. id: {
  39020. type: String,
  39021. required: false
  39022. },
  39023. validateEvent: {
  39024. type: Boolean,
  39025. required: false,
  39026. default: true
  39027. },
  39028. separator: {
  39029. type: [
  39030. String,
  39031. Object,
  39032. Function
  39033. ],
  39034. required: false
  39035. },
  39036. ariaLabel: {
  39037. type: String,
  39038. required: false
  39039. }
  39040. },
  39041. emits: inputOtpEmits,
  39042. setup(__props, { expose: __expose, emit: __emit }) {
  39043. const props = __props;
  39044. const emit = __emit;
  39045. const initialValue = computed(() => {
  39046. const value = String(props.modelValue ?? "");
  39047. return Array.from({ length: props.length }, (_, i) => value.charAt(i));
  39048. });
  39049. const separators = computed(() => {
  39050. const { separator } = props;
  39051. const _separator = isFunction$1(separator) ? separator : () => separator;
  39052. return Array.from({ length: props.length - 1 }, (_, i) => _separator(i));
  39053. });
  39054. const innerValue = ref(initialValue.value);
  39055. const isFocused = ref(false);
  39056. const inputRefs = ref([]);
  39057. const ns = useNamespace("input-otp");
  39058. const { t } = useLocale();
  39059. const { formItem } = useFormItem();
  39060. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  39061. const disabled = useFormDisabled();
  39062. let modelValueOnFocus = props.modelValue;
  39063. const getFirstIndex = (maxIndex) => {
  39064. const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex);
  39065. return index === -1 ? maxIndex : index;
  39066. };
  39067. const handleFocus = (event) => {
  39068. if (inputRefs.value?.includes(event.relatedTarget)) return;
  39069. isFocused.value = true;
  39070. emit("focus", event);
  39071. };
  39072. const handleBlur = (event) => {
  39073. if (inputRefs.value?.includes(event.relatedTarget)) return;
  39074. isFocused.value = false;
  39075. emit("blur", event);
  39076. if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
  39077. };
  39078. const updateModelValue = (emitFinish = true) => {
  39079. const value = innerValue.value.join("").slice(0, props.length);
  39080. if (value !== props.modelValue) {
  39081. emit(UPDATE_MODEL_EVENT, value);
  39082. if (emitFinish && value.length === props.length) emit("finish", value);
  39083. }
  39084. };
  39085. const handleKeydown = (event, index) => {
  39086. const code = getEventCode(event);
  39087. let preventDefault = true;
  39088. switch (code) {
  39089. case EVENT_CODE.backspace:
  39090. if (props.readonly) break;
  39091. innerValue.value[index] = "";
  39092. focus(index - 1);
  39093. updateModelValue();
  39094. break;
  39095. case EVENT_CODE.delete:
  39096. if (props.readonly) break;
  39097. innerValue.value[index] = "";
  39098. focus(index);
  39099. updateModelValue();
  39100. break;
  39101. case EVENT_CODE.up:
  39102. case EVENT_CODE.left:
  39103. focus(index - 1);
  39104. break;
  39105. case EVENT_CODE.down:
  39106. case EVENT_CODE.right:
  39107. focus(index + 1);
  39108. break;
  39109. default: preventDefault = false;
  39110. }
  39111. if (preventDefault) event.preventDefault();
  39112. };
  39113. const handleInput = (event, index) => {
  39114. const target = event.target;
  39115. const targetIndex = getFirstIndex(index);
  39116. let focusIndex = targetIndex + 1;
  39117. let value = target.value;
  39118. if (value.length > 1) {
  39119. const chars = castValues(value, targetIndex);
  39120. target.value = innerValue.value[index] ?? "";
  39121. chars.forEach((char, i) => innerValue.value[targetIndex + i] = char);
  39122. focus(targetIndex + chars.length);
  39123. updateModelValue();
  39124. return;
  39125. }
  39126. if (!props.validator(value, targetIndex)) {
  39127. target.value = innerValue.value[index] ?? "";
  39128. value = target.value;
  39129. focusIndex = targetIndex;
  39130. }
  39131. innerValue.value[targetIndex] = value;
  39132. if (targetIndex !== index) target.value = innerValue.value[index] ?? "";
  39133. focus(focusIndex);
  39134. updateModelValue();
  39135. };
  39136. const castValues = (value, startIndex = 0) => {
  39137. const chars = `${value ?? ""}`.split("");
  39138. const result = [];
  39139. for (const char of chars) {
  39140. if (result.length + startIndex >= props.length) break;
  39141. if (props.validator(char, result.length + startIndex)) result.push(char);
  39142. }
  39143. return result;
  39144. };
  39145. const focus = (index = 0) => {
  39146. const focusIndex = clamp$1(index, 0, props.length - 1);
  39147. const target = inputRefs.value?.[focusIndex];
  39148. if (document.activeElement !== target) target?.focus();
  39149. rAF(() => {
  39150. if (!props.readonly && document.activeElement === target) target?.select();
  39151. });
  39152. };
  39153. const blur = () => {
  39154. (inputRefs.value?.find((input) => document.activeElement === input))?.blur();
  39155. };
  39156. watch(() => props.modelValue, () => {
  39157. innerValue.value = initialValue.value;
  39158. if (props.validateEvent) formItem?.validate?.("change").catch(NOOP);
  39159. });
  39160. watch(() => props.length, () => {
  39161. innerValue.value = initialValue.value;
  39162. updateModelValue(false);
  39163. });
  39164. watch(isFocused, (value) => {
  39165. if (value) {
  39166. modelValueOnFocus = props.modelValue;
  39167. return;
  39168. }
  39169. if (modelValueOnFocus !== props.modelValue) emit(CHANGE_EVENT, props.modelValue);
  39170. });
  39171. __expose({
  39172. /**
  39173. * @description HTML input elements array
  39174. */
  39175. inputRefs,
  39176. /**
  39177. * @description Focus an OTP input field
  39178. */
  39179. focus,
  39180. /**
  39181. * @description Blur the focused OTP input field
  39182. */
  39183. blur
  39184. });
  39185. return (_ctx, _cache) => {
  39186. return openBlock(), createElementBlock("div", {
  39187. id: unref(inputId),
  39188. class: normalizeClass([
  39189. unref(ns).b(),
  39190. unref(ns).m(__props.size),
  39191. unref(ns).m(__props.type),
  39192. unref(ns).is("disabled", unref(disabled))
  39193. ]),
  39194. role: "group",
  39195. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || unref(t)("el.inputOTP.groupLabel") : void 0,
  39196. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem)?.labelId : void 0
  39197. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.length, (_, index) => {
  39198. return openBlock(), createElementBlock(Fragment, { key: index }, [createBaseVNode("label", { class: normalizeClass(unref(ns).e("input-field")) }, [createBaseVNode("input", {
  39199. ref_for: true,
  39200. ref_key: "inputRefs",
  39201. ref: inputRefs,
  39202. value: innerValue.value[index],
  39203. class: normalizeClass(unref(ns).e("input")),
  39204. type: __props.mask ? "password" : "text",
  39205. disabled: unref(disabled),
  39206. readonly: __props.readonly,
  39207. inputmode: __props.inputmode,
  39208. autocomplete: "one-time-code",
  39209. "aria-label": unref(t)("el.inputOTP.defaultLabel", { index: index + 1 }),
  39210. onFocus: handleFocus,
  39211. onBlur: handleBlur,
  39212. onClick: ($event) => focus(index),
  39213. onKeydown: ($event) => handleKeydown($event, index),
  39214. onInput: ($event) => handleInput($event, index)
  39215. }, null, 42, _hoisted_2$19)], 2), (_ctx.$slots.separator || separators.value[index]) && index < __props.length - 1 ? renderSlot(_ctx.$slots, "separator", {
  39216. key: 0,
  39217. index
  39218. }, () => [(openBlock(), createBlock(resolveDynamicComponent(() => separators.value[index])))]) : createCommentVNode("v-if", true)], 64);
  39219. }), 128))], 10, _hoisted_1$32);
  39220. };
  39221. }
  39222. }));
  39223. //#endregion
  39224. //#region node_modules/element-plus/es/components/link/src/link.mjs
  39225. /**
  39226. * @deprecated Removed after 3.0.0, Use `LinkProps` instead.
  39227. */
  39228. var linkProps = buildProps({
  39229. /**
  39230. * @description type
  39231. */
  39232. type: {
  39233. type: String,
  39234. values: [
  39235. "primary",
  39236. "success",
  39237. "warning",
  39238. "info",
  39239. "danger",
  39240. "default"
  39241. ],
  39242. default: void 0
  39243. },
  39244. /**
  39245. * @description when underlines should appear
  39246. */
  39247. underline: {
  39248. type: [Boolean, String],
  39249. values: [
  39250. true,
  39251. false,
  39252. "always",
  39253. "never",
  39254. "hover"
  39255. ],
  39256. default: void 0
  39257. },
  39258. /**
  39259. * @description whether the component is disabled
  39260. */
  39261. disabled: Boolean,
  39262. /**
  39263. * @description same as native hyperlink's `href`
  39264. */
  39265. href: {
  39266. type: String,
  39267. default: ""
  39268. },
  39269. /**
  39270. * @description same as native hyperlink's `target`
  39271. */
  39272. target: {
  39273. type: String,
  39274. default: "_self"
  39275. },
  39276. /**
  39277. * @description icon component
  39278. */
  39279. icon: { type: iconPropType }
  39280. });
  39281. var linkEmits = { click: (evt) => evt instanceof MouseEvent };
  39282. //#endregion
  39283. //#region node_modules/element-plus/es/components/link/src/link.vue_vue_type_script_setup_true_lang.mjs
  39284. var _hoisted_1$31 = ["href", "target"];
  39285. //#endregion
  39286. //#region node_modules/element-plus/es/components/link/index.mjs
  39287. var ElLink = withInstall(/* @__PURE__ */ defineComponent({
  39288. name: "ElLink",
  39289. __name: "link",
  39290. props: linkProps,
  39291. emits: linkEmits,
  39292. setup(__props, { emit: __emit }) {
  39293. const props = __props;
  39294. const emit = __emit;
  39295. const globalConfig = useGlobalConfig("link");
  39296. useDeprecated({
  39297. scope: "el-link",
  39298. from: "The underline option (boolean)",
  39299. replacement: "'always' | 'hover' | 'never'",
  39300. version: "3.0.0",
  39301. ref: "https://element-plus.org/en-US/component/link.html#underline"
  39302. }, computed(() => isBoolean(props.underline)));
  39303. const ns = useNamespace("link");
  39304. const linkKls = computed(() => [
  39305. ns.b(),
  39306. ns.m(props.type ?? globalConfig.value?.type ?? "default"),
  39307. ns.is("disabled", props.disabled),
  39308. ns.is("underline", underline.value === "always"),
  39309. ns.is("hover-underline", underline.value === "hover" && !props.disabled)
  39310. ]);
  39311. const underline = computed(() => {
  39312. if (isBoolean(props.underline)) return props.underline ? "hover" : "never";
  39313. else return props.underline ?? globalConfig.value?.underline ?? "hover";
  39314. });
  39315. function handleClick(event) {
  39316. if (!props.disabled) emit("click", event);
  39317. }
  39318. return (_ctx, _cache) => {
  39319. return openBlock(), createElementBlock("a", {
  39320. class: normalizeClass(linkKls.value),
  39321. href: __props.disabled || !__props.href ? void 0 : __props.href,
  39322. target: __props.disabled || !__props.href ? void 0 : __props.target,
  39323. onClick: handleClick
  39324. }, [
  39325. __props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  39326. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  39327. _: 1
  39328. })) : createCommentVNode("v-if", true),
  39329. _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
  39330. key: 1,
  39331. class: normalizeClass(unref(ns).e("inner"))
  39332. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true),
  39333. _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
  39334. ], 10, _hoisted_1$31);
  39335. };
  39336. }
  39337. }));
  39338. //#endregion
  39339. //#region node_modules/element-plus/es/components/menu/src/tokens.mjs
  39340. var MENU_INJECTION_KEY = "rootMenu";
  39341. var SUB_MENU_INJECTION_KEY = "subMenu:";
  39342. //#endregion
  39343. //#region node_modules/element-plus/es/components/menu/src/use-menu.mjs
  39344. function useMenu(instance, currentIndex) {
  39345. const indexPath = computed(() => {
  39346. let parent = instance.parent;
  39347. const path = [currentIndex.value];
  39348. while (parent.type.name !== "ElMenu") {
  39349. if (parent.props.index) path.unshift(parent.props.index);
  39350. parent = parent.parent;
  39351. }
  39352. return path;
  39353. });
  39354. return {
  39355. parentMenu: computed(() => {
  39356. let parent = instance.parent;
  39357. while (parent && !["ElMenu", "ElSubMenu"].includes(parent.type.name)) parent = parent.parent;
  39358. return parent;
  39359. }),
  39360. indexPath
  39361. };
  39362. }
  39363. //#endregion
  39364. //#region node_modules/element-plus/es/components/menu/src/use-menu-color.mjs
  39365. function useMenuColor(props) {
  39366. return computed(() => {
  39367. const color = props.backgroundColor;
  39368. return color ? new TinyColor(color).shade(20).toString() : "";
  39369. });
  39370. }
  39371. //#endregion
  39372. //#region node_modules/element-plus/es/components/menu/src/use-menu-css-var.mjs
  39373. var useMenuCssVar = (props, level) => {
  39374. const ns = useNamespace("menu");
  39375. return computed(() => ns.cssVarBlock({
  39376. "text-color": props.textColor || "",
  39377. "hover-text-color": props.textColor || "",
  39378. "bg-color": props.backgroundColor || "",
  39379. "hover-bg-color": useMenuColor(props).value || "",
  39380. "active-color": props.activeTextColor || "",
  39381. level: `${level}`
  39382. }));
  39383. };
  39384. //#endregion
  39385. //#region node_modules/element-plus/es/components/menu/src/sub-menu.mjs
  39386. var subMenuProps = buildProps({
  39387. /**
  39388. * @description unique identification
  39389. */
  39390. index: {
  39391. type: String,
  39392. required: true
  39393. },
  39394. /**
  39395. * @description timeout before showing a sub-menu(inherit `show-timeout` of the menu by default.)
  39396. */
  39397. showTimeout: Number,
  39398. /**
  39399. * @description timeout before hiding a sub-menu(inherit `hide-timeout` of the menu by default.)
  39400. */
  39401. hideTimeout: Number,
  39402. /**
  39403. * @description custom class name for the popup menu
  39404. */
  39405. popperClass: String,
  39406. /**
  39407. * @description custom style for the popup menu
  39408. */
  39409. popperStyle: { type: definePropType([String, Object]) },
  39410. /**
  39411. * @description whether the sub-menu is disabled
  39412. */
  39413. disabled: Boolean,
  39414. /**
  39415. * @description whether popup menu is teleported to the body
  39416. */
  39417. teleported: {
  39418. type: Boolean,
  39419. default: void 0
  39420. },
  39421. /**
  39422. * @description offset of the popper (overrides the `popper` of menu)
  39423. */
  39424. popperOffset: Number,
  39425. /**
  39426. * @description Icon when menu are expanded and submenu are closed, `expand-close-icon` and `expand-open-icon` need to be passed together to take effect
  39427. */
  39428. expandCloseIcon: { type: iconPropType },
  39429. /**
  39430. * @description Icon when menu are expanded and submenu are opened, `expand-open-icon` and `expand-close-icon` need to be passed together to take effect
  39431. */
  39432. expandOpenIcon: { type: iconPropType },
  39433. /**
  39434. * @description Icon when menu are collapsed and submenu are closed, `collapse-close-icon` and `collapse-open-icon` need to be passed together to take effect
  39435. */
  39436. collapseCloseIcon: { type: iconPropType },
  39437. /**
  39438. * @description Icon when menu are collapsed and submenu are opened, `collapse-open-icon` and `collapse-close-icon` need to be passed together to take effect
  39439. */
  39440. collapseOpenIcon: { type: iconPropType }
  39441. });
  39442. var COMPONENT_NAME$8 = "ElSubMenu";
  39443. var sub_menu_default = defineComponent({
  39444. name: COMPONENT_NAME$8,
  39445. props: subMenuProps,
  39446. setup(props, { slots, expose }) {
  39447. const instance = getCurrentInstance();
  39448. const { indexPath, parentMenu } = useMenu(instance, computed(() => props.index));
  39449. const nsMenu = useNamespace("menu");
  39450. const nsSubMenu = useNamespace("sub-menu");
  39451. const rootMenu = inject(MENU_INJECTION_KEY);
  39452. if (!rootMenu) throwError(COMPONENT_NAME$8, "can not inject root menu");
  39453. const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
  39454. if (!subMenu) throwError(COMPONENT_NAME$8, "can not inject sub menu");
  39455. const items = ref({});
  39456. const subMenus = ref({});
  39457. let timeout;
  39458. const mouseInChild = ref(false);
  39459. const verticalTitleRef = ref();
  39460. const vPopper = ref();
  39461. const isFirstLevel = computed(() => subMenu.level === 0);
  39462. const currentPlacement = computed(() => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start");
  39463. const subMenuTitleIcon = computed(() => {
  39464. if (mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse) {
  39465. if (props.expandCloseIcon && props.expandOpenIcon) return opened.value ? props.expandOpenIcon : props.expandCloseIcon;
  39466. return arrow_down_default;
  39467. } else {
  39468. if (props.collapseCloseIcon && props.collapseOpenIcon) return opened.value ? props.collapseOpenIcon : props.collapseCloseIcon;
  39469. return arrow_right_default;
  39470. }
  39471. });
  39472. const appendToBody = computed(() => {
  39473. const value = props.teleported;
  39474. return isUndefined(value) ? isFirstLevel.value : value;
  39475. });
  39476. const menuTransitionName = computed(() => rootMenu.props.collapse ? `${nsMenu.namespace.value}-zoom-in-left` : `${nsMenu.namespace.value}-zoom-in-top`);
  39477. const fallbackPlacements = computed(() => mode.value === "horizontal" && isFirstLevel.value ? [
  39478. "bottom-start",
  39479. "bottom-end",
  39480. "top-start",
  39481. "top-end",
  39482. "right-start",
  39483. "left-start"
  39484. ] : [
  39485. "right-start",
  39486. "right",
  39487. "right-end",
  39488. "left-start",
  39489. "bottom-start",
  39490. "bottom-end",
  39491. "top-start",
  39492. "top-end"
  39493. ]);
  39494. const opened = computed(() => rootMenu.openedMenus.includes(props.index));
  39495. const active = computed(() => [...Object.values(items.value), ...Object.values(subMenus.value)].some(({ active }) => active));
  39496. const mode = computed(() => rootMenu.props.mode);
  39497. const persistent = computed(() => rootMenu.props.persistent);
  39498. const item = reactive({
  39499. index: props.index,
  39500. indexPath,
  39501. active
  39502. });
  39503. const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1);
  39504. const subMenuPopperOffset = computed(() => props.popperOffset ?? rootMenu.props.popperOffset);
  39505. const subMenuPopperClass = computed(() => props.popperClass ?? rootMenu.props.popperClass);
  39506. const subMenuPopperStyle = computed(() => props.popperStyle ?? rootMenu.props.popperStyle);
  39507. const subMenuShowTimeout = computed(() => props.showTimeout ?? rootMenu.props.showTimeout);
  39508. const subMenuHideTimeout = computed(() => props.hideTimeout ?? rootMenu.props.hideTimeout);
  39509. const doDestroy = () => vPopper.value?.popperRef?.popperInstanceRef?.destroy();
  39510. const handleCollapseToggle = (value) => {
  39511. if (!value) doDestroy();
  39512. };
  39513. const handleClick = () => {
  39514. if (rootMenu.props.menuTrigger === "hover" && rootMenu.props.mode === "horizontal" || rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) return;
  39515. rootMenu.handleSubMenuClick({
  39516. index: props.index,
  39517. indexPath: indexPath.value,
  39518. active: active.value
  39519. });
  39520. };
  39521. const handleMouseenter = (event, showTimeout = subMenuShowTimeout.value) => {
  39522. if (event.type === "focus") return;
  39523. if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) {
  39524. subMenu.mouseInChild.value = true;
  39525. return;
  39526. }
  39527. subMenu.mouseInChild.value = true;
  39528. timeout?.();
  39529. ({stop: timeout} = useTimeoutFn(() => {
  39530. rootMenu.openMenu(props.index, indexPath.value);
  39531. }, showTimeout));
  39532. if (appendToBody.value) parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter"));
  39533. if (event.type === "mouseenter" && event.target) nextTick(() => {
  39534. focusElement(event.target, { preventScroll: true });
  39535. });
  39536. };
  39537. const handleMouseleave = (deepDispatch = false) => {
  39538. if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical") {
  39539. subMenu.mouseInChild.value = false;
  39540. return;
  39541. }
  39542. timeout?.();
  39543. subMenu.mouseInChild.value = false;
  39544. ({stop: timeout} = useTimeoutFn(() => !mouseInChild.value && rootMenu.closeMenu(props.index, indexPath.value), subMenuHideTimeout.value));
  39545. if (appendToBody.value && deepDispatch) subMenu.handleMouseleave?.(true);
  39546. };
  39547. watch(() => rootMenu.props.collapse, (value) => handleCollapseToggle(Boolean(value)));
  39548. {
  39549. const addSubMenu = (item) => {
  39550. subMenus.value[item.index] = item;
  39551. };
  39552. const removeSubMenu = (item) => {
  39553. delete subMenus.value[item.index];
  39554. };
  39555. provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
  39556. addSubMenu,
  39557. removeSubMenu,
  39558. handleMouseleave,
  39559. mouseInChild,
  39560. level: subMenu.level + 1
  39561. });
  39562. }
  39563. expose({ opened });
  39564. onMounted(() => {
  39565. rootMenu.addSubMenu(item);
  39566. subMenu.addSubMenu(item);
  39567. });
  39568. onBeforeUnmount(() => {
  39569. subMenu.removeSubMenu(item);
  39570. rootMenu.removeSubMenu(item);
  39571. });
  39572. return () => {
  39573. const titleTag = [slots.title?.(), h$1(ElIcon, {
  39574. class: nsSubMenu.e("icon-arrow"),
  39575. style: { transform: opened.value ? props.expandCloseIcon && props.expandOpenIcon || props.collapseCloseIcon && props.collapseOpenIcon && rootMenu.props.collapse ? "none" : "rotateZ(180deg)" : "none" }
  39576. }, { default: () => isString(subMenuTitleIcon.value) ? h$1(instance.appContext.components[subMenuTitleIcon.value]) : h$1(subMenuTitleIcon.value) })];
  39577. const child = rootMenu.isMenuPopup ? h$1(ElTooltip, {
  39578. ref: vPopper,
  39579. visible: opened.value,
  39580. effect: "light",
  39581. pure: true,
  39582. offset: subMenuPopperOffset.value,
  39583. showArrow: false,
  39584. persistent: persistent.value,
  39585. popperClass: subMenuPopperClass.value,
  39586. popperStyle: subMenuPopperStyle.value,
  39587. placement: currentPlacement.value,
  39588. teleported: appendToBody.value,
  39589. fallbackPlacements: fallbackPlacements.value,
  39590. transition: menuTransitionName.value,
  39591. gpuAcceleration: false
  39592. }, {
  39593. content: () => h$1("div", {
  39594. class: [
  39595. nsMenu.m(mode.value),
  39596. nsMenu.m("popup-container"),
  39597. subMenuPopperClass.value
  39598. ],
  39599. onMouseenter: (evt) => handleMouseenter(evt, 100),
  39600. onMouseleave: () => handleMouseleave(true),
  39601. onFocus: (evt) => handleMouseenter(evt, 100)
  39602. }, [h$1("ul", {
  39603. class: [
  39604. nsMenu.b(),
  39605. nsMenu.m("popup"),
  39606. nsMenu.m(`popup-${currentPlacement.value}`)
  39607. ],
  39608. style: ulStyle.value
  39609. }, [slots.default?.()])]),
  39610. default: () => h$1("div", {
  39611. class: nsSubMenu.e("title"),
  39612. onClick: handleClick
  39613. }, titleTag)
  39614. }) : h$1(Fragment, {}, [h$1("div", {
  39615. class: nsSubMenu.e("title"),
  39616. ref: verticalTitleRef,
  39617. onClick: handleClick
  39618. }, titleTag), h$1(ElCollapseTransition, {}, { default: () => withDirectives(h$1("ul", {
  39619. role: "menu",
  39620. class: [nsMenu.b(), nsMenu.m("inline")],
  39621. style: ulStyle.value
  39622. }, [slots.default?.()]), [[vShow, opened.value]]) })]);
  39623. return h$1("li", {
  39624. class: [
  39625. nsSubMenu.b(),
  39626. nsSubMenu.is("active", active.value),
  39627. nsSubMenu.is("opened", opened.value),
  39628. nsSubMenu.is("disabled", props.disabled)
  39629. ],
  39630. role: "menuitem",
  39631. ariaHaspopup: true,
  39632. ariaExpanded: opened.value,
  39633. onMouseenter: handleMouseenter,
  39634. onMouseleave: () => handleMouseleave(),
  39635. onFocus: handleMouseenter
  39636. }, [child]);
  39637. };
  39638. }
  39639. });
  39640. //#endregion
  39641. //#region node_modules/element-plus/es/components/menu/src/utils/submenu.mjs
  39642. var SubMenu = class {
  39643. constructor(parent, domNode) {
  39644. this.parent = parent;
  39645. this.domNode = domNode;
  39646. this.subIndex = 0;
  39647. this.subMenuItems = this.domNode.querySelectorAll("li");
  39648. this.addListeners();
  39649. }
  39650. gotoSubIndex(idx) {
  39651. if (idx === this.subMenuItems.length) idx = 0;
  39652. else if (idx < 0) idx = this.subMenuItems.length - 1;
  39653. this.subMenuItems[idx].focus();
  39654. this.subIndex = idx;
  39655. }
  39656. addListeners() {
  39657. const parentNode = this.parent.domNode;
  39658. this.subMenuItems.forEach((el) => {
  39659. el.addEventListener("keydown", (event) => {
  39660. const code = getEventCode(event);
  39661. let prevDef = false;
  39662. switch (code) {
  39663. case EVENT_CODE.down:
  39664. this.gotoSubIndex(this.subIndex + 1);
  39665. prevDef = true;
  39666. break;
  39667. case EVENT_CODE.up:
  39668. this.gotoSubIndex(this.subIndex - 1);
  39669. prevDef = true;
  39670. break;
  39671. case EVENT_CODE.tab:
  39672. triggerEvent(parentNode, "mouseleave");
  39673. break;
  39674. case EVENT_CODE.enter:
  39675. case EVENT_CODE.numpadEnter:
  39676. case EVENT_CODE.space:
  39677. prevDef = true;
  39678. event.currentTarget.click();
  39679. break;
  39680. }
  39681. if (prevDef) {
  39682. event.preventDefault();
  39683. event.stopPropagation();
  39684. }
  39685. return false;
  39686. });
  39687. });
  39688. }
  39689. };
  39690. //#endregion
  39691. //#region node_modules/element-plus/es/components/menu/src/utils/menu-item.mjs
  39692. var MenuItem = class {
  39693. constructor(domNode, namespace) {
  39694. this.domNode = domNode;
  39695. this.submenu = null;
  39696. this.init(namespace);
  39697. }
  39698. init(namespace) {
  39699. this.domNode.setAttribute("tabindex", "0");
  39700. const menuChild = this.domNode.querySelector(`.${namespace}-menu`);
  39701. if (menuChild) this.submenu = new SubMenu(this, menuChild);
  39702. this.addListeners();
  39703. }
  39704. addListeners() {
  39705. this.domNode.addEventListener("keydown", (event) => {
  39706. const code = getEventCode(event);
  39707. let prevDef = false;
  39708. switch (code) {
  39709. case EVENT_CODE.down:
  39710. triggerEvent(event.currentTarget, "mouseenter");
  39711. this.submenu?.gotoSubIndex(0);
  39712. prevDef = true;
  39713. break;
  39714. case EVENT_CODE.up:
  39715. triggerEvent(event.currentTarget, "mouseenter");
  39716. this.submenu?.gotoSubIndex(this.submenu.subMenuItems.length - 1);
  39717. prevDef = true;
  39718. break;
  39719. case EVENT_CODE.tab:
  39720. triggerEvent(event.currentTarget, "mouseleave");
  39721. break;
  39722. case EVENT_CODE.enter:
  39723. case EVENT_CODE.numpadEnter:
  39724. case EVENT_CODE.space:
  39725. prevDef = true;
  39726. event.currentTarget.click();
  39727. break;
  39728. }
  39729. if (prevDef) event.preventDefault();
  39730. });
  39731. }
  39732. };
  39733. //#endregion
  39734. //#region node_modules/element-plus/es/components/menu/src/utils/menu-bar.mjs
  39735. var Menu = class {
  39736. constructor(domNode, namespace) {
  39737. this.domNode = domNode;
  39738. this.init(namespace);
  39739. }
  39740. init(namespace) {
  39741. const menuChildren = this.domNode.childNodes;
  39742. Array.from(menuChildren).forEach((child) => {
  39743. if (child.nodeType === 1) new MenuItem(child, namespace);
  39744. });
  39745. }
  39746. };
  39747. //#endregion
  39748. //#region node_modules/element-plus/es/components/menu/src/menu-collapse-transition.mjs
  39749. var menu_collapse_transition_default = /* @__PURE__ */ defineComponent({
  39750. name: "ElMenuCollapseTransition",
  39751. __name: "menu-collapse-transition",
  39752. setup(__props) {
  39753. const ns = useNamespace("menu");
  39754. const listeners = {
  39755. onBeforeEnter: (el) => el.style.opacity = "0.2",
  39756. onEnter(el, done) {
  39757. addClass(el, `${ns.namespace.value}-opacity-transition`);
  39758. el.style.opacity = "1";
  39759. done();
  39760. },
  39761. onAfterEnter(el) {
  39762. removeClass(el, `${ns.namespace.value}-opacity-transition`);
  39763. el.style.opacity = "";
  39764. },
  39765. onBeforeLeave(el) {
  39766. if (!el.dataset) el.dataset = {};
  39767. if (hasClass(el, ns.m("collapse"))) {
  39768. removeClass(el, ns.m("collapse"));
  39769. el.dataset.oldOverflow = el.style.overflow;
  39770. el.dataset.scrollWidth = el.clientWidth.toString();
  39771. addClass(el, ns.m("collapse"));
  39772. } else {
  39773. addClass(el, ns.m("collapse"));
  39774. el.dataset.oldOverflow = el.style.overflow;
  39775. el.dataset.scrollWidth = el.clientWidth.toString();
  39776. removeClass(el, ns.m("collapse"));
  39777. }
  39778. el.style.width = `${el.scrollWidth}px`;
  39779. el.style.overflow = "hidden";
  39780. },
  39781. onLeave(el) {
  39782. addClass(el, "horizontal-collapse-transition");
  39783. el.style.width = `${el.dataset.scrollWidth}px`;
  39784. }
  39785. };
  39786. return (_ctx, _cache) => {
  39787. return openBlock(), createBlock(Transition, mergeProps({ mode: "out-in" }, listeners), {
  39788. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  39789. _: 3
  39790. }, 16);
  39791. };
  39792. }
  39793. });
  39794. //#endregion
  39795. //#region node_modules/element-plus/es/components/menu/src/menu.mjs
  39796. var menuProps = buildProps({
  39797. /**
  39798. * @description menu display mode
  39799. */
  39800. mode: {
  39801. type: String,
  39802. values: ["horizontal", "vertical"],
  39803. default: "vertical"
  39804. },
  39805. /**
  39806. * @description index of active menu on page load
  39807. */
  39808. defaultActive: {
  39809. type: String,
  39810. default: ""
  39811. },
  39812. /**
  39813. * @description array that contains indexes of currently active sub-menus
  39814. */
  39815. defaultOpeneds: {
  39816. type: definePropType(Array),
  39817. default: () => mutable([])
  39818. },
  39819. /**
  39820. * @description whether only one sub-menu can be active
  39821. */
  39822. uniqueOpened: Boolean,
  39823. /**
  39824. * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.
  39825. */
  39826. router: Boolean,
  39827. /**
  39828. * @description how sub-menus are triggered, only works when `mode` is 'horizontal'
  39829. */
  39830. menuTrigger: {
  39831. type: String,
  39832. values: ["hover", "click"],
  39833. default: "hover"
  39834. },
  39835. /**
  39836. * @description whether the menu is collapsed (available only in vertical mode)
  39837. */
  39838. collapse: Boolean,
  39839. /**
  39840. * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)
  39841. * @deprecated use `--bg-color` instead
  39842. */
  39843. backgroundColor: String,
  39844. /**
  39845. * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)
  39846. * @deprecated use `--text-color` instead
  39847. */
  39848. textColor: String,
  39849. /**
  39850. * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)
  39851. * @deprecated use `--active-color` instead
  39852. */
  39853. activeTextColor: String,
  39854. /**
  39855. * @description optional, whether menu is collapsed when clicking outside
  39856. */
  39857. closeOnClickOutside: Boolean,
  39858. /**
  39859. * @description whether to enable the collapse transition
  39860. */
  39861. collapseTransition: {
  39862. type: Boolean,
  39863. default: true
  39864. },
  39865. /**
  39866. * @description whether the menu is ellipsis (available only in horizontal mode)
  39867. */
  39868. ellipsis: {
  39869. type: Boolean,
  39870. default: true
  39871. },
  39872. /**
  39873. * @description offset of the popper (effective for all submenus)
  39874. */
  39875. popperOffset: {
  39876. type: Number,
  39877. default: 6
  39878. },
  39879. /**
  39880. * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)
  39881. */
  39882. ellipsisIcon: {
  39883. type: iconPropType,
  39884. default: () => more_default
  39885. },
  39886. /**
  39887. * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed
  39888. */
  39889. popperEffect: {
  39890. type: definePropType(String),
  39891. default: "dark"
  39892. },
  39893. /**
  39894. * @description custom class name for all popup menus
  39895. */
  39896. popperClass: String,
  39897. /**
  39898. * @description custom style for all popup menus
  39899. */
  39900. popperStyle: { type: definePropType([String, Object]) },
  39901. /**
  39902. * @description control timeout for all menus before showing
  39903. */
  39904. showTimeout: {
  39905. type: Number,
  39906. default: 300
  39907. },
  39908. /**
  39909. * @description control timeout for all menus before hiding
  39910. */
  39911. hideTimeout: {
  39912. type: Number,
  39913. default: 300
  39914. },
  39915. /**
  39916. * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed
  39917. */
  39918. persistent: {
  39919. type: Boolean,
  39920. default: true
  39921. }
  39922. });
  39923. var checkIndexPath = (indexPath) => isArray$1(indexPath) && indexPath.every((path) => isString(path));
  39924. var menuEmits = {
  39925. close: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
  39926. open: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
  39927. select: (index, indexPath, item, routerResult) => isString(index) && checkIndexPath(indexPath) && isObject$2(item) && (isUndefined(routerResult) || routerResult instanceof Promise)
  39928. };
  39929. var DEFAULT_MORE_ITEM_WIDTH = 64;
  39930. var menu_default = defineComponent({
  39931. name: "ElMenu",
  39932. props: menuProps,
  39933. emits: menuEmits,
  39934. setup(props, { emit, slots, expose }) {
  39935. const instance = getCurrentInstance();
  39936. const router = instance.appContext.config.globalProperties.$router;
  39937. const menu = ref();
  39938. const subMenu = ref();
  39939. const nsMenu = useNamespace("menu");
  39940. const nsSubMenu = useNamespace("sub-menu");
  39941. let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH;
  39942. const sliceIndex = ref(-1);
  39943. const openedMenus = ref(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
  39944. const activeIndex = ref(props.defaultActive);
  39945. const items = ref({});
  39946. const subMenus = ref({});
  39947. const isMenuPopup = computed(() => props.mode === "horizontal" || props.mode === "vertical" && props.collapse);
  39948. const initMenu = () => {
  39949. const activeItem = activeIndex.value && items.value[activeIndex.value];
  39950. if (!activeItem || props.mode === "horizontal" || props.collapse) return;
  39951. activeItem.indexPath.forEach((index) => {
  39952. const subMenu = subMenus.value[index];
  39953. subMenu && openMenu(index, subMenu.indexPath);
  39954. });
  39955. };
  39956. const openMenu = (index, indexPath) => {
  39957. if (openedMenus.value.includes(index)) return;
  39958. if (props.uniqueOpened) openedMenus.value = openedMenus.value.filter((index) => indexPath.includes(index));
  39959. openedMenus.value.push(index);
  39960. emit("open", index, indexPath);
  39961. };
  39962. const close = (index) => {
  39963. const i = openedMenus.value.indexOf(index);
  39964. if (i !== -1) openedMenus.value.splice(i, 1);
  39965. };
  39966. const closeMenu = (index, indexPath) => {
  39967. close(index);
  39968. emit("close", index, indexPath);
  39969. };
  39970. const handleSubMenuClick = ({ index, indexPath }) => {
  39971. openedMenus.value.includes(index) ? closeMenu(index, indexPath) : openMenu(index, indexPath);
  39972. };
  39973. const handleMenuItemClick = (menuItem) => {
  39974. if (props.mode === "horizontal" || props.collapse) openedMenus.value = [];
  39975. const { index, indexPath } = menuItem;
  39976. if (isNil(index) || isNil(indexPath)) return;
  39977. if (props.router && router) {
  39978. const route = menuItem.route || index;
  39979. const routerResult = router.push(route).then((res) => {
  39980. if (!res) activeIndex.value = index;
  39981. return res;
  39982. });
  39983. emit("select", index, indexPath, {
  39984. index,
  39985. indexPath,
  39986. route
  39987. }, routerResult);
  39988. } else {
  39989. activeIndex.value = index;
  39990. emit("select", index, indexPath, {
  39991. index,
  39992. indexPath
  39993. });
  39994. }
  39995. };
  39996. const updateActiveIndex = (val) => {
  39997. const itemsInData = items.value;
  39998. activeIndex.value = (itemsInData[val] || activeIndex.value && itemsInData[activeIndex.value] || itemsInData[props.defaultActive])?.index ?? val;
  39999. };
  40000. const calcMenuItemWidth = (menuItem) => {
  40001. const computedStyle = getComputedStyle(menuItem);
  40002. const marginLeft = Number.parseInt(computedStyle.marginLeft, 10);
  40003. const marginRight = Number.parseInt(computedStyle.marginRight, 10);
  40004. return menuItem.offsetWidth + marginLeft + marginRight || 0;
  40005. };
  40006. const calcSliceIndex = () => {
  40007. if (!menu.value) return -1;
  40008. const items = Array.from(menu.value.childNodes).filter((item) => item.nodeName !== "#comment" && (item.nodeName !== "#text" || item.nodeValue));
  40009. const computedMenuStyle = getComputedStyle(menu.value);
  40010. const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10);
  40011. const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10);
  40012. const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight;
  40013. let calcWidth = 0;
  40014. let sliceIndex = 0;
  40015. items.forEach((item, index) => {
  40016. calcWidth += calcMenuItemWidth(item);
  40017. if (calcWidth <= menuWidth - moreItemWidth) sliceIndex = index + 1;
  40018. });
  40019. return sliceIndex === items.length ? -1 : sliceIndex;
  40020. };
  40021. const getIndexPath = (index) => subMenus.value[index].indexPath;
  40022. const debounce = (fn, wait = 33.34) => {
  40023. let timer;
  40024. return () => {
  40025. timer && clearTimeout(timer);
  40026. timer = setTimeout(() => {
  40027. fn();
  40028. }, wait);
  40029. };
  40030. };
  40031. let isFirstTimeRender = true;
  40032. const handleResize = () => {
  40033. const el = unrefElement(subMenu);
  40034. if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH;
  40035. if (sliceIndex.value === calcSliceIndex()) return;
  40036. const callback = () => {
  40037. sliceIndex.value = -1;
  40038. nextTick(() => {
  40039. sliceIndex.value = calcSliceIndex();
  40040. });
  40041. };
  40042. isFirstTimeRender ? callback() : debounce(callback)();
  40043. isFirstTimeRender = false;
  40044. };
  40045. watch(() => props.defaultActive, (currentActive) => {
  40046. if (!items.value[currentActive]) activeIndex.value = "";
  40047. updateActiveIndex(currentActive);
  40048. });
  40049. watch(() => props.collapse, (value) => {
  40050. if (value) openedMenus.value = [];
  40051. });
  40052. watch(items.value, initMenu);
  40053. let resizeStopper;
  40054. watchEffect(() => {
  40055. if (props.mode === "horizontal" && props.ellipsis) resizeStopper = useResizeObserver(menu, handleResize).stop;
  40056. else resizeStopper?.();
  40057. });
  40058. const mouseInChild = ref(false);
  40059. {
  40060. const addSubMenu = (item) => {
  40061. subMenus.value[item.index] = item;
  40062. };
  40063. const removeSubMenu = (item) => {
  40064. delete subMenus.value[item.index];
  40065. };
  40066. const addMenuItem = (item) => {
  40067. items.value[item.index] = item;
  40068. };
  40069. const removeMenuItem = (item) => {
  40070. delete items.value[item.index];
  40071. };
  40072. provide(MENU_INJECTION_KEY, reactive({
  40073. props,
  40074. openedMenus,
  40075. items,
  40076. subMenus,
  40077. activeIndex,
  40078. isMenuPopup,
  40079. addMenuItem,
  40080. removeMenuItem,
  40081. addSubMenu,
  40082. removeSubMenu,
  40083. openMenu,
  40084. closeMenu,
  40085. handleMenuItemClick,
  40086. handleSubMenuClick
  40087. }));
  40088. provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
  40089. addSubMenu,
  40090. removeSubMenu,
  40091. mouseInChild,
  40092. level: 0
  40093. });
  40094. }
  40095. onMounted(() => {
  40096. if (props.mode === "horizontal") new Menu(instance.vnode.el, nsMenu.namespace.value);
  40097. });
  40098. {
  40099. const open = (index) => {
  40100. const { indexPath } = subMenus.value[index];
  40101. indexPath.forEach((i) => openMenu(i, indexPath));
  40102. };
  40103. expose({
  40104. open,
  40105. close,
  40106. updateActiveIndex,
  40107. handleResize
  40108. });
  40109. }
  40110. const ulStyle = useMenuCssVar(props, 0);
  40111. return () => {
  40112. let slot = slots.default?.() ?? [];
  40113. const vShowMore = [];
  40114. if (props.mode === "horizontal" && menu.value) {
  40115. const originalSlot = flattedChildren(slot).filter((vnode) => {
  40116. return vnode?.shapeFlag !== 8;
  40117. });
  40118. const slotDefault = sliceIndex.value === -1 ? originalSlot : originalSlot.slice(0, sliceIndex.value);
  40119. const slotMore = sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value);
  40120. if (slotMore?.length && props.ellipsis) {
  40121. slot = slotDefault;
  40122. vShowMore.push(h$1(sub_menu_default, {
  40123. ref: subMenu,
  40124. index: "sub-menu-more",
  40125. class: nsSubMenu.e("hide-arrow"),
  40126. popperOffset: props.popperOffset
  40127. }, {
  40128. title: () => h$1(ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => h$1(props.ellipsisIcon) }),
  40129. default: () => slotMore
  40130. }));
  40131. }
  40132. }
  40133. const directives = props.closeOnClickOutside ? [[ClickOutside, () => {
  40134. if (!openedMenus.value.length) return;
  40135. if (!mouseInChild.value) {
  40136. openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
  40137. openedMenus.value = [];
  40138. }
  40139. }]] : [];
  40140. const vMenu = withDirectives(h$1("ul", {
  40141. key: String(props.collapse),
  40142. role: "menubar",
  40143. ref: menu,
  40144. style: ulStyle.value,
  40145. class: {
  40146. [nsMenu.b()]: true,
  40147. [nsMenu.m(props.mode)]: true,
  40148. [nsMenu.m("collapse")]: props.collapse
  40149. }
  40150. }, [...slot, ...vShowMore]), directives);
  40151. if (props.collapseTransition && props.mode === "vertical") return h$1(menu_collapse_transition_default, () => vMenu);
  40152. return vMenu;
  40153. };
  40154. }
  40155. });
  40156. //#endregion
  40157. //#region node_modules/element-plus/es/components/menu/src/menu-item.mjs
  40158. /**
  40159. * @deprecated Removed after 3.0.0, Use `MenuItemProps` instead.
  40160. */
  40161. var menuItemProps = buildProps({
  40162. /**
  40163. * @description unique identification
  40164. */
  40165. index: {
  40166. type: String,
  40167. required: true
  40168. },
  40169. /**
  40170. * @description Vue Router object
  40171. */
  40172. route: { type: definePropType([String, Object]) },
  40173. /**
  40174. * @description whether disabled
  40175. */
  40176. disabled: Boolean
  40177. });
  40178. var menuItemEmits = { click: (item) => isString(item.index) && isArray$1(item.indexPath) };
  40179. //#endregion
  40180. //#region node_modules/element-plus/es/components/menu/src/menu-item-group.mjs
  40181. /**
  40182. * @deprecated Removed after 3.0.0, Use `MenuItemGroupProps` instead.
  40183. */
  40184. var menuItemGroupProps = {
  40185. /**
  40186. * @description group title
  40187. */
  40188. title: String };
  40189. //#endregion
  40190. //#region node_modules/element-plus/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs
  40191. var COMPONENT_NAME$7 = "ElMenuItem";
  40192. //#endregion
  40193. //#region node_modules/element-plus/es/components/menu/src/menu-item2.mjs
  40194. var menu_item_default = /* @__PURE__ */ defineComponent({
  40195. name: COMPONENT_NAME$7,
  40196. __name: "menu-item",
  40197. props: menuItemProps,
  40198. emits: menuItemEmits,
  40199. setup(__props, { expose: __expose, emit: __emit }) {
  40200. const props = __props;
  40201. const emit = __emit;
  40202. const instance = getCurrentInstance();
  40203. const rootMenu = inject(MENU_INJECTION_KEY);
  40204. const nsMenu = useNamespace("menu");
  40205. const nsMenuItem = useNamespace("menu-item");
  40206. if (!rootMenu) throwError(COMPONENT_NAME$7, "can not inject root menu");
  40207. const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
  40208. const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
  40209. if (!subMenu) throwError(COMPONENT_NAME$7, "can not inject sub menu");
  40210. const active = computed(() => props.index === rootMenu.activeIndex);
  40211. const item = reactive({
  40212. index: props.index,
  40213. indexPath,
  40214. active
  40215. });
  40216. const handleClick = () => {
  40217. if (!props.disabled) {
  40218. rootMenu.handleMenuItemClick({
  40219. index: props.index,
  40220. indexPath: indexPath.value,
  40221. route: props.route
  40222. });
  40223. emit("click", item);
  40224. }
  40225. };
  40226. onMounted(() => {
  40227. subMenu.addSubMenu(item);
  40228. rootMenu.addMenuItem(item);
  40229. });
  40230. onBeforeUnmount(() => {
  40231. subMenu.removeSubMenu(item);
  40232. rootMenu.removeMenuItem(item);
  40233. });
  40234. __expose({
  40235. parentMenu,
  40236. rootMenu,
  40237. active,
  40238. nsMenu,
  40239. nsMenuItem,
  40240. handleClick
  40241. });
  40242. return (_ctx, _cache) => {
  40243. return openBlock(), createElementBlock("li", {
  40244. class: normalizeClass([
  40245. unref(nsMenuItem).b(),
  40246. unref(nsMenuItem).is("active", active.value),
  40247. unref(nsMenuItem).is("disabled", __props.disabled)
  40248. ]),
  40249. role: "menuitem",
  40250. tabindex: "-1",
  40251. onClick: handleClick
  40252. }, [unref(parentMenu).type.name === "ElMenu" && unref(rootMenu).props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(unref(ElTooltip), {
  40253. key: 0,
  40254. effect: unref(rootMenu).props.popperEffect,
  40255. placement: "right",
  40256. "fallback-placements": ["left"],
  40257. "popper-class": unref(rootMenu).props.popperClass,
  40258. "popper-style": unref(rootMenu).props.popperStyle,
  40259. persistent: unref(rootMenu).props.persistent,
  40260. "focus-on-target": ""
  40261. }, {
  40262. content: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
  40263. default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(nsMenu).be("tooltip", "trigger")) }, [renderSlot(_ctx.$slots, "default")], 2)]),
  40264. _: 3
  40265. }, 8, [
  40266. "effect",
  40267. "popper-class",
  40268. "popper-style",
  40269. "persistent"
  40270. ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [renderSlot(_ctx.$slots, "default"), renderSlot(_ctx.$slots, "title")], 64))], 2);
  40271. };
  40272. }
  40273. });
  40274. //#endregion
  40275. //#region node_modules/element-plus/es/components/menu/src/menu-item-group2.mjs
  40276. var menu_item_group_default = /* @__PURE__ */ defineComponent({
  40277. name: "ElMenuItemGroup",
  40278. __name: "menu-item-group",
  40279. props: menuItemGroupProps,
  40280. setup(__props) {
  40281. const ns = useNamespace("menu-item-group");
  40282. return (_ctx, _cache) => {
  40283. return openBlock(), createElementBlock("li", { class: normalizeClass(unref(ns).b()) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [!_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(__props.title), 1)], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })], 2), createBaseVNode("ul", null, [renderSlot(_ctx.$slots, "default")])], 2);
  40284. };
  40285. }
  40286. });
  40287. //#endregion
  40288. //#region node_modules/element-plus/es/components/menu/index.mjs
  40289. var ElMenu = withInstall(menu_default, {
  40290. MenuItem: menu_item_default,
  40291. MenuItemGroup: menu_item_group_default,
  40292. SubMenu: sub_menu_default
  40293. });
  40294. var ElMenuItem = withNoopInstall(menu_item_default);
  40295. var ElMenuItemGroup = withNoopInstall(menu_item_group_default);
  40296. var ElSubMenu = withNoopInstall(sub_menu_default);
  40297. //#endregion
  40298. //#region node_modules/element-plus/es/components/page-header/src/page-header.mjs
  40299. /**
  40300. * @deprecated Removed after 3.0.0, Use `PageHeaderProps` instead.
  40301. */
  40302. var pageHeaderProps = buildProps({
  40303. /**
  40304. * @description icon component of page header
  40305. */
  40306. icon: {
  40307. type: iconPropType,
  40308. default: () => back_default
  40309. },
  40310. /**
  40311. * @description main title of page header
  40312. */
  40313. title: String,
  40314. /**
  40315. * @description content of page header
  40316. */
  40317. content: {
  40318. type: String,
  40319. default: ""
  40320. }
  40321. });
  40322. var pageHeaderEmits = { back: () => true };
  40323. //#endregion
  40324. //#region node_modules/element-plus/es/components/page-header/src/page-header.vue_vue_type_script_setup_true_lang.mjs
  40325. var _hoisted_1$30 = ["aria-label"];
  40326. //#endregion
  40327. //#region node_modules/element-plus/es/components/page-header/index.mjs
  40328. var ElPageHeader = withInstall(/* @__PURE__ */ defineComponent({
  40329. name: "ElPageHeader",
  40330. __name: "page-header",
  40331. props: pageHeaderProps,
  40332. emits: pageHeaderEmits,
  40333. setup(__props, { emit: __emit }) {
  40334. const emit = __emit;
  40335. const { t } = useLocale();
  40336. const ns = useNamespace("page-header");
  40337. function handleClick() {
  40338. emit("back");
  40339. }
  40340. return (_ctx, _cache) => {
  40341. return openBlock(), createElementBlock("div", { class: normalizeClass([
  40342. unref(ns).b(),
  40343. unref(ns).is("contentful", !!_ctx.$slots.default),
  40344. {
  40345. [unref(ns).m("has-breadcrumb")]: !!_ctx.$slots.breadcrumb,
  40346. [unref(ns).m("has-extra")]: !!_ctx.$slots.extra
  40347. }
  40348. ]) }, [
  40349. _ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
  40350. key: 0,
  40351. class: normalizeClass(unref(ns).e("breadcrumb"))
  40352. }, [renderSlot(_ctx.$slots, "breadcrumb")], 2)) : createCommentVNode("v-if", true),
  40353. createBaseVNode("div", { class: normalizeClass(unref(ns).e("header")) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("left")) }, [
  40354. createBaseVNode("div", {
  40355. class: normalizeClass(unref(ns).e("back")),
  40356. role: "button",
  40357. tabindex: "0",
  40358. onClick: handleClick
  40359. }, [__props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
  40360. key: 0,
  40361. "aria-label": __props.title || unref(t)("el.pageHeader.title"),
  40362. class: normalizeClass(unref(ns).e("icon"))
  40363. }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  40364. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  40365. _: 1
  40366. })) : createCommentVNode("v-if", true)])], 10, _hoisted_1$30)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title || unref(t)("el.pageHeader.title")), 1)])], 2)], 2),
  40367. createVNode(unref(ElDivider), { direction: "vertical" }),
  40368. createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])], 2)
  40369. ], 2), _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  40370. key: 0,
  40371. class: normalizeClass(unref(ns).e("extra"))
  40372. }, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)], 2),
  40373. _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
  40374. key: 1,
  40375. class: normalizeClass(unref(ns).e("main"))
  40376. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
  40377. ], 2);
  40378. };
  40379. }
  40380. }));
  40381. //#endregion
  40382. //#region node_modules/element-plus/es/components/pagination/src/constants.mjs
  40383. var elPaginationKey = Symbol("elPaginationKey");
  40384. //#endregion
  40385. //#region node_modules/element-plus/es/components/pagination/src/components/prev.mjs
  40386. var paginationPrevProps = buildProps({
  40387. disabled: Boolean,
  40388. currentPage: {
  40389. type: Number,
  40390. default: 1
  40391. },
  40392. prevText: { type: String },
  40393. prevIcon: { type: iconPropType }
  40394. });
  40395. var paginationPrevEmits = { click: (evt) => evt instanceof MouseEvent };
  40396. //#endregion
  40397. //#region node_modules/element-plus/es/components/pagination/src/components/prev.vue_vue_type_script_setup_true_lang.mjs
  40398. var _hoisted_1$29 = [
  40399. "disabled",
  40400. "aria-label",
  40401. "aria-disabled"
  40402. ];
  40403. var _hoisted_2$18 = { key: 0 };
  40404. //#endregion
  40405. //#region node_modules/element-plus/es/components/pagination/src/components/prev2.mjs
  40406. var prev_default = /* @__PURE__ */ defineComponent({
  40407. name: "ElPaginationPrev",
  40408. __name: "prev",
  40409. props: paginationPrevProps,
  40410. emits: paginationPrevEmits,
  40411. setup(__props) {
  40412. const props = __props;
  40413. const { t } = useLocale();
  40414. const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);
  40415. return (_ctx, _cache) => {
  40416. return openBlock(), createElementBlock("button", {
  40417. type: "button",
  40418. class: "btn-prev",
  40419. disabled: internalDisabled.value,
  40420. "aria-label": _ctx.prevText || unref(t)("el.pagination.prev"),
  40421. "aria-disabled": internalDisabled.value,
  40422. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
  40423. }, [_ctx.prevText ? (openBlock(), createElementBlock("span", _hoisted_2$18, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  40424. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))]),
  40425. _: 1
  40426. }))], 8, _hoisted_1$29);
  40427. };
  40428. }
  40429. });
  40430. //#endregion
  40431. //#region node_modules/element-plus/es/components/pagination/src/components/next.mjs
  40432. var paginationNextProps = buildProps({
  40433. disabled: Boolean,
  40434. currentPage: {
  40435. type: Number,
  40436. default: 1
  40437. },
  40438. pageCount: {
  40439. type: Number,
  40440. default: 50
  40441. },
  40442. nextText: { type: String },
  40443. nextIcon: { type: iconPropType }
  40444. });
  40445. //#endregion
  40446. //#region node_modules/element-plus/es/components/pagination/src/components/next.vue_vue_type_script_setup_true_lang.mjs
  40447. var _hoisted_1$28 = [
  40448. "disabled",
  40449. "aria-label",
  40450. "aria-disabled"
  40451. ];
  40452. var _hoisted_2$17 = { key: 0 };
  40453. //#endregion
  40454. //#region node_modules/element-plus/es/components/pagination/src/components/next2.mjs
  40455. var next_default = /* @__PURE__ */ defineComponent({
  40456. name: "ElPaginationNext",
  40457. __name: "next",
  40458. props: paginationNextProps,
  40459. emits: ["click"],
  40460. setup(__props) {
  40461. const props = __props;
  40462. const { t } = useLocale();
  40463. const internalDisabled = computed(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
  40464. return (_ctx, _cache) => {
  40465. return openBlock(), createElementBlock("button", {
  40466. type: "button",
  40467. class: "btn-next",
  40468. disabled: internalDisabled.value,
  40469. "aria-label": _ctx.nextText || unref(t)("el.pagination.next"),
  40470. "aria-disabled": internalDisabled.value,
  40471. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
  40472. }, [_ctx.nextText ? (openBlock(), createElementBlock("span", _hoisted_2$17, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  40473. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))]),
  40474. _: 1
  40475. }))], 8, _hoisted_1$28);
  40476. };
  40477. }
  40478. });
  40479. //#endregion
  40480. //#region node_modules/element-plus/es/components/pagination/src/usePagination.mjs
  40481. var usePagination = () => inject(elPaginationKey, {});
  40482. //#endregion
  40483. //#region node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs
  40484. var sizes_default = /* @__PURE__ */ defineComponent({
  40485. name: "ElPaginationSizes",
  40486. __name: "sizes",
  40487. props: buildProps({
  40488. pageSize: {
  40489. type: Number,
  40490. required: true
  40491. },
  40492. pageSizes: {
  40493. type: definePropType(Array),
  40494. default: () => mutable([
  40495. 10,
  40496. 20,
  40497. 30,
  40498. 40,
  40499. 50,
  40500. 100
  40501. ])
  40502. },
  40503. popperClass: { type: String },
  40504. popperStyle: { type: definePropType([String, Object]) },
  40505. disabled: Boolean,
  40506. teleported: Boolean,
  40507. size: {
  40508. type: String,
  40509. values: componentSizes
  40510. },
  40511. appendSizeTo: String
  40512. }),
  40513. emits: ["page-size-change"],
  40514. setup(__props, { emit: __emit }) {
  40515. const props = __props;
  40516. const emit = __emit;
  40517. const { t } = useLocale();
  40518. const ns = useNamespace("pagination");
  40519. const pagination = usePagination();
  40520. const innerPageSize = ref(props.pageSize);
  40521. watch(() => props.pageSizes, (newVal, oldVal) => {
  40522. if (isEqual$1(newVal, oldVal)) return;
  40523. if (isArray$1(newVal)) emit("page-size-change", newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0]);
  40524. });
  40525. watch(() => props.pageSize, (newVal) => {
  40526. innerPageSize.value = newVal;
  40527. });
  40528. const innerPageSizes = computed(() => props.pageSizes);
  40529. function handleChange(val) {
  40530. if (val !== innerPageSize.value) {
  40531. innerPageSize.value = val;
  40532. pagination.handleSizeChange?.(Number(val));
  40533. }
  40534. }
  40535. return (_ctx, _cache) => {
  40536. return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("sizes")) }, [createVNode(unref(ElSelect), {
  40537. "model-value": innerPageSize.value,
  40538. disabled: _ctx.disabled,
  40539. "popper-class": _ctx.popperClass,
  40540. "popper-style": _ctx.popperStyle,
  40541. size: _ctx.size,
  40542. teleported: _ctx.teleported,
  40543. "validate-event": false,
  40544. "append-to": _ctx.appendSizeTo,
  40545. onChange: handleChange
  40546. }, {
  40547. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(innerPageSizes.value, (item) => {
  40548. return openBlock(), createBlock(unref(ElOption), {
  40549. key: item,
  40550. value: item,
  40551. label: item + unref(t)("el.pagination.pagesize")
  40552. }, null, 8, ["value", "label"]);
  40553. }), 128))]),
  40554. _: 1
  40555. }, 8, [
  40556. "model-value",
  40557. "disabled",
  40558. "popper-class",
  40559. "popper-style",
  40560. "size",
  40561. "teleported",
  40562. "append-to"
  40563. ])], 2);
  40564. };
  40565. }
  40566. });
  40567. //#endregion
  40568. //#region node_modules/element-plus/es/components/pagination/src/components/jumper.mjs
  40569. var paginationJumperProps = buildProps({ size: {
  40570. type: String,
  40571. values: componentSizes
  40572. } });
  40573. //#endregion
  40574. //#region node_modules/element-plus/es/components/pagination/src/components/jumper.vue_vue_type_script_setup_true_lang.mjs
  40575. var _hoisted_1$27 = ["disabled"];
  40576. //#endregion
  40577. //#region node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs
  40578. var jumper_default = /* @__PURE__ */ defineComponent({
  40579. name: "ElPaginationJumper",
  40580. __name: "jumper",
  40581. props: paginationJumperProps,
  40582. setup(__props) {
  40583. const { t } = useLocale();
  40584. const ns = useNamespace("pagination");
  40585. const { pageCount, disabled, currentPage, changeEvent } = usePagination();
  40586. const userInput = ref();
  40587. const innerValue = computed(() => userInput.value ?? currentPage?.value);
  40588. function handleInput(val) {
  40589. userInput.value = val ? +val : "";
  40590. }
  40591. function handleChange(val) {
  40592. val = Math.trunc(+val);
  40593. changeEvent?.(val);
  40594. userInput.value = void 0;
  40595. }
  40596. return (_ctx, _cache) => {
  40597. return openBlock(), createElementBlock("span", {
  40598. class: normalizeClass(unref(ns).e("jump")),
  40599. disabled: unref(disabled)
  40600. }, [
  40601. createBaseVNode("span", { class: normalizeClass([unref(ns).e("goto")]) }, toDisplayString(unref(t)("el.pagination.goto")), 3),
  40602. createVNode(unref(ElInput), {
  40603. size: _ctx.size,
  40604. class: normalizeClass([unref(ns).e("editor"), unref(ns).is("in-pagination")]),
  40605. min: 1,
  40606. max: unref(pageCount),
  40607. disabled: unref(disabled),
  40608. "model-value": innerValue.value,
  40609. "validate-event": false,
  40610. "aria-label": unref(t)("el.pagination.page"),
  40611. type: "number",
  40612. "onUpdate:modelValue": handleInput,
  40613. onChange: handleChange
  40614. }, null, 8, [
  40615. "size",
  40616. "class",
  40617. "max",
  40618. "disabled",
  40619. "model-value",
  40620. "aria-label"
  40621. ]),
  40622. createBaseVNode("span", { class: normalizeClass([unref(ns).e("classifier")]) }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3)
  40623. ], 10, _hoisted_1$27);
  40624. };
  40625. }
  40626. });
  40627. //#endregion
  40628. //#region node_modules/element-plus/es/components/pagination/src/components/total.mjs
  40629. var paginationTotalProps = buildProps({ total: {
  40630. type: Number,
  40631. default: 1e3
  40632. } });
  40633. //#endregion
  40634. //#region node_modules/element-plus/es/components/pagination/src/components/total.vue_vue_type_script_setup_true_lang.mjs
  40635. var _hoisted_1$26 = ["disabled"];
  40636. //#endregion
  40637. //#region node_modules/element-plus/es/components/pagination/src/components/total2.mjs
  40638. var total_default = /* @__PURE__ */ defineComponent({
  40639. name: "ElPaginationTotal",
  40640. __name: "total",
  40641. props: paginationTotalProps,
  40642. setup(__props) {
  40643. const { t } = useLocale();
  40644. const ns = useNamespace("pagination");
  40645. const { disabled } = usePagination();
  40646. return (_ctx, _cache) => {
  40647. return openBlock(), createElementBlock("span", {
  40648. class: normalizeClass(unref(ns).e("total")),
  40649. disabled: unref(disabled)
  40650. }, toDisplayString(unref(t)("el.pagination.total", { total: _ctx.total })), 11, _hoisted_1$26);
  40651. };
  40652. }
  40653. });
  40654. //#endregion
  40655. //#region node_modules/element-plus/es/components/pagination/src/components/pager.mjs
  40656. var paginationPagerProps = buildProps({
  40657. currentPage: {
  40658. type: Number,
  40659. default: 1
  40660. },
  40661. pageCount: {
  40662. type: Number,
  40663. required: true
  40664. },
  40665. pagerCount: {
  40666. type: Number,
  40667. default: 7
  40668. },
  40669. disabled: Boolean
  40670. });
  40671. //#endregion
  40672. //#region node_modules/element-plus/es/components/pagination/src/components/pager.vue_vue_type_script_setup_true_lang.mjs
  40673. var _hoisted_1$25 = [
  40674. "aria-current",
  40675. "aria-label",
  40676. "tabindex"
  40677. ];
  40678. var _hoisted_2$16 = ["tabindex", "aria-label"];
  40679. var _hoisted_3$7 = [
  40680. "aria-current",
  40681. "aria-label",
  40682. "tabindex"
  40683. ];
  40684. var _hoisted_4$5 = ["tabindex", "aria-label"];
  40685. var _hoisted_5$3 = [
  40686. "aria-current",
  40687. "aria-label",
  40688. "tabindex"
  40689. ];
  40690. //#endregion
  40691. //#region node_modules/element-plus/es/components/pagination/src/components/pager2.mjs
  40692. var pager_default = /* @__PURE__ */ defineComponent({
  40693. name: "ElPaginationPager",
  40694. __name: "pager",
  40695. props: paginationPagerProps,
  40696. emits: [CHANGE_EVENT],
  40697. setup(__props, { emit: __emit }) {
  40698. const props = __props;
  40699. const emit = __emit;
  40700. const nsPager = useNamespace("pager");
  40701. const nsIcon = useNamespace("icon");
  40702. const { t } = useLocale();
  40703. const showPrevMore = ref(false);
  40704. const showNextMore = ref(false);
  40705. const quickPrevHover = ref(false);
  40706. const quickNextHover = ref(false);
  40707. const quickPrevFocus = ref(false);
  40708. const quickNextFocus = ref(false);
  40709. const pagers = computed(() => {
  40710. const pagerCount = props.pagerCount;
  40711. const halfPagerCount = (pagerCount - 1) / 2;
  40712. const currentPage = Number(props.currentPage);
  40713. const pageCount = Number(props.pageCount);
  40714. let showPrevMore = false;
  40715. let showNextMore = false;
  40716. if (pageCount > pagerCount) {
  40717. if (currentPage > pagerCount - halfPagerCount) showPrevMore = true;
  40718. if (currentPage < pageCount - halfPagerCount) showNextMore = true;
  40719. }
  40720. const array = [];
  40721. if (showPrevMore && !showNextMore) {
  40722. const startPage = pageCount - (pagerCount - 2);
  40723. for (let i = startPage; i < pageCount; i++) array.push(i);
  40724. } else if (!showPrevMore && showNextMore) for (let i = 2; i < pagerCount; i++) array.push(i);
  40725. else if (showPrevMore && showNextMore) {
  40726. const offset = Math.floor(pagerCount / 2) - 1;
  40727. for (let i = currentPage - offset; i <= currentPage + offset; i++) array.push(i);
  40728. } else for (let i = 2; i < pageCount; i++) array.push(i);
  40729. return array;
  40730. });
  40731. const prevMoreKls = computed(() => [
  40732. "more",
  40733. "btn-quickprev",
  40734. nsIcon.b(),
  40735. nsPager.is("disabled", props.disabled)
  40736. ]);
  40737. const nextMoreKls = computed(() => [
  40738. "more",
  40739. "btn-quicknext",
  40740. nsIcon.b(),
  40741. nsPager.is("disabled", props.disabled)
  40742. ]);
  40743. const tabindex = computed(() => props.disabled ? -1 : 0);
  40744. watch(() => [
  40745. props.pageCount,
  40746. props.pagerCount,
  40747. props.currentPage
  40748. ], ([pageCount, pagerCount, currentPage]) => {
  40749. const halfPagerCount = (pagerCount - 1) / 2;
  40750. let showPrev = false;
  40751. let showNext = false;
  40752. if (pageCount > pagerCount) {
  40753. showPrev = currentPage > pagerCount - halfPagerCount;
  40754. showNext = currentPage < pageCount - halfPagerCount;
  40755. }
  40756. quickPrevHover.value &&= showPrev;
  40757. quickNextHover.value &&= showNext;
  40758. showPrevMore.value = showPrev;
  40759. showNextMore.value = showNext;
  40760. }, { immediate: true });
  40761. function onMouseEnter(forward = false) {
  40762. if (props.disabled) return;
  40763. if (forward) quickPrevHover.value = true;
  40764. else quickNextHover.value = true;
  40765. }
  40766. function onFocus(forward = false) {
  40767. if (forward) quickPrevFocus.value = true;
  40768. else quickNextFocus.value = true;
  40769. }
  40770. function onEnter(e) {
  40771. const target = e.target;
  40772. if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
  40773. const newPage = Number(target.textContent);
  40774. if (newPage !== props.currentPage) emit(CHANGE_EVENT, newPage);
  40775. } else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) onPagerClick(e);
  40776. }
  40777. function onPagerClick(event) {
  40778. const target = event.target;
  40779. if (target.tagName.toLowerCase() === "ul" || props.disabled) return;
  40780. let newPage = Number(target.textContent);
  40781. const pageCount = props.pageCount;
  40782. const currentPage = props.currentPage;
  40783. const pagerCountOffset = props.pagerCount - 2;
  40784. if (target.className.includes("more")) {
  40785. if (target.className.includes("quickprev")) newPage = currentPage - pagerCountOffset;
  40786. else if (target.className.includes("quicknext")) newPage = currentPage + pagerCountOffset;
  40787. }
  40788. if (!Number.isNaN(+newPage)) {
  40789. if (newPage < 1) newPage = 1;
  40790. if (newPage > pageCount) newPage = pageCount;
  40791. }
  40792. if (newPage !== currentPage) emit(CHANGE_EVENT, newPage);
  40793. }
  40794. return (_ctx, _cache) => {
  40795. return openBlock(), createElementBlock("ul", {
  40796. class: normalizeClass(unref(nsPager).b()),
  40797. onClick: onPagerClick,
  40798. onKeyup: withKeys(onEnter, ["enter"])
  40799. }, [
  40800. _ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
  40801. key: 0,
  40802. class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === 1), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
  40803. "aria-current": _ctx.currentPage === 1,
  40804. "aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
  40805. tabindex: tabindex.value
  40806. }, " 1 ", 10, _hoisted_1$25)) : createCommentVNode("v-if", true),
  40807. showPrevMore.value ? (openBlock(), createElementBlock("li", {
  40808. key: 1,
  40809. class: normalizeClass(prevMoreKls.value),
  40810. tabindex: tabindex.value,
  40811. "aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
  40812. onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)),
  40813. onMouseleave: _cache[1] || (_cache[1] = ($event) => quickPrevHover.value = false),
  40814. onFocus: _cache[2] || (_cache[2] = ($event) => onFocus(true)),
  40815. onBlur: _cache[3] || (_cache[3] = ($event) => quickPrevFocus.value = false)
  40816. }, [(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_left_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))], 42, _hoisted_2$16)) : createCommentVNode("v-if", true),
  40817. (openBlock(true), createElementBlock(Fragment, null, renderList(pagers.value, (pager) => {
  40818. return openBlock(), createElementBlock("li", {
  40819. key: pager,
  40820. class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === pager), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
  40821. "aria-current": _ctx.currentPage === pager,
  40822. "aria-label": unref(t)("el.pagination.currentPage", { pager }),
  40823. tabindex: tabindex.value
  40824. }, toDisplayString(pager), 11, _hoisted_3$7);
  40825. }), 128)),
  40826. showNextMore.value ? (openBlock(), createElementBlock("li", {
  40827. key: 2,
  40828. class: normalizeClass(nextMoreKls.value),
  40829. tabindex: tabindex.value,
  40830. "aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
  40831. onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()),
  40832. onMouseleave: _cache[5] || (_cache[5] = ($event) => quickNextHover.value = false),
  40833. onFocus: _cache[6] || (_cache[6] = ($event) => onFocus()),
  40834. onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false)
  40835. }, [(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_right_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))], 42, _hoisted_4$5)) : createCommentVNode("v-if", true),
  40836. _ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
  40837. key: 3,
  40838. class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
  40839. "aria-current": _ctx.currentPage === _ctx.pageCount,
  40840. "aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
  40841. tabindex: tabindex.value
  40842. }, toDisplayString(_ctx.pageCount), 11, _hoisted_5$3)) : createCommentVNode("v-if", true)
  40843. ], 34);
  40844. };
  40845. }
  40846. });
  40847. //#endregion
  40848. //#region node_modules/element-plus/es/components/pagination/src/pagination.mjs
  40849. /**
  40850. * It it user's responsibility to guarantee that the value of props.total... is number
  40851. * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)
  40852. * Otherwise we can reasonable infer that the corresponding field is absent
  40853. */
  40854. var isAbsent = (v) => typeof v !== "number";
  40855. var paginationProps = buildProps({
  40856. /**
  40857. * @description options of item count per page
  40858. */
  40859. pageSize: Number,
  40860. /**
  40861. * @description default initial value of page size, not setting is the same as setting 10
  40862. */
  40863. defaultPageSize: Number,
  40864. /**
  40865. * @description total item count
  40866. */
  40867. total: Number,
  40868. /**
  40869. * @description total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required
  40870. */
  40871. pageCount: Number,
  40872. /**
  40873. * @description number of pagers. Pagination collapses when the total page count exceeds this value
  40874. */
  40875. pagerCount: {
  40876. type: Number,
  40877. validator: (value) => {
  40878. return isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
  40879. },
  40880. default: 7
  40881. },
  40882. /**
  40883. * @description current page number
  40884. */
  40885. currentPage: Number,
  40886. /**
  40887. * @description default initial value of current-page, not setting is the same as setting 1
  40888. */
  40889. defaultCurrentPage: Number,
  40890. /**
  40891. * @description layout of Pagination, elements separated with a comma
  40892. */
  40893. layout: {
  40894. type: String,
  40895. default: [
  40896. "prev",
  40897. "pager",
  40898. "next",
  40899. "jumper",
  40900. "->",
  40901. "total"
  40902. ].join(", ")
  40903. },
  40904. /**
  40905. * @description item count of each page
  40906. */
  40907. pageSizes: {
  40908. type: definePropType(Array),
  40909. default: () => mutable([
  40910. 10,
  40911. 20,
  40912. 30,
  40913. 40,
  40914. 50,
  40915. 100
  40916. ])
  40917. },
  40918. /**
  40919. * @description custom class name for the page size Select's dropdown
  40920. */
  40921. popperClass: {
  40922. type: String,
  40923. default: ""
  40924. },
  40925. /**
  40926. * @description custom style for the page size Select's dropdown
  40927. */
  40928. popperStyle: { type: definePropType([String, Object]) },
  40929. /**
  40930. * @description text for the prev button
  40931. */
  40932. prevText: {
  40933. type: String,
  40934. default: ""
  40935. },
  40936. /**
  40937. * @description icon for the prev button, higher priority of `prev-text`
  40938. */
  40939. prevIcon: {
  40940. type: iconPropType,
  40941. default: () => arrow_left_default
  40942. },
  40943. /**
  40944. * @description text for the next button
  40945. */
  40946. nextText: {
  40947. type: String,
  40948. default: ""
  40949. },
  40950. /**
  40951. * @description icon for the next button, higher priority of `next-text`
  40952. */
  40953. nextIcon: {
  40954. type: iconPropType,
  40955. default: () => arrow_right_default
  40956. },
  40957. /**
  40958. * @description whether Pagination size is teleported to body
  40959. */
  40960. teleported: {
  40961. type: Boolean,
  40962. default: true
  40963. },
  40964. /**
  40965. * @description whether to use small pagination
  40966. */
  40967. small: Boolean,
  40968. /**
  40969. * @description set page size
  40970. */
  40971. size: useSizeProp,
  40972. /**
  40973. * @description whether the buttons have a background color
  40974. */
  40975. background: Boolean,
  40976. /**
  40977. * @description whether Pagination is disabled
  40978. */
  40979. disabled: Boolean,
  40980. /**
  40981. * @description whether to hide when there's only one page
  40982. */
  40983. hideOnSinglePage: Boolean,
  40984. /**
  40985. * @description which element the size dropdown appends to.
  40986. */
  40987. appendSizeTo: String
  40988. });
  40989. var paginationEmits = {
  40990. "update:current-page": (val) => isNumber(val),
  40991. "update:page-size": (val) => isNumber(val),
  40992. "size-change": (val) => isNumber(val),
  40993. change: (currentPage, pageSize) => isNumber(currentPage) && isNumber(pageSize),
  40994. "current-change": (val) => isNumber(val),
  40995. "prev-click": (val) => isNumber(val),
  40996. "next-click": (val) => isNumber(val)
  40997. };
  40998. var componentName = "ElPagination";
  40999. //#endregion
  41000. //#region node_modules/element-plus/es/components/pagination/index.mjs
  41001. var ElPagination = withInstall(defineComponent({
  41002. name: componentName,
  41003. props: paginationProps,
  41004. emits: paginationEmits,
  41005. setup(props, { emit, slots }) {
  41006. const { t } = useLocale();
  41007. const ns = useNamespace("pagination");
  41008. const vnodeProps = getCurrentInstance().vnode.props || {};
  41009. const _globalSize = useGlobalSize();
  41010. const _size = computed(() => props.small ? "small" : props.size ?? _globalSize.value);
  41011. useDeprecated({
  41012. from: "small",
  41013. replacement: "size",
  41014. version: "3.0.0",
  41015. scope: "el-pagination",
  41016. ref: "https://element-plus.org/zh-CN/component/pagination.html"
  41017. }, computed(() => !!props.small));
  41018. const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
  41019. const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
  41020. const assertValidUsage = computed(() => {
  41021. if (isAbsent(props.total) && isAbsent(props.pageCount)) return false;
  41022. if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false;
  41023. if (props.layout.includes("sizes")) {
  41024. if (!isAbsent(props.pageCount)) {
  41025. if (!hasPageSizeListener) return false;
  41026. } else if (!isAbsent(props.total)) {
  41027. if (!isAbsent(props.pageSize)) {
  41028. if (!hasPageSizeListener) return false;
  41029. }
  41030. }
  41031. }
  41032. return true;
  41033. });
  41034. const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);
  41035. const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);
  41036. const pageSizeBridge = computed({
  41037. get() {
  41038. return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;
  41039. },
  41040. set(v) {
  41041. if (isAbsent(props.pageSize)) innerPageSize.value = v;
  41042. if (hasPageSizeListener) {
  41043. emit("update:page-size", v);
  41044. emit("size-change", v);
  41045. }
  41046. }
  41047. });
  41048. const pageCountBridge = computed(() => {
  41049. let pageCount = 0;
  41050. if (!isAbsent(props.pageCount)) pageCount = props.pageCount;
  41051. else if (!isAbsent(props.total)) pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));
  41052. return pageCount;
  41053. });
  41054. const currentPageBridge = computed({
  41055. get() {
  41056. return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;
  41057. },
  41058. set(v) {
  41059. let newCurrentPage = v;
  41060. if (v < 1) newCurrentPage = 1;
  41061. else if (v > pageCountBridge.value) newCurrentPage = pageCountBridge.value;
  41062. if (isAbsent(props.currentPage)) innerCurrentPage.value = newCurrentPage;
  41063. if (hasCurrentPageListener) {
  41064. emit("update:current-page", newCurrentPage);
  41065. emit("current-change", newCurrentPage);
  41066. }
  41067. }
  41068. });
  41069. watch(pageCountBridge, (val) => {
  41070. if (currentPageBridge.value > val) currentPageBridge.value = val;
  41071. });
  41072. watch([currentPageBridge, pageSizeBridge], (value) => {
  41073. emit(CHANGE_EVENT, ...value);
  41074. }, { flush: "post" });
  41075. function handleCurrentChange(val) {
  41076. currentPageBridge.value = val;
  41077. }
  41078. function handleSizeChange(val) {
  41079. pageSizeBridge.value = val;
  41080. const newPageCount = pageCountBridge.value;
  41081. if (currentPageBridge.value > newPageCount) currentPageBridge.value = newPageCount;
  41082. }
  41083. function prev() {
  41084. if (props.disabled) return;
  41085. currentPageBridge.value -= 1;
  41086. emit("prev-click", currentPageBridge.value);
  41087. }
  41088. function next() {
  41089. if (props.disabled) return;
  41090. currentPageBridge.value += 1;
  41091. emit("next-click", currentPageBridge.value);
  41092. }
  41093. function addClass(element, cls) {
  41094. if (element) {
  41095. if (!element.props) element.props = {};
  41096. element.props.class = [element.props.class, cls].join(" ");
  41097. }
  41098. }
  41099. provide(elPaginationKey, {
  41100. pageCount: pageCountBridge,
  41101. disabled: computed(() => props.disabled),
  41102. currentPage: currentPageBridge,
  41103. changeEvent: handleCurrentChange,
  41104. handleSizeChange
  41105. });
  41106. return () => {
  41107. if (!assertValidUsage.value) {
  41108. debugWarn(componentName, t("el.pagination.deprecationWarning"));
  41109. return null;
  41110. }
  41111. if (!props.layout) return null;
  41112. if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null;
  41113. const rootChildren = [];
  41114. const rightWrapperChildren = [];
  41115. const rightWrapperRoot = h$1("div", { class: ns.e("rightwrapper") }, rightWrapperChildren);
  41116. const TEMPLATE_MAP = {
  41117. prev: h$1(prev_default, {
  41118. disabled: props.disabled,
  41119. currentPage: currentPageBridge.value,
  41120. prevText: props.prevText,
  41121. prevIcon: props.prevIcon,
  41122. onClick: prev
  41123. }),
  41124. jumper: h$1(jumper_default, { size: _size.value }),
  41125. pager: h$1(pager_default, {
  41126. currentPage: currentPageBridge.value,
  41127. pageCount: pageCountBridge.value,
  41128. pagerCount: props.pagerCount,
  41129. onChange: handleCurrentChange,
  41130. disabled: props.disabled
  41131. }),
  41132. next: h$1(next_default, {
  41133. disabled: props.disabled,
  41134. currentPage: currentPageBridge.value,
  41135. pageCount: pageCountBridge.value,
  41136. nextText: props.nextText,
  41137. nextIcon: props.nextIcon,
  41138. onClick: next
  41139. }),
  41140. sizes: h$1(sizes_default, {
  41141. pageSize: pageSizeBridge.value,
  41142. pageSizes: props.pageSizes,
  41143. popperClass: props.popperClass,
  41144. popperStyle: props.popperStyle,
  41145. disabled: props.disabled,
  41146. teleported: props.teleported,
  41147. size: _size.value,
  41148. appendSizeTo: props.appendSizeTo
  41149. }),
  41150. slot: slots?.default?.() ?? null,
  41151. total: h$1(total_default, { total: isAbsent(props.total) ? 0 : props.total })
  41152. };
  41153. const components = props.layout.split(",").map((item) => item.trim());
  41154. let haveRightWrapper = false;
  41155. components.forEach((c) => {
  41156. if (c === "->") {
  41157. haveRightWrapper = true;
  41158. return;
  41159. }
  41160. if (!haveRightWrapper) rootChildren.push(TEMPLATE_MAP[c]);
  41161. else rightWrapperChildren.push(TEMPLATE_MAP[c]);
  41162. });
  41163. addClass(rootChildren[0], ns.is("first"));
  41164. addClass(rootChildren[rootChildren.length - 1], ns.is("last"));
  41165. if (haveRightWrapper && rightWrapperChildren.length > 0) {
  41166. addClass(rightWrapperChildren[0], ns.is("first"));
  41167. addClass(rightWrapperChildren[rightWrapperChildren.length - 1], ns.is("last"));
  41168. rootChildren.push(rightWrapperRoot);
  41169. }
  41170. return h$1("div", { class: [
  41171. ns.b(),
  41172. ns.is("background", props.background),
  41173. ns.m(_size.value)
  41174. ] }, rootChildren);
  41175. };
  41176. }
  41177. }));
  41178. //#endregion
  41179. //#region node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs
  41180. /**
  41181. * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
  41182. */
  41183. var popconfirmProps = buildProps({
  41184. /**
  41185. * @description Title
  41186. */
  41187. title: String,
  41188. /**
  41189. * @description Confirm button text
  41190. */
  41191. confirmButtonText: String,
  41192. /**
  41193. * @description Cancel button text
  41194. */
  41195. cancelButtonText: String,
  41196. /**
  41197. * @description Confirm button type
  41198. */
  41199. confirmButtonType: {
  41200. type: String,
  41201. values: buttonTypes,
  41202. default: "primary"
  41203. },
  41204. /**
  41205. * @description Cancel button type
  41206. */
  41207. cancelButtonType: {
  41208. type: String,
  41209. values: buttonTypes,
  41210. default: "text"
  41211. },
  41212. /**
  41213. * @description Icon Component
  41214. */
  41215. icon: {
  41216. type: iconPropType,
  41217. default: () => question_filled_default
  41218. },
  41219. /**
  41220. * @description Icon color
  41221. */
  41222. iconColor: {
  41223. type: String,
  41224. default: "#f90"
  41225. },
  41226. /**
  41227. * @description is hide Icon
  41228. */
  41229. hideIcon: Boolean,
  41230. /**
  41231. * @description delay of disappear, in millisecond
  41232. */
  41233. hideAfter: {
  41234. type: Number,
  41235. default: 200
  41236. },
  41237. /**
  41238. * @description Tooltip theme, built-in theme: `dark` / `light`
  41239. */
  41240. effect: {
  41241. ...useTooltipContentProps.effect,
  41242. default: "light"
  41243. },
  41244. /**
  41245. * @description whether popconfirm is teleported to the body
  41246. */
  41247. teleported: useTooltipContentProps.teleported,
  41248. /**
  41249. * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed
  41250. */
  41251. persistent: useTooltipContentProps.persistent,
  41252. /**
  41253. * @description popconfirm width, min width 150px
  41254. */
  41255. width: {
  41256. type: [String, Number],
  41257. default: 150
  41258. },
  41259. virtualTriggering: useTooltipTriggerProps.virtualTriggering,
  41260. virtualRef: useTooltipTriggerProps.virtualRef
  41261. });
  41262. var popconfirmEmits = {
  41263. /**
  41264. * @description triggers when click confirm button
  41265. */
  41266. confirm: (e) => e instanceof MouseEvent,
  41267. /**
  41268. * @description triggers when click cancel button
  41269. */
  41270. cancel: (e) => e instanceof MouseEvent
  41271. };
  41272. //#endregion
  41273. //#region node_modules/element-plus/es/components/popconfirm/index.mjs
  41274. var ElPopconfirm = withInstall(/* @__PURE__ */ defineComponent({
  41275. name: "ElPopconfirm",
  41276. __name: "popconfirm",
  41277. props: popconfirmProps,
  41278. emits: popconfirmEmits,
  41279. setup(__props, { expose: __expose, emit: __emit }) {
  41280. const props = __props;
  41281. const emit = __emit;
  41282. const { t } = useLocale();
  41283. const ns = useNamespace("popconfirm");
  41284. const tooltipRef = ref();
  41285. const rootRef = ref();
  41286. const popperRef = computed(() => {
  41287. return unref(tooltipRef)?.popperRef;
  41288. });
  41289. const showPopper = () => {
  41290. rootRef.value?.focus?.();
  41291. };
  41292. const hidePopper = () => {
  41293. tooltipRef.value?.onClose?.();
  41294. };
  41295. const style = computed(() => {
  41296. return { width: addUnit(props.width) };
  41297. });
  41298. const confirm = (e) => {
  41299. emit("confirm", e);
  41300. hidePopper();
  41301. };
  41302. const cancel = (e) => {
  41303. emit("cancel", e);
  41304. hidePopper();
  41305. };
  41306. const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
  41307. const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
  41308. __expose({
  41309. popperRef,
  41310. hide: hidePopper
  41311. });
  41312. return (_ctx, _cache) => {
  41313. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  41314. ref_key: "tooltipRef",
  41315. ref: tooltipRef,
  41316. trigger: "click",
  41317. effect: __props.effect
  41318. }, _ctx.$attrs, {
  41319. "virtual-triggering": __props.virtualTriggering,
  41320. "virtual-ref": __props.virtualRef,
  41321. "popper-class": `${unref(ns).namespace.value}-popover`,
  41322. "popper-style": style.value,
  41323. teleported: __props.teleported,
  41324. "fallback-placements": [
  41325. "bottom",
  41326. "top",
  41327. "right",
  41328. "left"
  41329. ],
  41330. "hide-after": __props.hideAfter,
  41331. persistent: __props.persistent,
  41332. loop: "",
  41333. onShow: showPopper
  41334. }), {
  41335. content: withCtx(() => [createBaseVNode("div", {
  41336. ref_key: "rootRef",
  41337. ref: rootRef,
  41338. tabindex: "-1",
  41339. class: normalizeClass(unref(ns).b())
  41340. }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [!__props.hideIcon && __props.icon ? (openBlock(), createBlock(unref(ElIcon), {
  41341. key: 0,
  41342. class: normalizeClass(unref(ns).e("icon")),
  41343. style: normalizeStyle({ color: __props.iconColor })
  41344. }, {
  41345. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  41346. _: 1
  41347. }, 8, ["class", "style"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(__props.title), 1)], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [renderSlot(_ctx.$slots, "actions", {
  41348. confirm,
  41349. cancel
  41350. }, () => [createVNode(unref(ElButton), {
  41351. size: "small",
  41352. type: __props.cancelButtonType === "text" ? "" : __props.cancelButtonType,
  41353. text: __props.cancelButtonType === "text",
  41354. onClick: cancel
  41355. }, {
  41356. default: withCtx(() => [createTextVNode(toDisplayString(finalCancelButtonText.value), 1)]),
  41357. _: 1
  41358. }, 8, ["type", "text"]), createVNode(unref(ElButton), {
  41359. size: "small",
  41360. type: __props.confirmButtonType === "text" ? "" : __props.confirmButtonType,
  41361. text: __props.confirmButtonType === "text",
  41362. onClick: confirm
  41363. }, {
  41364. default: withCtx(() => [createTextVNode(toDisplayString(finalConfirmButtonText.value), 1)]),
  41365. _: 1
  41366. }, 8, ["type", "text"])])], 2)], 2)]),
  41367. default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
  41368. _: 3
  41369. }, 16, [
  41370. "effect",
  41371. "virtual-triggering",
  41372. "virtual-ref",
  41373. "popper-class",
  41374. "popper-style",
  41375. "teleported",
  41376. "hide-after",
  41377. "persistent"
  41378. ]);
  41379. };
  41380. }
  41381. }));
  41382. //#endregion
  41383. //#region node_modules/element-plus/es/components/progress/src/progress.mjs
  41384. /**
  41385. * @deprecated Removed after 3.0.0, Use `ProgressProps` instead.
  41386. */
  41387. var progressProps = buildProps({
  41388. /**
  41389. * @description type of progress bar
  41390. */
  41391. type: {
  41392. type: String,
  41393. default: "line",
  41394. values: [
  41395. "line",
  41396. "circle",
  41397. "dashboard"
  41398. ]
  41399. },
  41400. /**
  41401. * @description percentage, required
  41402. */
  41403. percentage: {
  41404. type: Number,
  41405. default: 0,
  41406. validator: (val) => val >= 0 && val <= 100
  41407. },
  41408. /**
  41409. * @description the current status of progress bar
  41410. */
  41411. status: {
  41412. type: String,
  41413. default: "",
  41414. values: [
  41415. "",
  41416. "success",
  41417. "exception",
  41418. "warning"
  41419. ]
  41420. },
  41421. /**
  41422. * @description set indeterminate progress
  41423. */
  41424. indeterminate: Boolean,
  41425. /**
  41426. * @description control the animation duration of indeterminate progress or striped flow progress
  41427. */
  41428. duration: {
  41429. type: Number,
  41430. default: 3
  41431. },
  41432. /**
  41433. * @description the width of progress bar
  41434. */
  41435. strokeWidth: {
  41436. type: Number,
  41437. default: 6
  41438. },
  41439. /**
  41440. * @description butt/circle/dashboard type shape at the end path
  41441. */
  41442. strokeLinecap: {
  41443. type: definePropType(String),
  41444. default: "round"
  41445. },
  41446. /**
  41447. * @description whether to place the percentage inside progress bar, only works when `type` is 'line'
  41448. */
  41449. textInside: Boolean,
  41450. /**
  41451. * @description the canvas width of circle progress bar
  41452. */
  41453. width: {
  41454. type: Number,
  41455. default: 126
  41456. },
  41457. /**
  41458. * @description whether to show percentage
  41459. */
  41460. showText: {
  41461. type: Boolean,
  41462. default: true
  41463. },
  41464. /**
  41465. * @description background color of progress bar. Overrides `status` prop
  41466. */
  41467. color: {
  41468. type: definePropType([
  41469. String,
  41470. Array,
  41471. Function
  41472. ]),
  41473. default: ""
  41474. },
  41475. /**
  41476. * @description stripe over the progress bar's color
  41477. */
  41478. striped: Boolean,
  41479. /**
  41480. * @description get the stripes to flow
  41481. */
  41482. stripedFlow: Boolean,
  41483. /**
  41484. * @description custom text format
  41485. */
  41486. format: {
  41487. type: definePropType(Function),
  41488. default: (percentage) => `${percentage}%`
  41489. }
  41490. });
  41491. //#endregion
  41492. //#region node_modules/element-plus/es/components/progress/src/progress.vue_vue_type_script_setup_true_lang.mjs
  41493. var _hoisted_1$24 = ["aria-valuenow"];
  41494. var _hoisted_2$15 = { viewBox: "0 0 100 100" };
  41495. var _hoisted_3$6 = [
  41496. "d",
  41497. "stroke",
  41498. "stroke-linecap",
  41499. "stroke-width"
  41500. ];
  41501. var _hoisted_4$4 = [
  41502. "d",
  41503. "stroke",
  41504. "opacity",
  41505. "stroke-linecap",
  41506. "stroke-width"
  41507. ];
  41508. var _hoisted_5$2 = { key: 0 };
  41509. //#endregion
  41510. //#region node_modules/element-plus/es/components/progress/index.mjs
  41511. var ElProgress = withInstall(/* @__PURE__ */ defineComponent({
  41512. name: "ElProgress",
  41513. __name: "progress",
  41514. props: progressProps,
  41515. setup(__props) {
  41516. const STATUS_COLOR_MAP = {
  41517. success: "#13ce66",
  41518. exception: "#ff4949",
  41519. warning: "#e6a23c",
  41520. default: "#20a0ff"
  41521. };
  41522. const props = __props;
  41523. const ns = useNamespace("progress");
  41524. const barStyle = computed(() => {
  41525. const barStyle = {
  41526. width: `${props.percentage}%`,
  41527. animationDuration: `${props.duration}s`
  41528. };
  41529. const color = getCurrentColor(props.percentage);
  41530. if (color.includes("gradient")) barStyle.background = color;
  41531. else barStyle.backgroundColor = color;
  41532. return barStyle;
  41533. });
  41534. const relativeStrokeWidth = computed(() => (props.strokeWidth / props.width * 100).toFixed(1));
  41535. const radius = computed(() => {
  41536. if (["circle", "dashboard"].includes(props.type)) return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10);
  41537. return 0;
  41538. });
  41539. const trackPath = computed(() => {
  41540. const r = radius.value;
  41541. const isDashboard = props.type === "dashboard";
  41542. return `
  41543. M 50 50
  41544. m 0 ${isDashboard ? "" : "-"}${r}
  41545. a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2}
  41546. a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2}
  41547. `;
  41548. });
  41549. const perimeter = computed(() => 2 * Math.PI * radius.value);
  41550. const rate = computed(() => props.type === "dashboard" ? .75 : 1);
  41551. const strokeDashoffset = computed(() => {
  41552. return `${-1 * perimeter.value * (1 - rate.value) / 2}px`;
  41553. });
  41554. const trailPathStyle = computed(() => ({
  41555. strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,
  41556. strokeDashoffset: strokeDashoffset.value
  41557. }));
  41558. const circlePathStyle = computed(() => ({
  41559. strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,
  41560. strokeDashoffset: strokeDashoffset.value,
  41561. transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
  41562. }));
  41563. const stroke = computed(() => {
  41564. let ret;
  41565. if (props.color) ret = getCurrentColor(props.percentage);
  41566. else ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default;
  41567. return ret;
  41568. });
  41569. const statusIcon = computed(() => {
  41570. if (props.status === "warning") return warning_filled_default;
  41571. if (props.type === "line") return props.status === "success" ? circle_check_default : circle_close_default;
  41572. else return props.status === "success" ? check_default : close_default;
  41573. });
  41574. const progressTextSize = computed(() => {
  41575. return props.type === "line" ? 12 + props.strokeWidth * .4 : props.width * .111111 + 2;
  41576. });
  41577. const content = computed(() => props.format(props.percentage));
  41578. function getColors(color) {
  41579. const span = 100 / color.length;
  41580. return color.map((seriesColor, index) => {
  41581. if (isString(seriesColor)) return {
  41582. color: seriesColor,
  41583. percentage: (index + 1) * span
  41584. };
  41585. return seriesColor;
  41586. }).sort((a, b) => a.percentage - b.percentage);
  41587. }
  41588. const getCurrentColor = (percentage) => {
  41589. const { color } = props;
  41590. if (isFunction$1(color)) return color(percentage);
  41591. else if (isString(color)) return color;
  41592. else {
  41593. const colors = getColors(color);
  41594. for (const color of colors) if (color.percentage > percentage) return color.color;
  41595. return colors[colors.length - 1]?.color;
  41596. }
  41597. };
  41598. return (_ctx, _cache) => {
  41599. return openBlock(), createElementBlock("div", {
  41600. class: normalizeClass([
  41601. unref(ns).b(),
  41602. unref(ns).m(__props.type),
  41603. unref(ns).is(__props.status),
  41604. {
  41605. [unref(ns).m("without-text")]: !__props.showText,
  41606. [unref(ns).m("text-inside")]: __props.textInside
  41607. }
  41608. ]),
  41609. role: "progressbar",
  41610. "aria-valuenow": __props.percentage,
  41611. "aria-valuemin": "0",
  41612. "aria-valuemax": "100"
  41613. }, [__props.type === "line" ? (openBlock(), createElementBlock("div", {
  41614. key: 0,
  41615. class: normalizeClass(unref(ns).b("bar"))
  41616. }, [createBaseVNode("div", {
  41617. class: normalizeClass(unref(ns).be("bar", "outer")),
  41618. style: normalizeStyle({ height: `${__props.strokeWidth}px` })
  41619. }, [createBaseVNode("div", {
  41620. class: normalizeClass([
  41621. unref(ns).be("bar", "inner"),
  41622. { [unref(ns).bem("bar", "inner", "indeterminate")]: __props.indeterminate },
  41623. { [unref(ns).bem("bar", "inner", "striped")]: __props.striped },
  41624. { [unref(ns).bem("bar", "inner", "striped-flow")]: __props.stripedFlow }
  41625. ]),
  41626. style: normalizeStyle(barStyle.value)
  41627. }, [(__props.showText || _ctx.$slots.default) && __props.textInside ? (openBlock(), createElementBlock("div", {
  41628. key: 0,
  41629. class: normalizeClass(unref(ns).be("bar", "innerText"))
  41630. }, [renderSlot(_ctx.$slots, "default", { percentage: __props.percentage }, () => [createBaseVNode("span", null, toDisplayString(content.value), 1)])], 2)) : createCommentVNode("v-if", true)], 6)], 6)], 2)) : (openBlock(), createElementBlock("div", {
  41631. key: 1,
  41632. class: normalizeClass(unref(ns).b("circle")),
  41633. style: normalizeStyle({
  41634. height: `${__props.width}px`,
  41635. width: `${__props.width}px`
  41636. })
  41637. }, [(openBlock(), createElementBlock("svg", _hoisted_2$15, [createBaseVNode("path", {
  41638. class: normalizeClass(unref(ns).be("circle", "track")),
  41639. d: trackPath.value,
  41640. stroke: `var(${unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`,
  41641. "stroke-linecap": __props.strokeLinecap,
  41642. "stroke-width": relativeStrokeWidth.value,
  41643. fill: "none",
  41644. style: normalizeStyle(trailPathStyle.value)
  41645. }, null, 14, _hoisted_3$6), createBaseVNode("path", {
  41646. class: normalizeClass(unref(ns).be("circle", "path")),
  41647. d: trackPath.value,
  41648. stroke: stroke.value,
  41649. fill: "none",
  41650. opacity: __props.percentage ? 1 : 0,
  41651. "stroke-linecap": __props.strokeLinecap,
  41652. "stroke-width": relativeStrokeWidth.value,
  41653. style: normalizeStyle(circlePathStyle.value)
  41654. }, null, 14, _hoisted_4$4)]))], 6)), (__props.showText || _ctx.$slots.default) && !__props.textInside ? (openBlock(), createElementBlock("div", {
  41655. key: 2,
  41656. class: normalizeClass(unref(ns).e("text")),
  41657. style: normalizeStyle({ fontSize: `${progressTextSize.value}px` })
  41658. }, [renderSlot(_ctx.$slots, "default", { percentage: __props.percentage }, () => [!__props.status ? (openBlock(), createElementBlock("span", _hoisted_5$2, toDisplayString(content.value), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  41659. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(statusIcon.value)))]),
  41660. _: 1
  41661. }))])], 6)) : createCommentVNode("v-if", true)], 10, _hoisted_1$24);
  41662. };
  41663. }
  41664. }));
  41665. //#endregion
  41666. //#region node_modules/element-plus/es/components/rate/src/rate.mjs
  41667. /**
  41668. * @deprecated Removed after 3.0.0, Use `RateProps` instead.
  41669. */
  41670. var rateProps = buildProps({
  41671. /**
  41672. * @description binding value
  41673. */
  41674. modelValue: {
  41675. type: Number,
  41676. default: 0
  41677. },
  41678. /**
  41679. * @description native `id` attribute
  41680. */
  41681. id: {
  41682. type: String,
  41683. default: void 0
  41684. },
  41685. /**
  41686. * @description threshold value between low and medium level. The value itself will be included in low level
  41687. */
  41688. lowThreshold: {
  41689. type: Number,
  41690. default: 2
  41691. },
  41692. /**
  41693. * @description threshold value between medium and high level. The value itself will be included in high level
  41694. */
  41695. highThreshold: {
  41696. type: Number,
  41697. default: 4
  41698. },
  41699. /**
  41700. * @description max rating score
  41701. */
  41702. max: {
  41703. type: Number,
  41704. default: 5
  41705. },
  41706. /**
  41707. * @description colors for icons. If array, it should have 3 elements, each of which corresponds with a score level, else if object, the key should be threshold value between two levels, and the value should be corresponding color
  41708. */
  41709. colors: {
  41710. type: definePropType([Array, Object]),
  41711. default: () => mutable([
  41712. "",
  41713. "",
  41714. ""
  41715. ])
  41716. },
  41717. /**
  41718. * @description color of unselected icons
  41719. */
  41720. voidColor: {
  41721. type: String,
  41722. default: ""
  41723. },
  41724. /**
  41725. * @description color of unselected read-only icons
  41726. */
  41727. disabledVoidColor: {
  41728. type: String,
  41729. default: ""
  41730. },
  41731. /**
  41732. * @description icon components. If array, it should have 3 elements, each of which corresponds with a score level, else if object, the key should be threshold value between two levels, and the value should be corresponding icon component
  41733. */
  41734. icons: {
  41735. type: definePropType([Array, Object]),
  41736. default: () => [
  41737. star_filled_default,
  41738. star_filled_default,
  41739. star_filled_default
  41740. ]
  41741. },
  41742. /**
  41743. * @description component of unselected icons
  41744. */
  41745. voidIcon: {
  41746. type: iconPropType,
  41747. default: () => star_default
  41748. },
  41749. /**
  41750. * @description component of unselected read-only icons
  41751. */
  41752. disabledVoidIcon: {
  41753. type: iconPropType,
  41754. default: () => star_filled_default
  41755. },
  41756. /**
  41757. * @description whether Rate is read-only
  41758. */
  41759. disabled: {
  41760. type: Boolean,
  41761. default: void 0
  41762. },
  41763. /**
  41764. * @description whether picking half start is allowed
  41765. */
  41766. allowHalf: Boolean,
  41767. /**
  41768. * @description whether to display texts
  41769. */
  41770. showText: Boolean,
  41771. /**
  41772. * @description whether to display current score. show-score and show-text cannot be true at the same time
  41773. */
  41774. showScore: Boolean,
  41775. /**
  41776. * @description color of texts
  41777. */
  41778. textColor: {
  41779. type: String,
  41780. default: ""
  41781. },
  41782. /**
  41783. * @description text array
  41784. */
  41785. texts: {
  41786. type: definePropType(Array),
  41787. default: () => mutable([
  41788. "Extremely bad",
  41789. "Disappointed",
  41790. "Fair",
  41791. "Satisfied",
  41792. "Surprise"
  41793. ])
  41794. },
  41795. /**
  41796. * @description score template
  41797. */
  41798. scoreTemplate: {
  41799. type: String,
  41800. default: "{value}"
  41801. },
  41802. /**
  41803. * @description size of Rate
  41804. */
  41805. size: useSizeProp,
  41806. /**
  41807. * @description whether value can be reset to `0`
  41808. */
  41809. clearable: Boolean,
  41810. ...useAriaProps(["ariaLabel"])
  41811. });
  41812. var rateEmits = {
  41813. [CHANGE_EVENT]: (value) => isNumber(value),
  41814. [UPDATE_MODEL_EVENT]: (value) => isNumber(value)
  41815. };
  41816. //#endregion
  41817. //#region node_modules/element-plus/es/components/rate/src/rate.vue_vue_type_script_setup_true_lang.mjs
  41818. var _hoisted_1$23 = [
  41819. "id",
  41820. "aria-label",
  41821. "aria-labelledby",
  41822. "aria-valuenow",
  41823. "aria-valuetext",
  41824. "aria-valuemax",
  41825. "tabindex",
  41826. "aria-disabled"
  41827. ];
  41828. var _hoisted_2$14 = ["onMousemove", "onClick"];
  41829. //#endregion
  41830. //#region node_modules/element-plus/es/components/rate/index.mjs
  41831. var ElRate = withInstall(/* @__PURE__ */ defineComponent({
  41832. name: "ElRate",
  41833. __name: "rate",
  41834. props: rateProps,
  41835. emits: rateEmits,
  41836. setup(__props, { expose: __expose, emit: __emit }) {
  41837. function getValueFromMap(value, map) {
  41838. const isExcludedObject = (val) => isObject$2(val);
  41839. const matchedValue = map[Object.keys(map).map((key) => +key).filter((key) => {
  41840. const val = map[key];
  41841. return (isExcludedObject(val) ? val.excluded : false) ? value < key : value <= key;
  41842. }).sort((a, b) => a - b)[0]];
  41843. return isExcludedObject(matchedValue) && matchedValue.value || matchedValue;
  41844. }
  41845. const props = __props;
  41846. const emit = __emit;
  41847. const formItemContext = inject(formItemContextKey, void 0);
  41848. const rateSize = useFormSize();
  41849. const ns = useNamespace("rate");
  41850. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext });
  41851. const currentValue = ref(clamp$2(props.modelValue, 0, props.max));
  41852. const hoverIndex = ref(-1);
  41853. const pointerAtLeftHalf = ref(true);
  41854. const iconRefs = ref([]);
  41855. const iconClientWidths = computed(() => iconRefs.value.map((icon) => icon.$el.clientWidth));
  41856. const rateClasses = computed(() => [ns.b(), ns.m(rateSize.value)]);
  41857. const rateDisabled = useFormDisabled();
  41858. const rateStyles = computed(() => {
  41859. return ns.cssVarBlock({
  41860. "void-color": props.voidColor,
  41861. "disabled-void-color": props.disabledVoidColor,
  41862. "fill-color": activeColor.value
  41863. });
  41864. });
  41865. const text = computed(() => {
  41866. let result = "";
  41867. if (props.showScore) result = props.scoreTemplate.replace(/\{\s*value\s*\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`);
  41868. else if (props.showText) result = props.texts[Math.ceil(currentValue.value) - 1];
  41869. return result;
  41870. });
  41871. const valueDecimal = computed(() => props.modelValue * 100 - Math.floor(props.modelValue) * 100);
  41872. const colorMap = computed(() => isArray$1(props.colors) ? {
  41873. [props.lowThreshold]: props.colors[0],
  41874. [props.highThreshold]: {
  41875. value: props.colors[1],
  41876. excluded: true
  41877. },
  41878. [props.max]: props.colors[2]
  41879. } : props.colors);
  41880. const activeColor = computed(() => {
  41881. const color = getValueFromMap(currentValue.value, colorMap.value);
  41882. return isObject$2(color) ? "" : color;
  41883. });
  41884. const decimalStyle = computed(() => {
  41885. let width = "";
  41886. if (rateDisabled.value) width = `${valueDecimal.value}%`;
  41887. else if (props.allowHalf) width = "50%";
  41888. return {
  41889. color: activeColor.value,
  41890. width
  41891. };
  41892. });
  41893. const componentMap = computed(() => {
  41894. let icons = isArray$1(props.icons) ? [...props.icons] : { ...props.icons };
  41895. icons = markRaw(icons);
  41896. return isArray$1(icons) ? {
  41897. [props.lowThreshold]: icons[0],
  41898. [props.highThreshold]: {
  41899. value: icons[1],
  41900. excluded: true
  41901. },
  41902. [props.max]: icons[2]
  41903. } : icons;
  41904. });
  41905. const decimalIconComponent = computed(() => getValueFromMap(props.modelValue, componentMap.value));
  41906. const voidComponent = computed(() => rateDisabled.value ? isString(props.disabledVoidIcon) ? props.disabledVoidIcon : markRaw(props.disabledVoidIcon) : isString(props.voidIcon) ? props.voidIcon : markRaw(props.voidIcon));
  41907. const activeComponent = computed(() => getValueFromMap(currentValue.value, componentMap.value));
  41908. function showDecimalIcon(item) {
  41909. const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue;
  41910. const showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - .5 <= currentValue.value && item > currentValue.value;
  41911. return showWhenDisabled || showWhenAllowHalf;
  41912. }
  41913. function emitValue(value) {
  41914. if (props.clearable && value === props.modelValue) value = 0;
  41915. emit(UPDATE_MODEL_EVENT, value);
  41916. if (props.modelValue !== value) emit(CHANGE_EVENT, value);
  41917. }
  41918. function selectValue(value) {
  41919. if (rateDisabled.value) return;
  41920. if (props.allowHalf && pointerAtLeftHalf.value) emitValue(currentValue.value);
  41921. else emitValue(value);
  41922. }
  41923. function handleKey(e) {
  41924. if (rateDisabled.value) return;
  41925. const code = getEventCode(e);
  41926. const step = props.allowHalf ? .5 : 1;
  41927. let _currentValue = currentValue.value;
  41928. switch (code) {
  41929. case EVENT_CODE.up:
  41930. case EVENT_CODE.right:
  41931. _currentValue += step;
  41932. break;
  41933. case EVENT_CODE.left:
  41934. case EVENT_CODE.down:
  41935. _currentValue -= step;
  41936. break;
  41937. }
  41938. _currentValue = clamp$2(_currentValue, 0, props.max);
  41939. if (_currentValue === currentValue.value) return;
  41940. e.stopPropagation();
  41941. e.preventDefault();
  41942. emit(UPDATE_MODEL_EVENT, _currentValue);
  41943. emit(CHANGE_EVENT, _currentValue);
  41944. return _currentValue;
  41945. }
  41946. function setCurrentValue(value, event) {
  41947. if (rateDisabled.value) return;
  41948. if (props.allowHalf && event) {
  41949. pointerAtLeftHalf.value = event.offsetX * 2 <= iconClientWidths.value[value - 1];
  41950. currentValue.value = pointerAtLeftHalf.value ? value - .5 : value;
  41951. } else currentValue.value = value;
  41952. hoverIndex.value = value;
  41953. }
  41954. function resetCurrentValue() {
  41955. if (rateDisabled.value) return;
  41956. if (props.allowHalf) pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
  41957. currentValue.value = clamp$2(props.modelValue, 0, props.max);
  41958. hoverIndex.value = -1;
  41959. }
  41960. watch(() => props.modelValue, (val) => {
  41961. currentValue.value = clamp$2(val, 0, props.max);
  41962. pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
  41963. });
  41964. if (!props.modelValue) emit(UPDATE_MODEL_EVENT, 0);
  41965. __expose({
  41966. /** @description set current value */
  41967. setCurrentValue,
  41968. /** @description reset current value */
  41969. resetCurrentValue
  41970. });
  41971. return (_ctx, _cache) => {
  41972. return openBlock(), createElementBlock("div", {
  41973. id: unref(inputId),
  41974. class: normalizeClass([rateClasses.value, unref(ns).is("disabled", unref(rateDisabled))]),
  41975. role: "slider",
  41976. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "rating" : void 0,
  41977. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItemContext)?.labelId : void 0,
  41978. "aria-valuenow": currentValue.value,
  41979. "aria-valuetext": text.value || void 0,
  41980. "aria-valuemin": "0",
  41981. "aria-valuemax": __props.max,
  41982. style: normalizeStyle(rateStyles.value),
  41983. tabindex: unref(rateDisabled) ? void 0 : 0,
  41984. "aria-disabled": unref(rateDisabled),
  41985. onKeydown: handleKey
  41986. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.max, (item, key) => {
  41987. return openBlock(), createElementBlock("span", {
  41988. key,
  41989. class: normalizeClass(unref(ns).e("item")),
  41990. onMousemove: ($event) => setCurrentValue(item, $event),
  41991. onMouseleave: resetCurrentValue,
  41992. onClick: ($event) => selectValue(item)
  41993. }, [createVNode(unref(ElIcon), {
  41994. ref_for: true,
  41995. ref_key: "iconRefs",
  41996. ref: iconRefs,
  41997. class: normalizeClass([
  41998. unref(ns).e("icon"),
  41999. { hover: hoverIndex.value === item },
  42000. unref(ns).is("active", item <= currentValue.value),
  42001. unref(ns).is("focus-visible", item === Math.ceil(currentValue.value || 1))
  42002. ])
  42003. }, {
  42004. default: withCtx(() => [
  42005. withDirectives((openBlock(), createBlock(resolveDynamicComponent(activeComponent.value), null, null, 512)), [[vShow, !showDecimalIcon(item) && item <= currentValue.value]]),
  42006. withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), null, null, 512)), [[vShow, !showDecimalIcon(item) && item > currentValue.value]]),
  42007. withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), { class: normalizeClass([unref(ns).em("decimal", "box")]) }, null, 8, ["class"])), [[vShow, showDecimalIcon(item)]]),
  42008. withDirectives(createVNode(unref(ElIcon), {
  42009. style: normalizeStyle(decimalStyle.value),
  42010. class: normalizeClass([unref(ns).e("icon"), unref(ns).e("decimal")])
  42011. }, {
  42012. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(decimalIconComponent.value)))]),
  42013. _: 1
  42014. }, 8, ["style", "class"]), [[vShow, showDecimalIcon(item)]])
  42015. ]),
  42016. _: 2
  42017. }, 1032, ["class"])], 42, _hoisted_2$14);
  42018. }), 128)), __props.showText || __props.showScore ? (openBlock(), createElementBlock("span", {
  42019. key: 0,
  42020. class: normalizeClass(unref(ns).e("text")),
  42021. style: normalizeStyle({ color: __props.textColor })
  42022. }, toDisplayString(text.value), 7)) : createCommentVNode("v-if", true)], 46, _hoisted_1$23);
  42023. };
  42024. }
  42025. }));
  42026. //#endregion
  42027. //#region node_modules/element-plus/es/components/result/src/result.mjs
  42028. var IconMap = {
  42029. primary: "icon-primary",
  42030. success: "icon-success",
  42031. warning: "icon-warning",
  42032. error: "icon-error",
  42033. info: "icon-info"
  42034. };
  42035. var IconComponentMap = {
  42036. [IconMap.primary]: info_filled_default,
  42037. [IconMap.success]: circle_check_filled_default,
  42038. [IconMap.warning]: warning_filled_default,
  42039. [IconMap.error]: circle_close_filled_default,
  42040. [IconMap.info]: info_filled_default
  42041. };
  42042. /**
  42043. * @deprecated Removed after 3.0.0, Use `ResultProps` instead.
  42044. */
  42045. var resultProps = buildProps({
  42046. /**
  42047. * @description title of result
  42048. */
  42049. title: {
  42050. type: String,
  42051. default: ""
  42052. },
  42053. /**
  42054. * @description sub title of result
  42055. */
  42056. subTitle: {
  42057. type: String,
  42058. default: ""
  42059. },
  42060. /**
  42061. * @description icon type of result
  42062. */
  42063. icon: {
  42064. type: String,
  42065. values: [
  42066. "primary",
  42067. "success",
  42068. "warning",
  42069. "info",
  42070. "error"
  42071. ],
  42072. default: "info"
  42073. }
  42074. });
  42075. //#endregion
  42076. //#region node_modules/element-plus/es/components/result/index.mjs
  42077. var ElResult = withInstall(/* @__PURE__ */ defineComponent({
  42078. name: "ElResult",
  42079. __name: "result",
  42080. props: resultProps,
  42081. setup(__props) {
  42082. const props = __props;
  42083. const ns = useNamespace("result");
  42084. const resultIcon = computed(() => {
  42085. const icon = props.icon;
  42086. const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
  42087. return {
  42088. class: iconClass,
  42089. component: IconComponentMap[iconClass] || IconComponentMap["icon-info"]
  42090. };
  42091. });
  42092. return (_ctx, _cache) => {
  42093. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
  42094. createBaseVNode("div", { class: normalizeClass(unref(ns).e("icon")) }, [renderSlot(_ctx.$slots, "icon", {}, () => [resultIcon.value.component ? (openBlock(), createBlock(resolveDynamicComponent(resultIcon.value.component), {
  42095. key: 0,
  42096. class: normalizeClass(resultIcon.value.class)
  42097. }, null, 8, ["class"])) : createCommentVNode("v-if", true)])], 2),
  42098. __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
  42099. key: 0,
  42100. class: normalizeClass(unref(ns).e("title"))
  42101. }, [renderSlot(_ctx.$slots, "title", {}, () => [createBaseVNode("p", null, toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true),
  42102. __props.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
  42103. key: 1,
  42104. class: normalizeClass(unref(ns).e("subtitle"))
  42105. }, [renderSlot(_ctx.$slots, "sub-title", {}, () => [createBaseVNode("p", null, toDisplayString(__props.subTitle), 1)])], 2)) : createCommentVNode("v-if", true),
  42106. _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  42107. key: 2,
  42108. class: normalizeClass(unref(ns).e("extra"))
  42109. }, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)
  42110. ], 2);
  42111. };
  42112. }
  42113. }));
  42114. //#endregion
  42115. //#region node_modules/element-plus/es/components/select-v2/src/token.mjs
  42116. var selectV2InjectionKey = Symbol("ElSelectV2Injection");
  42117. //#endregion
  42118. //#region node_modules/element-plus/es/components/select-v2/src/defaults.mjs
  42119. var selectV2Props = buildProps({
  42120. /**
  42121. * @description whether creating new items is allowed. To use this, `filterable` must be true
  42122. */
  42123. allowCreate: Boolean,
  42124. /**
  42125. * @description autocomplete of select input
  42126. */
  42127. autocomplete: {
  42128. type: definePropType(String),
  42129. default: "none"
  42130. },
  42131. /**
  42132. * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused
  42133. */
  42134. automaticDropdown: Boolean,
  42135. /**
  42136. * @description whether select can be cleared
  42137. */
  42138. clearable: Boolean,
  42139. /**
  42140. * @description custom clear icon
  42141. */
  42142. clearIcon: {
  42143. type: iconPropType,
  42144. default: circle_close_default
  42145. },
  42146. /**
  42147. * @description tooltip theme, built-in theme: `dark` / `light`
  42148. */
  42149. effect: {
  42150. type: definePropType(String),
  42151. default: "light"
  42152. },
  42153. /**
  42154. * @description whether to collapse tags to a text when multiple selecting
  42155. */
  42156. collapseTags: Boolean,
  42157. /**
  42158. * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
  42159. */
  42160. collapseTagsTooltip: Boolean,
  42161. /**
  42162. * @description configuration object for the collapse-tags tooltip. To use this, `collapse-tags` and `collapse-tags-tooltip` must be true
  42163. */
  42164. tagTooltip: {
  42165. type: definePropType(Object),
  42166. default: () => ({})
  42167. },
  42168. /**
  42169. * @description The max tags number to be shown. To use this, `collapse-tags` must be true
  42170. */
  42171. maxCollapseTags: {
  42172. type: Number,
  42173. default: 1
  42174. },
  42175. /**
  42176. * @description
  42177. */
  42178. defaultFirstOption: Boolean,
  42179. /**
  42180. * @description is disabled
  42181. */
  42182. disabled: {
  42183. type: Boolean,
  42184. default: void 0
  42185. },
  42186. /**
  42187. * @description Estimated item height for variable option sizes. Defaults to fixed `itemHeight` when omitted.
  42188. */
  42189. estimatedOptionHeight: {
  42190. type: Number,
  42191. default: void 0
  42192. },
  42193. /**
  42194. * @description whether Select is filterable
  42195. */
  42196. filterable: Boolean,
  42197. /**
  42198. * @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true
  42199. */
  42200. filterMethod: { type: definePropType(Function) },
  42201. /**
  42202. * @description The height of the dropdown panel, 34px for each item
  42203. */
  42204. height: {
  42205. type: Number,
  42206. default: 274
  42207. },
  42208. /**
  42209. * @description The height of the dropdown item
  42210. */
  42211. itemHeight: {
  42212. type: Number,
  42213. default: 34
  42214. },
  42215. /**
  42216. * @description native input id
  42217. */
  42218. id: String,
  42219. /**
  42220. * @description whether Select is loading data from server
  42221. */
  42222. loading: Boolean,
  42223. /**
  42224. * @description displayed text while loading data from server, default is 'Loading'
  42225. */
  42226. loadingText: String,
  42227. /**
  42228. * @description biding value
  42229. */
  42230. modelValue: {
  42231. type: definePropType([
  42232. Array,
  42233. String,
  42234. Number,
  42235. Boolean,
  42236. Object
  42237. ]),
  42238. default: void 0
  42239. },
  42240. /**
  42241. * @description is multiple
  42242. */
  42243. multiple: Boolean,
  42244. /**
  42245. * @description maximum number of options user can select when multiple is true. No limit when set to 0
  42246. */
  42247. multipleLimit: {
  42248. type: Number,
  42249. default: 0
  42250. },
  42251. /**
  42252. * @description the name attribute of select input
  42253. */
  42254. name: String,
  42255. /**
  42256. * @description displayed text when there is no options, you can also use slot empty, the default is 'No Data'
  42257. */
  42258. noDataText: String,
  42259. /**
  42260. * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'
  42261. */
  42262. noMatchText: String,
  42263. /**
  42264. * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true
  42265. */
  42266. remoteMethod: { type: definePropType(Function) },
  42267. /**
  42268. * @description whether reserve the keyword after select filtered option.
  42269. */
  42270. reserveKeyword: {
  42271. type: Boolean,
  42272. default: true
  42273. },
  42274. /**
  42275. * @description data of the options, the key of `value` and `label` can be customize by `props`
  42276. */
  42277. options: {
  42278. type: definePropType(Array),
  42279. required: true
  42280. },
  42281. /**
  42282. * @description placeholder, the default is 'Please select'
  42283. */
  42284. placeholder: { type: String },
  42285. /**
  42286. * @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets
  42287. */
  42288. teleported: useTooltipContentProps.teleported,
  42289. /**
  42290. * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed
  42291. */
  42292. persistent: {
  42293. type: Boolean,
  42294. default: true
  42295. },
  42296. /**
  42297. * @description custom class name for Select's dropdown
  42298. */
  42299. popperClass: useTooltipContentProps.popperClass,
  42300. /**
  42301. * @description custom style for Select's dropdown
  42302. */
  42303. popperStyle: useTooltipContentProps.popperStyle,
  42304. /**
  42305. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  42306. */
  42307. popperOptions: {
  42308. type: definePropType(Object),
  42309. default: () => ({})
  42310. },
  42311. /**
  42312. * @description whether search data from server
  42313. */
  42314. remote: Boolean,
  42315. /**
  42316. * @description debounce delay during remote search, in milliseconds
  42317. */
  42318. debounce: {
  42319. type: Number,
  42320. default: 300
  42321. },
  42322. /**
  42323. * @description size of component
  42324. */
  42325. size: useSizeProp,
  42326. /**
  42327. * @description configuration options, see the following table
  42328. */
  42329. props: {
  42330. type: definePropType(Object),
  42331. default: () => defaultProps$2
  42332. },
  42333. /**
  42334. * @description unique identity key name for value, required when value is an object
  42335. */
  42336. valueKey: {
  42337. type: String,
  42338. default: "value"
  42339. },
  42340. /**
  42341. * @description Controls whether the scrollbar is always displayed
  42342. */
  42343. scrollbarAlwaysOn: Boolean,
  42344. /**
  42345. * @description whether to trigger form validation
  42346. */
  42347. validateEvent: {
  42348. type: Boolean,
  42349. default: true
  42350. },
  42351. /**
  42352. * @description offset of the dropdown
  42353. */
  42354. offset: {
  42355. type: Number,
  42356. default: 12
  42357. },
  42358. /**
  42359. * @description in remote search method show suffix icon
  42360. */
  42361. remoteShowSuffix: Boolean,
  42362. /**
  42363. * @description Determines whether the arrow is displayed
  42364. */
  42365. showArrow: {
  42366. type: Boolean,
  42367. default: true
  42368. },
  42369. /**
  42370. * @description position of dropdown
  42371. */
  42372. placement: {
  42373. type: definePropType(String),
  42374. values: Ee,
  42375. default: "bottom-start"
  42376. },
  42377. /**
  42378. * @description list of possible positions for dropdown
  42379. */
  42380. fallbackPlacements: {
  42381. type: definePropType(Array),
  42382. default: [
  42383. "bottom-start",
  42384. "top-start",
  42385. "right",
  42386. "left"
  42387. ]
  42388. },
  42389. /**
  42390. * @description tag type
  42391. */
  42392. tagType: {
  42393. ...tagProps.type,
  42394. default: "info"
  42395. },
  42396. /**
  42397. * @description tag effect
  42398. */
  42399. tagEffect: {
  42400. ...tagProps.effect,
  42401. default: "light"
  42402. },
  42403. /**
  42404. * @description tabindex for input
  42405. */
  42406. tabindex: {
  42407. type: [String, Number],
  42408. default: 0
  42409. },
  42410. /**
  42411. * @description which element the select dropdown appends to
  42412. */
  42413. appendTo: useTooltipContentProps.appendTo,
  42414. /**
  42415. * @description if it is `true`, the width of the dropdown panel is the same as the input box.
  42416. * if it is `false`, the width is automatically calculated based on the value of `label`,
  42417. * or it can be set to a number to make it a fixed width
  42418. */
  42419. fitInputWidth: {
  42420. type: [Boolean, Number],
  42421. default: true,
  42422. validator(val) {
  42423. return isBoolean(val) || isNumber(val);
  42424. }
  42425. },
  42426. suffixIcon: {
  42427. type: iconPropType,
  42428. default: arrow_down_default
  42429. },
  42430. ...useEmptyValuesProps,
  42431. ...useAriaProps(["ariaLabel"])
  42432. });
  42433. var optionV2Props = buildProps({
  42434. data: Array,
  42435. disabled: Boolean,
  42436. hovering: Boolean,
  42437. item: {
  42438. type: definePropType(Object),
  42439. required: true
  42440. },
  42441. index: Number,
  42442. style: Object,
  42443. selected: Boolean,
  42444. created: Boolean
  42445. });
  42446. var selectV2Emits = {
  42447. [UPDATE_MODEL_EVENT]: (val) => true,
  42448. [CHANGE_EVENT]: (val) => true,
  42449. "end-reached": scrollbarEmits["end-reached"],
  42450. "remove-tag": (val) => true,
  42451. "visible-change": (visible) => true,
  42452. focus: (evt) => evt instanceof FocusEvent,
  42453. blur: (evt) => evt instanceof FocusEvent,
  42454. clear: () => true
  42455. };
  42456. var optionV2Emits = {
  42457. hover: (index) => isNumber(index),
  42458. select: (val, index) => true
  42459. };
  42460. //#endregion
  42461. //#region node_modules/element-plus/es/components/select-v2/src/group-item.vue_vue_type_script_lang.mjs
  42462. var group_item_vue_vue_type_script_lang_default = defineComponent({
  42463. props: {
  42464. item: {
  42465. type: Object,
  42466. required: true
  42467. },
  42468. style: { type: Object },
  42469. height: Number
  42470. },
  42471. setup() {
  42472. return { ns: useNamespace("select") };
  42473. }
  42474. });
  42475. //#endregion
  42476. //#region node_modules/element-plus/es/components/select-v2/src/group-item.mjs
  42477. function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  42478. return openBlock(), createElementBlock("div", {
  42479. class: normalizeClass(_ctx.ns.be("group", "title")),
  42480. style: normalizeStyle({
  42481. ..._ctx.style,
  42482. lineHeight: `${_ctx.height}px`
  42483. })
  42484. }, toDisplayString(_ctx.item.label), 7);
  42485. }
  42486. var group_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(group_item_vue_vue_type_script_lang_default, [["render", _sfc_render$6]]);
  42487. //#endregion
  42488. //#region node_modules/element-plus/es/components/select-v2/src/useOption.mjs
  42489. function useOption(props, { emit }) {
  42490. return {
  42491. hoverItem: () => {
  42492. if (!props.disabled) emit("hover", props.index);
  42493. },
  42494. selectOptionClick: () => {
  42495. if (!props.disabled) emit("select", props.item, props.index);
  42496. }
  42497. };
  42498. }
  42499. //#endregion
  42500. //#region node_modules/element-plus/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs
  42501. var option_item_vue_vue_type_script_lang_default = defineComponent({
  42502. props: optionV2Props,
  42503. emits: optionV2Emits,
  42504. setup(props, { emit }) {
  42505. const select = inject(selectV2InjectionKey);
  42506. const ns = useNamespace("select");
  42507. const mouseMoveEventName = isIOS ? null : "mousemove";
  42508. const { hoverItem, selectOptionClick } = useOption(props, { emit });
  42509. const { getLabel } = useProps(select.props);
  42510. const contentId = select.contentId;
  42511. const handleMousedown = (event) => {
  42512. let target = event.target;
  42513. const currentTarget = event.currentTarget;
  42514. while (target && target !== currentTarget) {
  42515. if (isFocusable(target)) return;
  42516. target = target.parentElement;
  42517. }
  42518. event.preventDefault();
  42519. };
  42520. return {
  42521. ns,
  42522. contentId,
  42523. mouseMoveEventName,
  42524. hoverItem,
  42525. handleMousedown,
  42526. selectOptionClick,
  42527. getLabel
  42528. };
  42529. }
  42530. });
  42531. //#endregion
  42532. //#region node_modules/element-plus/es/components/select-v2/src/option-item.mjs
  42533. var _hoisted_1$22 = [
  42534. "id",
  42535. "aria-selected",
  42536. "aria-disabled"
  42537. ];
  42538. function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  42539. return openBlock(), createElementBlock("li", mergeProps({
  42540. id: `${_ctx.contentId}-${_ctx.index}`,
  42541. role: "option",
  42542. "aria-selected": _ctx.selected,
  42543. "aria-disabled": _ctx.disabled || void 0,
  42544. style: _ctx.style,
  42545. class: [
  42546. _ctx.ns.be("dropdown", "item"),
  42547. _ctx.ns.is("selected", _ctx.selected),
  42548. _ctx.ns.is("disabled", _ctx.disabled),
  42549. _ctx.ns.is("created", _ctx.created),
  42550. _ctx.ns.is("hovering", _ctx.hovering)
  42551. ]
  42552. }, { [toHandlerKey(_ctx.mouseMoveEventName)]: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)) }, {
  42553. onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
  42554. onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
  42555. }), [renderSlot(_ctx.$slots, "default", {
  42556. item: _ctx.item,
  42557. index: _ctx.index,
  42558. disabled: _ctx.disabled
  42559. }, () => [createBaseVNode("span", null, toDisplayString(_ctx.getLabel(_ctx.item)), 1)])], 16, _hoisted_1$22);
  42560. }
  42561. var option_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_item_vue_vue_type_script_lang_default, [["render", _sfc_render$5]]);
  42562. //#endregion
  42563. //#region node_modules/element-plus/es/components/select-v2/src/select-dropdown.mjs
  42564. var select_dropdown_default = /* @__PURE__ */ defineComponent({
  42565. name: "ElSelectDropdown",
  42566. props: {
  42567. loading: Boolean,
  42568. data: {
  42569. type: Array,
  42570. required: true
  42571. },
  42572. hoveringIndex: Number,
  42573. width: Number,
  42574. id: String,
  42575. ariaLabel: String
  42576. },
  42577. emits: { "end-reached": scrollbarEmits["end-reached"] },
  42578. setup(props, { slots, expose, emit }) {
  42579. const select = inject(selectV2InjectionKey);
  42580. const ns = useNamespace("select");
  42581. const { getLabel, getValue, getDisabled } = useProps(select.props);
  42582. const cachedHeights = ref([]);
  42583. const listRef = ref();
  42584. const size = computed(() => props.data.length);
  42585. watch(() => size.value, () => {
  42586. select.tooltipRef.value?.updatePopper?.();
  42587. });
  42588. const isSized = computed(() => isUndefined(select.props.estimatedOptionHeight));
  42589. const listProps = computed(() => {
  42590. if (isSized.value) return { itemSize: select.props.itemHeight };
  42591. return {
  42592. estimatedSize: select.props.estimatedOptionHeight,
  42593. itemSize: (idx) => cachedHeights.value[idx]
  42594. };
  42595. });
  42596. const contains = (arr = [], target) => {
  42597. const { props: { valueKey } } = select;
  42598. if (!isObject$2(target)) return arr.includes(target);
  42599. return arr && arr.some((item) => {
  42600. return toRaw(get(item, valueKey)) === get(target, valueKey);
  42601. });
  42602. };
  42603. const isEqual = (selected, target) => {
  42604. if (!isObject$2(target)) return selected === target;
  42605. else {
  42606. const { valueKey } = select.props;
  42607. return get(selected, valueKey) === get(target, valueKey);
  42608. }
  42609. };
  42610. const isItemSelected = (modelValue, target) => {
  42611. if (select.props.multiple) return contains(modelValue, getValue(target));
  42612. return isEqual(modelValue, getValue(target));
  42613. };
  42614. const isItemDisabled = (modelValue, selected) => {
  42615. const { disabled, multiple, multipleLimit } = select.props;
  42616. return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);
  42617. };
  42618. const isItemHovering = (target) => props.hoveringIndex === target;
  42619. const scrollToItem = (index) => {
  42620. const list = listRef.value;
  42621. if (list) list.scrollToItem(index);
  42622. };
  42623. const resetScrollTop = () => {
  42624. const list = listRef.value;
  42625. if (list) list.resetScrollTop();
  42626. };
  42627. expose({
  42628. listRef,
  42629. isSized,
  42630. isItemDisabled,
  42631. isItemHovering,
  42632. isItemSelected,
  42633. scrollToItem,
  42634. resetScrollTop
  42635. });
  42636. const Item = (itemProps) => {
  42637. const { index, data, style } = itemProps;
  42638. const sized = unref(isSized);
  42639. const { itemSize, estimatedSize } = unref(listProps);
  42640. const { modelValue } = select.props;
  42641. const { onSelect, onHover } = select;
  42642. const item = data[index];
  42643. if (item.type === "Group") return createVNode(group_item_default, {
  42644. "item": item,
  42645. "style": style,
  42646. "height": sized ? itemSize : estimatedSize
  42647. }, null);
  42648. const isSelected = isItemSelected(modelValue, item);
  42649. const isDisabled = isItemDisabled(modelValue, isSelected);
  42650. const isHovering = isItemHovering(index);
  42651. return createVNode(option_item_default, mergeProps(itemProps, {
  42652. "selected": isSelected,
  42653. "disabled": getDisabled(item) || isDisabled,
  42654. "created": !!item.created,
  42655. "hovering": isHovering,
  42656. "item": item,
  42657. "onSelect": onSelect,
  42658. "onHover": onHover
  42659. }), { default: (props) => slots.default?.(props) || createVNode("span", null, [getLabel(item)]) });
  42660. };
  42661. const { onKeyboardNavigate, onKeyboardSelect } = select;
  42662. const onForward = () => {
  42663. onKeyboardNavigate("forward");
  42664. };
  42665. const onBackward = () => {
  42666. onKeyboardNavigate("backward");
  42667. };
  42668. const onKeydown = (e) => {
  42669. const code = getEventCode(e);
  42670. const { tab, esc, down, up, enter, numpadEnter } = EVENT_CODE;
  42671. if ([
  42672. esc,
  42673. down,
  42674. up,
  42675. enter,
  42676. numpadEnter
  42677. ].includes(code)) {
  42678. e.preventDefault();
  42679. e.stopPropagation();
  42680. }
  42681. switch (code) {
  42682. case tab:
  42683. case esc: break;
  42684. case down:
  42685. onForward();
  42686. break;
  42687. case up:
  42688. onBackward();
  42689. break;
  42690. case enter:
  42691. case numpadEnter:
  42692. onKeyboardSelect();
  42693. break;
  42694. }
  42695. };
  42696. const onEndReached = (direction) => {
  42697. emit("end-reached", direction);
  42698. };
  42699. return () => {
  42700. const { data, width } = props;
  42701. const { height, multiple, scrollbarAlwaysOn } = select.props;
  42702. const isScrollbarAlwaysOn = isIOS ? true : scrollbarAlwaysOn;
  42703. const List = unref(isSized) ? FixedSizeList : DynamicSizeList;
  42704. return createVNode("div", {
  42705. "class": [ns.b("dropdown"), ns.is("multiple", multiple)],
  42706. "style": { width: `${width}px` }
  42707. }, [
  42708. slots.header?.(),
  42709. slots.loading?.() || slots.empty?.() || createVNode(List, mergeProps({ "ref": listRef }, unref(listProps), {
  42710. "className": ns.be("dropdown", "list"),
  42711. "scrollbarAlwaysOn": isScrollbarAlwaysOn,
  42712. "data": data,
  42713. "height": height,
  42714. "width": width,
  42715. "total": data.length,
  42716. "innerElement": "ul",
  42717. "innerProps": {
  42718. id: props.id,
  42719. role: "listbox",
  42720. "aria-label": props.ariaLabel,
  42721. "aria-orientation": "vertical"
  42722. },
  42723. "onEndReached": onEndReached,
  42724. "onKeydown": onKeydown
  42725. }), { default: (props) => createVNode(Item, props, null) }),
  42726. slots.footer?.()
  42727. ]);
  42728. };
  42729. }
  42730. });
  42731. //#endregion
  42732. //#region node_modules/element-plus/es/components/select-v2/src/useAllowCreate.mjs
  42733. function useAllowCreate(props, states) {
  42734. const { aliasProps, getLabel, getValue } = useProps(props);
  42735. const createOptionCount = ref(0);
  42736. const cachedSelectedOption = ref();
  42737. const enableAllowCreateMode = computed(() => {
  42738. return props.allowCreate && props.filterable;
  42739. });
  42740. watch(() => props.options, (options) => {
  42741. const optionLabelsSet = new Set(options.map((option) => getLabel(option)));
  42742. states.createdOptions = states.createdOptions.filter((createdOption) => !optionLabelsSet.has(getLabel(createdOption)));
  42743. });
  42744. function hasExistingOption(query) {
  42745. const hasOption = (option) => getLabel(option) === query;
  42746. return props.options && props.options.some(hasOption) || states.createdOptions.some(hasOption);
  42747. }
  42748. function selectNewOption(option) {
  42749. if (!enableAllowCreateMode.value) return;
  42750. if (props.multiple && option.created) createOptionCount.value++;
  42751. else cachedSelectedOption.value = option;
  42752. }
  42753. function createNewOption(query) {
  42754. if (enableAllowCreateMode.value) if (query && query.length > 0) {
  42755. if (hasExistingOption(query)) {
  42756. states.createdOptions = states.createdOptions.filter((createdOption) => getLabel(createdOption) !== states.previousQuery);
  42757. return;
  42758. }
  42759. const newOption = {
  42760. [aliasProps.value.value]: query,
  42761. [aliasProps.value.label]: query,
  42762. created: true,
  42763. [aliasProps.value.disabled]: false
  42764. };
  42765. if (states.createdOptions.length >= createOptionCount.value) states.createdOptions[createOptionCount.value] = newOption;
  42766. else states.createdOptions.push(newOption);
  42767. } else if (props.multiple) states.createdOptions.length = createOptionCount.value;
  42768. else {
  42769. const selectedOption = cachedSelectedOption.value;
  42770. states.createdOptions.length = 0;
  42771. if (selectedOption && selectedOption.created) states.createdOptions.push(selectedOption);
  42772. }
  42773. }
  42774. function removeNewOption(option) {
  42775. if (!enableAllowCreateMode.value || !option || !option.created || option.created && props.reserveKeyword && states.inputValue === getLabel(option)) return;
  42776. const idx = states.createdOptions.findIndex((it) => getValue(it) === getValue(option));
  42777. if (~idx) {
  42778. states.createdOptions.splice(idx, 1);
  42779. createOptionCount.value--;
  42780. }
  42781. }
  42782. function clearAllNewOption() {
  42783. if (enableAllowCreateMode.value) {
  42784. states.createdOptions.length = 0;
  42785. createOptionCount.value = 0;
  42786. }
  42787. }
  42788. return {
  42789. createNewOption,
  42790. removeNewOption,
  42791. selectNewOption,
  42792. clearAllNewOption
  42793. };
  42794. }
  42795. //#endregion
  42796. //#region node_modules/element-plus/es/components/select-v2/src/useSelect.mjs
  42797. var useSelect$1 = (props, emit) => {
  42798. const { t } = useLocale();
  42799. const slots = useSlots();
  42800. const nsSelect = useNamespace("select");
  42801. const nsInput = useNamespace("input");
  42802. const { form: elForm, formItem: elFormItem } = useFormItem();
  42803. const { inputId } = useFormItemInputId(props, { formItemContext: elFormItem });
  42804. const { aliasProps, getLabel, getValue, getDisabled, getOptions } = useProps(props);
  42805. const { valueOnClear, isEmptyValue } = useEmptyValues(props);
  42806. const states = reactive({
  42807. inputValue: "",
  42808. cachedOptions: [],
  42809. createdOptions: [],
  42810. hoveringIndex: -1,
  42811. inputHovering: false,
  42812. selectionWidth: 0,
  42813. collapseItemWidth: 0,
  42814. previousQuery: null,
  42815. previousValue: void 0,
  42816. selectedLabel: "",
  42817. menuVisibleOnFocus: false,
  42818. isBeforeHide: false
  42819. });
  42820. const popperSize = ref(-1);
  42821. const debouncing = ref(false);
  42822. const selectRef = ref();
  42823. const selectionRef = ref();
  42824. const tooltipRef = ref();
  42825. const tagTooltipRef = ref();
  42826. const inputRef = ref();
  42827. const prefixRef = ref();
  42828. const suffixRef = ref();
  42829. const menuRef = ref();
  42830. const tagMenuRef = ref();
  42831. const collapseItemRef = ref();
  42832. const { isComposing, handleCompositionStart, handleCompositionEnd, handleCompositionUpdate } = useComposition({ afterComposition: (e) => onInput(e) });
  42833. const selectDisabled = useFormDisabled();
  42834. const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
  42835. disabled: selectDisabled,
  42836. afterFocus() {
  42837. if (props.automaticDropdown && !expanded.value) {
  42838. expanded.value = true;
  42839. states.menuVisibleOnFocus = true;
  42840. }
  42841. },
  42842. beforeBlur(event) {
  42843. return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
  42844. },
  42845. afterBlur() {
  42846. expanded.value = false;
  42847. states.menuVisibleOnFocus = false;
  42848. if (props.validateEvent) elFormItem?.validate?.("blur").catch(NOOP);
  42849. }
  42850. });
  42851. const allOptions = computed(() => filterOptions(""));
  42852. const hasOptions = computed(() => {
  42853. if (props.loading) return false;
  42854. return props.options.length > 0 || states.createdOptions.length > 0;
  42855. });
  42856. const filteredOptions = ref([]);
  42857. const expanded = ref(false);
  42858. const needStatusIcon = computed(() => elForm?.statusIcon ?? false);
  42859. const popupHeight = computed(() => {
  42860. const totalHeight = filteredOptions.value.length * props.itemHeight;
  42861. return totalHeight > props.height ? props.height : totalHeight;
  42862. });
  42863. const hasModelValue = computed(() => {
  42864. return props.multiple ? isArray$1(props.modelValue) && props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
  42865. });
  42866. const showClearBtn = computed(() => {
  42867. return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
  42868. });
  42869. const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
  42870. const iconReverse = computed(() => iconComponent.value && nsSelect.is("reverse", expanded.value));
  42871. const validateState = computed(() => elFormItem?.validateState || "");
  42872. const validateIcon = computed(() => {
  42873. if (!validateState.value) return;
  42874. return ValidateComponentsMap[validateState.value];
  42875. });
  42876. const debounce = computed(() => props.remote ? props.debounce : 0);
  42877. const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && !hasOptions.value);
  42878. const emptyText = computed(() => {
  42879. if (props.loading) return props.loadingText || t("el.select.loading");
  42880. else {
  42881. if (props.filterable && states.inputValue && hasOptions.value && filteredOptions.value.length === 0) return props.noMatchText || t("el.select.noMatch");
  42882. if (!hasOptions.value) return props.noDataText || t("el.select.noData");
  42883. }
  42884. return null;
  42885. });
  42886. const isFilterMethodValid = computed(() => props.filterable && isFunction$1(props.filterMethod));
  42887. const isRemoteMethodValid = computed(() => props.filterable && props.remote && isFunction$1(props.remoteMethod));
  42888. const filterOptions = (query) => {
  42889. const regexp = new RegExp(escapeStringRegexp(query), "i");
  42890. const isValidOption = (o) => {
  42891. if (isFilterMethodValid.value || isRemoteMethodValid.value) return true;
  42892. return query ? regexp.test(getLabel(o) || "") : true;
  42893. };
  42894. if (props.loading) return [];
  42895. return [...states.createdOptions, ...props.options].reduce((all, item) => {
  42896. const options = getOptions(item);
  42897. if (isArray$1(options)) {
  42898. const filtered = options.filter(isValidOption);
  42899. if (filtered.length > 0) all.push({
  42900. label: getLabel(item),
  42901. type: "Group"
  42902. }, ...filtered);
  42903. } else if (props.remote || isValidOption(item)) all.push(item);
  42904. return all;
  42905. }, []);
  42906. };
  42907. const updateOptions = () => {
  42908. filteredOptions.value = filterOptions(states.inputValue);
  42909. };
  42910. const allOptionsValueMap = computed(() => {
  42911. const valueMap = /* @__PURE__ */ new Map();
  42912. allOptions.value.forEach((option, index) => {
  42913. valueMap.set(getValueKey(getValue(option)), {
  42914. option,
  42915. index
  42916. });
  42917. });
  42918. return valueMap;
  42919. });
  42920. const filteredOptionsValueMap = computed(() => {
  42921. const valueMap = /* @__PURE__ */ new Map();
  42922. filteredOptions.value.forEach((option, index) => {
  42923. valueMap.set(getValueKey(getValue(option)), {
  42924. option,
  42925. index
  42926. });
  42927. });
  42928. return valueMap;
  42929. });
  42930. const optionsAllDisabled = computed(() => filteredOptions.value.every((option) => getDisabled(option)));
  42931. const selectSize = useFormSize();
  42932. const collapseTagSize = computed(() => "small" === selectSize.value ? "small" : "default");
  42933. const calculatePopperSize = () => {
  42934. if (isNumber(props.fitInputWidth)) {
  42935. popperSize.value = props.fitInputWidth;
  42936. return;
  42937. }
  42938. const width = selectRef.value?.offsetWidth || 200;
  42939. if (!props.fitInputWidth && hasOptions.value) nextTick(() => {
  42940. popperSize.value = Math.max(width, calculateLabelMaxWidth());
  42941. });
  42942. else popperSize.value = width;
  42943. };
  42944. const calculateLabelMaxWidth = () => {
  42945. const ctx = document.createElement("canvas").getContext("2d");
  42946. const selector = nsSelect.be("dropdown", "item");
  42947. const dropdownItemEl = (menuRef.value?.listRef?.innerRef || document).querySelector(`.${selector}`);
  42948. if (dropdownItemEl === null || ctx === null) return 0;
  42949. const style = getComputedStyle(dropdownItemEl);
  42950. const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight);
  42951. ctx.font = `bold ${style.font.replace(new RegExp(`\\b${style.fontWeight}\\b`), "")}`;
  42952. return filteredOptions.value.reduce((max, option) => {
  42953. const metrics = ctx.measureText(getLabel(option));
  42954. return Math.max(metrics.width, max);
  42955. }, 0) + padding;
  42956. };
  42957. const getGapWidth = () => {
  42958. if (!selectionRef.value) return 0;
  42959. const style = window.getComputedStyle(selectionRef.value);
  42960. return Number.parseFloat(style.gap || "6px");
  42961. };
  42962. const tagStyle = computed(() => {
  42963. const gapWidth = getGapWidth();
  42964. const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
  42965. return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
  42966. });
  42967. const collapseTagStyle = computed(() => {
  42968. return { maxWidth: `${states.selectionWidth}px` };
  42969. });
  42970. const shouldShowPlaceholder = computed(() => {
  42971. if (isArray$1(props.modelValue)) return props.modelValue.length === 0 && !states.inputValue;
  42972. return props.filterable ? !states.inputValue : true;
  42973. });
  42974. const currentPlaceholder = computed(() => {
  42975. const _placeholder = props.placeholder ?? t("el.select.placeholder");
  42976. return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
  42977. });
  42978. const popperRef = computed(() => tooltipRef.value?.popperRef?.contentRef);
  42979. const indexRef = computed(() => {
  42980. if (props.multiple) {
  42981. const len = props.modelValue.length;
  42982. if (len > 0 && filteredOptionsValueMap.value.has(props.modelValue[len - 1])) {
  42983. const { index } = filteredOptionsValueMap.value.get(props.modelValue[len - 1]);
  42984. return index;
  42985. }
  42986. } else if (!isEmptyValue(props.modelValue) && filteredOptionsValueMap.value.has(props.modelValue)) {
  42987. const { index } = filteredOptionsValueMap.value.get(props.modelValue);
  42988. return index;
  42989. }
  42990. return -1;
  42991. });
  42992. const dropdownMenuVisible = computed({
  42993. get() {
  42994. return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery) || hasOptions.value);
  42995. },
  42996. set(val) {
  42997. expanded.value = val;
  42998. }
  42999. });
  43000. const showTagList = computed(() => {
  43001. if (!props.multiple) return [];
  43002. return props.collapseTags ? states.cachedOptions.slice(0, props.maxCollapseTags) : states.cachedOptions;
  43003. });
  43004. const collapseTagList = computed(() => {
  43005. if (!props.multiple) return [];
  43006. return props.collapseTags ? states.cachedOptions.slice(props.maxCollapseTags) : [];
  43007. });
  43008. const { createNewOption, removeNewOption, selectNewOption, clearAllNewOption } = useAllowCreate(props, states);
  43009. const toggleMenu = (event) => {
  43010. if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
  43011. if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
  43012. else expanded.value = !expanded.value;
  43013. };
  43014. const onInputChange = () => {
  43015. if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
  43016. createNewOption(states.inputValue);
  43017. nextTick(() => {
  43018. handleQueryChange(states.inputValue);
  43019. });
  43020. };
  43021. const debouncedOnInputChange = useDebounceFn(() => {
  43022. onInputChange();
  43023. debouncing.value = false;
  43024. }, debounce);
  43025. const handleQueryChange = (val) => {
  43026. if (states.previousQuery === val || isComposing.value) return;
  43027. states.previousQuery = val;
  43028. if (props.filterable && isFunction$1(props.filterMethod)) props.filterMethod(val);
  43029. else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) props.remoteMethod(val);
  43030. if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptions.value.length) nextTick(checkDefaultFirstOption);
  43031. else nextTick(updateHoveringIndex);
  43032. };
  43033. /**
  43034. * find and highlight first option as default selected
  43035. * @remark
  43036. * - if the first option in dropdown list is user-created,
  43037. * it would be at the end of the optionsArray
  43038. * so find it and set hover.
  43039. * (NOTE: there must be only one user-created option in dropdown list with query)
  43040. * - if there's no user-created option in list, just find the first one as usual
  43041. * (NOTE: exclude options that are disabled or in disabled-group)
  43042. */
  43043. const checkDefaultFirstOption = () => {
  43044. const optionsInDropdown = filteredOptions.value.filter((n) => !n.disabled && n.type !== "Group");
  43045. const userCreatedOption = optionsInDropdown.find((n) => n.created);
  43046. const firstOriginOption = optionsInDropdown[0];
  43047. states.hoveringIndex = getValueIndex(filteredOptions.value, userCreatedOption || firstOriginOption);
  43048. };
  43049. const emitChange = (val) => {
  43050. if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
  43051. };
  43052. const update = (val) => {
  43053. emit(UPDATE_MODEL_EVENT, val);
  43054. emitChange(val);
  43055. states.previousValue = props.multiple ? String(val) : val;
  43056. nextTick(() => {
  43057. if (props.multiple && isArray$1(props.modelValue)) {
  43058. const cachedOptions = states.cachedOptions.slice();
  43059. const selectedOptions = props.modelValue.map((value) => getOption(value, cachedOptions));
  43060. if (!isEqual$1(states.cachedOptions, selectedOptions)) states.cachedOptions = selectedOptions;
  43061. } else initStates(true);
  43062. });
  43063. };
  43064. const getValueIndex = (arr = [], value) => {
  43065. if (!isObject$2(value)) return arr.indexOf(value);
  43066. const valueKey = props.valueKey;
  43067. let index = -1;
  43068. arr.some((item, i) => {
  43069. if (get(item, valueKey) === get(value, valueKey)) {
  43070. index = i;
  43071. return true;
  43072. }
  43073. return false;
  43074. });
  43075. return index;
  43076. };
  43077. const getValueKey = (item) => {
  43078. return isObject$2(item) ? get(item, props.valueKey) : item;
  43079. };
  43080. const handleResize = () => {
  43081. calculatePopperSize();
  43082. };
  43083. const onEndReached = (direction) => {
  43084. emit("end-reached", direction);
  43085. };
  43086. const resetSelectionWidth = () => {
  43087. states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
  43088. };
  43089. const resetCollapseItemWidth = () => {
  43090. states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
  43091. };
  43092. const updateTooltip = () => {
  43093. tooltipRef.value?.updatePopper?.();
  43094. };
  43095. const updateTagTooltip = () => {
  43096. tagTooltipRef.value?.updatePopper?.();
  43097. };
  43098. const onSelect = (option) => {
  43099. const optionValue = getValue(option);
  43100. if (props.multiple) {
  43101. let selectedOptions = props.modelValue.slice();
  43102. const index = getValueIndex(selectedOptions, optionValue);
  43103. if (index > -1) {
  43104. selectedOptions = [...selectedOptions.slice(0, index), ...selectedOptions.slice(index + 1)];
  43105. states.cachedOptions.splice(index, 1);
  43106. removeNewOption(option);
  43107. } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {
  43108. selectedOptions = [...selectedOptions, optionValue];
  43109. states.cachedOptions.push(option);
  43110. selectNewOption(option);
  43111. }
  43112. update(selectedOptions);
  43113. if (option.created) handleQueryChange("");
  43114. if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
  43115. } else {
  43116. states.selectedLabel = getLabel(option);
  43117. !isEqual$1(props.modelValue, optionValue) && update(optionValue);
  43118. expanded.value = false;
  43119. selectNewOption(option);
  43120. if (!option.created) clearAllNewOption();
  43121. }
  43122. focus();
  43123. };
  43124. const deleteTag = (event, option) => {
  43125. let selectedOptions = props.modelValue.slice();
  43126. const index = getValueIndex(selectedOptions, getValue(option));
  43127. if (index > -1 && !selectDisabled.value) {
  43128. selectedOptions = [...props.modelValue.slice(0, index), ...props.modelValue.slice(index + 1)];
  43129. states.cachedOptions.splice(index, 1);
  43130. update(selectedOptions);
  43131. emit("remove-tag", getValue(option));
  43132. removeNewOption(option);
  43133. }
  43134. event.stopPropagation();
  43135. focus();
  43136. };
  43137. const focus = () => {
  43138. inputRef.value?.focus();
  43139. };
  43140. const blur = () => {
  43141. if (expanded.value) {
  43142. expanded.value = false;
  43143. nextTick(() => inputRef.value?.blur());
  43144. return;
  43145. }
  43146. inputRef.value?.blur();
  43147. };
  43148. const handleEsc = () => {
  43149. if (states.inputValue.length > 0) states.inputValue = "";
  43150. else expanded.value = false;
  43151. };
  43152. const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => !states.cachedOptions.some((option) => getValue(option) === it && getDisabled(option)));
  43153. const handleDel = (e) => {
  43154. const code = getEventCode(e);
  43155. if (!props.multiple) return;
  43156. if (code === EVENT_CODE.delete) return;
  43157. if (states.inputValue.length === 0) {
  43158. e.preventDefault();
  43159. const selected = props.modelValue.slice();
  43160. const lastNotDisabledIndex = getLastNotDisabledIndex(selected);
  43161. if (lastNotDisabledIndex < 0) return;
  43162. const removeTagValue = selected[lastNotDisabledIndex];
  43163. selected.splice(lastNotDisabledIndex, 1);
  43164. const option = states.cachedOptions[lastNotDisabledIndex];
  43165. states.cachedOptions.splice(lastNotDisabledIndex, 1);
  43166. removeNewOption(option);
  43167. update(selected);
  43168. emit("remove-tag", removeTagValue);
  43169. }
  43170. };
  43171. const handleClear = () => {
  43172. let emptyValue;
  43173. if (isArray$1(props.modelValue)) emptyValue = [];
  43174. else emptyValue = valueOnClear.value;
  43175. states.selectedLabel = "";
  43176. expanded.value = false;
  43177. update(emptyValue);
  43178. emit("clear");
  43179. clearAllNewOption();
  43180. focus();
  43181. };
  43182. const onKeyboardNavigate = (direction, hoveringIndex = void 0) => {
  43183. const options = filteredOptions.value;
  43184. if (!["forward", "backward"].includes(direction) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value || isComposing.value) return;
  43185. if (!expanded.value) return toggleMenu();
  43186. if (isUndefined(hoveringIndex)) hoveringIndex = states.hoveringIndex;
  43187. let newIndex = -1;
  43188. if (direction === "forward") {
  43189. newIndex = hoveringIndex + 1;
  43190. if (newIndex >= options.length) newIndex = 0;
  43191. } else if (direction === "backward") {
  43192. newIndex = hoveringIndex - 1;
  43193. if (newIndex < 0 || newIndex >= options.length) newIndex = options.length - 1;
  43194. }
  43195. const option = options[newIndex];
  43196. if (getDisabled(option) || option.type === "Group") return onKeyboardNavigate(direction, newIndex);
  43197. else {
  43198. states.hoveringIndex = newIndex;
  43199. scrollToItem(newIndex);
  43200. }
  43201. };
  43202. const onKeyboardSelect = () => {
  43203. if (!expanded.value) return toggleMenu();
  43204. else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) onSelect(filteredOptions.value[states.hoveringIndex]);
  43205. };
  43206. const onHoverOption = (idx) => {
  43207. states.hoveringIndex = idx ?? -1;
  43208. };
  43209. const updateHoveringIndex = () => {
  43210. if (!props.multiple) states.hoveringIndex = filteredOptions.value.findIndex((item) => {
  43211. return getValueKey(getValue(item)) === getValueKey(props.modelValue);
  43212. });
  43213. else {
  43214. const length = props.modelValue.length;
  43215. if (length > 0) {
  43216. const lastValue = props.modelValue[length - 1];
  43217. states.hoveringIndex = filteredOptions.value.findIndex((item) => getValueKey(lastValue) === getValueKey(getValue(item)));
  43218. } else states.hoveringIndex = -1;
  43219. }
  43220. };
  43221. const onInput = (event) => {
  43222. states.inputValue = event.target.value;
  43223. if (props.remote) {
  43224. debouncing.value = true;
  43225. debouncedOnInputChange();
  43226. } else return onInputChange();
  43227. };
  43228. const handleClickOutside = (event) => {
  43229. expanded.value = false;
  43230. if (isFocused.value) handleBlur(new FocusEvent("blur", event));
  43231. };
  43232. const handleMenuEnter = () => {
  43233. states.isBeforeHide = false;
  43234. return nextTick(() => {
  43235. if (~indexRef.value) scrollToItem(indexRef.value);
  43236. });
  43237. };
  43238. const scrollToItem = (index) => {
  43239. menuRef.value.scrollToItem(index);
  43240. };
  43241. const getOption = (value, cachedOptions) => {
  43242. const selectValue = getValueKey(value);
  43243. if (allOptionsValueMap.value.has(selectValue)) {
  43244. const { option } = allOptionsValueMap.value.get(selectValue);
  43245. return option;
  43246. }
  43247. if (cachedOptions && cachedOptions.length) {
  43248. const option = cachedOptions.find((option) => getValueKey(getValue(option)) === selectValue);
  43249. if (option) return option;
  43250. }
  43251. return {
  43252. [aliasProps.value.value]: value,
  43253. [aliasProps.value.label]: value
  43254. };
  43255. };
  43256. const getIndex = (option) => allOptionsValueMap.value.get(getValue(option))?.index ?? -1;
  43257. const initStates = (needUpdateSelectedLabel = false) => {
  43258. if (props.multiple) if (props.modelValue.length > 0) {
  43259. const cachedOptions = states.cachedOptions.slice();
  43260. states.cachedOptions.length = 0;
  43261. states.previousValue = props.modelValue.toString();
  43262. for (const value of props.modelValue) {
  43263. const option = getOption(value, cachedOptions);
  43264. states.cachedOptions.push(option);
  43265. }
  43266. } else {
  43267. states.cachedOptions = [];
  43268. states.previousValue = void 0;
  43269. }
  43270. else if (hasModelValue.value) {
  43271. states.previousValue = props.modelValue;
  43272. const options = filteredOptions.value;
  43273. const selectedItemIndex = options.findIndex((option) => getValueKey(getValue(option)) === getValueKey(props.modelValue));
  43274. if (~selectedItemIndex) states.selectedLabel = getLabel(options[selectedItemIndex]);
  43275. else if (!states.selectedLabel || needUpdateSelectedLabel) states.selectedLabel = getValueKey(props.modelValue);
  43276. } else {
  43277. states.selectedLabel = "";
  43278. states.previousValue = void 0;
  43279. }
  43280. clearAllNewOption();
  43281. calculatePopperSize();
  43282. };
  43283. watch(() => props.fitInputWidth, () => {
  43284. calculatePopperSize();
  43285. });
  43286. watch(expanded, (val) => {
  43287. if (val) {
  43288. if (!props.persistent) calculatePopperSize();
  43289. handleQueryChange("");
  43290. } else {
  43291. states.inputValue = "";
  43292. states.previousQuery = null;
  43293. states.isBeforeHide = true;
  43294. states.menuVisibleOnFocus = false;
  43295. createNewOption("");
  43296. }
  43297. });
  43298. watch(() => props.modelValue, (val, oldVal) => {
  43299. if (!val || isArray$1(val) && val.length === 0 || props.multiple && !isEqual$1(val.toString(), states.previousValue) || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) initStates(true);
  43300. if (!isEqual$1(val, oldVal) && props.validateEvent) elFormItem?.validate?.("change").catch(NOOP);
  43301. }, { deep: true });
  43302. watch(() => props.options, () => {
  43303. const input = inputRef.value;
  43304. if (!input || input && document.activeElement !== input) initStates();
  43305. }, {
  43306. deep: true,
  43307. flush: "post"
  43308. });
  43309. watch(() => filteredOptions.value, () => {
  43310. calculatePopperSize();
  43311. return menuRef.value && nextTick(menuRef.value.resetScrollTop);
  43312. });
  43313. watchEffect(() => {
  43314. if (states.isBeforeHide) return;
  43315. updateOptions();
  43316. });
  43317. watchEffect(() => {
  43318. const { valueKey, options } = props;
  43319. const duplicateValue = /* @__PURE__ */ new Map();
  43320. for (const item of options) {
  43321. const optionValue = getValue(item);
  43322. let v = optionValue;
  43323. if (isObject$2(v)) v = get(optionValue, valueKey);
  43324. if (duplicateValue.get(v)) {
  43325. debugWarn("ElSelectV2", `The option values you provided seem to be duplicated, which may cause some problems, please check.`);
  43326. break;
  43327. } else duplicateValue.set(v, true);
  43328. }
  43329. });
  43330. onMounted(() => {
  43331. initStates();
  43332. });
  43333. useResizeObserver(selectRef, handleResize);
  43334. useResizeObserver(selectionRef, resetSelectionWidth);
  43335. useResizeObserver(wrapperRef, updateTooltip);
  43336. useResizeObserver(tagMenuRef, updateTagTooltip);
  43337. useResizeObserver(collapseItemRef, resetCollapseItemWidth);
  43338. let stop;
  43339. watch(() => dropdownMenuVisible.value, (newVal) => {
  43340. if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
  43341. else {
  43342. stop?.();
  43343. stop = void 0;
  43344. }
  43345. emit("visible-change", newVal);
  43346. });
  43347. return {
  43348. inputId,
  43349. collapseTagSize,
  43350. currentPlaceholder,
  43351. expanded,
  43352. emptyText,
  43353. popupHeight,
  43354. debounce,
  43355. allOptions,
  43356. allOptionsValueMap,
  43357. filteredOptions,
  43358. iconComponent,
  43359. iconReverse,
  43360. tagStyle,
  43361. collapseTagStyle,
  43362. popperSize,
  43363. dropdownMenuVisible,
  43364. hasModelValue,
  43365. shouldShowPlaceholder,
  43366. selectDisabled,
  43367. selectSize,
  43368. needStatusIcon,
  43369. showClearBtn,
  43370. states,
  43371. isFocused,
  43372. nsSelect,
  43373. nsInput,
  43374. inputRef,
  43375. menuRef,
  43376. tagMenuRef,
  43377. tooltipRef,
  43378. tagTooltipRef,
  43379. selectRef,
  43380. wrapperRef,
  43381. selectionRef,
  43382. prefixRef,
  43383. suffixRef,
  43384. collapseItemRef,
  43385. popperRef,
  43386. validateState,
  43387. validateIcon,
  43388. showTagList,
  43389. collapseTagList,
  43390. debouncedOnInputChange,
  43391. deleteTag,
  43392. getLabel,
  43393. getValue,
  43394. getDisabled,
  43395. getValueKey,
  43396. getIndex,
  43397. handleClear,
  43398. handleClickOutside,
  43399. handleDel,
  43400. handleEsc,
  43401. focus,
  43402. blur,
  43403. handleMenuEnter,
  43404. handleResize,
  43405. resetSelectionWidth,
  43406. updateTooltip,
  43407. updateTagTooltip,
  43408. updateOptions,
  43409. toggleMenu,
  43410. scrollTo: scrollToItem,
  43411. onInput,
  43412. onKeyboardNavigate,
  43413. onKeyboardSelect,
  43414. onEndReached,
  43415. onSelect,
  43416. onHover: onHoverOption,
  43417. handleCompositionStart,
  43418. handleCompositionEnd,
  43419. handleCompositionUpdate
  43420. };
  43421. };
  43422. //#endregion
  43423. //#region node_modules/element-plus/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs
  43424. var select_vue_vue_type_script_lang_default = defineComponent({
  43425. name: "ElSelectV2",
  43426. components: {
  43427. ElSelectMenu: select_dropdown_default,
  43428. ElTag,
  43429. ElTooltip,
  43430. ElIcon
  43431. },
  43432. directives: { ClickOutside },
  43433. props: selectV2Props,
  43434. emits: selectV2Emits,
  43435. setup(props, { emit }) {
  43436. const modelValue = computed(() => {
  43437. const { modelValue: rawModelValue, multiple } = props;
  43438. const fallback = multiple ? [] : void 0;
  43439. if (isArray$1(rawModelValue)) return multiple ? rawModelValue : fallback;
  43440. return multiple ? fallback : rawModelValue;
  43441. });
  43442. const API = useSelect$1(reactive({
  43443. ...toRefs(props),
  43444. modelValue
  43445. }), emit);
  43446. const { calculatorRef, inputStyle } = useCalcInputWidth();
  43447. const contentId = useId();
  43448. provide(selectV2InjectionKey, {
  43449. props: reactive({
  43450. ...toRefs(props),
  43451. height: API.popupHeight,
  43452. modelValue
  43453. }),
  43454. expanded: API.expanded,
  43455. tooltipRef: API.tooltipRef,
  43456. contentId,
  43457. onSelect: API.onSelect,
  43458. onHover: API.onHover,
  43459. onKeyboardNavigate: API.onKeyboardNavigate,
  43460. onKeyboardSelect: API.onKeyboardSelect
  43461. });
  43462. const selectedLabel = computed(() => {
  43463. if (!props.multiple) return API.states.selectedLabel;
  43464. return API.states.cachedOptions.map((i) => API.getLabel(i));
  43465. });
  43466. return {
  43467. ...API,
  43468. modelValue,
  43469. selectedLabel,
  43470. calculatorRef,
  43471. inputStyle,
  43472. contentId,
  43473. BORDER_HORIZONTAL_WIDTH: 2
  43474. };
  43475. }
  43476. });
  43477. //#endregion
  43478. //#region node_modules/element-plus/es/components/select-v2/src/select.mjs
  43479. var _hoisted_1$21 = [
  43480. "id",
  43481. "value",
  43482. "autocomplete",
  43483. "tabindex",
  43484. "aria-expanded",
  43485. "aria-label",
  43486. "disabled",
  43487. "aria-controls",
  43488. "aria-activedescendant",
  43489. "readonly",
  43490. "name"
  43491. ];
  43492. var _hoisted_2$13 = ["textContent"];
  43493. var _hoisted_3$5 = { key: 1 };
  43494. function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  43495. const _component_el_tag = resolveComponent("el-tag");
  43496. const _component_el_tooltip = resolveComponent("el-tooltip");
  43497. const _component_el_icon = resolveComponent("el-icon");
  43498. const _component_el_select_menu = resolveComponent("el-select-menu");
  43499. const _directive_click_outside = resolveDirective("click-outside");
  43500. return withDirectives((openBlock(), createElementBlock("div", {
  43501. ref: "selectRef",
  43502. class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
  43503. onMouseenter: _cache[15] || (_cache[15] = ($event) => _ctx.states.inputHovering = true),
  43504. onMouseleave: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = false)
  43505. }, [createVNode(_component_el_tooltip, {
  43506. ref: "tooltipRef",
  43507. visible: _ctx.dropdownMenuVisible,
  43508. teleported: _ctx.teleported,
  43509. "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
  43510. "popper-style": _ctx.popperStyle,
  43511. "gpu-acceleration": false,
  43512. "stop-popper-mouse-event": false,
  43513. "popper-options": _ctx.popperOptions,
  43514. "fallback-placements": _ctx.fallbackPlacements,
  43515. effect: _ctx.effect,
  43516. placement: _ctx.placement,
  43517. pure: "",
  43518. transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
  43519. trigger: "click",
  43520. persistent: _ctx.persistent,
  43521. "append-to": _ctx.appendTo,
  43522. "show-arrow": _ctx.showArrow,
  43523. offset: _ctx.offset,
  43524. onBeforeShow: _ctx.handleMenuEnter,
  43525. onHide: _cache[14] || (_cache[14] = ($event) => _ctx.states.isBeforeHide = false)
  43526. }, {
  43527. default: withCtx(() => [createBaseVNode("div", {
  43528. ref: "wrapperRef",
  43529. class: normalizeClass([
  43530. _ctx.nsSelect.e("wrapper"),
  43531. _ctx.nsSelect.is("focused", _ctx.isFocused),
  43532. _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
  43533. _ctx.nsSelect.is("filterable", _ctx.filterable),
  43534. _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
  43535. ]),
  43536. onClick: _cache[11] || (_cache[11] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
  43537. }, [
  43538. _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
  43539. key: 0,
  43540. ref: "prefixRef",
  43541. class: normalizeClass(_ctx.nsSelect.e("prefix"))
  43542. }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
  43543. createBaseVNode("div", {
  43544. ref: "selectionRef",
  43545. class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length)])
  43546. }, [
  43547. _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
  43548. key: 0,
  43549. data: _ctx.states.cachedOptions,
  43550. deleteTag: _ctx.deleteTag,
  43551. selectDisabled: _ctx.selectDisabled
  43552. }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
  43553. return openBlock(), createElementBlock("div", {
  43554. key: _ctx.getValueKey(_ctx.getValue(item)),
  43555. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  43556. }, [createVNode(_component_el_tag, {
  43557. closable: !_ctx.selectDisabled && !_ctx.getDisabled(item),
  43558. size: _ctx.collapseTagSize,
  43559. type: _ctx.tagType,
  43560. effect: _ctx.tagEffect,
  43561. "disable-transitions": "",
  43562. style: normalizeStyle(_ctx.tagStyle),
  43563. onClose: ($event) => _ctx.deleteTag($event, item)
  43564. }, {
  43565. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  43566. index: _ctx.getIndex(item),
  43567. label: _ctx.getLabel(item),
  43568. value: _ctx.getValue(item)
  43569. }, () => [createTextVNode(toDisplayString(_ctx.getLabel(item)), 1)])], 2)]),
  43570. _: 2
  43571. }, 1032, [
  43572. "closable",
  43573. "size",
  43574. "type",
  43575. "effect",
  43576. "style",
  43577. "onClose"
  43578. ])], 2);
  43579. }), 128)), _ctx.collapseTags && _ctx.states.cachedOptions.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
  43580. key: 0,
  43581. ref: "tagTooltipRef",
  43582. disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
  43583. "fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
  43584. "bottom",
  43585. "top",
  43586. "right",
  43587. "left"
  43588. ],
  43589. effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
  43590. placement: _ctx.tagTooltip?.placement ?? "bottom",
  43591. "popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
  43592. "popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
  43593. teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
  43594. "append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
  43595. "popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
  43596. transition: _ctx.tagTooltip?.transition,
  43597. "show-after": _ctx.tagTooltip?.showAfter,
  43598. "hide-after": _ctx.tagTooltip?.hideAfter,
  43599. "auto-close": _ctx.tagTooltip?.autoClose,
  43600. offset: _ctx.tagTooltip?.offset
  43601. }, {
  43602. default: withCtx(() => [createBaseVNode("div", {
  43603. ref: "collapseItemRef",
  43604. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  43605. }, [createVNode(_component_el_tag, {
  43606. closable: false,
  43607. size: _ctx.collapseTagSize,
  43608. type: _ctx.tagType,
  43609. effect: _ctx.tagEffect,
  43610. style: normalizeStyle(_ctx.collapseTagStyle),
  43611. "disable-transitions": ""
  43612. }, {
  43613. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.cachedOptions.length - _ctx.maxCollapseTags), 3)]),
  43614. _: 1
  43615. }, 8, [
  43616. "size",
  43617. "type",
  43618. "effect",
  43619. "style"
  43620. ])], 2)]),
  43621. content: withCtx(() => [createBaseVNode("div", {
  43622. ref: "tagMenuRef",
  43623. class: normalizeClass(_ctx.nsSelect.e("selection"))
  43624. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (selected) => {
  43625. return openBlock(), createElementBlock("div", {
  43626. key: _ctx.getValueKey(_ctx.getValue(selected)),
  43627. class: normalizeClass(_ctx.nsSelect.e("selected-item"))
  43628. }, [createVNode(_component_el_tag, {
  43629. class: "in-tooltip",
  43630. closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected),
  43631. size: _ctx.collapseTagSize,
  43632. type: _ctx.tagType,
  43633. effect: _ctx.tagEffect,
  43634. "disable-transitions": "",
  43635. onClose: ($event) => _ctx.deleteTag($event, selected)
  43636. }, {
  43637. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
  43638. index: _ctx.getIndex(selected),
  43639. label: _ctx.getLabel(selected),
  43640. value: _ctx.getValue(selected)
  43641. }, () => [createTextVNode(toDisplayString(_ctx.getLabel(selected)), 1)])], 2)]),
  43642. _: 2
  43643. }, 1032, [
  43644. "closable",
  43645. "size",
  43646. "type",
  43647. "effect",
  43648. "onClose"
  43649. ])], 2);
  43650. }), 128))], 2)]),
  43651. _: 3
  43652. }, 8, [
  43653. "disabled",
  43654. "fallback-placements",
  43655. "effect",
  43656. "placement",
  43657. "popper-class",
  43658. "popper-style",
  43659. "teleported",
  43660. "append-to",
  43661. "popper-options",
  43662. "transition",
  43663. "show-after",
  43664. "hide-after",
  43665. "auto-close",
  43666. "offset"
  43667. ])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
  43668. createBaseVNode("div", { class: normalizeClass([
  43669. _ctx.nsSelect.e("selected-item"),
  43670. _ctx.nsSelect.e("input-wrapper"),
  43671. _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
  43672. ]) }, [createBaseVNode("input", {
  43673. id: _ctx.inputId,
  43674. ref: "inputRef",
  43675. value: _ctx.states.inputValue,
  43676. style: normalizeStyle(_ctx.inputStyle),
  43677. autocomplete: _ctx.autocomplete,
  43678. tabindex: _ctx.tabindex,
  43679. "aria-autocomplete": "none",
  43680. "aria-haspopup": "listbox",
  43681. autocapitalize: "off",
  43682. "aria-expanded": _ctx.expanded,
  43683. "aria-label": _ctx.ariaLabel,
  43684. class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
  43685. disabled: _ctx.selectDisabled,
  43686. role: "combobox",
  43687. "aria-controls": _ctx.contentId,
  43688. "aria-activedescendant": _ctx.states.hoveringIndex >= 0 ? `${_ctx.contentId}-${_ctx.states.hoveringIndex}` : "",
  43689. readonly: !_ctx.filterable,
  43690. spellcheck: "false",
  43691. type: "text",
  43692. name: _ctx.name,
  43693. onInput: _cache[0] || (_cache[0] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
  43694. onChange: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
  43695. onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
  43696. onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
  43697. onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
  43698. onKeydown: [
  43699. _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
  43700. _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
  43701. _cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])),
  43702. _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])),
  43703. _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"]))
  43704. ],
  43705. onClick: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
  43706. }, null, 46, _hoisted_1$21), _ctx.filterable ? (openBlock(), createElementBlock("span", {
  43707. key: 0,
  43708. ref: "calculatorRef",
  43709. "aria-hidden": "true",
  43710. class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
  43711. textContent: toDisplayString(_ctx.states.inputValue)
  43712. }, null, 10, _hoisted_2$13)) : createCommentVNode("v-if", true)], 2),
  43713. _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
  43714. key: 1,
  43715. class: normalizeClass([
  43716. _ctx.nsSelect.e("selected-item"),
  43717. _ctx.nsSelect.e("placeholder"),
  43718. _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
  43719. ])
  43720. }, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
  43721. key: 0,
  43722. index: _ctx.allOptionsValueMap.get(_ctx.modelValue)?.index ?? -1,
  43723. label: _ctx.currentPlaceholder,
  43724. value: _ctx.modelValue
  43725. }, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3$5, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
  43726. ], 2),
  43727. createBaseVNode("div", {
  43728. ref: "suffixRef",
  43729. class: normalizeClass(_ctx.nsSelect.e("suffix"))
  43730. }, [
  43731. _ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, {
  43732. key: 0,
  43733. class: normalizeClass([
  43734. _ctx.nsSelect.e("caret"),
  43735. _ctx.nsInput.e("icon"),
  43736. _ctx.iconReverse
  43737. ])
  43738. }, {
  43739. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  43740. _: 1
  43741. }, 8, ["class"])), [[vShow, !_ctx.showClearBtn]]) : createCommentVNode("v-if", true),
  43742. _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
  43743. key: 1,
  43744. class: normalizeClass([
  43745. _ctx.nsSelect.e("caret"),
  43746. _ctx.nsInput.e("icon"),
  43747. _ctx.nsSelect.e("clear")
  43748. ]),
  43749. onClick: withModifiers(_ctx.handleClear, ["prevent", "stop"])
  43750. }, {
  43751. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
  43752. _: 1
  43753. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  43754. _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
  43755. key: 2,
  43756. class: normalizeClass([
  43757. _ctx.nsInput.e("icon"),
  43758. _ctx.nsInput.e("validateIcon"),
  43759. _ctx.nsInput.is("loading", _ctx.validateState === "validating")
  43760. ])
  43761. }, {
  43762. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
  43763. _: 1
  43764. }, 8, ["class"])) : createCommentVNode("v-if", true)
  43765. ], 2)
  43766. ], 2)]),
  43767. content: withCtx(() => [createVNode(_component_el_select_menu, {
  43768. id: _ctx.contentId,
  43769. ref: "menuRef",
  43770. data: _ctx.filteredOptions,
  43771. width: _ctx.popperSize - _ctx.BORDER_HORIZONTAL_WIDTH,
  43772. "hovering-index": _ctx.states.hoveringIndex,
  43773. "scrollbar-always-on": _ctx.scrollbarAlwaysOn,
  43774. "aria-label": _ctx.ariaLabel,
  43775. onEndReached: _ctx.onEndReached
  43776. }, createSlots({
  43777. default: withCtx((scope) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))]),
  43778. _: 2
  43779. }, [
  43780. _ctx.$slots.header ? {
  43781. name: "header",
  43782. fn: withCtx(() => [createBaseVNode("div", {
  43783. class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
  43784. onClick: _cache[12] || (_cache[12] = withModifiers(() => {}, ["stop"]))
  43785. }, [renderSlot(_ctx.$slots, "header")], 2)]),
  43786. key: "0"
  43787. } : void 0,
  43788. _ctx.$slots.loading && _ctx.loading ? {
  43789. name: "loading",
  43790. fn: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading")) }, [renderSlot(_ctx.$slots, "loading")], 2)]),
  43791. key: "1"
  43792. } : _ctx.loading || _ctx.filteredOptions.length === 0 ? {
  43793. name: "empty",
  43794. fn: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)]),
  43795. key: "2"
  43796. } : void 0,
  43797. _ctx.$slots.footer ? {
  43798. name: "footer",
  43799. fn: withCtx(() => [createBaseVNode("div", {
  43800. class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
  43801. onClick: _cache[13] || (_cache[13] = withModifiers(() => {}, ["stop"]))
  43802. }, [renderSlot(_ctx.$slots, "footer")], 2)]),
  43803. key: "3"
  43804. } : void 0
  43805. ]), 1032, [
  43806. "id",
  43807. "data",
  43808. "width",
  43809. "hovering-index",
  43810. "scrollbar-always-on",
  43811. "aria-label",
  43812. "onEndReached"
  43813. ])]),
  43814. _: 3
  43815. }, 8, [
  43816. "visible",
  43817. "teleported",
  43818. "popper-class",
  43819. "popper-style",
  43820. "popper-options",
  43821. "fallback-placements",
  43822. "effect",
  43823. "placement",
  43824. "transition",
  43825. "persistent",
  43826. "append-to",
  43827. "show-arrow",
  43828. "offset",
  43829. "onBeforeShow"
  43830. ])], 34)), [[
  43831. _directive_click_outside,
  43832. _ctx.handleClickOutside,
  43833. _ctx.popperRef
  43834. ]]);
  43835. }
  43836. //#endregion
  43837. //#region node_modules/element-plus/es/components/select-v2/index.mjs
  43838. var ElSelectV2 = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default, [["render", _sfc_render$4]]));
  43839. //#endregion
  43840. //#region node_modules/element-plus/es/components/skeleton/src/skeleton.mjs
  43841. /**
  43842. * @deprecated Removed after 3.0.0, Use `SkeletonProps` instead.
  43843. */
  43844. var skeletonProps = buildProps({
  43845. /**
  43846. * @description whether showing the animation
  43847. */
  43848. animated: Boolean,
  43849. /**
  43850. * @description how many fake items to render to the DOM
  43851. */
  43852. count: {
  43853. type: Number,
  43854. default: 1
  43855. },
  43856. /**
  43857. * @description numbers of the row, only useful when no template slot were given
  43858. */
  43859. rows: {
  43860. type: Number,
  43861. default: 3
  43862. },
  43863. /**
  43864. * @description whether showing the real DOM
  43865. */
  43866. loading: {
  43867. type: Boolean,
  43868. default: true
  43869. },
  43870. /**
  43871. * @description rendering delay in milliseconds
  43872. */
  43873. throttle: { type: definePropType([Number, Object]) }
  43874. });
  43875. //#endregion
  43876. //#region node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs
  43877. /**
  43878. * @deprecated Removed after 3.0.0, Use `SkeletonItemProps` instead.
  43879. */
  43880. var skeletonItemProps = buildProps({
  43881. /**
  43882. * @description the current rendering skeleton type
  43883. */
  43884. variant: {
  43885. type: String,
  43886. values: [
  43887. "circle",
  43888. "rect",
  43889. "h1",
  43890. "h3",
  43891. "text",
  43892. "caption",
  43893. "p",
  43894. "image",
  43895. "button"
  43896. ],
  43897. default: "text"
  43898. } });
  43899. //#endregion
  43900. //#region node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs
  43901. var skeleton_item_default = /* @__PURE__ */ defineComponent({
  43902. name: "ElSkeletonItem",
  43903. __name: "skeleton-item",
  43904. props: skeletonItemProps,
  43905. setup(__props) {
  43906. const ns = useNamespace("skeleton");
  43907. return (_ctx, _cache) => {
  43908. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).e("item"), unref(ns).e(__props.variant)]) }, [__props.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true)], 2);
  43909. };
  43910. }
  43911. });
  43912. //#endregion
  43913. //#region node_modules/element-plus/es/components/skeleton/index.mjs
  43914. var ElSkeleton = withInstall(/* @__PURE__ */ defineComponent({
  43915. name: "ElSkeleton",
  43916. __name: "skeleton",
  43917. props: skeletonProps,
  43918. setup(__props, { expose: __expose }) {
  43919. const props = __props;
  43920. const ns = useNamespace("skeleton");
  43921. const uiLoading = useThrottleRender(toRef(props, "loading"), props.throttle);
  43922. __expose({
  43923. /** @description loading state */
  43924. uiLoading });
  43925. return (_ctx, _cache) => {
  43926. return unref(uiLoading) ? (openBlock(), createElementBlock("div", mergeProps({
  43927. key: 0,
  43928. class: [unref(ns).b(), unref(ns).is("animated", __props.animated)]
  43929. }, _ctx.$attrs), [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.count, (i) => {
  43930. return openBlock(), createElementBlock(Fragment, { key: i }, [unref(uiLoading) ? renderSlot(_ctx.$slots, "template", { key: i }, () => [createVNode(skeleton_item_default, {
  43931. class: normalizeClass(unref(ns).is("first")),
  43932. variant: "p"
  43933. }, null, 8, ["class"]), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (item) => {
  43934. return openBlock(), createBlock(skeleton_item_default, {
  43935. key: item,
  43936. class: normalizeClass([unref(ns).e("paragraph"), unref(ns).is("last", item === __props.rows && __props.rows > 1)]),
  43937. variant: "p"
  43938. }, null, 8, ["class"]);
  43939. }), 128))]) : createCommentVNode("v-if", true)], 64);
  43940. }), 128))], 16)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)));
  43941. };
  43942. }
  43943. }), { SkeletonItem: skeleton_item_default });
  43944. var ElSkeletonItem = withNoopInstall(skeleton_item_default);
  43945. //#endregion
  43946. //#region node_modules/element-plus/es/components/slider/src/constants.mjs
  43947. var sliderContextKey = Symbol("sliderContextKey");
  43948. //#endregion
  43949. //#region node_modules/element-plus/es/components/slider/src/slider.mjs
  43950. var sliderProps = buildProps({
  43951. /**
  43952. * @description binding value
  43953. */
  43954. modelValue: {
  43955. type: definePropType([Number, Array]),
  43956. default: 0
  43957. },
  43958. id: {
  43959. type: String,
  43960. default: void 0
  43961. },
  43962. /**
  43963. * @description minimum value
  43964. */
  43965. min: {
  43966. type: Number,
  43967. default: 0
  43968. },
  43969. /**
  43970. * @description maximum value
  43971. */
  43972. max: {
  43973. type: Number,
  43974. default: 100
  43975. },
  43976. /**
  43977. * @description step size, can be a number or `'mark'` to restrict values to marks. When set to `'mark'`, the `marks` attribute must be set
  43978. */
  43979. step: {
  43980. type: definePropType([Number, String]),
  43981. default: 1
  43982. },
  43983. /**
  43984. * @description whether to display an input box, works when `range` is false and `step` is not `'mark'`
  43985. */
  43986. showInput: Boolean,
  43987. /**
  43988. * @description whether to display control buttons when `show-input` is true
  43989. */
  43990. showInputControls: {
  43991. type: Boolean,
  43992. default: true
  43993. },
  43994. /**
  43995. * @description size of the slider wrapper, will not work in vertical mode
  43996. */
  43997. size: useSizeProp,
  43998. /**
  43999. * @description size of the input box, when set `size`, the default is the value of `size`
  44000. */
  44001. inputSize: useSizeProp,
  44002. /**
  44003. * @description whether to display breakpoints
  44004. */
  44005. showStops: Boolean,
  44006. /**
  44007. * @description whether to display tooltip value
  44008. */
  44009. showTooltip: {
  44010. type: Boolean,
  44011. default: true
  44012. },
  44013. /**
  44014. * @description format to display tooltip value
  44015. */
  44016. formatTooltip: {
  44017. type: definePropType(Function),
  44018. default: void 0
  44019. },
  44020. /**
  44021. * @description whether Slider is disabled
  44022. */
  44023. disabled: {
  44024. type: Boolean,
  44025. default: void 0
  44026. },
  44027. /**
  44028. * @description whether to select a range
  44029. */
  44030. range: Boolean,
  44031. /**
  44032. * @description vertical mode
  44033. */
  44034. vertical: Boolean,
  44035. /**
  44036. * @description slider height, required in vertical mode
  44037. */
  44038. height: String,
  44039. /**
  44040. * @description when `range` is true, screen reader label for the start of the range
  44041. */
  44042. rangeStartLabel: {
  44043. type: String,
  44044. default: void 0
  44045. },
  44046. /**
  44047. * @description when `range` is true, screen reader label for the end of the range
  44048. */
  44049. rangeEndLabel: {
  44050. type: String,
  44051. default: void 0
  44052. },
  44053. /**
  44054. * @description format to display the `aria-valuenow` attribute for screen readers
  44055. */
  44056. formatValueText: {
  44057. type: definePropType(Function),
  44058. default: void 0
  44059. },
  44060. /**
  44061. * @description custom class name for the tooltip
  44062. */
  44063. tooltipClass: {
  44064. type: String,
  44065. default: void 0
  44066. },
  44067. /**
  44068. * @description position of Tooltip
  44069. */
  44070. placement: {
  44071. type: String,
  44072. values: Ee,
  44073. default: "top"
  44074. },
  44075. /**
  44076. * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style
  44077. */
  44078. marks: { type: definePropType(Object) },
  44079. /**
  44080. * @description whether to trigger form validation
  44081. */
  44082. validateEvent: {
  44083. type: Boolean,
  44084. default: true
  44085. },
  44086. /**
  44087. * @description when slider tooltip inactive and `persistent` is `false` , popconfirm will be destroyed. `persistent` always be `false` when `show-tooltip ` is `false`
  44088. */
  44089. persistent: {
  44090. type: Boolean,
  44091. default: true
  44092. },
  44093. ...useAriaProps(["ariaLabel"])
  44094. });
  44095. var isValidValue$1 = (value) => isNumber(value) || isArray$1(value) && value.every(isNumber);
  44096. var sliderEmits = {
  44097. [UPDATE_MODEL_EVENT]: isValidValue$1,
  44098. [INPUT_EVENT]: isValidValue$1,
  44099. [CHANGE_EVENT]: isValidValue$1
  44100. };
  44101. //#endregion
  44102. //#region node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs
  44103. var useLifecycle = (props, initData, resetSize) => {
  44104. const sliderWrapper = ref();
  44105. onMounted(async () => {
  44106. if (props.range) {
  44107. if (isArray$1(props.modelValue)) {
  44108. initData.firstValue = Math.max(props.min, props.modelValue[0]);
  44109. initData.secondValue = Math.min(props.max, props.modelValue[1]);
  44110. } else {
  44111. initData.firstValue = props.min;
  44112. initData.secondValue = props.max;
  44113. }
  44114. initData.oldValue = [initData.firstValue, initData.secondValue];
  44115. } else {
  44116. if (!isNumber(props.modelValue) || Number.isNaN(props.modelValue)) initData.firstValue = props.min;
  44117. else initData.firstValue = Math.min(props.max, Math.max(props.min, props.modelValue));
  44118. initData.oldValue = initData.firstValue;
  44119. }
  44120. useEventListener(window, "resize", resetSize);
  44121. await nextTick();
  44122. resetSize();
  44123. });
  44124. return { sliderWrapper };
  44125. };
  44126. //#endregion
  44127. //#region node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs
  44128. var useMarks = (props) => {
  44129. const markList = computed(() => {
  44130. if (!props.marks) return [];
  44131. return Object.keys(props.marks).map(Number.parseFloat).sort((a, b) => a - b).filter((point) => point <= props.max && point >= props.min).map((point) => ({
  44132. point,
  44133. position: (point - props.min) * 100 / (props.max - props.min),
  44134. mark: props.marks[point]
  44135. }));
  44136. });
  44137. watchEffect(() => {
  44138. if (props.step === "mark" && !props.marks) debugWarn("ElSlider", "marks prop must be provided when step is mark");
  44139. if (props.marks) {
  44140. const keys = Object.keys(props.marks);
  44141. const validPoints = markList.value.map((m) => m.point);
  44142. const invalidKeys = keys.filter((key) => {
  44143. const parsed = Number.parseFloat(key);
  44144. return Number.isNaN(parsed) || !validPoints.includes(parsed);
  44145. });
  44146. if (invalidKeys.length > 0) debugWarn("ElSlider", `Some marks keys are invalid (not a number or out of [min, max]): [${invalidKeys.map((k) => `'${k}'`).join(", ")}] and will be ignored.`);
  44147. }
  44148. });
  44149. return markList;
  44150. };
  44151. //#endregion
  44152. //#region node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs
  44153. var useSlide = (props, initData, emit) => {
  44154. const { formItem: elFormItem } = useFormItem();
  44155. const slider = shallowRef();
  44156. const firstButton = ref();
  44157. const secondButton = ref();
  44158. const buttonRefs = {
  44159. firstButton,
  44160. secondButton
  44161. };
  44162. const sliderDisabled = useFormDisabled();
  44163. const minValue = computed(() => {
  44164. return Math.min(initData.firstValue, initData.secondValue);
  44165. });
  44166. const maxValue = computed(() => {
  44167. return Math.max(initData.firstValue, initData.secondValue);
  44168. });
  44169. const barSize = computed(() => {
  44170. return props.range ? `${100 * (maxValue.value - minValue.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`;
  44171. });
  44172. const barStart = computed(() => {
  44173. return props.range ? `${100 * (minValue.value - props.min) / (props.max - props.min)}%` : "0%";
  44174. });
  44175. const runwayStyle = computed(() => {
  44176. return props.vertical ? { height: props.height } : {};
  44177. });
  44178. const barStyle = computed(() => {
  44179. return props.vertical ? {
  44180. height: barSize.value,
  44181. bottom: barStart.value
  44182. } : {
  44183. width: barSize.value,
  44184. left: barStart.value
  44185. };
  44186. });
  44187. const resetSize = () => {
  44188. if (slider.value) initData.sliderSize = slider.value.getBoundingClientRect()[props.vertical ? "height" : "width"];
  44189. };
  44190. const getButtonRefByPercent = (percent) => {
  44191. const targetValue = props.min + percent * (props.max - props.min) / 100;
  44192. if (!props.range) return firstButton;
  44193. let buttonRefName;
  44194. if (Math.abs(minValue.value - targetValue) < Math.abs(maxValue.value - targetValue)) buttonRefName = initData.firstValue < initData.secondValue ? "firstButton" : "secondButton";
  44195. else buttonRefName = initData.firstValue > initData.secondValue ? "firstButton" : "secondButton";
  44196. return buttonRefs[buttonRefName];
  44197. };
  44198. const setPosition = (percent) => {
  44199. const buttonRef = getButtonRefByPercent(percent);
  44200. buttonRef.value.setPosition(percent);
  44201. return buttonRef;
  44202. };
  44203. const setFirstValue = (firstValue) => {
  44204. initData.firstValue = firstValue ?? props.min;
  44205. _emit(props.range ? [minValue.value, maxValue.value] : firstValue ?? props.min);
  44206. };
  44207. const setSecondValue = (secondValue) => {
  44208. initData.secondValue = secondValue;
  44209. if (props.range) _emit([minValue.value, maxValue.value]);
  44210. };
  44211. const _emit = (val) => {
  44212. emit(UPDATE_MODEL_EVENT, val);
  44213. emit(INPUT_EVENT, val);
  44214. };
  44215. const emitChange = async () => {
  44216. await nextTick();
  44217. emit(CHANGE_EVENT, props.range ? [minValue.value, maxValue.value] : props.modelValue);
  44218. };
  44219. const handleSliderPointerEvent = (event) => {
  44220. if (sliderDisabled.value || initData.dragging) return;
  44221. resetSize();
  44222. let newPercent = 0;
  44223. if (props.vertical) {
  44224. const clientY = event.touches?.item(0)?.clientY ?? event.clientY;
  44225. newPercent = (slider.value.getBoundingClientRect().bottom - clientY) / initData.sliderSize * 100;
  44226. } else newPercent = ((event.touches?.item(0)?.clientX ?? event.clientX) - slider.value.getBoundingClientRect().left) / initData.sliderSize * 100;
  44227. if (newPercent < 0 || newPercent > 100) return;
  44228. return setPosition(newPercent);
  44229. };
  44230. const onSliderWrapperPrevent = (event) => {
  44231. if (buttonRefs["firstButton"].value?.dragging || buttonRefs["secondButton"].value?.dragging) event.preventDefault();
  44232. };
  44233. const onSliderDown = async (event) => {
  44234. const buttonRef = handleSliderPointerEvent(event);
  44235. if (buttonRef) {
  44236. await nextTick();
  44237. buttonRef.value.onButtonDown(event);
  44238. }
  44239. };
  44240. const onSliderClick = (event) => {
  44241. if (handleSliderPointerEvent(event)) emitChange();
  44242. };
  44243. const onSliderMarkerDown = (position) => {
  44244. if (sliderDisabled.value || initData.dragging) return;
  44245. if (setPosition(position)) emitChange();
  44246. };
  44247. return {
  44248. elFormItem,
  44249. slider,
  44250. firstButton,
  44251. secondButton,
  44252. sliderDisabled,
  44253. minValue,
  44254. maxValue,
  44255. runwayStyle,
  44256. barStyle,
  44257. resetSize,
  44258. setPosition,
  44259. emitChange,
  44260. onSliderWrapperPrevent,
  44261. onSliderClick,
  44262. onSliderDown,
  44263. onSliderMarkerDown,
  44264. setFirstValue,
  44265. setSecondValue
  44266. };
  44267. };
  44268. //#endregion
  44269. //#region node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs
  44270. var useStops = (props, initData, minValue, maxValue) => {
  44271. const stops = computed(() => {
  44272. if (!props.showStops || props.min > props.max) return [];
  44273. if (props.step === "mark" || props.step === 0) {
  44274. if (props.step === 0) debugWarn("ElSlider", "step should not be 0.");
  44275. return [];
  44276. }
  44277. const stopCount = Math.ceil((props.max - props.min) / props.step);
  44278. const stepWidth = 100 * props.step / (props.max - props.min);
  44279. const result = Array.from({ length: stopCount - 1 }).map((_, index) => (index + 1) * stepWidth);
  44280. if (props.range) return result.filter((step) => {
  44281. return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min);
  44282. });
  44283. else return result.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min));
  44284. });
  44285. const getStopStyle = (position) => {
  44286. return props.vertical ? { bottom: `${position}%` } : { left: `${position}%` };
  44287. };
  44288. return {
  44289. stops,
  44290. getStopStyle
  44291. };
  44292. };
  44293. //#endregion
  44294. //#region node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs
  44295. var useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => {
  44296. const _emit = (val) => {
  44297. emit(UPDATE_MODEL_EVENT, val);
  44298. emit(INPUT_EVENT, val);
  44299. };
  44300. const valueChanged = () => {
  44301. if (props.range) return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]);
  44302. else return props.modelValue !== initData.oldValue;
  44303. };
  44304. const setValues = () => {
  44305. if (props.min > props.max) throwError("Slider", "min should not be greater than max.");
  44306. const val = props.modelValue;
  44307. if (props.range && isArray$1(val)) if (val[1] < props.min) _emit([props.min, props.min]);
  44308. else if (val[0] > props.max) _emit([props.max, props.max]);
  44309. else if (val[0] < props.min) _emit([props.min, val[1]]);
  44310. else if (val[1] > props.max) _emit([val[0], props.max]);
  44311. else {
  44312. initData.firstValue = val[0];
  44313. initData.secondValue = val[1];
  44314. if (valueChanged()) {
  44315. if (props.validateEvent) elFormItem?.validate?.("change").catch(NOOP);
  44316. initData.oldValue = val.slice();
  44317. }
  44318. }
  44319. else if (!props.range && isNumber(val) && !Number.isNaN(val)) if (val < props.min) _emit(props.min);
  44320. else if (val > props.max) _emit(props.max);
  44321. else {
  44322. initData.firstValue = val;
  44323. if (valueChanged()) {
  44324. if (props.validateEvent) elFormItem?.validate?.("change").catch(NOOP);
  44325. initData.oldValue = val;
  44326. }
  44327. }
  44328. };
  44329. setValues();
  44330. watch(() => initData.dragging, (val) => {
  44331. if (!val) setValues();
  44332. });
  44333. watch(() => props.modelValue, (val, oldVal) => {
  44334. if (initData.dragging || isArray$1(val) && isArray$1(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) return;
  44335. setValues();
  44336. }, { deep: true });
  44337. watch(() => [props.min, props.max], () => {
  44338. setValues();
  44339. });
  44340. };
  44341. //#endregion
  44342. //#region node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs
  44343. var useTooltip = (props, formatTooltip, showTooltip) => {
  44344. const tooltip = ref();
  44345. const tooltipVisible = ref(false);
  44346. const enableFormat = computed(() => {
  44347. return formatTooltip.value instanceof Function;
  44348. });
  44349. return {
  44350. tooltip,
  44351. tooltipVisible,
  44352. formatValue: computed(() => {
  44353. return enableFormat.value && formatTooltip.value(props.modelValue) || props.modelValue;
  44354. }),
  44355. displayTooltip: debounce(() => {
  44356. showTooltip.value && (tooltipVisible.value = true);
  44357. }, 50),
  44358. hideTooltip: debounce(() => {
  44359. showTooltip.value && (tooltipVisible.value = false);
  44360. }, 50)
  44361. };
  44362. };
  44363. var useSliderButton = (props, initData, emit) => {
  44364. const { disabled, min, max, step, showTooltip, persistent, precision, sliderSize, formatTooltip, emitChange, resetSize, updateDragging, markList } = inject(sliderContextKey);
  44365. const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props, formatTooltip, showTooltip);
  44366. const button = ref();
  44367. const currentPosition = computed(() => {
  44368. return `${(props.modelValue - min.value) / (max.value - min.value) * 100}%`;
  44369. });
  44370. const wrapperStyle = computed(() => {
  44371. return props.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value };
  44372. });
  44373. const shouldMoveToMark = computed(() => {
  44374. return step.value === "mark" && markList.value.length > 0;
  44375. });
  44376. const handleMouseEnter = () => {
  44377. initData.hovering = true;
  44378. displayTooltip();
  44379. };
  44380. const handleMouseLeave = () => {
  44381. initData.hovering = false;
  44382. if (!initData.dragging) hideTooltip();
  44383. };
  44384. const onButtonDown = (event) => {
  44385. if (disabled.value) return;
  44386. event.preventDefault();
  44387. onDragStart(event);
  44388. window.addEventListener("mousemove", onDragging);
  44389. window.addEventListener("touchmove", onDragging);
  44390. window.addEventListener("mouseup", onDragEnd);
  44391. window.addEventListener("touchend", onDragEnd);
  44392. window.addEventListener("contextmenu", onDragEnd);
  44393. button.value.focus();
  44394. };
  44395. const incrementPosition = (amount) => {
  44396. if (disabled.value) return;
  44397. initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max.value - min.value) * 100;
  44398. setPosition(initData.newPosition);
  44399. emitChange();
  44400. };
  44401. const moveToMark = (amount) => {
  44402. if (disabled.value || !markList.value.length) return;
  44403. const current = props.modelValue;
  44404. const epsilon = Number.EPSILON;
  44405. const stride = Math.abs(amount);
  44406. let target;
  44407. if (amount > 0) {
  44408. const startIndex = markList.value.findIndex((m) => m.point > current + epsilon);
  44409. if (startIndex !== -1) {
  44410. const targetIndex = Math.min(startIndex + stride - 1, markList.value.length - 1);
  44411. target = markList.value[targetIndex].point;
  44412. }
  44413. } else {
  44414. let startIndex = -1;
  44415. for (let i = markList.value.length - 1; i >= 0; i--) if (markList.value[i].point < current - epsilon) {
  44416. startIndex = i;
  44417. break;
  44418. }
  44419. if (startIndex !== -1) {
  44420. const targetIndex = Math.max(startIndex - (stride - 1), 0);
  44421. target = markList.value[targetIndex].point;
  44422. }
  44423. }
  44424. if (target !== void 0 && target !== current) {
  44425. setPosition((target - min.value) / (max.value - min.value) * 100);
  44426. emitChange();
  44427. }
  44428. };
  44429. const onLeftKeyDown = () => {
  44430. if (shouldMoveToMark.value) moveToMark(-1);
  44431. else if (isNumber(step.value)) incrementPosition(-step.value);
  44432. };
  44433. const onRightKeyDown = () => {
  44434. if (shouldMoveToMark.value) moveToMark(1);
  44435. else if (isNumber(step.value)) incrementPosition(step.value);
  44436. };
  44437. const onPageDownKeyDown = () => {
  44438. if (shouldMoveToMark.value) moveToMark(-4);
  44439. else if (isNumber(step.value)) incrementPosition(-step.value * 4);
  44440. };
  44441. const onPageUpKeyDown = () => {
  44442. if (shouldMoveToMark.value) moveToMark(4);
  44443. else if (isNumber(step.value)) incrementPosition(step.value * 4);
  44444. };
  44445. const onHomeKeyDown = () => {
  44446. if (disabled.value) return;
  44447. setPosition(0);
  44448. emitChange();
  44449. };
  44450. const onEndKeyDown = () => {
  44451. if (disabled.value) return;
  44452. setPosition(100);
  44453. emitChange();
  44454. };
  44455. const onKeyDown = (event) => {
  44456. const code = getEventCode(event);
  44457. let isPreventDefault = true;
  44458. switch (code) {
  44459. case EVENT_CODE.left:
  44460. case EVENT_CODE.down:
  44461. onLeftKeyDown();
  44462. break;
  44463. case EVENT_CODE.right:
  44464. case EVENT_CODE.up:
  44465. onRightKeyDown();
  44466. break;
  44467. case EVENT_CODE.home:
  44468. onHomeKeyDown();
  44469. break;
  44470. case EVENT_CODE.end:
  44471. onEndKeyDown();
  44472. break;
  44473. case EVENT_CODE.pageDown:
  44474. onPageDownKeyDown();
  44475. break;
  44476. case EVENT_CODE.pageUp:
  44477. onPageUpKeyDown();
  44478. break;
  44479. default:
  44480. isPreventDefault = false;
  44481. break;
  44482. }
  44483. isPreventDefault && event.preventDefault();
  44484. };
  44485. const getClientXY = (event) => {
  44486. let clientX;
  44487. let clientY;
  44488. if (event.type.startsWith("touch")) {
  44489. clientY = event.touches[0].clientY;
  44490. clientX = event.touches[0].clientX;
  44491. } else {
  44492. clientY = event.clientY;
  44493. clientX = event.clientX;
  44494. }
  44495. return {
  44496. clientX,
  44497. clientY
  44498. };
  44499. };
  44500. const onDragStart = (event) => {
  44501. initData.dragging = true;
  44502. initData.isClick = true;
  44503. const { clientX, clientY } = getClientXY(event);
  44504. if (props.vertical) initData.startY = clientY;
  44505. else initData.startX = clientX;
  44506. initData.startPosition = Number.parseFloat(currentPosition.value);
  44507. initData.newPosition = initData.startPosition;
  44508. };
  44509. const onDragging = (event) => {
  44510. if (initData.dragging) {
  44511. initData.isClick = false;
  44512. displayTooltip();
  44513. resetSize();
  44514. let diff;
  44515. const { clientX, clientY } = getClientXY(event);
  44516. if (props.vertical) {
  44517. initData.currentY = clientY;
  44518. diff = (initData.startY - initData.currentY) / sliderSize.value * 100;
  44519. } else {
  44520. initData.currentX = clientX;
  44521. diff = (initData.currentX - initData.startX) / sliderSize.value * 100;
  44522. }
  44523. initData.newPosition = initData.startPosition + diff;
  44524. setPosition(initData.newPosition);
  44525. }
  44526. };
  44527. const onDragEnd = () => {
  44528. if (initData.dragging) {
  44529. setTimeout(() => {
  44530. initData.dragging = false;
  44531. if (!initData.hovering) hideTooltip();
  44532. if (!initData.isClick) setPosition(initData.newPosition);
  44533. emitChange();
  44534. }, 0);
  44535. window.removeEventListener("mousemove", onDragging);
  44536. window.removeEventListener("touchmove", onDragging);
  44537. window.removeEventListener("mouseup", onDragEnd);
  44538. window.removeEventListener("touchend", onDragEnd);
  44539. window.removeEventListener("contextmenu", onDragEnd);
  44540. }
  44541. };
  44542. const setPosition = async (newPosition) => {
  44543. if (newPosition === null || Number.isNaN(+newPosition)) return;
  44544. newPosition = clamp$2(newPosition, 0, 100);
  44545. let value;
  44546. if (step.value === "mark") if (markList.value.length === 0) value = newPosition <= 50 ? min.value : max.value;
  44547. else value = markList.value.reduce((prev, curr) => {
  44548. return Math.abs(curr.position - newPosition) < Math.abs(prev.position - newPosition) ? curr : prev;
  44549. }).point;
  44550. else {
  44551. const fullSteps = Math.floor((max.value - min.value) / step.value);
  44552. const fullRangePercentage = fullSteps * step.value / (max.value - min.value) * 100;
  44553. const threshold = fullRangePercentage + (100 - fullRangePercentage) / 2;
  44554. if (newPosition < fullRangePercentage) {
  44555. const valueBetween = fullRangePercentage / fullSteps;
  44556. const steps = Math.round(newPosition / valueBetween);
  44557. value = min.value + steps * step.value;
  44558. } else if (newPosition < threshold) value = min.value + fullSteps * step.value;
  44559. else value = max.value;
  44560. value = Number.parseFloat(value.toFixed(precision.value));
  44561. }
  44562. if (value !== props.modelValue) emit(UPDATE_MODEL_EVENT, value);
  44563. if (!initData.dragging && props.modelValue !== initData.oldValue) initData.oldValue = props.modelValue;
  44564. await nextTick();
  44565. initData.dragging && displayTooltip();
  44566. tooltip.value.updatePopper();
  44567. };
  44568. watch(() => initData.dragging, (val) => {
  44569. updateDragging(val);
  44570. });
  44571. useEventListener(button, "touchstart", onButtonDown, { passive: false });
  44572. return {
  44573. disabled,
  44574. button,
  44575. tooltip,
  44576. tooltipVisible,
  44577. showTooltip,
  44578. persistent,
  44579. wrapperStyle,
  44580. formatValue,
  44581. handleMouseEnter,
  44582. handleMouseLeave,
  44583. onButtonDown,
  44584. onKeyDown,
  44585. setPosition
  44586. };
  44587. };
  44588. //#endregion
  44589. //#region node_modules/element-plus/es/components/slider/src/button.mjs
  44590. var sliderButtonProps = buildProps({
  44591. modelValue: {
  44592. type: Number,
  44593. default: 0
  44594. },
  44595. vertical: Boolean,
  44596. tooltipClass: String,
  44597. placement: {
  44598. type: String,
  44599. values: Ee,
  44600. default: "top"
  44601. }
  44602. });
  44603. var sliderButtonEmits = { [UPDATE_MODEL_EVENT]: (value) => isNumber(value) };
  44604. //#endregion
  44605. //#region node_modules/element-plus/es/components/slider/src/button.vue_vue_type_script_setup_true_lang.mjs
  44606. var _hoisted_1$20 = ["tabindex"];
  44607. //#endregion
  44608. //#region node_modules/element-plus/es/components/slider/src/button2.mjs
  44609. var button_default = /* @__PURE__ */ defineComponent({
  44610. name: "ElSliderButton",
  44611. __name: "button",
  44612. props: sliderButtonProps,
  44613. emits: sliderButtonEmits,
  44614. setup(__props, { expose: __expose, emit: __emit }) {
  44615. const props = __props;
  44616. const emit = __emit;
  44617. const ns = useNamespace("slider");
  44618. const initData = reactive({
  44619. hovering: false,
  44620. dragging: false,
  44621. isClick: false,
  44622. startX: 0,
  44623. currentX: 0,
  44624. startY: 0,
  44625. currentY: 0,
  44626. startPosition: 0,
  44627. newPosition: 0,
  44628. oldValue: props.modelValue
  44629. });
  44630. const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
  44631. const { disabled, button, tooltip, showTooltip, persistent, tooltipVisible, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition } = useSliderButton(props, initData, emit);
  44632. const { hovering, dragging } = toRefs(initData);
  44633. __expose({
  44634. onButtonDown,
  44635. onKeyDown,
  44636. setPosition,
  44637. hovering,
  44638. dragging
  44639. });
  44640. return (_ctx, _cache) => {
  44641. return openBlock(), createElementBlock("div", {
  44642. ref_key: "button",
  44643. ref: button,
  44644. class: normalizeClass([unref(ns).e("button-wrapper"), {
  44645. hover: unref(hovering),
  44646. dragging: unref(dragging)
  44647. }]),
  44648. style: normalizeStyle(unref(wrapperStyle)),
  44649. tabindex: unref(disabled) ? void 0 : 0,
  44650. onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  44651. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
  44652. onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
  44653. onFocus: _cache[3] || (_cache[3] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  44654. onBlur: _cache[4] || (_cache[4] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
  44655. onKeydown: _cache[5] || (_cache[5] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args))
  44656. }, [createVNode(unref(ElTooltip), {
  44657. ref_key: "tooltip",
  44658. ref: tooltip,
  44659. visible: unref(tooltipVisible),
  44660. placement: _ctx.placement,
  44661. "fallback-placements": [
  44662. "top",
  44663. "bottom",
  44664. "right",
  44665. "left"
  44666. ],
  44667. "stop-popper-mouse-event": false,
  44668. "popper-class": _ctx.tooltipClass,
  44669. disabled: !unref(showTooltip),
  44670. persistent: tooltipPersistent.value
  44671. }, {
  44672. content: withCtx(() => [createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1)]),
  44673. default: withCtx(() => [createBaseVNode("div", { class: normalizeClass([unref(ns).e("button"), {
  44674. hover: unref(hovering),
  44675. dragging: unref(dragging)
  44676. }]) }, null, 2)]),
  44677. _: 1
  44678. }, 8, [
  44679. "visible",
  44680. "placement",
  44681. "popper-class",
  44682. "disabled",
  44683. "persistent"
  44684. ])], 46, _hoisted_1$20);
  44685. };
  44686. }
  44687. });
  44688. var marker_default = defineComponent({
  44689. name: "ElSliderMarker",
  44690. props: buildProps({ mark: {
  44691. type: definePropType([String, Object]),
  44692. default: void 0
  44693. } }),
  44694. setup(props) {
  44695. const ns = useNamespace("slider");
  44696. const label = computed(() => {
  44697. return isString(props.mark) ? props.mark : props.mark.label;
  44698. });
  44699. const style = computed(() => isString(props.mark) ? void 0 : props.mark.style);
  44700. return () => h$1("div", {
  44701. class: ns.e("marks-text"),
  44702. style: style.value
  44703. }, label.value);
  44704. }
  44705. });
  44706. //#endregion
  44707. //#region node_modules/element-plus/es/components/slider/src/slider.vue_vue_type_script_setup_true_lang.mjs
  44708. var _hoisted_1$19 = [
  44709. "id",
  44710. "role",
  44711. "aria-label",
  44712. "aria-labelledby"
  44713. ];
  44714. var _hoisted_2$12 = { key: 1 };
  44715. //#endregion
  44716. //#region node_modules/element-plus/es/components/slider/index.mjs
  44717. var ElSlider = withInstall(/* @__PURE__ */ defineComponent({
  44718. name: "ElSlider",
  44719. __name: "slider",
  44720. props: sliderProps,
  44721. emits: sliderEmits,
  44722. setup(__props, { expose: __expose, emit: __emit }) {
  44723. const props = __props;
  44724. const emit = __emit;
  44725. const ns = useNamespace("slider");
  44726. const { t } = useLocale();
  44727. const initData = reactive({
  44728. firstValue: 0,
  44729. secondValue: 0,
  44730. oldValue: 0,
  44731. dragging: false,
  44732. sliderSize: 1
  44733. });
  44734. const { elFormItem, slider, firstButton, secondButton, sliderDisabled, minValue, maxValue, runwayStyle, barStyle, resetSize, emitChange, onSliderWrapperPrevent, onSliderClick, onSliderDown, onSliderMarkerDown, setFirstValue, setSecondValue } = useSlide(props, initData, emit);
  44735. const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue);
  44736. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: elFormItem });
  44737. const sliderWrapperSize = useFormSize();
  44738. const sliderInputSize = computed(() => props.inputSize || sliderWrapperSize.value);
  44739. const renderInput = computed(() => {
  44740. return props.showInput && !props.range && props.step !== "mark";
  44741. });
  44742. const groupLabel = computed(() => {
  44743. return props.ariaLabel || t("el.slider.defaultLabel", {
  44744. min: props.min,
  44745. max: props.max
  44746. });
  44747. });
  44748. const firstButtonLabel = computed(() => {
  44749. if (props.range) return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel");
  44750. else return groupLabel.value;
  44751. });
  44752. const firstValueText = computed(() => {
  44753. return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`;
  44754. });
  44755. const secondButtonLabel = computed(() => {
  44756. return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel");
  44757. });
  44758. const secondValueText = computed(() => {
  44759. return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`;
  44760. });
  44761. const sliderKls = computed(() => [
  44762. ns.b(),
  44763. ns.m(sliderWrapperSize.value),
  44764. ns.is("vertical", props.vertical),
  44765. { [ns.m("with-input")]: renderInput.value }
  44766. ]);
  44767. const markList = useMarks(props);
  44768. useWatch(props, initData, minValue, maxValue, emit, elFormItem);
  44769. const sliderInputStep = computed(() => {
  44770. return isNumber(props.step) ? props.step : 1;
  44771. });
  44772. const precision = computed(() => {
  44773. const stepValue = isNumber(props.step) ? props.step : 1;
  44774. const precisions = [
  44775. props.min,
  44776. props.max,
  44777. stepValue
  44778. ].map((item) => {
  44779. const decimal = `${item}`.split(".")[1];
  44780. return decimal ? decimal.length : 0;
  44781. });
  44782. return Math.max.apply(null, precisions);
  44783. });
  44784. const { sliderWrapper } = useLifecycle(props, initData, resetSize);
  44785. const { firstValue, secondValue, sliderSize } = toRefs(initData);
  44786. const updateDragging = (val) => {
  44787. initData.dragging = val;
  44788. };
  44789. useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, { passive: false });
  44790. useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, { passive: false });
  44791. provide(sliderContextKey, {
  44792. ...toRefs(props),
  44793. sliderSize,
  44794. disabled: sliderDisabled,
  44795. precision,
  44796. markList,
  44797. emitChange,
  44798. resetSize,
  44799. updateDragging
  44800. });
  44801. __expose({ onSliderClick });
  44802. return (_ctx, _cache) => {
  44803. return openBlock(), createElementBlock("div", {
  44804. id: _ctx.range ? unref(inputId) : void 0,
  44805. ref_key: "sliderWrapper",
  44806. ref: sliderWrapper,
  44807. class: normalizeClass(sliderKls.value),
  44808. role: _ctx.range ? "group" : void 0,
  44809. "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? groupLabel.value : void 0,
  44810. "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? unref(elFormItem)?.labelId : void 0
  44811. }, [createBaseVNode("div", {
  44812. ref_key: "slider",
  44813. ref: slider,
  44814. class: normalizeClass([
  44815. unref(ns).e("runway"),
  44816. { "show-input": renderInput.value },
  44817. unref(ns).is("disabled", unref(sliderDisabled))
  44818. ]),
  44819. style: normalizeStyle(unref(runwayStyle)),
  44820. onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)),
  44821. onTouchstartPassive: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args))
  44822. }, [
  44823. createBaseVNode("div", {
  44824. class: normalizeClass(unref(ns).e("bar")),
  44825. style: normalizeStyle(unref(barStyle))
  44826. }, null, 6),
  44827. createVNode(button_default, {
  44828. id: !_ctx.range ? unref(inputId) : void 0,
  44829. ref_key: "firstButton",
  44830. ref: firstButton,
  44831. "model-value": unref(firstValue),
  44832. vertical: _ctx.vertical,
  44833. "tooltip-class": _ctx.tooltipClass,
  44834. placement: _ctx.placement,
  44835. role: "slider",
  44836. "aria-label": _ctx.range || !unref(isLabeledByFormItem) ? firstButtonLabel.value : void 0,
  44837. "aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? unref(elFormItem)?.labelId : void 0,
  44838. "aria-valuemin": _ctx.min,
  44839. "aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max,
  44840. "aria-valuenow": unref(firstValue),
  44841. "aria-valuetext": firstValueText.value,
  44842. "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
  44843. "aria-disabled": unref(sliderDisabled),
  44844. "onUpdate:modelValue": unref(setFirstValue)
  44845. }, null, 8, [
  44846. "id",
  44847. "model-value",
  44848. "vertical",
  44849. "tooltip-class",
  44850. "placement",
  44851. "aria-label",
  44852. "aria-labelledby",
  44853. "aria-valuemin",
  44854. "aria-valuemax",
  44855. "aria-valuenow",
  44856. "aria-valuetext",
  44857. "aria-orientation",
  44858. "aria-disabled",
  44859. "onUpdate:modelValue"
  44860. ]),
  44861. _ctx.range ? (openBlock(), createBlock(button_default, {
  44862. key: 0,
  44863. ref_key: "secondButton",
  44864. ref: secondButton,
  44865. "model-value": unref(secondValue),
  44866. vertical: _ctx.vertical,
  44867. "tooltip-class": _ctx.tooltipClass,
  44868. placement: _ctx.placement,
  44869. role: "slider",
  44870. "aria-label": secondButtonLabel.value,
  44871. "aria-valuemin": unref(firstValue),
  44872. "aria-valuemax": _ctx.max,
  44873. "aria-valuenow": unref(secondValue),
  44874. "aria-valuetext": secondValueText.value,
  44875. "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
  44876. "aria-disabled": unref(sliderDisabled),
  44877. "onUpdate:modelValue": unref(setSecondValue)
  44878. }, null, 8, [
  44879. "model-value",
  44880. "vertical",
  44881. "tooltip-class",
  44882. "placement",
  44883. "aria-label",
  44884. "aria-valuemin",
  44885. "aria-valuemax",
  44886. "aria-valuenow",
  44887. "aria-valuetext",
  44888. "aria-orientation",
  44889. "aria-disabled",
  44890. "onUpdate:modelValue"
  44891. ])) : createCommentVNode("v-if", true),
  44892. _ctx.showStops ? (openBlock(), createElementBlock("div", _hoisted_2$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => {
  44893. return openBlock(), createElementBlock("div", {
  44894. key,
  44895. class: normalizeClass(unref(ns).e("stop")),
  44896. style: normalizeStyle(unref(getStopStyle)(item))
  44897. }, null, 6);
  44898. }), 128))])) : createCommentVNode("v-if", true),
  44899. unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createBaseVNode("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
  44900. return openBlock(), createElementBlock("div", {
  44901. key,
  44902. style: normalizeStyle(unref(getStopStyle)(item.position)),
  44903. class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")])
  44904. }, null, 6);
  44905. }), 128))]), createBaseVNode("div", { class: normalizeClass(unref(ns).e("marks")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
  44906. return openBlock(), createBlock(unref(marker_default), {
  44907. key,
  44908. mark: item.mark,
  44909. style: normalizeStyle(unref(getStopStyle)(item.position)),
  44910. onMousedown: withModifiers(($event) => unref(onSliderMarkerDown)(item.position), ["stop"])
  44911. }, null, 8, [
  44912. "mark",
  44913. "style",
  44914. "onMousedown"
  44915. ]);
  44916. }), 128))], 2)], 64)) : createCommentVNode("v-if", true)
  44917. ], 38), renderInput.value ? (openBlock(), createBlock(unref(ElInputNumber), {
  44918. key: 0,
  44919. ref: "input",
  44920. "model-value": unref(firstValue),
  44921. class: normalizeClass(unref(ns).e("input")),
  44922. step: sliderInputStep.value,
  44923. disabled: unref(sliderDisabled),
  44924. controls: _ctx.showInputControls,
  44925. min: _ctx.min,
  44926. max: _ctx.max,
  44927. precision: precision.value,
  44928. size: sliderInputSize.value,
  44929. "onUpdate:modelValue": unref(setFirstValue),
  44930. onChange: unref(emitChange)
  44931. }, null, 8, [
  44932. "model-value",
  44933. "class",
  44934. "step",
  44935. "disabled",
  44936. "controls",
  44937. "min",
  44938. "max",
  44939. "precision",
  44940. "size",
  44941. "onUpdate:modelValue",
  44942. "onChange"
  44943. ])) : createCommentVNode("v-if", true)], 10, _hoisted_1$19);
  44944. };
  44945. }
  44946. }));
  44947. //#endregion
  44948. //#region node_modules/element-plus/es/components/space/src/item.mjs
  44949. var spaceItemProps = buildProps({ prefixCls: { type: String } });
  44950. var SpaceItem = defineComponent({
  44951. name: "ElSpaceItem",
  44952. props: spaceItemProps,
  44953. setup(props, { slots }) {
  44954. const ns = useNamespace("space");
  44955. const classes = computed(() => `${props.prefixCls || ns.b()}__item`);
  44956. return () => h$1("div", { class: classes.value }, renderSlot(slots, "default"));
  44957. }
  44958. });
  44959. //#endregion
  44960. //#region node_modules/element-plus/es/components/space/src/use-space.mjs
  44961. var SIZE_MAP = {
  44962. small: 8,
  44963. default: 12,
  44964. large: 16
  44965. };
  44966. function useSpace(props) {
  44967. const ns = useNamespace("space");
  44968. const classes = computed(() => [
  44969. ns.b(),
  44970. ns.m(props.direction),
  44971. props.class
  44972. ]);
  44973. const horizontalSize = ref(0);
  44974. const verticalSize = ref(0);
  44975. const containerStyle = computed(() => {
  44976. return [
  44977. props.wrap || props.fill ? { flexWrap: "wrap" } : {},
  44978. { alignItems: props.alignment },
  44979. {
  44980. rowGap: `${verticalSize.value}px`,
  44981. columnGap: `${horizontalSize.value}px`
  44982. },
  44983. props.style
  44984. ];
  44985. });
  44986. const itemStyle = computed(() => {
  44987. return props.fill ? {
  44988. flexGrow: 1,
  44989. minWidth: `${props.fillRatio}%`
  44990. } : {};
  44991. });
  44992. watchEffect(() => {
  44993. const { size = "small", wrap, direction: dir, fill } = props;
  44994. if (isArray$1(size)) {
  44995. const [h = 0, v = 0] = size;
  44996. horizontalSize.value = h;
  44997. verticalSize.value = v;
  44998. } else {
  44999. let val;
  45000. if (isNumber(size)) val = size;
  45001. else val = SIZE_MAP[size || "small"] || SIZE_MAP.small;
  45002. if ((wrap || fill) && dir === "horizontal") horizontalSize.value = verticalSize.value = val;
  45003. else if (dir === "horizontal") {
  45004. horizontalSize.value = val;
  45005. verticalSize.value = 0;
  45006. } else {
  45007. verticalSize.value = val;
  45008. horizontalSize.value = 0;
  45009. }
  45010. }
  45011. });
  45012. return {
  45013. classes,
  45014. containerStyle,
  45015. itemStyle
  45016. };
  45017. }
  45018. //#endregion
  45019. //#region node_modules/element-plus/es/components/space/src/space.mjs
  45020. var spaceProps = buildProps({
  45021. /**
  45022. * @description Placement direction
  45023. */
  45024. direction: {
  45025. type: String,
  45026. values: ["horizontal", "vertical"],
  45027. default: "horizontal"
  45028. },
  45029. /**
  45030. * @description Classname
  45031. */
  45032. class: {
  45033. type: definePropType([
  45034. String,
  45035. Object,
  45036. Array
  45037. ]),
  45038. default: ""
  45039. },
  45040. /**
  45041. * @description Extra style rules
  45042. */
  45043. style: {
  45044. type: definePropType([
  45045. String,
  45046. Array,
  45047. Object,
  45048. Boolean
  45049. ]),
  45050. default: ""
  45051. },
  45052. /**
  45053. * @description Controls the alignment of items
  45054. */
  45055. alignment: {
  45056. type: definePropType(String),
  45057. default: "center"
  45058. },
  45059. /**
  45060. * @description Prefix for space-items
  45061. */
  45062. prefixCls: { type: String },
  45063. /**
  45064. * @description Spacer
  45065. */
  45066. spacer: {
  45067. type: definePropType([
  45068. Object,
  45069. String,
  45070. Number,
  45071. Array
  45072. ]),
  45073. default: null,
  45074. validator: (val) => isVNode(val) || isNumber(val) || isString(val)
  45075. },
  45076. /**
  45077. * @description Auto wrapping
  45078. */
  45079. wrap: Boolean,
  45080. /**
  45081. * @description Whether to fill the container
  45082. */
  45083. fill: Boolean,
  45084. /**
  45085. * @description Ratio of fill
  45086. */
  45087. fillRatio: {
  45088. type: Number,
  45089. default: 100
  45090. },
  45091. /**
  45092. * @description Spacing size
  45093. */
  45094. size: {
  45095. type: [
  45096. String,
  45097. Array,
  45098. Number
  45099. ],
  45100. values: componentSizes,
  45101. validator: (val) => {
  45102. return isNumber(val) || isArray$1(val) && val.length === 2 && val.every(isNumber);
  45103. }
  45104. }
  45105. });
  45106. //#endregion
  45107. //#region node_modules/element-plus/es/components/space/index.mjs
  45108. var ElSpace = withInstall(defineComponent({
  45109. name: "ElSpace",
  45110. props: spaceProps,
  45111. setup(props, { slots }) {
  45112. const { classes, containerStyle, itemStyle } = useSpace(props);
  45113. function extractChildren(children, parentKey = "", extractedChildren = []) {
  45114. const { prefixCls } = props;
  45115. children.forEach((child, loopKey) => {
  45116. if (isFragment(child)) {
  45117. if (isArray$1(child.children)) child.children.forEach((nested, key) => {
  45118. if (isFragment(nested) && isArray$1(nested.children)) extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
  45119. else if (isVNode(nested) && nested?.type === Comment) extractedChildren.push(nested);
  45120. else extractedChildren.push(createVNode(SpaceItem, {
  45121. style: itemStyle.value,
  45122. prefixCls,
  45123. key: `nested-${parentKey + key}`
  45124. }, { default: () => [nested] }, 12, ["style", "prefixCls"]));
  45125. });
  45126. } else if (isValidElementNode(child)) extractedChildren.push(createVNode(SpaceItem, {
  45127. style: itemStyle.value,
  45128. prefixCls,
  45129. key: `LoopKey${parentKey + loopKey}`
  45130. }, { default: () => [child] }, 12, ["style", "prefixCls"]));
  45131. });
  45132. return extractedChildren;
  45133. }
  45134. return () => {
  45135. const { spacer, direction } = props;
  45136. const children = renderSlot(slots, "default", { key: 0 }, () => []);
  45137. if ((children.children ?? []).length === 0) return null;
  45138. if (isArray$1(children.children)) {
  45139. let extractedChildren = extractChildren(children.children);
  45140. if (spacer) {
  45141. const len = extractedChildren.length - 1;
  45142. extractedChildren = extractedChildren.reduce((acc, child, idx) => {
  45143. const children = [...acc, child];
  45144. if (idx !== len) children.push(createVNode("span", {
  45145. style: [itemStyle.value, direction === "vertical" ? "width: 100%" : null],
  45146. key: idx
  45147. }, [isVNode(spacer) ? spacer : createTextVNode(spacer, 1)], 4));
  45148. return children;
  45149. }, []);
  45150. }
  45151. return createVNode("div", {
  45152. class: classes.value,
  45153. style: containerStyle.value
  45154. }, extractedChildren, 6);
  45155. }
  45156. return children.children;
  45157. };
  45158. }
  45159. }));
  45160. //#endregion
  45161. //#region node_modules/element-plus/es/components/steps/src/steps.mjs
  45162. /**
  45163. * @deprecated Removed after 3.0.0, Use `StepsProps` instead.
  45164. */
  45165. var stepsProps = buildProps({
  45166. /**
  45167. * @description the spacing of each step, will be responsive if omitted. Supports percentage.
  45168. */
  45169. space: {
  45170. type: [Number, String],
  45171. default: ""
  45172. },
  45173. /**
  45174. * @description current activation step
  45175. */
  45176. active: {
  45177. type: Number,
  45178. default: 0
  45179. },
  45180. /**
  45181. * @description display direction
  45182. */
  45183. direction: {
  45184. type: String,
  45185. default: "horizontal",
  45186. values: ["horizontal", "vertical"]
  45187. },
  45188. /**
  45189. * @description center title and description
  45190. */
  45191. alignCenter: { type: Boolean },
  45192. /**
  45193. * @description whether to apply simple theme
  45194. */
  45195. simple: { type: Boolean },
  45196. /**
  45197. * @description status of end step
  45198. */
  45199. finishStatus: {
  45200. type: String,
  45201. values: [
  45202. "wait",
  45203. "process",
  45204. "finish",
  45205. "error",
  45206. "success"
  45207. ],
  45208. default: "finish"
  45209. },
  45210. /**
  45211. * @description status of current step
  45212. */
  45213. processStatus: {
  45214. type: String,
  45215. values: [
  45216. "wait",
  45217. "process",
  45218. "finish",
  45219. "error",
  45220. "success"
  45221. ],
  45222. default: "process"
  45223. }
  45224. });
  45225. var stepsEmits = { [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber) };
  45226. //#endregion
  45227. //#region node_modules/element-plus/es/components/steps/src/tokens.mjs
  45228. var STEPS_INJECTION_KEY = "ElSteps";
  45229. //#endregion
  45230. //#region node_modules/element-plus/es/components/steps/src/item.mjs
  45231. /**
  45232. * @deprecated Removed after 3.0.0, Use `StepProps` instead.
  45233. */
  45234. var stepProps = buildProps({
  45235. /**
  45236. * @description step title
  45237. */
  45238. title: {
  45239. type: String,
  45240. default: ""
  45241. },
  45242. /**
  45243. * @description step custom icon. Icons can be passed via named slot as well
  45244. */
  45245. icon: { type: iconPropType },
  45246. /**
  45247. * @description step description
  45248. */
  45249. description: {
  45250. type: String,
  45251. default: ""
  45252. },
  45253. /**
  45254. * @description current status. It will be automatically set by Steps if not configured.
  45255. */
  45256. status: {
  45257. type: String,
  45258. values: [
  45259. "",
  45260. "wait",
  45261. "process",
  45262. "finish",
  45263. "error",
  45264. "success"
  45265. ],
  45266. default: ""
  45267. }
  45268. });
  45269. //#endregion
  45270. //#region node_modules/element-plus/es/components/steps/src/steps2.mjs
  45271. var steps_default$1 = /* @__PURE__ */ defineComponent({
  45272. name: "ElSteps",
  45273. __name: "steps",
  45274. props: stepsProps,
  45275. emits: stepsEmits,
  45276. setup(__props, { emit: __emit }) {
  45277. const props = __props;
  45278. const emit = __emit;
  45279. const ns = useNamespace("steps");
  45280. const { children: steps, addChild: addStep, removeChild: removeStep, ChildrenSorter: StepsSorter } = useOrderedChildren(getCurrentInstance(), "ElStep");
  45281. watch(steps, () => {
  45282. steps.value.forEach((instance, index) => {
  45283. instance.setIndex(index);
  45284. });
  45285. });
  45286. provide(STEPS_INJECTION_KEY, {
  45287. props,
  45288. steps,
  45289. addStep,
  45290. removeStep
  45291. });
  45292. watch(() => props.active, (newVal, oldVal) => {
  45293. emit(CHANGE_EVENT, newVal, oldVal);
  45294. });
  45295. return (_ctx, _cache) => {
  45296. return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).m(__props.simple ? "simple" : __props.direction)]) }, [renderSlot(_ctx.$slots, "default"), createVNode(unref(StepsSorter))], 2);
  45297. };
  45298. }
  45299. });
  45300. //#endregion
  45301. //#region node_modules/element-plus/es/components/steps/src/item2.mjs
  45302. var item_default = /* @__PURE__ */ defineComponent({
  45303. name: "ElStep",
  45304. __name: "item",
  45305. props: stepProps,
  45306. setup(__props) {
  45307. const props = __props;
  45308. const ns = useNamespace("step");
  45309. const index = ref(-1);
  45310. const lineStyle = ref({});
  45311. const internalStatus = ref("");
  45312. const parent = inject(STEPS_INJECTION_KEY);
  45313. const currentInstance = getCurrentInstance();
  45314. let stepDiff = 0;
  45315. let beforeActive = 0;
  45316. onMounted(() => {
  45317. watch([
  45318. () => parent.props.active,
  45319. () => parent.props.processStatus,
  45320. () => parent.props.finishStatus
  45321. ], ([active], [oldActive]) => {
  45322. beforeActive = oldActive || 0;
  45323. stepDiff = active - beforeActive;
  45324. updateStatus(active);
  45325. }, { immediate: true });
  45326. });
  45327. const currentStatus = computed(() => {
  45328. return props.status || internalStatus.value;
  45329. });
  45330. const prevInternalStatus = computed(() => {
  45331. const prevStep = parent.steps.value[index.value - 1];
  45332. return prevStep ? prevStep.internalStatus.value : "wait";
  45333. });
  45334. const isCenter = computed(() => {
  45335. return parent.props.alignCenter;
  45336. });
  45337. const isVertical = computed(() => {
  45338. return parent.props.direction === "vertical";
  45339. });
  45340. const isSimple = computed(() => {
  45341. return parent.props.simple;
  45342. });
  45343. const stepsCount = computed(() => {
  45344. return parent.steps.value.length;
  45345. });
  45346. const isLast = computed(() => {
  45347. return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance.uid;
  45348. });
  45349. const space = computed(() => {
  45350. return isSimple.value ? "" : parent.props.space;
  45351. });
  45352. const containerKls = computed(() => {
  45353. return [
  45354. ns.b(),
  45355. ns.is(isSimple.value ? "simple" : parent.props.direction),
  45356. ns.is("flex", isLast.value && !space.value && !isCenter.value),
  45357. ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
  45358. ];
  45359. });
  45360. const style = computed(() => {
  45361. const style = { flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` };
  45362. if (isVertical.value) return style;
  45363. if (isLast.value) style.maxWidth = `${100 / stepsCount.value}%`;
  45364. return style;
  45365. });
  45366. const setIndex = (val) => {
  45367. index.value = val;
  45368. };
  45369. const calcProgress = (status) => {
  45370. const isWait = status === "wait";
  45371. const style = { transitionDelay: `${Math.abs(stepDiff) === 1 ? 0 : stepDiff > 0 ? (index.value + 1 - beforeActive) * 150 : -(index.value + 1 - parent.props.active) * 150}ms` };
  45372. const step = status === parent.props.processStatus || isWait ? 0 : 100;
  45373. style.borderWidth = step && !isSimple.value ? "1px" : 0;
  45374. style[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
  45375. lineStyle.value = style;
  45376. };
  45377. const updateStatus = (activeIndex) => {
  45378. if (activeIndex > index.value) internalStatus.value = parent.props.finishStatus;
  45379. else if (activeIndex === index.value && prevInternalStatus.value !== "error") internalStatus.value = parent.props.processStatus;
  45380. else internalStatus.value = "wait";
  45381. const prevChild = parent.steps.value[index.value - 1];
  45382. if (prevChild) prevChild.calcProgress(internalStatus.value);
  45383. };
  45384. const stepItemState = {
  45385. uid: currentInstance.uid,
  45386. getVnode: () => currentInstance.vnode,
  45387. currentStatus,
  45388. internalStatus,
  45389. setIndex,
  45390. calcProgress
  45391. };
  45392. parent.addStep(stepItemState);
  45393. onBeforeUnmount(() => {
  45394. parent.removeStep(stepItemState);
  45395. });
  45396. return (_ctx, _cache) => {
  45397. return openBlock(), createElementBlock("div", {
  45398. style: normalizeStyle(style.value),
  45399. class: normalizeClass(containerKls.value)
  45400. }, [
  45401. createCommentVNode(" icon & line "),
  45402. createBaseVNode("div", { class: normalizeClass([unref(ns).e("head"), unref(ns).is(currentStatus.value)]) }, [!isSimple.value ? (openBlock(), createElementBlock("div", {
  45403. key: 0,
  45404. class: normalizeClass(unref(ns).e("line"))
  45405. }, [createBaseVNode("i", {
  45406. class: normalizeClass(unref(ns).e("line-inner")),
  45407. style: normalizeStyle(lineStyle.value)
  45408. }, null, 6)], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(ns).e("icon"), unref(ns).is(__props.icon || _ctx.$slots.icon ? "icon" : "text")]) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(unref(ElIcon), {
  45409. key: 0,
  45410. class: normalizeClass(unref(ns).e("icon-inner"))
  45411. }, {
  45412. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  45413. _: 1
  45414. }, 8, ["class"])) : currentStatus.value === "success" ? (openBlock(), createBlock(unref(ElIcon), {
  45415. key: 1,
  45416. class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
  45417. }, {
  45418. default: withCtx(() => [createVNode(unref(check_default))]),
  45419. _: 1
  45420. }, 8, ["class"])) : currentStatus.value === "error" ? (openBlock(), createBlock(unref(ElIcon), {
  45421. key: 2,
  45422. class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
  45423. }, {
  45424. default: withCtx(() => [createVNode(unref(close_default))]),
  45425. _: 1
  45426. }, 8, ["class"])) : !isSimple.value ? (openBlock(), createElementBlock("div", {
  45427. key: 3,
  45428. class: normalizeClass(unref(ns).e("icon-inner"))
  45429. }, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)])], 2)], 2),
  45430. createCommentVNode(" title & description "),
  45431. createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [createBaseVNode("div", { class: normalizeClass([unref(ns).e("title"), unref(ns).is(currentStatus.value)]) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), isSimple.value ? (openBlock(), createElementBlock("div", {
  45432. key: 0,
  45433. class: normalizeClass(unref(ns).e("arrow"))
  45434. }, null, 2)) : (openBlock(), createElementBlock("div", {
  45435. key: 1,
  45436. class: normalizeClass([unref(ns).e("description"), unref(ns).is(currentStatus.value)])
  45437. }, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 2))], 2)
  45438. ], 6);
  45439. };
  45440. }
  45441. });
  45442. //#endregion
  45443. //#region node_modules/element-plus/es/components/steps/index.mjs
  45444. var ElSteps = withInstall(steps_default$1, { Step: item_default });
  45445. var ElStep = withNoopInstall(item_default);
  45446. //#endregion
  45447. //#region node_modules/element-plus/es/utils/vue/validator.mjs
  45448. var isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
  45449. //#endregion
  45450. //#region node_modules/element-plus/es/components/switch/src/switch.mjs
  45451. /**
  45452. * @deprecated Removed after 3.0.0, Use `SwitchProps` instead.
  45453. */
  45454. var switchProps = buildProps({
  45455. /**
  45456. * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type
  45457. */
  45458. modelValue: {
  45459. type: [
  45460. Boolean,
  45461. String,
  45462. Number
  45463. ],
  45464. default: false
  45465. },
  45466. /**
  45467. * @description whether Switch is disabled
  45468. */
  45469. disabled: {
  45470. type: Boolean,
  45471. default: void 0
  45472. },
  45473. /**
  45474. * @description whether Switch is in loading state
  45475. */
  45476. loading: Boolean,
  45477. /**
  45478. * @description size of Switch
  45479. */
  45480. size: {
  45481. type: String,
  45482. validator: isValidComponentSize
  45483. },
  45484. /**
  45485. * @description width of Switch
  45486. */
  45487. width: {
  45488. type: [String, Number],
  45489. default: ""
  45490. },
  45491. /**
  45492. * @description whether icon or text is displayed inside dot, only the first character will be rendered for text
  45493. */
  45494. inlinePrompt: Boolean,
  45495. /**
  45496. * @description component of the icon displayed in action when in `off` state
  45497. */
  45498. inactiveActionIcon: { type: iconPropType },
  45499. /**
  45500. * @description component of the icon displayed in action when in `on` state
  45501. */
  45502. activeActionIcon: { type: iconPropType },
  45503. /**
  45504. * @description component of the icon displayed when in `on` state, overrides `active-text`
  45505. */
  45506. activeIcon: { type: iconPropType },
  45507. /**
  45508. * @description component of the icon displayed when in `off` state, overrides `inactive-text`
  45509. */
  45510. inactiveIcon: { type: iconPropType },
  45511. /**
  45512. * @description text displayed when in `on` state
  45513. */
  45514. activeText: {
  45515. type: String,
  45516. default: ""
  45517. },
  45518. /**
  45519. * @description text displayed when in `off` state
  45520. */
  45521. inactiveText: {
  45522. type: String,
  45523. default: ""
  45524. },
  45525. /**
  45526. * @description switch value when in `on` state
  45527. */
  45528. activeValue: {
  45529. type: [
  45530. Boolean,
  45531. String,
  45532. Number
  45533. ],
  45534. default: true
  45535. },
  45536. /**
  45537. * @description switch value when in `off` state
  45538. */
  45539. inactiveValue: {
  45540. type: [
  45541. Boolean,
  45542. String,
  45543. Number
  45544. ],
  45545. default: false
  45546. },
  45547. /**
  45548. * @description input name of Switch
  45549. */
  45550. name: {
  45551. type: String,
  45552. default: ""
  45553. },
  45554. /**
  45555. * @description whether to trigger form validation
  45556. */
  45557. validateEvent: {
  45558. type: Boolean,
  45559. default: true
  45560. },
  45561. /**
  45562. * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching
  45563. */
  45564. beforeChange: { type: definePropType(Function) },
  45565. /**
  45566. * @description id for input
  45567. */
  45568. id: String,
  45569. /**
  45570. * @description tabindex for input
  45571. */
  45572. tabindex: { type: [String, Number] },
  45573. ...useAriaProps(["ariaLabel"])
  45574. });
  45575. var switchEmits = {
  45576. [UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
  45577. [CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
  45578. [INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
  45579. };
  45580. //#endregion
  45581. //#region node_modules/element-plus/es/components/switch/src/switch.vue_vue_type_script_setup_true_lang.mjs
  45582. var _hoisted_1$18 = [
  45583. "id",
  45584. "aria-checked",
  45585. "aria-disabled",
  45586. "aria-label",
  45587. "name",
  45588. "true-value",
  45589. "false-value",
  45590. "disabled",
  45591. "tabindex"
  45592. ];
  45593. var _hoisted_2$11 = ["aria-hidden"];
  45594. var _hoisted_3$4 = { key: 1 };
  45595. var _hoisted_4$3 = { key: 1 };
  45596. var _hoisted_5$1 = ["aria-hidden"];
  45597. var COMPONENT_NAME$6 = "ElSwitch";
  45598. //#endregion
  45599. //#region node_modules/element-plus/es/components/switch/index.mjs
  45600. var ElSwitch = withInstall(/* @__PURE__ */ defineComponent({
  45601. name: COMPONENT_NAME$6,
  45602. __name: "switch",
  45603. props: switchProps,
  45604. emits: switchEmits,
  45605. setup(__props, { expose: __expose, emit: __emit }) {
  45606. const props = __props;
  45607. const emit = __emit;
  45608. const { formItem } = useFormItem();
  45609. const switchSize = useFormSize();
  45610. const ns = useNamespace("switch");
  45611. const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
  45612. const switchDisabled = useFormDisabled(computed(() => {
  45613. if (props.loading) return true;
  45614. }));
  45615. const isControlled = ref(props.modelValue !== false);
  45616. const input = shallowRef();
  45617. const switchKls = computed(() => [
  45618. ns.b(),
  45619. ns.m(switchSize.value),
  45620. ns.is("disabled", switchDisabled.value),
  45621. ns.is("checked", checked.value)
  45622. ]);
  45623. const labelLeftKls = computed(() => [
  45624. ns.e("label"),
  45625. ns.em("label", "left"),
  45626. ns.is("active", !checked.value)
  45627. ]);
  45628. const labelRightKls = computed(() => [
  45629. ns.e("label"),
  45630. ns.em("label", "right"),
  45631. ns.is("active", checked.value)
  45632. ]);
  45633. const coreStyle = computed(() => ({ width: addUnit(props.width) }));
  45634. watch(() => props.modelValue, () => {
  45635. isControlled.value = true;
  45636. });
  45637. const actualValue = computed(() => {
  45638. return isControlled.value ? props.modelValue : false;
  45639. });
  45640. const checked = computed(() => actualValue.value === props.activeValue);
  45641. if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
  45642. emit(UPDATE_MODEL_EVENT, props.inactiveValue);
  45643. emit(CHANGE_EVENT, props.inactiveValue);
  45644. emit(INPUT_EVENT, props.inactiveValue);
  45645. }
  45646. watch(checked, (val) => {
  45647. input.value.checked = val;
  45648. if (props.validateEvent) formItem?.validate?.("change").catch(NOOP);
  45649. });
  45650. const handleChange = () => {
  45651. const val = checked.value ? props.inactiveValue : props.activeValue;
  45652. emit(UPDATE_MODEL_EVENT, val);
  45653. emit(CHANGE_EVENT, val);
  45654. emit(INPUT_EVENT, val);
  45655. nextTick(() => {
  45656. input.value.checked = checked.value;
  45657. });
  45658. };
  45659. const switchValue = () => {
  45660. if (switchDisabled.value) return;
  45661. const { beforeChange } = props;
  45662. if (!beforeChange) {
  45663. handleChange();
  45664. return;
  45665. }
  45666. const shouldChange = beforeChange();
  45667. if (![isPromise(shouldChange), isBoolean(shouldChange)].includes(true)) throwError(COMPONENT_NAME$6, "beforeChange must return type `Promise<boolean>` or `boolean`");
  45668. if (isPromise(shouldChange)) shouldChange.then((result) => {
  45669. if (result) handleChange();
  45670. }).catch((e) => {
  45671. debugWarn(COMPONENT_NAME$6, `some error occurred: ${e}`);
  45672. });
  45673. else if (shouldChange) handleChange();
  45674. };
  45675. const focus = () => {
  45676. input.value?.focus?.();
  45677. };
  45678. onMounted(() => {
  45679. input.value.checked = checked.value;
  45680. });
  45681. __expose({
  45682. /**
  45683. * @description manual focus to the switch component
  45684. **/
  45685. focus,
  45686. /**
  45687. * @description whether Switch is checked
  45688. */
  45689. checked
  45690. });
  45691. return (_ctx, _cache) => {
  45692. return openBlock(), createElementBlock("div", {
  45693. class: normalizeClass(switchKls.value),
  45694. onClick: withModifiers(switchValue, ["prevent"])
  45695. }, [
  45696. createBaseVNode("input", {
  45697. id: unref(inputId),
  45698. ref_key: "input",
  45699. ref: input,
  45700. class: normalizeClass(unref(ns).e("input")),
  45701. type: "checkbox",
  45702. role: "switch",
  45703. "aria-checked": checked.value,
  45704. "aria-disabled": unref(switchDisabled),
  45705. "aria-label": __props.ariaLabel,
  45706. name: __props.name,
  45707. "true-value": __props.activeValue,
  45708. "false-value": __props.inactiveValue,
  45709. disabled: unref(switchDisabled),
  45710. tabindex: __props.tabindex,
  45711. onChange: handleChange,
  45712. onKeydown: withKeys(switchValue, ["enter"])
  45713. }, null, 42, _hoisted_1$18),
  45714. !__props.inlinePrompt && (__props.inactiveIcon || __props.inactiveText || _ctx.$slots.inactive) ? (openBlock(), createElementBlock("span", {
  45715. key: 0,
  45716. class: normalizeClass(labelLeftKls.value)
  45717. }, [renderSlot(_ctx.$slots, "inactive", {}, () => [__props.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  45718. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveIcon)))]),
  45719. _: 1
  45720. })) : createCommentVNode("v-if", true), !__props.inactiveIcon && __props.inactiveText ? (openBlock(), createElementBlock("span", {
  45721. key: 1,
  45722. "aria-hidden": checked.value
  45723. }, toDisplayString(__props.inactiveText), 9, _hoisted_2$11)) : createCommentVNode("v-if", true)])], 2)) : createCommentVNode("v-if", true),
  45724. createBaseVNode("span", {
  45725. class: normalizeClass(unref(ns).e("core")),
  45726. style: normalizeStyle(coreStyle.value)
  45727. }, [__props.inlinePrompt ? (openBlock(), createElementBlock("div", {
  45728. key: 0,
  45729. class: normalizeClass(unref(ns).e("inner"))
  45730. }, [!checked.value ? (openBlock(), createElementBlock("div", {
  45731. key: 0,
  45732. class: normalizeClass(unref(ns).e("inner-wrapper"))
  45733. }, [renderSlot(_ctx.$slots, "inactive", {}, () => [__props.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  45734. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveIcon)))]),
  45735. _: 1
  45736. })) : createCommentVNode("v-if", true), !__props.inactiveIcon && __props.inactiveText ? (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(__props.inactiveText), 1)) : createCommentVNode("v-if", true)])], 2)) : (openBlock(), createElementBlock("div", {
  45737. key: 1,
  45738. class: normalizeClass(unref(ns).e("inner-wrapper"))
  45739. }, [renderSlot(_ctx.$slots, "active", {}, () => [__props.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  45740. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeIcon)))]),
  45741. _: 1
  45742. })) : createCommentVNode("v-if", true), !__props.activeIcon && __props.activeText ? (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(__props.activeText), 1)) : createCommentVNode("v-if", true)])], 2))], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [__props.loading ? (openBlock(), createBlock(unref(ElIcon), {
  45743. key: 0,
  45744. class: normalizeClass(unref(ns).is("loading"))
  45745. }, {
  45746. default: withCtx(() => [createVNode(unref(loading_default))]),
  45747. _: 1
  45748. }, 8, ["class"])) : checked.value ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [__props.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  45749. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeActionIcon)))]),
  45750. _: 1
  45751. })) : createCommentVNode("v-if", true)]) : !checked.value ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [__props.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  45752. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveActionIcon)))]),
  45753. _: 1
  45754. })) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true)], 2)], 6),
  45755. !__props.inlinePrompt && (__props.activeIcon || __props.activeText || _ctx.$slots.active) ? (openBlock(), createElementBlock("span", {
  45756. key: 1,
  45757. class: normalizeClass(labelRightKls.value)
  45758. }, [renderSlot(_ctx.$slots, "active", {}, () => [__props.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  45759. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeIcon)))]),
  45760. _: 1
  45761. })) : createCommentVNode("v-if", true), !__props.activeIcon && __props.activeText ? (openBlock(), createElementBlock("span", {
  45762. key: 1,
  45763. "aria-hidden": !checked.value
  45764. }, toDisplayString(__props.activeText), 9, _hoisted_5$1)) : createCommentVNode("v-if", true)])], 2)) : createCommentVNode("v-if", true)
  45765. ], 2);
  45766. };
  45767. }
  45768. }));
  45769. //#endregion
  45770. //#region node_modules/element-plus/es/components/table/src/table/defaults.mjs
  45771. /**
  45772. * @deprecated Removed after 3.0.0, Use `TableProps` instead.
  45773. */
  45774. var tableProps = {
  45775. /**
  45776. * @description table data
  45777. */
  45778. data: {
  45779. type: Array,
  45780. default: () => []
  45781. },
  45782. /**
  45783. * @description size of Table
  45784. */
  45785. size: useSizeProp,
  45786. width: [String, Number],
  45787. /**
  45788. * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles
  45789. */
  45790. height: [String, Number],
  45791. /**
  45792. * @description table's max-height. The legal value is a number or the height in px
  45793. */
  45794. maxHeight: [String, Number],
  45795. /**
  45796. * @description whether width of column automatically fits its container
  45797. */
  45798. fit: {
  45799. type: Boolean,
  45800. default: true
  45801. },
  45802. /**
  45803. * @description whether Table is striped
  45804. */
  45805. stripe: Boolean,
  45806. /**
  45807. * @description whether Table has vertical border
  45808. */
  45809. border: Boolean,
  45810. /**
  45811. * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used
  45812. */
  45813. rowKey: [String, Function],
  45814. /**
  45815. * @description whether Table header is visible
  45816. */
  45817. showHeader: {
  45818. type: Boolean,
  45819. default: true
  45820. },
  45821. /**
  45822. * @description whether to display a summary row
  45823. */
  45824. showSummary: Boolean,
  45825. /**
  45826. * @description displayed text for the first column of summary row
  45827. */
  45828. sumText: String,
  45829. /**
  45830. * @description custom summary method
  45831. */
  45832. summaryMethod: Function,
  45833. /**
  45834. * @description function that returns custom class names for a row, or a string assigning class names for every row
  45835. */
  45836. rowClassName: [String, Function],
  45837. /**
  45838. * @description function that returns custom style for a row, or an object assigning custom style for every row
  45839. */
  45840. rowStyle: [Object, Function],
  45841. /**
  45842. * @description function that returns custom class names for a cell, or a string assigning class names for every cell
  45843. */
  45844. cellClassName: [String, Function],
  45845. /**
  45846. * @description function that returns custom style for a cell, or an object assigning custom style for every cell
  45847. */
  45848. cellStyle: [Object, Function],
  45849. /**
  45850. * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header
  45851. */
  45852. headerRowClassName: [String, Function],
  45853. /**
  45854. * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header
  45855. */
  45856. headerRowStyle: [Object, Function],
  45857. /**
  45858. * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header
  45859. */
  45860. headerCellClassName: [String, Function],
  45861. /**
  45862. * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header
  45863. */
  45864. headerCellStyle: [Object, Function],
  45865. /**
  45866. * @description whether current row is highlighted
  45867. */
  45868. highlightCurrentRow: Boolean,
  45869. /**
  45870. * @description key of current row, a set only prop
  45871. */
  45872. currentRowKey: [String, Number],
  45873. /**
  45874. * @description displayed text when data is empty. You can customize this area with `#empty`
  45875. */
  45876. emptyText: String,
  45877. /**
  45878. * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop
  45879. */
  45880. expandRowKeys: Array,
  45881. /**
  45882. * @description whether expand all rows by default, works when the table has a column type="expand" or contains tree structure data
  45883. */
  45884. defaultExpandAll: Boolean,
  45885. /**
  45886. * @description enable expandable rows, works when the table has a column type="expand"
  45887. */
  45888. rowExpandable: { type: Function },
  45889. /**
  45890. * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order
  45891. */
  45892. defaultSort: Object,
  45893. /**
  45894. * @description the `effect` of the overflow tooltip
  45895. */
  45896. tooltipEffect: String,
  45897. /**
  45898. * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)
  45899. */
  45900. tooltipOptions: Object,
  45901. /**
  45902. * @description method that returns rowspan and colspan
  45903. */
  45904. spanMethod: Function,
  45905. /**
  45906. * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected
  45907. */
  45908. selectOnIndeterminate: {
  45909. type: Boolean,
  45910. default: true
  45911. },
  45912. /**
  45913. * @description horizontal indentation of tree data
  45914. */
  45915. indent: {
  45916. type: Number,
  45917. default: 16
  45918. },
  45919. /**
  45920. * @description configuration for rendering nested data
  45921. */
  45922. treeProps: {
  45923. type: Object,
  45924. default: () => {
  45925. return {
  45926. hasChildren: "hasChildren",
  45927. children: "children",
  45928. checkStrictly: false
  45929. };
  45930. }
  45931. },
  45932. /**
  45933. * @description whether to lazy loading data
  45934. */
  45935. lazy: Boolean,
  45936. /**
  45937. * @description method for loading child row data, only works when `lazy` is true
  45938. */
  45939. load: Function,
  45940. style: {
  45941. type: [
  45942. String,
  45943. Object,
  45944. Array,
  45945. Boolean
  45946. ],
  45947. default: () => ({})
  45948. },
  45949. className: {
  45950. type: String,
  45951. default: ""
  45952. },
  45953. /**
  45954. * @description sets the algorithm used to lay out table cells, rows, and columns
  45955. */
  45956. tableLayout: {
  45957. type: String,
  45958. default: "fixed"
  45959. },
  45960. /**
  45961. * @description always show scrollbar
  45962. */
  45963. scrollbarAlwaysOn: Boolean,
  45964. /**
  45965. * @description ensure main axis minimum-size doesn't follow the content
  45966. */
  45967. flexible: Boolean,
  45968. /**
  45969. * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns
  45970. */
  45971. showOverflowTooltip: {
  45972. type: [Boolean, Object],
  45973. default: void 0
  45974. },
  45975. /**
  45976. * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`
  45977. */
  45978. tooltipFormatter: Function,
  45979. appendFilterPanelTo: String,
  45980. scrollbarTabindex: {
  45981. type: [Number, String],
  45982. default: void 0
  45983. },
  45984. /**
  45985. * @description whether to allow drag the last column
  45986. */
  45987. allowDragLastColumn: {
  45988. type: Boolean,
  45989. default: true
  45990. },
  45991. /**
  45992. * @description whether to preserve expanded row content in DOM when collapsed
  45993. */
  45994. preserveExpandedContent: Boolean,
  45995. /**
  45996. * @description whether to use native scrollbars
  45997. */
  45998. nativeScrollbar: Boolean
  45999. };
  46000. //#endregion
  46001. //#region node_modules/element-plus/es/components/table/src/util.mjs
  46002. var tableIdSeed = 1;
  46003. var columnIdSeed = 1;
  46004. var createTableId = (namespace) => `${namespace}-table_${tableIdSeed++}`;
  46005. var createTableColumnId = (parentId) => `${parentId}_column_${columnIdSeed++}`;
  46006. var getCell = function(event) {
  46007. return event.target?.closest("td");
  46008. };
  46009. var orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
  46010. if (!sortKey && !sortMethod && (!sortBy || isArray$1(sortBy) && !sortBy.length)) return array;
  46011. if (isString(reverse)) reverse = reverse === "descending" ? -1 : 1;
  46012. else reverse = reverse && reverse < 0 ? -1 : 1;
  46013. const getKey = sortMethod ? null : function(value, index) {
  46014. if (sortBy) return flatMap(castArray$1(sortBy), (by) => {
  46015. if (isString(by)) return get(value, by);
  46016. else return by(value, index, array);
  46017. });
  46018. if (sortKey !== "$key") {
  46019. if (isObject$2(value) && "$value" in value) value = value.$value;
  46020. }
  46021. return [isObject$2(value) ? sortKey ? get(value, sortKey) : null : value];
  46022. };
  46023. const compare = function(a, b) {
  46024. if (sortMethod) return sortMethod(a.value, b.value);
  46025. for (let i = 0, len = a.key?.length ?? 0; i < len; i++) {
  46026. if (a.key?.[i] < b.key?.[i]) return -1;
  46027. if (a.key?.[i] > b.key?.[i]) return 1;
  46028. }
  46029. return 0;
  46030. };
  46031. return array.map((value, index) => {
  46032. return {
  46033. value,
  46034. index,
  46035. key: getKey ? getKey(value, index) : null
  46036. };
  46037. }).sort((a, b) => {
  46038. let order = compare(a, b);
  46039. if (!order) order = a.index - b.index;
  46040. return order * +reverse;
  46041. }).map((item) => item.value);
  46042. };
  46043. var getColumnById = function(table, columnId) {
  46044. let column = null;
  46045. table.columns.forEach((item) => {
  46046. if (item.id === columnId) column = item;
  46047. });
  46048. return column;
  46049. };
  46050. var getColumnByKey = function(table, columnKey) {
  46051. let column = null;
  46052. for (let i = 0; i < table.columns.length; i++) {
  46053. const item = table.columns[i];
  46054. if (item.columnKey === columnKey) {
  46055. column = item;
  46056. break;
  46057. }
  46058. }
  46059. if (!column) throwError("ElTable", `No column matching with column-key: ${columnKey}`);
  46060. return column;
  46061. };
  46062. var getColumnByCell = function(table, cell, namespace) {
  46063. const matches = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm"));
  46064. if (matches) return getColumnById(table, matches[0]);
  46065. return null;
  46066. };
  46067. var getRowIdentity = (row, rowKey) => {
  46068. if (!row) throw new Error("Row is required when get row identity");
  46069. if (isString(rowKey)) {
  46070. if (!rowKey.includes(".")) return `${row[rowKey]}`;
  46071. const key = rowKey.split(".");
  46072. let current = row;
  46073. for (const element of key) current = current[element];
  46074. return `${current}`;
  46075. } else if (isFunction$1(rowKey)) return rowKey.call(null, row);
  46076. return "";
  46077. };
  46078. var getKeysMap = function(array, rowKey, flatten = false, childrenKey = "children") {
  46079. const data = array || [];
  46080. const arrayMap = {};
  46081. data.forEach((row, index) => {
  46082. arrayMap[getRowIdentity(row, rowKey)] = {
  46083. row,
  46084. index
  46085. };
  46086. if (flatten) {
  46087. const children = row[childrenKey];
  46088. if (isArray$1(children)) Object.assign(arrayMap, getKeysMap(children, rowKey, true, childrenKey));
  46089. }
  46090. });
  46091. return arrayMap;
  46092. };
  46093. function mergeOptions(defaults, config) {
  46094. const options = {};
  46095. let key;
  46096. for (key in defaults) options[key] = defaults[key];
  46097. for (key in config) if (hasOwn(config, key)) {
  46098. const value = config[key];
  46099. if (!isUndefined(value)) options[key] = value;
  46100. }
  46101. return options;
  46102. }
  46103. function parseWidth(width) {
  46104. if (width === "") return width;
  46105. if (!isUndefined(width)) {
  46106. width = Number.parseInt(width, 10);
  46107. if (Number.isNaN(width)) width = "";
  46108. }
  46109. return width;
  46110. }
  46111. function parseMinWidth(minWidth) {
  46112. if (minWidth === "") return minWidth;
  46113. if (!isUndefined(minWidth)) {
  46114. minWidth = parseWidth(minWidth);
  46115. if (Number.isNaN(minWidth)) minWidth = 80;
  46116. }
  46117. return minWidth;
  46118. }
  46119. function parseHeight(height) {
  46120. if (isNumber(height)) return height;
  46121. if (isString(height)) if (/^\d+(?:px)?$/.test(height)) return Number.parseInt(height, 10);
  46122. else return height;
  46123. return null;
  46124. }
  46125. function compose(...funcs) {
  46126. if (funcs.length === 0) return (arg) => arg;
  46127. if (funcs.length === 1) return funcs[0];
  46128. return funcs.reduce((a, b) => (...args) => a(b(...args)));
  46129. }
  46130. function toggleRowStatus(statusArr, row, newVal, tableTreeProps, selectable, rowIndex, rowKey) {
  46131. let _rowIndex = rowIndex ?? 0;
  46132. let changed = false;
  46133. const getIndex = () => {
  46134. if (!rowKey) return statusArr.indexOf(row);
  46135. const id = getRowIdentity(row, rowKey);
  46136. return statusArr.findIndex((item) => getRowIdentity(item, rowKey) === id);
  46137. };
  46138. const index = getIndex();
  46139. const included = index !== -1;
  46140. const isRowSelectable = selectable?.call(null, row, _rowIndex);
  46141. const toggleStatus = (type) => {
  46142. if (type === "add") statusArr.push(row);
  46143. else statusArr.splice(index, 1);
  46144. changed = true;
  46145. };
  46146. const getChildrenCount = (row) => {
  46147. let count = 0;
  46148. const children = tableTreeProps?.children && row[tableTreeProps.children];
  46149. if (children && isArray$1(children)) {
  46150. count += children.length;
  46151. children.forEach((item) => {
  46152. count += getChildrenCount(item);
  46153. });
  46154. }
  46155. return count;
  46156. };
  46157. if (!selectable || isRowSelectable) if (isBoolean(newVal)) {
  46158. if (newVal && !included) toggleStatus("add");
  46159. else if (!newVal && included) toggleStatus("remove");
  46160. } else included ? toggleStatus("remove") : toggleStatus("add");
  46161. if (!tableTreeProps?.checkStrictly && tableTreeProps?.children && isArray$1(row[tableTreeProps.children])) row[tableTreeProps.children].forEach((item) => {
  46162. const childChanged = toggleRowStatus(statusArr, item, newVal ?? !included, tableTreeProps, selectable, _rowIndex + 1, rowKey);
  46163. _rowIndex += getChildrenCount(item) + 1;
  46164. if (childChanged) changed = childChanged;
  46165. });
  46166. return changed;
  46167. }
  46168. function walkTreeNode(root, cb, childrenKey = "children", lazyKey = "hasChildren", lazy = false) {
  46169. const isNil = (array) => !(isArray$1(array) && array.length);
  46170. function _walker(parent, children, level) {
  46171. cb(parent, children, level);
  46172. children.forEach((item) => {
  46173. if (item[lazyKey] && lazy) {
  46174. cb(item, null, level + 1);
  46175. return;
  46176. }
  46177. const children = item[childrenKey];
  46178. if (!isNil(children)) _walker(item, children, level + 1);
  46179. });
  46180. }
  46181. root.forEach((item) => {
  46182. if (item[lazyKey] && lazy) {
  46183. cb(item, null, 0);
  46184. return;
  46185. }
  46186. const children = item[childrenKey];
  46187. if (!isNil(children)) _walker(item, children, 0);
  46188. });
  46189. }
  46190. var getTableOverflowTooltipProps = (props, innerText, row, column) => {
  46191. const tooltipFormatterContent = isFunction$1(column?.tooltipFormatter) ? column.tooltipFormatter({
  46192. row,
  46193. column,
  46194. cellValue: getProp(row, column.property).value
  46195. }) : void 0;
  46196. if (isVNode(tooltipFormatterContent)) return {
  46197. slotContent: tooltipFormatterContent,
  46198. content: null,
  46199. strategy: "fixed",
  46200. ...props
  46201. };
  46202. return {
  46203. slotContent: null,
  46204. content: tooltipFormatterContent ?? innerText,
  46205. strategy: "fixed",
  46206. ...props
  46207. };
  46208. };
  46209. var removePopper = null;
  46210. function createTablePopper(props, popperContent, row, column, trigger, table) {
  46211. const tableOverflowTooltipProps = getTableOverflowTooltipProps(props, popperContent, row, column);
  46212. const mergedProps = {
  46213. ...tableOverflowTooltipProps,
  46214. slotContent: void 0
  46215. };
  46216. if (removePopper?.trigger === trigger) {
  46217. const comp = removePopper.vm?.component;
  46218. merge(comp?.props, mergedProps);
  46219. if (comp && tableOverflowTooltipProps.slotContent) comp.slots.content = () => [tableOverflowTooltipProps.slotContent];
  46220. return;
  46221. }
  46222. removePopper?.();
  46223. const parentNode = table?.refs.tableWrapper;
  46224. const ns = parentNode?.dataset.prefix;
  46225. const vm = createVNode(ElTooltip, {
  46226. virtualTriggering: true,
  46227. virtualRef: trigger,
  46228. appendTo: parentNode,
  46229. placement: "top",
  46230. transition: "none",
  46231. offset: 0,
  46232. hideAfter: 0,
  46233. ...mergedProps
  46234. }, tableOverflowTooltipProps.slotContent ? { content: () => tableOverflowTooltipProps.slotContent } : void 0);
  46235. vm.appContext = {
  46236. ...table.appContext,
  46237. ...table
  46238. };
  46239. const container = document.createElement("div");
  46240. render(vm, container);
  46241. vm.component.exposed.onOpen();
  46242. const scrollContainer = parentNode?.querySelector(`.${ns}-scrollbar__wrap`);
  46243. removePopper = () => {
  46244. if (vm.component?.exposed?.onClose) vm.component.exposed.onClose();
  46245. render(null, container);
  46246. const currentRemovePopper = removePopper;
  46247. scrollContainer?.removeEventListener("scroll", currentRemovePopper);
  46248. currentRemovePopper.trigger = void 0;
  46249. currentRemovePopper.vm = void 0;
  46250. removePopper = null;
  46251. };
  46252. removePopper.trigger = trigger ?? void 0;
  46253. removePopper.vm = vm;
  46254. scrollContainer?.addEventListener("scroll", removePopper);
  46255. }
  46256. function getCurrentColumns(column) {
  46257. if (column.children) return flatMap(column.children, getCurrentColumns);
  46258. else return [column];
  46259. }
  46260. function getColSpan(colSpan, column) {
  46261. return colSpan + column.colSpan;
  46262. }
  46263. var isFixedColumn = (index, fixed, store, realColumns) => {
  46264. let start = 0;
  46265. let after = index;
  46266. const columns = store.states.columns.value;
  46267. if (realColumns) {
  46268. const curColumns = getCurrentColumns(realColumns[index]);
  46269. start = columns.slice(0, columns.indexOf(curColumns[0])).reduce(getColSpan, 0);
  46270. after = start + curColumns.reduce(getColSpan, 0) - 1;
  46271. } else start = index;
  46272. let fixedLayout;
  46273. switch (fixed) {
  46274. case "left":
  46275. if (after < store.states.fixedLeafColumnsLength.value) fixedLayout = "left";
  46276. break;
  46277. case "right":
  46278. if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) fixedLayout = "right";
  46279. break;
  46280. default: if (after < store.states.fixedLeafColumnsLength.value) fixedLayout = "left";
  46281. else if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) fixedLayout = "right";
  46282. }
  46283. return fixedLayout ? {
  46284. direction: fixedLayout,
  46285. start,
  46286. after
  46287. } : {};
  46288. };
  46289. var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset = 0) => {
  46290. const classes = [];
  46291. const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns);
  46292. if (direction) {
  46293. const isLeft = direction === "left";
  46294. classes.push(`${namespace}-fixed-column--${direction}`);
  46295. if (isLeft && after + offset === store.states.fixedLeafColumnsLength.value - 1) classes.push("is-last-column");
  46296. else if (!isLeft && start - offset === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) classes.push("is-first-column");
  46297. }
  46298. return classes;
  46299. };
  46300. function getOffset(offset, column) {
  46301. return offset + (isNull(column.realWidth) || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
  46302. }
  46303. var getFixedColumnOffset = (index, fixed, store, realColumns) => {
  46304. const { direction, start = 0, after = 0 } = isFixedColumn(index, fixed, store, realColumns);
  46305. if (!direction) return;
  46306. const styles = {};
  46307. const isLeft = direction === "left";
  46308. const columns = store.states.columns.value;
  46309. if (isLeft) styles.left = columns.slice(0, start).reduce(getOffset, 0);
  46310. else styles.right = columns.slice(after + 1).reverse().reduce(getOffset, 0);
  46311. return styles;
  46312. };
  46313. var ensurePosition = (style, key) => {
  46314. if (!style) return;
  46315. if (!Number.isNaN(style[key])) style[key] = `${style[key]}px`;
  46316. };
  46317. function ensureValidVNode(vnodes) {
  46318. return vnodes.some((child) => {
  46319. if (!isVNode(child)) return true;
  46320. if (child.type === Comment) return false;
  46321. if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
  46322. return true;
  46323. }) ? vnodes : null;
  46324. }
  46325. //#endregion
  46326. //#region node_modules/element-plus/es/components/table/src/store/expand.mjs
  46327. function useExpand(watcherData) {
  46328. const instance = getCurrentInstance();
  46329. const defaultExpandAll = ref(false);
  46330. const expandRows = ref([]);
  46331. const canRowExpand = (row, index) => {
  46332. const expandableFn = instance.store.states.rowExpandable.value;
  46333. return expandableFn?.(row, index) ?? true;
  46334. };
  46335. const updateExpandRows = () => {
  46336. const data = watcherData.data.value || [];
  46337. const rowKey = watcherData.rowKey.value;
  46338. if (defaultExpandAll.value) expandRows.value = instance.store.states.rowExpandable.value ? data.filter(canRowExpand) : data.slice();
  46339. else if (rowKey) {
  46340. const expandRowsMap = getKeysMap(expandRows.value, rowKey);
  46341. expandRows.value = data.filter((row, index) => {
  46342. return !!expandRowsMap[getRowIdentity(row, rowKey)] && canRowExpand(row, index);
  46343. });
  46344. } else expandRows.value = [];
  46345. };
  46346. const toggleRowExpansion = (row, expanded) => {
  46347. const rowIndex = (watcherData.data.value || []).indexOf(row);
  46348. if (rowIndex > -1 && !canRowExpand(row, rowIndex)) return;
  46349. if (toggleRowStatus(expandRows.value, row, expanded, void 0, void 0, void 0, watcherData.rowKey.value)) instance.emit("expand-change", row, expandRows.value.slice());
  46350. };
  46351. const setExpandRowKeys = (rowKeys) => {
  46352. instance.store.assertRowKey();
  46353. const data = watcherData.data.value || [];
  46354. const rowKey = watcherData.rowKey.value;
  46355. const keysMap = getKeysMap(data, rowKey);
  46356. expandRows.value = rowKeys.reduce((prev, cur) => {
  46357. const info = keysMap[cur];
  46358. if (info && canRowExpand(info.row, info.index)) prev.push(info.row);
  46359. return prev;
  46360. }, []);
  46361. };
  46362. const isRowExpanded = (row) => {
  46363. const rowKey = watcherData.rowKey.value;
  46364. if (rowKey) return !!getKeysMap(expandRows.value, rowKey)[getRowIdentity(row, rowKey)];
  46365. return expandRows.value.includes(row);
  46366. };
  46367. return {
  46368. updateExpandRows,
  46369. toggleRowExpansion,
  46370. setExpandRowKeys,
  46371. isRowExpanded,
  46372. states: {
  46373. expandRows,
  46374. defaultExpandAll
  46375. }
  46376. };
  46377. }
  46378. //#endregion
  46379. //#region node_modules/element-plus/es/components/table/src/store/current.mjs
  46380. function useCurrent(watcherData) {
  46381. const instance = getCurrentInstance();
  46382. const _currentRowKey = ref(null);
  46383. const currentRow = ref(null);
  46384. const setCurrentRowKey = (key) => {
  46385. instance.store.assertRowKey();
  46386. _currentRowKey.value = key;
  46387. setCurrentRowByKey(key);
  46388. };
  46389. const restoreCurrentRowKey = () => {
  46390. _currentRowKey.value = null;
  46391. };
  46392. const setCurrentRowByKey = (key) => {
  46393. const { data, rowKey } = watcherData;
  46394. const oldCurrentRow = currentRow.value;
  46395. let _currentRow = null;
  46396. if (rowKey.value) _currentRow = (unref(data) || []).find((item) => getRowIdentity(item, rowKey.value) === key) ?? null;
  46397. currentRow.value = _currentRow ?? null;
  46398. instance.emit("current-change", currentRow.value, oldCurrentRow);
  46399. };
  46400. const updateCurrentRow = (_currentRow) => {
  46401. const oldCurrentRow = currentRow.value;
  46402. if (_currentRow && _currentRow !== oldCurrentRow) {
  46403. currentRow.value = _currentRow;
  46404. instance.emit("current-change", currentRow.value, oldCurrentRow);
  46405. return;
  46406. }
  46407. if (!_currentRow && oldCurrentRow) {
  46408. currentRow.value = null;
  46409. instance.emit("current-change", null, oldCurrentRow);
  46410. }
  46411. };
  46412. const updateCurrentRowData = () => {
  46413. const rowKey = watcherData.rowKey.value;
  46414. const data = watcherData.data.value || [];
  46415. const oldCurrentRow = currentRow.value;
  46416. if (oldCurrentRow && !data.includes(oldCurrentRow)) if (rowKey) setCurrentRowByKey(getRowIdentity(oldCurrentRow, rowKey));
  46417. else {
  46418. currentRow.value = null;
  46419. instance.emit("current-change", null, oldCurrentRow);
  46420. }
  46421. else if (_currentRowKey.value) {
  46422. setCurrentRowByKey(_currentRowKey.value);
  46423. restoreCurrentRowKey();
  46424. }
  46425. };
  46426. return {
  46427. setCurrentRowKey,
  46428. restoreCurrentRowKey,
  46429. setCurrentRowByKey,
  46430. updateCurrentRow,
  46431. updateCurrentRowData,
  46432. states: {
  46433. _currentRowKey,
  46434. currentRow
  46435. }
  46436. };
  46437. }
  46438. //#endregion
  46439. //#region node_modules/element-plus/es/components/table/src/store/tree.mjs
  46440. function useTree$2(watcherData) {
  46441. const expandRowKeys = ref([]);
  46442. const treeData = ref({});
  46443. const indent = ref(16);
  46444. const lazy = ref(false);
  46445. const lazyTreeNodeMap = ref({});
  46446. const lazyColumnIdentifier = ref("hasChildren");
  46447. const childrenColumnName = ref("children");
  46448. const checkStrictly = ref(false);
  46449. const instance = getCurrentInstance();
  46450. const normalizedData = computed(() => {
  46451. if (!watcherData.rowKey.value) return {};
  46452. return normalize(watcherData.data.value || []);
  46453. });
  46454. const normalizedLazyNode = computed(() => {
  46455. const rowKey = watcherData.rowKey.value;
  46456. const keys = Object.keys(lazyTreeNodeMap.value);
  46457. const res = {};
  46458. if (!keys.length) return res;
  46459. keys.forEach((key) => {
  46460. if (lazyTreeNodeMap.value[key].length) {
  46461. const item = { children: [] };
  46462. lazyTreeNodeMap.value[key].forEach((row) => {
  46463. const currentRowKey = getRowIdentity(row, rowKey);
  46464. item.children.push(currentRowKey);
  46465. if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) res[currentRowKey] = { children: [] };
  46466. });
  46467. res[key] = item;
  46468. }
  46469. });
  46470. return res;
  46471. });
  46472. const normalize = (data) => {
  46473. const rowKey = watcherData.rowKey.value;
  46474. const res = {};
  46475. walkTreeNode(data, (parent, children, level) => {
  46476. const parentId = getRowIdentity(parent, rowKey);
  46477. if (isArray$1(children)) res[parentId] = {
  46478. children: children.map((row) => getRowIdentity(row, rowKey)),
  46479. level
  46480. };
  46481. else if (lazy.value) res[parentId] = {
  46482. children: [],
  46483. lazy: true,
  46484. level
  46485. };
  46486. }, childrenColumnName.value, lazyColumnIdentifier.value, lazy.value);
  46487. return res;
  46488. };
  46489. const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll) => {
  46490. ifExpandAll ||= instance.store?.states.defaultExpandAll.value;
  46491. const nested = normalizedData.value;
  46492. const normalizedLazyNode_ = normalizedLazyNode.value;
  46493. const keys = Object.keys(nested);
  46494. const newTreeData = {};
  46495. if (keys.length) {
  46496. const oldTreeData = unref(treeData);
  46497. const rootLazyRowKeys = [];
  46498. const getExpanded = (oldValue, key) => {
  46499. if (ifChangeExpandRowKeys) if (expandRowKeys.value) return ifExpandAll || expandRowKeys.value.includes(key);
  46500. else return !!(ifExpandAll || oldValue?.expanded);
  46501. else {
  46502. const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key);
  46503. return !!(oldValue?.expanded || included);
  46504. }
  46505. };
  46506. keys.forEach((key) => {
  46507. const oldValue = oldTreeData[key];
  46508. const newValue = { ...nested[key] };
  46509. newValue.expanded = getExpanded(oldValue, key);
  46510. if (newValue.lazy) {
  46511. const { loaded = false, loading = false } = oldValue || {};
  46512. newValue.loaded = !!loaded;
  46513. newValue.loading = !!loading;
  46514. rootLazyRowKeys.push(key);
  46515. }
  46516. newTreeData[key] = newValue;
  46517. });
  46518. const lazyKeys = Object.keys(normalizedLazyNode_);
  46519. if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) lazyKeys.forEach((key) => {
  46520. const oldValue = oldTreeData[key];
  46521. const lazyNodeChildren = normalizedLazyNode_[key].children;
  46522. if (rootLazyRowKeys.includes(key)) {
  46523. if (newTreeData[key].children?.length !== 0) throw new Error("[ElTable]children must be an empty array.");
  46524. newTreeData[key].children = lazyNodeChildren;
  46525. } else {
  46526. const { loaded = false, loading = false } = oldValue || {};
  46527. newTreeData[key] = {
  46528. lazy: true,
  46529. loaded: !!loaded,
  46530. loading: !!loading,
  46531. expanded: getExpanded(oldValue, key),
  46532. children: lazyNodeChildren,
  46533. level: void 0
  46534. };
  46535. }
  46536. });
  46537. }
  46538. treeData.value = newTreeData;
  46539. instance.store?.updateTableScrollY();
  46540. };
  46541. watch(() => expandRowKeys.value, () => {
  46542. updateTreeData(true);
  46543. }, { deep: true });
  46544. watch(() => normalizedData.value, () => {
  46545. updateTreeData();
  46546. });
  46547. watch(() => normalizedLazyNode.value, () => {
  46548. updateTreeData();
  46549. });
  46550. const updateTreeExpandKeys = (value) => {
  46551. expandRowKeys.value = value;
  46552. updateTreeData();
  46553. };
  46554. const isUseLazy = (data) => {
  46555. return lazy.value && data && "loaded" in data && !data.loaded;
  46556. };
  46557. const toggleTreeExpansion = (row, expanded) => {
  46558. instance.store.assertRowKey();
  46559. const rowKey = watcherData.rowKey.value;
  46560. const id = getRowIdentity(row, rowKey);
  46561. const data = id && treeData.value[id];
  46562. if (id && data && "expanded" in data) {
  46563. const oldExpanded = data.expanded;
  46564. expanded = isUndefined(expanded) ? !data.expanded : expanded;
  46565. treeData.value[id].expanded = expanded;
  46566. if (oldExpanded !== expanded) instance.emit("expand-change", row, expanded);
  46567. expanded && isUseLazy(data) && loadData(row, id, data);
  46568. instance.store.updateTableScrollY();
  46569. }
  46570. };
  46571. const loadOrToggle = (row) => {
  46572. instance.store.assertRowKey();
  46573. const rowKey = watcherData.rowKey.value;
  46574. const id = getRowIdentity(row, rowKey);
  46575. const data = treeData.value[id];
  46576. if (isUseLazy(data)) loadData(row, id, data);
  46577. else toggleTreeExpansion(row, void 0);
  46578. };
  46579. const loadData = (row, key, treeNode) => {
  46580. const { load } = instance.props;
  46581. if (load && !treeData.value[key].loaded) {
  46582. treeData.value[key].loading = true;
  46583. load(row, treeNode, (data) => {
  46584. if (!isArray$1(data)) throw new TypeError("[ElTable] data must be an array");
  46585. treeData.value[key].loading = false;
  46586. treeData.value[key].loaded = true;
  46587. treeData.value[key].expanded = true;
  46588. if (data.length) lazyTreeNodeMap.value = {
  46589. ...lazyTreeNodeMap.value,
  46590. [key]: data
  46591. };
  46592. instance.emit("expand-change", row, true);
  46593. });
  46594. }
  46595. };
  46596. const updateKeyChildren = (key, data) => {
  46597. const { lazy, rowKey } = instance.props;
  46598. if (!lazy) return;
  46599. if (!rowKey) throw new Error("[Table] rowKey is required in updateKeyChild");
  46600. if (lazyTreeNodeMap.value[key]) lazyTreeNodeMap.value = {
  46601. ...lazyTreeNodeMap.value,
  46602. [key]: data
  46603. };
  46604. };
  46605. return {
  46606. loadData,
  46607. loadOrToggle,
  46608. toggleTreeExpansion,
  46609. updateTreeExpandKeys,
  46610. updateTreeData,
  46611. updateKeyChildren,
  46612. normalize,
  46613. states: {
  46614. expandRowKeys,
  46615. treeData,
  46616. indent,
  46617. lazy,
  46618. lazyTreeNodeMap,
  46619. lazyColumnIdentifier,
  46620. childrenColumnName,
  46621. checkStrictly
  46622. }
  46623. };
  46624. }
  46625. //#endregion
  46626. //#region node_modules/element-plus/es/components/table/src/store/watcher.mjs
  46627. var sortData = (data, states) => {
  46628. const sortingColumn = states.sortingColumn;
  46629. if (!sortingColumn || isString(sortingColumn.sortable)) return data;
  46630. return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
  46631. };
  46632. var doFlattenColumns = (columns) => {
  46633. const result = [];
  46634. columns.forEach((column) => {
  46635. if (column.children && column.children.length > 0) result.push.apply(result, doFlattenColumns(column.children));
  46636. else result.push(column);
  46637. });
  46638. return result;
  46639. };
  46640. function useWatcher$1() {
  46641. const instance = getCurrentInstance();
  46642. const { size: tableSize } = toRefs(instance.proxy?.$props);
  46643. const rowKey = ref(null);
  46644. const data = ref([]);
  46645. const _data = ref([]);
  46646. const isComplex = ref(false);
  46647. const _columns = ref([]);
  46648. const originColumns = ref([]);
  46649. const columns = ref([]);
  46650. const fixedColumns = ref([]);
  46651. const rightFixedColumns = ref([]);
  46652. const leafColumns = ref([]);
  46653. const fixedLeafColumns = ref([]);
  46654. const rightFixedLeafColumns = ref([]);
  46655. const updateOrderFns = [];
  46656. const leafColumnsLength = ref(0);
  46657. const fixedLeafColumnsLength = ref(0);
  46658. const rightFixedLeafColumnsLength = ref(0);
  46659. const isAllSelected = ref(false);
  46660. const selection = ref([]);
  46661. const selectionIndeterminate = ref({});
  46662. const reserveSelection = ref(false);
  46663. const selectOnIndeterminate = ref(false);
  46664. const selectable = ref(null);
  46665. const rowExpandable = ref(null);
  46666. const filters = ref({});
  46667. const filteredData = ref(null);
  46668. const sortingColumn = ref(null);
  46669. const sortProp = ref(null);
  46670. const sortOrder = ref(null);
  46671. const hoverRow = ref(null);
  46672. const selectedMap = computed(() => {
  46673. return rowKey.value ? getKeysMap(selection.value, rowKey.value) : void 0;
  46674. });
  46675. const getRowChildren = (row) => {
  46676. const { childrenColumnName, lazyTreeNodeMap } = instance.store.states;
  46677. const inlineChildren = row[childrenColumnName.value] ?? [];
  46678. if (!rowKey.value) return inlineChildren;
  46679. const id = getRowIdentity(row, rowKey.value);
  46680. return [...lazyTreeNodeMap.value?.[id] ?? [], ...inlineChildren];
  46681. };
  46682. watch(data, () => {
  46683. if (instance.state) {
  46684. scheduleLayout(false);
  46685. if (instance.props.tableLayout === "auto") instance.refs.tableHeaderRef?.updateFixedColumnStyle();
  46686. }
  46687. }, { deep: true });
  46688. const assertRowKey = () => {
  46689. if (!rowKey.value) throw new Error("[ElTable] prop row-key is required");
  46690. };
  46691. const updateChildFixed = (column) => {
  46692. column.children?.forEach((childColumn) => {
  46693. childColumn.fixed = column.fixed;
  46694. updateChildFixed(childColumn);
  46695. });
  46696. };
  46697. const updateColumns = () => {
  46698. _columns.value.forEach((column) => {
  46699. updateChildFixed(column);
  46700. });
  46701. fixedColumns.value = _columns.value.filter((column) => [true, "left"].includes(column.fixed));
  46702. const selectColumn = _columns.value.find((column) => column.type === "selection");
  46703. let selectColFixLeft;
  46704. if (selectColumn && selectColumn.fixed !== "right" && !fixedColumns.value.includes(selectColumn)) {
  46705. if (_columns.value.indexOf(selectColumn) === 0 && fixedColumns.value.length) {
  46706. fixedColumns.value.unshift(selectColumn);
  46707. selectColFixLeft = true;
  46708. }
  46709. }
  46710. rightFixedColumns.value = _columns.value.filter((column) => column.fixed === "right");
  46711. const notFixedColumns = _columns.value.filter((column) => (selectColFixLeft ? column.type !== "selection" : true) && !column.fixed);
  46712. originColumns.value = Array.from(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value);
  46713. const leafColumns = doFlattenColumns(notFixedColumns);
  46714. const fixedLeafColumns = doFlattenColumns(fixedColumns.value);
  46715. const rightFixedLeafColumns = doFlattenColumns(rightFixedColumns.value);
  46716. leafColumnsLength.value = leafColumns.length;
  46717. fixedLeafColumnsLength.value = fixedLeafColumns.length;
  46718. rightFixedLeafColumnsLength.value = rightFixedLeafColumns.length;
  46719. columns.value = Array.from(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);
  46720. isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0;
  46721. };
  46722. const scheduleLayout = (needUpdateColumns, immediate = false) => {
  46723. if (needUpdateColumns) updateColumns();
  46724. if (immediate) instance.state.doLayout();
  46725. else instance.state.debouncedUpdateLayout();
  46726. };
  46727. const isSelected = (row) => {
  46728. if (selectedMap.value) return !!selectedMap.value[getRowIdentity(row, rowKey.value)];
  46729. else return selection.value.includes(row);
  46730. };
  46731. const rowIndexMap = computed(() => {
  46732. const map = /* @__PURE__ */ new Map();
  46733. if (!rowKey.value || !selectable.value) return map;
  46734. let index = 0;
  46735. const _traverse = (rows) => {
  46736. if (!isArray$1(rows)) return;
  46737. rows.forEach((row) => {
  46738. const id = getRowIdentity(row, rowKey.value);
  46739. map.set(id, index);
  46740. index += 1;
  46741. const children = getRowChildren(row);
  46742. if (children.length) _traverse(children);
  46743. });
  46744. };
  46745. _traverse(data.value || []);
  46746. return map;
  46747. });
  46748. const updateSelectionByChildren = (options = {}) => {
  46749. const { emitChange = true } = options;
  46750. if (treeStates.checkStrictly.value || !rowKey.value) {
  46751. selectionIndeterminate.value = {};
  46752. return;
  46753. }
  46754. const rowKeyValue = rowKey.value;
  46755. const rowIndexMapValue = options.rowIndexMap ?? rowIndexMap.value;
  46756. const selectableFn = selectable.value;
  46757. const rowIdCache = /* @__PURE__ */ new WeakMap();
  46758. const getCachedRowId = (row) => {
  46759. const cachedId = rowIdCache.get(row);
  46760. if (cachedId) return cachedId;
  46761. const id = getRowIdentity(row, rowKeyValue);
  46762. rowIdCache.set(row, id);
  46763. return id;
  46764. };
  46765. const indeterminateMap = {};
  46766. const selectedIdSet = new Set(selection.value.map((row) => getCachedRowId(row)));
  46767. const rowsToAdd = [];
  46768. let selectionChanged = false;
  46769. const _updateSelectionForRow = (row, id, selected) => {
  46770. const isRowSelected = selectedIdSet.has(id);
  46771. if (selected && !isRowSelected) {
  46772. rowsToAdd.push(row);
  46773. selectedIdSet.add(id);
  46774. selectionChanged = true;
  46775. } else if (!selected && isRowSelected) {
  46776. selectedIdSet.delete(id);
  46777. selectionChanged = true;
  46778. }
  46779. };
  46780. const _walk = (rows) => {
  46781. let selectedCount = 0;
  46782. let selectableCount = 0;
  46783. if (!isArray$1(rows)) return {
  46784. selectedCount,
  46785. selectableCount
  46786. };
  46787. rows.forEach((row) => {
  46788. const id = getCachedRowId(row);
  46789. const children = getRowChildren(row);
  46790. let childSelectedCount = 0;
  46791. let childSelectableCount = 0;
  46792. if (children.length) {
  46793. const childResult = _walk(children);
  46794. childSelectedCount = childResult.selectedCount;
  46795. childSelectableCount = childResult.selectableCount;
  46796. }
  46797. const rowSelectable = selectableFn ? selectableFn.call(null, row, rowIndexMapValue.get(id) ?? 0) : true;
  46798. if (rowSelectable) {
  46799. if (childSelectableCount > 0) {
  46800. const allSelected = childSelectedCount === childSelectableCount;
  46801. if (!allSelected && !(childSelectedCount === 0)) indeterminateMap[id] = true;
  46802. _updateSelectionForRow(row, id, allSelected);
  46803. }
  46804. }
  46805. if (rowSelectable) {
  46806. selectableCount += 1;
  46807. if (selectedIdSet.has(id)) selectedCount += 1;
  46808. }
  46809. selectedCount += childSelectedCount;
  46810. selectableCount += childSelectableCount;
  46811. });
  46812. return {
  46813. selectedCount,
  46814. selectableCount
  46815. };
  46816. };
  46817. _walk(data.value || []);
  46818. if (selectionChanged) {
  46819. const nextSelection = selection.value.filter((row) => selectedIdSet.has(getCachedRowId(row)));
  46820. rowsToAdd.forEach((row) => {
  46821. if (!selectedIdSet.has(getCachedRowId(row))) return;
  46822. nextSelection.push(row);
  46823. });
  46824. selection.value = nextSelection;
  46825. }
  46826. selectionIndeterminate.value = indeterminateMap;
  46827. if (selectionChanged && emitChange) instance.emit("selection-change", selection.value ? selection.value.slice() : []);
  46828. };
  46829. const clearSelection = () => {
  46830. isAllSelected.value = false;
  46831. const oldSelection = selection.value;
  46832. selection.value = [];
  46833. selectionIndeterminate.value = {};
  46834. if (oldSelection.length) instance.emit("selection-change", []);
  46835. };
  46836. const cleanSelection = () => {
  46837. let deleted;
  46838. if (rowKey.value) {
  46839. deleted = [];
  46840. const childrenKey = instance?.store?.states?.childrenColumnName.value;
  46841. const dataMap = getKeysMap(data.value, rowKey.value, true, childrenKey);
  46842. const { lazyTreeNodeMap } = instance.store.states;
  46843. if (lazyTreeNodeMap.value) Object.entries(lazyTreeNodeMap.value).forEach(([parentId, lazyRows]) => {
  46844. if (dataMap[parentId]) lazyRows.forEach((row) => {
  46845. const id = getRowIdentity(row, rowKey.value);
  46846. if (!dataMap[id]) dataMap[id] = {
  46847. row,
  46848. index: -1
  46849. };
  46850. });
  46851. });
  46852. for (const key in selectedMap.value) if (hasOwn(selectedMap.value, key) && !dataMap[key]) deleted.push(selectedMap.value[key].row);
  46853. } else deleted = selection.value.filter((item) => !data.value.includes(item));
  46854. if (deleted.length) {
  46855. const newSelection = selection.value.filter((item) => !deleted.includes(item));
  46856. selection.value = newSelection;
  46857. updateSelectionByChildren({ emitChange: false });
  46858. instance.emit("selection-change", [...newSelection]);
  46859. }
  46860. };
  46861. const getSelectionRows = () => {
  46862. return (selection.value || []).slice();
  46863. };
  46864. const cascadeToLazyChildren = (row, selected, rowIndexMap) => {
  46865. if (!rowKey.value || treeStates.checkStrictly.value || !treeStates.lazy.value) return;
  46866. const { lazyTreeNodeMap, childrenColumnName } = instance.store.states;
  46867. const id = getRowIdentity(row, rowKey.value);
  46868. const lazyChildren = lazyTreeNodeMap.value?.[id] ?? [];
  46869. const inlineChildren = row[childrenColumnName.value] ?? [];
  46870. const treeProps = {
  46871. children: childrenColumnName.value,
  46872. checkStrictly: false
  46873. };
  46874. for (const child of lazyChildren) {
  46875. const childIndex = rowIndexMap.get(getRowIdentity(child, rowKey.value)) ?? 0;
  46876. toggleRowStatus(selection.value, child, selected, treeProps, selectable.value, childIndex, rowKey.value);
  46877. cascadeToLazyChildren(child, selected, rowIndexMap);
  46878. }
  46879. for (const child of inlineChildren) cascadeToLazyChildren(child, selected, rowIndexMap);
  46880. };
  46881. const toggleRowSelection = (row, selected, emitChange = true, ignoreSelectable = false) => {
  46882. const treeProps = {
  46883. children: instance?.store?.states?.childrenColumnName.value,
  46884. checkStrictly: instance?.store?.states?.checkStrictly.value
  46885. };
  46886. if (toggleRowStatus(selection.value, row, selected, treeProps, ignoreSelectable ? void 0 : selectable.value, data.value.indexOf(row), rowKey.value)) {
  46887. if (treeStates.lazy.value && !treeStates.checkStrictly.value) {
  46888. cascadeToLazyChildren(row, selected ?? isSelected(row), rowIndexMap.value);
  46889. updateSelectionByChildren({
  46890. emitChange: false,
  46891. rowIndexMap: rowIndexMap.value
  46892. });
  46893. } else updateSelectionByChildren({ emitChange: false });
  46894. const newSelection = (selection.value || []).slice();
  46895. if (emitChange) instance.emit("select", newSelection, row);
  46896. instance.emit("selection-change", newSelection);
  46897. }
  46898. };
  46899. const _toggleAllSelection = () => {
  46900. const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length);
  46901. isAllSelected.value = value;
  46902. let selectionChanged = false;
  46903. let childrenCount = 0;
  46904. const rowKey = instance?.store?.states?.rowKey.value;
  46905. const { childrenColumnName } = instance.store.states;
  46906. const treeProps = {
  46907. children: childrenColumnName.value,
  46908. checkStrictly: false
  46909. };
  46910. data.value.forEach((row, index) => {
  46911. const rowIndex = index + childrenCount;
  46912. if (toggleRowStatus(selection.value, row, value, treeProps, selectable.value, rowIndex, rowKey)) selectionChanged = true;
  46913. childrenCount += getChildrenCount(getRowIdentity(row, rowKey));
  46914. });
  46915. const rowIndexMapVal = rowIndexMap.value;
  46916. if (treeStates.lazy.value && !treeStates.checkStrictly.value && rowKey) for (const lazyRows of Object.values(treeStates.lazyTreeNodeMap.value)) for (const child of lazyRows) {
  46917. const childIndex = rowIndexMapVal.get(getRowIdentity(child, rowKey)) ?? 0;
  46918. if (toggleRowStatus(selection.value, child, value, treeProps, selectable.value, childIndex, rowKey)) selectionChanged = true;
  46919. cascadeToLazyChildren(child, value, rowIndexMapVal);
  46920. }
  46921. updateSelectionByChildren({
  46922. emitChange: false,
  46923. rowIndexMap: rowIndexMapVal
  46924. });
  46925. if (selectionChanged) instance.emit("selection-change", selection.value ? [...selection.value] : []);
  46926. instance.emit("select-all", (selection.value || []).slice());
  46927. };
  46928. const updateAllSelected = () => {
  46929. if (data.value?.length === 0) {
  46930. isAllSelected.value = false;
  46931. return;
  46932. }
  46933. let rowIndex = 0;
  46934. let selectedCount = 0;
  46935. const checkSelectedStatus = (rows) => {
  46936. for (const row of rows) {
  46937. const isRowSelectable = selectable.value && selectable.value.call(null, row, rowIndex);
  46938. if (!isSelected(row)) {
  46939. if (!selectable.value || isRowSelectable) return false;
  46940. } else selectedCount++;
  46941. rowIndex++;
  46942. const children = getRowChildren(row);
  46943. if (children.length && !checkSelectedStatus(children)) return false;
  46944. }
  46945. return true;
  46946. };
  46947. const isAllSelected_ = checkSelectedStatus(data.value || []);
  46948. isAllSelected.value = selectedCount === 0 ? false : isAllSelected_;
  46949. };
  46950. const getRowIndeterminate = (row) => {
  46951. if (!rowKey.value) return false;
  46952. const id = getRowIdentity(row, rowKey.value);
  46953. return !!selectionIndeterminate.value[id];
  46954. };
  46955. const getChildrenCount = (rowKey) => {
  46956. if (!instance || !instance.store) return 0;
  46957. const { treeData } = instance.store.states;
  46958. let count = 0;
  46959. const children = treeData.value[rowKey]?.children;
  46960. if (children) {
  46961. count += children.length;
  46962. children.forEach((childKey) => {
  46963. count += getChildrenCount(childKey);
  46964. });
  46965. }
  46966. return count;
  46967. };
  46968. const updateFilters = (column, values) => {
  46969. const filters_ = {};
  46970. castArray$1(column).forEach((col) => {
  46971. filters.value[col.id] = values;
  46972. filters_[col.columnKey || col.id] = values;
  46973. });
  46974. return filters_;
  46975. };
  46976. const updateSort = (column, prop, order) => {
  46977. if (sortingColumn.value && sortingColumn.value !== column) sortingColumn.value.order = null;
  46978. sortingColumn.value = column;
  46979. sortProp.value = prop;
  46980. sortOrder.value = order;
  46981. };
  46982. const execFilter = () => {
  46983. let sourceData = unref(_data);
  46984. Object.keys(filters.value).forEach((columnId) => {
  46985. const values = filters.value[columnId];
  46986. if (!values || values.length === 0) return;
  46987. const column = getColumnById({ columns: columns.value }, columnId);
  46988. if (column && column.filterMethod) sourceData = sourceData.filter((row) => {
  46989. return values.some((value) => column.filterMethod.call(null, value, row, column));
  46990. });
  46991. });
  46992. filteredData.value = sourceData;
  46993. };
  46994. const execSort = () => {
  46995. data.value = sortData(filteredData.value ?? [], {
  46996. sortingColumn: sortingColumn.value,
  46997. sortProp: sortProp.value,
  46998. sortOrder: sortOrder.value
  46999. });
  47000. };
  47001. const execQuery = (ignore = void 0) => {
  47002. if (!ignore?.filter) execFilter();
  47003. execSort();
  47004. };
  47005. const clearFilter = (columnKeys) => {
  47006. const { tableHeaderRef } = instance.refs;
  47007. if (!tableHeaderRef) return;
  47008. const panels = Object.assign({}, tableHeaderRef.filterPanels);
  47009. const keys = Object.keys(panels);
  47010. if (!keys.length) return;
  47011. if (isString(columnKeys)) columnKeys = [columnKeys];
  47012. if (isArray$1(columnKeys)) {
  47013. const columns_ = columnKeys.map((key) => getColumnByKey({ columns: columns.value }, key));
  47014. keys.forEach((key) => {
  47015. const column = columns_.find((col) => col.id === key);
  47016. if (column) column.filteredValue = [];
  47017. });
  47018. instance.store.commit("filterChange", {
  47019. column: columns_,
  47020. values: [],
  47021. silent: true,
  47022. multi: true
  47023. });
  47024. } else {
  47025. keys.forEach((key) => {
  47026. const column = columns.value.find((col) => col.id === key);
  47027. if (column) column.filteredValue = [];
  47028. });
  47029. filters.value = {};
  47030. instance.store.commit("filterChange", {
  47031. column: {},
  47032. values: [],
  47033. silent: true
  47034. });
  47035. }
  47036. };
  47037. const clearSort = () => {
  47038. if (!sortingColumn.value) return;
  47039. updateSort(null, null, null);
  47040. instance.store.commit("changeSortCondition", { silent: true });
  47041. };
  47042. const { setExpandRowKeys, toggleRowExpansion, updateExpandRows, states: expandStates, isRowExpanded } = useExpand({
  47043. data,
  47044. rowKey
  47045. });
  47046. const { updateTreeExpandKeys, toggleTreeExpansion, updateTreeData, updateKeyChildren, loadOrToggle, states: treeStates } = useTree$2({
  47047. data,
  47048. rowKey
  47049. });
  47050. const { updateCurrentRowData, updateCurrentRow, setCurrentRowKey, states: currentData } = useCurrent({
  47051. data,
  47052. rowKey
  47053. });
  47054. const setExpandRowKeysAdapter = (val) => {
  47055. setExpandRowKeys(val);
  47056. updateTreeExpandKeys(val);
  47057. };
  47058. const toggleRowExpansionAdapter = (row, expanded) => {
  47059. if (columns.value.some(({ type }) => type === "expand")) toggleRowExpansion(row, expanded);
  47060. else toggleTreeExpansion(row, expanded);
  47061. };
  47062. watch(() => treeStates.checkStrictly.value, (value) => {
  47063. if (value) selectionIndeterminate.value = {};
  47064. else updateSelectionByChildren({ emitChange: false });
  47065. updateAllSelected();
  47066. });
  47067. watch(() => treeStates.lazyTreeNodeMap.value, () => {
  47068. if (!treeStates.lazy.value || treeStates.checkStrictly.value || !rowKey.value) return;
  47069. const rowIndexMapVal = rowIndexMap.value;
  47070. const prevLen = selection.value.length;
  47071. for (const parentId of Object.keys(treeStates.lazyTreeNodeMap.value)) {
  47072. if (!selectedMap.value?.[parentId]) continue;
  47073. cascadeToLazyChildren(selectedMap.value[parentId].row, true, rowIndexMapVal);
  47074. }
  47075. const cascadeChanged = selection.value.length !== prevLen;
  47076. updateSelectionByChildren({
  47077. emitChange: !cascadeChanged,
  47078. rowIndexMap: rowIndexMapVal
  47079. });
  47080. updateAllSelected();
  47081. if (cascadeChanged) instance.emit("selection-change", [...selection.value]);
  47082. });
  47083. return {
  47084. assertRowKey,
  47085. updateColumns,
  47086. scheduleLayout,
  47087. isSelected,
  47088. clearSelection,
  47089. cleanSelection,
  47090. getSelectionRows,
  47091. toggleRowSelection,
  47092. _toggleAllSelection,
  47093. toggleAllSelection: null,
  47094. updateAllSelected,
  47095. updateSelectionByChildren,
  47096. getRowIndeterminate,
  47097. updateFilters,
  47098. updateCurrentRow,
  47099. updateSort,
  47100. execFilter,
  47101. execSort,
  47102. execQuery,
  47103. clearFilter,
  47104. clearSort,
  47105. toggleRowExpansion,
  47106. setExpandRowKeysAdapter,
  47107. setCurrentRowKey,
  47108. toggleRowExpansionAdapter,
  47109. isRowExpanded,
  47110. updateExpandRows,
  47111. updateCurrentRowData,
  47112. loadOrToggle,
  47113. updateTreeData,
  47114. updateKeyChildren,
  47115. states: {
  47116. tableSize,
  47117. rowKey,
  47118. data,
  47119. _data,
  47120. isComplex,
  47121. _columns,
  47122. originColumns,
  47123. columns,
  47124. fixedColumns,
  47125. rightFixedColumns,
  47126. leafColumns,
  47127. fixedLeafColumns,
  47128. rightFixedLeafColumns,
  47129. updateOrderFns,
  47130. leafColumnsLength,
  47131. fixedLeafColumnsLength,
  47132. rightFixedLeafColumnsLength,
  47133. isAllSelected,
  47134. selection,
  47135. selectionIndeterminate,
  47136. reserveSelection,
  47137. selectOnIndeterminate,
  47138. selectable,
  47139. rowExpandable,
  47140. filters,
  47141. filteredData,
  47142. sortingColumn,
  47143. sortProp,
  47144. sortOrder,
  47145. hoverRow,
  47146. ...expandStates,
  47147. ...treeStates,
  47148. ...currentData
  47149. }
  47150. };
  47151. }
  47152. //#endregion
  47153. //#region node_modules/element-plus/es/components/table/src/store/index.mjs
  47154. function replaceColumn(array, column) {
  47155. return array.map((item) => {
  47156. if (item.id === column.id) return column;
  47157. else if (item.children?.length) item.children = replaceColumn(item.children, column);
  47158. return item;
  47159. });
  47160. }
  47161. function sortColumn(array) {
  47162. array.forEach((item) => {
  47163. item.no = item.getColumnIndex?.();
  47164. if (item.children?.length) sortColumn(item.children);
  47165. });
  47166. array.sort((cur, pre) => cur.no - pre.no);
  47167. }
  47168. function useStore() {
  47169. const instance = getCurrentInstance();
  47170. const watcher = useWatcher$1();
  47171. const ns = useNamespace("table");
  47172. const { t } = useLocale();
  47173. const mutations = {
  47174. setData(states, data) {
  47175. const dataInstanceChanged = unref(states._data) !== data;
  47176. states.data.value = data;
  47177. states._data.value = data;
  47178. instance.store.execQuery();
  47179. instance.store.updateCurrentRowData();
  47180. instance.store.updateExpandRows();
  47181. instance.store.updateTreeData(instance.store.states.defaultExpandAll.value);
  47182. if (unref(states.reserveSelection)) instance.store.assertRowKey();
  47183. else if (dataInstanceChanged) instance.store.clearSelection();
  47184. else instance.store.cleanSelection();
  47185. instance.store.updateSelectionByChildren({ emitChange: false });
  47186. instance.store.updateAllSelected();
  47187. if (instance.$ready) instance.store.scheduleLayout();
  47188. },
  47189. insertColumn(states, column, parent, updateColumnOrder) {
  47190. const array = unref(states._columns);
  47191. let newColumns = [];
  47192. if (!parent) {
  47193. array.push(column);
  47194. newColumns = array;
  47195. } else {
  47196. if (parent && !parent.children) parent.children = [];
  47197. parent.children?.push(column);
  47198. newColumns = replaceColumn(array, parent);
  47199. }
  47200. sortColumn(newColumns);
  47201. states._columns.value = newColumns;
  47202. states.updateOrderFns.push(updateColumnOrder);
  47203. if (column.type === "selection") {
  47204. states.selectable.value = column.selectable;
  47205. states.reserveSelection.value = column.reserveSelection;
  47206. }
  47207. if (instance.$ready) {
  47208. instance.store.updateColumns();
  47209. instance.store.scheduleLayout();
  47210. }
  47211. },
  47212. updateColumnOrder(states, column) {
  47213. if (column.getColumnIndex?.() === column.no) return;
  47214. sortColumn(states._columns.value);
  47215. if (instance.$ready) instance.store.updateColumns();
  47216. },
  47217. removeColumn(states, column, parent, updateColumnOrder) {
  47218. const array = unref(states._columns) || [];
  47219. if (parent) {
  47220. parent.children?.splice(parent.children.findIndex((item) => item.id === column.id), 1);
  47221. nextTick(() => {
  47222. if (parent.children?.length === 0) delete parent.children;
  47223. });
  47224. states._columns.value = replaceColumn(array, parent);
  47225. } else {
  47226. const index = array.indexOf(column);
  47227. if (index > -1) {
  47228. array.splice(index, 1);
  47229. states._columns.value = array;
  47230. }
  47231. }
  47232. const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder);
  47233. updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1);
  47234. if (instance.$ready) {
  47235. instance.store.updateColumns();
  47236. instance.store.scheduleLayout();
  47237. }
  47238. },
  47239. sort(states, options) {
  47240. const { prop, order, init } = options;
  47241. if (prop) {
  47242. const column = unref(states.columns).find((column) => column.property === prop);
  47243. if (column) {
  47244. column.order = order;
  47245. instance.store.updateSort(column, prop, order);
  47246. instance.store.commit("changeSortCondition", { init });
  47247. }
  47248. }
  47249. },
  47250. changeSortCondition(states, options) {
  47251. const { sortingColumn, sortProp, sortOrder } = states;
  47252. const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder);
  47253. if (isNull(orderValue)) {
  47254. states.sortingColumn.value = null;
  47255. states.sortProp.value = null;
  47256. }
  47257. instance.store.execQuery({ filter: true });
  47258. if (!options || !(options.silent || options.init)) instance.emit("sort-change", {
  47259. column: columnValue,
  47260. prop: propValue,
  47261. order: orderValue
  47262. });
  47263. instance.store.updateTableScrollY();
  47264. },
  47265. filterChange(_states, options) {
  47266. const { column, values, silent } = options;
  47267. const newFilters = instance.store.updateFilters(column, values);
  47268. instance.store.execQuery();
  47269. if (!silent) instance.emit("filter-change", newFilters);
  47270. instance.store.updateTableScrollY();
  47271. },
  47272. toggleAllSelection() {
  47273. instance.store.toggleAllSelection?.();
  47274. },
  47275. rowSelectedChanged(_states, row) {
  47276. instance.store.toggleRowSelection(row);
  47277. instance.store.updateAllSelected();
  47278. },
  47279. setHoverRow(states, row) {
  47280. states.hoverRow.value = row;
  47281. },
  47282. setCurrentRow(_states, row) {
  47283. instance.store.updateCurrentRow(row);
  47284. }
  47285. };
  47286. const commit = function(name, ...args) {
  47287. const mutations = instance.store.mutations;
  47288. if (mutations[name]) mutations[name].apply(instance, [instance.store.states, ...args]);
  47289. else throw new Error(`Action not found: ${name}`);
  47290. };
  47291. const updateTableScrollY = function() {
  47292. nextTick(() => instance.layout.updateScrollY.apply(instance.layout));
  47293. };
  47294. return {
  47295. ns,
  47296. t,
  47297. ...watcher,
  47298. mutations,
  47299. commit,
  47300. updateTableScrollY
  47301. };
  47302. }
  47303. //#endregion
  47304. //#region node_modules/element-plus/es/components/table/src/store/helper.mjs
  47305. var InitialStateMap = {
  47306. rowKey: "rowKey",
  47307. defaultExpandAll: "defaultExpandAll",
  47308. rowExpandable: "rowExpandable",
  47309. selectOnIndeterminate: "selectOnIndeterminate",
  47310. indent: "indent",
  47311. lazy: "lazy",
  47312. ["treeProps.hasChildren"]: {
  47313. key: "lazyColumnIdentifier",
  47314. default: "hasChildren"
  47315. },
  47316. ["treeProps.children"]: {
  47317. key: "childrenColumnName",
  47318. default: "children"
  47319. },
  47320. ["treeProps.checkStrictly"]: {
  47321. key: "checkStrictly",
  47322. default: false
  47323. }
  47324. };
  47325. function createStore(table, props) {
  47326. if (!table) throw new Error("Table is required.");
  47327. const store = useStore();
  47328. store.toggleAllSelection = debounce(store._toggleAllSelection, 10);
  47329. Object.keys(InitialStateMap).forEach((key) => {
  47330. handleValue(getArrKeysValue(props, key), key, store);
  47331. });
  47332. proxyTableProps(store, props);
  47333. return store;
  47334. }
  47335. function proxyTableProps(store, props) {
  47336. Object.keys(InitialStateMap).forEach((key) => {
  47337. watch(() => getArrKeysValue(props, key), (value) => {
  47338. handleValue(value, key, store);
  47339. });
  47340. });
  47341. }
  47342. function handleValue(value, propsKey, store) {
  47343. let newVal = value;
  47344. let storeKey = InitialStateMap[propsKey];
  47345. if (isObject$2(storeKey)) {
  47346. newVal = newVal || storeKey.default;
  47347. storeKey = storeKey.key;
  47348. }
  47349. store.states[storeKey].value = newVal;
  47350. }
  47351. function getArrKeysValue(props, key) {
  47352. if (key.includes(".")) {
  47353. const keyList = key.split(".");
  47354. let value = props;
  47355. keyList.forEach((k) => {
  47356. value = value[k];
  47357. });
  47358. return value;
  47359. } else return props[key];
  47360. }
  47361. //#endregion
  47362. //#region node_modules/element-plus/es/components/table/src/table-layout.mjs
  47363. var TableLayout = class {
  47364. constructor(options) {
  47365. this.observers = [];
  47366. this.table = null;
  47367. this.store = null;
  47368. this.columns = [];
  47369. this.fit = true;
  47370. this.showHeader = true;
  47371. this.heightMap = {};
  47372. this.height = ref(null);
  47373. this.scrollX = ref(false);
  47374. this.scrollY = ref(false);
  47375. this.bodyWidth = ref(null);
  47376. this.fixedWidth = ref(null);
  47377. this.rightFixedWidth = ref(null);
  47378. this.gutterWidth = 0;
  47379. for (const name in options) if (hasOwn(options, name)) if (isRef(this[name])) this[name].value = options[name];
  47380. else this[name] = options[name];
  47381. if (!this.table) throw new Error("Table is required for Table Layout");
  47382. if (!this.store) throw new Error("Store is required for Table Layout");
  47383. }
  47384. updateScrollY() {
  47385. const height = this.height.value;
  47386. /**
  47387. * When the height is not initialized, it is null.
  47388. * After the table is initialized, when the height is not configured, the height is 0.
  47389. */
  47390. if (isNull(height)) return false;
  47391. const scrollBarRef = this.table.refs.scrollBarRef;
  47392. if (this.table.vnode.el && scrollBarRef?.wrapRef) {
  47393. let scrollY = true;
  47394. const prevScrollY = this.scrollY.value;
  47395. scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight;
  47396. this.scrollY.value = scrollY;
  47397. return prevScrollY !== scrollY;
  47398. }
  47399. return false;
  47400. }
  47401. setHeight(value, prop = "height") {
  47402. if (!isClient) return;
  47403. const el = this.table.vnode.el;
  47404. value = parseHeight(value);
  47405. this.height.value = Number(value);
  47406. this.heightMap[prop] = value;
  47407. if (!el && (value || value === 0)) {
  47408. nextTick(() => {
  47409. if (this.heightMap[prop] === value) this.setHeight(value, prop);
  47410. });
  47411. return;
  47412. }
  47413. if (el && isNumber(value)) {
  47414. el.style[prop] = `${value}px`;
  47415. this.updateElsHeight();
  47416. } else if (el && isString(value)) {
  47417. el.style[prop] = value;
  47418. this.updateElsHeight();
  47419. }
  47420. }
  47421. setMaxHeight(value) {
  47422. this.setHeight(value, "max-height");
  47423. }
  47424. getFlattenColumns() {
  47425. const flattenColumns = [];
  47426. this.table.store.states.columns.value.forEach((column) => {
  47427. if (column.isColumnGroup) flattenColumns.push.apply(flattenColumns, column.columns);
  47428. else flattenColumns.push(column);
  47429. });
  47430. return flattenColumns;
  47431. }
  47432. updateElsHeight() {
  47433. this.updateScrollY();
  47434. this.notifyObservers("scrollable");
  47435. }
  47436. headerDisplayNone(elm) {
  47437. if (!elm) return true;
  47438. let headerChild = elm;
  47439. while (headerChild.tagName !== "DIV") {
  47440. if (getComputedStyle(headerChild).display === "none") return true;
  47441. headerChild = headerChild.parentElement;
  47442. }
  47443. return false;
  47444. }
  47445. updateColumnsWidth() {
  47446. if (!isClient) return;
  47447. const fit = this.fit;
  47448. const bodyWidth = this.table.vnode.el?.clientWidth;
  47449. let bodyMinWidth = 0;
  47450. const flattenColumns = this.getFlattenColumns();
  47451. const flexColumns = flattenColumns.filter((column) => !isNumber(column.width));
  47452. flattenColumns.forEach((column) => {
  47453. if (isNumber(column.width) && column.realWidth) column.realWidth = null;
  47454. });
  47455. if (flexColumns.length > 0 && fit) {
  47456. flattenColumns.forEach((column) => {
  47457. bodyMinWidth += Number(column.width || column.minWidth || 80);
  47458. });
  47459. if (bodyMinWidth <= bodyWidth) {
  47460. this.scrollX.value = false;
  47461. const totalFlexWidth = bodyWidth - bodyMinWidth;
  47462. if (flexColumns.length === 1) flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth;
  47463. else {
  47464. const flexWidthPerPixel = totalFlexWidth / flexColumns.reduce((prev, column) => prev + Number(column.minWidth || 80), 0);
  47465. let noneFirstWidth = 0;
  47466. flexColumns.forEach((column, index) => {
  47467. if (index === 0) return;
  47468. const flexWidth = Math.floor(Number(column.minWidth || 80) * flexWidthPerPixel);
  47469. noneFirstWidth += flexWidth;
  47470. column.realWidth = Number(column.minWidth || 80) + flexWidth;
  47471. });
  47472. flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
  47473. }
  47474. } else {
  47475. this.scrollX.value = true;
  47476. flexColumns.forEach((column) => {
  47477. column.realWidth = Number(column.minWidth);
  47478. });
  47479. }
  47480. this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth);
  47481. this.table.state.resizeState.value.width = this.bodyWidth.value;
  47482. } else {
  47483. flattenColumns.forEach((column) => {
  47484. if (!column.width && !column.minWidth) column.realWidth = 80;
  47485. else column.realWidth = Number(column.width || column.minWidth);
  47486. bodyMinWidth += column.realWidth;
  47487. });
  47488. this.scrollX.value = bodyMinWidth > bodyWidth;
  47489. this.bodyWidth.value = bodyMinWidth;
  47490. }
  47491. const fixedColumns = this.store.states.fixedColumns.value;
  47492. if (fixedColumns.length > 0) {
  47493. let fixedWidth = 0;
  47494. fixedColumns.forEach((column) => {
  47495. fixedWidth += Number(column.realWidth || column.width);
  47496. });
  47497. this.fixedWidth.value = fixedWidth;
  47498. }
  47499. const rightFixedColumns = this.store.states.rightFixedColumns.value;
  47500. if (rightFixedColumns.length > 0) {
  47501. let rightFixedWidth = 0;
  47502. rightFixedColumns.forEach((column) => {
  47503. rightFixedWidth += Number(column.realWidth || column.width);
  47504. });
  47505. this.rightFixedWidth.value = rightFixedWidth;
  47506. }
  47507. this.notifyObservers("columns");
  47508. }
  47509. addObserver(observer) {
  47510. this.observers.push(observer);
  47511. }
  47512. removeObserver(observer) {
  47513. const index = this.observers.indexOf(observer);
  47514. if (index !== -1) this.observers.splice(index, 1);
  47515. }
  47516. notifyObservers(event) {
  47517. this.observers.forEach((observer) => {
  47518. switch (event) {
  47519. case "columns":
  47520. observer.state?.onColumnsChange(this);
  47521. break;
  47522. case "scrollable":
  47523. observer.state?.onScrollableChange(this);
  47524. break;
  47525. default: throw new Error(`Table Layout don't have event ${event}.`);
  47526. }
  47527. });
  47528. }
  47529. };
  47530. //#endregion
  47531. //#region node_modules/element-plus/es/components/table/src/tokens.mjs
  47532. var TABLE_INJECTION_KEY = Symbol("ElTable");
  47533. //#endregion
  47534. //#region node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs
  47535. var getAllColumns = (columns) => {
  47536. const result = [];
  47537. columns.forEach((column) => {
  47538. if (column.children) {
  47539. result.push(column);
  47540. result.push.apply(result, getAllColumns(column.children));
  47541. } else result.push(column);
  47542. });
  47543. return result;
  47544. };
  47545. var convertToRows = (originColumns) => {
  47546. let maxLevel = 1;
  47547. const traverse = (column, parent) => {
  47548. if (parent) {
  47549. column.level = parent.level + 1;
  47550. if (maxLevel < column.level) maxLevel = column.level;
  47551. }
  47552. if (column.children) {
  47553. let colSpan = 0;
  47554. column.children.forEach((subColumn) => {
  47555. traverse(subColumn, column);
  47556. colSpan += subColumn.colSpan;
  47557. });
  47558. column.colSpan = colSpan;
  47559. } else column.colSpan = 1;
  47560. };
  47561. originColumns.forEach((column) => {
  47562. column.level = 1;
  47563. traverse(column, void 0);
  47564. });
  47565. const rows = [];
  47566. for (let i = 0; i < maxLevel; i++) rows.push([]);
  47567. getAllColumns(originColumns).forEach((column) => {
  47568. if (!column.children) column.rowSpan = maxLevel - column.level + 1;
  47569. else {
  47570. column.rowSpan = 1;
  47571. column.children.forEach((col) => col.isSubColumn = true);
  47572. }
  47573. rows[column.level - 1].push(column);
  47574. });
  47575. return rows;
  47576. };
  47577. function useUtils$1(props) {
  47578. const parent = inject(TABLE_INJECTION_KEY);
  47579. const columnRows = computed(() => {
  47580. return convertToRows(props.store.states.originColumns.value);
  47581. });
  47582. const isGroup = computed(() => {
  47583. const result = columnRows.value.length > 1;
  47584. if (result && parent) parent.state.isGroup.value = true;
  47585. return result;
  47586. });
  47587. const toggleAllSelection = (event) => {
  47588. event.stopPropagation();
  47589. parent?.store.commit("toggleAllSelection");
  47590. };
  47591. return {
  47592. isGroup,
  47593. toggleAllSelection,
  47594. columnRows
  47595. };
  47596. }
  47597. //#endregion
  47598. //#region node_modules/element-plus/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs
  47599. var filter_panel_vue_vue_type_script_lang_default = defineComponent({
  47600. name: "ElTableFilterPanel",
  47601. components: {
  47602. ElCheckbox,
  47603. ElCheckboxGroup,
  47604. ElScrollbar,
  47605. ElTooltip,
  47606. ElIcon,
  47607. ArrowDown: arrow_down_default,
  47608. ArrowUp: arrow_up_default
  47609. },
  47610. props: {
  47611. placement: {
  47612. type: String,
  47613. default: "bottom-start"
  47614. },
  47615. store: { type: Object },
  47616. column: { type: Object },
  47617. upDataColumn: { type: Function },
  47618. appendTo: useTooltipContentProps.appendTo
  47619. },
  47620. setup(props) {
  47621. const instance = getCurrentInstance();
  47622. const { t } = useLocale();
  47623. const ns = useNamespace("table-filter");
  47624. const parent = instance?.parent;
  47625. if (props.column && !parent.filterPanels.value[props.column.id]) parent.filterPanels.value[props.column.id] = instance;
  47626. const tooltipRef = ref(null);
  47627. const rootRef = ref(null);
  47628. const checkedIndex = ref(0);
  47629. const filters = computed(() => {
  47630. return props.column && props.column.filters;
  47631. });
  47632. const filterClassName = computed(() => {
  47633. if (props.column && props.column.filterClassName) return `${ns.b()} ${props.column.filterClassName}`;
  47634. return ns.b();
  47635. });
  47636. const filterValue = computed({
  47637. get: () => (props.column?.filteredValue || [])[0],
  47638. set: (value) => {
  47639. if (filteredValue.value) if (!isPropAbsent(value)) filteredValue.value.splice(0, 1, value);
  47640. else filteredValue.value.splice(0, 1);
  47641. }
  47642. });
  47643. const filteredValue = computed({
  47644. get() {
  47645. if (props.column) return props.column.filteredValue || [];
  47646. return [];
  47647. },
  47648. set(value) {
  47649. if (props.column) props.upDataColumn?.("filteredValue", value);
  47650. }
  47651. });
  47652. const multiple = computed(() => {
  47653. if (props.column) return props.column.filterMultiple;
  47654. return true;
  47655. });
  47656. const isActive = (filter) => {
  47657. return filter.value === filterValue.value;
  47658. };
  47659. const hidden = () => {
  47660. tooltipRef.value?.onClose();
  47661. };
  47662. const handleConfirm = () => {
  47663. confirmFilter(filteredValue.value);
  47664. hidden();
  47665. };
  47666. const handleReset = () => {
  47667. filteredValue.value = [];
  47668. confirmFilter(filteredValue.value);
  47669. hidden();
  47670. };
  47671. const handleSelect = (_filterValue, index) => {
  47672. filterValue.value = _filterValue;
  47673. checkedIndex.value = index;
  47674. if (!isPropAbsent(_filterValue)) confirmFilter(filteredValue.value);
  47675. else confirmFilter([]);
  47676. hidden();
  47677. };
  47678. const confirmFilter = (filteredValue) => {
  47679. props.store?.commit("filterChange", {
  47680. column: props.column,
  47681. values: filteredValue
  47682. });
  47683. props.store?.updateAllSelected();
  47684. };
  47685. const handleShowTooltip = () => {
  47686. rootRef.value?.focus();
  47687. !multiple.value && initCheckedIndex();
  47688. if (props.column) props.upDataColumn?.("filterOpened", true);
  47689. };
  47690. const handleHideTooltip = () => {
  47691. if (props.column) props.upDataColumn?.("filterOpened", false);
  47692. };
  47693. const initCheckedIndex = () => {
  47694. if (isPropAbsent(filterValue)) {
  47695. checkedIndex.value = 0;
  47696. return;
  47697. }
  47698. const idx = (filters.value || []).findIndex((item) => {
  47699. return item.value === filterValue.value;
  47700. });
  47701. checkedIndex.value = idx >= 0 ? idx + 1 : 0;
  47702. };
  47703. const handleKeydown = (event) => {
  47704. const code = getEventCode(event);
  47705. const len = (filters.value ? filters.value.length : 0) + 1;
  47706. let index = checkedIndex.value;
  47707. let isPreventDefault = true;
  47708. switch (code) {
  47709. case EVENT_CODE.down:
  47710. case EVENT_CODE.right:
  47711. index = (index + 1) % len;
  47712. break;
  47713. case EVENT_CODE.up:
  47714. case EVENT_CODE.left:
  47715. index = (index - 1 + len) % len;
  47716. break;
  47717. case EVENT_CODE.tab:
  47718. hidden();
  47719. isPreventDefault = false;
  47720. break;
  47721. case EVENT_CODE.enter:
  47722. case EVENT_CODE.space:
  47723. if (index === 0) handleSelect(null, 0);
  47724. else {
  47725. const item = (filters.value || [])[index - 1];
  47726. item.value && handleSelect(item.value, index);
  47727. }
  47728. break;
  47729. default:
  47730. isPreventDefault = false;
  47731. break;
  47732. }
  47733. isPreventDefault && event.preventDefault();
  47734. checkedIndex.value = index;
  47735. rootRef.value?.querySelector(`.${ns.e("list-item")}:nth-child(${index + 1})`)?.focus();
  47736. };
  47737. return {
  47738. multiple,
  47739. filterClassName,
  47740. filteredValue,
  47741. filterValue,
  47742. filters,
  47743. handleConfirm,
  47744. handleReset,
  47745. handleSelect,
  47746. isPropAbsent,
  47747. isActive,
  47748. t,
  47749. ns,
  47750. tooltipRef,
  47751. rootRef,
  47752. checkedIndex,
  47753. handleShowTooltip,
  47754. handleHideTooltip,
  47755. handleKeydown
  47756. };
  47757. }
  47758. });
  47759. //#endregion
  47760. //#region node_modules/element-plus/es/components/table/src/filter-panel.mjs
  47761. var _hoisted_1$17 = ["disabled"];
  47762. var _hoisted_2$10 = ["tabindex", "aria-checked"];
  47763. var _hoisted_3$3 = [
  47764. "tabindex",
  47765. "aria-checked",
  47766. "onClick"
  47767. ];
  47768. var _hoisted_4$2 = ["aria-label"];
  47769. function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  47770. const _component_el_checkbox = resolveComponent("el-checkbox");
  47771. const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
  47772. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  47773. const _component_arrow_up = resolveComponent("arrow-up");
  47774. const _component_arrow_down = resolveComponent("arrow-down");
  47775. const _component_el_icon = resolveComponent("el-icon");
  47776. const _component_el_tooltip = resolveComponent("el-tooltip");
  47777. return openBlock(), createBlock(_component_el_tooltip, {
  47778. ref: "tooltipRef",
  47779. offset: 0,
  47780. placement: _ctx.placement,
  47781. "show-arrow": false,
  47782. trigger: "click",
  47783. role: "dialog",
  47784. teleported: "",
  47785. effect: "light",
  47786. pure: "",
  47787. loop: "",
  47788. "popper-class": _ctx.filterClassName,
  47789. persistent: "",
  47790. "append-to": _ctx.appendTo,
  47791. onShow: _ctx.handleShowTooltip,
  47792. onHide: _ctx.handleHideTooltip
  47793. }, {
  47794. content: withCtx(() => [_ctx.multiple ? (openBlock(), createElementBlock("div", {
  47795. key: 0,
  47796. ref: "rootRef",
  47797. tabindex: "-1",
  47798. class: normalizeClass(_ctx.ns.e("multiple"))
  47799. }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("content")) }, [createVNode(_component_el_scrollbar, { "wrap-class": _ctx.ns.e("wrap") }, {
  47800. default: withCtx(() => [createVNode(_component_el_checkbox_group, {
  47801. modelValue: _ctx.filteredValue,
  47802. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.filteredValue = $event),
  47803. class: normalizeClass(_ctx.ns.e("checkbox-group"))
  47804. }, {
  47805. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter) => {
  47806. return openBlock(), createBlock(_component_el_checkbox, {
  47807. key: filter.value,
  47808. value: filter.value
  47809. }, {
  47810. default: withCtx(() => [createTextVNode(toDisplayString(filter.text), 1)]),
  47811. _: 2
  47812. }, 1032, ["value"]);
  47813. }), 128))]),
  47814. _: 1
  47815. }, 8, ["modelValue", "class"])]),
  47816. _: 1
  47817. }, 8, ["wrap-class"])], 2), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("bottom")) }, [createBaseVNode("button", {
  47818. class: normalizeClass(_ctx.ns.is("disabled", _ctx.filteredValue.length === 0)),
  47819. disabled: _ctx.filteredValue.length === 0,
  47820. type: "button",
  47821. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args))
  47822. }, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, _hoisted_1$17), createBaseVNode("button", {
  47823. type: "button",
  47824. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args))
  47825. }, toDisplayString(_ctx.t("el.table.resetFilter")), 1)], 2)], 2)) : (openBlock(), createElementBlock("ul", {
  47826. key: 1,
  47827. ref: "rootRef",
  47828. tabindex: "-1",
  47829. role: "radiogroup",
  47830. class: normalizeClass(_ctx.ns.e("list")),
  47831. onKeydown: _cache[4] || (_cache[4] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
  47832. }, [createBaseVNode("li", {
  47833. role: "radio",
  47834. class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isPropAbsent(_ctx.filterValue))]),
  47835. tabindex: _ctx.checkedIndex === 0 ? 0 : -1,
  47836. "aria-checked": _ctx.isPropAbsent(_ctx.filterValue),
  47837. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null, 0))
  47838. }, toDisplayString(_ctx.t("el.table.clearFilter")), 11, _hoisted_2$10), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter, idx) => {
  47839. return openBlock(), createElementBlock("li", {
  47840. key: filter.value,
  47841. role: "radio",
  47842. class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter))]),
  47843. tabindex: _ctx.checkedIndex === idx + 1 ? 0 : -1,
  47844. "aria-checked": _ctx.isActive(filter),
  47845. onClick: ($event) => _ctx.handleSelect(filter.value, idx + 1)
  47846. }, toDisplayString(filter.text), 11, _hoisted_3$3);
  47847. }), 128))], 34))]),
  47848. default: withCtx(() => [createBaseVNode("button", {
  47849. type: "button",
  47850. class: normalizeClass(`${_ctx.ns.namespace.value}-table__column-filter-trigger`),
  47851. "aria-label": _ctx.t("el.table.filterLabel", { column: _ctx.column?.label || "" })
  47852. }, [createVNode(_component_el_icon, null, {
  47853. default: withCtx(() => [renderSlot(_ctx.$slots, "filter-icon", {}, () => [_ctx.column?.filterOpened ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 }))])]),
  47854. _: 3
  47855. })], 10, _hoisted_4$2)]),
  47856. _: 3
  47857. }, 8, [
  47858. "placement",
  47859. "popper-class",
  47860. "append-to",
  47861. "onShow",
  47862. "onHide"
  47863. ]);
  47864. }
  47865. var filter_panel_default = /* @__PURE__ */ _plugin_vue_export_helper_default(filter_panel_vue_vue_type_script_lang_default, [["render", _sfc_render$3]]);
  47866. //#endregion
  47867. //#region node_modules/element-plus/es/components/table/src/layout-observer.mjs
  47868. function useLayoutObserver(root) {
  47869. const instance = getCurrentInstance();
  47870. onBeforeMount(() => {
  47871. tableLayout.value.addObserver(instance);
  47872. });
  47873. onMounted(() => {
  47874. onColumnsChange(tableLayout.value);
  47875. onScrollableChange(tableLayout.value);
  47876. });
  47877. onUpdated(() => {
  47878. onColumnsChange(tableLayout.value);
  47879. onScrollableChange(tableLayout.value);
  47880. });
  47881. onUnmounted(() => {
  47882. tableLayout.value.removeObserver(instance);
  47883. });
  47884. const tableLayout = computed(() => {
  47885. const layout = root.layout;
  47886. if (!layout) throw new Error("Can not find table layout.");
  47887. return layout;
  47888. });
  47889. const onColumnsChange = (layout) => {
  47890. const cols = root.vnode.el?.querySelectorAll("colgroup > col") || [];
  47891. if (!cols.length) return;
  47892. const flattenColumns = layout.getFlattenColumns();
  47893. const columnsMap = {};
  47894. flattenColumns.forEach((column) => {
  47895. columnsMap[column.id] = column;
  47896. });
  47897. for (let i = 0, j = cols.length; i < j; i++) {
  47898. const col = cols[i];
  47899. const column = columnsMap[col.getAttribute("name")];
  47900. if (column) col.setAttribute("width", column.realWidth || column.width);
  47901. }
  47902. };
  47903. const onScrollableChange = (layout) => {
  47904. const cols = root.vnode.el?.querySelectorAll("colgroup > col[name=gutter]") || [];
  47905. for (let i = 0, j = cols.length; i < j; i++) cols[i].setAttribute("width", layout.scrollY.value ? layout.gutterWidth : "0");
  47906. const ths = root.vnode.el?.querySelectorAll("th.gutter") || [];
  47907. for (let i = 0, j = ths.length; i < j; i++) {
  47908. const th = ths[i];
  47909. th.style.width = layout.scrollY.value ? `${layout.gutterWidth}px` : "0";
  47910. th.style.display = layout.scrollY.value ? "" : "none";
  47911. }
  47912. };
  47913. return {
  47914. tableLayout: tableLayout.value,
  47915. onColumnsChange,
  47916. onScrollableChange
  47917. };
  47918. }
  47919. //#endregion
  47920. //#region node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs
  47921. function useEvent(props, emit) {
  47922. const instance = getCurrentInstance();
  47923. const parent = inject(TABLE_INJECTION_KEY);
  47924. const handleFilterClick = (event) => {
  47925. event.stopPropagation();
  47926. };
  47927. const handleHeaderClick = (event, column) => {
  47928. if (!column.filters && column.sortable) handleSortClick(event, column, false);
  47929. else if (column.filterable && !column.sortable) handleFilterClick(event);
  47930. parent?.emit("header-click", column, event);
  47931. };
  47932. const handleHeaderContextMenu = (event, column) => {
  47933. parent?.emit("header-contextmenu", column, event);
  47934. };
  47935. const draggingColumn = ref(null);
  47936. const dragging = ref(false);
  47937. const dragState = ref();
  47938. const handleMouseDown = (event, column) => {
  47939. if (!isClient) return;
  47940. if (column.children && column.children.length > 0) return;
  47941. /* istanbul ignore if */
  47942. if (draggingColumn.value && props.border && draggingColumn.value.id === column.id) {
  47943. dragging.value = true;
  47944. const table = parent;
  47945. emit("set-drag-visible", true);
  47946. const tableLeft = (table?.vnode.el)?.getBoundingClientRect().left;
  47947. const columnEl = instance?.vnode?.el?.querySelector(`th.${column.id}`);
  47948. const columnRect = columnEl.getBoundingClientRect();
  47949. const minLeft = columnRect.left - tableLeft + 30;
  47950. addClass(columnEl, "noclick");
  47951. dragState.value = {
  47952. startMouseLeft: event.clientX,
  47953. startLeft: columnRect.right - tableLeft,
  47954. startColumnLeft: columnRect.left - tableLeft,
  47955. tableLeft
  47956. };
  47957. const resizeProxy = table?.refs.resizeProxy;
  47958. resizeProxy.style.left = `${dragState.value.startLeft}px`;
  47959. document.onselectstart = function() {
  47960. return false;
  47961. };
  47962. document.ondragstart = function() {
  47963. return false;
  47964. };
  47965. const handleMouseMove = (event) => {
  47966. const deltaLeft = event.clientX - dragState.value.startMouseLeft;
  47967. const proxyLeft = dragState.value.startLeft + deltaLeft;
  47968. resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`;
  47969. };
  47970. const handleMouseUp = () => {
  47971. if (dragging.value) {
  47972. const { startColumnLeft, startLeft } = dragState.value;
  47973. column.width = column.realWidth = Number.parseInt(resizeProxy.style.left, 10) - startColumnLeft;
  47974. table?.emit("header-dragend", column.width, startLeft - startColumnLeft, column, event);
  47975. requestAnimationFrame(() => {
  47976. props.store.scheduleLayout(false, true);
  47977. });
  47978. document.body.style.cursor = "";
  47979. dragging.value = false;
  47980. draggingColumn.value = null;
  47981. dragState.value = void 0;
  47982. emit("set-drag-visible", false);
  47983. }
  47984. document.removeEventListener("mousemove", handleMouseMove);
  47985. document.removeEventListener("mouseup", handleMouseUp);
  47986. document.onselectstart = null;
  47987. document.ondragstart = null;
  47988. setTimeout(() => {
  47989. removeClass(columnEl, "noclick");
  47990. }, 0);
  47991. };
  47992. document.addEventListener("mousemove", handleMouseMove);
  47993. document.addEventListener("mouseup", handleMouseUp);
  47994. }
  47995. };
  47996. const handleMouseMove = (event, column) => {
  47997. if (!props.border || column.children && column.children.length > 0) return;
  47998. const el = event.target;
  47999. const target = isElement$1(el) ? el.closest("th") : null;
  48000. if (!target) return;
  48001. const isSortable = hasClass(target, "is-sortable");
  48002. if (isSortable) {
  48003. const cursor = dragging.value ? "col-resize" : "";
  48004. target.style.cursor = cursor;
  48005. const caret = target.querySelector(".caret-wrapper");
  48006. if (caret) caret.style.cursor = cursor;
  48007. }
  48008. if (!column.resizable || dragging.value) {
  48009. draggingColumn.value = null;
  48010. return;
  48011. }
  48012. const rect = target.getBoundingClientRect();
  48013. const isLastTh = target.parentNode?.lastElementChild === target;
  48014. const allowDrag = props.allowDragLastColumn || !isLastTh;
  48015. const isResizeHandleActive = rect.width > 12 && rect.right - event.clientX < 8 && allowDrag;
  48016. const cursor = isResizeHandleActive ? "col-resize" : "";
  48017. document.body.style.cursor = cursor;
  48018. draggingColumn.value = isResizeHandleActive ? column : null;
  48019. if (isSortable) target.style.cursor = cursor;
  48020. };
  48021. const handleMouseOut = () => {
  48022. if (!isClient || dragging.value) return;
  48023. document.body.style.cursor = "";
  48024. };
  48025. const toggleOrder = ({ order, sortOrders }) => {
  48026. if (order === "") return sortOrders[0];
  48027. const index = sortOrders.indexOf(order || null);
  48028. return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
  48029. };
  48030. const handleSortClick = (event, column, givenOrder) => {
  48031. event.stopPropagation();
  48032. const order = column.order === givenOrder ? null : givenOrder || toggleOrder(column);
  48033. const target = event.target?.closest("th");
  48034. if (target) {
  48035. if (hasClass(target, "noclick")) {
  48036. removeClass(target, "noclick");
  48037. return;
  48038. }
  48039. }
  48040. if (!column.sortable) return;
  48041. const clickTarget = event.currentTarget;
  48042. if (["ascending", "descending"].some((str) => hasClass(clickTarget, str) && !column.sortOrders.includes(str))) return;
  48043. const states = props.store.states;
  48044. let sortProp = states.sortProp.value;
  48045. let sortOrder;
  48046. const sortingColumn = states.sortingColumn.value;
  48047. if (sortingColumn !== column || sortingColumn === column && isNull(sortingColumn.order)) {
  48048. if (sortingColumn) sortingColumn.order = null;
  48049. states.sortingColumn.value = column;
  48050. sortProp = column.property ?? null;
  48051. }
  48052. if (!order) sortOrder = column.order = null;
  48053. else sortOrder = column.order = order;
  48054. states.sortProp.value = sortProp;
  48055. states.sortOrder.value = sortOrder;
  48056. parent?.store.commit("changeSortCondition");
  48057. };
  48058. return {
  48059. handleHeaderClick,
  48060. handleHeaderContextMenu,
  48061. handleMouseDown,
  48062. handleMouseMove,
  48063. handleMouseOut,
  48064. handleSortClick,
  48065. handleFilterClick
  48066. };
  48067. }
  48068. //#endregion
  48069. //#region node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs
  48070. function useStyle$2(props) {
  48071. const parent = inject(TABLE_INJECTION_KEY);
  48072. const ns = useNamespace("table");
  48073. const getHeaderRowStyle = (rowIndex) => {
  48074. const headerRowStyle = parent?.props.headerRowStyle;
  48075. if (isFunction$1(headerRowStyle)) return headerRowStyle.call(null, { rowIndex });
  48076. return headerRowStyle;
  48077. };
  48078. const getHeaderRowClass = (rowIndex) => {
  48079. const classes = [];
  48080. const headerRowClassName = parent?.props.headerRowClassName;
  48081. if (isString(headerRowClassName)) classes.push(headerRowClassName);
  48082. else if (isFunction$1(headerRowClassName)) classes.push(headerRowClassName.call(null, { rowIndex }));
  48083. return classes.join(" ");
  48084. };
  48085. const getHeaderCellStyle = (rowIndex, columnIndex, row, column) => {
  48086. let headerCellStyles = parent?.props.headerCellStyle ?? {};
  48087. if (isFunction$1(headerCellStyles)) headerCellStyles = headerCellStyles.call(null, {
  48088. rowIndex,
  48089. columnIndex,
  48090. row,
  48091. column
  48092. });
  48093. const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row);
  48094. ensurePosition(fixedStyle, "left");
  48095. ensurePosition(fixedStyle, "right");
  48096. return Object.assign({}, headerCellStyles, fixedStyle);
  48097. };
  48098. const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
  48099. const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column.fixed, props.store, row);
  48100. const classes = [
  48101. column.id,
  48102. column.order,
  48103. column.headerAlign,
  48104. column.className,
  48105. column.labelClassName,
  48106. ...fixedClasses
  48107. ];
  48108. if (!column.children) classes.push("is-leaf");
  48109. if (column.sortable) classes.push("is-sortable");
  48110. const headerCellClassName = parent?.props.headerCellClassName;
  48111. if (isString(headerCellClassName)) classes.push(headerCellClassName);
  48112. else if (isFunction$1(headerCellClassName)) classes.push(headerCellClassName.call(null, {
  48113. rowIndex,
  48114. columnIndex,
  48115. row,
  48116. column
  48117. }));
  48118. classes.push(ns.e("cell"));
  48119. return classes.filter((className) => Boolean(className)).join(" ");
  48120. };
  48121. return {
  48122. getHeaderRowStyle,
  48123. getHeaderRowClass,
  48124. getHeaderCellStyle,
  48125. getHeaderCellClass
  48126. };
  48127. }
  48128. //#endregion
  48129. //#region node_modules/element-plus/es/components/table/src/table-header/index.mjs
  48130. var table_header_default = defineComponent({
  48131. name: "ElTableHeader",
  48132. components: { ElCheckbox },
  48133. props: {
  48134. fixed: {
  48135. type: String,
  48136. default: ""
  48137. },
  48138. store: {
  48139. required: true,
  48140. type: Object
  48141. },
  48142. border: Boolean,
  48143. defaultSort: {
  48144. type: Object,
  48145. default: () => {
  48146. return {
  48147. prop: "",
  48148. order: ""
  48149. };
  48150. }
  48151. },
  48152. appendFilterPanelTo: { type: String },
  48153. allowDragLastColumn: { type: Boolean }
  48154. },
  48155. setup(props, { emit }) {
  48156. const instance = getCurrentInstance();
  48157. const parent = inject(TABLE_INJECTION_KEY);
  48158. const ns = useNamespace("table");
  48159. const filterPanels = ref({});
  48160. const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
  48161. const isTableLayoutAuto = parent?.props.tableLayout === "auto";
  48162. const saveIndexSelection = reactive(/* @__PURE__ */ new Map());
  48163. const theadRef = ref();
  48164. let delayId;
  48165. const updateFixedColumnStyle = () => {
  48166. delayId = setTimeout(() => {
  48167. if (saveIndexSelection.size > 0) {
  48168. saveIndexSelection.forEach((column, key) => {
  48169. const el = theadRef.value.querySelector(`.${key.replace(/\s/g, ".")}`);
  48170. if (el) column.width = el.getBoundingClientRect().width || column.width;
  48171. });
  48172. saveIndexSelection.clear();
  48173. }
  48174. });
  48175. };
  48176. watch(saveIndexSelection, updateFixedColumnStyle);
  48177. onBeforeUnmount(() => {
  48178. if (delayId) {
  48179. clearTimeout(delayId);
  48180. delayId = void 0;
  48181. }
  48182. });
  48183. onMounted(async () => {
  48184. await nextTick();
  48185. await nextTick();
  48186. const { prop, order } = props.defaultSort;
  48187. parent?.store.commit("sort", {
  48188. prop,
  48189. order,
  48190. init: true
  48191. });
  48192. updateFixedColumnStyle();
  48193. });
  48194. const { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick } = useEvent(props, emit);
  48195. const { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass } = useStyle$2(props);
  48196. const { isGroup, toggleAllSelection, columnRows } = useUtils$1(props);
  48197. const { t } = useLocale();
  48198. instance.state = {
  48199. onColumnsChange,
  48200. onScrollableChange
  48201. };
  48202. instance.filterPanels = filterPanels;
  48203. return {
  48204. ns,
  48205. t,
  48206. filterPanels,
  48207. onColumnsChange,
  48208. onScrollableChange,
  48209. columnRows,
  48210. getHeaderRowClass,
  48211. getHeaderRowStyle,
  48212. getHeaderCellClass,
  48213. getHeaderCellStyle,
  48214. handleHeaderClick,
  48215. handleHeaderContextMenu,
  48216. handleMouseDown,
  48217. handleMouseMove,
  48218. handleMouseOut,
  48219. handleSortClick,
  48220. handleFilterClick,
  48221. isGroup,
  48222. toggleAllSelection,
  48223. saveIndexSelection,
  48224. isTableLayoutAuto,
  48225. theadRef,
  48226. updateFixedColumnStyle
  48227. };
  48228. },
  48229. render() {
  48230. const { ns, t, isGroup, columnRows, getHeaderCellStyle, getHeaderCellClass, getHeaderRowClass, getHeaderRowStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleSortClick, handleMouseOut, store, $parent, saveIndexSelection, isTableLayoutAuto } = this;
  48231. let rowSpan = 1;
  48232. return h$1("thead", {
  48233. ref: "theadRef",
  48234. class: ns.is("group", isGroup)
  48235. }, columnRows.map((subColumns, rowIndex) => h$1("tr", {
  48236. class: getHeaderRowClass(rowIndex),
  48237. key: rowIndex,
  48238. style: getHeaderRowStyle(rowIndex)
  48239. }, subColumns.map((column, cellIndex) => {
  48240. if (column.rowSpan > rowSpan) rowSpan = column.rowSpan;
  48241. const _class = getHeaderCellClass(rowIndex, cellIndex, subColumns, column);
  48242. if (isTableLayoutAuto && column.fixed) saveIndexSelection.set(_class, column);
  48243. return h$1("th", {
  48244. class: _class,
  48245. colspan: column.colSpan,
  48246. key: `${column.id}-thead`,
  48247. rowspan: column.rowSpan,
  48248. scope: column.colSpan > 1 ? "colgroup" : "col",
  48249. ariaSort: column.sortable ? column.order : void 0,
  48250. style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),
  48251. onClick: ($event) => {
  48252. if ($event.currentTarget?.classList.contains("noclick")) return;
  48253. handleHeaderClick($event, column);
  48254. },
  48255. onContextmenu: ($event) => handleHeaderContextMenu($event, column),
  48256. onMousedown: ($event) => handleMouseDown($event, column),
  48257. onMousemove: ($event) => handleMouseMove($event, column),
  48258. onMouseout: handleMouseOut
  48259. }, [h$1("div", { class: ["cell", column.filteredValue && column.filteredValue.length > 0 ? "highlight" : ""] }, [
  48260. column.renderHeader ? column.renderHeader({
  48261. column,
  48262. $index: cellIndex,
  48263. store,
  48264. _self: $parent
  48265. }) : column.label,
  48266. column.sortable && h$1("button", {
  48267. type: "button",
  48268. class: "caret-wrapper",
  48269. "aria-label": t("el.table.sortLabel", { column: column.label || "" }),
  48270. onClick: ($event) => handleSortClick($event, column)
  48271. }, [h$1("i", {
  48272. onClick: ($event) => handleSortClick($event, column, "ascending"),
  48273. class: "sort-caret ascending"
  48274. }), h$1("i", {
  48275. onClick: ($event) => handleSortClick($event, column, "descending"),
  48276. class: "sort-caret descending"
  48277. })]),
  48278. column.filterable && h$1(filter_panel_default, {
  48279. store,
  48280. placement: column.filterPlacement || "bottom-start",
  48281. appendTo: $parent?.appendFilterPanelTo,
  48282. column,
  48283. upDataColumn: (key, value) => {
  48284. column[key] = value;
  48285. }
  48286. }, { "filter-icon": () => column.renderFilterIcon ? column.renderFilterIcon({ filterOpened: column.filterOpened }) : null })
  48287. ])]);
  48288. }))));
  48289. }
  48290. });
  48291. //#endregion
  48292. //#region node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs
  48293. function useEvents(props) {
  48294. const parent = inject(TABLE_INJECTION_KEY);
  48295. const tooltipContent = ref("");
  48296. const tooltipTrigger = ref(h$1("div"));
  48297. const handleEvent = (event, row, name) => {
  48298. const table = parent;
  48299. const cell = getCell(event);
  48300. let column = null;
  48301. const namespace = table?.vnode.el?.dataset.prefix;
  48302. if (cell) {
  48303. column = getColumnByCell({ columns: props.store?.states.columns.value ?? [] }, cell, namespace);
  48304. if (column) table?.emit(`cell-${name}`, row, column, cell, event);
  48305. }
  48306. table?.emit(`row-${name}`, row, column, event);
  48307. };
  48308. const handleDoubleClick = (event, row) => {
  48309. handleEvent(event, row, "dblclick");
  48310. };
  48311. const handleClick = (event, row) => {
  48312. props.store?.commit("setCurrentRow", row);
  48313. handleEvent(event, row, "click");
  48314. };
  48315. const handleContextMenu = (event, row) => {
  48316. handleEvent(event, row, "contextmenu");
  48317. };
  48318. const handleMouseEnter = debounce((index) => {
  48319. props.store?.commit("setHoverRow", index);
  48320. }, 30);
  48321. const handleMouseLeave = debounce(() => {
  48322. props.store?.commit("setHoverRow", null);
  48323. }, 30);
  48324. const getPadding = (el) => {
  48325. const style = window.getComputedStyle(el, null);
  48326. return {
  48327. left: Number.parseInt(style.paddingLeft, 10) || 0,
  48328. right: Number.parseInt(style.paddingRight, 10) || 0,
  48329. top: Number.parseInt(style.paddingTop, 10) || 0,
  48330. bottom: Number.parseInt(style.paddingBottom, 10) || 0
  48331. };
  48332. };
  48333. const toggleRowClassByCell = (rowSpan, event, toggle) => {
  48334. let node = (event?.target)?.parentNode;
  48335. while (rowSpan > 1) {
  48336. node = node?.nextSibling;
  48337. if (!node || node.nodeName !== "TR") break;
  48338. toggle(node, "hover-row hover-fixed-row");
  48339. rowSpan--;
  48340. }
  48341. };
  48342. const handleCellMouseEnter = (event, row, tooltipOptions) => {
  48343. if (!parent) return;
  48344. const table = parent;
  48345. const cell = getCell(event);
  48346. const namespace = table?.vnode.el?.dataset.prefix;
  48347. let column = null;
  48348. if (cell) {
  48349. column = getColumnByCell({ columns: props.store?.states.columns.value ?? [] }, cell, namespace);
  48350. if (!column) return;
  48351. if (cell.rowSpan > 1) toggleRowClassByCell(cell.rowSpan, event, addClass);
  48352. const hoverState = table.hoverState = {
  48353. cell,
  48354. column,
  48355. row
  48356. };
  48357. table?.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event);
  48358. }
  48359. if (!tooltipOptions) {
  48360. if (removePopper?.trigger === cell) removePopper?.();
  48361. return;
  48362. }
  48363. const cellChild = event.target.querySelector(".cell");
  48364. if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length && cellChild.textContent?.trim())) return;
  48365. const range = document.createRange();
  48366. range.setStart(cellChild, 0);
  48367. range.setEnd(cellChild, cellChild.childNodes.length);
  48368. /** detail: https://github.com/element-plus/element-plus/issues/10790
  48369. * What went wrong?
  48370. * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:
  48371. * - Expected: 188
  48372. * - Actual: 188.00000762939453
  48373. */
  48374. const { width: rangeWidth, height: rangeHeight } = range.getBoundingClientRect();
  48375. const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
  48376. const { top, left, right, bottom } = getPadding(cellChild);
  48377. const horizontalPadding = left + right;
  48378. const verticalPadding = top + bottom;
  48379. if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) createTablePopper(tooltipOptions, (cell?.innerText || cell?.textContent) ?? "", row, column, cell, table);
  48380. else if (removePopper?.trigger === cell) removePopper?.();
  48381. };
  48382. const handleCellMouseLeave = (event) => {
  48383. const cell = getCell(event);
  48384. if (!cell) return;
  48385. if (cell.rowSpan > 1) toggleRowClassByCell(cell.rowSpan, event, removeClass);
  48386. const oldHoverState = parent?.hoverState;
  48387. parent?.emit("cell-mouse-leave", oldHoverState?.row, oldHoverState?.column, oldHoverState?.cell, event);
  48388. };
  48389. return {
  48390. handleDoubleClick,
  48391. handleClick,
  48392. handleContextMenu,
  48393. handleMouseEnter,
  48394. handleMouseLeave,
  48395. handleCellMouseEnter,
  48396. handleCellMouseLeave,
  48397. tooltipContent,
  48398. tooltipTrigger
  48399. };
  48400. }
  48401. //#endregion
  48402. //#region node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs
  48403. function useStyles$1(props) {
  48404. const parent = inject(TABLE_INJECTION_KEY);
  48405. const ns = useNamespace("table");
  48406. const getRowStyle = (row, rowIndex) => {
  48407. const rowStyle = parent?.props.rowStyle;
  48408. if (isFunction$1(rowStyle)) return rowStyle.call(null, {
  48409. row,
  48410. rowIndex
  48411. });
  48412. return rowStyle || null;
  48413. };
  48414. const getRowClass = (row, rowIndex, displayIndex) => {
  48415. const classes = [ns.e("row")];
  48416. if (parent?.props.highlightCurrentRow && row === props.store?.states.currentRow.value) classes.push("current-row");
  48417. if (props.stripe && displayIndex % 2 === 1) classes.push(ns.em("row", "striped"));
  48418. const rowClassName = parent?.props.rowClassName;
  48419. if (isString(rowClassName)) classes.push(rowClassName);
  48420. else if (isFunction$1(rowClassName)) classes.push(rowClassName.call(null, {
  48421. row,
  48422. rowIndex
  48423. }));
  48424. return classes;
  48425. };
  48426. const getCellStyle = (rowIndex, columnIndex, row, column) => {
  48427. const cellStyle = parent?.props.cellStyle;
  48428. let cellStyles = cellStyle ?? {};
  48429. if (isFunction$1(cellStyle)) cellStyles = cellStyle.call(null, {
  48430. rowIndex,
  48431. columnIndex,
  48432. row,
  48433. column
  48434. });
  48435. const fixedStyle = getFixedColumnOffset(columnIndex, props?.fixed, props.store);
  48436. ensurePosition(fixedStyle, "left");
  48437. ensurePosition(fixedStyle, "right");
  48438. return Object.assign({}, cellStyles, fixedStyle);
  48439. };
  48440. const getCellClass = (rowIndex, columnIndex, row, column, offset) => {
  48441. const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props?.fixed, props.store, void 0, offset);
  48442. const classes = [
  48443. column.id,
  48444. column.align,
  48445. column.className,
  48446. ...fixedClasses
  48447. ];
  48448. const cellClassName = parent?.props.cellClassName;
  48449. if (isString(cellClassName)) classes.push(cellClassName);
  48450. else if (isFunction$1(cellClassName)) classes.push(cellClassName.call(null, {
  48451. rowIndex,
  48452. columnIndex,
  48453. row,
  48454. column
  48455. }));
  48456. classes.push(ns.e("cell"));
  48457. return classes.filter((className) => Boolean(className)).join(" ");
  48458. };
  48459. const getSpan = (row, column, rowIndex, columnIndex) => {
  48460. let rowspan = 1;
  48461. let colspan = 1;
  48462. const fn = parent?.props.spanMethod;
  48463. if (isFunction$1(fn)) {
  48464. const result = fn({
  48465. row,
  48466. column,
  48467. rowIndex,
  48468. columnIndex
  48469. });
  48470. if (isArray$1(result)) {
  48471. rowspan = result[0];
  48472. colspan = result[1];
  48473. } else if (isObject$2(result)) {
  48474. rowspan = result.rowspan;
  48475. colspan = result.colspan;
  48476. }
  48477. }
  48478. return {
  48479. rowspan,
  48480. colspan
  48481. };
  48482. };
  48483. const getColspanRealWidth = (columns, colspan, index) => {
  48484. if (colspan < 1) return columns[index].realWidth;
  48485. const widthArr = columns.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan);
  48486. return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1));
  48487. };
  48488. return {
  48489. getRowStyle,
  48490. getRowClass,
  48491. getCellStyle,
  48492. getCellClass,
  48493. getSpan,
  48494. getColspanRealWidth
  48495. };
  48496. }
  48497. //#endregion
  48498. //#region node_modules/element-plus/es/components/table/src/table-body/td-wrapper.vue_vue_type_script_setup_true_lang.mjs
  48499. var _hoisted_1$16 = ["colspan", "rowspan"];
  48500. //#endregion
  48501. //#region node_modules/element-plus/es/components/table/src/table-body/td-wrapper.mjs
  48502. var td_wrapper_default = /* @__PURE__ */ defineComponent({
  48503. name: "TableTdWrapper",
  48504. __name: "td-wrapper",
  48505. props: {
  48506. colspan: {
  48507. type: Number,
  48508. default: 1
  48509. },
  48510. rowspan: {
  48511. type: Number,
  48512. default: 1
  48513. }
  48514. },
  48515. setup(__props) {
  48516. return (_ctx, _cache) => {
  48517. return openBlock(), createElementBlock("td", {
  48518. colspan: __props.colspan,
  48519. rowspan: __props.rowspan
  48520. }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$16);
  48521. };
  48522. }
  48523. });
  48524. //#endregion
  48525. //#region node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs
  48526. function useRender$1(props) {
  48527. const parent = inject(TABLE_INJECTION_KEY);
  48528. const ns = useNamespace("table");
  48529. const { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger } = useEvents(props);
  48530. const { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth } = useStyles$1(props);
  48531. let displayIndex = -1;
  48532. const firstDefaultColumnIndex = computed(() => {
  48533. return props.store?.states.columns.value.findIndex(({ type }) => type === "default");
  48534. });
  48535. const getKeyOfRow = (row, index) => {
  48536. const rowKey = (parent?.props)?.rowKey;
  48537. if (rowKey) return getRowIdentity(row, rowKey);
  48538. return index;
  48539. };
  48540. const rowRender = (row, $index, treeRowData, expanded = false) => {
  48541. const { tooltipEffect, tooltipOptions, store } = props;
  48542. const { indent, columns } = store.states;
  48543. const rowClasses = [];
  48544. let display = true;
  48545. if (treeRowData) {
  48546. rowClasses.push(ns.em("row", `level-${treeRowData.level}`));
  48547. display = !!treeRowData.display;
  48548. }
  48549. if ($index === 0) displayIndex = -1;
  48550. if (props.stripe && display) displayIndex++;
  48551. rowClasses.push(...getRowClass(row, $index, displayIndex));
  48552. return h$1("tr", {
  48553. style: [display ? null : { display: "none" }, getRowStyle(row, $index)],
  48554. class: rowClasses,
  48555. key: getKeyOfRow(row, $index),
  48556. onDblclick: ($event) => handleDoubleClick($event, row),
  48557. onClick: ($event) => handleClick($event, row),
  48558. onContextmenu: ($event) => handleContextMenu($event, row),
  48559. onMouseenter: () => handleMouseEnter($index),
  48560. onMouseleave: handleMouseLeave
  48561. }, columns.value.map((column, cellIndex) => {
  48562. const { rowspan, colspan } = getSpan(row, column, $index, cellIndex);
  48563. if (!rowspan || !colspan) return null;
  48564. const columnData = Object.assign({}, column);
  48565. columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex);
  48566. const data = {
  48567. store,
  48568. _self: props.context || parent,
  48569. column: columnData,
  48570. row,
  48571. $index,
  48572. cellIndex,
  48573. expanded
  48574. };
  48575. if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {
  48576. data.treeNode = {
  48577. indent: treeRowData.level && treeRowData.level * indent.value,
  48578. level: treeRowData.level
  48579. };
  48580. if (isBoolean(treeRowData.expanded)) {
  48581. data.treeNode.expanded = treeRowData.expanded;
  48582. if ("loading" in treeRowData) data.treeNode.loading = treeRowData.loading;
  48583. if ("noLazyChildren" in treeRowData) data.treeNode.noLazyChildren = treeRowData.noLazyChildren;
  48584. }
  48585. }
  48586. const baseKey = `${getKeyOfRow(row, $index)},${cellIndex}`;
  48587. const patchKey = columnData.columnKey || columnData.rawColumnKey || "";
  48588. const mergedTooltipOptions = column.showOverflowTooltip && merge({ effect: tooltipEffect }, tooltipOptions, column.showOverflowTooltip);
  48589. return h$1(td_wrapper_default, {
  48590. style: getCellStyle($index, cellIndex, row, column),
  48591. class: getCellClass($index, cellIndex, row, column, colspan - 1),
  48592. key: `${patchKey}${baseKey}`,
  48593. rowspan,
  48594. colspan,
  48595. onMouseenter: ($event) => handleCellMouseEnter($event, row, mergedTooltipOptions),
  48596. onMouseleave: handleCellMouseLeave
  48597. }, { default: () => cellChildren(cellIndex, column, data) });
  48598. }));
  48599. };
  48600. const cellChildren = (_cellIndex, column, data) => {
  48601. return column.renderCell(data);
  48602. };
  48603. const wrappedRowRender = (row, $index) => {
  48604. const store = props.store;
  48605. const { isRowExpanded, assertRowKey } = store;
  48606. const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } = store.states;
  48607. const columns = store.states.columns.value;
  48608. if (columns.some(({ type }) => type === "expand")) {
  48609. const expanded = isRowExpanded(row);
  48610. const tr = rowRender(row, $index, void 0, expanded);
  48611. const renderExpanded = parent?.renderExpanded;
  48612. if (!renderExpanded) {
  48613. console.error("[Element Error]renderExpanded is required.");
  48614. return tr;
  48615. }
  48616. const rows = [[tr]];
  48617. if (parent.props.preserveExpandedContent || expanded) rows[0].push(h$1("tr", {
  48618. key: `expanded-row__${tr.key}`,
  48619. style: { display: expanded ? "" : "none" }
  48620. }, [h$1("td", {
  48621. colspan: columns.length,
  48622. class: `${ns.e("cell")} ${ns.e("expanded-cell")}`
  48623. }, [renderExpanded({
  48624. row,
  48625. $index,
  48626. store,
  48627. expanded
  48628. })])]));
  48629. return rows;
  48630. } else if (Object.keys(treeData.value).length) {
  48631. assertRowKey();
  48632. const key = getRowIdentity(row, rowKey.value);
  48633. let cur = treeData.value[key];
  48634. let treeRowData = null;
  48635. if (cur) {
  48636. treeRowData = {
  48637. expanded: cur.expanded,
  48638. level: cur.level,
  48639. display: true,
  48640. noLazyChildren: void 0,
  48641. loading: void 0
  48642. };
  48643. if (isBoolean(cur.lazy)) {
  48644. if (treeRowData && isBoolean(cur.loaded) && cur.loaded) treeRowData.noLazyChildren = !(cur.children && cur.children.length);
  48645. treeRowData.loading = cur.loading;
  48646. }
  48647. }
  48648. const tmp = [rowRender(row, $index, treeRowData ?? void 0)];
  48649. if (cur) {
  48650. let i = 0;
  48651. const traverse = (children, parent) => {
  48652. if (!(children && children.length && parent)) return;
  48653. children.forEach((node) => {
  48654. const innerTreeRowData = {
  48655. display: parent.display && parent.expanded,
  48656. level: parent.level + 1,
  48657. expanded: false,
  48658. noLazyChildren: false,
  48659. loading: false
  48660. };
  48661. const childKey = getRowIdentity(node, rowKey.value);
  48662. if (isPropAbsent(childKey)) throw new Error("For nested data item, row-key is required.");
  48663. cur = { ...treeData.value[childKey] };
  48664. if (cur) {
  48665. innerTreeRowData.expanded = cur.expanded;
  48666. cur.level = cur.level || innerTreeRowData.level;
  48667. cur.display = !!(cur.expanded && innerTreeRowData.display);
  48668. if (isBoolean(cur.lazy)) {
  48669. if (isBoolean(cur.loaded) && cur.loaded) innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);
  48670. innerTreeRowData.loading = cur.loading;
  48671. }
  48672. }
  48673. i++;
  48674. tmp.push(rowRender(node, $index + i, innerTreeRowData));
  48675. if (cur) traverse(lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value], cur);
  48676. });
  48677. };
  48678. cur.display = true;
  48679. traverse(lazyTreeNodeMap.value[key] || row[childrenColumnName.value], cur);
  48680. }
  48681. return tmp;
  48682. } else return rowRender(row, $index, void 0);
  48683. };
  48684. return {
  48685. wrappedRowRender,
  48686. tooltipContent,
  48687. tooltipTrigger
  48688. };
  48689. }
  48690. //#endregion
  48691. //#region node_modules/element-plus/es/components/table/src/table-body/index.mjs
  48692. var table_body_default = defineComponent({
  48693. name: "ElTableBody",
  48694. props: {
  48695. store: {
  48696. required: true,
  48697. type: Object
  48698. },
  48699. stripe: Boolean,
  48700. tooltipEffect: String,
  48701. tooltipOptions: { type: Object },
  48702. context: {
  48703. default: () => ({}),
  48704. type: Object
  48705. },
  48706. rowClassName: [String, Function],
  48707. rowStyle: [Object, Function],
  48708. fixed: {
  48709. type: String,
  48710. default: ""
  48711. },
  48712. highlight: Boolean
  48713. },
  48714. setup(props) {
  48715. const instance = getCurrentInstance();
  48716. const parent = inject(TABLE_INJECTION_KEY);
  48717. const ns = useNamespace("table");
  48718. const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender$1(props);
  48719. const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
  48720. const hoveredCellList = [];
  48721. watch(props.store?.states.hoverRow, (newVal, oldVal) => {
  48722. const el = instance?.vnode.el;
  48723. const rows = Array.from(el?.children || []).filter((e) => e?.classList.contains(`${ns.e("row")}`));
  48724. let rowNum = newVal;
  48725. const childNodes = rows[rowNum]?.childNodes;
  48726. if (childNodes?.length) {
  48727. let control = 0;
  48728. Array.from(childNodes).reduce((acc, item, index) => {
  48729. if (childNodes[index]?.colSpan > 1) control = childNodes[index]?.colSpan;
  48730. if (item.nodeName !== "TD" && control === 0) acc.push(index);
  48731. control > 0 && control--;
  48732. return acc;
  48733. }, []).forEach((rowIndex) => {
  48734. rowNum = newVal;
  48735. while (rowNum > 0) {
  48736. const preChildNodes = rows[rowNum - 1]?.childNodes;
  48737. if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) {
  48738. addClass(preChildNodes[rowIndex], "hover-cell");
  48739. hoveredCellList.push(preChildNodes[rowIndex]);
  48740. break;
  48741. }
  48742. rowNum--;
  48743. }
  48744. });
  48745. } else {
  48746. hoveredCellList.forEach((item) => removeClass(item, "hover-cell"));
  48747. hoveredCellList.length = 0;
  48748. }
  48749. if (!props.store?.states.isComplex.value || !isClient) return;
  48750. rAF(() => {
  48751. const oldRow = rows[oldVal];
  48752. const newRow = rows[newVal];
  48753. if (oldRow && !oldRow.classList.contains("hover-fixed-row")) removeClass(oldRow, "hover-row");
  48754. if (newRow) addClass(newRow, "hover-row");
  48755. });
  48756. });
  48757. onUnmounted(() => {
  48758. removePopper?.();
  48759. });
  48760. return {
  48761. ns,
  48762. onColumnsChange,
  48763. onScrollableChange,
  48764. wrappedRowRender,
  48765. tooltipContent,
  48766. tooltipTrigger
  48767. };
  48768. },
  48769. render() {
  48770. const { wrappedRowRender, store } = this;
  48771. return h$1("tbody", { tabIndex: -1 }, [(store?.states.data.value || []).reduce((acc, row) => {
  48772. return acc.concat(wrappedRowRender(row, acc.length));
  48773. }, [])]);
  48774. }
  48775. });
  48776. //#endregion
  48777. //#region node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs
  48778. function useMapState() {
  48779. const store = inject(TABLE_INJECTION_KEY)?.store;
  48780. return {
  48781. leftFixedLeafCount: computed(() => {
  48782. return store?.states.fixedLeafColumnsLength.value ?? 0;
  48783. }),
  48784. rightFixedLeafCount: computed(() => {
  48785. return store?.states.rightFixedColumns.value.length ?? 0;
  48786. }),
  48787. columnsCount: computed(() => {
  48788. return store?.states.columns.value.length ?? 0;
  48789. }),
  48790. leftFixedCount: computed(() => {
  48791. return store?.states.fixedColumns.value.length ?? 0;
  48792. }),
  48793. rightFixedCount: computed(() => {
  48794. return store?.states.rightFixedColumns.value.length ?? 0;
  48795. }),
  48796. columns: computed(() => store?.states.columns.value ?? [])
  48797. };
  48798. }
  48799. //#endregion
  48800. //#region node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs
  48801. function useStyle$1(props) {
  48802. const { columns } = useMapState();
  48803. const ns = useNamespace("table");
  48804. const getCellClasses = (columns, cellIndex) => {
  48805. const column = columns[cellIndex];
  48806. const classes = [
  48807. ns.e("cell"),
  48808. column.id,
  48809. column.align,
  48810. column.labelClassName,
  48811. ...getFixedColumnsClass(ns.b(), cellIndex, column.fixed, props.store)
  48812. ];
  48813. if (column.className) classes.push(column.className);
  48814. if (!column.children) classes.push(ns.is("leaf"));
  48815. return classes;
  48816. };
  48817. const getCellStyles = (column, cellIndex) => {
  48818. const fixedStyle = getFixedColumnOffset(cellIndex, column.fixed, props.store);
  48819. ensurePosition(fixedStyle, "left");
  48820. ensurePosition(fixedStyle, "right");
  48821. return fixedStyle;
  48822. };
  48823. return {
  48824. getCellClasses,
  48825. getCellStyles,
  48826. columns
  48827. };
  48828. }
  48829. //#endregion
  48830. //#region node_modules/element-plus/es/components/table/src/table-footer/index.mjs
  48831. var table_footer_default = defineComponent({
  48832. name: "ElTableFooter",
  48833. props: {
  48834. fixed: {
  48835. type: String,
  48836. default: ""
  48837. },
  48838. store: {
  48839. required: true,
  48840. type: Object
  48841. },
  48842. summaryMethod: Function,
  48843. sumText: String,
  48844. border: Boolean,
  48845. defaultSort: {
  48846. type: Object,
  48847. default: () => {
  48848. return {
  48849. prop: "",
  48850. order: ""
  48851. };
  48852. }
  48853. }
  48854. },
  48855. setup(props) {
  48856. const parent = inject(TABLE_INJECTION_KEY);
  48857. const ns = useNamespace("table");
  48858. const { getCellClasses, getCellStyles, columns } = useStyle$1(props);
  48859. const { onScrollableChange, onColumnsChange } = useLayoutObserver(parent);
  48860. return {
  48861. ns,
  48862. onScrollableChange,
  48863. onColumnsChange,
  48864. getCellClasses,
  48865. getCellStyles,
  48866. columns
  48867. };
  48868. },
  48869. render() {
  48870. const { columns, getCellStyles, getCellClasses, summaryMethod, sumText } = this;
  48871. const data = this.store.states.data.value;
  48872. let sums = [];
  48873. if (summaryMethod) sums = summaryMethod({
  48874. columns,
  48875. data
  48876. });
  48877. else columns.forEach((column, index) => {
  48878. if (index === 0) {
  48879. sums[index] = sumText;
  48880. return;
  48881. }
  48882. const values = data.map((item) => Number(item[column.property]));
  48883. const precisions = [];
  48884. let notNumber = true;
  48885. values.forEach((value) => {
  48886. if (!Number.isNaN(+value)) {
  48887. notNumber = false;
  48888. const decimal = `${value}`.split(".")[1];
  48889. precisions.push(decimal ? decimal.length : 0);
  48890. }
  48891. });
  48892. const precision = Math.max.apply(null, precisions);
  48893. if (!notNumber) sums[index] = values.reduce((prev, curr) => {
  48894. const value = Number(curr);
  48895. if (!Number.isNaN(+value)) return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
  48896. else return prev;
  48897. }, 0);
  48898. else sums[index] = "";
  48899. });
  48900. return h$1(h$1("tfoot", [h$1("tr", {}, [...columns.map((column, cellIndex) => h$1("td", {
  48901. key: cellIndex,
  48902. colspan: column.colSpan,
  48903. rowspan: column.rowSpan,
  48904. class: getCellClasses(columns, cellIndex),
  48905. style: getCellStyles(column, cellIndex)
  48906. }, [h$1("div", { class: ["cell", column.labelClassName] }, [sums[cellIndex]])]))])]));
  48907. }
  48908. });
  48909. //#endregion
  48910. //#region node_modules/element-plus/es/components/table/src/table/utils-helper.mjs
  48911. function useUtils(store) {
  48912. const setCurrentRow = (row) => {
  48913. store.commit("setCurrentRow", row);
  48914. };
  48915. const getSelectionRows = () => {
  48916. return store.getSelectionRows();
  48917. };
  48918. const toggleRowSelection = (row, selected, ignoreSelectable = true) => {
  48919. store.toggleRowSelection(row, selected, false, ignoreSelectable);
  48920. store.updateAllSelected();
  48921. };
  48922. const clearSelection = () => {
  48923. store.clearSelection();
  48924. };
  48925. const clearFilter = (columnKeys) => {
  48926. store.clearFilter(columnKeys);
  48927. };
  48928. const toggleAllSelection = () => {
  48929. store.commit("toggleAllSelection");
  48930. };
  48931. const toggleRowExpansion = (row, expanded) => {
  48932. store.toggleRowExpansionAdapter(row, expanded);
  48933. };
  48934. const clearSort = () => {
  48935. store.clearSort();
  48936. };
  48937. const sort = (prop, order) => {
  48938. store.commit("sort", {
  48939. prop,
  48940. order
  48941. });
  48942. };
  48943. const updateKeyChildren = (key, data) => {
  48944. store.updateKeyChildren(key, data);
  48945. };
  48946. return {
  48947. setCurrentRow,
  48948. getSelectionRows,
  48949. toggleRowSelection,
  48950. clearSelection,
  48951. clearFilter,
  48952. toggleAllSelection,
  48953. toggleRowExpansion,
  48954. clearSort,
  48955. sort,
  48956. updateKeyChildren
  48957. };
  48958. }
  48959. //#endregion
  48960. //#region node_modules/element-plus/es/components/table/src/table/style-helper.mjs
  48961. function useStyle(props, layout, store, table) {
  48962. const isHidden = ref(false);
  48963. const renderExpanded = ref(null);
  48964. const resizeProxyVisible = ref(false);
  48965. const setDragVisible = (visible) => {
  48966. resizeProxyVisible.value = visible;
  48967. };
  48968. const resizeState = ref({
  48969. width: null,
  48970. height: null,
  48971. headerHeight: null
  48972. });
  48973. const isGroup = ref(false);
  48974. const scrollbarViewStyle = {
  48975. display: "inline-block",
  48976. verticalAlign: "middle"
  48977. };
  48978. const tableWidth = ref();
  48979. const tableScrollHeight = ref(0);
  48980. const bodyScrollHeight = ref(0);
  48981. const headerScrollHeight = ref(0);
  48982. const footerScrollHeight = ref(0);
  48983. const appendScrollHeight = ref(0);
  48984. watch(() => props.height, (value) => {
  48985. layout.setHeight(value ?? null);
  48986. }, { immediate: true });
  48987. watch(() => props.maxHeight, (value) => {
  48988. layout.setMaxHeight(value ?? null);
  48989. }, { immediate: true });
  48990. watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey]) => {
  48991. if (!unref(rowKey) || !unref(currentRowKey)) return;
  48992. store.setCurrentRowKey(`${currentRowKey}`);
  48993. }, { immediate: true });
  48994. watch(() => props.data, (data) => {
  48995. table.store.commit("setData", data);
  48996. }, {
  48997. immediate: true,
  48998. deep: true
  48999. });
  49000. watchEffect(() => {
  49001. if (props.expandRowKeys) store.setExpandRowKeysAdapter(props.expandRowKeys);
  49002. });
  49003. const handleMouseLeave = () => {
  49004. table.store.commit("setHoverRow", null);
  49005. if (table.hoverState) table.hoverState = null;
  49006. };
  49007. const handleHeaderFooterMousewheel = (_event, data) => {
  49008. const { pixelX, pixelY } = data;
  49009. if (Math.abs(pixelX) >= Math.abs(pixelY)) table.refs.bodyWrapper.scrollLeft += data.pixelX / 5;
  49010. };
  49011. const shouldUpdateHeight = computed(() => {
  49012. return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;
  49013. });
  49014. const tableBodyStyles = computed(() => {
  49015. return { width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : "" };
  49016. });
  49017. const doLayout = () => {
  49018. if (shouldUpdateHeight.value) layout.updateElsHeight();
  49019. layout.updateColumnsWidth();
  49020. if (typeof window === "undefined") return;
  49021. requestAnimationFrame(syncPosition);
  49022. };
  49023. onMounted(async () => {
  49024. await nextTick();
  49025. store.updateColumns();
  49026. bindEvents();
  49027. requestAnimationFrame(doLayout);
  49028. const el = table.vnode.el;
  49029. const tableHeader = table.refs.headerWrapper;
  49030. if (props.flexible && el && el.parentElement) el.parentElement.style.minWidth = "0";
  49031. resizeState.value = {
  49032. width: tableWidth.value = el.offsetWidth,
  49033. height: el.offsetHeight,
  49034. headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null
  49035. };
  49036. store.states.columns.value.forEach((column) => {
  49037. if (column.filteredValue && column.filteredValue.length) table.store.commit("filterChange", {
  49038. column,
  49039. values: column.filteredValue,
  49040. silent: true
  49041. });
  49042. });
  49043. table.$ready = true;
  49044. });
  49045. const setScrollClassByEl = (el, className) => {
  49046. if (!el) return;
  49047. const classList = Array.from(el.classList).filter((item) => !item.startsWith("is-scrolling-"));
  49048. classList.push(layout.scrollX.value ? className : "is-scrolling-none");
  49049. el.className = classList.join(" ");
  49050. };
  49051. const setScrollClass = (className) => {
  49052. const { tableWrapper } = table.refs;
  49053. setScrollClassByEl(tableWrapper, className);
  49054. };
  49055. const hasScrollClass = (className) => {
  49056. const { tableWrapper } = table.refs;
  49057. return !!(tableWrapper && tableWrapper.classList.contains(className));
  49058. };
  49059. const syncPosition = function() {
  49060. if (!table.refs.scrollBarRef) return;
  49061. if (!layout.scrollX.value) {
  49062. const scrollingNoneClass = "is-scrolling-none";
  49063. if (!hasScrollClass(scrollingNoneClass)) setScrollClass(scrollingNoneClass);
  49064. return;
  49065. }
  49066. const scrollContainer = table.refs.scrollBarRef.wrapRef;
  49067. if (!scrollContainer) return;
  49068. const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer;
  49069. const { headerWrapper, footerWrapper } = table.refs;
  49070. if (headerWrapper) headerWrapper.scrollLeft = scrollLeft;
  49071. if (footerWrapper) footerWrapper.scrollLeft = scrollLeft;
  49072. if (scrollLeft >= scrollWidth - offsetWidth - 1) setScrollClass("is-scrolling-right");
  49073. else if (scrollLeft === 0) setScrollClass("is-scrolling-left");
  49074. else setScrollClass("is-scrolling-middle");
  49075. };
  49076. const bindEvents = () => {
  49077. if (!table.refs.scrollBarRef) return;
  49078. if (table.refs.scrollBarRef.wrapRef) useEventListener(table.refs.scrollBarRef.wrapRef, "scroll", syncPosition, { passive: true });
  49079. if (props.fit) useResizeObserver(table.vnode.el, resizeListener);
  49080. else useEventListener(window, "resize", resizeListener);
  49081. useResizeObserver(table.refs.tableInnerWrapper, () => {
  49082. resizeListener();
  49083. table.refs?.scrollBarRef?.update();
  49084. });
  49085. };
  49086. const resizeListener = () => {
  49087. const el = table.vnode.el;
  49088. if (!table.$ready || !el) return;
  49089. let shouldUpdateLayout = false;
  49090. const { width: oldWidth, height: oldHeight, headerHeight: oldHeaderHeight } = resizeState.value;
  49091. const width = tableWidth.value = el.offsetWidth;
  49092. if (oldWidth !== width) shouldUpdateLayout = true;
  49093. const height = el.offsetHeight;
  49094. if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) shouldUpdateLayout = true;
  49095. const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : table.refs.tableHeaderRef?.$el;
  49096. if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) shouldUpdateLayout = true;
  49097. tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0;
  49098. headerScrollHeight.value = tableHeader?.scrollHeight || 0;
  49099. footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0;
  49100. appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0;
  49101. bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value;
  49102. if (shouldUpdateLayout) {
  49103. resizeState.value = {
  49104. width,
  49105. height,
  49106. headerHeight: props.showHeader && tableHeader?.offsetHeight || 0
  49107. };
  49108. doLayout();
  49109. }
  49110. };
  49111. const tableSize = useFormSize();
  49112. const bodyWidth = computed(() => {
  49113. const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout;
  49114. return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : "";
  49115. });
  49116. const tableLayout = computed(() => {
  49117. if (props.maxHeight) return "fixed";
  49118. return props.tableLayout;
  49119. });
  49120. return {
  49121. isHidden,
  49122. renderExpanded,
  49123. setDragVisible,
  49124. isGroup,
  49125. handleMouseLeave,
  49126. handleHeaderFooterMousewheel,
  49127. tableSize,
  49128. emptyBlockStyle: computed(() => {
  49129. if (props.data && props.data.length) return;
  49130. let height = "100%";
  49131. if (props.height && bodyScrollHeight.value) height = `${bodyScrollHeight.value}px`;
  49132. const width = tableWidth.value;
  49133. return {
  49134. width: width ? `${width}px` : "",
  49135. height
  49136. };
  49137. }),
  49138. resizeProxyVisible,
  49139. bodyWidth,
  49140. resizeState,
  49141. doLayout,
  49142. tableBodyStyles,
  49143. tableLayout,
  49144. scrollbarViewStyle,
  49145. scrollbarStyle: computed(() => {
  49146. if (props.height) return { height: "100%" };
  49147. if (props.maxHeight) if (!Number.isNaN(Number(props.maxHeight))) return { maxHeight: `${+props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px` };
  49148. else return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` };
  49149. return {};
  49150. })
  49151. };
  49152. }
  49153. //#endregion
  49154. //#region node_modules/element-plus/es/components/table/src/table/key-render-helper.mjs
  49155. function useKeyRender(table) {
  49156. let observer;
  49157. const initWatchDom = () => {
  49158. const columnsWrapper = table.vnode.el.querySelector(".hidden-columns");
  49159. const config = {
  49160. childList: true,
  49161. subtree: true
  49162. };
  49163. const updateOrderFns = table.store.states.updateOrderFns;
  49164. observer = new MutationObserver(() => {
  49165. updateOrderFns.forEach((fn) => fn());
  49166. });
  49167. observer.observe(columnsWrapper, config);
  49168. };
  49169. onMounted(() => {
  49170. initWatchDom();
  49171. });
  49172. onUnmounted(() => {
  49173. observer?.disconnect();
  49174. });
  49175. }
  49176. //#endregion
  49177. //#region node_modules/element-plus/es/components/table/src/h-helper.mjs
  49178. function hColgroup(props) {
  49179. const isAuto = props.tableLayout === "auto";
  49180. let columns = props.columns || [];
  49181. if (isAuto) {
  49182. if (columns.every(({ width }) => isUndefined(width))) columns = [];
  49183. }
  49184. const getPropsData = (column) => {
  49185. const propsData = {
  49186. key: `${props.tableLayout}_${column.id}`,
  49187. style: {},
  49188. name: void 0
  49189. };
  49190. if (isAuto) propsData.style = { width: `${column.width}px` };
  49191. else propsData.name = column.id;
  49192. return propsData;
  49193. };
  49194. return h$1("colgroup", {}, columns.map((column) => h$1("col", getPropsData(column))));
  49195. }
  49196. hColgroup.props = ["columns", "tableLayout"];
  49197. //#endregion
  49198. //#region node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs
  49199. var useScrollbar$1 = () => {
  49200. const scrollBarRef = ref();
  49201. const scrollTo = (options, yCoord) => {
  49202. const scrollbar = scrollBarRef.value;
  49203. if (scrollbar) scrollbar.scrollTo(options, yCoord);
  49204. };
  49205. const setScrollPosition = (position, offset) => {
  49206. const scrollbar = scrollBarRef.value;
  49207. if (scrollbar && isNumber(offset) && ["Top", "Left"].includes(position)) scrollbar[`setScroll${position}`](offset);
  49208. };
  49209. const setScrollTop = (top) => setScrollPosition("Top", top);
  49210. const setScrollLeft = (left) => setScrollPosition("Left", left);
  49211. return {
  49212. scrollBarRef,
  49213. scrollTo,
  49214. setScrollTop,
  49215. setScrollLeft
  49216. };
  49217. };
  49218. //#endregion
  49219. //#region node_modules/element-plus/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs
  49220. var _hoisted_1$15 = ["data-prefix"];
  49221. var _hoisted_2$9 = {
  49222. ref: "hiddenColumns",
  49223. class: "hidden-columns"
  49224. };
  49225. //#endregion
  49226. //#region node_modules/element-plus/es/components/table/src/table.mjs
  49227. var table_default = /* @__PURE__ */ defineComponent({
  49228. name: "ElTable",
  49229. __name: "table",
  49230. props: tableProps,
  49231. emits: [
  49232. "select",
  49233. "select-all",
  49234. "selection-change",
  49235. "cell-mouse-enter",
  49236. "cell-mouse-leave",
  49237. "cell-dblclick",
  49238. "cell-contextmenu",
  49239. "cell-click",
  49240. "row-dblclick",
  49241. "row-click",
  49242. "row-contextmenu",
  49243. "header-click",
  49244. "header-contextmenu",
  49245. "sort-change",
  49246. "filter-change",
  49247. "current-change",
  49248. "header-dragend",
  49249. "expand-change",
  49250. "scroll"
  49251. ],
  49252. setup(__props, { expose: __expose }) {
  49253. const props = __props;
  49254. const { t } = useLocale();
  49255. const ns = useNamespace("table");
  49256. const globalConfig = useGlobalConfig("table");
  49257. const table = getCurrentInstance();
  49258. provide(TABLE_INJECTION_KEY, table);
  49259. const store = createStore(table, props);
  49260. table.store = store;
  49261. const layout = new TableLayout({
  49262. store: table.store,
  49263. table,
  49264. fit: props.fit,
  49265. showHeader: props.showHeader
  49266. });
  49267. table.layout = layout;
  49268. const isEmpty = computed(() => (store.states.data.value || []).length === 0);
  49269. /**
  49270. * open functions
  49271. */
  49272. const { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort, updateKeyChildren } = useUtils(store);
  49273. const { isHidden, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, scrollbarStyle } = useStyle(props, layout, store, table);
  49274. const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar$1();
  49275. const debouncedUpdateLayout = debounce(doLayout, 50);
  49276. const tableId = createTableId(ns.namespace.value);
  49277. const context = table;
  49278. table.tableId = tableId;
  49279. table.state = {
  49280. isGroup,
  49281. resizeState,
  49282. doLayout,
  49283. debouncedUpdateLayout
  49284. };
  49285. const computedSumText = computed(() => props.sumText ?? t("el.table.sumText"));
  49286. const computedEmptyText = computed(() => {
  49287. return props.emptyText ?? t("el.table.emptyText");
  49288. });
  49289. const computedTooltipEffect = computed(() => props.tooltipEffect ?? globalConfig.value?.tooltipEffect);
  49290. const computedTooltipOptions = computed(() => props.tooltipOptions ?? globalConfig.value?.tooltipOptions);
  49291. const columns = computed(() => {
  49292. return convertToRows(store.states.originColumns.value)[0];
  49293. });
  49294. useKeyRender(table);
  49295. onBeforeUnmount(() => {
  49296. debouncedUpdateLayout.cancel();
  49297. });
  49298. __expose({
  49299. ns,
  49300. layout,
  49301. store,
  49302. columns,
  49303. handleHeaderFooterMousewheel,
  49304. handleMouseLeave,
  49305. tableId,
  49306. tableSize,
  49307. isHidden,
  49308. isEmpty,
  49309. renderExpanded,
  49310. resizeProxyVisible,
  49311. resizeState,
  49312. isGroup,
  49313. bodyWidth,
  49314. tableBodyStyles,
  49315. emptyBlockStyle,
  49316. debouncedUpdateLayout,
  49317. /**
  49318. * @description used in single selection Table, set a certain row selected. If called without any parameter, it will clear selection
  49319. */
  49320. setCurrentRow,
  49321. /**
  49322. * @description returns the currently selected rows
  49323. */
  49324. getSelectionRows,
  49325. /**
  49326. * @description used in multiple selection Table, toggle if a certain row is selected. With the second parameter, you can directly set if this row is selected
  49327. */
  49328. toggleRowSelection,
  49329. /**
  49330. * @description used in multiple selection Table, clear user selection
  49331. */
  49332. clearSelection,
  49333. /**
  49334. * @description clear filters of the columns whose `columnKey` are passed in. If no params, clear all filters
  49335. */
  49336. clearFilter,
  49337. /**
  49338. * @description used in multiple selection Table, toggle select all and deselect all
  49339. */
  49340. toggleAllSelection,
  49341. /**
  49342. * @description used in expandable Table or tree Table, toggle if a certain row is expanded. With the second parameter, you can directly set if this row is expanded or collapsed
  49343. */
  49344. toggleRowExpansion,
  49345. /**
  49346. * @description clear sorting, restore data to the original order
  49347. */
  49348. clearSort,
  49349. /**
  49350. * @description refresh the layout of Table. When the visibility of Table changes, you may need to call this method to get a correct layout
  49351. */
  49352. doLayout,
  49353. /**
  49354. * @description sort Table manually. Property `prop` is used to set sort column, property `order` is used to set sort order
  49355. */
  49356. sort,
  49357. /**
  49358. * @description used in lazy Table, must set `rowKey`, update key children
  49359. */
  49360. updateKeyChildren,
  49361. t,
  49362. setDragVisible,
  49363. context,
  49364. computedSumText,
  49365. computedEmptyText,
  49366. computedTooltipEffect,
  49367. computedTooltipOptions,
  49368. tableLayout,
  49369. scrollbarViewStyle,
  49370. scrollbarStyle,
  49371. scrollBarRef,
  49372. /**
  49373. * @description scrolls to a particular set of coordinates
  49374. */
  49375. scrollTo,
  49376. /**
  49377. * @description set horizontal scroll position
  49378. */
  49379. setScrollLeft,
  49380. /**
  49381. * @description set vertical scroll position
  49382. */
  49383. setScrollTop,
  49384. /**
  49385. * @description whether to allow drag the last column
  49386. */
  49387. allowDragLastColumn: props.allowDragLastColumn
  49388. });
  49389. return (_ctx, _cache) => {
  49390. return openBlock(), createElementBlock("div", {
  49391. ref: "tableWrapper",
  49392. class: normalizeClass([
  49393. {
  49394. [unref(ns).m("fit")]: __props.fit,
  49395. [unref(ns).m("striped")]: __props.stripe,
  49396. [unref(ns).m("border")]: __props.border || unref(isGroup),
  49397. [unref(ns).m("hidden")]: unref(isHidden),
  49398. [unref(ns).m("group")]: unref(isGroup),
  49399. [unref(ns).m("fluid-height")]: __props.maxHeight,
  49400. [unref(ns).m("scrollable-x")]: unref(layout).scrollX.value,
  49401. [unref(ns).m("scrollable-y")]: unref(layout).scrollY.value,
  49402. [unref(ns).m("enable-row-hover")]: !unref(store).states.isComplex.value,
  49403. [unref(ns).m("enable-row-transition")]: (unref(store).states.data.value || []).length !== 0 && (unref(store).states.data.value || []).length < 100,
  49404. "has-footer": __props.showSummary
  49405. },
  49406. unref(ns).m(unref(tableSize)),
  49407. __props.className,
  49408. unref(ns).b(),
  49409. unref(ns).m(`layout-${unref(tableLayout)}`)
  49410. ]),
  49411. style: normalizeStyle(__props.style),
  49412. "data-prefix": unref(ns).namespace.value,
  49413. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args))
  49414. }, [createBaseVNode("div", {
  49415. ref: "tableInnerWrapper",
  49416. class: normalizeClass(unref(ns).e("inner-wrapper"))
  49417. }, [
  49418. createBaseVNode("div", _hoisted_2$9, [renderSlot(_ctx.$slots, "default")], 512),
  49419. __props.showHeader && unref(tableLayout) === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
  49420. key: 0,
  49421. ref: "headerWrapper",
  49422. class: normalizeClass(unref(ns).e("header-wrapper"))
  49423. }, [createBaseVNode("table", {
  49424. ref: "tableHeader",
  49425. class: normalizeClass(unref(ns).e("header")),
  49426. style: normalizeStyle(unref(tableBodyStyles)),
  49427. border: "0",
  49428. cellpadding: "0",
  49429. cellspacing: "0"
  49430. }, [createVNode(unref(hColgroup), {
  49431. columns: unref(store).states.columns.value,
  49432. "table-layout": unref(tableLayout)
  49433. }, null, 8, ["columns", "table-layout"]), createVNode(unref(table_header_default), {
  49434. ref: "tableHeaderRef",
  49435. border: __props.border,
  49436. "default-sort": __props.defaultSort,
  49437. store: unref(store),
  49438. "append-filter-panel-to": __props.appendFilterPanelTo,
  49439. "allow-drag-last-column": __props.allowDragLastColumn,
  49440. onSetDragVisible: unref(setDragVisible)
  49441. }, null, 8, [
  49442. "border",
  49443. "default-sort",
  49444. "store",
  49445. "append-filter-panel-to",
  49446. "allow-drag-last-column",
  49447. "onSetDragVisible"
  49448. ])], 6)], 2)), [[unref(Mousewheel), unref(handleHeaderFooterMousewheel)]]) : createCommentVNode("v-if", true),
  49449. createBaseVNode("div", {
  49450. ref: "bodyWrapper",
  49451. class: normalizeClass(unref(ns).e("body-wrapper"))
  49452. }, [createVNode(unref(ElScrollbar), {
  49453. ref_key: "scrollBarRef",
  49454. ref: scrollBarRef,
  49455. "view-style": unref(scrollbarViewStyle),
  49456. "wrap-style": unref(scrollbarStyle),
  49457. always: __props.scrollbarAlwaysOn,
  49458. tabindex: __props.scrollbarTabindex,
  49459. native: __props.nativeScrollbar,
  49460. onScroll: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("scroll", $event))
  49461. }, {
  49462. default: withCtx(() => [
  49463. createBaseVNode("table", {
  49464. ref: "tableBody",
  49465. class: normalizeClass(unref(ns).e("body")),
  49466. cellspacing: "0",
  49467. cellpadding: "0",
  49468. border: "0",
  49469. style: normalizeStyle({
  49470. width: unref(bodyWidth),
  49471. tableLayout: unref(tableLayout)
  49472. })
  49473. }, [
  49474. createVNode(unref(hColgroup), {
  49475. columns: unref(store).states.columns.value,
  49476. "table-layout": unref(tableLayout)
  49477. }, null, 8, ["columns", "table-layout"]),
  49478. __props.showHeader && unref(tableLayout) === "auto" ? (openBlock(), createBlock(unref(table_header_default), {
  49479. key: 0,
  49480. ref: "tableHeaderRef",
  49481. class: normalizeClass(unref(ns).e("body-header")),
  49482. border: __props.border,
  49483. "default-sort": __props.defaultSort,
  49484. store: unref(store),
  49485. "append-filter-panel-to": __props.appendFilterPanelTo,
  49486. onSetDragVisible: unref(setDragVisible)
  49487. }, null, 8, [
  49488. "class",
  49489. "border",
  49490. "default-sort",
  49491. "store",
  49492. "append-filter-panel-to",
  49493. "onSetDragVisible"
  49494. ])) : createCommentVNode("v-if", true),
  49495. createVNode(unref(table_body_default), {
  49496. context: unref(context),
  49497. highlight: __props.highlightCurrentRow,
  49498. "row-class-name": __props.rowClassName,
  49499. "tooltip-effect": computedTooltipEffect.value,
  49500. "tooltip-options": computedTooltipOptions.value,
  49501. "row-style": __props.rowStyle,
  49502. store: unref(store),
  49503. stripe: __props.stripe
  49504. }, null, 8, [
  49505. "context",
  49506. "highlight",
  49507. "row-class-name",
  49508. "tooltip-effect",
  49509. "tooltip-options",
  49510. "row-style",
  49511. "store",
  49512. "stripe"
  49513. ]),
  49514. __props.showSummary && unref(tableLayout) === "auto" ? (openBlock(), createBlock(unref(table_footer_default), {
  49515. key: 1,
  49516. class: normalizeClass(unref(ns).e("body-footer")),
  49517. border: __props.border,
  49518. "default-sort": __props.defaultSort,
  49519. store: unref(store),
  49520. "sum-text": computedSumText.value,
  49521. "summary-method": __props.summaryMethod
  49522. }, null, 8, [
  49523. "class",
  49524. "border",
  49525. "default-sort",
  49526. "store",
  49527. "sum-text",
  49528. "summary-method"
  49529. ])) : createCommentVNode("v-if", true)
  49530. ], 6),
  49531. isEmpty.value ? (openBlock(), createElementBlock("div", {
  49532. key: 0,
  49533. ref: "emptyBlock",
  49534. style: normalizeStyle(unref(emptyBlockStyle)),
  49535. class: normalizeClass(unref(ns).e("empty-block"))
  49536. }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("empty-text")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(computedEmptyText.value), 1)])], 2)], 6)) : createCommentVNode("v-if", true),
  49537. _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
  49538. key: 1,
  49539. ref: "appendWrapper",
  49540. class: normalizeClass(unref(ns).e("append-wrapper"))
  49541. }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
  49542. ]),
  49543. _: 3
  49544. }, 8, [
  49545. "view-style",
  49546. "wrap-style",
  49547. "always",
  49548. "tabindex",
  49549. "native"
  49550. ])], 2),
  49551. __props.showSummary && unref(tableLayout) === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
  49552. key: 1,
  49553. ref: "footerWrapper",
  49554. class: normalizeClass(unref(ns).e("footer-wrapper"))
  49555. }, [createBaseVNode("table", {
  49556. class: normalizeClass(unref(ns).e("footer")),
  49557. cellspacing: "0",
  49558. cellpadding: "0",
  49559. border: "0",
  49560. style: normalizeStyle(unref(tableBodyStyles))
  49561. }, [createVNode(unref(hColgroup), {
  49562. columns: unref(store).states.columns.value,
  49563. "table-layout": unref(tableLayout)
  49564. }, null, 8, ["columns", "table-layout"]), createVNode(unref(table_footer_default), {
  49565. border: __props.border,
  49566. "default-sort": __props.defaultSort,
  49567. store: unref(store),
  49568. "sum-text": computedSumText.value,
  49569. "summary-method": __props.summaryMethod
  49570. }, null, 8, [
  49571. "border",
  49572. "default-sort",
  49573. "store",
  49574. "sum-text",
  49575. "summary-method"
  49576. ])], 6)], 2)), [[vShow, !isEmpty.value], [unref(Mousewheel), unref(handleHeaderFooterMousewheel)]]) : createCommentVNode("v-if", true),
  49577. __props.border || unref(isGroup) ? (openBlock(), createElementBlock("div", {
  49578. key: 2,
  49579. class: normalizeClass(unref(ns).e("border-left-patch"))
  49580. }, null, 2)) : createCommentVNode("v-if", true)
  49581. ], 2), withDirectives(createBaseVNode("div", {
  49582. ref: "resizeProxy",
  49583. class: normalizeClass(unref(ns).e("column-resize-proxy"))
  49584. }, null, 2), [[vShow, unref(resizeProxyVisible)]])], 46, _hoisted_1$15);
  49585. };
  49586. }
  49587. });
  49588. //#endregion
  49589. //#region node_modules/element-plus/es/components/table/src/table-column/defaults.mjs
  49590. /**
  49591. * @deprecated Removed after 3.0.0, Use `TableColumnProps` instead.
  49592. */
  49593. var tableColumnProps = {
  49594. /**
  49595. * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon
  49596. */
  49597. type: {
  49598. type: String,
  49599. default: "default"
  49600. },
  49601. /**
  49602. * @description column label
  49603. */
  49604. label: String,
  49605. /**
  49606. * @description class name of cells in the column
  49607. */
  49608. className: String,
  49609. /**
  49610. * @description class name of the label of this column
  49611. */
  49612. labelClassName: String,
  49613. /**
  49614. * @description
  49615. */
  49616. property: String,
  49617. /**
  49618. * @description field name. You can also use its alias: `property`
  49619. */
  49620. prop: String,
  49621. /**
  49622. * @description column width
  49623. */
  49624. width: {
  49625. type: [String, Number],
  49626. default: ""
  49627. },
  49628. /**
  49629. * @description column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion
  49630. */
  49631. minWidth: {
  49632. type: [String, Number],
  49633. default: ""
  49634. },
  49635. /**
  49636. * @description render function for table header of this column
  49637. */
  49638. renderHeader: Function,
  49639. /**
  49640. * @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table
  49641. */
  49642. sortable: {
  49643. type: [Boolean, String],
  49644. default: false
  49645. },
  49646. /**
  49647. * @description sorting method, works when `sortable` is `true`. Should return a number, just like Array.sort
  49648. */
  49649. sortMethod: Function,
  49650. /**
  49651. * @description specify which property to sort by, works when `sortable` is `true` and `sort-method` is `undefined`. If set to an Array, the column will sequentially sort by the next property if the previous one is equal
  49652. */
  49653. sortBy: [
  49654. String,
  49655. Function,
  49656. Array
  49657. ],
  49658. /**
  49659. * @description whether column width can be resized, works when `border` of `el-table` is `true`
  49660. */
  49661. resizable: {
  49662. type: Boolean,
  49663. default: true
  49664. },
  49665. /**
  49666. * @description column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered
  49667. */
  49668. columnKey: String,
  49669. /**
  49670. * @description alignment, the value should be 'left' \/ 'center' \/ 'right'
  49671. */
  49672. align: String,
  49673. /**
  49674. * @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \/ 'center' \/ 'right'
  49675. */
  49676. headerAlign: String,
  49677. /**
  49678. * @description whether to hide extra content and show them in a tooltip when hovering on the cell
  49679. */
  49680. showOverflowTooltip: {
  49681. type: [Boolean, Object],
  49682. default: void 0
  49683. },
  49684. /**
  49685. * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`
  49686. */
  49687. tooltipFormatter: Function,
  49688. /**
  49689. * @description whether column is fixed at left / right. Will be fixed at left if `true`
  49690. */
  49691. fixed: [Boolean, String],
  49692. /**
  49693. * @description function that formats cell content
  49694. */
  49695. formatter: Function,
  49696. /**
  49697. * @description function that determines if a certain row can be selected, works when `type` is 'selection'
  49698. */
  49699. selectable: Function,
  49700. /**
  49701. * @description whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work
  49702. */
  49703. reserveSelection: Boolean,
  49704. /**
  49705. * @description data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true`
  49706. */
  49707. filterMethod: Function,
  49708. /**
  49709. * @description filter value for selected data, might be useful when table header is rendered with `render-header`
  49710. */
  49711. filteredValue: Array,
  49712. /**
  49713. * @description an array of data filtering options. For each element in this array, `text` and `value` are required
  49714. */
  49715. filters: Array,
  49716. /**
  49717. * @description placement for the filter dropdown
  49718. */
  49719. filterPlacement: String,
  49720. /**
  49721. * @description whether data filtering supports multiple options
  49722. */
  49723. filterMultiple: {
  49724. type: Boolean,
  49725. default: true
  49726. },
  49727. /**
  49728. * @description className for the filter dropdown
  49729. */
  49730. filterClassName: String,
  49731. /**
  49732. * @description customize indices for each row, works on columns with `type=index`
  49733. */
  49734. index: [Number, Function],
  49735. /**
  49736. * @description the order of the sorting strategies used when sorting the data, works when `sortable` is `true`. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the array
  49737. */
  49738. sortOrders: {
  49739. type: Array,
  49740. default: () => {
  49741. return [
  49742. "ascending",
  49743. "descending",
  49744. null
  49745. ];
  49746. },
  49747. validator: (val) => {
  49748. return val.every((order) => [
  49749. "ascending",
  49750. "descending",
  49751. null
  49752. ].includes(order));
  49753. }
  49754. }
  49755. };
  49756. //#endregion
  49757. //#region node_modules/element-plus/es/components/table/src/config.mjs
  49758. var defaultClassNames = {
  49759. selection: "table-column--selection",
  49760. expand: "table__expand-column"
  49761. };
  49762. var cellStarts = {
  49763. default: { order: "" },
  49764. selection: {
  49765. width: 48,
  49766. minWidth: 48,
  49767. realWidth: 48,
  49768. order: ""
  49769. },
  49770. expand: {
  49771. width: 48,
  49772. minWidth: 48,
  49773. realWidth: 48,
  49774. order: ""
  49775. },
  49776. index: {
  49777. width: 48,
  49778. minWidth: 48,
  49779. realWidth: 48,
  49780. order: ""
  49781. }
  49782. };
  49783. var getDefaultClassName = (type) => {
  49784. return defaultClassNames[type] || "";
  49785. };
  49786. var cellForced = {
  49787. selection: {
  49788. renderHeader({ store }) {
  49789. function isDisabled() {
  49790. return store.states.data.value && store.states.data.value.length === 0;
  49791. }
  49792. return h$1(ElCheckbox, {
  49793. disabled: isDisabled(),
  49794. size: store.states.tableSize.value,
  49795. indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
  49796. "onUpdate:modelValue": store.toggleAllSelection ?? void 0,
  49797. modelValue: store.states.isAllSelected.value,
  49798. ariaLabel: store.t("el.table.selectAllLabel")
  49799. });
  49800. },
  49801. renderCell({ row, column, store, $index }) {
  49802. return h$1(ElCheckbox, {
  49803. disabled: column.selectable ? !column.selectable.call(null, row, $index) : false,
  49804. size: store.states.tableSize.value,
  49805. onChange: () => {
  49806. store.commit("rowSelectedChanged", row);
  49807. },
  49808. onClick: (event) => event.stopPropagation(),
  49809. modelValue: store.isSelected(row),
  49810. indeterminate: store.getRowIndeterminate(row),
  49811. ariaLabel: store.t("el.table.selectRowLabel")
  49812. });
  49813. },
  49814. sortable: false,
  49815. resizable: false
  49816. },
  49817. index: {
  49818. renderHeader({ column }) {
  49819. return column.label || "#";
  49820. },
  49821. renderCell({ column, $index }) {
  49822. let i = $index + 1;
  49823. const index = column.index;
  49824. if (isNumber(index)) i = $index + index;
  49825. else if (isFunction$1(index)) i = index($index);
  49826. return h$1("div", {}, [i]);
  49827. },
  49828. sortable: false
  49829. },
  49830. expand: {
  49831. renderHeader({ column }) {
  49832. return column.label || "";
  49833. },
  49834. renderCell({ column, row, store, expanded, $index }) {
  49835. const { ns } = store;
  49836. const classes = [ns.e("expand-icon")];
  49837. if (!column.renderExpand && expanded) classes.push(ns.em("expand-icon", "expanded"));
  49838. const callback = function(e) {
  49839. e.stopPropagation();
  49840. store.toggleRowExpansion(row);
  49841. };
  49842. const isRowExpandable = store.states.rowExpandable.value?.(row, $index) ?? true;
  49843. if (!isRowExpandable) classes.push(ns.is("disabled"));
  49844. return h$1("button", {
  49845. type: "button",
  49846. disabled: !isRowExpandable,
  49847. "aria-label": store.t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
  49848. "aria-expanded": expanded,
  49849. class: classes,
  49850. onClick: callback
  49851. }, { default: () => {
  49852. if (column.renderExpand) return [column.renderExpand({
  49853. expanded,
  49854. expandable: isRowExpandable
  49855. })];
  49856. return [h$1(ElIcon, null, { default: () => {
  49857. return [h$1(arrow_right_default)];
  49858. } })];
  49859. } });
  49860. },
  49861. sortable: false,
  49862. resizable: false
  49863. }
  49864. };
  49865. function defaultRenderCell({ row, column, $index }) {
  49866. const property = column.property;
  49867. const value = property && getProp(row, property).value;
  49868. if (column && column.formatter) return column.formatter(row, column, value, $index);
  49869. return value?.toString?.() || "";
  49870. }
  49871. function treeCellPrefix({ row, treeNode, store }, createPlaceholder = false) {
  49872. const { ns } = store;
  49873. if (!treeNode) {
  49874. if (createPlaceholder) return [h$1("span", { class: ns.e("placeholder") })];
  49875. return null;
  49876. }
  49877. const ele = [];
  49878. const callback = function(e) {
  49879. e.stopPropagation();
  49880. if (treeNode.loading) return;
  49881. store.loadOrToggle(row);
  49882. };
  49883. if (treeNode.indent) ele.push(h$1("span", {
  49884. class: ns.e("indent"),
  49885. style: { "padding-left": `${treeNode.indent}px` }
  49886. }));
  49887. if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) {
  49888. const expandClasses = [ns.e("expand-icon"), treeNode.expanded ? ns.em("expand-icon", "expanded") : ""];
  49889. let icon = arrow_right_default;
  49890. if (treeNode.loading) icon = loading_default;
  49891. ele.push(h$1("button", {
  49892. type: "button",
  49893. "aria-label": store.t(treeNode.expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
  49894. "aria-expanded": treeNode.expanded,
  49895. class: expandClasses,
  49896. onClick: callback
  49897. }, { default: () => {
  49898. return [h$1(ElIcon, { class: ns.is("loading", treeNode.loading) }, { default: () => [h$1(icon)] })];
  49899. } }));
  49900. } else ele.push(h$1("span", { class: ns.e("placeholder") }));
  49901. return ele;
  49902. }
  49903. //#endregion
  49904. //#region node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs
  49905. function getAllAliases(props, aliases) {
  49906. return props.reduce((prev, cur) => {
  49907. prev[cur] = cur;
  49908. return prev;
  49909. }, aliases);
  49910. }
  49911. function useWatcher(owner, props_) {
  49912. const instance = getCurrentInstance();
  49913. const registerComplexWatchers = () => {
  49914. const props = ["fixed"];
  49915. const aliases = {
  49916. realWidth: "width",
  49917. realMinWidth: "minWidth"
  49918. };
  49919. const allAliases = getAllAliases(props, aliases);
  49920. Object.keys(allAliases).forEach((key) => {
  49921. const columnKey = aliases[key];
  49922. if (hasOwn(props_, columnKey)) watch(() => props_[columnKey], (newVal) => {
  49923. let value = newVal;
  49924. if (columnKey === "width" && key === "realWidth") value = parseWidth(newVal);
  49925. if (columnKey === "minWidth" && key === "realMinWidth") value = parseMinWidth(newVal);
  49926. instance.columnConfig.value[columnKey] = value;
  49927. instance.columnConfig.value[key] = value;
  49928. const updateColumns = columnKey === "fixed";
  49929. owner.value.store.scheduleLayout(updateColumns);
  49930. });
  49931. });
  49932. };
  49933. const registerNormalWatchers = () => {
  49934. const props = [
  49935. "label",
  49936. "filters",
  49937. "filterMultiple",
  49938. "filteredValue",
  49939. "sortable",
  49940. "index",
  49941. "formatter",
  49942. "className",
  49943. "labelClassName",
  49944. "filterClassName",
  49945. "showOverflowTooltip",
  49946. "tooltipFormatter",
  49947. "resizable"
  49948. ];
  49949. const parentProps = ["showOverflowTooltip"];
  49950. const aliases = {
  49951. property: "prop",
  49952. align: "realAlign",
  49953. headerAlign: "realHeaderAlign"
  49954. };
  49955. const allAliases = getAllAliases(props, aliases);
  49956. Object.keys(allAliases).forEach((key) => {
  49957. const columnKey = aliases[key];
  49958. if (hasOwn(props_, columnKey)) watch(() => props_[columnKey], (newVal) => {
  49959. instance.columnConfig.value[key] = newVal;
  49960. if (key === "filters" || key === "filterMethod") instance.columnConfig.value["filterable"] = !!(instance.columnConfig.value["filters"] || instance.columnConfig.value["filterMethod"]);
  49961. });
  49962. });
  49963. parentProps.forEach((key) => {
  49964. if (hasOwn(owner.value.props, key)) watch(() => owner.value.props[key], (newVal) => {
  49965. if (instance.columnConfig.value.type === "selection") return;
  49966. if (!isUndefined(props_[key])) return;
  49967. instance.columnConfig.value[key] = newVal;
  49968. });
  49969. });
  49970. const globalConfig = useGlobalConfig("table");
  49971. if (globalConfig.value && hasOwn(globalConfig.value, "showOverflowTooltip")) watch(() => globalConfig.value?.showOverflowTooltip, (newVal) => {
  49972. if (instance.columnConfig.value.type === "selection") return;
  49973. if (!isUndefined(props_.showOverflowTooltip) || !isUndefined(owner.value.props.showOverflowTooltip)) return;
  49974. instance.columnConfig.value.showOverflowTooltip = newVal;
  49975. });
  49976. };
  49977. return {
  49978. registerComplexWatchers,
  49979. registerNormalWatchers
  49980. };
  49981. }
  49982. //#endregion
  49983. //#region node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs
  49984. function useRender(props, slots, owner) {
  49985. const instance = getCurrentInstance();
  49986. const columnId = ref("");
  49987. const isSubColumn = ref(false);
  49988. const realAlign = ref();
  49989. const realHeaderAlign = ref();
  49990. const ns = useNamespace("table");
  49991. watchEffect(() => {
  49992. realAlign.value = props.align ? `is-${props.align}` : null;
  49993. realAlign.value;
  49994. });
  49995. watchEffect(() => {
  49996. realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value;
  49997. realHeaderAlign.value;
  49998. });
  49999. const columnOrTableParent = computed(() => {
  50000. let parent = instance.vnode.vParent || instance.parent;
  50001. while (parent && !parent.tableId && !parent.columnId) parent = parent.vnode.vParent || parent.parent;
  50002. return parent;
  50003. });
  50004. const hasTreeColumn = computed(() => {
  50005. const { store } = instance.parent;
  50006. if (!store) return false;
  50007. const { treeData } = store.states;
  50008. const treeDataValue = treeData.value;
  50009. return treeDataValue && Object.keys(treeDataValue).length > 0;
  50010. });
  50011. const realWidth = ref(parseWidth(props.width));
  50012. const realMinWidth = ref(parseMinWidth(props.minWidth));
  50013. const setColumnWidth = (column) => {
  50014. if (realWidth.value) column.width = realWidth.value;
  50015. if (realMinWidth.value) column.minWidth = realMinWidth.value;
  50016. if (!realWidth.value && realMinWidth.value) column.width = void 0;
  50017. if (!column.minWidth) column.minWidth = 80;
  50018. column.realWidth = Number(isUndefined(column.width) ? column.minWidth : column.width);
  50019. return column;
  50020. };
  50021. const setColumnForcedProps = (column) => {
  50022. const type = column.type;
  50023. const source = cellForced[type] || {};
  50024. Object.keys(source).forEach((prop) => {
  50025. const value = source[prop];
  50026. if (prop !== "className" && !isUndefined(value)) column[prop] = value;
  50027. });
  50028. const className = getDefaultClassName(type);
  50029. if (className) {
  50030. const forceClass = `${unref(ns.namespace)}-${className}`;
  50031. column.className = column.className ? `${column.className} ${forceClass}` : forceClass;
  50032. }
  50033. return column;
  50034. };
  50035. const checkSubColumn = (children) => {
  50036. if (isArray$1(children)) children.forEach((child) => check(child));
  50037. else check(children);
  50038. function check(item) {
  50039. if (item?.type?.name === "ElTableColumn") item.vParent = instance;
  50040. }
  50041. };
  50042. const setColumnRenders = (column) => {
  50043. if (props.renderHeader) debugWarn("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.");
  50044. else if (column.type !== "selection") column.renderHeader = (scope) => {
  50045. instance.columnConfig.value["label"];
  50046. if (slots.header) {
  50047. const slotResult = slots.header(scope);
  50048. if (ensureValidVNode(slotResult)) return h$1(Fragment, slotResult);
  50049. }
  50050. return createTextVNode(column.label);
  50051. };
  50052. if (slots["filter-icon"]) column.renderFilterIcon = (scope) => {
  50053. return renderSlot(slots, "filter-icon", scope);
  50054. };
  50055. if (slots.expand) column.renderExpand = (scope) => {
  50056. return renderSlot(slots, "expand", scope);
  50057. };
  50058. let originRenderCell = column.renderCell;
  50059. if (column.type === "expand") {
  50060. column.renderCell = (data) => h$1("div", { class: "cell" }, [originRenderCell(data)]);
  50061. owner.value.renderExpanded = (row) => {
  50062. return slots.default ? slots.default(row) : slots.default;
  50063. };
  50064. } else {
  50065. originRenderCell = originRenderCell || defaultRenderCell;
  50066. column.renderCell = (data) => {
  50067. let children = null;
  50068. if (slots.default) {
  50069. const vnodes = slots.default(data);
  50070. children = vnodes.some((v) => v.type !== Comment) ? vnodes : originRenderCell(data);
  50071. } else children = originRenderCell(data);
  50072. const { columns } = owner.value.store.states;
  50073. const firstUserColumnIndex = columns.value.findIndex((item) => item.type === "default");
  50074. const prefix = treeCellPrefix(data, hasTreeColumn.value && data.cellIndex === firstUserColumnIndex);
  50075. const props = {
  50076. class: "cell",
  50077. style: {}
  50078. };
  50079. if (column.showOverflowTooltip) {
  50080. props.class = `${props.class} ${unref(ns.namespace)}-tooltip`;
  50081. props.style = { width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` };
  50082. }
  50083. checkSubColumn(children);
  50084. return h$1("div", props, [prefix, children]);
  50085. };
  50086. }
  50087. return column;
  50088. };
  50089. const getPropsData = (...propsKey) => {
  50090. return propsKey.reduce((prev, cur) => {
  50091. if (isArray$1(cur)) cur.forEach((key) => {
  50092. prev[key] = props[key];
  50093. });
  50094. return prev;
  50095. }, {});
  50096. };
  50097. const getColumnElIndex = (children, child) => {
  50098. return Array.prototype.indexOf.call(children, child);
  50099. };
  50100. const updateColumnOrder = () => {
  50101. owner.value.store.commit("updateColumnOrder", instance.columnConfig.value);
  50102. };
  50103. return {
  50104. columnId,
  50105. realAlign,
  50106. isSubColumn,
  50107. realHeaderAlign,
  50108. columnOrTableParent,
  50109. setColumnWidth,
  50110. setColumnForcedProps,
  50111. setColumnRenders,
  50112. getPropsData,
  50113. getColumnElIndex,
  50114. updateColumnOrder
  50115. };
  50116. }
  50117. //#endregion
  50118. //#region node_modules/element-plus/es/components/table/src/tableColumn.mjs
  50119. var tableColumn_default = /* @__PURE__ */ defineComponent({
  50120. name: "ElTableColumn",
  50121. __name: "index",
  50122. props: tableColumnProps,
  50123. setup(__props) {
  50124. const props = __props;
  50125. const slots = useSlots();
  50126. const instance = getCurrentInstance();
  50127. const globalConfig = useGlobalConfig("table");
  50128. const columnConfig = ref({});
  50129. const owner = computed(() => {
  50130. let parent = instance.parent;
  50131. while (parent && !parent.tableId) parent = parent.parent;
  50132. return parent;
  50133. });
  50134. const { registerNormalWatchers, registerComplexWatchers } = useWatcher(owner, props);
  50135. const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = useRender(props, slots, owner);
  50136. const parent = columnOrTableParent.value;
  50137. columnId.value = createTableColumnId("tableId" in parent ? parent.tableId : parent.columnId);
  50138. onBeforeMount(() => {
  50139. isSubColumn.value = owner.value !== parent;
  50140. const type = props.type || "default";
  50141. const sortable = props.sortable === "" ? true : props.sortable;
  50142. const showOverflowTooltip = type === "selection" ? false : isUndefined(props.showOverflowTooltip) ? parent.props.showOverflowTooltip ?? globalConfig.value?.showOverflowTooltip : props.showOverflowTooltip;
  50143. const tooltipFormatter = isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter ?? globalConfig.value?.tooltipFormatter : props.tooltipFormatter;
  50144. const defaults = {
  50145. ...cellStarts[type],
  50146. id: columnId.value,
  50147. type,
  50148. property: props.prop || props.property,
  50149. align: realAlign,
  50150. headerAlign: realHeaderAlign,
  50151. showOverflowTooltip,
  50152. tooltipFormatter,
  50153. filterable: props.filters || props.filterMethod,
  50154. filteredValue: [],
  50155. filterPlacement: "",
  50156. filterClassName: "",
  50157. isColumnGroup: false,
  50158. isSubColumn: false,
  50159. filterOpened: false,
  50160. sortable,
  50161. index: props.index,
  50162. rawColumnKey: instance.vnode.key
  50163. };
  50164. let column = getPropsData([
  50165. "columnKey",
  50166. "label",
  50167. "className",
  50168. "labelClassName",
  50169. "type",
  50170. "renderHeader",
  50171. "formatter",
  50172. "fixed",
  50173. "resizable"
  50174. ], [
  50175. "sortMethod",
  50176. "sortBy",
  50177. "sortOrders"
  50178. ], ["selectable", "reserveSelection"], [
  50179. "filterMethod",
  50180. "filters",
  50181. "filterMultiple",
  50182. "filterOpened",
  50183. "filteredValue",
  50184. "filterPlacement",
  50185. "filterClassName"
  50186. ]);
  50187. column = mergeOptions(defaults, column);
  50188. column = compose(setColumnRenders, setColumnWidth, setColumnForcedProps)(column);
  50189. columnConfig.value = column;
  50190. registerNormalWatchers();
  50191. registerComplexWatchers();
  50192. });
  50193. onMounted(() => {
  50194. const parent = columnOrTableParent.value;
  50195. const children = isSubColumn.value ? parent.vnode.el?.children : parent.refs.hiddenColumns?.children;
  50196. const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);
  50197. columnConfig.value.getColumnIndex = getColumnIndex;
  50198. getColumnIndex() > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
  50199. });
  50200. onBeforeUnmount(() => {
  50201. const getColumnIndex = columnConfig.value.getColumnIndex;
  50202. (getColumnIndex ? getColumnIndex() : -1) > -1 && owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
  50203. });
  50204. instance.columnId = columnId.value;
  50205. instance.columnConfig = columnConfig;
  50206. const TableColumnRenderer = () => {
  50207. try {
  50208. const renderDefault = slots.default?.({
  50209. row: {},
  50210. column: {},
  50211. $index: -1
  50212. });
  50213. const children = [];
  50214. if (isArray$1(renderDefault)) {
  50215. for (const childNode of renderDefault) if (childNode.type?.name === "ElTableColumn" || childNode.shapeFlag & 2) children.push(childNode);
  50216. else if (childNode.type === Fragment && isArray$1(childNode.children)) childNode.children.forEach((vnode) => {
  50217. if (vnode?.patchFlag !== 1024 && !isString(vnode?.children)) children.push(vnode);
  50218. });
  50219. }
  50220. return h$1("div", children);
  50221. } catch {
  50222. return h$1("div", []);
  50223. }
  50224. };
  50225. return (_ctx, _cache) => {
  50226. return openBlock(), createBlock(TableColumnRenderer);
  50227. };
  50228. }
  50229. });
  50230. //#endregion
  50231. //#region node_modules/element-plus/es/components/table/index.mjs
  50232. var ElTable = withInstall(table_default, { TableColumn: tableColumn_default });
  50233. var ElTableColumn = withNoopInstall(tableColumn_default);
  50234. //#endregion
  50235. //#region node_modules/element-plus/es/components/table-v2/src/constants.mjs
  50236. var SortOrder = /* @__PURE__ */ function(SortOrder) {
  50237. SortOrder["ASC"] = "asc";
  50238. SortOrder["DESC"] = "desc";
  50239. return SortOrder;
  50240. }({});
  50241. var Alignment = /* @__PURE__ */ function(Alignment) {
  50242. Alignment["LEFT"] = "left";
  50243. Alignment["CENTER"] = "center";
  50244. Alignment["RIGHT"] = "right";
  50245. return Alignment;
  50246. }({});
  50247. var FixedDir = /* @__PURE__ */ function(FixedDir) {
  50248. FixedDir["LEFT"] = "left";
  50249. FixedDir["RIGHT"] = "right";
  50250. return FixedDir;
  50251. }({});
  50252. var oppositeOrderMap = {
  50253. ["asc"]: "desc",
  50254. ["desc"]: "asc"
  50255. };
  50256. //#endregion
  50257. //#region node_modules/element-plus/es/components/table-v2/src/private.mjs
  50258. var placeholderSign = Symbol("placeholder");
  50259. //#endregion
  50260. //#region node_modules/element-plus/es/components/table-v2/src/common.mjs
  50261. /**
  50262. * @Note even though we can use `string[] | string` as the type but for
  50263. * convenience here we only use `string` as the acceptable value here.
  50264. */
  50265. var classType = String;
  50266. var columns = {
  50267. type: definePropType(Array),
  50268. required: true
  50269. };
  50270. var fixedDataType = { type: definePropType(Array) };
  50271. var dataType = {
  50272. ...fixedDataType,
  50273. required: true
  50274. };
  50275. var expandColumnKey = String;
  50276. var expandKeys = {
  50277. type: definePropType(Array),
  50278. default: () => mutable([])
  50279. };
  50280. var requiredNumber = {
  50281. type: Number,
  50282. required: true
  50283. };
  50284. var rowKey = {
  50285. type: definePropType([
  50286. String,
  50287. Number,
  50288. Symbol
  50289. ]),
  50290. default: "id"
  50291. };
  50292. /**
  50293. * @note even though we can use `StyleValue` but that would be difficult for us to mapping them,
  50294. * so we only use `CSSProperties` as the acceptable value here.
  50295. */
  50296. var styleType = { type: definePropType(Object) };
  50297. //#endregion
  50298. //#region node_modules/element-plus/es/components/table-v2/src/row.mjs
  50299. var tableV2RowProps = buildProps({
  50300. class: String,
  50301. columns,
  50302. columnsStyles: {
  50303. type: definePropType(Object),
  50304. required: true
  50305. },
  50306. depth: Number,
  50307. expandColumnKey,
  50308. estimatedRowHeight: {
  50309. ...virtualizedGridProps.estimatedRowHeight,
  50310. default: void 0
  50311. },
  50312. isScrolling: Boolean,
  50313. onRowExpand: { type: definePropType(Function) },
  50314. onRowHover: { type: definePropType(Function) },
  50315. onRowHeightChange: { type: definePropType(Function) },
  50316. rowData: {
  50317. type: definePropType(Object),
  50318. required: true
  50319. },
  50320. rowEventHandlers: { type: definePropType(Object) },
  50321. rowIndex: {
  50322. type: Number,
  50323. required: true
  50324. },
  50325. /**
  50326. * Unique item key
  50327. */
  50328. rowKey,
  50329. style: { type: definePropType(Object) }
  50330. });
  50331. //#endregion
  50332. //#region node_modules/element-plus/es/components/table-v2/src/header.mjs
  50333. var requiredNumberType = {
  50334. type: Number,
  50335. required: true
  50336. };
  50337. var tableV2HeaderProps = buildProps({
  50338. class: String,
  50339. columns,
  50340. fixedHeaderData: { type: definePropType(Array) },
  50341. headerData: {
  50342. type: definePropType(Array),
  50343. required: true
  50344. },
  50345. headerHeight: {
  50346. type: definePropType([Number, Array]),
  50347. default: 50
  50348. },
  50349. rowWidth: requiredNumberType,
  50350. rowHeight: {
  50351. type: Number,
  50352. default: 50
  50353. },
  50354. height: requiredNumberType,
  50355. width: requiredNumberType
  50356. });
  50357. //#endregion
  50358. //#region node_modules/element-plus/es/components/table-v2/src/grid.mjs
  50359. var tableV2GridProps = buildProps({
  50360. columns,
  50361. data: dataType,
  50362. fixedData: fixedDataType,
  50363. estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
  50364. /**
  50365. * Size related attributes
  50366. */
  50367. width: requiredNumber,
  50368. height: requiredNumber,
  50369. headerWidth: requiredNumber,
  50370. headerHeight: tableV2HeaderProps.headerHeight,
  50371. bodyWidth: requiredNumber,
  50372. rowHeight: requiredNumber,
  50373. /**
  50374. * Special attributes
  50375. */
  50376. cache: virtualizedListProps.cache,
  50377. useIsScrolling: Boolean,
  50378. scrollbarAlwaysOn: virtualizedGridProps.scrollbarAlwaysOn,
  50379. scrollbarStartGap: virtualizedGridProps.scrollbarStartGap,
  50380. scrollbarEndGap: virtualizedGridProps.scrollbarEndGap,
  50381. /**
  50382. * CSS attributes
  50383. */
  50384. class: classType,
  50385. style: styleType,
  50386. containerStyle: styleType,
  50387. getRowHeight: {
  50388. type: definePropType(Function),
  50389. required: true
  50390. },
  50391. rowKey: tableV2RowProps.rowKey,
  50392. /**
  50393. * Event handlers
  50394. */
  50395. onRowsRendered: { type: definePropType(Function) },
  50396. onScroll: { type: definePropType(Function) }
  50397. });
  50398. //#endregion
  50399. //#region node_modules/element-plus/es/components/table-v2/src/table.mjs
  50400. var tableV2Props = buildProps({
  50401. cache: tableV2GridProps.cache,
  50402. estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
  50403. rowKey,
  50404. headerClass: { type: definePropType([String, Function]) },
  50405. headerProps: { type: definePropType([Object, Function]) },
  50406. headerCellProps: { type: definePropType([Object, Function]) },
  50407. headerHeight: tableV2HeaderProps.headerHeight,
  50408. /**
  50409. * Footer attributes
  50410. */
  50411. footerHeight: {
  50412. type: Number,
  50413. default: 0
  50414. },
  50415. /**
  50416. * Row attributes
  50417. */
  50418. rowClass: { type: definePropType([String, Function]) },
  50419. rowProps: { type: definePropType([Object, Function]) },
  50420. rowHeight: {
  50421. type: Number,
  50422. default: 50
  50423. },
  50424. /**
  50425. * Cell attributes
  50426. */
  50427. cellProps: { type: definePropType([Object, Function]) },
  50428. /**
  50429. * Data models
  50430. */
  50431. columns,
  50432. data: dataType,
  50433. dataGetter: { type: definePropType(Function) },
  50434. fixedData: fixedDataType,
  50435. /**
  50436. * Expanded keys
  50437. */
  50438. expandColumnKey: tableV2RowProps.expandColumnKey,
  50439. expandedRowKeys: expandKeys,
  50440. defaultExpandedRowKeys: expandKeys,
  50441. /**
  50442. * Attributes
  50443. */
  50444. class: classType,
  50445. fixed: Boolean,
  50446. style: { type: definePropType(Object) },
  50447. width: requiredNumber,
  50448. height: requiredNumber,
  50449. maxHeight: Number,
  50450. useIsScrolling: Boolean,
  50451. indentSize: {
  50452. type: Number,
  50453. default: 12
  50454. },
  50455. iconSize: {
  50456. type: Number,
  50457. default: 12
  50458. },
  50459. hScrollbarSize: virtualizedGridProps.hScrollbarSize,
  50460. vScrollbarSize: virtualizedGridProps.vScrollbarSize,
  50461. scrollbarAlwaysOn: virtualizedScrollbarProps.alwaysOn,
  50462. /**
  50463. * Sorting
  50464. */
  50465. sortBy: {
  50466. type: definePropType(Object),
  50467. default: () => ({})
  50468. },
  50469. sortState: {
  50470. type: definePropType(Object),
  50471. default: void 0
  50472. },
  50473. /**
  50474. * Handlers
  50475. */
  50476. onColumnSort: { type: definePropType(Function) },
  50477. onExpandedRowsChange: { type: definePropType(Function) },
  50478. onEndReached: { type: definePropType(Function) },
  50479. onRowExpand: tableV2RowProps.onRowExpand,
  50480. onScroll: tableV2GridProps.onScroll,
  50481. onRowsRendered: tableV2GridProps.onRowsRendered,
  50482. rowEventHandlers: tableV2RowProps.rowEventHandlers
  50483. });
  50484. //#endregion
  50485. //#region node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs
  50486. var calcColumnStyle = (column, fixedColumn, fixed) => {
  50487. const flex = {
  50488. flexGrow: 0,
  50489. flexShrink: 0,
  50490. ...fixed ? {} : {
  50491. flexGrow: column.flexGrow ?? 0,
  50492. flexShrink: column.flexShrink ?? 1
  50493. }
  50494. };
  50495. const style = {
  50496. ...column.style ?? {},
  50497. ...flex,
  50498. flexBasis: "auto",
  50499. width: column.width
  50500. };
  50501. if (!fixedColumn) {
  50502. if (column.maxWidth) style.maxWidth = column.maxWidth;
  50503. if (column.minWidth) style.minWidth = column.minWidth;
  50504. }
  50505. return style;
  50506. };
  50507. //#endregion
  50508. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs
  50509. function useColumns(props, columns, fixed) {
  50510. const _columns = computed(() => unref(columns).map((column, index) => ({
  50511. ...column,
  50512. key: column.key ?? column.dataKey ?? index
  50513. })));
  50514. const visibleColumns = computed(() => {
  50515. return unref(_columns).filter((column) => !column.hidden);
  50516. });
  50517. const fixedColumnsOnLeft = computed(() => unref(visibleColumns).filter((column) => column.fixed === "left" || column.fixed === true));
  50518. const fixedColumnsOnRight = computed(() => unref(visibleColumns).filter((column) => column.fixed === "right"));
  50519. const normalColumns = computed(() => unref(visibleColumns).filter((column) => !column.fixed));
  50520. const mainColumns = computed(() => {
  50521. const ret = [];
  50522. unref(fixedColumnsOnLeft).forEach((column) => {
  50523. ret.push({
  50524. ...column,
  50525. placeholderSign
  50526. });
  50527. });
  50528. unref(normalColumns).forEach((column) => {
  50529. ret.push(column);
  50530. });
  50531. unref(fixedColumnsOnRight).forEach((column) => {
  50532. ret.push({
  50533. ...column,
  50534. placeholderSign
  50535. });
  50536. });
  50537. return ret;
  50538. });
  50539. const hasFixedColumns = computed(() => {
  50540. return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length;
  50541. });
  50542. const columnsStyles = computed(() => {
  50543. return unref(_columns).reduce((style, column) => {
  50544. style[column.key] = calcColumnStyle(column, unref(fixed), props.fixed);
  50545. return style;
  50546. }, {});
  50547. });
  50548. const columnsTotalWidth = computed(() => {
  50549. return unref(visibleColumns).reduce((width, column) => width + column.width, 0);
  50550. });
  50551. const getColumn = (key) => {
  50552. return unref(_columns).find((column) => column.key === key);
  50553. };
  50554. const getColumnStyle = (key) => {
  50555. return unref(columnsStyles)[key];
  50556. };
  50557. const updateColumnWidth = (column, width) => {
  50558. column.width = width;
  50559. };
  50560. function onColumnSorted(e) {
  50561. const { key } = e.currentTarget.dataset;
  50562. if (!key) return;
  50563. const { sortState, sortBy } = props;
  50564. let order = "asc";
  50565. if (isObject$2(sortState)) order = oppositeOrderMap[sortState[key]];
  50566. else order = oppositeOrderMap[sortBy.order];
  50567. props.onColumnSort?.({
  50568. column: getColumn(key),
  50569. key,
  50570. order
  50571. });
  50572. }
  50573. return {
  50574. columns: _columns,
  50575. columnsStyles,
  50576. columnsTotalWidth,
  50577. fixedColumnsOnLeft,
  50578. fixedColumnsOnRight,
  50579. hasFixedColumns,
  50580. mainColumns,
  50581. normalColumns,
  50582. visibleColumns,
  50583. getColumn,
  50584. getColumnStyle,
  50585. updateColumnWidth,
  50586. onColumnSorted
  50587. };
  50588. }
  50589. //#endregion
  50590. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs
  50591. var useScrollbar = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => {
  50592. const scrollPos = ref({
  50593. scrollLeft: 0,
  50594. scrollTop: 0
  50595. });
  50596. function doScroll(params) {
  50597. const { scrollTop } = params;
  50598. mainTableRef.value?.scrollTo(params);
  50599. leftTableRef.value?.scrollToTop(scrollTop);
  50600. rightTableRef.value?.scrollToTop(scrollTop);
  50601. }
  50602. function scrollTo(params) {
  50603. scrollPos.value = params;
  50604. doScroll(params);
  50605. }
  50606. function scrollToTop(scrollTop) {
  50607. scrollPos.value.scrollTop = scrollTop;
  50608. doScroll(unref(scrollPos));
  50609. }
  50610. function scrollToLeft(scrollLeft) {
  50611. scrollPos.value.scrollLeft = scrollLeft;
  50612. mainTableRef.value?.scrollTo?.(unref(scrollPos));
  50613. }
  50614. function onScroll(params) {
  50615. scrollTo(params);
  50616. props.onScroll?.(params);
  50617. }
  50618. function onVerticalScroll({ scrollTop }) {
  50619. const { scrollTop: currentScrollTop } = unref(scrollPos);
  50620. if (scrollTop !== currentScrollTop) scrollToTop(scrollTop);
  50621. }
  50622. function scrollToRow(row, strategy = "auto") {
  50623. mainTableRef.value?.scrollToRow(row, strategy);
  50624. }
  50625. watch(() => unref(scrollPos).scrollTop, (cur, prev) => {
  50626. if (cur > prev) onMaybeEndReached();
  50627. });
  50628. return {
  50629. scrollPos,
  50630. scrollTo,
  50631. scrollToLeft,
  50632. scrollToTop,
  50633. scrollToRow,
  50634. onScroll,
  50635. onVerticalScroll
  50636. };
  50637. };
  50638. //#endregion
  50639. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs
  50640. var useRow = (props, { mainTableRef, leftTableRef, rightTableRef, tableInstance, ns, isScrolling }) => {
  50641. const vm = getCurrentInstance();
  50642. const { emit } = vm;
  50643. const isResetting = shallowRef(false);
  50644. const expandedRowKeys = ref(props.defaultExpandedRowKeys || []);
  50645. const lastRenderedRowIndex = ref(-1);
  50646. const resetIndex = shallowRef(null);
  50647. const rowHeights = ref({});
  50648. const pendingRowHeights = ref({});
  50649. const leftTableHeights = shallowRef({});
  50650. const mainTableHeights = shallowRef({});
  50651. const rightTableHeights = shallowRef({});
  50652. const isDynamic = computed(() => isNumber(props.estimatedRowHeight));
  50653. function onRowsRendered(params) {
  50654. props.onRowsRendered?.(params);
  50655. if (params.rowCacheEnd > unref(lastRenderedRowIndex)) lastRenderedRowIndex.value = params.rowCacheEnd;
  50656. }
  50657. function onRowHovered({ hovered, rowKey }) {
  50658. if (isScrolling.value) return;
  50659. tableInstance.vnode.el.querySelectorAll(`[rowkey="${String(rowKey)}"]`).forEach((row) => {
  50660. if (hovered) row.classList.add(ns.is("hovered"));
  50661. else row.classList.remove(ns.is("hovered"));
  50662. });
  50663. }
  50664. function onRowExpanded({ expanded, rowData, rowIndex, rowKey }) {
  50665. const _expandedRowKeys = [...unref(expandedRowKeys)];
  50666. const currentKeyIndex = _expandedRowKeys.indexOf(rowKey);
  50667. if (expanded) {
  50668. if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey);
  50669. } else if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1);
  50670. expandedRowKeys.value = _expandedRowKeys;
  50671. emit("update:expandedRowKeys", _expandedRowKeys);
  50672. props.onRowExpand?.({
  50673. expanded,
  50674. rowData,
  50675. rowIndex,
  50676. rowKey
  50677. });
  50678. props.onExpandedRowsChange?.(_expandedRowKeys);
  50679. if (tableInstance.vnode.el.querySelector(`.${ns.is("hovered")}[rowkey="${String(rowKey)}"]`)) nextTick(() => onRowHovered({
  50680. hovered: true,
  50681. rowKey
  50682. }));
  50683. }
  50684. const flushingRowHeights = debounce(() => {
  50685. isResetting.value = true;
  50686. rowHeights.value = {
  50687. ...unref(rowHeights),
  50688. ...unref(pendingRowHeights)
  50689. };
  50690. resetAfterIndex(unref(resetIndex), false);
  50691. pendingRowHeights.value = {};
  50692. resetIndex.value = null;
  50693. mainTableRef.value?.forceUpdate();
  50694. leftTableRef.value?.forceUpdate();
  50695. rightTableRef.value?.forceUpdate();
  50696. vm.proxy?.$forceUpdate();
  50697. isResetting.value = false;
  50698. }, 0);
  50699. function resetAfterIndex(index, forceUpdate = false) {
  50700. if (!unref(isDynamic)) return;
  50701. [
  50702. mainTableRef,
  50703. leftTableRef,
  50704. rightTableRef
  50705. ].forEach((tableRef) => {
  50706. const table = unref(tableRef);
  50707. if (table) table.resetAfterRowIndex(index, forceUpdate);
  50708. });
  50709. }
  50710. function resetHeights(rowKey, height, rowIdx) {
  50711. const resetIdx = unref(resetIndex);
  50712. if (resetIdx === null) resetIndex.value = rowIdx;
  50713. else if (resetIdx > rowIdx) resetIndex.value = rowIdx;
  50714. pendingRowHeights.value[rowKey] = height;
  50715. }
  50716. function onRowHeightChange({ rowKey, height, rowIndex }, fixedDir) {
  50717. if (!fixedDir) mainTableHeights.value[rowKey] = height;
  50718. else if (fixedDir === "right") rightTableHeights.value[rowKey] = height;
  50719. else leftTableHeights.value[rowKey] = height;
  50720. const maximumHeight = Math.max(...[
  50721. leftTableHeights,
  50722. rightTableHeights,
  50723. mainTableHeights
  50724. ].map((records) => records.value[rowKey] || 0));
  50725. if (unref(rowHeights)[rowKey] !== maximumHeight) {
  50726. resetHeights(rowKey, maximumHeight, rowIndex);
  50727. flushingRowHeights();
  50728. }
  50729. }
  50730. return {
  50731. expandedRowKeys,
  50732. lastRenderedRowIndex,
  50733. isDynamic,
  50734. isResetting,
  50735. rowHeights,
  50736. resetAfterIndex,
  50737. onRowExpanded,
  50738. onRowHovered,
  50739. onRowsRendered,
  50740. onRowHeightChange
  50741. };
  50742. };
  50743. //#endregion
  50744. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs
  50745. var useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => {
  50746. const depthMap = ref({});
  50747. const flattenedData = computed(() => {
  50748. const depths = {};
  50749. const { data, rowKey } = props;
  50750. const _expandedRowKeys = unref(expandedRowKeys);
  50751. if (!_expandedRowKeys || !_expandedRowKeys.length) return data;
  50752. const array = [];
  50753. const keysSet = /* @__PURE__ */ new Set();
  50754. _expandedRowKeys.forEach((x) => keysSet.add(x));
  50755. let copy = data.slice();
  50756. copy.forEach((x) => depths[x[rowKey]] = 0);
  50757. while (copy.length > 0) {
  50758. const item = copy.shift();
  50759. array.push(item);
  50760. if (keysSet.has(item[rowKey]) && isArray$1(item.children) && item.children.length > 0) {
  50761. copy = [...item.children, ...copy];
  50762. item.children.forEach((child) => depths[child[rowKey]] = depths[item[rowKey]] + 1);
  50763. }
  50764. }
  50765. depthMap.value = depths;
  50766. return array;
  50767. });
  50768. const data = computed(() => {
  50769. const { data, expandColumnKey } = props;
  50770. return expandColumnKey ? unref(flattenedData) : data;
  50771. });
  50772. watch(data, (val, prev) => {
  50773. if (val !== prev) {
  50774. lastRenderedRowIndex.value = -1;
  50775. resetAfterIndex(0, true);
  50776. }
  50777. });
  50778. return {
  50779. data,
  50780. depthMap
  50781. };
  50782. };
  50783. //#endregion
  50784. //#region node_modules/element-plus/es/components/table-v2/src/utils.mjs
  50785. var sumReducer = (sum, num) => sum + num;
  50786. var sum = (listLike) => {
  50787. return isArray$1(listLike) ? listLike.reduce(sumReducer, 0) : listLike;
  50788. };
  50789. var tryCall = (fLike, params, defaultRet = {}) => {
  50790. return isFunction$1(fLike) ? fLike(params) : fLike ?? defaultRet;
  50791. };
  50792. var enforceUnit = (style) => {
  50793. [
  50794. "width",
  50795. "maxWidth",
  50796. "minWidth",
  50797. "height"
  50798. ].forEach((key) => {
  50799. style[key] = addUnit(style[key]);
  50800. });
  50801. return style;
  50802. };
  50803. var componentToSlot = (ComponentLike) => isVNode(ComponentLike) ? (props) => h$1(ComponentLike, props) : ComponentLike;
  50804. //#endregion
  50805. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs
  50806. var useStyles = (props, { columnsTotalWidth, rowsHeight, fixedColumnsOnLeft, fixedColumnsOnRight }) => {
  50807. const bodyWidth = computed(() => {
  50808. const { fixed, width, vScrollbarSize } = props;
  50809. const ret = width - vScrollbarSize;
  50810. return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret;
  50811. });
  50812. const mainTableHeight = computed(() => {
  50813. const { height = 0, maxHeight = 0, footerHeight, hScrollbarSize } = props;
  50814. if (maxHeight > 0) {
  50815. const _fixedRowsHeight = unref(fixedRowsHeight);
  50816. const _rowsHeight = unref(rowsHeight);
  50817. const total = unref(headerHeight) + _fixedRowsHeight + _rowsHeight + hScrollbarSize;
  50818. return Math.min(total, maxHeight - footerHeight);
  50819. }
  50820. return height - footerHeight;
  50821. });
  50822. const fixedTableHeight = computed(() => {
  50823. const { maxHeight } = props;
  50824. const tableHeight = unref(mainTableHeight);
  50825. if (isNumber(maxHeight) && maxHeight > 0) return tableHeight;
  50826. const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight);
  50827. return Math.min(tableHeight, totalHeight);
  50828. });
  50829. const mapColumn = (column) => column.width;
  50830. const leftTableWidth = computed(() => sum(unref(fixedColumnsOnLeft).map(mapColumn)));
  50831. const rightTableWidth = computed(() => sum(unref(fixedColumnsOnRight).map(mapColumn)));
  50832. const headerHeight = computed(() => sum(props.headerHeight));
  50833. const fixedRowsHeight = computed(() => {
  50834. return (props.fixedData?.length || 0) * props.rowHeight;
  50835. });
  50836. const windowHeight = computed(() => {
  50837. return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight);
  50838. });
  50839. const rootStyle = computed(() => {
  50840. const { style = {}, height, width } = props;
  50841. return enforceUnit({
  50842. ...style,
  50843. height,
  50844. width
  50845. });
  50846. });
  50847. return {
  50848. bodyWidth,
  50849. fixedTableHeight,
  50850. mainTableHeight,
  50851. leftTableWidth,
  50852. rightTableWidth,
  50853. windowHeight,
  50854. footerHeight: computed(() => enforceUnit({ height: props.footerHeight })),
  50855. emptyStyle: computed(() => ({
  50856. top: addUnit(unref(headerHeight)),
  50857. bottom: addUnit(props.footerHeight),
  50858. width: addUnit(props.width)
  50859. })),
  50860. rootStyle,
  50861. headerHeight
  50862. };
  50863. };
  50864. //#endregion
  50865. //#region node_modules/element-plus/es/components/table-v2/src/use-table.mjs
  50866. function useTable(props) {
  50867. const mainTableRef = ref();
  50868. const leftTableRef = ref();
  50869. const rightTableRef = ref();
  50870. const { columns, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, onColumnSorted } = useColumns(props, toRef(props, "columns"), toRef(props, "fixed"));
  50871. const { scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll, scrollPos } = useScrollbar(props, {
  50872. mainTableRef,
  50873. leftTableRef,
  50874. rightTableRef,
  50875. onMaybeEndReached
  50876. });
  50877. const ns = useNamespace("table-v2");
  50878. const instance = getCurrentInstance();
  50879. const isScrolling = shallowRef(false);
  50880. const { expandedRowKeys, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHeightChange, onRowHovered, onRowsRendered } = useRow(props, {
  50881. mainTableRef,
  50882. leftTableRef,
  50883. rightTableRef,
  50884. tableInstance: instance,
  50885. ns,
  50886. isScrolling
  50887. });
  50888. const { data, depthMap } = useData(props, {
  50889. expandedRowKeys,
  50890. lastRenderedRowIndex,
  50891. resetAfterIndex
  50892. });
  50893. const rowsHeight = computed(() => {
  50894. const { estimatedRowHeight, rowHeight } = props;
  50895. const _data = unref(data);
  50896. if (isNumber(estimatedRowHeight)) return Object.values(unref(rowHeights)).reduce((acc, curr) => acc + curr, 0);
  50897. return _data.length * rowHeight;
  50898. });
  50899. const { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight } = useStyles(props, {
  50900. columnsTotalWidth,
  50901. fixedColumnsOnLeft,
  50902. fixedColumnsOnRight,
  50903. rowsHeight
  50904. });
  50905. const containerRef = ref();
  50906. const showEmpty = computed(() => {
  50907. const noData = unref(data).length === 0;
  50908. return isArray$1(props.fixedData) ? props.fixedData.length === 0 && noData : noData;
  50909. });
  50910. function getRowHeight(rowIndex) {
  50911. const { estimatedRowHeight, rowHeight, rowKey } = props;
  50912. if (!estimatedRowHeight) return rowHeight;
  50913. return unref(rowHeights)[unref(data)[rowIndex][rowKey]] || estimatedRowHeight;
  50914. }
  50915. const isEndReached = ref(false);
  50916. function onMaybeEndReached() {
  50917. const { onEndReached } = props;
  50918. if (!onEndReached) return;
  50919. const { scrollTop } = unref(scrollPos);
  50920. const _totalHeight = unref(rowsHeight);
  50921. const remainDistance = _totalHeight - (scrollTop + unref(windowHeight)) + props.hScrollbarSize;
  50922. if (!isEndReached.value && unref(lastRenderedRowIndex) >= 0 && _totalHeight <= scrollTop + unref(mainTableHeight) - unref(headerHeight)) {
  50923. isEndReached.value = true;
  50924. onEndReached(remainDistance);
  50925. } else isEndReached.value = false;
  50926. }
  50927. watch(() => unref(rowsHeight), () => isEndReached.value = false);
  50928. watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, { deep: true });
  50929. return {
  50930. columns,
  50931. containerRef,
  50932. mainTableRef,
  50933. leftTableRef,
  50934. rightTableRef,
  50935. isDynamic,
  50936. isResetting,
  50937. isScrolling,
  50938. hasFixedColumns,
  50939. columnsStyles,
  50940. columnsTotalWidth,
  50941. data,
  50942. expandedRowKeys,
  50943. depthMap,
  50944. fixedColumnsOnLeft,
  50945. fixedColumnsOnRight,
  50946. mainColumns,
  50947. bodyWidth,
  50948. emptyStyle,
  50949. rootStyle,
  50950. footerHeight,
  50951. mainTableHeight,
  50952. fixedTableHeight,
  50953. leftTableWidth,
  50954. rightTableWidth,
  50955. showEmpty,
  50956. getRowHeight,
  50957. onColumnSorted,
  50958. onRowHovered,
  50959. onRowExpanded,
  50960. onRowsRendered,
  50961. onRowHeightChange,
  50962. scrollTo,
  50963. scrollToLeft,
  50964. scrollToTop,
  50965. scrollToRow,
  50966. onScroll,
  50967. onVerticalScroll
  50968. };
  50969. }
  50970. //#endregion
  50971. //#region node_modules/element-plus/es/components/table-v2/src/tokens.mjs
  50972. var TableV2InjectionKey = Symbol("tableV2");
  50973. var TABLE_V2_GRID_INJECTION_KEY = "tableV2GridScrollLeft";
  50974. //#endregion
  50975. //#region node_modules/element-plus/es/components/table-v2/src/components/header.mjs
  50976. var TableV2Header = /* @__PURE__ */ defineComponent({
  50977. name: "ElTableV2Header",
  50978. props: tableV2HeaderProps,
  50979. setup(props, { slots, expose }) {
  50980. const ns = useNamespace("table-v2");
  50981. const scrollLeftInfo = inject(TABLE_V2_GRID_INJECTION_KEY);
  50982. const headerRef = ref();
  50983. const headerStyle = computed(() => enforceUnit({
  50984. width: props.width,
  50985. height: props.height
  50986. }));
  50987. const rowStyle = computed(() => enforceUnit({
  50988. width: props.rowWidth,
  50989. height: props.height
  50990. }));
  50991. const headerHeights = computed(() => castArray$1(unref(props.headerHeight)));
  50992. const scrollToLeft = (left) => {
  50993. const headerEl = unref(headerRef);
  50994. nextTick(() => {
  50995. headerEl?.scroll && headerEl.scroll({ left });
  50996. });
  50997. };
  50998. const renderFixedRows = () => {
  50999. const fixedRowClassName = ns.e("fixed-header-row");
  51000. const { columns, fixedHeaderData, rowHeight } = props;
  51001. return fixedHeaderData?.map((fixedRowData, fixedRowIndex) => {
  51002. const style = enforceUnit({
  51003. height: rowHeight,
  51004. width: "100%"
  51005. });
  51006. return slots.fixed?.({
  51007. class: fixedRowClassName,
  51008. columns,
  51009. rowData: fixedRowData,
  51010. rowIndex: -(fixedRowIndex + 1),
  51011. style
  51012. });
  51013. });
  51014. };
  51015. const renderDynamicRows = () => {
  51016. const dynamicRowClassName = ns.e("dynamic-header-row");
  51017. const { columns } = props;
  51018. return unref(headerHeights).map((rowHeight, rowIndex) => {
  51019. const style = enforceUnit({
  51020. width: "100%",
  51021. height: rowHeight
  51022. });
  51023. return slots.dynamic?.({
  51024. class: dynamicRowClassName,
  51025. columns,
  51026. headerIndex: rowIndex,
  51027. style
  51028. });
  51029. });
  51030. };
  51031. onUpdated(() => {
  51032. if (scrollLeftInfo?.value) scrollToLeft(scrollLeftInfo.value);
  51033. });
  51034. expose({
  51035. /**
  51036. * @description scroll to position based on the provided value
  51037. */
  51038. scrollToLeft });
  51039. return () => {
  51040. if (props.height <= 0) return;
  51041. return createVNode("div", {
  51042. "ref": headerRef,
  51043. "class": props.class,
  51044. "style": unref(headerStyle),
  51045. "role": "rowgroup"
  51046. }, [createVNode("div", {
  51047. "style": unref(rowStyle),
  51048. "class": ns.e("header")
  51049. }, [renderDynamicRows(), renderFixedRows()])]);
  51050. };
  51051. }
  51052. });
  51053. //#endregion
  51054. //#region node_modules/element-plus/es/components/table-v2/src/table-grid.mjs
  51055. var COMPONENT_NAME$5 = "ElTableV2Grid";
  51056. var useTableGrid = (props) => {
  51057. const headerRef = ref();
  51058. const bodyRef = ref();
  51059. const scrollLeft = ref(0);
  51060. const totalHeight = computed(() => {
  51061. const { data, rowHeight, estimatedRowHeight } = props;
  51062. if (estimatedRowHeight) return;
  51063. return data.length * rowHeight;
  51064. });
  51065. const fixedRowHeight = computed(() => {
  51066. const { fixedData, rowHeight } = props;
  51067. return (fixedData?.length || 0) * rowHeight;
  51068. });
  51069. const headerHeight = computed(() => sum(props.headerHeight));
  51070. const gridHeight = computed(() => {
  51071. const { height } = props;
  51072. return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight));
  51073. });
  51074. const hasHeader = computed(() => {
  51075. return unref(headerHeight) + unref(fixedRowHeight) > 0;
  51076. });
  51077. const itemKey = ({ data, rowIndex }) => data[rowIndex][props.rowKey];
  51078. function onItemRendered({ rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }) {
  51079. props.onRowsRendered?.({
  51080. rowCacheStart,
  51081. rowCacheEnd,
  51082. rowVisibleStart,
  51083. rowVisibleEnd
  51084. });
  51085. }
  51086. function resetAfterRowIndex(index, forceUpdate) {
  51087. bodyRef.value?.resetAfterRowIndex(index, forceUpdate);
  51088. }
  51089. function scrollTo(leftOrOptions, top) {
  51090. const header$ = unref(headerRef);
  51091. const body$ = unref(bodyRef);
  51092. if (isObject$2(leftOrOptions)) {
  51093. header$?.scrollToLeft(leftOrOptions.scrollLeft);
  51094. scrollLeft.value = leftOrOptions.scrollLeft;
  51095. body$?.scrollTo(leftOrOptions);
  51096. } else {
  51097. header$?.scrollToLeft(leftOrOptions);
  51098. scrollLeft.value = leftOrOptions;
  51099. body$?.scrollTo({
  51100. scrollLeft: leftOrOptions,
  51101. scrollTop: top
  51102. });
  51103. }
  51104. }
  51105. function scrollToTop(scrollTop) {
  51106. unref(bodyRef)?.scrollTo({ scrollTop });
  51107. }
  51108. function scrollToRow(row, strategy) {
  51109. const body = unref(bodyRef);
  51110. if (!body) return;
  51111. const prevScrollLeft = scrollLeft.value;
  51112. body.scrollToItem(row, 0, strategy);
  51113. if (prevScrollLeft) scrollTo({ scrollLeft: prevScrollLeft });
  51114. }
  51115. function forceUpdate() {
  51116. unref(bodyRef)?.$forceUpdate();
  51117. unref(headerRef)?.$forceUpdate();
  51118. }
  51119. watch(() => props.bodyWidth, () => {
  51120. if (isNumber(props.estimatedRowHeight)) bodyRef.value?.resetAfter({ columnIndex: 0 }, false);
  51121. });
  51122. return {
  51123. bodyRef,
  51124. forceUpdate,
  51125. fixedRowHeight,
  51126. gridHeight,
  51127. hasHeader,
  51128. headerHeight,
  51129. headerRef,
  51130. totalHeight,
  51131. itemKey,
  51132. onItemRendered,
  51133. resetAfterRowIndex,
  51134. scrollTo,
  51135. scrollToTop,
  51136. scrollToRow,
  51137. scrollLeft
  51138. };
  51139. };
  51140. var TableGrid = /* @__PURE__ */ defineComponent({
  51141. name: COMPONENT_NAME$5,
  51142. props: tableV2GridProps,
  51143. setup(props, { slots, expose }) {
  51144. const { ns } = inject(TableV2InjectionKey);
  51145. const { bodyRef, fixedRowHeight, gridHeight, hasHeader, headerRef, headerHeight, totalHeight, forceUpdate, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow, scrollLeft } = useTableGrid(props);
  51146. provide(TABLE_V2_GRID_INJECTION_KEY, scrollLeft);
  51147. onActivated(async () => {
  51148. await nextTick();
  51149. const scrollTop = bodyRef.value?.states.scrollTop;
  51150. scrollTop && scrollToTop(Math.round(scrollTop) + 1);
  51151. });
  51152. expose({
  51153. forceUpdate,
  51154. /**
  51155. * @description fetch total height
  51156. */
  51157. totalHeight,
  51158. /**
  51159. * @description scroll to a position
  51160. */
  51161. scrollTo,
  51162. /**
  51163. * @description scroll vertically to position y
  51164. */
  51165. scrollToTop,
  51166. /**
  51167. * @description scroll to a given row
  51168. * @params row {Number} which row to scroll to
  51169. * @params strategy {ScrollStrategy} use what strategy to scroll to
  51170. */
  51171. scrollToRow,
  51172. /**
  51173. * @description reset rendered state after row index
  51174. */
  51175. resetAfterRowIndex
  51176. });
  51177. const getColumnWidth = () => props.bodyWidth;
  51178. return () => {
  51179. const { cache, columns, data, fixedData, useIsScrolling, scrollbarAlwaysOn, scrollbarEndGap, scrollbarStartGap, style, rowHeight, bodyWidth, estimatedRowHeight, headerWidth, height, width, getRowHeight, onScroll } = props;
  51180. const isDynamicRowEnabled = isNumber(estimatedRowHeight);
  51181. const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid;
  51182. const _headerHeight = unref(headerHeight);
  51183. return createVNode("div", {
  51184. "role": "table",
  51185. "class": [ns.e("table"), props.class],
  51186. "style": style
  51187. }, [createVNode(Grid, {
  51188. "ref": bodyRef,
  51189. "data": data,
  51190. "useIsScrolling": useIsScrolling,
  51191. "itemKey": itemKey,
  51192. "columnCache": 0,
  51193. "columnWidth": isDynamicRowEnabled ? getColumnWidth : bodyWidth,
  51194. "totalColumn": 1,
  51195. "totalRow": data.length,
  51196. "rowCache": cache,
  51197. "rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight,
  51198. "width": width,
  51199. "height": unref(gridHeight),
  51200. "class": ns.e("body"),
  51201. "role": "rowgroup",
  51202. "scrollbarStartGap": scrollbarStartGap,
  51203. "scrollbarEndGap": scrollbarEndGap,
  51204. "scrollbarAlwaysOn": scrollbarAlwaysOn,
  51205. "onScroll": onScroll,
  51206. "onItemRendered": onItemRendered,
  51207. "perfMode": false
  51208. }, { default: (params) => {
  51209. const rowData = data[params.rowIndex];
  51210. return slots.row?.({
  51211. ...params,
  51212. columns,
  51213. rowData
  51214. });
  51215. } }), unref(hasHeader) && createVNode(TableV2Header, {
  51216. "ref": headerRef,
  51217. "class": ns.e("header-wrapper"),
  51218. "columns": columns,
  51219. "headerData": data,
  51220. "headerHeight": props.headerHeight,
  51221. "fixedHeaderData": fixedData,
  51222. "rowWidth": headerWidth,
  51223. "rowHeight": rowHeight,
  51224. "width": width,
  51225. "height": Math.min(_headerHeight + unref(fixedRowHeight), height)
  51226. }, {
  51227. dynamic: slots.header,
  51228. fixed: slots.row
  51229. })]);
  51230. };
  51231. }
  51232. });
  51233. //#endregion
  51234. //#region node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs
  51235. function _isSlot$5(s) {
  51236. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  51237. }
  51238. var MainTable = (props, { slots }) => {
  51239. const { mainTableRef, ...rest } = props;
  51240. return createVNode(TableGrid, mergeProps({ "ref": mainTableRef }, rest), _isSlot$5(slots) ? slots : { default: () => [slots] });
  51241. };
  51242. //#endregion
  51243. //#region node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs
  51244. function _isSlot$4(s) {
  51245. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  51246. }
  51247. var LeftTable = (props, { slots }) => {
  51248. if (!props.columns.length) return;
  51249. const { leftTableRef, ...rest } = props;
  51250. return createVNode(TableGrid, mergeProps({ "ref": leftTableRef }, rest), _isSlot$4(slots) ? slots : { default: () => [slots] });
  51251. };
  51252. //#endregion
  51253. //#region node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs
  51254. function _isSlot$3(s) {
  51255. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  51256. }
  51257. var RightTable = (props, { slots }) => {
  51258. if (!props.columns.length) return;
  51259. const { rightTableRef, ...rest } = props;
  51260. return createVNode(TableGrid, mergeProps({ "ref": rightTableRef }, rest), _isSlot$3(slots) ? slots : { default: () => [slots] });
  51261. };
  51262. //#endregion
  51263. //#region node_modules/element-plus/es/components/table-v2/src/components/row.mjs
  51264. var useTableRow = (props) => {
  51265. const { isScrolling } = inject(TableV2InjectionKey);
  51266. const measured = ref(false);
  51267. const rowRef = ref();
  51268. const measurable = computed(() => {
  51269. return isNumber(props.estimatedRowHeight) && props.rowIndex >= 0;
  51270. });
  51271. const doMeasure = (isInit = false) => {
  51272. const $rowRef = unref(rowRef);
  51273. if (!$rowRef) return;
  51274. const { columns, onRowHeightChange, rowKey, rowIndex, style } = props;
  51275. const { height } = $rowRef.getBoundingClientRect();
  51276. measured.value = true;
  51277. nextTick(() => {
  51278. if (isInit || height !== Number.parseInt(style.height)) {
  51279. const firstColumn = columns[0];
  51280. const isPlaceholder = firstColumn?.placeholderSign === placeholderSign;
  51281. onRowHeightChange?.({
  51282. rowKey,
  51283. height,
  51284. rowIndex
  51285. }, firstColumn && !isPlaceholder && firstColumn.fixed);
  51286. }
  51287. });
  51288. };
  51289. const eventHandlers = computed(() => {
  51290. const { rowData, rowIndex, rowKey, onRowHover } = props;
  51291. const handlers = props.rowEventHandlers || {};
  51292. const eventHandlers = {};
  51293. Object.entries(handlers).forEach(([eventName, handler]) => {
  51294. if (isFunction$1(handler)) eventHandlers[eventName] = (event) => {
  51295. handler({
  51296. event,
  51297. rowData,
  51298. rowIndex,
  51299. rowKey
  51300. });
  51301. };
  51302. });
  51303. if (onRowHover) [{
  51304. name: "onMouseleave",
  51305. hovered: false
  51306. }, {
  51307. name: "onMouseenter",
  51308. hovered: true
  51309. }].forEach(({ name, hovered }) => {
  51310. const existedHandler = eventHandlers[name];
  51311. eventHandlers[name] = (event) => {
  51312. onRowHover({
  51313. event,
  51314. hovered,
  51315. rowData,
  51316. rowIndex,
  51317. rowKey
  51318. });
  51319. existedHandler?.(event);
  51320. };
  51321. });
  51322. return eventHandlers;
  51323. });
  51324. const onExpand = (expanded) => {
  51325. const { onRowExpand, rowData, rowIndex, rowKey } = props;
  51326. onRowExpand?.({
  51327. expanded,
  51328. rowData,
  51329. rowIndex,
  51330. rowKey
  51331. });
  51332. };
  51333. onMounted(() => {
  51334. if (unref(measurable)) doMeasure(true);
  51335. });
  51336. return {
  51337. isScrolling,
  51338. measurable,
  51339. measured,
  51340. rowRef,
  51341. eventHandlers,
  51342. onExpand
  51343. };
  51344. };
  51345. var TableV2Row = /* @__PURE__ */ defineComponent({
  51346. name: "ElTableV2TableRow",
  51347. props: tableV2RowProps,
  51348. setup(props, { expose, slots, attrs }) {
  51349. const { eventHandlers, isScrolling, measurable, measured, rowRef, onExpand } = useTableRow(props);
  51350. expose({
  51351. /**
  51352. * @description manually dispatching expand action on row.
  51353. */
  51354. onExpand });
  51355. return () => {
  51356. const { columns, columnsStyles, expandColumnKey, depth, rowData, rowIndex, style } = props;
  51357. let ColumnCells = columns.map((column, columnIndex) => {
  51358. const expandable = isArray$1(rowData.children) && rowData.children.length > 0 && column.key === expandColumnKey;
  51359. return slots.cell({
  51360. column,
  51361. columns,
  51362. columnIndex,
  51363. depth,
  51364. style: columnsStyles[column.key],
  51365. rowData,
  51366. rowIndex,
  51367. isScrolling: unref(isScrolling),
  51368. expandIconProps: expandable ? {
  51369. rowData,
  51370. rowIndex,
  51371. onExpand
  51372. } : void 0
  51373. });
  51374. });
  51375. if (slots.row) ColumnCells = slots.row({
  51376. cells: ColumnCells.map((node) => {
  51377. if (isArray$1(node) && node.length === 1) return node[0];
  51378. return node;
  51379. }),
  51380. style,
  51381. columns,
  51382. depth,
  51383. rowData,
  51384. rowIndex,
  51385. isScrolling: unref(isScrolling)
  51386. });
  51387. if (unref(measurable)) {
  51388. const { height, ...exceptHeightStyle } = style || {};
  51389. const _measured = unref(measured);
  51390. return createVNode("div", mergeProps({
  51391. "ref": rowRef,
  51392. "class": props.class,
  51393. "style": _measured ? style : exceptHeightStyle,
  51394. "role": "row"
  51395. }, attrs, unref(eventHandlers)), [ColumnCells]);
  51396. }
  51397. return createVNode("div", mergeProps(attrs, {
  51398. "ref": rowRef,
  51399. "class": props.class,
  51400. "style": style,
  51401. "role": "row"
  51402. }, unref(eventHandlers)), [ColumnCells]);
  51403. };
  51404. }
  51405. });
  51406. //#endregion
  51407. //#region node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs
  51408. function _isSlot$2(s) {
  51409. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  51410. }
  51411. var RowRenderer = (props, { slots }) => {
  51412. const { columns, columnsStyles, depthMap, expandColumnKey, expandedRowKeys, estimatedRowHeight, hasFixedColumns, rowData, rowIndex, style, isScrolling, rowProps, rowClass, rowKey, rowEventHandlers, ns, onRowHovered, onRowExpanded } = props;
  51413. const rowKls = tryCall(rowClass, {
  51414. columns,
  51415. rowData,
  51416. rowIndex
  51417. }, "");
  51418. const additionalProps = tryCall(rowProps, {
  51419. columns,
  51420. rowData,
  51421. rowIndex
  51422. });
  51423. const _rowKey = rowData[rowKey];
  51424. const depth = depthMap[_rowKey] || 0;
  51425. const canExpand = Boolean(expandColumnKey);
  51426. const isFixedRow = rowIndex < 0;
  51427. const kls = [
  51428. ns.e("row"),
  51429. rowKls,
  51430. ns.is("expanded", canExpand && expandedRowKeys.includes(_rowKey)),
  51431. ns.is("fixed", !depth && isFixedRow),
  51432. ns.is("customized", Boolean(slots.row)),
  51433. { [ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0 }
  51434. ];
  51435. const onRowHover = hasFixedColumns ? onRowHovered : void 0;
  51436. const _rowProps = {
  51437. ...additionalProps,
  51438. columns,
  51439. columnsStyles,
  51440. class: kls,
  51441. depth,
  51442. expandColumnKey,
  51443. estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight,
  51444. isScrolling,
  51445. rowIndex,
  51446. rowData,
  51447. rowKey: _rowKey,
  51448. rowEventHandlers,
  51449. style
  51450. };
  51451. const handlerMouseEnter = (e) => {
  51452. onRowHover?.({
  51453. hovered: true,
  51454. rowKey: _rowKey,
  51455. event: e,
  51456. rowData,
  51457. rowIndex
  51458. });
  51459. };
  51460. const handlerMouseLeave = (e) => {
  51461. onRowHover?.({
  51462. hovered: false,
  51463. rowKey: _rowKey,
  51464. event: e,
  51465. rowData,
  51466. rowIndex
  51467. });
  51468. };
  51469. return createVNode(TableV2Row, mergeProps(_rowProps, {
  51470. "onRowExpand": onRowExpanded,
  51471. "onMouseenter": handlerMouseEnter,
  51472. "onMouseleave": handlerMouseLeave,
  51473. "rowkey": _rowKey
  51474. }), _isSlot$2(slots) ? slots : { default: () => [slots] });
  51475. };
  51476. //#endregion
  51477. //#region node_modules/element-plus/es/components/table-v2/src/components/cell.mjs
  51478. var TableV2Cell = (props, { slots }) => {
  51479. const { cellData, style } = props;
  51480. const displayText = cellData?.toString?.() || "";
  51481. const defaultSlot = renderSlot(slots, "default", props, () => [displayText]);
  51482. return createVNode("div", {
  51483. "class": props.class,
  51484. "title": displayText,
  51485. "style": style
  51486. }, [defaultSlot]);
  51487. };
  51488. TableV2Cell.displayName = "ElTableV2Cell";
  51489. TableV2Cell.inheritAttrs = false;
  51490. //#endregion
  51491. //#region node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs
  51492. var ExpandIcon = (props) => {
  51493. const { expanded, expandable, onExpand, style, size, ariaLabel } = props;
  51494. return createVNode("button", mergeProps({
  51495. onClick: expandable ? () => onExpand(!expanded) : void 0,
  51496. ariaLabel,
  51497. ariaExpanded: expanded,
  51498. class: props.class
  51499. }, { "type": "button" }), [createVNode(ElIcon, {
  51500. "size": size,
  51501. "style": style
  51502. }, { default: () => [createVNode(arrow_right_default, null, null)] })]);
  51503. };
  51504. ExpandIcon.inheritAttrs = false;
  51505. //#endregion
  51506. //#region node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs
  51507. var CellRenderer = ({ columns, column, columnIndex, depth, expandIconProps, isScrolling, rowData, rowIndex, style, expandedRowKeys, ns, t, cellProps: _cellProps, expandColumnKey, indentSize, iconSize, rowKey }, { slots }) => {
  51508. const cellStyle = enforceUnit(style);
  51509. if (column.placeholderSign === placeholderSign) return createVNode("div", {
  51510. "class": ns.em("row-cell", "placeholder"),
  51511. "style": cellStyle
  51512. }, null);
  51513. const { cellRenderer, dataKey, dataGetter } = column;
  51514. const cellData = isFunction$1(dataGetter) ? dataGetter({
  51515. columns,
  51516. column,
  51517. columnIndex,
  51518. rowData,
  51519. rowIndex
  51520. }) : get(rowData, dataKey ?? "");
  51521. const extraCellProps = tryCall(_cellProps, {
  51522. cellData,
  51523. columns,
  51524. column,
  51525. columnIndex,
  51526. rowIndex,
  51527. rowData
  51528. });
  51529. const cellProps = {
  51530. class: ns.e("cell-text"),
  51531. columns,
  51532. column,
  51533. columnIndex,
  51534. cellData,
  51535. isScrolling,
  51536. rowData,
  51537. rowIndex
  51538. };
  51539. const columnCellRenderer = componentToSlot(cellRenderer);
  51540. const Cell = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(TableV2Cell, cellProps, null)]);
  51541. const kls = [
  51542. ns.e("row-cell"),
  51543. column.class,
  51544. column.align === "center" && ns.is("align-center"),
  51545. column.align === "right" && ns.is("align-right")
  51546. ];
  51547. const expandable = rowIndex >= 0 && expandColumnKey && column.key === expandColumnKey;
  51548. const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey]);
  51549. let IconOrPlaceholder;
  51550. const iconStyle = `margin-inline-start: ${depth * indentSize}px;`;
  51551. if (expandable) if (isObject$2(expandIconProps)) IconOrPlaceholder = createVNode(ExpandIcon, mergeProps(expandIconProps, {
  51552. "class": [ns.e("expand-icon"), ns.is("expanded", expanded)],
  51553. "size": iconSize,
  51554. "expanded": expanded,
  51555. "ariaLabel": t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
  51556. "style": iconStyle,
  51557. "expandable": true
  51558. }), null);
  51559. else IconOrPlaceholder = createVNode("div", { "style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ") }, null);
  51560. return createVNode("div", mergeProps({
  51561. "class": kls,
  51562. "style": cellStyle
  51563. }, extraCellProps, { "role": "cell" }), [IconOrPlaceholder, Cell]);
  51564. };
  51565. CellRenderer.inheritAttrs = false;
  51566. //#endregion
  51567. //#region node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs
  51568. var TableV2HeaderRow = /* @__PURE__ */ defineComponent({
  51569. name: "ElTableV2HeaderRow",
  51570. props: buildProps({
  51571. class: String,
  51572. columns,
  51573. columnsStyles: {
  51574. type: definePropType(Object),
  51575. required: true
  51576. },
  51577. headerIndex: Number,
  51578. style: { type: definePropType(Object) }
  51579. }),
  51580. setup(props, { slots }) {
  51581. return () => {
  51582. const { columns, columnsStyles, headerIndex, style } = props;
  51583. let Cells = columns.map((column, columnIndex) => {
  51584. return slots.cell({
  51585. columns,
  51586. column,
  51587. columnIndex,
  51588. headerIndex,
  51589. style: columnsStyles[column.key]
  51590. });
  51591. });
  51592. if (slots.header) Cells = slots.header({
  51593. cells: Cells.map((node) => {
  51594. if (isArray$1(node) && node.length === 1) return node[0];
  51595. return node;
  51596. }),
  51597. columns,
  51598. headerIndex
  51599. });
  51600. return createVNode("div", {
  51601. "class": props.class,
  51602. "style": style,
  51603. "role": "row"
  51604. }, [Cells]);
  51605. };
  51606. }
  51607. });
  51608. //#endregion
  51609. //#region node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs
  51610. function _isSlot$1(s) {
  51611. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  51612. }
  51613. var HeaderRenderer = ({ columns, columnsStyles, headerIndex, style, headerClass, headerProps, ns }, { slots }) => {
  51614. const param = {
  51615. columns,
  51616. headerIndex
  51617. };
  51618. const kls = [
  51619. ns.e("header-row"),
  51620. tryCall(headerClass, param, ""),
  51621. ns.is("customized", Boolean(slots.header))
  51622. ];
  51623. return createVNode(TableV2HeaderRow, {
  51624. ...tryCall(headerProps, param),
  51625. columnsStyles,
  51626. class: kls,
  51627. columns,
  51628. headerIndex,
  51629. style
  51630. }, _isSlot$1(slots) ? slots : { default: () => [slots] });
  51631. };
  51632. //#endregion
  51633. //#region node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs
  51634. var HeaderCell = (props, { slots }) => renderSlot(slots, "default", props, () => [createVNode("div", {
  51635. "class": props.class,
  51636. "title": props.column?.title
  51637. }, [props.column?.title])]);
  51638. HeaderCell.displayName = "ElTableV2HeaderCell";
  51639. HeaderCell.inheritAttrs = false;
  51640. //#endregion
  51641. //#region node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs
  51642. var SortIcon = (props) => {
  51643. const { sortOrder } = props;
  51644. return createVNode("button", {
  51645. "type": "button",
  51646. "aria-label": props.ariaLabel,
  51647. "class": props.class
  51648. }, [createVNode(ElIcon, { "size": 14 }, { default: () => [sortOrder === "asc" ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)] })]);
  51649. };
  51650. //#endregion
  51651. //#region node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs
  51652. var HeaderCellRenderer = (props, { slots }) => {
  51653. const { column, ns, t, style, onColumnSorted } = props;
  51654. const cellStyle = enforceUnit(style);
  51655. if (column.placeholderSign === placeholderSign) return createVNode("div", {
  51656. "class": ns.em("header-row-cell", "placeholder"),
  51657. "style": cellStyle
  51658. }, null);
  51659. const { headerCellRenderer, headerClass, sortable } = column;
  51660. /**
  51661. * render Cell children
  51662. */
  51663. const cellProps = {
  51664. ...props,
  51665. class: ns.e("header-cell-text")
  51666. };
  51667. const columnCellRenderer = componentToSlot(headerCellRenderer);
  51668. const Cell = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(HeaderCell, cellProps, null)]);
  51669. /**
  51670. * Render cell container and sort indicator
  51671. */
  51672. const { sortBy, sortState, headerCellProps } = props;
  51673. let sorting, sortOrder, ariaSort;
  51674. if (sortState) {
  51675. const order = sortState[column.key];
  51676. sorting = Boolean(oppositeOrderMap[order]);
  51677. sortOrder = sorting ? order : "asc";
  51678. } else {
  51679. sorting = column.key === sortBy.key;
  51680. sortOrder = sorting ? sortBy.order : "asc";
  51681. }
  51682. if (sortOrder === "asc") ariaSort = "ascending";
  51683. else if (sortOrder === "desc") ariaSort = "descending";
  51684. else ariaSort = void 0;
  51685. const cellKls = [
  51686. ns.e("header-cell"),
  51687. tryCall(headerClass, props, ""),
  51688. column.align === "center" && ns.is("align-center"),
  51689. column.align === "right" && ns.is("align-right"),
  51690. sortable && ns.is("sortable")
  51691. ];
  51692. return createVNode("div", mergeProps({
  51693. ...tryCall(headerCellProps, props),
  51694. onClick: column.sortable ? onColumnSorted : void 0,
  51695. ariaSort: sortable ? ariaSort : void 0,
  51696. class: cellKls,
  51697. style: cellStyle,
  51698. ["data-key"]: column.key
  51699. }, { "role": "columnheader" }), [Cell, sortable && createVNode(SortIcon, {
  51700. "class": [ns.e("sort-icon"), sorting && ns.is("sorting")],
  51701. "sortOrder": sortOrder,
  51702. "ariaLabel": t("el.table.sortLabel", { column: column.title || "" })
  51703. }, null)]);
  51704. };
  51705. //#endregion
  51706. //#region node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs
  51707. var Footer$1 = (props, { slots }) => {
  51708. return createVNode("div", {
  51709. "class": props.class,
  51710. "style": props.style
  51711. }, [slots.default?.()]);
  51712. };
  51713. Footer$1.displayName = "ElTableV2Footer";
  51714. //#endregion
  51715. //#region node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs
  51716. var Footer = (props, { slots }) => {
  51717. const defaultSlot = renderSlot(slots, "default", {}, () => [createVNode(ElEmpty, null, null)]);
  51718. return createVNode("div", {
  51719. "class": props.class,
  51720. "style": props.style
  51721. }, [defaultSlot]);
  51722. };
  51723. Footer.displayName = "ElTableV2Empty";
  51724. //#endregion
  51725. //#region node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs
  51726. var Overlay = (props, { slots }) => {
  51727. return createVNode("div", {
  51728. "class": props.class,
  51729. "style": props.style
  51730. }, [slots.default?.()]);
  51731. };
  51732. Overlay.displayName = "ElTableV2Overlay";
  51733. //#endregion
  51734. //#region node_modules/element-plus/es/components/table-v2/src/table-v2.mjs
  51735. function _isSlot(s) {
  51736. return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
  51737. }
  51738. var TableV2 = /* @__PURE__ */ defineComponent({
  51739. name: "ElTableV2",
  51740. props: tableV2Props,
  51741. slots: Object,
  51742. setup(props, { slots, expose }) {
  51743. const ns = useNamespace("table-v2");
  51744. const { t } = useLocale();
  51745. const { columnsStyles, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, data, depthMap, expandedRowKeys, hasFixedColumns, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, bodyWidth, emptyStyle, rootStyle, footerHeight, showEmpty, scrollTo, scrollToLeft, scrollToTop, scrollToRow, getRowHeight, onColumnSorted, onRowHeightChange, onRowHovered, onRowExpanded, onRowsRendered, onScroll, onVerticalScroll } = useTable(props);
  51746. expose({
  51747. /**
  51748. * @description scroll to a given position
  51749. * @params params {{ scrollLeft?: number, scrollTop?: number }} where to scroll to.
  51750. */
  51751. scrollTo,
  51752. /**
  51753. * @description scroll to a given position horizontally
  51754. * @params scrollLeft {Number} where to scroll to.
  51755. */
  51756. scrollToLeft,
  51757. /**
  51758. * @description scroll to a given position vertically
  51759. * @params scrollTop { Number } where to scroll to.
  51760. */
  51761. scrollToTop,
  51762. /**
  51763. * @description scroll to a given row
  51764. * @params row {Number} which row to scroll to
  51765. * @params @optional strategy {ScrollStrategy} use what strategy to scroll to
  51766. */
  51767. scrollToRow
  51768. });
  51769. provide(TableV2InjectionKey, {
  51770. ns,
  51771. isResetting,
  51772. isScrolling
  51773. });
  51774. return () => {
  51775. const { cache, cellProps, estimatedRowHeight, expandColumnKey, fixedData, headerHeight, headerClass, headerProps, headerCellProps, sortBy, sortState, rowHeight, rowClass, rowEventHandlers, rowKey, rowProps, scrollbarAlwaysOn, indentSize, iconSize, useIsScrolling, vScrollbarSize, width } = props;
  51776. const _data = unref(data);
  51777. const mainTableProps = {
  51778. cache,
  51779. class: ns.e("main"),
  51780. columns: unref(mainColumns),
  51781. data: _data,
  51782. fixedData,
  51783. estimatedRowHeight,
  51784. bodyWidth: unref(bodyWidth),
  51785. headerHeight,
  51786. headerWidth: unref(bodyWidth),
  51787. height: unref(mainTableHeight),
  51788. mainTableRef,
  51789. rowKey,
  51790. rowHeight,
  51791. scrollbarAlwaysOn,
  51792. scrollbarStartGap: 2,
  51793. scrollbarEndGap: vScrollbarSize,
  51794. useIsScrolling,
  51795. width,
  51796. getRowHeight,
  51797. onRowsRendered,
  51798. onScroll
  51799. };
  51800. const leftColumnsWidth = unref(leftTableWidth);
  51801. const _fixedTableHeight = unref(fixedTableHeight);
  51802. const leftTableProps = {
  51803. cache,
  51804. class: ns.e("left"),
  51805. columns: unref(fixedColumnsOnLeft),
  51806. data: _data,
  51807. fixedData,
  51808. estimatedRowHeight,
  51809. leftTableRef,
  51810. rowHeight,
  51811. bodyWidth: leftColumnsWidth,
  51812. headerWidth: leftColumnsWidth,
  51813. headerHeight,
  51814. height: _fixedTableHeight,
  51815. rowKey,
  51816. scrollbarAlwaysOn,
  51817. scrollbarStartGap: 2,
  51818. scrollbarEndGap: vScrollbarSize,
  51819. useIsScrolling,
  51820. width: leftColumnsWidth,
  51821. getRowHeight,
  51822. onScroll: onVerticalScroll
  51823. };
  51824. const rightColumnsWidth = unref(rightTableWidth);
  51825. const rightTableProps = {
  51826. cache,
  51827. class: ns.e("right"),
  51828. columns: unref(fixedColumnsOnRight),
  51829. data: _data,
  51830. fixedData,
  51831. estimatedRowHeight,
  51832. rightTableRef,
  51833. rowHeight,
  51834. bodyWidth: rightColumnsWidth,
  51835. headerWidth: rightColumnsWidth,
  51836. headerHeight,
  51837. height: _fixedTableHeight,
  51838. rowKey,
  51839. scrollbarAlwaysOn,
  51840. scrollbarStartGap: 2,
  51841. scrollbarEndGap: vScrollbarSize,
  51842. width: rightColumnsWidth,
  51843. style: `${ns.cssVarName("table-scrollbar-size")}: ${vScrollbarSize}px`,
  51844. useIsScrolling,
  51845. getRowHeight,
  51846. onScroll: onVerticalScroll
  51847. };
  51848. const _columnsStyles = unref(columnsStyles);
  51849. const tableRowProps = {
  51850. ns,
  51851. depthMap: unref(depthMap),
  51852. columnsStyles: _columnsStyles,
  51853. expandColumnKey,
  51854. expandedRowKeys: unref(expandedRowKeys),
  51855. estimatedRowHeight,
  51856. hasFixedColumns: unref(hasFixedColumns),
  51857. rowProps,
  51858. rowClass,
  51859. rowKey,
  51860. rowEventHandlers,
  51861. onRowHovered,
  51862. onRowExpanded,
  51863. onRowHeightChange
  51864. };
  51865. const tableCellProps = {
  51866. cellProps,
  51867. expandColumnKey,
  51868. indentSize,
  51869. iconSize,
  51870. rowKey,
  51871. expandedRowKeys: unref(expandedRowKeys),
  51872. ns,
  51873. t
  51874. };
  51875. const tableHeaderProps = {
  51876. ns,
  51877. headerClass,
  51878. headerProps,
  51879. columnsStyles: _columnsStyles
  51880. };
  51881. const tableHeaderCellProps = {
  51882. ns,
  51883. t,
  51884. sortBy,
  51885. sortState,
  51886. headerCellProps,
  51887. onColumnSorted
  51888. };
  51889. const tableSlots = {
  51890. row: (props) => createVNode(RowRenderer, mergeProps(props, tableRowProps), {
  51891. row: slots.row,
  51892. cell: (props) => {
  51893. let _slot;
  51894. return slots.cell ? createVNode(CellRenderer, mergeProps(props, tableCellProps, { "style": _columnsStyles[props.column.key] }), _isSlot(_slot = slots.cell(props)) ? _slot : { default: () => [_slot] }) : createVNode(CellRenderer, mergeProps(props, tableCellProps, { "style": _columnsStyles[props.column.key] }), null);
  51895. }
  51896. }),
  51897. header: (props) => createVNode(HeaderRenderer, mergeProps(props, tableHeaderProps), {
  51898. header: slots.header,
  51899. cell: (props) => {
  51900. let _slot2;
  51901. return slots["header-cell"] ? createVNode(HeaderCellRenderer, mergeProps(props, tableHeaderCellProps, { "style": _columnsStyles[props.column.key] }), _isSlot(_slot2 = slots["header-cell"](props)) ? _slot2 : { default: () => [_slot2] }) : createVNode(HeaderCellRenderer, mergeProps(props, tableHeaderCellProps, { "style": _columnsStyles[props.column.key] }), null);
  51902. }
  51903. })
  51904. };
  51905. const rootKls = [
  51906. props.class,
  51907. ns.b(),
  51908. ns.e("root"),
  51909. ns.is("dynamic", unref(isDynamic))
  51910. ];
  51911. const footerProps = {
  51912. class: ns.e("footer"),
  51913. style: unref(footerHeight)
  51914. };
  51915. return createVNode("div", {
  51916. "class": rootKls,
  51917. "style": unref(rootStyle)
  51918. }, [
  51919. createVNode(MainTable, mainTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
  51920. createVNode(LeftTable, leftTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
  51921. createVNode(RightTable, rightTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
  51922. slots.footer && createVNode(Footer$1, footerProps, { default: slots.footer }),
  51923. unref(showEmpty) && createVNode(Footer, {
  51924. "class": ns.e("empty"),
  51925. "style": unref(emptyStyle)
  51926. }, { default: slots.empty }),
  51927. slots.overlay && createVNode(Overlay, { "class": ns.e("overlay") }, { default: slots.overlay })
  51928. ]);
  51929. };
  51930. }
  51931. });
  51932. //#endregion
  51933. //#region node_modules/element-plus/es/components/table-v2/src/auto-resizer.mjs
  51934. var autoResizerProps = buildProps({
  51935. disableWidth: Boolean,
  51936. disableHeight: Boolean,
  51937. onResize: { type: definePropType(Function) }
  51938. });
  51939. //#endregion
  51940. //#region node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs
  51941. var useAutoResize = (props) => {
  51942. const sizer = ref();
  51943. const width$ = ref(0);
  51944. const height$ = ref(0);
  51945. let resizerStopper;
  51946. onMounted(() => {
  51947. resizerStopper = useResizeObserver(sizer, ([entry]) => {
  51948. const { width, height } = entry.contentRect;
  51949. const { paddingLeft, paddingRight, paddingTop, paddingBottom } = getComputedStyle(entry.target);
  51950. const left = Number.parseInt(paddingLeft) || 0;
  51951. const right = Number.parseInt(paddingRight) || 0;
  51952. const top = Number.parseInt(paddingTop) || 0;
  51953. const bottom = Number.parseInt(paddingBottom) || 0;
  51954. width$.value = width - left - right;
  51955. height$.value = height - top - bottom;
  51956. }).stop;
  51957. });
  51958. onBeforeUnmount(() => {
  51959. resizerStopper?.();
  51960. });
  51961. watch([width$, height$], ([width, height]) => {
  51962. props.onResize?.({
  51963. width,
  51964. height
  51965. });
  51966. });
  51967. return {
  51968. sizer,
  51969. width: width$,
  51970. height: height$
  51971. };
  51972. };
  51973. //#endregion
  51974. //#region node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs
  51975. var AutoResizer = /* @__PURE__ */ defineComponent({
  51976. name: "ElAutoResizer",
  51977. props: autoResizerProps,
  51978. setup(props, { slots }) {
  51979. const ns = useNamespace("auto-resizer");
  51980. const { height, width, sizer } = useAutoResize(props);
  51981. const style = {
  51982. width: "100%",
  51983. height: "100%"
  51984. };
  51985. return () => {
  51986. return createVNode("div", {
  51987. "ref": sizer,
  51988. "class": ns.b(),
  51989. "style": style
  51990. }, [slots.default?.({
  51991. height: height.value,
  51992. width: width.value
  51993. })]);
  51994. };
  51995. }
  51996. });
  51997. //#endregion
  51998. //#region node_modules/element-plus/es/components/table-v2/index.mjs
  51999. var ElTableV2 = withInstall(TableV2);
  52000. var ElAutoResizer = withInstall(AutoResizer);
  52001. //#endregion
  52002. //#region node_modules/element-plus/es/components/tabs/src/constants.mjs
  52003. var tabsRootContextKey = Symbol("tabsRootContextKey");
  52004. //#endregion
  52005. //#region node_modules/element-plus/es/components/tabs/src/tab-bar.mjs
  52006. /**
  52007. * @deprecated Removed after 3.0.0, Use `TabBarProps` instead.
  52008. */
  52009. var tabBarProps = buildProps({
  52010. tabs: {
  52011. type: definePropType(Array),
  52012. default: () => mutable([])
  52013. },
  52014. tabRefs: {
  52015. type: definePropType(Object),
  52016. default: () => mutable({})
  52017. }
  52018. });
  52019. //#endregion
  52020. //#region node_modules/element-plus/es/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.mjs
  52021. var COMPONENT_NAME$4 = "ElTabBar";
  52022. //#endregion
  52023. //#region node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs
  52024. var tab_bar_default = /* @__PURE__ */ defineComponent({
  52025. name: COMPONENT_NAME$4,
  52026. __name: "tab-bar",
  52027. props: tabBarProps,
  52028. setup(__props, { expose: __expose }) {
  52029. const props = __props;
  52030. const rootTabs = inject(tabsRootContextKey);
  52031. if (!rootTabs) throwError(COMPONENT_NAME$4, "<el-tabs><el-tab-bar /></el-tabs>");
  52032. const ns = useNamespace("tabs");
  52033. const barRef = ref();
  52034. const barStyle = ref();
  52035. /**
  52036. * when defaultValue is not set, the bar is always shown.
  52037. *
  52038. * when defaultValue is set, the bar will be hidden until style is calculated
  52039. * to avoid the bar showing in the wrong position on initial render.
  52040. */
  52041. const renderActiveBar = computed(() => isUndefined(rootTabs.props.defaultValue) || Boolean(barStyle.value?.transform));
  52042. const getBarStyle = () => {
  52043. let offset = 0;
  52044. let tabSize = 0;
  52045. const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
  52046. const sizeDir = sizeName === "width" ? "x" : "y";
  52047. const position = sizeDir === "x" ? "left" : "top";
  52048. props.tabs.every((tab) => {
  52049. if (isUndefined(tab.paneName)) return false;
  52050. const $el = props.tabRefs[tab.paneName];
  52051. if (!$el) return false;
  52052. if (!tab.active) return true;
  52053. offset = $el[`offset${capitalize(position)}`];
  52054. tabSize = $el[`client${capitalize(sizeName)}`];
  52055. const tabStyles = window.getComputedStyle($el);
  52056. if (sizeName === "width") {
  52057. tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
  52058. offset += Number.parseFloat(tabStyles.paddingLeft);
  52059. }
  52060. return false;
  52061. });
  52062. return {
  52063. [sizeName]: `${tabSize}px`,
  52064. transform: `translate${capitalize(sizeDir)}(${offset}px)`
  52065. };
  52066. };
  52067. const update = () => barStyle.value = getBarStyle();
  52068. const tabObservers = [];
  52069. const observerTabs = () => {
  52070. tabObservers.forEach((observer) => observer.stop());
  52071. tabObservers.length = 0;
  52072. Object.values(props.tabRefs).forEach((tab) => {
  52073. tabObservers.push(useResizeObserver(tab, update));
  52074. });
  52075. };
  52076. watch(() => props.tabs, async () => {
  52077. await nextTick();
  52078. update();
  52079. observerTabs();
  52080. }, { immediate: true });
  52081. const barObserver = useResizeObserver(barRef, () => update());
  52082. onBeforeUnmount(() => {
  52083. tabObservers.forEach((observer) => observer.stop());
  52084. tabObservers.length = 0;
  52085. barObserver.stop();
  52086. });
  52087. __expose({
  52088. /** @description tab root html element */
  52089. ref: barRef,
  52090. /** @description method to manually update tab bar style, return the updated style */
  52091. update
  52092. });
  52093. return (_ctx, _cache) => {
  52094. return renderActiveBar.value ? (openBlock(), createElementBlock("div", {
  52095. key: 0,
  52096. ref_key: "barRef",
  52097. ref: barRef,
  52098. class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
  52099. style: normalizeStyle(barStyle.value)
  52100. }, null, 6)) : createCommentVNode("v-if", true);
  52101. };
  52102. }
  52103. });
  52104. //#endregion
  52105. //#region node_modules/element-plus/es/components/tabs/src/composables/use-tab-nav-touch.mjs
  52106. var TOUCH_SCROLL_THRESHOLD = 5;
  52107. var useTabNavTouch = ({ scrollable, navOffset, navSize, navContainerSize, isHorizontal }) => {
  52108. const isTouchScrolling = ref(false);
  52109. const maxOffset = computed(() => Math.max(navSize.value - navContainerSize.value, 0));
  52110. let touchState;
  52111. let isMainAxisTouch;
  52112. const handleTouchStart = (event) => {
  52113. if (!scrollable.value || event.touches.length !== 1) return;
  52114. const { clientX, clientY } = getClientXY(event);
  52115. touchState = {
  52116. startX: clientX,
  52117. startY: clientY,
  52118. startOffset: navOffset.value
  52119. };
  52120. isMainAxisTouch = void 0;
  52121. };
  52122. const handleTouchMove = (event) => {
  52123. if (!touchState || !scrollable.value) return;
  52124. if (event.touches.length !== 1) {
  52125. handleTouchEnd();
  52126. return;
  52127. }
  52128. const { clientX, clientY } = getClientXY(event);
  52129. const deltaX = touchState.startX - clientX;
  52130. const deltaY = touchState.startY - clientY;
  52131. const mainAxisDelta = isHorizontal.value ? deltaX : deltaY;
  52132. const crossAxisDelta = isHorizontal.value ? deltaY : deltaX;
  52133. const mainAxisDistance = Math.abs(mainAxisDelta);
  52134. const crossAxisDistance = Math.abs(crossAxisDelta);
  52135. if (isUndefined$1(isMainAxisTouch)) {
  52136. if (Math.max(mainAxisDistance, crossAxisDistance) <= TOUCH_SCROLL_THRESHOLD) return;
  52137. isMainAxisTouch = mainAxisDistance > crossAxisDistance;
  52138. }
  52139. if (!isMainAxisTouch) return;
  52140. const nextOffset = clamp$2(touchState.startOffset + mainAxisDelta, 0, maxOffset.value);
  52141. if (maxOffset.value <= 0 || nextOffset === navOffset.value || !event.cancelable) return;
  52142. event.preventDefault();
  52143. isTouchScrolling.value = true;
  52144. navOffset.value = nextOffset;
  52145. };
  52146. const handleTouchEnd = () => {
  52147. touchState = void 0;
  52148. isMainAxisTouch = void 0;
  52149. isTouchScrolling.value = false;
  52150. };
  52151. return {
  52152. isTouchScrolling,
  52153. handleTouchStart,
  52154. handleTouchMove,
  52155. handleTouchEnd
  52156. };
  52157. };
  52158. //#endregion
  52159. //#region node_modules/element-plus/es/components/tabs/src/tab-nav.mjs
  52160. var tabNavProps = buildProps({
  52161. panes: {
  52162. type: definePropType(Array),
  52163. default: () => mutable([])
  52164. },
  52165. currentName: {
  52166. type: [String, Number],
  52167. default: ""
  52168. },
  52169. editable: Boolean,
  52170. type: {
  52171. type: String,
  52172. values: [
  52173. "card",
  52174. "border-card",
  52175. ""
  52176. ],
  52177. default: ""
  52178. },
  52179. stretch: Boolean,
  52180. /**
  52181. * @description tab-nav tabindex
  52182. */
  52183. tabindex: {
  52184. type: [String, Number],
  52185. default: void 0
  52186. }
  52187. });
  52188. var tabNavEmits = {
  52189. tabClick: (tab, tabName, ev) => ev instanceof Event,
  52190. tabRemove: (tab, ev) => ev instanceof Event
  52191. };
  52192. var COMPONENT_NAME$3 = "ElTabNav";
  52193. var TabNav = /* @__PURE__ */ defineComponent({
  52194. name: COMPONENT_NAME$3,
  52195. props: tabNavProps,
  52196. emits: tabNavEmits,
  52197. setup(props, { expose, emit }) {
  52198. const rootTabs = inject(tabsRootContextKey);
  52199. if (!rootTabs) throwError(COMPONENT_NAME$3, `<el-tabs><tab-nav /></el-tabs>`);
  52200. const ns = useNamespace("tabs");
  52201. const visibility = useDocumentVisibility();
  52202. const focused = useWindowFocus();
  52203. const navScroll$ = ref();
  52204. const nav$ = ref();
  52205. const el$ = ref();
  52206. const tabRefsMap = ref({});
  52207. const tabBarRef = ref();
  52208. const scrollable = ref(false);
  52209. const navOffset = ref(0);
  52210. const isFocus = ref(false);
  52211. const focusable = ref(true);
  52212. const isWheelScrolling = ref(false);
  52213. const tracker = shallowRef();
  52214. const isHorizontal = computed(() => ["top", "bottom"].includes(rootTabs.props.tabPosition));
  52215. const sizeName = computed(() => isHorizontal.value ? "width" : "height");
  52216. const navStyle = computed(() => {
  52217. const dir = sizeName.value === "width" ? "X" : "Y";
  52218. return {
  52219. transition: isWheelScrolling.value || isTouchScrolling.value ? "none" : void 0,
  52220. transform: `translate${dir}(-${navOffset.value}px)`
  52221. };
  52222. });
  52223. const { width: navContainerWidth, height: navContainerHeight } = useElementSize(navScroll$);
  52224. const { width: navWidth, height: navHeight } = useElementSize(nav$, {
  52225. width: 0,
  52226. height: 0
  52227. }, { box: "border-box" });
  52228. const navContainerSize = computed(() => isHorizontal.value ? navContainerWidth.value : navContainerHeight.value);
  52229. const navSize = computed(() => isHorizontal.value ? navWidth.value : navHeight.value);
  52230. const { onWheel } = useWheel({
  52231. atStartEdge: computed(() => navOffset.value <= 0),
  52232. atEndEdge: computed(() => navSize.value - navOffset.value <= navContainerSize.value),
  52233. layout: computed(() => isHorizontal.value ? "horizontal" : "vertical")
  52234. }, (offset) => {
  52235. navOffset.value = clamp$2(navOffset.value + offset, 0, navSize.value - navContainerSize.value);
  52236. });
  52237. const handleWheel = (event) => {
  52238. isWheelScrolling.value = true;
  52239. onWheel(event);
  52240. rAF(() => {
  52241. isWheelScrolling.value = false;
  52242. });
  52243. };
  52244. const { isTouchScrolling, handleTouchStart, handleTouchMove, handleTouchEnd } = useTabNavTouch({
  52245. scrollable,
  52246. navOffset,
  52247. navSize,
  52248. navContainerSize,
  52249. isHorizontal
  52250. });
  52251. const scrollPrev = () => {
  52252. if (!navScroll$.value) return;
  52253. const containerSize = navScroll$.value.getBoundingClientRect()[sizeName.value];
  52254. const currentOffset = navOffset.value;
  52255. if (!currentOffset) return;
  52256. navOffset.value = currentOffset > containerSize ? currentOffset - containerSize : 0;
  52257. };
  52258. const scrollNext = () => {
  52259. if (!navScroll$.value || !nav$.value) return;
  52260. const navSize = nav$.value.getBoundingClientRect()[sizeName.value];
  52261. const containerSize = navScroll$.value.getBoundingClientRect()[sizeName.value];
  52262. const currentOffset = navOffset.value;
  52263. if (!isGreaterThan(navSize - currentOffset, containerSize)) return;
  52264. navOffset.value = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
  52265. };
  52266. const scrollToActiveTab = async () => {
  52267. const nav = nav$.value;
  52268. if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return;
  52269. await nextTick();
  52270. const activeTab = tabRefsMap.value[props.currentName];
  52271. if (!activeTab) return;
  52272. const navScroll = navScroll$.value;
  52273. const activeTabBounding = activeTab.getBoundingClientRect();
  52274. const navScrollBounding = navScroll.getBoundingClientRect();
  52275. const navScrollLeft = navScrollBounding.left + 1;
  52276. const navScrollRight = navScrollBounding.right - 1;
  52277. const navBounding = nav.getBoundingClientRect();
  52278. const maxOffset = isHorizontal.value ? navBounding.width - navScrollBounding.width : navBounding.height - navScrollBounding.height;
  52279. const currentOffset = navOffset.value;
  52280. let newOffset = currentOffset;
  52281. if (isHorizontal.value) {
  52282. if (activeTabBounding.left < navScrollLeft) newOffset = currentOffset - (navScrollLeft - activeTabBounding.left);
  52283. if (activeTabBounding.right > navScrollRight) newOffset = currentOffset + activeTabBounding.right - navScrollRight;
  52284. } else {
  52285. if (activeTabBounding.top < navScrollBounding.top) newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
  52286. if (activeTabBounding.bottom > navScrollBounding.bottom) newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
  52287. }
  52288. newOffset = Math.max(newOffset, 0);
  52289. navOffset.value = Math.min(newOffset, maxOffset);
  52290. };
  52291. const update = () => {
  52292. if (!nav$.value || !navScroll$.value) return;
  52293. props.stretch && tabBarRef.value?.update();
  52294. const navSize = nav$.value.getBoundingClientRect()[sizeName.value];
  52295. const containerSize = navScroll$.value.getBoundingClientRect()[sizeName.value];
  52296. const currentOffset = navOffset.value;
  52297. if (containerSize < navSize) {
  52298. scrollable.value = scrollable.value || {};
  52299. scrollable.value.prev = currentOffset;
  52300. scrollable.value.next = isGreaterThan(navSize, currentOffset + containerSize);
  52301. if (isGreaterThan(containerSize, navSize - currentOffset)) navOffset.value = navSize - containerSize;
  52302. } else {
  52303. scrollable.value = false;
  52304. if (currentOffset > 0) navOffset.value = 0;
  52305. }
  52306. };
  52307. const changeTab = (event) => {
  52308. const code = getEventCode(event);
  52309. let step = 0;
  52310. switch (code) {
  52311. case EVENT_CODE.left:
  52312. case EVENT_CODE.up:
  52313. step = -1;
  52314. break;
  52315. case EVENT_CODE.right:
  52316. case EVENT_CODE.down:
  52317. step = 1;
  52318. break;
  52319. default: return;
  52320. }
  52321. const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
  52322. let nextIndex = tabList.indexOf(event.target) + step;
  52323. if (nextIndex < 0) nextIndex = tabList.length - 1;
  52324. else if (nextIndex >= tabList.length) nextIndex = 0;
  52325. tabList[nextIndex].focus({ preventScroll: true });
  52326. tabList[nextIndex].click();
  52327. setFocus();
  52328. };
  52329. const setFocus = () => {
  52330. if (focusable.value) isFocus.value = true;
  52331. };
  52332. const removeFocus = () => isFocus.value = false;
  52333. const setRefs = (el, key) => {
  52334. tabRefsMap.value[key] = el;
  52335. };
  52336. const focusActiveTab = async () => {
  52337. await nextTick();
  52338. tabRefsMap.value[props.currentName]?.focus({ preventScroll: true });
  52339. };
  52340. watch(visibility, (visibility) => {
  52341. if (visibility === "hidden") focusable.value = false;
  52342. else if (visibility === "visible") setTimeout(() => focusable.value = true, 50);
  52343. });
  52344. watch(focused, (focused) => {
  52345. if (focused) setTimeout(() => focusable.value = true, 50);
  52346. else focusable.value = false;
  52347. });
  52348. useResizeObserver(el$, () => {
  52349. rAF(update);
  52350. });
  52351. onMounted(() => setTimeout(() => scrollToActiveTab(), 0));
  52352. onUpdated(() => update());
  52353. expose({
  52354. scrollToActiveTab,
  52355. removeFocus,
  52356. focusActiveTab,
  52357. tabListRef: nav$,
  52358. tabBarRef,
  52359. scheduleRender: () => triggerRef(tracker)
  52360. });
  52361. return () => {
  52362. const scrollBtn = scrollable.value ? [createVNode("span", {
  52363. "class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)],
  52364. "onClick": scrollPrev
  52365. }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_left_default, null, null)] })]), createVNode("span", {
  52366. "class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)],
  52367. "onClick": scrollNext
  52368. }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_right_default, null, null)] })])] : null;
  52369. const tabs = props.panes.map((pane, index) => {
  52370. const uid = pane.uid;
  52371. const disabled = pane.props.disabled;
  52372. const tabName = pane.props.name ?? pane.index ?? `${index}`;
  52373. const closable = !disabled && (pane.isClosable || pane.props.closable !== false && props.editable);
  52374. pane.index = `${index}`;
  52375. const btnClose = closable ? createVNode(ElIcon, {
  52376. "class": "is-icon-close",
  52377. "onClick": (ev) => emit("tabRemove", pane, ev)
  52378. }, { default: () => [createVNode(close_default, null, null)] }) : null;
  52379. const tabLabelContent = pane.slots.label?.() || pane.props.label;
  52380. const tabindex = !disabled && pane.active ? props.tabindex ?? rootTabs.props.tabindex : -1;
  52381. return createVNode("div", {
  52382. "ref": (el) => setRefs(el, tabName),
  52383. "class": [
  52384. ns.e("item"),
  52385. ns.is(rootTabs.props.tabPosition),
  52386. ns.is("active", pane.active),
  52387. ns.is("disabled", disabled),
  52388. ns.is("closable", closable),
  52389. ns.is("focus", isFocus.value)
  52390. ],
  52391. "id": `tab-${tabName}`,
  52392. "key": `tab-${uid}`,
  52393. "aria-controls": `pane-${tabName}`,
  52394. "role": "tab",
  52395. "aria-selected": pane.active,
  52396. "tabindex": tabindex,
  52397. "onFocus": () => setFocus(),
  52398. "onBlur": () => removeFocus(),
  52399. "onClick": (ev) => {
  52400. removeFocus();
  52401. emit("tabClick", pane, tabName, ev);
  52402. },
  52403. "onKeydown": (ev) => {
  52404. const code = getEventCode(ev);
  52405. if (closable && (code === EVENT_CODE.delete || code === EVENT_CODE.backspace)) emit("tabRemove", pane, ev);
  52406. }
  52407. }, [...[tabLabelContent, btnClose]]);
  52408. });
  52409. tracker.value;
  52410. return createVNode("div", {
  52411. "ref": el$,
  52412. "class": [
  52413. ns.e("nav-wrap"),
  52414. ns.is("scrollable", !!scrollable.value),
  52415. ns.is(rootTabs.props.tabPosition)
  52416. ]
  52417. }, [scrollBtn, createVNode("div", {
  52418. "class": ns.e("nav-scroll"),
  52419. "ref": navScroll$
  52420. }, [props.panes.length > 0 ? createVNode("div", {
  52421. "class": [
  52422. ns.e("nav"),
  52423. ns.is(rootTabs.props.tabPosition),
  52424. ns.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))
  52425. ],
  52426. "ref": nav$,
  52427. "style": navStyle.value,
  52428. "role": "tablist",
  52429. "onKeydown": changeTab,
  52430. "onWheel": handleWheel,
  52431. "onTouchstart": handleTouchStart,
  52432. "onTouchmove": handleTouchMove,
  52433. "onTouchend": handleTouchEnd,
  52434. "onTouchcancel": handleTouchEnd
  52435. }, [...[!props.type ? createVNode(tab_bar_default, {
  52436. "ref": tabBarRef,
  52437. "tabs": [...props.panes],
  52438. "tabRefs": tabRefsMap.value
  52439. }, null) : null, tabs]]) : null])]);
  52440. };
  52441. }
  52442. });
  52443. //#endregion
  52444. //#region node_modules/element-plus/es/components/tabs/src/tabs.mjs
  52445. var tabsProps = buildProps({
  52446. /**
  52447. * @description type of Tab
  52448. */
  52449. type: {
  52450. type: String,
  52451. values: [
  52452. "card",
  52453. "border-card",
  52454. ""
  52455. ],
  52456. default: ""
  52457. },
  52458. /**
  52459. * @description whether Tab is closable
  52460. */
  52461. closable: Boolean,
  52462. /**
  52463. * @description whether Tab is addable
  52464. */
  52465. addable: Boolean,
  52466. /**
  52467. * @description binding value, name of the selected tab
  52468. */
  52469. modelValue: { type: [String, Number] },
  52470. /**
  52471. * @description initial value when `model-value` is not set
  52472. */
  52473. defaultValue: { type: [String, Number] },
  52474. /**
  52475. * @description whether Tab is addable and closable
  52476. */
  52477. editable: Boolean,
  52478. /**
  52479. * @description position of tabs
  52480. */
  52481. tabPosition: {
  52482. type: String,
  52483. values: [
  52484. "top",
  52485. "right",
  52486. "bottom",
  52487. "left"
  52488. ],
  52489. default: "top"
  52490. },
  52491. /**
  52492. * @description hook function before switching tab. If `false` is returned or a `Promise` is returned and then is rejected, switching will be prevented
  52493. */
  52494. beforeLeave: {
  52495. type: definePropType(Function),
  52496. default: () => true
  52497. },
  52498. /**
  52499. * @description whether width of tab automatically fits its container
  52500. */
  52501. stretch: Boolean,
  52502. /**
  52503. * @description tabs tabindex
  52504. */
  52505. tabindex: {
  52506. type: [String, Number],
  52507. default: 0
  52508. }
  52509. });
  52510. var isPaneName = (value) => isString(value) || isNumber(value);
  52511. var tabsEmits = {
  52512. [UPDATE_MODEL_EVENT]: (name) => isPaneName(name),
  52513. tabClick: (pane, ev) => ev instanceof Event,
  52514. tabChange: (name) => isPaneName(name),
  52515. edit: (paneName, action) => ["remove", "add"].includes(action),
  52516. tabRemove: (name) => isPaneName(name),
  52517. tabAdd: () => true
  52518. };
  52519. var Tabs = /* @__PURE__ */ defineComponent({
  52520. name: "ElTabs",
  52521. props: tabsProps,
  52522. emits: tabsEmits,
  52523. setup(props, { emit, slots, expose }) {
  52524. const ns = useNamespace("tabs");
  52525. const isVertical = computed(() => ["left", "right"].includes(props.tabPosition));
  52526. const { children: panes, addChild: registerPane, removeChild: unregisterPane, ChildrenSorter: PanesSorter } = useOrderedChildren(getCurrentInstance(), "ElTabPane");
  52527. const nav$ = ref();
  52528. const currentName = ref((isUndefined(props.modelValue) ? props.defaultValue : props.modelValue) ?? "0");
  52529. const setCurrentName = async (value, trigger = false) => {
  52530. if (currentName.value === value || isUndefined(value)) return;
  52531. try {
  52532. let canLeave;
  52533. if (props.beforeLeave) {
  52534. const result = props.beforeLeave(value, currentName.value);
  52535. canLeave = result instanceof Promise ? await result : result;
  52536. } else canLeave = true;
  52537. if (canLeave !== false) {
  52538. const isFocusInsidePane = panes.value.find((item) => item.paneName === currentName.value)?.isFocusInsidePane();
  52539. currentName.value = value;
  52540. if (trigger) {
  52541. emit(UPDATE_MODEL_EVENT, value);
  52542. emit("tabChange", value);
  52543. }
  52544. nav$.value?.removeFocus?.();
  52545. if (isFocusInsidePane) nav$.value?.focusActiveTab();
  52546. }
  52547. } catch {}
  52548. };
  52549. const handleTabClick = (tab, tabName, event) => {
  52550. if (tab.props.disabled) return;
  52551. emit("tabClick", tab, event);
  52552. setCurrentName(tabName, true);
  52553. };
  52554. const handleTabRemove = (pane, ev) => {
  52555. if (pane.props.disabled || isUndefined(pane.props.name)) return;
  52556. ev.stopPropagation();
  52557. emit("edit", pane.props.name, "remove");
  52558. emit("tabRemove", pane.props.name);
  52559. };
  52560. const handleTabAdd = () => {
  52561. emit("edit", void 0, "add");
  52562. emit("tabAdd");
  52563. };
  52564. const handleKeydown = (event) => {
  52565. const code = getEventCode(event);
  52566. if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter].includes(code)) handleTabAdd();
  52567. };
  52568. const swapChildren = (vnode) => {
  52569. const actualFirstChild = vnode.el.firstChild;
  52570. const firstChild = ["bottom", "right"].includes(props.tabPosition) ? vnode.children[0].el : vnode.children[1].el;
  52571. if (actualFirstChild !== firstChild) actualFirstChild.before(firstChild);
  52572. };
  52573. watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue));
  52574. watch(currentName, async () => {
  52575. await nextTick();
  52576. nav$.value?.scrollToActiveTab();
  52577. });
  52578. provide(tabsRootContextKey, {
  52579. props,
  52580. currentName,
  52581. registerPane,
  52582. unregisterPane,
  52583. nav$
  52584. });
  52585. expose({
  52586. currentName,
  52587. get tabNavRef() {
  52588. return omit(nav$.value, ["scheduleRender"]);
  52589. }
  52590. });
  52591. return () => {
  52592. const addSlot = slots["add-icon"];
  52593. const newButton = props.editable || props.addable ? createVNode("div", {
  52594. "class": [ns.e("new-tab"), isVertical.value && ns.e("new-tab-vertical")],
  52595. "tabindex": props.tabindex,
  52596. "onClick": handleTabAdd,
  52597. "onKeydown": handleKeydown
  52598. }, [addSlot ? renderSlot(slots, "add-icon") : createVNode(ElIcon, { "class": ns.is("icon-plus") }, { default: () => [createVNode(plus_default, null, null)] })]) : null;
  52599. const tabNav = () => createVNode(TabNav, {
  52600. "ref": nav$,
  52601. "currentName": currentName.value,
  52602. "editable": props.editable,
  52603. "type": props.type,
  52604. "panes": panes.value,
  52605. "stretch": props.stretch,
  52606. "onTabClick": handleTabClick,
  52607. "onTabRemove": handleTabRemove
  52608. }, null);
  52609. const header = createVNode("div", { "class": [
  52610. ns.e("header"),
  52611. isVertical.value && ns.e("header-vertical"),
  52612. ns.is(props.tabPosition)
  52613. ] }, [createVNode(PanesSorter, null, {
  52614. default: tabNav,
  52615. $stable: true
  52616. }), newButton]);
  52617. const panels = createVNode("div", { "class": ns.e("content") }, [renderSlot(slots, "default")]);
  52618. return createVNode("div", {
  52619. "class": [
  52620. ns.b(),
  52621. ns.m(props.tabPosition),
  52622. {
  52623. [ns.m("card")]: props.type === "card",
  52624. [ns.m("border-card")]: props.type === "border-card"
  52625. }
  52626. ],
  52627. "onVnodeMounted": swapChildren,
  52628. "onVnodeUpdated": swapChildren
  52629. }, [panels, header]);
  52630. };
  52631. }
  52632. });
  52633. //#endregion
  52634. //#region node_modules/element-plus/es/components/tabs/src/tab-pane.mjs
  52635. /**
  52636. * @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.
  52637. */
  52638. var tabPaneProps = buildProps({
  52639. /**
  52640. * @description title of the tab
  52641. */
  52642. label: {
  52643. type: String,
  52644. default: ""
  52645. },
  52646. /**
  52647. * @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'
  52648. */
  52649. name: { type: [String, Number] },
  52650. /**
  52651. * @description whether Tab is closable
  52652. */
  52653. closable: {
  52654. type: Boolean,
  52655. default: void 0
  52656. },
  52657. /**
  52658. * @description whether Tab is disabled
  52659. */
  52660. disabled: Boolean,
  52661. /**
  52662. * @description whether Tab is lazily rendered
  52663. */
  52664. lazy: Boolean
  52665. });
  52666. //#endregion
  52667. //#region node_modules/element-plus/es/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.mjs
  52668. var _hoisted_1$14 = [
  52669. "id",
  52670. "aria-hidden",
  52671. "aria-labelledby"
  52672. ];
  52673. var COMPONENT_NAME$2 = "ElTabPane";
  52674. //#endregion
  52675. //#region node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs
  52676. var tab_pane_default = /* @__PURE__ */ defineComponent({
  52677. name: COMPONENT_NAME$2,
  52678. __name: "tab-pane",
  52679. props: tabPaneProps,
  52680. setup(__props) {
  52681. const props = __props;
  52682. const instance = getCurrentInstance();
  52683. const slots = useSlots();
  52684. const tabsRoot = inject(tabsRootContextKey);
  52685. if (!tabsRoot) throwError(COMPONENT_NAME$2, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
  52686. const ns = useNamespace("tab-pane");
  52687. const paneRef = ref();
  52688. const index = ref();
  52689. const isClosable = computed(() => props.closable ?? tabsRoot.props.closable);
  52690. const active = computed(() => tabsRoot.currentName.value === (props.name ?? index.value));
  52691. const loaded = ref(active.value);
  52692. const paneName = computed(() => props.name ?? index.value);
  52693. const shouldBeRender = computed(() => !props.lazy || loaded.value || active.value);
  52694. const isFocusInsidePane = () => {
  52695. return paneRef.value?.contains(document.activeElement);
  52696. };
  52697. watch(active, (val) => {
  52698. if (val) loaded.value = true;
  52699. });
  52700. const pane = reactive({
  52701. uid: instance.uid,
  52702. getVnode: () => instance.vnode,
  52703. slots,
  52704. props,
  52705. paneName,
  52706. active,
  52707. index,
  52708. isClosable,
  52709. isFocusInsidePane
  52710. });
  52711. tabsRoot.registerPane(pane);
  52712. onBeforeUnmount(() => {
  52713. tabsRoot.unregisterPane(pane);
  52714. });
  52715. onBeforeUpdate(() => {
  52716. if (slots.label) tabsRoot.nav$.value?.scheduleRender();
  52717. });
  52718. return (_ctx, _cache) => {
  52719. return shouldBeRender.value ? withDirectives((openBlock(), createElementBlock("div", {
  52720. key: 0,
  52721. id: `pane-${paneName.value}`,
  52722. ref_key: "paneRef",
  52723. ref: paneRef,
  52724. class: normalizeClass(unref(ns).b()),
  52725. role: "tabpanel",
  52726. "aria-hidden": !active.value,
  52727. "aria-labelledby": `tab-${paneName.value}`
  52728. }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$14)), [[vShow, active.value]]) : createCommentVNode("v-if", true);
  52729. };
  52730. }
  52731. });
  52732. //#endregion
  52733. //#region node_modules/element-plus/es/components/tabs/index.mjs
  52734. var ElTabs = withInstall(Tabs, { TabPane: tab_pane_default });
  52735. var ElTabPane = withNoopInstall(tab_pane_default);
  52736. //#endregion
  52737. //#region node_modules/element-plus/es/components/text/src/text.mjs
  52738. /**
  52739. * @deprecated Removed after 3.0.0, Use `TextProps` instead.
  52740. */
  52741. var textProps = buildProps({
  52742. /**
  52743. * @description text type
  52744. */
  52745. type: {
  52746. type: String,
  52747. values: [
  52748. "primary",
  52749. "success",
  52750. "info",
  52751. "warning",
  52752. "danger",
  52753. ""
  52754. ],
  52755. default: ""
  52756. },
  52757. /**
  52758. * @description text size
  52759. */
  52760. size: {
  52761. type: String,
  52762. values: componentSizes,
  52763. default: ""
  52764. },
  52765. /**
  52766. * @description render ellipsis
  52767. */
  52768. truncated: Boolean,
  52769. /**
  52770. * @description maximum lines
  52771. */
  52772. lineClamp: { type: [String, Number] },
  52773. /**
  52774. * @description custom element tag
  52775. */
  52776. tag: {
  52777. type: String,
  52778. default: "span"
  52779. }
  52780. });
  52781. //#endregion
  52782. //#region node_modules/element-plus/es/components/text/index.mjs
  52783. var ElText = withInstall(/* @__PURE__ */ defineComponent({
  52784. name: "ElText",
  52785. __name: "text",
  52786. props: textProps,
  52787. setup(__props) {
  52788. const props = __props;
  52789. const attrs = useAttrs$1();
  52790. const textRef = ref();
  52791. const textSize = useFormSize();
  52792. const ns = useNamespace("text");
  52793. const textKls = computed(() => [
  52794. ns.b(),
  52795. ns.m(props.type),
  52796. ns.m(textSize.value),
  52797. ns.is("truncated", props.truncated),
  52798. ns.is("line-clamp", !isUndefined(props.lineClamp))
  52799. ]);
  52800. const bindTitle = async () => {
  52801. await nextTick();
  52802. if (attrs.title) return;
  52803. let shouldAddTitle = false;
  52804. const text = textRef.value?.textContent || "";
  52805. if (props.truncated) {
  52806. const width = textRef.value?.offsetWidth;
  52807. const scrollWidth = textRef.value?.scrollWidth;
  52808. if (width && scrollWidth && scrollWidth > width) shouldAddTitle = true;
  52809. } else if (!isUndefined(props.lineClamp)) {
  52810. const height = textRef.value?.offsetHeight;
  52811. const scrollHeight = textRef.value?.scrollHeight;
  52812. if (height && scrollHeight && scrollHeight > height) shouldAddTitle = true;
  52813. }
  52814. if (shouldAddTitle) textRef.value?.setAttribute("title", text);
  52815. else textRef.value?.removeAttribute("title");
  52816. };
  52817. onMounted(bindTitle);
  52818. onUpdated(bindTitle);
  52819. return (_ctx, _cache) => {
  52820. return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
  52821. ref_key: "textRef",
  52822. ref: textRef,
  52823. class: normalizeClass(textKls.value),
  52824. style: normalizeStyle({ "-webkit-line-clamp": __props.lineClamp })
  52825. }, {
  52826. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  52827. _: 3
  52828. }, 8, ["class", "style"]);
  52829. };
  52830. }
  52831. }));
  52832. //#endregion
  52833. //#region node_modules/element-plus/es/components/time-select/src/time-select.mjs
  52834. var DEFAULT_STEP = "00:30";
  52835. /**
  52836. * @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
  52837. */
  52838. var timeSelectProps = buildProps({
  52839. /**
  52840. * @description set format of time
  52841. */
  52842. format: {
  52843. type: String,
  52844. default: "HH:mm"
  52845. },
  52846. /**
  52847. * @description binding value
  52848. */
  52849. modelValue: { type: definePropType(String) },
  52850. /**
  52851. * @description whether TimeSelect is disabled
  52852. */
  52853. disabled: {
  52854. type: Boolean,
  52855. default: void 0
  52856. },
  52857. /**
  52858. * @description whether the input is editable
  52859. */
  52860. editable: {
  52861. type: Boolean,
  52862. default: true
  52863. },
  52864. /**
  52865. * @description Tooltip theme, built-in theme: `dark` / `light`
  52866. */
  52867. effect: {
  52868. type: definePropType(String),
  52869. default: "light"
  52870. },
  52871. /**
  52872. * @description whether to show clear button
  52873. */
  52874. clearable: {
  52875. type: Boolean,
  52876. default: true
  52877. },
  52878. /**
  52879. * @description size of Input
  52880. */
  52881. size: useSizeProp,
  52882. /**
  52883. * @description placeholder in non-range mode
  52884. */
  52885. placeholder: String,
  52886. /**
  52887. * @description start time
  52888. */
  52889. start: {
  52890. type: String,
  52891. default: "09:00"
  52892. },
  52893. /**
  52894. * @description end time
  52895. */
  52896. end: {
  52897. type: String,
  52898. default: "18:00"
  52899. },
  52900. /**
  52901. * @description time step
  52902. */
  52903. step: {
  52904. type: String,
  52905. default: DEFAULT_STEP
  52906. },
  52907. /**
  52908. * @description minimum time, any time before this time will be disabled
  52909. */
  52910. minTime: { type: definePropType(String) },
  52911. /**
  52912. * @description maximum time, any time after this time will be disabled
  52913. */
  52914. maxTime: { type: definePropType(String) },
  52915. /**
  52916. * @description whether `end` is included in options
  52917. */
  52918. includeEndTime: Boolean,
  52919. /**
  52920. * @description same as `name` in native input
  52921. */
  52922. name: String,
  52923. /**
  52924. * @description custom prefix icon component
  52925. */
  52926. prefixIcon: {
  52927. type: definePropType([String, Object]),
  52928. default: () => clock_default
  52929. },
  52930. /**
  52931. * @description custom clear icon component
  52932. */
  52933. clearIcon: {
  52934. type: definePropType([String, Object]),
  52935. default: () => circle_close_default
  52936. },
  52937. /**
  52938. * @description custom class name for TimeSelect's dropdown
  52939. */
  52940. popperClass: {
  52941. type: String,
  52942. default: ""
  52943. },
  52944. /**
  52945. * @description custom style for TimeSelect's dropdown
  52946. */
  52947. popperStyle: { type: definePropType([String, Object]) },
  52948. ...useEmptyValuesProps
  52949. });
  52950. //#endregion
  52951. //#region node_modules/element-plus/es/components/time-select/src/utils.mjs
  52952. var parseTime = (time) => {
  52953. const values = (time || "").split(":");
  52954. if (values.length >= 2) {
  52955. let hours = Number.parseInt(values[0], 10);
  52956. const minutes = Number.parseInt(values[1], 10);
  52957. const timeUpper = time.toUpperCase();
  52958. if (timeUpper.includes("AM") && hours === 12) hours = 0;
  52959. else if (timeUpper.includes("PM") && hours !== 12) hours += 12;
  52960. return {
  52961. hours,
  52962. minutes
  52963. };
  52964. }
  52965. return null;
  52966. };
  52967. var compareTime = (time1, time2) => {
  52968. const value1 = parseTime(time1);
  52969. if (!value1) return -1;
  52970. const value2 = parseTime(time2);
  52971. if (!value2) return -1;
  52972. const minutes1 = value1.minutes + value1.hours * 60;
  52973. const minutes2 = value2.minutes + value2.hours * 60;
  52974. if (minutes1 === minutes2) return 0;
  52975. return minutes1 > minutes2 ? 1 : -1;
  52976. };
  52977. var padTime = (time) => {
  52978. return `${time}`.padStart(2, "0");
  52979. };
  52980. var formatTime = (time) => {
  52981. return `${padTime(time.hours)}:${padTime(time.minutes)}`;
  52982. };
  52983. var nextTime = (time, step) => {
  52984. const timeValue = parseTime(time);
  52985. if (!timeValue) return "";
  52986. const stepValue = parseTime(step);
  52987. if (!stepValue) return "";
  52988. const next = {
  52989. hours: timeValue.hours,
  52990. minutes: timeValue.minutes
  52991. };
  52992. next.minutes += stepValue.minutes;
  52993. next.hours += stepValue.hours;
  52994. next.hours += Math.floor(next.minutes / 60);
  52995. next.minutes = next.minutes % 60;
  52996. return formatTime(next);
  52997. };
  52998. //#endregion
  52999. //#region node_modules/element-plus/es/components/time-select/index.mjs
  53000. var ElTimeSelect = withInstall(/* @__PURE__ */ defineComponent({
  53001. name: "ElTimeSelect",
  53002. __name: "time-select",
  53003. props: timeSelectProps,
  53004. emits: [
  53005. CHANGE_EVENT,
  53006. "blur",
  53007. "focus",
  53008. "clear",
  53009. UPDATE_MODEL_EVENT
  53010. ],
  53011. setup(__props, { expose: __expose }) {
  53012. import_dayjs_min.default.extend(import_customParseFormat.default);
  53013. const { Option: ElOption } = ElSelect;
  53014. const props = __props;
  53015. const nsInput = useNamespace("input");
  53016. const select = ref();
  53017. const _disabled = useFormDisabled();
  53018. const { lang } = useLocale();
  53019. const value = computed(() => props.modelValue);
  53020. const start = computed(() => {
  53021. const time = parseTime(props.start);
  53022. return time ? formatTime(time) : null;
  53023. });
  53024. const end = computed(() => {
  53025. const time = parseTime(props.end);
  53026. return time ? formatTime(time) : null;
  53027. });
  53028. const minTime = computed(() => {
  53029. const time = parseTime(props.minTime || "");
  53030. return time ? formatTime(time) : null;
  53031. });
  53032. const maxTime = computed(() => {
  53033. const time = parseTime(props.maxTime || "");
  53034. return time ? formatTime(time) : null;
  53035. });
  53036. const step = computed(() => {
  53037. const time = parseTime(props.step);
  53038. const isInvalidStep = !time || time.hours < 0 || time.minutes < 0 || Number.isNaN(time.hours) || Number.isNaN(time.minutes) || time.hours === 0 && time.minutes === 0;
  53039. if (isInvalidStep) debugWarn("ElTimeSelect", `invalid step, fallback to default step (${DEFAULT_STEP}).`);
  53040. return !isInvalidStep ? formatTime(time) : DEFAULT_STEP;
  53041. });
  53042. const items = computed(() => {
  53043. const result = [];
  53044. const push = (formattedValue, rawValue) => {
  53045. result.push({
  53046. value: formattedValue,
  53047. rawValue,
  53048. disabled: compareTime(rawValue, minTime.value || "-1:-1") <= 0 || compareTime(rawValue, maxTime.value || "100:100") >= 0
  53049. });
  53050. };
  53051. if (props.start && props.end && props.step) {
  53052. let current = start.value;
  53053. let currentTime;
  53054. while (current && end.value && compareTime(current, end.value) <= 0) {
  53055. currentTime = (0, import_dayjs_min.default)(current, "HH:mm").locale(lang.value).format(props.format);
  53056. push(currentTime, current);
  53057. current = nextTime(current, step.value);
  53058. }
  53059. if (props.includeEndTime && end.value && result[result.length - 1]?.rawValue !== end.value) push((0, import_dayjs_min.default)(end.value, "HH:mm").locale(lang.value).format(props.format), end.value);
  53060. }
  53061. return result;
  53062. });
  53063. const blur = () => {
  53064. select.value?.blur?.();
  53065. };
  53066. const focus = () => {
  53067. select.value?.focus?.();
  53068. };
  53069. __expose({
  53070. /**
  53071. * @description blur the Input component
  53072. */
  53073. blur,
  53074. /**
  53075. * @description focus the Input component
  53076. */
  53077. focus
  53078. });
  53079. return (_ctx, _cache) => {
  53080. return openBlock(), createBlock(unref(ElSelect), {
  53081. ref_key: "select",
  53082. ref: select,
  53083. name: __props.name,
  53084. "model-value": value.value,
  53085. disabled: unref(_disabled),
  53086. clearable: __props.clearable,
  53087. "clear-icon": __props.clearIcon,
  53088. size: __props.size,
  53089. effect: __props.effect,
  53090. placeholder: __props.placeholder,
  53091. "default-first-option": "",
  53092. filterable: __props.editable,
  53093. "empty-values": __props.emptyValues,
  53094. "value-on-clear": __props.valueOnClear,
  53095. "popper-class": __props.popperClass,
  53096. "popper-style": __props.popperStyle,
  53097. "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit(unref("update:modelValue"), event)),
  53098. onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit(unref("change"), event)),
  53099. onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)),
  53100. onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event)),
  53101. onClear: _cache[4] || (_cache[4] = () => _ctx.$emit("clear"))
  53102. }, {
  53103. prefix: withCtx(() => [__props.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  53104. key: 0,
  53105. class: normalizeClass(unref(nsInput).e("prefix-icon"))
  53106. }, {
  53107. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon)))]),
  53108. _: 1
  53109. }, 8, ["class"])) : createCommentVNode("v-if", true)]),
  53110. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
  53111. return openBlock(), createBlock(unref(ElOption), {
  53112. key: item.value,
  53113. label: item.value,
  53114. value: item.value,
  53115. disabled: item.disabled
  53116. }, null, 8, [
  53117. "label",
  53118. "value",
  53119. "disabled"
  53120. ]);
  53121. }), 128))]),
  53122. _: 1
  53123. }, 8, [
  53124. "name",
  53125. "model-value",
  53126. "disabled",
  53127. "clearable",
  53128. "clear-icon",
  53129. "size",
  53130. "effect",
  53131. "placeholder",
  53132. "filterable",
  53133. "empty-values",
  53134. "value-on-clear",
  53135. "popper-class",
  53136. "popper-style"
  53137. ]);
  53138. };
  53139. }
  53140. }));
  53141. //#endregion
  53142. //#region node_modules/element-plus/es/components/timeline/src/tokens.mjs
  53143. var TIMELINE_INJECTION_KEY = "timeline";
  53144. //#endregion
  53145. //#region node_modules/element-plus/es/components/timeline/src/timeline.mjs
  53146. var timelineProps = buildProps({
  53147. /**
  53148. * @description relative position of timeline and content
  53149. */
  53150. mode: {
  53151. type: String,
  53152. values: [
  53153. "start",
  53154. "alternate",
  53155. "alternate-reverse",
  53156. "end"
  53157. ],
  53158. default: "start"
  53159. },
  53160. /**
  53161. * @description whether reverse order
  53162. */
  53163. reverse: Boolean
  53164. });
  53165. var Timeline = defineComponent({
  53166. name: "ElTimeline",
  53167. props: timelineProps,
  53168. setup(props, { slots }) {
  53169. const ns = useNamespace("timeline");
  53170. provide(TIMELINE_INJECTION_KEY, {
  53171. props,
  53172. slots
  53173. });
  53174. const timelineKls = computed(() => [ns.b(), ns.is(props.mode)]);
  53175. return () => {
  53176. const children = flattedChildren(slots.default?.() ?? []);
  53177. return h$1("ul", { class: timelineKls.value }, props.reverse ? children.reverse() : children);
  53178. };
  53179. }
  53180. });
  53181. //#endregion
  53182. //#region node_modules/element-plus/es/components/timeline/src/timeline-item.mjs
  53183. /**
  53184. * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.
  53185. */
  53186. var timelineItemProps = buildProps({
  53187. /**
  53188. * @description timestamp content
  53189. */
  53190. timestamp: {
  53191. type: String,
  53192. default: ""
  53193. },
  53194. /**
  53195. * @description whether to show timestamp
  53196. */
  53197. hideTimestamp: Boolean,
  53198. /**
  53199. * @description whether vertically centered
  53200. */
  53201. center: Boolean,
  53202. /**
  53203. * @description position of timestamp
  53204. */
  53205. placement: {
  53206. type: String,
  53207. values: ["top", "bottom"],
  53208. default: "bottom"
  53209. },
  53210. /**
  53211. * @description node type
  53212. */
  53213. type: {
  53214. type: String,
  53215. values: [
  53216. "primary",
  53217. "success",
  53218. "warning",
  53219. "danger",
  53220. "info"
  53221. ],
  53222. default: ""
  53223. },
  53224. /**
  53225. * @description background color of node
  53226. */
  53227. color: {
  53228. type: String,
  53229. default: ""
  53230. },
  53231. /**
  53232. * @description node size
  53233. */
  53234. size: {
  53235. type: String,
  53236. values: ["normal", "large"],
  53237. default: "normal"
  53238. },
  53239. /**
  53240. * @description icon component
  53241. */
  53242. icon: { type: iconPropType },
  53243. /**
  53244. * @description icon is hollow
  53245. */
  53246. hollow: Boolean
  53247. });
  53248. //#endregion
  53249. //#region node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs
  53250. var timeline_item_default = /* @__PURE__ */ defineComponent({
  53251. name: "ElTimelineItem",
  53252. __name: "timeline-item",
  53253. props: timelineItemProps,
  53254. setup(__props) {
  53255. const props = __props;
  53256. const { props: timelineProps } = inject(TIMELINE_INJECTION_KEY);
  53257. const ns = useNamespace("timeline-item");
  53258. const defaultNodeKls = computed(() => [
  53259. ns.e("node"),
  53260. ns.em("node", props.size || ""),
  53261. ns.em("node", props.type || ""),
  53262. ns.is("hollow", props.hollow)
  53263. ]);
  53264. const timelineItemKls = computed(() => [
  53265. ns.b(),
  53266. { [ns.e("center")]: props.center },
  53267. ns.is(timelineProps.mode)
  53268. ]);
  53269. return (_ctx, _cache) => {
  53270. return openBlock(), createElementBlock("li", { class: normalizeClass(timelineItemKls.value) }, [
  53271. createBaseVNode("div", { class: normalizeClass(unref(ns).e("tail")) }, null, 2),
  53272. !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
  53273. key: 0,
  53274. class: normalizeClass(defaultNodeKls.value),
  53275. style: normalizeStyle({ backgroundColor: __props.color })
  53276. }, [__props.icon ? (openBlock(), createBlock(unref(ElIcon), {
  53277. key: 0,
  53278. class: normalizeClass(unref(ns).e("icon"))
  53279. }, {
  53280. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
  53281. _: 1
  53282. }, 8, ["class"])) : createCommentVNode("v-if", true)], 6)) : createCommentVNode("v-if", true),
  53283. _ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
  53284. key: 1,
  53285. class: normalizeClass(unref(ns).e("dot"))
  53286. }, [renderSlot(_ctx.$slots, "dot")], 2)) : createCommentVNode("v-if", true),
  53287. createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [
  53288. !__props.hideTimestamp && __props.placement === "top" ? (openBlock(), createElementBlock("div", {
  53289. key: 0,
  53290. class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")])
  53291. }, toDisplayString(__props.timestamp), 3)) : createCommentVNode("v-if", true),
  53292. createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2),
  53293. !__props.hideTimestamp && __props.placement === "bottom" ? (openBlock(), createElementBlock("div", {
  53294. key: 1,
  53295. class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")])
  53296. }, toDisplayString(__props.timestamp), 3)) : createCommentVNode("v-if", true)
  53297. ], 2)
  53298. ], 2);
  53299. };
  53300. }
  53301. });
  53302. //#endregion
  53303. //#region node_modules/element-plus/es/components/timeline/index.mjs
  53304. var ElTimeline = withInstall(Timeline, { TimelineItem: timeline_item_default });
  53305. var ElTimelineItem = withNoopInstall(timeline_item_default);
  53306. //#endregion
  53307. //#region node_modules/element-plus/es/components/transfer/src/transfer.mjs
  53308. var LEFT_CHECK_CHANGE_EVENT = "left-check-change";
  53309. var RIGHT_CHECK_CHANGE_EVENT = "right-check-change";
  53310. /**
  53311. * @deprecated Removed after 3.0.0, Use `TransferProps` instead.
  53312. */
  53313. var transferProps = buildProps({
  53314. /**
  53315. * @description data source
  53316. */
  53317. data: {
  53318. type: definePropType(Array),
  53319. default: () => []
  53320. },
  53321. /**
  53322. * @description custom list titles
  53323. */
  53324. titles: {
  53325. type: definePropType(Array),
  53326. default: () => []
  53327. },
  53328. /**
  53329. * @description custom button texts
  53330. */
  53331. buttonTexts: {
  53332. type: definePropType(Array),
  53333. default: () => []
  53334. },
  53335. /**
  53336. * @description placeholder for the filter input
  53337. */
  53338. filterPlaceholder: String,
  53339. /**
  53340. * @description custom filter method
  53341. */
  53342. filterMethod: { type: definePropType(Function) },
  53343. /**
  53344. * @description key array of initially checked data items of the left list
  53345. */
  53346. leftDefaultChecked: {
  53347. type: definePropType(Array),
  53348. default: () => []
  53349. },
  53350. /**
  53351. * @description key array of initially checked data items of the right list
  53352. */
  53353. rightDefaultChecked: {
  53354. type: definePropType(Array),
  53355. default: () => []
  53356. },
  53357. /**
  53358. * @description custom render function for data items
  53359. */
  53360. renderContent: { type: definePropType(Function) },
  53361. /**
  53362. * @description binding value
  53363. */
  53364. modelValue: {
  53365. type: definePropType(Array),
  53366. default: () => []
  53367. },
  53368. /**
  53369. * @description texts for checking status in list header
  53370. */
  53371. format: {
  53372. type: definePropType(Object),
  53373. default: () => ({})
  53374. },
  53375. /**
  53376. * @description whether Transfer is filterable
  53377. */
  53378. filterable: Boolean,
  53379. /**
  53380. * @description prop aliases for data source
  53381. */
  53382. props: {
  53383. type: definePropType(Object),
  53384. default: () => mutable({
  53385. label: "label",
  53386. key: "key",
  53387. disabled: "disabled"
  53388. })
  53389. },
  53390. /**
  53391. * @description order strategy for elements in the target list. If set to `original`, the elements will keep the same order as the data source. If set to `push`, the newly added elements will be pushed to the bottom. If set to `unshift`, the newly added elements will be inserted on the top
  53392. */
  53393. targetOrder: {
  53394. type: String,
  53395. values: [
  53396. "original",
  53397. "push",
  53398. "unshift"
  53399. ],
  53400. default: "original"
  53401. },
  53402. /**
  53403. * @description whether to trigger form validation
  53404. */
  53405. validateEvent: {
  53406. type: Boolean,
  53407. default: true
  53408. }
  53409. });
  53410. var transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray$1) || isArray$1(value) && isNil(movedKeys);
  53411. var transferEmits = {
  53412. [CHANGE_EVENT]: (value, direction, movedKeys) => [value, movedKeys].every(isArray$1) && ["left", "right"].includes(direction),
  53413. [UPDATE_MODEL_EVENT]: (value) => isArray$1(value),
  53414. [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
  53415. [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn
  53416. };
  53417. //#endregion
  53418. //#region node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs
  53419. var usePropsAlias = (props) => {
  53420. const initProps = {
  53421. label: "label",
  53422. key: "key",
  53423. disabled: "disabled"
  53424. };
  53425. return computed(() => ({
  53426. ...initProps,
  53427. ...props.props
  53428. }));
  53429. };
  53430. //#endregion
  53431. //#region node_modules/element-plus/es/components/transfer/src/composables/use-checked-change.mjs
  53432. var useCheckedChange = (checkedState, emit) => {
  53433. const onSourceCheckedChange = (val, movedKeys) => {
  53434. checkedState.leftChecked = val;
  53435. if (!movedKeys) return;
  53436. emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys);
  53437. };
  53438. const onTargetCheckedChange = (val, movedKeys) => {
  53439. checkedState.rightChecked = val;
  53440. if (!movedKeys) return;
  53441. emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);
  53442. };
  53443. return {
  53444. onSourceCheckedChange,
  53445. onTargetCheckedChange
  53446. };
  53447. };
  53448. //#endregion
  53449. //#region node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs
  53450. var useComputedData = (props) => {
  53451. const propsAlias = usePropsAlias(props);
  53452. const dataObj = computed(() => props.data.reduce((o, cur) => (o[cur[propsAlias.value.key]] = cur, o), {}));
  53453. return {
  53454. sourceData: computed(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key]))),
  53455. targetData: computed(() => {
  53456. if (props.targetOrder === "original") return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key]));
  53457. else return props.modelValue.reduce((arr, cur) => {
  53458. const val = dataObj.value[cur];
  53459. if (val) arr.push(val);
  53460. return arr;
  53461. }, []);
  53462. })
  53463. };
  53464. };
  53465. //#endregion
  53466. //#region node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs
  53467. var useMove = (props, checkedState, emit) => {
  53468. const propsAlias = usePropsAlias(props);
  53469. const _emit = (value, direction, movedKeys) => {
  53470. emit(UPDATE_MODEL_EVENT, value);
  53471. emit(CHANGE_EVENT, value, direction, movedKeys);
  53472. };
  53473. const addToLeft = () => {
  53474. const currentValue = props.modelValue.slice();
  53475. checkedState.rightChecked.forEach((item) => {
  53476. const index = currentValue.indexOf(item);
  53477. if (index > -1) currentValue.splice(index, 1);
  53478. });
  53479. _emit(currentValue, "left", checkedState.rightChecked);
  53480. };
  53481. const addToRight = () => {
  53482. let currentValue = props.modelValue.slice();
  53483. const itemsToBeMoved = props.data.filter((item) => {
  53484. const itemKey = item[propsAlias.value.key];
  53485. return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);
  53486. }).map((item) => item[propsAlias.value.key]);
  53487. currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
  53488. if (props.targetOrder === "original") currentValue = props.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]);
  53489. _emit(currentValue, "right", checkedState.leftChecked);
  53490. };
  53491. return {
  53492. addToLeft,
  53493. addToRight
  53494. };
  53495. };
  53496. //#endregion
  53497. //#region node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs
  53498. var CHECKED_CHANGE_EVENT = "checked-change";
  53499. /**
  53500. * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.
  53501. */
  53502. var transferPanelProps = buildProps({
  53503. data: transferProps.data,
  53504. optionRender: { type: definePropType(Function) },
  53505. placeholder: String,
  53506. title: String,
  53507. filterable: Boolean,
  53508. format: transferProps.format,
  53509. filterMethod: transferProps.filterMethod,
  53510. defaultChecked: transferProps.leftDefaultChecked,
  53511. props: transferProps.props
  53512. });
  53513. var transferPanelEmits = { [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn };
  53514. //#endregion
  53515. //#region node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs
  53516. var useCheck$1 = (props, panelState, emit) => {
  53517. const propsAlias = usePropsAlias(props);
  53518. const filteredData = computed(() => {
  53519. return props.data.filter((item) => {
  53520. if (isFunction$1(props.filterMethod)) return props.filterMethod(panelState.query, item);
  53521. else return String(item[propsAlias.value.label] || item[propsAlias.value.key]).toLowerCase().includes(panelState.query.toLowerCase());
  53522. });
  53523. });
  53524. const checkableData = computed(() => filteredData.value.filter((item) => !item[propsAlias.value.disabled]));
  53525. const checkedSummary = computed(() => {
  53526. const checkedLength = panelState.checked.length;
  53527. const dataLength = props.data.length;
  53528. const { noChecked, hasChecked } = props.format;
  53529. if (noChecked && hasChecked) return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString());
  53530. else return `${checkedLength}/${dataLength}`;
  53531. });
  53532. const isIndeterminate = computed(() => {
  53533. const checkedLength = panelState.checked.length;
  53534. return checkedLength > 0 && checkedLength < checkableData.value.length;
  53535. });
  53536. const updateAllChecked = () => {
  53537. const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
  53538. panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item));
  53539. };
  53540. const handleAllCheckedChange = (value) => {
  53541. panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : [];
  53542. };
  53543. watch(() => panelState.checked, (val, oldVal) => {
  53544. updateAllChecked();
  53545. if (panelState.checkChangeByUser) emit(CHECKED_CHANGE_EVENT, val, val.concat(oldVal).filter((v) => !val.includes(v) || !oldVal.includes(v)));
  53546. else {
  53547. emit(CHECKED_CHANGE_EVENT, val);
  53548. panelState.checkChangeByUser = true;
  53549. }
  53550. });
  53551. watch(checkableData, () => {
  53552. updateAllChecked();
  53553. });
  53554. watch(() => props.data, () => {
  53555. const checked = [];
  53556. const filteredDataKeys = filteredData.value.map((item) => item[propsAlias.value.key]);
  53557. panelState.checked.forEach((item) => {
  53558. if (filteredDataKeys.includes(item)) checked.push(item);
  53559. });
  53560. panelState.checkChangeByUser = false;
  53561. panelState.checked = checked;
  53562. });
  53563. watch(() => props.defaultChecked, (val, oldVal) => {
  53564. if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item))) return;
  53565. const checked = [];
  53566. const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
  53567. val.forEach((item) => {
  53568. if (checkableDataKeys.includes(item)) checked.push(item);
  53569. });
  53570. panelState.checkChangeByUser = false;
  53571. panelState.checked = checked;
  53572. }, { immediate: true });
  53573. return {
  53574. filteredData,
  53575. checkableData,
  53576. checkedSummary,
  53577. isIndeterminate,
  53578. updateAllChecked,
  53579. handleAllCheckedChange
  53580. };
  53581. };
  53582. //#endregion
  53583. //#region node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs
  53584. var transfer_panel_default = /* @__PURE__ */ defineComponent({
  53585. name: "ElTransferPanel",
  53586. __name: "transfer-panel",
  53587. props: transferPanelProps,
  53588. emits: transferPanelEmits,
  53589. setup(__props, { expose: __expose, emit: __emit }) {
  53590. const props = __props;
  53591. const emit = __emit;
  53592. const slots = useSlots();
  53593. const OptionContent = ({ option }) => option;
  53594. const { t } = useLocale();
  53595. const ns = useNamespace("transfer");
  53596. const panelState = reactive({
  53597. checked: [],
  53598. allChecked: false,
  53599. query: "",
  53600. checkChangeByUser: true
  53601. });
  53602. const propsAlias = usePropsAlias(props);
  53603. const { filteredData, checkedSummary, isIndeterminate, handleAllCheckedChange } = useCheck$1(props, panelState, emit);
  53604. const hasNoMatch = computed(() => !isEmpty(panelState.query) && isEmpty(filteredData.value));
  53605. const hasFooter = computed(() => !isEmpty(slots.default()[0].children));
  53606. const { checked, allChecked, query } = toRefs(panelState);
  53607. __expose({
  53608. /** @description filter keyword */
  53609. query });
  53610. return (_ctx, _cache) => {
  53611. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b("panel")) }, [
  53612. createBaseVNode("p", { class: normalizeClass(unref(ns).be("panel", "header")) }, [createVNode(unref(ElCheckbox), {
  53613. modelValue: unref(allChecked),
  53614. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null),
  53615. indeterminate: unref(isIndeterminate),
  53616. "validate-event": false,
  53617. onChange: unref(handleAllCheckedChange)
  53618. }, {
  53619. default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(unref(ns).be("panel", "header-title")) }, toDisplayString(__props.title), 3), createBaseVNode("span", { class: normalizeClass(unref(ns).be("panel", "header-count")) }, toDisplayString(unref(checkedSummary)), 3)]),
  53620. _: 1
  53621. }, 8, [
  53622. "modelValue",
  53623. "indeterminate",
  53624. "onChange"
  53625. ])], 2),
  53626. createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", hasFooter.value)]) }, [
  53627. __props.filterable ? (openBlock(), createBlock(unref(ElInput), {
  53628. key: 0,
  53629. modelValue: unref(query),
  53630. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null),
  53631. class: normalizeClass(unref(ns).be("panel", "filter")),
  53632. size: "default",
  53633. placeholder: __props.placeholder,
  53634. "prefix-icon": unref(search_default),
  53635. clearable: "",
  53636. "validate-event": false
  53637. }, null, 8, [
  53638. "modelValue",
  53639. "class",
  53640. "placeholder",
  53641. "prefix-icon"
  53642. ])) : createCommentVNode("v-if", true),
  53643. withDirectives(createVNode(unref(ElCheckboxGroup), {
  53644. modelValue: unref(checked),
  53645. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(checked) ? checked.value = $event : null),
  53646. "validate-event": false,
  53647. class: normalizeClass([unref(ns).is("filterable", __props.filterable), unref(ns).be("panel", "list")])
  53648. }, {
  53649. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => {
  53650. return openBlock(), createBlock(unref(ElCheckbox), {
  53651. key: item[unref(propsAlias).key],
  53652. class: normalizeClass(unref(ns).be("panel", "item")),
  53653. value: item[unref(propsAlias).key],
  53654. disabled: item[unref(propsAlias).disabled],
  53655. "validate-event": false
  53656. }, {
  53657. default: withCtx(() => [createVNode(OptionContent, { option: __props.optionRender?.(item) }, null, 8, ["option"])]),
  53658. _: 2
  53659. }, 1032, [
  53660. "class",
  53661. "value",
  53662. "disabled"
  53663. ]);
  53664. }), 128))]),
  53665. _: 1
  53666. }, 8, ["modelValue", "class"]), [[vShow, !hasNoMatch.value && !unref(isEmpty)(__props.data)]]),
  53667. withDirectives(createBaseVNode("div", { class: normalizeClass(unref(ns).be("panel", "empty")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(hasNoMatch.value ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 1)])], 2), [[vShow, hasNoMatch.value || unref(isEmpty)(__props.data)]])
  53668. ], 2),
  53669. hasFooter.value ? (openBlock(), createElementBlock("p", {
  53670. key: 0,
  53671. class: normalizeClass(unref(ns).be("panel", "footer"))
  53672. }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
  53673. ], 2);
  53674. };
  53675. }
  53676. });
  53677. //#endregion
  53678. //#region node_modules/element-plus/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs
  53679. var _hoisted_1$13 = { key: 0 };
  53680. var _hoisted_2$8 = { key: 0 };
  53681. //#endregion
  53682. //#region node_modules/element-plus/es/components/transfer/index.mjs
  53683. var ElTransfer = withInstall(/* @__PURE__ */ defineComponent({
  53684. name: "ElTransfer",
  53685. __name: "transfer",
  53686. props: transferProps,
  53687. emits: transferEmits,
  53688. setup(__props, { expose: __expose, emit: __emit }) {
  53689. const props = __props;
  53690. const emit = __emit;
  53691. const slots = useSlots();
  53692. const { t } = useLocale();
  53693. const ns = useNamespace("transfer");
  53694. const { formItem } = useFormItem();
  53695. const checkedState = reactive({
  53696. leftChecked: [],
  53697. rightChecked: []
  53698. });
  53699. const propsAlias = usePropsAlias(props);
  53700. const { sourceData, targetData } = useComputedData(props);
  53701. const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit);
  53702. const { addToLeft, addToRight } = useMove(props, checkedState, emit);
  53703. const leftPanel = ref();
  53704. const rightPanel = ref();
  53705. const clearQuery = (which) => {
  53706. switch (which) {
  53707. case "left":
  53708. leftPanel.value.query = "";
  53709. break;
  53710. case "right":
  53711. rightPanel.value.query = "";
  53712. break;
  53713. }
  53714. };
  53715. const hasButtonTexts = computed(() => props.buttonTexts.length === 2);
  53716. const leftPanelTitle = computed(() => props.titles[0] || t("el.transfer.titles.0"));
  53717. const rightPanelTitle = computed(() => props.titles[1] || t("el.transfer.titles.1"));
  53718. const panelFilterPlaceholder = computed(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder"));
  53719. watch(() => props.modelValue, () => {
  53720. if (props.validateEvent) formItem?.validate?.("change").catch(NOOP);
  53721. });
  53722. const optionRender = computed(() => (option) => {
  53723. if (props.renderContent) return props.renderContent(h$1, option);
  53724. const defaultSlotVNodes = (slots.default?.({ option }) || []).filter((node) => node.type !== Comment);
  53725. if (defaultSlotVNodes.length) return defaultSlotVNodes;
  53726. return h$1("span", option[propsAlias.value.label] || option[propsAlias.value.key]);
  53727. });
  53728. __expose({
  53729. /** @description clear the filter keyword of a certain panel */
  53730. clearQuery,
  53731. /** @description left panel ref */
  53732. leftPanel,
  53733. /** @description right panel ref */
  53734. rightPanel
  53735. });
  53736. return (_ctx, _cache) => {
  53737. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
  53738. createVNode(transfer_panel_default, {
  53739. ref_key: "leftPanel",
  53740. ref: leftPanel,
  53741. data: unref(sourceData),
  53742. "option-render": optionRender.value,
  53743. placeholder: panelFilterPlaceholder.value,
  53744. title: leftPanelTitle.value,
  53745. filterable: __props.filterable,
  53746. format: __props.format,
  53747. "filter-method": __props.filterMethod,
  53748. "default-checked": __props.leftDefaultChecked,
  53749. props: props.props,
  53750. onCheckedChange: unref(onSourceCheckedChange)
  53751. }, {
  53752. empty: withCtx(() => [renderSlot(_ctx.$slots, "left-empty")]),
  53753. default: withCtx(() => [renderSlot(_ctx.$slots, "left-footer")]),
  53754. _: 3
  53755. }, 8, [
  53756. "data",
  53757. "option-render",
  53758. "placeholder",
  53759. "title",
  53760. "filterable",
  53761. "format",
  53762. "filter-method",
  53763. "default-checked",
  53764. "props",
  53765. "onCheckedChange"
  53766. ]),
  53767. createBaseVNode("div", { class: normalizeClass(unref(ns).e("buttons")) }, [createVNode(unref(ElButton), {
  53768. type: "primary",
  53769. class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]),
  53770. disabled: unref(isEmpty)(checkedState.rightChecked),
  53771. onClick: unref(addToLeft)
  53772. }, {
  53773. default: withCtx(() => [createVNode(unref(ElIcon), null, {
  53774. default: withCtx(() => [createVNode(unref(arrow_left_default))]),
  53775. _: 1
  53776. }), !unref(isUndefined)(__props.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_1$13, toDisplayString(__props.buttonTexts[0]), 1)) : createCommentVNode("v-if", true)]),
  53777. _: 1
  53778. }, 8, [
  53779. "class",
  53780. "disabled",
  53781. "onClick"
  53782. ]), createVNode(unref(ElButton), {
  53783. type: "primary",
  53784. class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]),
  53785. disabled: unref(isEmpty)(checkedState.leftChecked),
  53786. onClick: unref(addToRight)
  53787. }, {
  53788. default: withCtx(() => [!unref(isUndefined)(__props.buttonTexts[1]) ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString(__props.buttonTexts[1]), 1)) : createCommentVNode("v-if", true), createVNode(unref(ElIcon), null, {
  53789. default: withCtx(() => [createVNode(unref(arrow_right_default))]),
  53790. _: 1
  53791. })]),
  53792. _: 1
  53793. }, 8, [
  53794. "class",
  53795. "disabled",
  53796. "onClick"
  53797. ])], 2),
  53798. createVNode(transfer_panel_default, {
  53799. ref_key: "rightPanel",
  53800. ref: rightPanel,
  53801. data: unref(targetData),
  53802. "option-render": optionRender.value,
  53803. placeholder: panelFilterPlaceholder.value,
  53804. filterable: __props.filterable,
  53805. format: __props.format,
  53806. "filter-method": __props.filterMethod,
  53807. title: rightPanelTitle.value,
  53808. "default-checked": __props.rightDefaultChecked,
  53809. props: props.props,
  53810. onCheckedChange: unref(onTargetCheckedChange)
  53811. }, {
  53812. empty: withCtx(() => [renderSlot(_ctx.$slots, "right-empty")]),
  53813. default: withCtx(() => [renderSlot(_ctx.$slots, "right-footer")]),
  53814. _: 3
  53815. }, 8, [
  53816. "data",
  53817. "option-render",
  53818. "placeholder",
  53819. "filterable",
  53820. "format",
  53821. "filter-method",
  53822. "title",
  53823. "default-checked",
  53824. "props",
  53825. "onCheckedChange"
  53826. ])
  53827. ], 2);
  53828. };
  53829. }
  53830. }));
  53831. //#endregion
  53832. //#region node_modules/element-plus/es/components/tree/src/tokens.mjs
  53833. var ROOT_TREE_INJECTION_KEY = "RootTree";
  53834. var NODE_INSTANCE_INJECTION_KEY = "NodeInstance";
  53835. var TREE_NODE_MAP_INJECTION_KEY = "TreeNodeMap";
  53836. //#endregion
  53837. //#region node_modules/element-plus/es/components/tree/src/tree.mjs
  53838. var treeProps = buildProps({
  53839. data: {
  53840. type: definePropType(Array),
  53841. default: () => []
  53842. },
  53843. emptyText: { type: String },
  53844. renderAfterExpand: {
  53845. type: Boolean,
  53846. default: true
  53847. },
  53848. nodeKey: String,
  53849. checkStrictly: Boolean,
  53850. defaultExpandAll: Boolean,
  53851. expandOnClickNode: {
  53852. type: Boolean,
  53853. default: true
  53854. },
  53855. checkOnClickNode: Boolean,
  53856. checkOnClickLeaf: {
  53857. type: Boolean,
  53858. default: true
  53859. },
  53860. checkDescendants: Boolean,
  53861. autoExpandParent: {
  53862. type: Boolean,
  53863. default: true
  53864. },
  53865. defaultCheckedKeys: { type: Array },
  53866. defaultExpandedKeys: { type: Array },
  53867. currentNodeKey: { type: [String, Number] },
  53868. renderContent: { type: definePropType(Function) },
  53869. showCheckbox: Boolean,
  53870. draggable: Boolean,
  53871. allowDrag: { type: definePropType(Function) },
  53872. allowDrop: { type: definePropType(Function) },
  53873. props: {
  53874. type: Object,
  53875. default: () => ({
  53876. children: "children",
  53877. label: "label",
  53878. disabled: "disabled"
  53879. })
  53880. },
  53881. lazy: Boolean,
  53882. highlightCurrent: Boolean,
  53883. load: { type: Function },
  53884. filterNodeMethod: { type: Function },
  53885. accordion: Boolean,
  53886. indent: {
  53887. type: Number,
  53888. default: 18
  53889. },
  53890. icon: { type: iconPropType }
  53891. });
  53892. var treeEmits = {
  53893. "check-change": (data, checked, indeterminate) => data && isBoolean(checked) && isBoolean(indeterminate),
  53894. "current-change": (data, node) => true,
  53895. "node-click": (data, node, nodeInstance, evt) => data && node && evt instanceof Event,
  53896. "node-contextmenu": (evt, data, node, nodeInstance) => evt instanceof Event && data && node,
  53897. "node-collapse": (data, node, nodeInstance) => data && node,
  53898. "node-expand": (data, node, nodeInstance) => data && node,
  53899. check: (data, checkedInfo) => data && checkedInfo,
  53900. "node-drag-start": (node, evt) => node && evt,
  53901. "node-drag-end": (draggingNode, dropNode, dropType, evt) => draggingNode && evt,
  53902. "node-drop": (draggingNode, dropNode, dropType, evt) => draggingNode && dropNode && evt,
  53903. "node-drag-leave": (draggingNode, oldDropNode, evt) => draggingNode && oldDropNode && evt,
  53904. "node-drag-enter": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt,
  53905. "node-drag-over": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt
  53906. };
  53907. //#endregion
  53908. //#region node_modules/element-plus/es/components/tree/src/model/util.mjs
  53909. var NODE_KEY = "$treeNodeId";
  53910. var markNodeData = function(node, data) {
  53911. if (!data || data["$treeNodeId"]) return;
  53912. Object.defineProperty(data, NODE_KEY, {
  53913. value: node.id,
  53914. enumerable: false,
  53915. configurable: false,
  53916. writable: false
  53917. });
  53918. };
  53919. var getNodeKey = (key, data) => data?.[key || "$treeNodeId"];
  53920. var handleCurrentChange = (store, emit, setCurrent) => {
  53921. const preCurrentNode = store.value.currentNode;
  53922. setCurrent();
  53923. const currentNode = store.value.currentNode;
  53924. if (preCurrentNode === currentNode) return;
  53925. emit("current-change", currentNode ? currentNode.data : null, currentNode);
  53926. };
  53927. //#endregion
  53928. //#region node_modules/element-plus/es/components/tree/src/model/node.mjs
  53929. var getChildState = (node) => {
  53930. let all = true;
  53931. let none = true;
  53932. let allWithoutDisable = true;
  53933. let isEffectivelyChecked = true;
  53934. for (let i = 0, j = node.length; i < j; i++) {
  53935. const n = node[i];
  53936. if (n.checked !== true || n.indeterminate) {
  53937. all = false;
  53938. if (!n.disabled) allWithoutDisable = false;
  53939. }
  53940. if (n.checked !== false || n.indeterminate) none = false;
  53941. if (!n.isEffectivelyChecked) isEffectivelyChecked = false;
  53942. }
  53943. return {
  53944. all,
  53945. none,
  53946. allWithoutDisable,
  53947. half: !all && !none,
  53948. isEffectivelyChecked
  53949. };
  53950. };
  53951. var reInitChecked = function(node) {
  53952. if (node.childNodes.length === 0 || node.loading) {
  53953. node.isEffectivelyChecked = node.disabled || node.checked;
  53954. return;
  53955. }
  53956. const { all, none, half, isEffectivelyChecked } = getChildState(node.childNodes);
  53957. node.isEffectivelyChecked = isEffectivelyChecked;
  53958. if (all) {
  53959. node.checked = true;
  53960. node.indeterminate = false;
  53961. } else if (half) {
  53962. node.checked = false;
  53963. node.indeterminate = true;
  53964. } else if (none) {
  53965. node.checked = false;
  53966. node.indeterminate = false;
  53967. }
  53968. const parent = node.parent;
  53969. if (!parent || parent.level === 0) return;
  53970. if (!node.store.checkStrictly) reInitChecked(parent);
  53971. };
  53972. var getPropertyFromData = function(node, prop) {
  53973. const props = node.store.props;
  53974. const data = node.data || {};
  53975. const config = props[prop];
  53976. if (isFunction$1(config)) return config(data, node);
  53977. else if (isString(config)) return data[config];
  53978. else if (isUndefined(config)) {
  53979. const dataProp = data[prop];
  53980. return isUndefined(dataProp) ? "" : dataProp;
  53981. }
  53982. };
  53983. var setCanFocus = function(childNodes, focus) {
  53984. childNodes.forEach((item) => {
  53985. item.canFocus = focus;
  53986. setCanFocus(item.childNodes, focus);
  53987. });
  53988. };
  53989. var nodeIdSeed = 0;
  53990. var Node$1 = class Node {
  53991. constructor(options) {
  53992. this.isLeafByUser = void 0;
  53993. this.isLeaf = void 0;
  53994. this.isEffectivelyChecked = false;
  53995. this.id = nodeIdSeed++;
  53996. this.text = null;
  53997. this.checked = false;
  53998. this.indeterminate = false;
  53999. this.data = null;
  54000. this.expanded = false;
  54001. this.parent = null;
  54002. this.visible = true;
  54003. this.isCurrent = false;
  54004. this.canFocus = false;
  54005. for (const name in options) if (hasOwn(options, name)) this[name] = options[name];
  54006. this.level = 0;
  54007. this.loaded = false;
  54008. this.childNodes = [];
  54009. this.loading = false;
  54010. if (this.parent) this.level = this.parent.level + 1;
  54011. }
  54012. initialize() {
  54013. const store = this.store;
  54014. if (!store) throw new Error("[Node]store is required!");
  54015. store.registerNode(this);
  54016. const props = store.props;
  54017. if (props && typeof props.isLeaf !== "undefined") {
  54018. const isLeaf = getPropertyFromData(this, "isLeaf");
  54019. if (isBoolean(isLeaf)) this.isLeafByUser = isLeaf;
  54020. }
  54021. if (store.lazy !== true && this.data) {
  54022. this.setData(this.data);
  54023. if (store.defaultExpandAll) {
  54024. this.expanded = true;
  54025. this.canFocus = true;
  54026. }
  54027. } else if (this.level > 0 && store.lazy && store.defaultExpandAll && !this.isLeafByUser) this.expand();
  54028. if (!isArray$1(this.data)) markNodeData(this, this.data);
  54029. if (!this.data) return;
  54030. const defaultExpandedKeys = store.defaultExpandedKeys;
  54031. const key = store.key;
  54032. if (key && !isNil(this.key) && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) this.expand(null, store.autoExpandParent);
  54033. if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {
  54034. store.currentNode && (store.currentNode.isCurrent = false);
  54035. store.currentNode = this;
  54036. store.currentNode.isCurrent = true;
  54037. }
  54038. if (store.lazy) store._initDefaultCheckedNode(this);
  54039. this.updateLeafState();
  54040. if (this.level === 1 || this.parent?.expanded === true) this.canFocus = true;
  54041. }
  54042. setData(data) {
  54043. if (!isArray$1(data)) markNodeData(this, data);
  54044. this.data = data;
  54045. this.childNodes = [];
  54046. let children;
  54047. if (this.level === 0 && isArray$1(this.data)) children = this.data;
  54048. else children = getPropertyFromData(this, "children") || [];
  54049. for (let i = 0, j = children.length; i < j; i++) this.insertChild({ data: children[i] });
  54050. }
  54051. get label() {
  54052. return getPropertyFromData(this, "label");
  54053. }
  54054. get key() {
  54055. const nodeKey = this.store.key;
  54056. if (this.data) return this.data[nodeKey];
  54057. return null;
  54058. }
  54059. get disabled() {
  54060. return getPropertyFromData(this, "disabled");
  54061. }
  54062. get nextSibling() {
  54063. const parent = this.parent;
  54064. if (parent) {
  54065. const index = parent.childNodes.indexOf(this);
  54066. if (index > -1) return parent.childNodes[index + 1];
  54067. }
  54068. return null;
  54069. }
  54070. get previousSibling() {
  54071. const parent = this.parent;
  54072. if (parent) {
  54073. const index = parent.childNodes.indexOf(this);
  54074. if (index > -1) return index > 0 ? parent.childNodes[index - 1] : null;
  54075. }
  54076. return null;
  54077. }
  54078. contains(target, deep = true) {
  54079. return (this.childNodes || []).some((child) => child === target || deep && child.contains(target));
  54080. }
  54081. remove() {
  54082. const parent = this.parent;
  54083. if (parent) parent.removeChild(this);
  54084. }
  54085. insertChild(child, index, batch) {
  54086. if (!child) throw new Error("InsertChild error: child is required.");
  54087. if (!(child instanceof Node)) {
  54088. if (!batch) {
  54089. const children = this.getChildren(true);
  54090. if (!children?.includes(child.data)) if (isUndefined(index) || index < 0) children?.push(child.data);
  54091. else children?.splice(index, 0, child.data);
  54092. }
  54093. Object.assign(child, {
  54094. parent: this,
  54095. store: this.store
  54096. });
  54097. child = reactive(new Node(child));
  54098. if (child instanceof Node) child.initialize();
  54099. }
  54100. child.level = this.level + 1;
  54101. if (isUndefined(index) || index < 0) this.childNodes.push(child);
  54102. else this.childNodes.splice(index, 0, child);
  54103. this.updateLeafState();
  54104. }
  54105. insertBefore(child, ref) {
  54106. let index;
  54107. if (ref) index = this.childNodes.indexOf(ref);
  54108. this.insertChild(child, index);
  54109. }
  54110. insertAfter(child, ref) {
  54111. let index;
  54112. if (ref) {
  54113. index = this.childNodes.indexOf(ref);
  54114. if (index !== -1) index += 1;
  54115. }
  54116. this.insertChild(child, index);
  54117. }
  54118. removeChild(child) {
  54119. const children = this.getChildren() || [];
  54120. const dataIndex = children.indexOf(child.data);
  54121. if (dataIndex > -1) children.splice(dataIndex, 1);
  54122. const index = this.childNodes.indexOf(child);
  54123. if (index > -1) {
  54124. this.store && this.store.deregisterNode(child);
  54125. child.parent = null;
  54126. this.childNodes.splice(index, 1);
  54127. }
  54128. this.updateLeafState();
  54129. }
  54130. removeChildByData(data) {
  54131. const targetNode = this.childNodes.find((child) => child.data === data);
  54132. if (targetNode) this.removeChild(targetNode);
  54133. }
  54134. expand(callback, expandParent) {
  54135. const done = () => {
  54136. if (expandParent) {
  54137. let parent = this.parent;
  54138. while (parent && parent.level > 0) {
  54139. parent.expanded = true;
  54140. parent = parent.parent;
  54141. }
  54142. }
  54143. this.expanded = true;
  54144. if (callback) callback();
  54145. setCanFocus(this.childNodes, true);
  54146. };
  54147. if (this.shouldLoadData()) this.loadData((data) => {
  54148. if (isArray$1(data)) {
  54149. if (!this.store.checkStrictly) if (this.checked) this.setChecked(true, true);
  54150. else reInitChecked(this);
  54151. done();
  54152. }
  54153. });
  54154. else done();
  54155. }
  54156. doCreateChildren(array, defaultProps = {}) {
  54157. array.forEach((item) => {
  54158. this.insertChild(Object.assign({ data: item }, defaultProps), void 0, true);
  54159. });
  54160. }
  54161. collapse() {
  54162. this.expanded = false;
  54163. setCanFocus(this.childNodes, false);
  54164. }
  54165. shouldLoadData() {
  54166. return Boolean(this.store.lazy === true && this.store.load && !this.loaded);
  54167. }
  54168. updateLeafState() {
  54169. if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") {
  54170. this.isLeaf = this.isLeafByUser;
  54171. this.isEffectivelyChecked = this.isLeaf && this.disabled;
  54172. return;
  54173. }
  54174. const childNodes = this.childNodes;
  54175. if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
  54176. this.isLeaf = !childNodes || childNodes.length === 0;
  54177. this.isEffectivelyChecked = this.isLeaf && this.disabled;
  54178. return;
  54179. }
  54180. this.isLeaf = false;
  54181. }
  54182. setChecked(value, deep, recursion, passValue) {
  54183. this.indeterminate = value === "half";
  54184. this.checked = value === true;
  54185. this.isEffectivelyChecked = !this.childNodes.length && (this.disabled || this.checked);
  54186. if (this.store.checkStrictly && !deep) return;
  54187. if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
  54188. const handleDescendants = () => {
  54189. if (deep) {
  54190. const childNodes = this.childNodes;
  54191. for (let i = 0, j = childNodes.length; i < j; i++) {
  54192. const child = childNodes[i];
  54193. passValue = passValue || value !== false;
  54194. const isCheck = child.disabled && child.isLeaf ? child.checked : passValue;
  54195. child.setChecked(isCheck, deep, true, passValue);
  54196. }
  54197. const { half, all, isEffectivelyChecked } = getChildState(childNodes);
  54198. if (!all) {
  54199. this.checked = all;
  54200. this.indeterminate = half;
  54201. }
  54202. this.isEffectivelyChecked = !this.childNodes.length ? this.disabled || this.checked : isEffectivelyChecked;
  54203. }
  54204. };
  54205. if (this.shouldLoadData()) {
  54206. this.loadData(() => {
  54207. handleDescendants();
  54208. reInitChecked(this);
  54209. }, { checked: value !== false });
  54210. return;
  54211. } else handleDescendants();
  54212. }
  54213. const parent = this.parent;
  54214. if (!parent || parent.level === 0) return;
  54215. if (!recursion && !this.store.checkStrictly) reInitChecked(parent);
  54216. }
  54217. getChildren(forceInit = false) {
  54218. if (this.level === 0) return this.data;
  54219. const data = this.data;
  54220. if (!data) return null;
  54221. const props = this.store.props;
  54222. let children = "children";
  54223. if (props) children = props.children || "children";
  54224. if (isUndefined(data[children])) data[children] = null;
  54225. if (forceInit && !data[children]) data[children] = [];
  54226. return data[children];
  54227. }
  54228. updateChildren() {
  54229. const newData = this.getChildren() || [];
  54230. const oldData = this.childNodes.map((node) => node.data);
  54231. const newDataMap = {};
  54232. const newNodes = [];
  54233. newData.forEach((item, index) => {
  54234. const key = item[NODE_KEY];
  54235. if (!!key && oldData.some((data) => data?.["$treeNodeId"] === key)) newDataMap[key] = {
  54236. index,
  54237. data: item
  54238. };
  54239. else newNodes.push({
  54240. index,
  54241. data: item
  54242. });
  54243. });
  54244. if (!this.store.lazy) oldData.forEach((item) => {
  54245. if (!newDataMap[item?.["$treeNodeId"]]) this.removeChildByData(item);
  54246. });
  54247. newNodes.forEach(({ index, data }) => {
  54248. this.insertChild({ data }, index);
  54249. });
  54250. this.updateLeafState();
  54251. }
  54252. loadData(callback, defaultProps = {}) {
  54253. if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
  54254. this.loading = true;
  54255. const resolve = (children) => {
  54256. this.childNodes = [];
  54257. this.doCreateChildren(children, defaultProps);
  54258. this.loaded = true;
  54259. this.loading = false;
  54260. this.updateLeafState();
  54261. if (callback) callback.call(this, children);
  54262. };
  54263. const reject = () => {
  54264. this.loading = false;
  54265. };
  54266. this.store.load(this, resolve, reject);
  54267. } else if (callback) callback.call(this);
  54268. }
  54269. eachNode(callback) {
  54270. const arr = [this];
  54271. while (arr.length) {
  54272. const node = arr.shift();
  54273. arr.unshift(...node.childNodes);
  54274. callback(node);
  54275. }
  54276. }
  54277. reInitChecked() {
  54278. if (this.store.checkStrictly) return;
  54279. reInitChecked(this);
  54280. }
  54281. };
  54282. //#endregion
  54283. //#region node_modules/element-plus/es/components/tree/src/model/tree-store.mjs
  54284. var TreeStore = class {
  54285. constructor(options) {
  54286. this.lazy = false;
  54287. this.checkStrictly = false;
  54288. this.autoExpandParent = false;
  54289. this.defaultExpandAll = false;
  54290. this.checkDescendants = false;
  54291. this.currentNode = null;
  54292. this.currentNodeKey = null;
  54293. for (const option in options) if (hasOwn(options, option)) this[option] = options[option];
  54294. this.nodesMap = {};
  54295. }
  54296. initialize() {
  54297. this.root = new Node$1({
  54298. data: this.data,
  54299. store: this
  54300. });
  54301. this.root.initialize();
  54302. if (this.lazy && this.load) {
  54303. const loadFn = this.load;
  54304. loadFn(this.root, (data) => {
  54305. this.root.doCreateChildren(data);
  54306. this._initDefaultCheckedNodes();
  54307. }, NOOP);
  54308. } else this._initDefaultCheckedNodes();
  54309. }
  54310. filter(value) {
  54311. const filterNodeMethod = this.filterNodeMethod;
  54312. const lazy = this.lazy;
  54313. const traverse = async function(node) {
  54314. const childNodes = node.root ? node.root.childNodes : node.childNodes;
  54315. for (const [index, child] of childNodes.entries()) {
  54316. child.visible = !!filterNodeMethod?.call(child, value, child.data, child);
  54317. if (index % 80 === 0 && index > 0) await nextTick();
  54318. await traverse(child);
  54319. }
  54320. if (!node.visible && childNodes.length) {
  54321. let allHidden = true;
  54322. allHidden = !childNodes.some((child) => child.visible);
  54323. if (node.root) node.root.visible = allHidden === false;
  54324. else node.visible = allHidden === false;
  54325. }
  54326. if (!value) return;
  54327. if (node.visible && !node.isLeaf) {
  54328. if (!lazy || node.loaded) node.expand();
  54329. }
  54330. };
  54331. traverse(this);
  54332. }
  54333. setData(newVal) {
  54334. if (newVal !== this.root.data) {
  54335. this.nodesMap = {};
  54336. this.root.setData(newVal);
  54337. this._initDefaultCheckedNodes();
  54338. this.setCurrentNodeKey(this.currentNodeKey);
  54339. } else this.root.updateChildren();
  54340. }
  54341. getNode(data) {
  54342. if (data instanceof Node$1) return data;
  54343. const key = isObject$2(data) ? getNodeKey(this.key, data) : data;
  54344. return this.nodesMap[key] || null;
  54345. }
  54346. insertBefore(data, refData) {
  54347. const refNode = this.getNode(refData);
  54348. refNode.parent?.insertBefore({ data }, refNode);
  54349. }
  54350. insertAfter(data, refData) {
  54351. const refNode = this.getNode(refData);
  54352. refNode.parent?.insertAfter({ data }, refNode);
  54353. }
  54354. remove(data) {
  54355. const node = this.getNode(data);
  54356. if (node && node.parent) {
  54357. if (node === this.currentNode) this.currentNode = null;
  54358. node.parent.removeChild(node);
  54359. }
  54360. }
  54361. append(data, parentData) {
  54362. const parentNode = !isPropAbsent(parentData) ? this.getNode(parentData) : this.root;
  54363. if (parentNode) parentNode.insertChild({ data });
  54364. }
  54365. _initDefaultCheckedNodes() {
  54366. const defaultCheckedKeys = this.defaultCheckedKeys || [];
  54367. const nodesMap = this.nodesMap;
  54368. defaultCheckedKeys.forEach((checkedKey) => {
  54369. const node = nodesMap[checkedKey];
  54370. if (node) node.setChecked(true, !this.checkStrictly);
  54371. });
  54372. }
  54373. _initDefaultCheckedNode(node) {
  54374. const defaultCheckedKeys = this.defaultCheckedKeys || [];
  54375. if (!isNil(node.key) && defaultCheckedKeys.includes(node.key)) node.setChecked(true, !this.checkStrictly);
  54376. }
  54377. setDefaultCheckedKey(newVal) {
  54378. if (newVal !== this.defaultCheckedKeys) {
  54379. this.defaultCheckedKeys = newVal;
  54380. this._initDefaultCheckedNodes();
  54381. }
  54382. }
  54383. registerNode(node) {
  54384. const key = this.key;
  54385. if (!node || !node.data) return;
  54386. if (!key) this.nodesMap[node.id] = node;
  54387. else {
  54388. const nodeKey = node.key;
  54389. if (!isNil(nodeKey)) this.nodesMap[nodeKey] = node;
  54390. }
  54391. }
  54392. deregisterNode(node) {
  54393. if (!this.key || !node || !node.data) return;
  54394. node.childNodes.forEach((child) => {
  54395. this.deregisterNode(child);
  54396. });
  54397. delete this.nodesMap[node.key];
  54398. }
  54399. getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
  54400. const checkedNodes = [];
  54401. const traverse = function(node) {
  54402. (node.root ? node.root.childNodes : node.childNodes).forEach((child) => {
  54403. if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) checkedNodes.push(child.data);
  54404. traverse(child);
  54405. });
  54406. };
  54407. traverse(this);
  54408. return checkedNodes;
  54409. }
  54410. getCheckedKeys(leafOnly = false) {
  54411. return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
  54412. }
  54413. getHalfCheckedNodes() {
  54414. const nodes = [];
  54415. const traverse = function(node) {
  54416. (node.root ? node.root.childNodes : node.childNodes).forEach((child) => {
  54417. if (child.indeterminate) nodes.push(child.data);
  54418. traverse(child);
  54419. });
  54420. };
  54421. traverse(this);
  54422. return nodes;
  54423. }
  54424. getHalfCheckedKeys() {
  54425. return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
  54426. }
  54427. _getAllNodes() {
  54428. const allNodes = [];
  54429. const nodesMap = this.nodesMap;
  54430. for (const nodeKey in nodesMap) if (hasOwn(nodesMap, nodeKey)) allNodes.push(nodesMap[nodeKey]);
  54431. return allNodes;
  54432. }
  54433. updateChildren(key, data) {
  54434. const node = this.nodesMap[key];
  54435. if (!node) return;
  54436. const childNodes = node.childNodes;
  54437. for (let i = childNodes.length - 1; i >= 0; i--) {
  54438. const child = childNodes[i];
  54439. this.remove(child.data);
  54440. }
  54441. for (let i = 0, j = data.length; i < j; i++) {
  54442. const child = data[i];
  54443. this.append(child, node.data);
  54444. }
  54445. }
  54446. _setCheckedKeys(key, leafOnly = false, checkedKeys) {
  54447. const allNodes = this._getAllNodes().sort((a, b) => a.level - b.level);
  54448. const cache = Object.create(null);
  54449. const keys = Object.keys(checkedKeys);
  54450. allNodes.forEach((node) => node.setChecked(false, false));
  54451. const cacheCheckedChild = (node) => {
  54452. node.childNodes.forEach((child) => {
  54453. cache[child.data[key]] = true;
  54454. if (child.childNodes?.length) cacheCheckedChild(child);
  54455. });
  54456. };
  54457. for (let i = 0, j = allNodes.length; i < j; i++) {
  54458. const node = allNodes[i];
  54459. const nodeKey = node.data[key].toString();
  54460. if (!keys.includes(nodeKey)) {
  54461. if (node.checked && !cache[nodeKey]) node.setChecked(false, false);
  54462. continue;
  54463. }
  54464. if (node.childNodes.length) cacheCheckedChild(node);
  54465. if (node.isLeaf || this.checkStrictly) {
  54466. node.setChecked(true, false);
  54467. continue;
  54468. }
  54469. node.setChecked(true, true);
  54470. if (leafOnly) {
  54471. node.setChecked(false, false, true);
  54472. const traverse = function(node) {
  54473. node.childNodes.forEach((child) => {
  54474. if (!child.isLeaf) child.setChecked(false, false, true);
  54475. traverse(child);
  54476. });
  54477. node.reInitChecked();
  54478. };
  54479. traverse(node);
  54480. }
  54481. }
  54482. }
  54483. setCheckedNodes(array, leafOnly = false) {
  54484. const key = this.key;
  54485. const checkedKeys = {};
  54486. array.forEach((item) => {
  54487. checkedKeys[(item || {})[key]] = true;
  54488. });
  54489. this._setCheckedKeys(key, leafOnly, checkedKeys);
  54490. }
  54491. setCheckedKeys(keys, leafOnly = false) {
  54492. this.defaultCheckedKeys = keys;
  54493. const key = this.key;
  54494. const checkedKeys = {};
  54495. keys.forEach((key) => {
  54496. checkedKeys[key] = true;
  54497. });
  54498. this._setCheckedKeys(key, leafOnly, checkedKeys);
  54499. }
  54500. setDefaultExpandedKeys(keys) {
  54501. keys = keys || [];
  54502. this.defaultExpandedKeys = keys;
  54503. keys.forEach((key) => {
  54504. const node = this.getNode(key);
  54505. if (node) node.expand(null, this.autoExpandParent);
  54506. });
  54507. }
  54508. setChecked(data, checked, deep) {
  54509. const node = this.getNode(data);
  54510. if (node) node.setChecked(!!checked, deep);
  54511. }
  54512. getCurrentNode() {
  54513. return this.currentNode;
  54514. }
  54515. setCurrentNode(currentNode) {
  54516. const prevCurrentNode = this.currentNode;
  54517. if (prevCurrentNode) prevCurrentNode.isCurrent = false;
  54518. this.currentNode = currentNode;
  54519. this.currentNode.isCurrent = true;
  54520. }
  54521. setUserCurrentNode(node, shouldAutoExpandParent = true) {
  54522. const key = node[this.key];
  54523. const currNode = this.nodesMap[key];
  54524. this.setCurrentNode(currNode);
  54525. if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) this.currentNode.parent?.expand(null, true);
  54526. }
  54527. setCurrentNodeKey(key, shouldAutoExpandParent = true) {
  54528. this.currentNodeKey = key;
  54529. if (isPropAbsent(key)) {
  54530. this.currentNode && (this.currentNode.isCurrent = false);
  54531. this.currentNode = null;
  54532. return;
  54533. }
  54534. const node = this.getNode(key);
  54535. if (node) {
  54536. this.setCurrentNode(node);
  54537. if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) this.currentNode.parent?.expand(null, true);
  54538. }
  54539. }
  54540. };
  54541. //#endregion
  54542. //#region node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs
  54543. function useNodeExpandEventBroadcast(props) {
  54544. const parentNodeMap = inject(TREE_NODE_MAP_INJECTION_KEY, null);
  54545. let currentNodeMap = {
  54546. treeNodeExpand: (node) => {
  54547. if (props.node !== node) props.node?.collapse();
  54548. },
  54549. children: /* @__PURE__ */ new Set()
  54550. };
  54551. if (parentNodeMap) parentNodeMap.children.add(currentNodeMap);
  54552. onBeforeUnmount(() => {
  54553. if (parentNodeMap) parentNodeMap.children.delete(currentNodeMap);
  54554. currentNodeMap = null;
  54555. });
  54556. provide(TREE_NODE_MAP_INJECTION_KEY, currentNodeMap);
  54557. return { broadcastExpanded: (node) => {
  54558. if (!props.accordion) return;
  54559. for (const childNode of currentNodeMap.children) childNode.treeNodeExpand(node);
  54560. } };
  54561. }
  54562. //#endregion
  54563. //#region node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs
  54564. var dragEventsKey = Symbol("dragEvents");
  54565. function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
  54566. const ns = useNamespace("tree");
  54567. const dragState = ref({
  54568. showDropIndicator: false,
  54569. draggingNode: null,
  54570. dropNode: null,
  54571. allowDrop: true,
  54572. dropType: null
  54573. });
  54574. const treeNodeDragStart = ({ event, treeNode }) => {
  54575. if (!event.dataTransfer) return;
  54576. if (isFunction$1(props.allowDrag) && !props.allowDrag(treeNode.node)) {
  54577. event.preventDefault();
  54578. return false;
  54579. }
  54580. event.dataTransfer.effectAllowed = "move";
  54581. try {
  54582. event.dataTransfer.setData("text/plain", "");
  54583. } catch {}
  54584. dragState.value.draggingNode = treeNode;
  54585. ctx.emit("node-drag-start", treeNode.node, event);
  54586. };
  54587. const treeNodeDragOver = ({ event, treeNode }) => {
  54588. if (!event.dataTransfer) return;
  54589. const dropNode = treeNode;
  54590. const oldDropNode = dragState.value.dropNode;
  54591. if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) removeClass(oldDropNode.$el, ns.is("drop-inner"));
  54592. const draggingNode = dragState.value.draggingNode;
  54593. if (!draggingNode || !dropNode) return;
  54594. let dropPrev = true;
  54595. let dropInner = true;
  54596. let dropNext = true;
  54597. let userAllowDropInner = true;
  54598. if (isFunction$1(props.allowDrop)) {
  54599. dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev");
  54600. userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner");
  54601. dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
  54602. }
  54603. event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
  54604. if ((dropPrev || dropInner || dropNext) && oldDropNode?.node.id !== dropNode.node.id) {
  54605. if (oldDropNode) ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
  54606. ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event);
  54607. }
  54608. if (dropPrev || dropInner || dropNext) dragState.value.dropNode = dropNode;
  54609. else dragState.value.dropNode = null;
  54610. if (dropNode.node.nextSibling === draggingNode.node) dropNext = false;
  54611. if (dropNode.node.previousSibling === draggingNode.node) dropPrev = false;
  54612. if (dropNode.node.contains(draggingNode.node, false)) dropInner = false;
  54613. if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
  54614. dropPrev = false;
  54615. dropInner = false;
  54616. dropNext = false;
  54617. }
  54618. const dropEl = dropNode.$el;
  54619. const targetPosition = dropEl.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect();
  54620. const treePosition = el$.value.getBoundingClientRect();
  54621. const treeScrollTop = el$.value.scrollTop;
  54622. let dropType;
  54623. const prevPercent = dropPrev ? dropInner ? .25 : dropNext ? .45 : 1 : Number.NEGATIVE_INFINITY;
  54624. const nextPercent = dropNext ? dropInner ? .75 : dropPrev ? .55 : 0 : Number.POSITIVE_INFINITY;
  54625. let indicatorTop = -9999;
  54626. const distance = event.clientY - targetPosition.top;
  54627. if (distance < targetPosition.height * prevPercent) dropType = "before";
  54628. else if (distance > targetPosition.height * nextPercent) dropType = "after";
  54629. else if (dropInner) dropType = "inner";
  54630. else dropType = "none";
  54631. const iconPosition = dropEl.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect();
  54632. const dropIndicator = dropIndicator$.value;
  54633. if (dropType === "before") indicatorTop = iconPosition.top - treePosition.top + treeScrollTop;
  54634. else if (dropType === "after") indicatorTop = iconPosition.bottom - treePosition.top + treeScrollTop;
  54635. dropIndicator.style.top = `${indicatorTop}px`;
  54636. dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`;
  54637. if (dropType === "inner") addClass(dropEl, ns.is("drop-inner"));
  54638. else removeClass(dropEl, ns.is("drop-inner"));
  54639. dragState.value.showDropIndicator = dropType === "before" || dropType === "after";
  54640. dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;
  54641. dragState.value.dropType = dropType;
  54642. ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event);
  54643. };
  54644. const treeNodeDragEnd = (event) => {
  54645. const { draggingNode, dropType, dropNode } = dragState.value;
  54646. event.preventDefault();
  54647. if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
  54648. if (draggingNode?.node.data && dropNode) {
  54649. const draggingNodeCopy = { data: draggingNode.node.data };
  54650. if (dropType !== "none") draggingNode.node.remove();
  54651. if (dropType === "before") dropNode.node.parent?.insertBefore(draggingNodeCopy, dropNode.node);
  54652. else if (dropType === "after") dropNode.node.parent?.insertAfter(draggingNodeCopy, dropNode.node);
  54653. else if (dropType === "inner") dropNode.node.insertChild(draggingNodeCopy);
  54654. if (dropType !== "none") {
  54655. store.value.registerNode(draggingNodeCopy);
  54656. if (store.value.key) draggingNode.node.eachNode((node) => {
  54657. store.value.nodesMap[node.data[store.value.key]]?.setChecked(node.checked, !store.value.checkStrictly);
  54658. });
  54659. }
  54660. removeClass(dropNode.$el, ns.is("drop-inner"));
  54661. ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event);
  54662. if (dropType !== "none") ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event);
  54663. }
  54664. if (draggingNode && !dropNode) ctx.emit("node-drag-end", draggingNode.node, null, dropType, event);
  54665. dragState.value.showDropIndicator = false;
  54666. dragState.value.draggingNode = null;
  54667. dragState.value.dropNode = null;
  54668. dragState.value.allowDrop = true;
  54669. };
  54670. provide(dragEventsKey, {
  54671. treeNodeDragStart,
  54672. treeNodeDragOver,
  54673. treeNodeDragEnd
  54674. });
  54675. return { dragState };
  54676. }
  54677. //#endregion
  54678. //#region node_modules/element-plus/es/components/tree/src/tree-node.vue_vue_type_script_lang.mjs
  54679. var tree_node_vue_vue_type_script_lang_default = defineComponent({
  54680. name: "ElTreeNode",
  54681. components: {
  54682. ElCollapseTransition,
  54683. ElCheckbox,
  54684. NodeContent: defineComponent({
  54685. name: "ElTreeNodeContent",
  54686. props: {
  54687. node: {
  54688. type: Object,
  54689. required: true
  54690. },
  54691. renderContent: Function
  54692. },
  54693. setup(props) {
  54694. const ns = useNamespace("tree");
  54695. const nodeInstance = inject(NODE_INSTANCE_INJECTION_KEY);
  54696. const tree = inject(ROOT_TREE_INJECTION_KEY);
  54697. return () => {
  54698. const node = props.node;
  54699. const { data, store } = node;
  54700. return props.renderContent ? props.renderContent(h$1, {
  54701. _self: nodeInstance,
  54702. node,
  54703. data,
  54704. store
  54705. }) : renderSlot(tree.ctx.slots, "default", {
  54706. node,
  54707. data
  54708. }, () => [h$1(ElText, {
  54709. tag: "span",
  54710. truncated: true,
  54711. class: ns.be("node", "label")
  54712. }, () => [node.label])]);
  54713. };
  54714. }
  54715. }),
  54716. ElIcon,
  54717. Loading: loading_default
  54718. },
  54719. props: {
  54720. node: {
  54721. type: Node$1,
  54722. default: () => ({})
  54723. },
  54724. props: {
  54725. type: Object,
  54726. default: () => ({})
  54727. },
  54728. accordion: Boolean,
  54729. renderContent: Function,
  54730. renderAfterExpand: Boolean,
  54731. showCheckbox: Boolean
  54732. },
  54733. emits: ["node-expand"],
  54734. setup(props, ctx) {
  54735. const ns = useNamespace("tree");
  54736. const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
  54737. const tree = inject(ROOT_TREE_INJECTION_KEY);
  54738. const expanded = ref(false);
  54739. const childNodeRendered = ref(false);
  54740. const oldChecked = ref();
  54741. const oldIndeterminate = ref();
  54742. const node$ = ref();
  54743. const dragEvents = inject(dragEventsKey);
  54744. const instance = getCurrentInstance();
  54745. provide(NODE_INSTANCE_INJECTION_KEY, instance);
  54746. if (!tree) debugWarn("Tree", "Can not find node's tree.");
  54747. if (props.node.expanded) {
  54748. expanded.value = true;
  54749. childNodeRendered.value = true;
  54750. }
  54751. const childrenKey = tree.props.props["children"] || "children";
  54752. watch(() => {
  54753. const children = props.node.data?.[childrenKey];
  54754. return children && [...children];
  54755. }, () => {
  54756. props.node.updateChildren();
  54757. });
  54758. watch(() => props.node.indeterminate, (val) => {
  54759. handleSelectChange(props.node.checked, val);
  54760. });
  54761. watch(() => props.node.checked, (val) => {
  54762. handleSelectChange(val, props.node.indeterminate);
  54763. });
  54764. watch(() => props.node.childNodes.length, () => props.node.reInitChecked());
  54765. watch(() => props.node.expanded, (val) => {
  54766. nextTick(() => expanded.value = val);
  54767. if (val) childNodeRendered.value = true;
  54768. });
  54769. const getNodeKey$1 = (node) => {
  54770. return tree.props.nodeKey ? getNodeKey(tree.props.nodeKey, node.data) : node.id;
  54771. };
  54772. const getNodeClass = (node) => {
  54773. const nodeClassFunc = props.props.class;
  54774. if (!nodeClassFunc) return {};
  54775. let className;
  54776. if (isFunction$1(nodeClassFunc)) {
  54777. const { data } = node;
  54778. className = nodeClassFunc(data, node);
  54779. } else className = nodeClassFunc;
  54780. if (isString(className)) return { [className]: true };
  54781. else return className;
  54782. };
  54783. const handleSelectChange = (checked, indeterminate) => {
  54784. if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) tree.ctx.emit("check-change", props.node.data, checked, indeterminate);
  54785. oldChecked.value = checked;
  54786. oldIndeterminate.value = indeterminate;
  54787. };
  54788. const handleClick = (e) => {
  54789. handleCurrentChange(tree.store, tree.ctx.emit, () => {
  54790. if (tree?.props?.nodeKey) {
  54791. const curNodeKey = getNodeKey$1(props.node);
  54792. tree.store.value.setCurrentNodeKey(curNodeKey);
  54793. } else tree.store.value.setCurrentNode(props.node);
  54794. });
  54795. tree.currentNode.value = props.node;
  54796. if (tree.props.expandOnClickNode) handleExpandIconClick();
  54797. if ((tree.props.checkOnClickNode || props.node.isLeaf && tree.props.checkOnClickLeaf && props.showCheckbox) && !props.node.disabled) handleCheckChange(!props.node.checked);
  54798. tree.ctx.emit("node-click", props.node.data, props.node, instance, e);
  54799. };
  54800. const handleContextMenu = (event) => {
  54801. if (tree.instance.vnode.props?.["onNodeContextmenu"]) {
  54802. event.stopPropagation();
  54803. event.preventDefault();
  54804. }
  54805. tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance);
  54806. };
  54807. const handleExpandIconClick = () => {
  54808. if (props.node.isLeaf) return;
  54809. if (expanded.value) {
  54810. tree.ctx.emit("node-collapse", props.node.data, props.node, instance);
  54811. props.node.collapse();
  54812. } else props.node.expand(() => {
  54813. ctx.emit("node-expand", props.node.data, props.node, instance);
  54814. });
  54815. };
  54816. const handleCheckChange = (value) => {
  54817. const checkStrictly = tree?.props.checkStrictly;
  54818. const childNodes = props.node.childNodes;
  54819. if (!checkStrictly && childNodes.length) value = childNodes.some((node) => !node.isEffectivelyChecked);
  54820. props.node.setChecked(value, !checkStrictly);
  54821. nextTick(() => {
  54822. const store = tree.store.value;
  54823. tree.ctx.emit("check", props.node.data, {
  54824. checkedNodes: store.getCheckedNodes(),
  54825. checkedKeys: store.getCheckedKeys(),
  54826. halfCheckedNodes: store.getHalfCheckedNodes(),
  54827. halfCheckedKeys: store.getHalfCheckedKeys()
  54828. });
  54829. });
  54830. };
  54831. const handleChildNodeExpand = (nodeData, node, instance) => {
  54832. broadcastExpanded(node);
  54833. tree.ctx.emit("node-expand", nodeData, node, instance);
  54834. };
  54835. const handleDragStart = (event) => {
  54836. if (!tree.props.draggable) return;
  54837. dragEvents.treeNodeDragStart({
  54838. event,
  54839. treeNode: props
  54840. });
  54841. };
  54842. const handleDragOver = (event) => {
  54843. event.preventDefault();
  54844. if (!tree.props.draggable) return;
  54845. dragEvents.treeNodeDragOver({
  54846. event,
  54847. treeNode: {
  54848. $el: node$.value,
  54849. node: props.node
  54850. }
  54851. });
  54852. };
  54853. const handleDrop = (event) => {
  54854. event.preventDefault();
  54855. };
  54856. const handleDragEnd = (event) => {
  54857. if (!tree.props.draggable) return;
  54858. dragEvents.treeNodeDragEnd(event);
  54859. };
  54860. return {
  54861. ns,
  54862. node$,
  54863. tree,
  54864. expanded,
  54865. childNodeRendered,
  54866. oldChecked,
  54867. oldIndeterminate,
  54868. getNodeKey: getNodeKey$1,
  54869. getNodeClass,
  54870. handleSelectChange,
  54871. handleClick,
  54872. handleContextMenu,
  54873. handleExpandIconClick,
  54874. handleCheckChange,
  54875. handleChildNodeExpand,
  54876. handleDragStart,
  54877. handleDragOver,
  54878. handleDrop,
  54879. handleDragEnd,
  54880. CaretRight: caret_right_default
  54881. };
  54882. }
  54883. });
  54884. //#endregion
  54885. //#region node_modules/element-plus/es/components/tree/src/tree-node.mjs
  54886. var _hoisted_1$12 = [
  54887. "aria-expanded",
  54888. "aria-disabled",
  54889. "aria-checked",
  54890. "draggable",
  54891. "data-key"
  54892. ];
  54893. var _hoisted_2$7 = ["aria-expanded"];
  54894. function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  54895. const _component_el_icon = resolveComponent("el-icon");
  54896. const _component_el_checkbox = resolveComponent("el-checkbox");
  54897. const _component_loading = resolveComponent("loading");
  54898. const _component_node_content = resolveComponent("node-content");
  54899. const _component_el_tree_node = resolveComponent("el-tree-node");
  54900. const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
  54901. return withDirectives((openBlock(), createElementBlock("div", {
  54902. ref: "node$",
  54903. class: normalizeClass([
  54904. _ctx.ns.b("node"),
  54905. _ctx.ns.is("expanded", _ctx.expanded),
  54906. _ctx.ns.is("current", _ctx.node.isCurrent),
  54907. _ctx.ns.is("hidden", !_ctx.node.visible),
  54908. _ctx.ns.is("focusable", !_ctx.node.disabled),
  54909. _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked),
  54910. _ctx.getNodeClass(_ctx.node)
  54911. ]),
  54912. role: "treeitem",
  54913. tabindex: "-1",
  54914. "aria-expanded": _ctx.expanded,
  54915. "aria-disabled": _ctx.node.disabled,
  54916. "aria-checked": _ctx.node.checked,
  54917. draggable: _ctx.tree.props.draggable,
  54918. "data-key": _ctx.getNodeKey(_ctx.node),
  54919. onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
  54920. onContextmenu: _cache[3] || (_cache[3] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)),
  54921. onDragstart: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])),
  54922. onDragover: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])),
  54923. onDragend: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])),
  54924. onDrop: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"]))
  54925. }, [createBaseVNode("div", {
  54926. class: normalizeClass(_ctx.ns.be("node", "content")),
  54927. style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" })
  54928. }, [
  54929. _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, {
  54930. key: 0,
  54931. class: normalizeClass([
  54932. _ctx.ns.be("node", "expand-icon"),
  54933. _ctx.ns.is("leaf", _ctx.node.isLeaf),
  54934. { expanded: !_ctx.node.isLeaf && _ctx.expanded }
  54935. ]),
  54936. onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"])
  54937. }, {
  54938. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight)))]),
  54939. _: 1
  54940. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  54941. _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
  54942. key: 1,
  54943. "model-value": _ctx.node.checked,
  54944. indeterminate: _ctx.node.indeterminate,
  54945. disabled: !!_ctx.node.disabled,
  54946. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
  54947. onChange: _ctx.handleCheckChange
  54948. }, null, 8, [
  54949. "model-value",
  54950. "indeterminate",
  54951. "disabled",
  54952. "onChange"
  54953. ])) : createCommentVNode("v-if", true),
  54954. _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
  54955. key: 2,
  54956. class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")])
  54957. }, {
  54958. default: withCtx(() => [createVNode(_component_loading)]),
  54959. _: 1
  54960. }, 8, ["class"])) : createCommentVNode("v-if", true),
  54961. createVNode(_component_node_content, {
  54962. node: _ctx.node,
  54963. "render-content": _ctx.renderContent
  54964. }, null, 8, ["node", "render-content"])
  54965. ], 6), createVNode(_component_el_collapse_transition, null, {
  54966. default: withCtx(() => [!_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", {
  54967. key: 0,
  54968. class: normalizeClass(_ctx.ns.be("node", "children")),
  54969. role: "group",
  54970. "aria-expanded": _ctx.expanded,
  54971. onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
  54972. }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {
  54973. return openBlock(), createBlock(_component_el_tree_node, {
  54974. key: _ctx.getNodeKey(child),
  54975. "render-content": _ctx.renderContent,
  54976. "render-after-expand": _ctx.renderAfterExpand,
  54977. "show-checkbox": _ctx.showCheckbox,
  54978. node: child,
  54979. accordion: _ctx.accordion,
  54980. props: _ctx.props,
  54981. onNodeExpand: _ctx.handleChildNodeExpand
  54982. }, null, 8, [
  54983. "render-content",
  54984. "render-after-expand",
  54985. "show-checkbox",
  54986. "node",
  54987. "accordion",
  54988. "props",
  54989. "onNodeExpand"
  54990. ]);
  54991. }), 128))], 10, _hoisted_2$7)), [[vShow, _ctx.expanded]]) : createCommentVNode("v-if", true)]),
  54992. _: 1
  54993. })], 42, _hoisted_1$12)), [[vShow, _ctx.node.visible]]);
  54994. }
  54995. var tree_node_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(tree_node_vue_vue_type_script_lang_default, [["render", _sfc_render$2]]);
  54996. //#endregion
  54997. //#region node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs
  54998. function useKeydown({ el$ }, store) {
  54999. const ns = useNamespace("tree");
  55000. onMounted(() => {
  55001. initTabIndex();
  55002. });
  55003. onUpdated(() => {
  55004. el$.value?.querySelectorAll("input[type=checkbox]").forEach((checkbox) => {
  55005. checkbox.setAttribute("tabindex", "-1");
  55006. });
  55007. });
  55008. function canNodeFocus(treeItems, nextIndex) {
  55009. const currentNode = store.value.getNode(treeItems[nextIndex].dataset.key);
  55010. return currentNode.canFocus && currentNode.visible && (currentNode.parent?.expanded || currentNode.parent?.level === 0);
  55011. }
  55012. const handleKeydown = (ev) => {
  55013. const currentItem = ev.target;
  55014. if (!currentItem.className.includes(ns.b("node"))) return;
  55015. const code = getEventCode(ev);
  55016. const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
  55017. const currentIndex = treeItems.indexOf(currentItem);
  55018. let nextIndex;
  55019. if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {
  55020. ev.preventDefault();
  55021. if (code === EVENT_CODE.up) {
  55022. nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.length - 1;
  55023. const startIndex = nextIndex;
  55024. while (true) {
  55025. if (canNodeFocus(treeItems, nextIndex)) break;
  55026. nextIndex--;
  55027. if (nextIndex === startIndex) {
  55028. nextIndex = -1;
  55029. break;
  55030. }
  55031. if (nextIndex < 0) nextIndex = treeItems.length - 1;
  55032. }
  55033. } else {
  55034. nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.length - 1 ? currentIndex + 1 : 0;
  55035. const startIndex = nextIndex;
  55036. while (true) {
  55037. if (canNodeFocus(treeItems, nextIndex)) break;
  55038. nextIndex++;
  55039. if (nextIndex === startIndex) {
  55040. nextIndex = -1;
  55041. break;
  55042. }
  55043. if (nextIndex >= treeItems.length) nextIndex = 0;
  55044. }
  55045. }
  55046. nextIndex !== -1 && treeItems[nextIndex].focus();
  55047. }
  55048. if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) {
  55049. ev.preventDefault();
  55050. currentItem.click();
  55051. }
  55052. const hasInput = currentItem.querySelector("[type=\"checkbox\"]");
  55053. if ([
  55054. EVENT_CODE.enter,
  55055. EVENT_CODE.numpadEnter,
  55056. EVENT_CODE.space
  55057. ].includes(code) && hasInput) {
  55058. ev.preventDefault();
  55059. hasInput.click();
  55060. }
  55061. };
  55062. useEventListener(el$, "keydown", handleKeydown);
  55063. const initTabIndex = () => {
  55064. if (!el$.value) return;
  55065. const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
  55066. Array.from(el$.value.querySelectorAll("input[type=checkbox]")).forEach((checkbox) => {
  55067. checkbox.setAttribute("tabindex", "-1");
  55068. });
  55069. const checkedItem = el$.value.querySelectorAll(`.${ns.is("checked")}[role=treeitem]`);
  55070. if (checkedItem.length) {
  55071. checkedItem[0].setAttribute("tabindex", "0");
  55072. return;
  55073. }
  55074. treeItems[0]?.setAttribute("tabindex", "0");
  55075. };
  55076. }
  55077. //#endregion
  55078. //#region node_modules/element-plus/es/components/tree/src/tree.vue_vue_type_script_lang.mjs
  55079. var tree_vue_vue_type_script_lang_default = defineComponent({
  55080. name: "ElTree",
  55081. components: { ElTreeNode: tree_node_default$1 },
  55082. props: treeProps,
  55083. emits: treeEmits,
  55084. setup(props, ctx) {
  55085. const { t } = useLocale();
  55086. const ns = useNamespace("tree");
  55087. const store = ref(new TreeStore({
  55088. key: props.nodeKey,
  55089. data: props.data,
  55090. lazy: props.lazy,
  55091. props: props.props,
  55092. load: props.load,
  55093. currentNodeKey: props.currentNodeKey,
  55094. checkStrictly: props.checkStrictly,
  55095. checkDescendants: props.checkDescendants,
  55096. defaultCheckedKeys: props.defaultCheckedKeys,
  55097. defaultExpandedKeys: props.defaultExpandedKeys,
  55098. autoExpandParent: props.autoExpandParent,
  55099. defaultExpandAll: props.defaultExpandAll,
  55100. filterNodeMethod: props.filterNodeMethod
  55101. }));
  55102. store.value.initialize();
  55103. const root = ref(store.value.root);
  55104. const currentNode = ref(null);
  55105. const el$ = ref(null);
  55106. const dropIndicator$ = ref(null);
  55107. const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
  55108. const { dragState } = useDragNodeHandler({
  55109. props,
  55110. ctx,
  55111. el$,
  55112. dropIndicator$,
  55113. store
  55114. });
  55115. useKeydown({ el$ }, store);
  55116. const instance = getCurrentInstance();
  55117. const isSelectTree = computed(() => {
  55118. let parent = instance?.parent;
  55119. while (parent) {
  55120. if (parent.type.name === "ElTreeSelect") return true;
  55121. parent = parent.parent;
  55122. }
  55123. return false;
  55124. });
  55125. const isEmpty = computed(() => {
  55126. const { childNodes } = root.value;
  55127. return (!childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible)) && !isSelectTree.value;
  55128. });
  55129. watch(() => props.currentNodeKey, (newVal) => {
  55130. store.value.setCurrentNodeKey(newVal ?? null);
  55131. });
  55132. watch(() => props.defaultCheckedKeys, (newVal, oldVal) => {
  55133. if (isEqual$1(newVal, oldVal)) return;
  55134. store.value.setDefaultCheckedKey(newVal ?? []);
  55135. });
  55136. watch(() => props.defaultExpandedKeys, (newVal) => {
  55137. store.value.setDefaultExpandedKeys(newVal ?? []);
  55138. });
  55139. watch(() => props.data, (newVal) => {
  55140. store.value.setData(newVal);
  55141. }, { deep: true });
  55142. watch(() => props.checkStrictly, (newVal) => {
  55143. store.value.checkStrictly = newVal;
  55144. });
  55145. const filter = (value) => {
  55146. if (!props.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter");
  55147. store.value.filter(value);
  55148. };
  55149. const getNodeKey$1 = (node) => {
  55150. return props.nodeKey ? getNodeKey(props.nodeKey, node.data) : node.id;
  55151. };
  55152. const requireNodeKey = (methodName) => {
  55153. if (!props.nodeKey) throw new Error(`[Tree] nodeKey is required in ${methodName}`);
  55154. };
  55155. const getNodePath = (data) => {
  55156. requireNodeKey("getNodePath");
  55157. const node = store.value.getNode(data);
  55158. if (!node) return [];
  55159. const path = [node.data];
  55160. let parent = node.parent;
  55161. while (parent && parent !== root.value) {
  55162. path.push(parent.data);
  55163. parent = parent.parent;
  55164. }
  55165. return path.reverse();
  55166. };
  55167. const getCheckedNodes = (leafOnly, includeHalfChecked) => {
  55168. return store.value.getCheckedNodes(leafOnly, includeHalfChecked);
  55169. };
  55170. const getCheckedKeys = (leafOnly) => {
  55171. return store.value.getCheckedKeys(leafOnly);
  55172. };
  55173. const getCurrentNode = () => {
  55174. const currentNode = store.value.getCurrentNode();
  55175. return currentNode ? currentNode.data : null;
  55176. };
  55177. const getCurrentKey = () => {
  55178. requireNodeKey("getCurrentKey");
  55179. const currentNode = getCurrentNode();
  55180. return currentNode ? currentNode[props.nodeKey] : null;
  55181. };
  55182. const setCheckedNodes = (nodes, leafOnly) => {
  55183. requireNodeKey("setCheckedNodes");
  55184. store.value.setCheckedNodes(nodes, leafOnly);
  55185. };
  55186. const setCheckedKeys = (keys, leafOnly) => {
  55187. requireNodeKey("setCheckedKeys");
  55188. store.value.setCheckedKeys(keys, leafOnly);
  55189. };
  55190. const setChecked = (data, checked, deep = false) => {
  55191. store.value.setChecked(data, checked, deep);
  55192. };
  55193. const getHalfCheckedNodes = () => {
  55194. return store.value.getHalfCheckedNodes();
  55195. };
  55196. const getHalfCheckedKeys = () => {
  55197. return store.value.getHalfCheckedKeys();
  55198. };
  55199. const setCurrentNode = (node, shouldAutoExpandParent = true) => {
  55200. requireNodeKey("setCurrentNode");
  55201. handleCurrentChange(store, ctx.emit, () => {
  55202. broadcastExpanded(node);
  55203. store.value.setUserCurrentNode(node, shouldAutoExpandParent);
  55204. });
  55205. };
  55206. const setCurrentKey = (key = null, shouldAutoExpandParent = true) => {
  55207. requireNodeKey("setCurrentKey");
  55208. handleCurrentChange(store, ctx.emit, () => {
  55209. broadcastExpanded();
  55210. store.value.setCurrentNodeKey(key, shouldAutoExpandParent);
  55211. });
  55212. };
  55213. const getNode = (data) => {
  55214. return store.value.getNode(data);
  55215. };
  55216. const remove = (data) => {
  55217. store.value.remove(data);
  55218. };
  55219. const append = (data, parentNode) => {
  55220. store.value.append(data, parentNode);
  55221. };
  55222. const insertBefore = (data, refNode) => {
  55223. store.value.insertBefore(data, refNode);
  55224. };
  55225. const insertAfter = (data, refNode) => {
  55226. store.value.insertAfter(data, refNode);
  55227. };
  55228. const handleNodeExpand = (nodeData, node, instance) => {
  55229. broadcastExpanded(node);
  55230. ctx.emit("node-expand", nodeData, node, instance);
  55231. };
  55232. const updateKeyChildren = (key, data) => {
  55233. requireNodeKey("updateKeyChildren");
  55234. store.value.updateChildren(key, data);
  55235. };
  55236. provide(ROOT_TREE_INJECTION_KEY, {
  55237. ctx,
  55238. props,
  55239. store,
  55240. root,
  55241. currentNode,
  55242. instance
  55243. });
  55244. provide(formItemContextKey, void 0);
  55245. return {
  55246. ns,
  55247. store,
  55248. root,
  55249. currentNode,
  55250. dragState,
  55251. el$,
  55252. dropIndicator$,
  55253. isEmpty,
  55254. filter,
  55255. getNodeKey: getNodeKey$1,
  55256. getNodePath,
  55257. getCheckedNodes,
  55258. getCheckedKeys,
  55259. getCurrentNode,
  55260. getCurrentKey,
  55261. setCheckedNodes,
  55262. setCheckedKeys,
  55263. setChecked,
  55264. getHalfCheckedNodes,
  55265. getHalfCheckedKeys,
  55266. setCurrentNode,
  55267. setCurrentKey,
  55268. t,
  55269. getNode,
  55270. remove,
  55271. append,
  55272. insertBefore,
  55273. insertAfter,
  55274. handleNodeExpand,
  55275. updateKeyChildren
  55276. };
  55277. }
  55278. });
  55279. //#endregion
  55280. //#region node_modules/element-plus/es/components/tree/src/tree2.mjs
  55281. function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  55282. const _component_el_tree_node = resolveComponent("el-tree-node");
  55283. return openBlock(), createElementBlock("div", {
  55284. ref: "el$",
  55285. class: normalizeClass([
  55286. _ctx.ns.b(),
  55287. _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode),
  55288. _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop),
  55289. _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"),
  55290. { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent }
  55291. ]),
  55292. role: "tree"
  55293. }, [
  55294. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {
  55295. return openBlock(), createBlock(_component_el_tree_node, {
  55296. key: _ctx.getNodeKey(child),
  55297. node: child,
  55298. props: _ctx.props,
  55299. accordion: _ctx.accordion,
  55300. "render-after-expand": _ctx.renderAfterExpand,
  55301. "show-checkbox": _ctx.showCheckbox,
  55302. "render-content": _ctx.renderContent,
  55303. onNodeExpand: _ctx.handleNodeExpand
  55304. }, null, 8, [
  55305. "node",
  55306. "props",
  55307. "accordion",
  55308. "render-after-expand",
  55309. "show-checkbox",
  55310. "render-content",
  55311. "onNodeExpand"
  55312. ]);
  55313. }), 128)),
  55314. _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
  55315. key: 0,
  55316. class: normalizeClass(_ctx.ns.e("empty-block"))
  55317. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, toDisplayString(_ctx.emptyText ?? _ctx.t("el.tree.emptyText")), 3)])], 2)) : createCommentVNode("v-if", true),
  55318. withDirectives(createBaseVNode("div", {
  55319. ref: "dropIndicator$",
  55320. class: normalizeClass(_ctx.ns.e("drop-indicator"))
  55321. }, null, 2), [[vShow, _ctx.dragState.showDropIndicator]])
  55322. ], 2);
  55323. }
  55324. //#endregion
  55325. //#region node_modules/element-plus/es/components/tree/index.mjs
  55326. var ElTree = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(tree_vue_vue_type_script_lang_default, [["render", _sfc_render$1]]));
  55327. //#endregion
  55328. //#region node_modules/element-plus/es/components/tree-select/src/select.mjs
  55329. var useSelect = (props, { attrs, emit }, { select, tree, key }) => {
  55330. const ns = useNamespace("tree-select");
  55331. watch(() => props.data, () => {
  55332. if (props.filterable) nextTick(() => {
  55333. tree.value?.filter(select.value?.states.inputValue);
  55334. });
  55335. }, { flush: "post" });
  55336. const focusLastNode = (listNode) => {
  55337. const lastNode = listNode.at(-1);
  55338. if (lastNode.expanded && lastNode.childNodes.at(-1)) focusLastNode([lastNode.childNodes.at(-1)]);
  55339. else {
  55340. (tree.value.el$?.querySelector(`[data-key="${listNode.at(-1).key}"]`))?.focus({ preventScroll: true });
  55341. return;
  55342. }
  55343. };
  55344. onMounted(() => {
  55345. useEventListener(() => select.value?.$el, "keydown", async (evt) => {
  55346. const code = getEventCode(evt);
  55347. const { dropdownMenuVisible } = select.value;
  55348. if ([EVENT_CODE.down, EVENT_CODE.up].includes(code) && dropdownMenuVisible) {
  55349. await nextTick();
  55350. setTimeout(() => {
  55351. if (EVENT_CODE.up === code) {
  55352. const listNode = tree.value.store.root.childNodes;
  55353. focusLastNode(listNode);
  55354. return;
  55355. }
  55356. select.value.optionsArray[select.value.states.hoveringIndex].$el?.parentNode?.parentNode?.focus({ preventScroll: true });
  55357. });
  55358. }
  55359. }, { capture: true });
  55360. });
  55361. return {
  55362. ...pick(toRefs(props), Object.keys(ElSelect.props)),
  55363. ...attrs,
  55364. class: computed(() => attrs.class),
  55365. style: computed(() => attrs.style),
  55366. "onUpdate:modelValue": (value) => emit(UPDATE_MODEL_EVENT, value),
  55367. valueKey: key,
  55368. popperClass: computed(() => {
  55369. const classes = [ns.e("popper")];
  55370. if (props.popperClass) classes.push(props.popperClass);
  55371. return classes.join(" ");
  55372. }),
  55373. filterMethod: (keyword = "") => {
  55374. if (props.filterMethod) props.filterMethod(keyword);
  55375. else if (props.remoteMethod) props.remoteMethod(keyword);
  55376. else tree.value?.filter(keyword);
  55377. }
  55378. };
  55379. };
  55380. //#endregion
  55381. //#region node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs
  55382. var component = defineComponent({
  55383. extends: ElOption,
  55384. setup(props, ctx) {
  55385. const result = ElOption.setup(props, ctx);
  55386. delete result.selectOptionClick;
  55387. const vm = getCurrentInstance().proxy;
  55388. nextTick(() => {
  55389. if (!result.select.states.cachedOptions.get(vm.value)) result.select.onOptionCreate(vm);
  55390. });
  55391. watch(() => ctx.attrs.visible, (val) => {
  55392. nextTick(() => {
  55393. result.states.visible = val;
  55394. });
  55395. }, { immediate: true });
  55396. return result;
  55397. },
  55398. methods: { selectOptionClick() {
  55399. this.$el.parentElement.click();
  55400. } }
  55401. });
  55402. //#endregion
  55403. //#region node_modules/element-plus/es/components/tree-select/src/utils.mjs
  55404. function isValidValue(val) {
  55405. return val || val === 0;
  55406. }
  55407. function isValidArray(val) {
  55408. return isArray$1(val) && val.length;
  55409. }
  55410. function toValidArray(val) {
  55411. return isArray$1(val) ? val : isValidValue(val) ? [val] : [];
  55412. }
  55413. function treeFind(treeData, findCallback, getChildren, resultCallback, parent) {
  55414. for (let i = 0; i < treeData.length; i++) {
  55415. const data = treeData[i];
  55416. if (findCallback(data, i, treeData, parent)) return resultCallback ? resultCallback(data, i, treeData, parent) : data;
  55417. else {
  55418. const children = getChildren(data);
  55419. if (isValidArray(children)) {
  55420. const find = treeFind(children, findCallback, getChildren, resultCallback, data);
  55421. if (find) return find;
  55422. }
  55423. }
  55424. }
  55425. }
  55426. function treeEach(treeData, callback, getChildren, parent) {
  55427. for (let i = 0; i < treeData.length; i++) {
  55428. const data = treeData[i];
  55429. callback(data, i, treeData, parent);
  55430. const children = getChildren(data);
  55431. if (isValidArray(children)) treeEach(children, callback, getChildren, data);
  55432. }
  55433. }
  55434. //#endregion
  55435. //#region node_modules/element-plus/es/components/tree-select/src/tree.mjs
  55436. var useTree$1 = (props, { attrs, slots, emit }, { select, tree, key }) => {
  55437. watch([() => props.modelValue, tree], () => {
  55438. if (props.showCheckbox) nextTick(() => {
  55439. const treeInstance = tree.value;
  55440. if (treeInstance && !isEqual$1(treeInstance.getCheckedKeys(), toValidArray(props.modelValue))) treeInstance.setCheckedKeys(toValidArray(props.modelValue));
  55441. });
  55442. }, {
  55443. immediate: true,
  55444. deep: true
  55445. });
  55446. const propsMap = computed(() => ({
  55447. value: key.value,
  55448. label: "label",
  55449. children: "children",
  55450. disabled: "disabled",
  55451. isLeaf: "isLeaf",
  55452. ...props.props
  55453. }));
  55454. const getNodeValByProp = (prop, data) => {
  55455. const propVal = propsMap.value[prop];
  55456. if (isFunction$1(propVal)) return propVal(data, tree.value?.getNode(getNodeValByProp("value", data)));
  55457. else return data[propVal];
  55458. };
  55459. const defaultExpandedParentKeys = toValidArray(props.modelValue).map((value) => {
  55460. return treeFind(props.data || [], (data) => getNodeValByProp("value", data) === value, (data) => getNodeValByProp("children", data), (data, index, array, parent) => parent && getNodeValByProp("value", parent));
  55461. }).filter((item) => isValidValue(item));
  55462. const cacheOptions = computed(() => {
  55463. if (!props.renderAfterExpand && !props.lazy) return [];
  55464. const options = [];
  55465. treeEach(props.data.concat(props.cacheData), (node) => {
  55466. const value = getNodeValByProp("value", node);
  55467. options.push({
  55468. value,
  55469. currentLabel: getNodeValByProp("label", node),
  55470. isDisabled: getNodeValByProp("disabled", node)
  55471. });
  55472. }, (data) => getNodeValByProp("children", data));
  55473. return options;
  55474. });
  55475. const getChildCheckedKeys = () => {
  55476. return tree.value?.getCheckedKeys().filter((checkedKey) => {
  55477. const node = tree.value?.getNode(checkedKey);
  55478. return !isNil(node) && isEmpty(node.childNodes);
  55479. });
  55480. };
  55481. const emitChange = (val) => {
  55482. if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
  55483. };
  55484. function update(val) {
  55485. emit(UPDATE_MODEL_EVENT, val);
  55486. emitChange(val);
  55487. }
  55488. return {
  55489. ...pick(toRefs(props), Object.keys(ElTree.props)),
  55490. ...attrs,
  55491. nodeKey: key,
  55492. expandOnClickNode: computed(() => {
  55493. return !props.checkStrictly && props.expandOnClickNode;
  55494. }),
  55495. defaultExpandedKeys: computed(() => {
  55496. return props.defaultExpandedKeys ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys;
  55497. }),
  55498. renderContent: (h, { node, data, store }) => {
  55499. return h(component, {
  55500. value: getNodeValByProp("value", data),
  55501. label: getNodeValByProp("label", data),
  55502. disabled: getNodeValByProp("disabled", data),
  55503. visible: node.visible
  55504. }, props.renderContent ? () => props.renderContent(h, {
  55505. node,
  55506. data,
  55507. store
  55508. }) : slots.default ? () => slots.default({
  55509. node,
  55510. data,
  55511. store
  55512. }) : void 0);
  55513. },
  55514. filterNodeMethod: (value, data, node) => {
  55515. if (props.filterNodeMethod) return props.filterNodeMethod(value, data, node);
  55516. if (!value) return true;
  55517. return new RegExp(escapeStringRegexp(value), "i").test(getNodeValByProp("label", data) || "");
  55518. },
  55519. onNodeClick: (data, node, e) => {
  55520. attrs.onNodeClick?.(data, node, e);
  55521. if (props.showCheckbox && props.checkOnClickNode) return;
  55522. if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {
  55523. if (!getNodeValByProp("disabled", data)) {
  55524. const option = select.value?.states.options.get(getNodeValByProp("value", data));
  55525. select.value?.handleOptionSelect(option);
  55526. }
  55527. } else if (props.expandOnClickNode) e.proxy.handleExpandIconClick();
  55528. },
  55529. onCheck: (data, params) => {
  55530. if (!props.showCheckbox) return;
  55531. const dataValue = getNodeValByProp("value", data);
  55532. const dataMap = {};
  55533. treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
  55534. const uncachedCheckedKeys = params.checkedKeys;
  55535. const cachedKeys = props.multiple ? toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item)) : [];
  55536. const checkedKeys = cachedKeys.concat(uncachedCheckedKeys);
  55537. if (props.checkStrictly) update(props.multiple ? checkedKeys : checkedKeys.includes(dataValue) ? dataValue : void 0);
  55538. else if (props.multiple) {
  55539. const childKeys = getChildCheckedKeys();
  55540. update(cachedKeys.concat(childKeys));
  55541. } else {
  55542. const firstLeaf = treeFind([data], (data) => !isValidArray(getNodeValByProp("children", data)) && !getNodeValByProp("disabled", data), (data) => getNodeValByProp("children", data));
  55543. const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0;
  55544. const hasCheckedChild = isValidValue(props.modelValue) && !!treeFind([data], (data) => getNodeValByProp("value", data) === props.modelValue, (data) => getNodeValByProp("children", data));
  55545. update(firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey);
  55546. }
  55547. nextTick(() => {
  55548. const checkedKeys = toValidArray(props.modelValue);
  55549. tree.value.setCheckedKeys(checkedKeys);
  55550. attrs.onCheck?.(data, {
  55551. checkedKeys: tree.value.getCheckedKeys(),
  55552. checkedNodes: tree.value.getCheckedNodes(),
  55553. halfCheckedKeys: tree.value.getHalfCheckedKeys(),
  55554. halfCheckedNodes: tree.value.getHalfCheckedNodes()
  55555. });
  55556. });
  55557. select.value?.focus();
  55558. },
  55559. onNodeExpand: (data, node, e) => {
  55560. attrs.onNodeExpand?.(data, node, e);
  55561. nextTick(() => {
  55562. if (!props.checkStrictly && props.lazy && props.multiple && node.checked) {
  55563. const dataMap = {};
  55564. const uncachedCheckedKeys = tree.value.getCheckedKeys();
  55565. treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
  55566. const cachedKeys = toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item));
  55567. const childKeys = getChildCheckedKeys();
  55568. update(cachedKeys.concat(childKeys));
  55569. }
  55570. });
  55571. },
  55572. cacheOptions
  55573. };
  55574. };
  55575. //#endregion
  55576. //#region node_modules/element-plus/es/components/tree-select/src/cache-options.mjs
  55577. var cache_options_default = defineComponent({
  55578. props: { data: {
  55579. type: Array,
  55580. default: () => []
  55581. } },
  55582. setup(props) {
  55583. const select = inject(selectKey);
  55584. watch(() => props.data, () => {
  55585. props.data.forEach((item) => {
  55586. if (!select.states.cachedOptions.has(item.value)) select.states.cachedOptions.set(item.value, item);
  55587. });
  55588. const inputs = select.selectRef?.querySelectorAll("input") || [];
  55589. if (isClient && !Array.from(inputs).includes(document.activeElement)) select.setSelected();
  55590. }, {
  55591. flush: "post",
  55592. immediate: true
  55593. });
  55594. return () => void 0;
  55595. }
  55596. });
  55597. //#endregion
  55598. //#region node_modules/element-plus/es/components/tree-select/index.mjs
  55599. var ElTreeSelect = withInstall(defineComponent({
  55600. name: "ElTreeSelect",
  55601. inheritAttrs: false,
  55602. props: {
  55603. ...selectProps,
  55604. ...treeProps,
  55605. /**
  55606. * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data
  55607. */
  55608. cacheData: {
  55609. type: Array,
  55610. default: () => []
  55611. }
  55612. },
  55613. setup(props, context) {
  55614. const { slots, expose, emit, attrs } = context;
  55615. const childAttrs = {
  55616. ...attrs,
  55617. onChange: void 0
  55618. };
  55619. const select = ref();
  55620. const tree = ref();
  55621. const key = computed(() => props.nodeKey || props.valueKey || "value");
  55622. const selectProps = useSelect(props, {
  55623. attrs,
  55624. emit
  55625. }, {
  55626. select,
  55627. tree,
  55628. key
  55629. });
  55630. const { cacheOptions, ...treeProps } = useTree$1(props, {
  55631. attrs: childAttrs,
  55632. slots,
  55633. emit
  55634. }, {
  55635. select,
  55636. tree,
  55637. key
  55638. });
  55639. const methods = reactive({});
  55640. expose(methods);
  55641. onMounted(() => {
  55642. Object.assign(methods, {
  55643. ...pick(tree.value, [
  55644. "filter",
  55645. "updateKeyChildren",
  55646. "getCheckedNodes",
  55647. "setCheckedNodes",
  55648. "getCheckedKeys",
  55649. "setCheckedKeys",
  55650. "setChecked",
  55651. "getHalfCheckedNodes",
  55652. "getHalfCheckedKeys",
  55653. "getCurrentKey",
  55654. "getCurrentNode",
  55655. "setCurrentKey",
  55656. "setCurrentNode",
  55657. "getNode",
  55658. "remove",
  55659. "append",
  55660. "insertBefore",
  55661. "insertAfter"
  55662. ]),
  55663. ...pick(select.value, [
  55664. "focus",
  55665. "blur",
  55666. "selectedLabel"
  55667. ]),
  55668. treeRef: tree.value,
  55669. selectRef: select.value
  55670. });
  55671. });
  55672. return () => h$1(
  55673. ElSelect,
  55674. /**
  55675. * 1. The `props` is processed into `Refs`, but `v-bind` and
  55676. * render function props cannot read `Refs`, so use `reactive`
  55677. * unwrap the `Refs` and keep reactive.
  55678. * 2. The keyword `ref` requires `Ref`, but `reactive` broke it,
  55679. * so use function.
  55680. */
  55681. reactive({
  55682. ...selectProps,
  55683. ref: (ref) => select.value = ref
  55684. }),
  55685. {
  55686. ...slots,
  55687. default: () => [h$1(cache_options_default, { data: cacheOptions.value }), h$1(ElTree, reactive({
  55688. ...treeProps,
  55689. ref: (ref) => tree.value = ref
  55690. }))]
  55691. }
  55692. );
  55693. }
  55694. }));
  55695. //#endregion
  55696. //#region node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs
  55697. var ROOT_TREE_INJECTION_KEY$1 = Symbol();
  55698. var EMPTY_NODE = {
  55699. key: -1,
  55700. level: -1,
  55701. data: {}
  55702. };
  55703. var itemSize = {
  55704. type: Number,
  55705. default: 26
  55706. };
  55707. /**
  55708. * @deprecated Removed after 3.0.0, Use `TreeProps` instead.
  55709. */
  55710. var treeProps$1 = buildProps({
  55711. data: {
  55712. type: definePropType(Array),
  55713. default: () => mutable([])
  55714. },
  55715. emptyText: { type: String },
  55716. height: {
  55717. type: Number,
  55718. default: 200
  55719. },
  55720. props: {
  55721. type: definePropType(Object),
  55722. default: () => mutable({
  55723. children: "children",
  55724. label: "label",
  55725. disabled: "disabled",
  55726. value: "id",
  55727. class: ""
  55728. })
  55729. },
  55730. highlightCurrent: Boolean,
  55731. showCheckbox: Boolean,
  55732. defaultCheckedKeys: {
  55733. type: definePropType(Array),
  55734. default: () => mutable([])
  55735. },
  55736. checkStrictly: Boolean,
  55737. defaultExpandedKeys: {
  55738. type: definePropType(Array),
  55739. default: () => mutable([])
  55740. },
  55741. indent: {
  55742. type: Number,
  55743. default: 16
  55744. },
  55745. itemSize,
  55746. icon: { type: iconPropType },
  55747. expandOnClickNode: {
  55748. type: Boolean,
  55749. default: true
  55750. },
  55751. checkOnClickNode: Boolean,
  55752. checkOnClickLeaf: {
  55753. type: Boolean,
  55754. default: true
  55755. },
  55756. currentNodeKey: { type: definePropType([String, Number]) },
  55757. accordion: Boolean,
  55758. filterMethod: { type: definePropType(Function) },
  55759. perfMode: {
  55760. type: Boolean,
  55761. default: true
  55762. },
  55763. /**
  55764. * @description always show scrollbar
  55765. */
  55766. scrollbarAlwaysOn: Boolean
  55767. });
  55768. /**
  55769. * @deprecated Removed after 3.0.0, Use `TreeNodeProps` instead.
  55770. */
  55771. var treeNodeProps = buildProps({
  55772. node: {
  55773. type: definePropType(Object),
  55774. default: () => mutable(EMPTY_NODE)
  55775. },
  55776. expanded: Boolean,
  55777. checked: Boolean,
  55778. indeterminate: Boolean,
  55779. showCheckbox: Boolean,
  55780. disabled: Boolean,
  55781. current: Boolean,
  55782. hiddenExpandIcon: Boolean,
  55783. itemSize
  55784. });
  55785. var treeNodeContentProps = buildProps({ node: {
  55786. type: definePropType(Object),
  55787. required: true
  55788. } });
  55789. var NODE_CLICK = "node-click";
  55790. var NODE_DROP = "node-drop";
  55791. var NODE_EXPAND = "node-expand";
  55792. var NODE_COLLAPSE = "node-collapse";
  55793. var CURRENT_CHANGE = "current-change";
  55794. var NODE_CHECK = "check";
  55795. var NODE_CHECK_CHANGE = "check-change";
  55796. var NODE_CONTEXTMENU = "node-contextmenu";
  55797. var treeEmits$1 = {
  55798. [NODE_CLICK]: (data, node, e) => data && node && e,
  55799. [NODE_DROP]: (data, node, e) => data && node && e,
  55800. [NODE_EXPAND]: (data, node) => data && node,
  55801. [NODE_COLLAPSE]: (data, node) => data && node,
  55802. [CURRENT_CHANGE]: (data, node) => data && node,
  55803. [NODE_CHECK]: (data, checkedInfo) => data && checkedInfo,
  55804. [NODE_CHECK_CHANGE]: (data, checked) => data && isBoolean(checked),
  55805. [NODE_CONTEXTMENU]: (evt, data, node) => evt && data && node
  55806. };
  55807. var treeNodeEmits = {
  55808. click: (node, e) => !!(node && e),
  55809. drop: (node, e) => !!(node && e),
  55810. toggle: (node) => !!node,
  55811. check: (node, checked) => node && isBoolean(checked)
  55812. };
  55813. //#endregion
  55814. //#region node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs
  55815. function useCheck(props, tree) {
  55816. const checkedKeys = ref(/* @__PURE__ */ new Set());
  55817. const indeterminateKeys = ref(/* @__PURE__ */ new Set());
  55818. const { emit } = getCurrentInstance();
  55819. watch([() => tree.value, () => props.defaultCheckedKeys], () => {
  55820. return nextTick(() => {
  55821. _setCheckedKeys(props.defaultCheckedKeys);
  55822. });
  55823. }, { immediate: true });
  55824. const updateCheckedKeys = (deep = false) => {
  55825. if (!tree.value || !props.showCheckbox || props.checkStrictly && !deep) return;
  55826. const { levelTreeNodeMap, maxLevel } = tree.value;
  55827. const checkedKeySet = checkedKeys.value;
  55828. const indeterminateKeySet = /* @__PURE__ */ new Set();
  55829. for (let level = maxLevel; level >= 1; --level) {
  55830. const nodes = levelTreeNodeMap.get(level);
  55831. if (!nodes) continue;
  55832. nodes.forEach((node) => {
  55833. const children = node.children;
  55834. let isEffectivelyChecked = !node.isLeaf || node.disabled || checkedKeySet.has(node.key);
  55835. if (children) {
  55836. let allChecked = true;
  55837. let hasChecked = false;
  55838. for (const childNode of children) {
  55839. const key = childNode.key;
  55840. if (!childNode.isEffectivelyChecked) isEffectivelyChecked = false;
  55841. if (checkedKeySet.has(key)) hasChecked = true;
  55842. else if (indeterminateKeySet.has(key)) {
  55843. allChecked = false;
  55844. hasChecked = true;
  55845. break;
  55846. } else allChecked = false;
  55847. }
  55848. if (allChecked) checkedKeySet.add(node.key);
  55849. else if (hasChecked) {
  55850. indeterminateKeySet.add(node.key);
  55851. checkedKeySet.delete(node.key);
  55852. } else {
  55853. checkedKeySet.delete(node.key);
  55854. indeterminateKeySet.delete(node.key);
  55855. }
  55856. }
  55857. node.isEffectivelyChecked = isEffectivelyChecked;
  55858. });
  55859. }
  55860. indeterminateKeys.value = indeterminateKeySet;
  55861. };
  55862. const isChecked = (node) => checkedKeys.value.has(node.key);
  55863. const isIndeterminate = (node) => indeterminateKeys.value.has(node.key);
  55864. const toggleCheckbox = (node, isChecked, nodeClick = true, immediateUpdate = true, deep = false) => {
  55865. const checkedKeySet = checkedKeys.value;
  55866. const children = node.children;
  55867. if ((!props.checkStrictly || deep) && nodeClick && children?.length) isChecked = children.some((node) => !node.isEffectivelyChecked);
  55868. const toggle = (node, checked) => {
  55869. checkedKeySet[checked ? "add" : "delete"](node.key);
  55870. const children = node.children;
  55871. if ((!props.checkStrictly || deep) && children) children.forEach((childNode) => {
  55872. if (!childNode.disabled || childNode.children) toggle(childNode, checked);
  55873. });
  55874. };
  55875. toggle(node, isChecked);
  55876. if (immediateUpdate) updateCheckedKeys();
  55877. if (nodeClick) afterNodeCheck(node, isChecked);
  55878. };
  55879. const afterNodeCheck = (node, checked) => {
  55880. const { checkedNodes, checkedKeys } = getChecked();
  55881. const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked();
  55882. emit(NODE_CHECK, node.data, {
  55883. checkedKeys,
  55884. checkedNodes,
  55885. halfCheckedKeys,
  55886. halfCheckedNodes
  55887. });
  55888. emit(NODE_CHECK_CHANGE, node.data, checked);
  55889. };
  55890. function getCheckedKeys(leafOnly = false) {
  55891. return getChecked(leafOnly).checkedKeys;
  55892. }
  55893. function getCheckedNodes(leafOnly = false) {
  55894. return getChecked(leafOnly).checkedNodes;
  55895. }
  55896. function getHalfCheckedKeys() {
  55897. return getHalfChecked().halfCheckedKeys;
  55898. }
  55899. function getHalfCheckedNodes() {
  55900. return getHalfChecked().halfCheckedNodes;
  55901. }
  55902. function getChecked(leafOnly = false) {
  55903. const checkedNodes = [];
  55904. const keys = [];
  55905. if (tree?.value && props.showCheckbox) {
  55906. const { treeNodeMap } = tree.value;
  55907. checkedKeys.value.forEach((key) => {
  55908. const node = treeNodeMap.get(key);
  55909. if (node && (!leafOnly || leafOnly && node.isLeaf)) {
  55910. keys.push(key);
  55911. checkedNodes.push(node.data);
  55912. }
  55913. });
  55914. }
  55915. return {
  55916. checkedKeys: keys,
  55917. checkedNodes
  55918. };
  55919. }
  55920. function getHalfChecked() {
  55921. const halfCheckedNodes = [];
  55922. const halfCheckedKeys = [];
  55923. if (tree?.value && props.showCheckbox) {
  55924. const { treeNodeMap } = tree.value;
  55925. indeterminateKeys.value.forEach((key) => {
  55926. const node = treeNodeMap.get(key);
  55927. if (node) {
  55928. halfCheckedKeys.push(key);
  55929. halfCheckedNodes.push(node.data);
  55930. }
  55931. });
  55932. }
  55933. return {
  55934. halfCheckedNodes,
  55935. halfCheckedKeys
  55936. };
  55937. }
  55938. function setCheckedKeys(keys) {
  55939. checkedKeys.value.clear();
  55940. indeterminateKeys.value.clear();
  55941. nextTick(() => {
  55942. _setCheckedKeys(keys);
  55943. });
  55944. }
  55945. function setChecked(key, isChecked, deep) {
  55946. if (tree?.value && props.showCheckbox) {
  55947. const node = tree.value.treeNodeMap.get(key);
  55948. if (node) toggleCheckbox(node, isChecked, false, void 0, deep);
  55949. }
  55950. }
  55951. function _setCheckedKeys(keys) {
  55952. if (tree?.value) {
  55953. const { treeNodeMap } = tree.value;
  55954. if (props.showCheckbox && treeNodeMap && keys?.length > 0) {
  55955. for (const key of keys) {
  55956. const node = treeNodeMap.get(key);
  55957. if (node && !isChecked(node)) toggleCheckbox(node, true, false, false);
  55958. }
  55959. updateCheckedKeys();
  55960. }
  55961. }
  55962. }
  55963. return {
  55964. updateCheckedKeys,
  55965. toggleCheckbox,
  55966. isChecked,
  55967. isIndeterminate,
  55968. getCheckedKeys,
  55969. getCheckedNodes,
  55970. getHalfCheckedKeys,
  55971. getHalfCheckedNodes,
  55972. setChecked,
  55973. setCheckedKeys
  55974. };
  55975. }
  55976. //#endregion
  55977. //#region node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs
  55978. function useFilter(props, tree) {
  55979. const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([]));
  55980. const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([]));
  55981. const filterable = computed(() => {
  55982. return isFunction$1(props.filterMethod);
  55983. });
  55984. function doFilter(query) {
  55985. if (!filterable.value) return;
  55986. const expandKeySet = /* @__PURE__ */ new Set();
  55987. const hiddenExpandIconKeys = hiddenExpandIconKeySet.value;
  55988. const hiddenKeys = hiddenNodeKeySet.value;
  55989. const family = [];
  55990. const nodes = tree.value?.treeNodes || [];
  55991. const filter = props.filterMethod;
  55992. hiddenKeys.clear();
  55993. function traverse(nodes) {
  55994. nodes.forEach((node) => {
  55995. family.push(node);
  55996. if (filter?.(query, node.data, node)) family.forEach((member) => {
  55997. expandKeySet.add(member.key);
  55998. member.expanded = true;
  55999. });
  56000. else {
  56001. node.expanded = false;
  56002. if (node.isLeaf) hiddenKeys.add(node.key);
  56003. }
  56004. const children = node.children;
  56005. if (children) traverse(children);
  56006. if (!node.isLeaf) {
  56007. if (!expandKeySet.has(node.key)) hiddenKeys.add(node.key);
  56008. else if (children) {
  56009. let allHidden = true;
  56010. for (const childNode of children) if (!hiddenKeys.has(childNode.key)) {
  56011. allHidden = false;
  56012. break;
  56013. }
  56014. if (allHidden) hiddenExpandIconKeys.add(node.key);
  56015. else hiddenExpandIconKeys.delete(node.key);
  56016. }
  56017. }
  56018. family.pop();
  56019. });
  56020. }
  56021. traverse(nodes);
  56022. return expandKeySet;
  56023. }
  56024. function isForceHiddenExpandIcon(node) {
  56025. return hiddenExpandIconKeySet.value.has(node.key);
  56026. }
  56027. return {
  56028. hiddenExpandIconKeySet,
  56029. hiddenNodeKeySet,
  56030. doFilter,
  56031. isForceHiddenExpandIcon
  56032. };
  56033. }
  56034. //#endregion
  56035. //#region node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs
  56036. function useTree(props, emit) {
  56037. const expandedKeySet = ref(/* @__PURE__ */ new Set());
  56038. const currentKey = ref();
  56039. const tree = shallowRef();
  56040. const listRef = ref();
  56041. const { isIndeterminate, isChecked, toggleCheckbox, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys } = useCheck(props, tree);
  56042. const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree);
  56043. const valueKey = computed(() => {
  56044. return props.props?.value || "id";
  56045. });
  56046. const childrenKey = computed(() => {
  56047. return props.props?.children || "children";
  56048. });
  56049. const disabledKey = computed(() => {
  56050. return props.props?.disabled || "disabled";
  56051. });
  56052. const labelKey = computed(() => {
  56053. return props.props?.label || "label";
  56054. });
  56055. const flattenTree = computed(() => {
  56056. const expandedKeys = expandedKeySet.value;
  56057. const hiddenKeys = hiddenNodeKeySet.value;
  56058. const flattenNodes = [];
  56059. const nodes = tree.value?.treeNodes || [];
  56060. const stack = [];
  56061. for (let i = nodes.length - 1; i >= 0; --i) stack.push(nodes[i]);
  56062. while (stack.length) {
  56063. const node = stack.pop();
  56064. if (hiddenKeys.has(node.key)) continue;
  56065. flattenNodes.push(node);
  56066. if (node.children && expandedKeys.has(node.key)) for (let i = node.children.length - 1; i >= 0; --i) stack.push(node.children[i]);
  56067. }
  56068. return flattenNodes;
  56069. });
  56070. const isNotEmpty = computed(() => {
  56071. return flattenTree.value.length > 0;
  56072. });
  56073. function createTree(data) {
  56074. const treeNodeMap = /* @__PURE__ */ new Map();
  56075. const levelTreeNodeMap = /* @__PURE__ */ new Map();
  56076. let maxLevel = 1;
  56077. function traverse(nodes, level = 1, parent = void 0) {
  56078. const siblings = [];
  56079. for (const rawNode of nodes) {
  56080. const value = getKey(rawNode);
  56081. const node = {
  56082. level,
  56083. key: value,
  56084. data: rawNode
  56085. };
  56086. node.label = getLabel(rawNode);
  56087. node.parent = parent;
  56088. const children = getChildren(rawNode);
  56089. node.disabled = getDisabled(rawNode);
  56090. node.isLeaf = !children || children.length === 0;
  56091. node.expanded = expandedKeySet.value.has(value);
  56092. if (children && children.length) node.children = traverse(children, level + 1, node);
  56093. siblings.push(node);
  56094. treeNodeMap.set(value, node);
  56095. if (!levelTreeNodeMap.has(level)) levelTreeNodeMap.set(level, []);
  56096. levelTreeNodeMap.get(level)?.push(node);
  56097. }
  56098. if (level > maxLevel) maxLevel = level;
  56099. return siblings;
  56100. }
  56101. const treeNodes = traverse(data);
  56102. return {
  56103. treeNodeMap,
  56104. levelTreeNodeMap,
  56105. maxLevel,
  56106. treeNodes
  56107. };
  56108. }
  56109. function filter(query) {
  56110. const keys = doFilter(query);
  56111. if (keys) expandedKeySet.value = keys;
  56112. }
  56113. function getChildren(node) {
  56114. return node[childrenKey.value];
  56115. }
  56116. function getKey(node) {
  56117. if (!node) return "";
  56118. return node[valueKey.value];
  56119. }
  56120. function getDisabled(node) {
  56121. return node[disabledKey.value];
  56122. }
  56123. function getLabel(node) {
  56124. return node[labelKey.value];
  56125. }
  56126. function toggleExpand(node) {
  56127. if (expandedKeySet.value.has(node.key)) collapseNode(node);
  56128. else expandNode(node);
  56129. }
  56130. function setExpandedKeys(keys) {
  56131. const expandedKeys = /* @__PURE__ */ new Set();
  56132. const nodeMap = tree.value.treeNodeMap;
  56133. expandedKeySet.value.forEach((key) => {
  56134. const node = nodeMap.get(key);
  56135. if (node) node.expanded = false;
  56136. });
  56137. keys.forEach((k) => {
  56138. let node = nodeMap.get(k);
  56139. while (node && !expandedKeys.has(node.key)) {
  56140. expandedKeys.add(node.key);
  56141. node.expanded = true;
  56142. node = node.parent;
  56143. }
  56144. });
  56145. expandedKeySet.value = expandedKeys;
  56146. }
  56147. function handleNodeClick(node, e) {
  56148. handleCurrentChange(node);
  56149. emit(NODE_CLICK, node.data, node, e);
  56150. if (props.expandOnClickNode) toggleExpand(node);
  56151. if (props.showCheckbox && (props.checkOnClickNode || node.isLeaf && props.checkOnClickLeaf) && !node.disabled) toggleCheckbox(node, !isChecked(node), true);
  56152. }
  56153. function handleNodeDrop(node, e) {
  56154. emit(NODE_DROP, node.data, node, e);
  56155. }
  56156. function handleCurrentChange(node) {
  56157. if (!isCurrent(node)) {
  56158. currentKey.value = node.key;
  56159. emit(CURRENT_CHANGE, node.data, node);
  56160. }
  56161. }
  56162. function handleNodeCheck(node, checked) {
  56163. toggleCheckbox(node, checked);
  56164. }
  56165. function expandNode(node) {
  56166. const keySet = expandedKeySet.value;
  56167. if (tree.value && props.accordion) {
  56168. const { treeNodeMap } = tree.value;
  56169. keySet.forEach((key) => {
  56170. const treeNode = treeNodeMap.get(key);
  56171. if (node && node.level === treeNode?.level) {
  56172. keySet.delete(key);
  56173. treeNode.expanded = false;
  56174. }
  56175. });
  56176. }
  56177. keySet.add(node.key);
  56178. const _node = getNode(node.key);
  56179. if (_node) {
  56180. _node.expanded = true;
  56181. emit(NODE_EXPAND, _node.data, _node);
  56182. }
  56183. }
  56184. function collapseNode(node) {
  56185. expandedKeySet.value.delete(node.key);
  56186. const _node = getNode(node.key);
  56187. if (_node) {
  56188. _node.expanded = false;
  56189. emit(NODE_COLLAPSE, _node.data, _node);
  56190. }
  56191. }
  56192. function isDisabled(node) {
  56193. return !!node.disabled;
  56194. }
  56195. function isCurrent(node) {
  56196. const current = currentKey.value;
  56197. return current !== void 0 && current === node.key;
  56198. }
  56199. function getCurrentNode() {
  56200. if (!currentKey.value) return void 0;
  56201. return tree.value?.treeNodeMap.get(currentKey.value)?.data;
  56202. }
  56203. function getCurrentKey() {
  56204. return currentKey.value;
  56205. }
  56206. function setCurrentKey(key) {
  56207. currentKey.value = key;
  56208. }
  56209. function setData(data) {
  56210. tree.value = createTree(data);
  56211. }
  56212. function getNode(data) {
  56213. const key = isObject$2(data) ? getKey(data) : data;
  56214. return tree.value?.treeNodeMap.get(key);
  56215. }
  56216. function scrollToNode(key, strategy = "auto") {
  56217. const node = getNode(key);
  56218. if (node && listRef.value) listRef.value.scrollToItem(flattenTree.value.indexOf(node), strategy);
  56219. }
  56220. function scrollTo(offset) {
  56221. listRef.value?.scrollTo(offset);
  56222. }
  56223. watch(() => props.currentNodeKey, (key) => {
  56224. currentKey.value = key;
  56225. }, { immediate: true });
  56226. watch(() => props.defaultExpandedKeys, (keys) => {
  56227. setExpandedKeys(keys || []);
  56228. });
  56229. watch(() => props.data, (data) => {
  56230. setData(data);
  56231. setExpandedKeys(props.defaultExpandedKeys || []);
  56232. }, { immediate: true });
  56233. return {
  56234. tree,
  56235. flattenTree,
  56236. isNotEmpty,
  56237. listRef,
  56238. getKey,
  56239. getChildren,
  56240. toggleExpand,
  56241. toggleCheckbox,
  56242. isChecked,
  56243. isIndeterminate,
  56244. isDisabled,
  56245. isCurrent,
  56246. isForceHiddenExpandIcon,
  56247. handleNodeClick,
  56248. handleNodeDrop,
  56249. handleNodeCheck,
  56250. getCurrentNode,
  56251. getCurrentKey,
  56252. setCurrentKey,
  56253. getCheckedKeys,
  56254. getCheckedNodes,
  56255. getHalfCheckedKeys,
  56256. getHalfCheckedNodes,
  56257. setChecked,
  56258. setCheckedKeys,
  56259. filter,
  56260. setData,
  56261. getNode,
  56262. expandNode,
  56263. collapseNode,
  56264. setExpandedKeys,
  56265. scrollToNode,
  56266. scrollTo
  56267. };
  56268. }
  56269. //#endregion
  56270. //#region node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs
  56271. var tree_node_content_default = defineComponent({
  56272. name: "ElTreeNodeContent",
  56273. props: treeNodeContentProps,
  56274. setup(props) {
  56275. const tree = inject(ROOT_TREE_INJECTION_KEY$1);
  56276. const ns = useNamespace("tree");
  56277. return () => {
  56278. const node = props.node;
  56279. const { data } = node;
  56280. return tree?.ctx.slots.default ? tree.ctx.slots.default({
  56281. node,
  56282. data
  56283. }) : h$1(ElText, {
  56284. tag: "span",
  56285. truncated: true,
  56286. class: ns.be("node", "label")
  56287. }, () => [node?.label]);
  56288. };
  56289. }
  56290. });
  56291. //#endregion
  56292. //#region node_modules/element-plus/es/components/tree-v2/src/tree-node.vue_vue_type_script_setup_true_lang.mjs
  56293. var _hoisted_1$11 = [
  56294. "aria-expanded",
  56295. "aria-disabled",
  56296. "aria-checked",
  56297. "data-key"
  56298. ];
  56299. //#endregion
  56300. //#region node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs
  56301. var tree_node_default = /* @__PURE__ */ defineComponent({
  56302. name: "ElTreeNode",
  56303. __name: "tree-node",
  56304. props: treeNodeProps,
  56305. emits: treeNodeEmits,
  56306. setup(__props, { emit: __emit }) {
  56307. const props = __props;
  56308. const emit = __emit;
  56309. const tree = inject(ROOT_TREE_INJECTION_KEY$1);
  56310. const ns = useNamespace("tree");
  56311. const indent = computed(() => tree?.props.indent ?? 16);
  56312. const icon = computed(() => tree?.props.icon ?? caret_right_default);
  56313. const getNodeClass = (node) => {
  56314. const nodeClassFunc = tree?.props.props?.class;
  56315. if (!nodeClassFunc) return {};
  56316. let className;
  56317. if (isFunction$1(nodeClassFunc)) {
  56318. const { data } = node;
  56319. className = nodeClassFunc(data, node);
  56320. } else className = nodeClassFunc;
  56321. return isString(className) ? { [className]: true } : className;
  56322. };
  56323. const handleClick = (e) => {
  56324. emit("click", props.node, e);
  56325. };
  56326. const handleDrop = (e) => {
  56327. emit("drop", props.node, e);
  56328. };
  56329. const handleExpandIconClick = () => {
  56330. emit("toggle", props.node);
  56331. };
  56332. const handleCheckChange = (value) => {
  56333. emit("check", props.node, value);
  56334. };
  56335. const handleContextMenu = (event) => {
  56336. if (tree?.instance?.vnode?.props?.["onNodeContextmenu"]) {
  56337. event.stopPropagation();
  56338. event.preventDefault();
  56339. }
  56340. tree?.ctx.emit(NODE_CONTEXTMENU, event, props.node?.data, props.node);
  56341. };
  56342. return (_ctx, _cache) => {
  56343. return openBlock(), createElementBlock("div", {
  56344. ref: "node$",
  56345. class: normalizeClass([
  56346. unref(ns).b("node"),
  56347. unref(ns).is("expanded", __props.expanded),
  56348. unref(ns).is("current", __props.current),
  56349. unref(ns).is("focusable", !__props.disabled),
  56350. unref(ns).is("checked", !__props.disabled && __props.checked),
  56351. getNodeClass(__props.node)
  56352. ]),
  56353. role: "treeitem",
  56354. tabindex: "-1",
  56355. "aria-expanded": __props.expanded,
  56356. "aria-disabled": __props.disabled,
  56357. "aria-checked": __props.checked,
  56358. "data-key": __props.node?.key,
  56359. onClick: withModifiers(handleClick, ["stop"]),
  56360. onContextmenu: handleContextMenu,
  56361. onDragover: _cache[1] || (_cache[1] = withModifiers(() => {}, ["prevent"])),
  56362. onDragenter: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])),
  56363. onDrop: withModifiers(handleDrop, ["stop"])
  56364. }, [createBaseVNode("div", {
  56365. class: normalizeClass(unref(ns).be("node", "content")),
  56366. style: normalizeStyle({
  56367. paddingLeft: `${(__props.node.level - 1) * indent.value}px`,
  56368. height: __props.itemSize + "px"
  56369. })
  56370. }, [
  56371. icon.value ? (openBlock(), createBlock(unref(ElIcon), {
  56372. key: 0,
  56373. class: normalizeClass([
  56374. unref(ns).is("leaf", !!__props.node?.isLeaf),
  56375. unref(ns).is("hidden", __props.hiddenExpandIcon),
  56376. { expanded: !__props.node?.isLeaf && __props.expanded },
  56377. unref(ns).be("node", "expand-icon")
  56378. ]),
  56379. onClick: withModifiers(handleExpandIconClick, ["stop"])
  56380. }, {
  56381. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(icon.value)))]),
  56382. _: 1
  56383. }, 8, ["class"])) : createCommentVNode("v-if", true),
  56384. __props.showCheckbox ? (openBlock(), createBlock(unref(ElCheckbox), {
  56385. key: 1,
  56386. "model-value": __props.checked,
  56387. indeterminate: __props.indeterminate,
  56388. disabled: __props.disabled,
  56389. onChange: handleCheckChange,
  56390. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  56391. }, null, 8, [
  56392. "model-value",
  56393. "indeterminate",
  56394. "disabled"
  56395. ])) : createCommentVNode("v-if", true),
  56396. createVNode(unref(tree_node_content_default), { node: {
  56397. ...__props.node,
  56398. expanded: __props.expanded
  56399. } }, null, 8, ["node"])
  56400. ], 6)], 42, _hoisted_1$11);
  56401. };
  56402. }
  56403. });
  56404. //#endregion
  56405. //#region node_modules/element-plus/es/components/tree-v2/index.mjs
  56406. var ElTreeV2 = withInstall(/* @__PURE__ */ defineComponent({
  56407. name: "ElTreeV2",
  56408. __name: "tree",
  56409. props: treeProps$1,
  56410. emits: treeEmits$1,
  56411. setup(__props, { expose: __expose, emit: __emit }) {
  56412. const props = __props;
  56413. const emit = __emit;
  56414. const slots = useSlots();
  56415. const treeNodeSize = computed(() => props.itemSize);
  56416. provide(ROOT_TREE_INJECTION_KEY$1, {
  56417. ctx: {
  56418. emit,
  56419. slots
  56420. },
  56421. props,
  56422. instance: getCurrentInstance()
  56423. });
  56424. provide(formItemContextKey, void 0);
  56425. const { t } = useLocale();
  56426. const ns = useNamespace("tree");
  56427. const { flattenTree, isNotEmpty, listRef, toggleExpand, isIndeterminate, isChecked, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeDrop, handleNodeCheck, toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter, setData, getNode, expandNode, collapseNode, setExpandedKeys, scrollToNode, scrollTo } = useTree(props, emit);
  56428. __expose({
  56429. toggleCheckbox,
  56430. getCurrentNode,
  56431. getCurrentKey,
  56432. setCurrentKey,
  56433. getCheckedKeys,
  56434. getCheckedNodes,
  56435. getHalfCheckedKeys,
  56436. getHalfCheckedNodes,
  56437. setChecked,
  56438. setCheckedKeys,
  56439. filter,
  56440. setData,
  56441. getNode,
  56442. expandNode,
  56443. collapseNode,
  56444. setExpandedKeys,
  56445. scrollToNode,
  56446. scrollTo
  56447. });
  56448. return (_ctx, _cache) => {
  56449. return openBlock(), createElementBlock("div", {
  56450. class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: __props.highlightCurrent }]),
  56451. role: "tree"
  56452. }, [unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), {
  56453. key: 0,
  56454. ref_key: "listRef",
  56455. ref: listRef,
  56456. "class-name": unref(ns).b("virtual-list"),
  56457. data: unref(flattenTree),
  56458. total: unref(flattenTree).length,
  56459. height: __props.height,
  56460. "item-size": treeNodeSize.value,
  56461. "perf-mode": __props.perfMode,
  56462. "scrollbar-always-on": __props.scrollbarAlwaysOn
  56463. }, {
  56464. default: withCtx(({ data, index, style }) => [(openBlock(), createBlock(tree_node_default, {
  56465. key: data[index].key,
  56466. style: normalizeStyle(style),
  56467. node: data[index],
  56468. expanded: data[index].expanded,
  56469. "show-checkbox": __props.showCheckbox,
  56470. checked: unref(isChecked)(data[index]),
  56471. indeterminate: unref(isIndeterminate)(data[index]),
  56472. "item-size": treeNodeSize.value,
  56473. disabled: unref(isDisabled)(data[index]),
  56474. current: unref(isCurrent)(data[index]),
  56475. "hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]),
  56476. onClick: unref(handleNodeClick),
  56477. onToggle: unref(toggleExpand),
  56478. onCheck: unref(handleNodeCheck),
  56479. onDrop: unref(handleNodeDrop)
  56480. }, null, 8, [
  56481. "style",
  56482. "node",
  56483. "expanded",
  56484. "show-checkbox",
  56485. "checked",
  56486. "indeterminate",
  56487. "item-size",
  56488. "disabled",
  56489. "current",
  56490. "hidden-expand-icon",
  56491. "onClick",
  56492. "onToggle",
  56493. "onCheck",
  56494. "onDrop"
  56495. ]))]),
  56496. _: 1
  56497. }, 8, [
  56498. "class-name",
  56499. "data",
  56500. "total",
  56501. "height",
  56502. "item-size",
  56503. "perf-mode",
  56504. "scrollbar-always-on"
  56505. ])) : (openBlock(), createElementBlock("div", {
  56506. key: 1,
  56507. class: normalizeClass(unref(ns).e("empty-block"))
  56508. }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", { class: normalizeClass(unref(ns).e("empty-text")) }, toDisplayString(__props.emptyText ?? unref(t)("el.tree.emptyText")), 3)])], 2))], 2);
  56509. };
  56510. }
  56511. }));
  56512. //#endregion
  56513. //#region node_modules/element-plus/es/components/upload/src/ajax.mjs
  56514. var SCOPE$3 = "ElUpload";
  56515. var UploadAjaxError = class extends Error {
  56516. constructor(message, status, method, url) {
  56517. super(message);
  56518. this.name = "UploadAjaxError";
  56519. this.status = status;
  56520. this.method = method;
  56521. this.url = url;
  56522. }
  56523. };
  56524. function getError(action, option, xhr) {
  56525. let msg;
  56526. if (xhr.response) msg = `${xhr.response.error || xhr.response}`;
  56527. else if (xhr.responseText) msg = `${xhr.responseText}`;
  56528. else msg = `fail to ${option.method} ${action} ${xhr.status}`;
  56529. return new UploadAjaxError(msg, xhr.status, option.method, action);
  56530. }
  56531. function getBody(xhr) {
  56532. const text = xhr.responseText || xhr.response;
  56533. if (!text) return text;
  56534. try {
  56535. return JSON.parse(text);
  56536. } catch {
  56537. return text;
  56538. }
  56539. }
  56540. var ajaxUpload = (option) => {
  56541. if (typeof XMLHttpRequest === "undefined") throwError(SCOPE$3, "XMLHttpRequest is undefined");
  56542. const xhr = new XMLHttpRequest();
  56543. const action = option.action;
  56544. if (xhr.upload) xhr.upload.addEventListener("progress", (evt) => {
  56545. const progressEvt = evt;
  56546. progressEvt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0;
  56547. option.onProgress(progressEvt);
  56548. });
  56549. const formData = new FormData();
  56550. if (option.data) for (const [key, value] of Object.entries(option.data)) if (isArray$1(value)) if (value.length === 2 && value[0] instanceof Blob && isString(value[1])) formData.append(key, value[0], value[1]);
  56551. else value.forEach((item) => {
  56552. formData.append(key, item);
  56553. });
  56554. else formData.append(key, value);
  56555. formData.append(option.filename, option.file, option.file.name);
  56556. xhr.addEventListener("error", () => {
  56557. option.onError(getError(action, option, xhr));
  56558. });
  56559. xhr.addEventListener("load", () => {
  56560. if (xhr.status < 200 || xhr.status >= 300) return option.onError(getError(action, option, xhr));
  56561. option.onSuccess(getBody(xhr));
  56562. });
  56563. xhr.open(option.method, action, true);
  56564. if (option.withCredentials && "withCredentials" in xhr) xhr.withCredentials = true;
  56565. const headers = option.headers || {};
  56566. if (headers instanceof Headers) headers.forEach((value, key) => xhr.setRequestHeader(key, value));
  56567. else for (const [key, value] of Object.entries(headers)) {
  56568. if (isNil(value)) continue;
  56569. xhr.setRequestHeader(key, String(value));
  56570. }
  56571. xhr.send(formData);
  56572. return xhr;
  56573. };
  56574. //#endregion
  56575. //#region node_modules/element-plus/es/components/upload/src/upload.mjs
  56576. /**
  56577. * @deprecated Removed after 3.0.0, Use `UploadProps` instead.
  56578. */
  56579. var uploadListTypes = [
  56580. "text",
  56581. "picture",
  56582. "picture-card"
  56583. ];
  56584. var fileId = 1;
  56585. var genFileId = () => Date.now() + fileId++;
  56586. /**
  56587. * @deprecated Removed after 3.0.0, Use `UploadBaseProps` instead.
  56588. */
  56589. var uploadBaseProps = buildProps({
  56590. /**
  56591. * @description request URL
  56592. */
  56593. action: {
  56594. type: String,
  56595. default: "#"
  56596. },
  56597. /**
  56598. * @description request headers
  56599. */
  56600. headers: { type: definePropType(Object) },
  56601. /**
  56602. * @description set upload request method
  56603. */
  56604. method: {
  56605. type: String,
  56606. default: "post"
  56607. },
  56608. /**
  56609. * @description additions options of request
  56610. */
  56611. data: {
  56612. type: definePropType([
  56613. Object,
  56614. Function,
  56615. Promise
  56616. ]),
  56617. default: () => mutable({})
  56618. },
  56619. /**
  56620. * @description whether uploading multiple files is permitted
  56621. */
  56622. multiple: Boolean,
  56623. /**
  56624. * @description key name for uploaded file
  56625. */
  56626. name: {
  56627. type: String,
  56628. default: "file"
  56629. },
  56630. /**
  56631. * @description whether to activate drag and drop mode
  56632. */
  56633. drag: Boolean,
  56634. /**
  56635. * @description whether cookies are sent
  56636. */
  56637. withCredentials: Boolean,
  56638. /**
  56639. * @description whether to show the uploaded file list
  56640. */
  56641. showFileList: {
  56642. type: Boolean,
  56643. default: true
  56644. },
  56645. /**
  56646. * @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`
  56647. */
  56648. accept: {
  56649. type: String,
  56650. default: ""
  56651. },
  56652. /**
  56653. * @description default uploaded files
  56654. */
  56655. fileList: {
  56656. type: definePropType(Array),
  56657. default: () => mutable([])
  56658. },
  56659. /**
  56660. * @description whether to auto upload file
  56661. */
  56662. autoUpload: {
  56663. type: Boolean,
  56664. default: true
  56665. },
  56666. /**
  56667. * @description type of file list
  56668. */
  56669. listType: {
  56670. type: String,
  56671. values: uploadListTypes,
  56672. default: "text"
  56673. },
  56674. /**
  56675. * @description override default xhr behavior, allowing you to implement your own upload-file's request
  56676. */
  56677. httpRequest: {
  56678. type: definePropType(Function),
  56679. default: ajaxUpload
  56680. },
  56681. /**
  56682. * @description whether to disable upload
  56683. */
  56684. disabled: {
  56685. type: Boolean,
  56686. default: void 0
  56687. },
  56688. /**
  56689. * @description maximum number of uploads allowed
  56690. */
  56691. limit: Number,
  56692. /**
  56693. * @description whether to support uploading directory
  56694. */
  56695. directory: Boolean
  56696. });
  56697. /**
  56698. * @deprecated Removed after 3.0.0, Use `UploadProps` instead.
  56699. */
  56700. var uploadProps = buildProps({
  56701. ...uploadBaseProps,
  56702. /**
  56703. * @description hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted
  56704. */
  56705. beforeUpload: {
  56706. type: definePropType(Function),
  56707. default: NOOP
  56708. },
  56709. /**
  56710. * @description hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted
  56711. */
  56712. beforeRemove: { type: definePropType(Function) },
  56713. /**
  56714. * @description hook function when files are removed
  56715. */
  56716. onRemove: {
  56717. type: definePropType(Function),
  56718. default: NOOP
  56719. },
  56720. /**
  56721. * @description hook function when select file or upload file success or upload file fail
  56722. */
  56723. onChange: {
  56724. type: definePropType(Function),
  56725. default: NOOP
  56726. },
  56727. /**
  56728. * @description hook function when clicking the uploaded files
  56729. */
  56730. onPreview: {
  56731. type: definePropType(Function),
  56732. default: NOOP
  56733. },
  56734. /**
  56735. * @description hook function when uploaded successfully
  56736. */
  56737. onSuccess: {
  56738. type: definePropType(Function),
  56739. default: NOOP
  56740. },
  56741. /**
  56742. * @description hook function when some progress occurs
  56743. */
  56744. onProgress: {
  56745. type: definePropType(Function),
  56746. default: NOOP
  56747. },
  56748. /**
  56749. * @description hook function when some errors occurs
  56750. */
  56751. onError: {
  56752. type: definePropType(Function),
  56753. default: NOOP
  56754. },
  56755. /**
  56756. * @description hook function when limit is exceeded
  56757. */
  56758. onExceed: {
  56759. type: definePropType(Function),
  56760. default: NOOP
  56761. },
  56762. /**
  56763. * @description set HTML attribute: crossorigin.
  56764. */
  56765. crossorigin: { type: definePropType(String) }
  56766. });
  56767. var uploadBasePropsDefaults = {
  56768. action: "#",
  56769. method: "post",
  56770. data: () => mutable({}),
  56771. name: "file",
  56772. showFileList: true,
  56773. accept: "",
  56774. fileList: () => mutable([]),
  56775. autoUpload: true,
  56776. listType: "text",
  56777. httpRequest: ajaxUpload,
  56778. disabled: void 0
  56779. };
  56780. var uploadPropsDefaults = {
  56781. ...uploadBasePropsDefaults,
  56782. beforeUpload: NOOP,
  56783. onRemove: NOOP,
  56784. onChange: NOOP,
  56785. onPreview: NOOP,
  56786. onSuccess: NOOP,
  56787. onProgress: NOOP,
  56788. onError: NOOP,
  56789. onExceed: NOOP
  56790. };
  56791. //#endregion
  56792. //#region node_modules/element-plus/es/components/upload/src/constants.mjs
  56793. var uploadContextKey = Symbol("uploadContextKey");
  56794. //#endregion
  56795. //#region node_modules/element-plus/es/components/upload/src/upload-list.mjs
  56796. /**
  56797. * @deprecated Removed after 3.0.0, Use `UploadListProps` instead.
  56798. */
  56799. var uploadListProps = buildProps({
  56800. files: {
  56801. type: definePropType(Array),
  56802. default: () => mutable([])
  56803. },
  56804. disabled: {
  56805. type: Boolean,
  56806. default: void 0
  56807. },
  56808. handlePreview: {
  56809. type: definePropType(Function),
  56810. default: NOOP
  56811. },
  56812. listType: {
  56813. type: String,
  56814. values: uploadListTypes,
  56815. default: "text"
  56816. },
  56817. /**
  56818. * @description set HTML attribute: crossorigin.
  56819. */
  56820. crossorigin: { type: definePropType(String) }
  56821. });
  56822. var uploadListEmits = { remove: (file) => !!file };
  56823. //#endregion
  56824. //#region node_modules/element-plus/es/components/upload/src/upload-content.mjs
  56825. /**
  56826. * @deprecated Removed after 3.0.0, Use `UploadContentProps` instead.
  56827. */
  56828. var uploadContentProps = buildProps({
  56829. ...uploadBaseProps,
  56830. beforeUpload: {
  56831. type: definePropType(Function),
  56832. default: NOOP
  56833. },
  56834. onRemove: {
  56835. type: definePropType(Function),
  56836. default: NOOP
  56837. },
  56838. onStart: {
  56839. type: definePropType(Function),
  56840. default: NOOP
  56841. },
  56842. onSuccess: {
  56843. type: definePropType(Function),
  56844. default: NOOP
  56845. },
  56846. onProgress: {
  56847. type: definePropType(Function),
  56848. default: NOOP
  56849. },
  56850. onError: {
  56851. type: definePropType(Function),
  56852. default: NOOP
  56853. },
  56854. onExceed: {
  56855. type: definePropType(Function),
  56856. default: NOOP
  56857. }
  56858. });
  56859. var uploadContentPropsDefaults = {
  56860. ...uploadBasePropsDefaults,
  56861. beforeUpload: NOOP,
  56862. onRemove: NOOP,
  56863. onStart: NOOP,
  56864. onSuccess: NOOP,
  56865. onProgress: NOOP,
  56866. onError: NOOP,
  56867. onExceed: NOOP
  56868. };
  56869. //#endregion
  56870. //#region node_modules/element-plus/es/components/upload/src/upload-dragger.mjs
  56871. /**
  56872. * @deprecated Removed after 3.0.0, Use `UploadDraggerProps` instead.
  56873. */
  56874. var uploadDraggerProps = buildProps({
  56875. disabled: {
  56876. type: Boolean,
  56877. default: void 0
  56878. },
  56879. directory: Boolean
  56880. });
  56881. var uploadDraggerEmits = { file: (file) => isArray$1(file) };
  56882. //#endregion
  56883. //#region node_modules/element-plus/es/components/upload/src/upload-list.vue_vue_type_script_setup_true_lang.mjs
  56884. var _hoisted_1$10 = [
  56885. "tabindex",
  56886. "aria-disabled",
  56887. "onKeydown"
  56888. ];
  56889. var _hoisted_2$6 = ["src", "crossorigin"];
  56890. var _hoisted_3$2 = ["onClick"];
  56891. var _hoisted_4$1 = ["title"];
  56892. var _hoisted_5 = ["onClick"];
  56893. var _hoisted_6 = ["onClick"];
  56894. //#endregion
  56895. //#region node_modules/element-plus/es/components/upload/src/upload-list2.mjs
  56896. var upload_list_default = /* @__PURE__ */ defineComponent({
  56897. name: "ElUploadList",
  56898. __name: "upload-list",
  56899. props: uploadListProps,
  56900. emits: uploadListEmits,
  56901. setup(__props, { emit: __emit }) {
  56902. const props = __props;
  56903. const emit = __emit;
  56904. const { t } = useLocale();
  56905. const nsUpload = useNamespace("upload");
  56906. const nsIcon = useNamespace("icon");
  56907. const nsList = useNamespace("list");
  56908. const disabled = useFormDisabled();
  56909. const focusing = ref(false);
  56910. const containerKls = computed(() => [
  56911. nsUpload.b("list"),
  56912. nsUpload.bm("list", props.listType),
  56913. nsUpload.is("disabled", disabled.value)
  56914. ]);
  56915. const handleRemove = (file) => {
  56916. emit("remove", file);
  56917. };
  56918. return (_ctx, _cache) => {
  56919. return openBlock(), createBlock(TransitionGroup, {
  56920. tag: "ul",
  56921. class: normalizeClass(containerKls.value),
  56922. name: unref(nsList).b()
  56923. }, {
  56924. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.files, (file, index) => {
  56925. return openBlock(), createElementBlock("li", {
  56926. key: file.uid || file.name,
  56927. class: normalizeClass([
  56928. unref(nsUpload).be("list", "item"),
  56929. unref(nsUpload).is(file.status),
  56930. { focusing: focusing.value }
  56931. ]),
  56932. tabindex: unref(disabled) ? void 0 : 0,
  56933. "aria-disabled": unref(disabled),
  56934. role: "button",
  56935. onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]),
  56936. onFocus: _cache[0] || (_cache[0] = ($event) => focusing.value = true),
  56937. onBlur: _cache[1] || (_cache[1] = ($event) => focusing.value = false),
  56938. onClick: _cache[2] || (_cache[2] = ($event) => focusing.value = false)
  56939. }, [renderSlot(_ctx.$slots, "default", {
  56940. file,
  56941. index
  56942. }, () => [
  56943. __props.listType === "picture" || file.status !== "uploading" && __props.listType === "picture-card" ? (openBlock(), createElementBlock("img", {
  56944. key: 0,
  56945. class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")),
  56946. src: file.url,
  56947. crossorigin: __props.crossorigin,
  56948. alt: ""
  56949. }, null, 10, _hoisted_2$6)) : createCommentVNode("v-if", true),
  56950. file.status === "uploading" || __props.listType !== "picture-card" ? (openBlock(), createElementBlock("div", {
  56951. key: 1,
  56952. class: normalizeClass(unref(nsUpload).be("list", "item-info"))
  56953. }, [createBaseVNode("a", {
  56954. class: normalizeClass(unref(nsUpload).be("list", "item-name")),
  56955. onClick: withModifiers(($event) => __props.handlePreview(file), ["prevent"])
  56956. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("document")) }, {
  56957. default: withCtx(() => [createVNode(unref(document_default))]),
  56958. _: 1
  56959. }, 8, ["class"]), createBaseVNode("span", {
  56960. class: normalizeClass(unref(nsUpload).be("list", "item-file-name")),
  56961. title: file.name
  56962. }, toDisplayString(file.name), 11, _hoisted_4$1)], 10, _hoisted_3$2), file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), {
  56963. key: 0,
  56964. type: __props.listType === "picture-card" ? "circle" : "line",
  56965. "stroke-width": __props.listType === "picture-card" ? 6 : 2,
  56966. percentage: Number(file.percentage),
  56967. style: normalizeStyle(__props.listType === "picture-card" ? "" : "margin-top: 0.5rem")
  56968. }, null, 8, [
  56969. "type",
  56970. "stroke-width",
  56971. "percentage",
  56972. "style"
  56973. ])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
  56974. createBaseVNode("label", { class: normalizeClass(unref(nsUpload).be("list", "item-status-label")) }, [__props.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), {
  56975. key: 0,
  56976. class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")])
  56977. }, {
  56978. default: withCtx(() => [createVNode(unref(circle_check_default))]),
  56979. _: 1
  56980. }, 8, ["class"])) : ["picture-card", "picture"].includes(__props.listType) ? (openBlock(), createBlock(unref(ElIcon), {
  56981. key: 1,
  56982. class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")])
  56983. }, {
  56984. default: withCtx(() => [createVNode(unref(check_default))]),
  56985. _: 1
  56986. }, 8, ["class"])) : createCommentVNode("v-if", true)], 2),
  56987. !unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), {
  56988. key: 2,
  56989. class: normalizeClass(unref(nsIcon).m("close")),
  56990. "aria-label": unref(t)("el.upload.delete"),
  56991. role: "button",
  56992. tabindex: "0",
  56993. onClick: ($event) => handleRemove(file),
  56994. onKeydown: withKeys(withModifiers(($event) => handleRemove(file), ["prevent"]), ["enter", "space"])
  56995. }, {
  56996. default: withCtx(() => [createVNode(unref(close_default))]),
  56997. _: 1
  56998. }, 8, [
  56999. "class",
  57000. "aria-label",
  57001. "onClick",
  57002. "onKeydown"
  57003. ])) : createCommentVNode("v-if", true),
  57004. !unref(disabled) ? (openBlock(), createElementBlock("i", {
  57005. key: 3,
  57006. class: normalizeClass(unref(nsIcon).m("close-tip"))
  57007. }, toDisplayString(unref(t)("el.upload.deleteTip")), 3)) : createCommentVNode("v-if", true),
  57008. __props.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
  57009. key: 4,
  57010. class: normalizeClass(unref(nsUpload).be("list", "item-actions"))
  57011. }, [createBaseVNode("span", {
  57012. class: normalizeClass(unref(nsUpload).be("list", "item-preview")),
  57013. onClick: ($event) => __props.handlePreview(file)
  57014. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("zoom-in")) }, {
  57015. default: withCtx(() => [createVNode(unref(zoom_in_default))]),
  57016. _: 1
  57017. }, 8, ["class"])], 10, _hoisted_5), !unref(disabled) ? (openBlock(), createElementBlock("span", {
  57018. key: 0,
  57019. class: normalizeClass(unref(nsUpload).be("list", "item-delete")),
  57020. onClick: ($event) => handleRemove(file)
  57021. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("delete")) }, {
  57022. default: withCtx(() => [createVNode(unref(delete_default))]),
  57023. _: 1
  57024. }, 8, ["class"])], 10, _hoisted_6)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)
  57025. ])], 42, _hoisted_1$10);
  57026. }), 128)), renderSlot(_ctx.$slots, "append")]),
  57027. _: 3
  57028. }, 8, ["class", "name"]);
  57029. };
  57030. }
  57031. });
  57032. //#endregion
  57033. //#region node_modules/element-plus/es/components/upload/src/upload-dragger.vue_vue_type_script_setup_true_lang.mjs
  57034. var COMPONENT_NAME$1 = "ElUploadDrag";
  57035. //#endregion
  57036. //#region node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs
  57037. var upload_dragger_default = /* @__PURE__ */ defineComponent({
  57038. name: COMPONENT_NAME$1,
  57039. __name: "upload-dragger",
  57040. props: uploadDraggerProps,
  57041. emits: uploadDraggerEmits,
  57042. setup(__props, { emit: __emit }) {
  57043. const props = __props;
  57044. const emit = __emit;
  57045. if (!inject(uploadContextKey)) throwError(COMPONENT_NAME$1, "usage: <el-upload><el-upload-dragger /></el-upload>");
  57046. const ns = useNamespace("upload");
  57047. const dragover = ref(false);
  57048. const disabled = useFormDisabled();
  57049. const getFile = (entry) => {
  57050. return new Promise((resolve, reject) => entry.file(resolve, reject));
  57051. };
  57052. const getAllFiles = async (entry) => {
  57053. try {
  57054. if (entry.isFile) {
  57055. const file = await getFile(entry);
  57056. file.isDirectory = false;
  57057. return [file];
  57058. }
  57059. if (entry.isDirectory) {
  57060. const dirReader = entry.createReader();
  57061. const getEntries = () => {
  57062. return new Promise((resolve, reject) => dirReader.readEntries(resolve, reject));
  57063. };
  57064. const entries = [];
  57065. let readEntries = await getEntries();
  57066. /**
  57067. * In Chromium-based browsers, readEntries() will only return the first 100 FileSystemEntry instances.
  57068. * https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries#:~:text=In%20Chromium%2Dbased%20browsers%2C%20readEntries()%20will%20only%20return%20the%20first%20100%20FileSystemEntry%20instances.%20In%20order%20to%20obtain%20all%20of%20the%20instances%2C%20readEntries()%20must%20be%20called%20multiple%20times.
  57069. */
  57070. while (readEntries.length > 0) {
  57071. entries.push(...readEntries);
  57072. readEntries = await getEntries();
  57073. }
  57074. const filePromises = entries.map((entry) => getAllFiles(entry).catch(() => []));
  57075. return flatten(await Promise.all(filePromises));
  57076. }
  57077. } catch {
  57078. return [];
  57079. }
  57080. return [];
  57081. };
  57082. const onDrop = async (e) => {
  57083. if (disabled.value) return;
  57084. dragover.value = false;
  57085. e.stopPropagation();
  57086. const files = Array.from(e.dataTransfer.files);
  57087. const items = e.dataTransfer.items || [];
  57088. if (props.directory) {
  57089. const entries = Array.from(items).map((item) => item?.webkitGetAsEntry?.()).filter((entry) => entry);
  57090. emit("file", flatten(await Promise.all(entries.map(getAllFiles))));
  57091. return;
  57092. }
  57093. files.forEach((file, index) => {
  57094. const entry = items[index]?.webkitGetAsEntry?.();
  57095. if (entry) file.isDirectory = entry.isDirectory;
  57096. });
  57097. emit("file", files);
  57098. };
  57099. const onDragover = () => {
  57100. if (!disabled.value) dragover.value = true;
  57101. };
  57102. const onDragleave = (e) => {
  57103. if (!e.currentTarget.contains(e.relatedTarget)) dragover.value = false;
  57104. };
  57105. return (_ctx, _cache) => {
  57106. return openBlock(), createElementBlock("div", {
  57107. class: normalizeClass([unref(ns).b("dragger"), unref(ns).is("dragover", dragover.value)]),
  57108. onDrop: withModifiers(onDrop, ["prevent"]),
  57109. onDragover: withModifiers(onDragover, ["prevent"]),
  57110. onDragleave: withModifiers(onDragleave, ["prevent"])
  57111. }, [renderSlot(_ctx.$slots, "default")], 34);
  57112. };
  57113. }
  57114. });
  57115. //#endregion
  57116. //#region node_modules/element-plus/es/components/upload/src/upload-content.vue_vue_type_script_setup_true_lang.mjs
  57117. var _hoisted_1$9 = [
  57118. "tabindex",
  57119. "aria-disabled",
  57120. "onKeydown"
  57121. ];
  57122. var _hoisted_2$5 = [
  57123. "name",
  57124. "disabled",
  57125. "multiple",
  57126. "accept",
  57127. "webkitdirectory"
  57128. ];
  57129. //#endregion
  57130. //#region node_modules/element-plus/es/components/upload/src/upload-content2.mjs
  57131. var upload_content_default = /* @__PURE__ */ defineComponent({
  57132. name: "ElUploadContent",
  57133. inheritAttrs: false,
  57134. __name: "upload-content",
  57135. props: uploadContentProps,
  57136. setup(__props, { expose: __expose }) {
  57137. const props = __props;
  57138. const ns = useNamespace("upload");
  57139. const disabled = useFormDisabled();
  57140. const requests = shallowRef({});
  57141. const inputRef = shallowRef();
  57142. const uploadFiles = (files) => {
  57143. if (files.length === 0) return;
  57144. const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props;
  57145. if (limit && fileList.length + files.length > limit) {
  57146. onExceed(files, fileList);
  57147. return;
  57148. }
  57149. if (!multiple) files = files.slice(0, 1);
  57150. for (const file of files) {
  57151. const rawFile = file;
  57152. rawFile.uid = genFileId();
  57153. onStart(rawFile);
  57154. if (autoUpload) upload(rawFile);
  57155. }
  57156. };
  57157. const upload = async (rawFile) => {
  57158. inputRef.value.value = "";
  57159. if (!props.beforeUpload) return doUpload(rawFile);
  57160. let hookResult;
  57161. let beforeData = {};
  57162. try {
  57163. const originData = props.data;
  57164. const beforeUploadPromise = props.beforeUpload(rawFile);
  57165. beforeData = isPlainObject$1(props.data) ? cloneDeep(props.data) : props.data;
  57166. hookResult = await beforeUploadPromise;
  57167. if (isPlainObject$1(props.data) && isEqual$1(originData, beforeData)) beforeData = cloneDeep(props.data);
  57168. } catch {
  57169. hookResult = false;
  57170. }
  57171. if (hookResult === false) {
  57172. props.onRemove(rawFile);
  57173. return;
  57174. }
  57175. let file = rawFile;
  57176. if (hookResult instanceof Blob) if (hookResult instanceof File) file = hookResult;
  57177. else file = new File([hookResult], rawFile.name, { type: rawFile.type });
  57178. doUpload(Object.assign(file, { uid: rawFile.uid }), beforeData);
  57179. };
  57180. const resolveData = async (data, rawFile) => {
  57181. if (isFunction$1(data)) return data(rawFile);
  57182. return data;
  57183. };
  57184. const doUpload = async (rawFile, beforeData) => {
  57185. const { headers, data, method, withCredentials, name: filename, action, onProgress, onSuccess, onError, httpRequest } = props;
  57186. try {
  57187. beforeData = await resolveData(beforeData ?? data, rawFile);
  57188. } catch {
  57189. props.onRemove(rawFile);
  57190. return;
  57191. }
  57192. const { uid } = rawFile;
  57193. const options = {
  57194. headers: headers || {},
  57195. withCredentials,
  57196. file: rawFile,
  57197. data: beforeData,
  57198. method,
  57199. filename,
  57200. action,
  57201. onProgress: (evt) => {
  57202. onProgress(evt, rawFile);
  57203. },
  57204. onSuccess: (res) => {
  57205. onSuccess(res, rawFile);
  57206. delete requests.value[uid];
  57207. },
  57208. onError: (err) => {
  57209. onError(err, rawFile);
  57210. delete requests.value[uid];
  57211. }
  57212. };
  57213. const request = httpRequest(options);
  57214. requests.value[uid] = request;
  57215. if (request instanceof Promise) request.then(options.onSuccess, options.onError);
  57216. };
  57217. const handleChange = (e) => {
  57218. const files = e.target.files;
  57219. if (!files) return;
  57220. uploadFiles(Array.from(files));
  57221. };
  57222. const handleClick = () => {
  57223. if (!disabled.value) {
  57224. inputRef.value.value = "";
  57225. inputRef.value.click();
  57226. }
  57227. };
  57228. const handleKeydown = () => {
  57229. handleClick();
  57230. };
  57231. const abort = (file) => {
  57232. entriesOf(requests.value).filter(file ? ([uid]) => String(file.uid) === uid : () => true).forEach(([uid, req]) => {
  57233. if (req instanceof XMLHttpRequest) req.abort();
  57234. delete requests.value[uid];
  57235. });
  57236. };
  57237. __expose({
  57238. abort,
  57239. upload
  57240. });
  57241. return (_ctx, _cache) => {
  57242. return openBlock(), createElementBlock("div", {
  57243. class: normalizeClass([
  57244. unref(ns).b(),
  57245. unref(ns).m(__props.listType),
  57246. unref(ns).is("drag", __props.drag),
  57247. unref(ns).is("disabled", unref(disabled))
  57248. ]),
  57249. tabindex: unref(disabled) ? void 0 : 0,
  57250. "aria-disabled": unref(disabled),
  57251. role: "button",
  57252. onClick: handleClick,
  57253. onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"])
  57254. }, [__props.drag ? (openBlock(), createBlock(upload_dragger_default, {
  57255. key: 0,
  57256. disabled: unref(disabled),
  57257. directory: __props.directory,
  57258. onFile: uploadFiles
  57259. }, {
  57260. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  57261. _: 3
  57262. }, 8, ["disabled", "directory"])) : renderSlot(_ctx.$slots, "default", { key: 1 }), createBaseVNode("input", {
  57263. ref_key: "inputRef",
  57264. ref: inputRef,
  57265. class: normalizeClass(unref(ns).e("input")),
  57266. name: __props.name,
  57267. disabled: unref(disabled),
  57268. multiple: __props.multiple,
  57269. accept: __props.accept,
  57270. webkitdirectory: __props.directory || void 0,
  57271. type: "file",
  57272. onChange: handleChange,
  57273. onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
  57274. }, null, 42, _hoisted_2$5)], 42, _hoisted_1$9);
  57275. };
  57276. }
  57277. });
  57278. //#endregion
  57279. //#region node_modules/element-plus/es/components/upload/src/use-handlers.mjs
  57280. var SCOPE$2 = "ElUpload";
  57281. var revokeFileObjectURL = (file) => {
  57282. if (file.url?.startsWith("blob:")) URL.revokeObjectURL(file.url);
  57283. };
  57284. var useHandlers = (props, uploadRef) => {
  57285. const uploadFiles = useVModel(props, "fileList", void 0, { passive: true });
  57286. const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid);
  57287. function abort(file) {
  57288. uploadRef.value?.abort(file);
  57289. }
  57290. function clearFiles(states = [
  57291. "ready",
  57292. "uploading",
  57293. "success",
  57294. "fail"
  57295. ]) {
  57296. uploadFiles.value = uploadFiles.value.filter((row) => !states.includes(row.status));
  57297. }
  57298. function removeFile(file) {
  57299. uploadFiles.value = uploadFiles.value.filter((uploadFile) => uploadFile.uid !== file.uid);
  57300. }
  57301. const emitChange = (file) => {
  57302. nextTick(() => props.onChange(file, uploadFiles.value));
  57303. };
  57304. const handleError = (err, rawFile) => {
  57305. const file = getFile(rawFile);
  57306. if (!file) return;
  57307. console.error(err);
  57308. file.status = "fail";
  57309. removeFile(file);
  57310. props.onError(err, file, uploadFiles.value);
  57311. emitChange(file);
  57312. };
  57313. const handleProgress = (evt, rawFile) => {
  57314. const file = getFile(rawFile);
  57315. if (!file) return;
  57316. props.onProgress(evt, file, uploadFiles.value);
  57317. file.status = "uploading";
  57318. file.percentage = Math.round(evt.percent);
  57319. };
  57320. const handleSuccess = (response, rawFile) => {
  57321. const file = getFile(rawFile);
  57322. if (!file) return;
  57323. file.status = "success";
  57324. file.response = response;
  57325. props.onSuccess(response, file, uploadFiles.value);
  57326. emitChange(file);
  57327. };
  57328. const handleStart = (file) => {
  57329. if (isNil(file.uid)) file.uid = genFileId();
  57330. const uploadFile = {
  57331. name: file.name,
  57332. percentage: 0,
  57333. status: "ready",
  57334. size: file.size,
  57335. raw: file,
  57336. uid: file.uid
  57337. };
  57338. if (props.listType === "picture-card" || props.listType === "picture") try {
  57339. uploadFile.url = URL.createObjectURL(file);
  57340. } catch (err) {
  57341. debugWarn(SCOPE$2, err.message);
  57342. props.onError(err, uploadFile, uploadFiles.value);
  57343. }
  57344. uploadFiles.value = [...uploadFiles.value, uploadFile];
  57345. emitChange(uploadFile);
  57346. };
  57347. const handleRemove = async (file) => {
  57348. const uploadFile = file instanceof File ? getFile(file) : file;
  57349. if (!uploadFile) throwError(SCOPE$2, "file to be removed not found");
  57350. const doRemove = (file) => {
  57351. abort(file);
  57352. removeFile(file);
  57353. props.onRemove(file, uploadFiles.value);
  57354. revokeFileObjectURL(file);
  57355. };
  57356. if (props.beforeRemove) {
  57357. if (await props.beforeRemove(uploadFile, uploadFiles.value) !== false) doRemove(uploadFile);
  57358. } else doRemove(uploadFile);
  57359. };
  57360. function submit() {
  57361. uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => raw && uploadRef.value?.upload(raw));
  57362. }
  57363. watch(() => props.listType, (val) => {
  57364. if (val !== "picture-card" && val !== "picture") return;
  57365. uploadFiles.value = uploadFiles.value.map((file) => {
  57366. const { raw, url } = file;
  57367. if (!url && raw) try {
  57368. file.url = URL.createObjectURL(raw);
  57369. } catch (err) {
  57370. props.onError(err, file, uploadFiles.value);
  57371. }
  57372. return file;
  57373. });
  57374. });
  57375. watch(uploadFiles, (files) => {
  57376. for (const file of files) {
  57377. file.uid ||= genFileId();
  57378. file.status ||= "success";
  57379. }
  57380. }, {
  57381. immediate: true,
  57382. deep: true
  57383. });
  57384. return {
  57385. /** @description two-way binding ref from props `fileList` */
  57386. uploadFiles,
  57387. abort,
  57388. clearFiles,
  57389. handleError,
  57390. handleProgress,
  57391. handleStart,
  57392. handleSuccess,
  57393. handleRemove,
  57394. submit,
  57395. revokeFileObjectURL
  57396. };
  57397. };
  57398. //#endregion
  57399. //#region node_modules/element-plus/es/components/upload/index.mjs
  57400. var ElUpload = withInstall(/* @__PURE__ */ defineComponent({
  57401. name: "ElUpload",
  57402. __name: "upload",
  57403. props: uploadProps,
  57404. setup(__props, { expose: __expose }) {
  57405. const props = __props;
  57406. const disabled = useFormDisabled();
  57407. const uploadRef = shallowRef();
  57408. const { abort, submit, clearFiles, uploadFiles, handleStart, handleError, handleRemove, handleSuccess, handleProgress, revokeFileObjectURL } = useHandlers(props, uploadRef);
  57409. const isPictureCard = computed(() => props.listType === "picture-card");
  57410. const uploadContentProps = computed(() => ({
  57411. ...props,
  57412. fileList: uploadFiles.value,
  57413. onStart: handleStart,
  57414. onProgress: handleProgress,
  57415. onSuccess: handleSuccess,
  57416. onError: handleError,
  57417. onRemove: handleRemove
  57418. }));
  57419. onBeforeUnmount(() => {
  57420. uploadFiles.value.forEach(revokeFileObjectURL);
  57421. });
  57422. provide(uploadContextKey, { accept: toRef(props, "accept") });
  57423. __expose({
  57424. /** @description cancel upload request */
  57425. abort,
  57426. /** @description upload the file list manually */
  57427. submit,
  57428. /** @description clear the file list */
  57429. clearFiles,
  57430. /** @description select the file manually */
  57431. handleStart,
  57432. /** @description remove the file manually */
  57433. handleRemove
  57434. });
  57435. return (_ctx, _cache) => {
  57436. return openBlock(), createElementBlock("div", null, [
  57437. isPictureCard.value && __props.showFileList ? (openBlock(), createBlock(upload_list_default, {
  57438. key: 0,
  57439. disabled: unref(disabled),
  57440. "list-type": __props.listType,
  57441. files: unref(uploadFiles),
  57442. crossorigin: __props.crossorigin,
  57443. "handle-preview": __props.onPreview,
  57444. onRemove: unref(handleRemove)
  57445. }, createSlots({
  57446. append: withCtx(() => [createVNode(upload_content_default, mergeProps({
  57447. ref_key: "uploadRef",
  57448. ref: uploadRef
  57449. }, uploadContentProps.value), {
  57450. default: withCtx(() => [_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)]),
  57451. _: 3
  57452. }, 16)]),
  57453. _: 2
  57454. }, [_ctx.$slots.file ? {
  57455. name: "default",
  57456. fn: withCtx(({ file, index }) => [renderSlot(_ctx.$slots, "file", {
  57457. file,
  57458. index
  57459. })]),
  57460. key: "0"
  57461. } : void 0]), 1032, [
  57462. "disabled",
  57463. "list-type",
  57464. "files",
  57465. "crossorigin",
  57466. "handle-preview",
  57467. "onRemove"
  57468. ])) : createCommentVNode("v-if", true),
  57469. !isPictureCard.value || isPictureCard.value && !__props.showFileList ? (openBlock(), createBlock(upload_content_default, mergeProps({
  57470. key: 1,
  57471. ref_key: "uploadRef",
  57472. ref: uploadRef
  57473. }, uploadContentProps.value), {
  57474. default: withCtx(() => [_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)]),
  57475. _: 3
  57476. }, 16)) : createCommentVNode("v-if", true),
  57477. _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
  57478. renderSlot(_ctx.$slots, "tip"),
  57479. !isPictureCard.value && __props.showFileList ? (openBlock(), createBlock(upload_list_default, {
  57480. key: 3,
  57481. disabled: unref(disabled),
  57482. "list-type": __props.listType,
  57483. files: unref(uploadFiles),
  57484. crossorigin: __props.crossorigin,
  57485. "handle-preview": __props.onPreview,
  57486. onRemove: unref(handleRemove)
  57487. }, createSlots({ _: 2 }, [_ctx.$slots.file ? {
  57488. name: "default",
  57489. fn: withCtx(({ file, index }) => [renderSlot(_ctx.$slots, "file", {
  57490. file,
  57491. index
  57492. })]),
  57493. key: "0"
  57494. } : void 0]), 1032, [
  57495. "disabled",
  57496. "list-type",
  57497. "files",
  57498. "crossorigin",
  57499. "handle-preview",
  57500. "onRemove"
  57501. ])) : createCommentVNode("v-if", true)
  57502. ]);
  57503. };
  57504. }
  57505. }));
  57506. //#endregion
  57507. //#region node_modules/element-plus/es/components/watermark/src/watermark.mjs
  57508. /**
  57509. * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead.
  57510. */
  57511. var watermarkProps = buildProps({
  57512. /**
  57513. * @description The z-index of the appended watermark element
  57514. */
  57515. zIndex: {
  57516. type: Number,
  57517. default: 9
  57518. },
  57519. /**
  57520. * @description The rotation angle of the watermark
  57521. */
  57522. rotate: {
  57523. type: Number,
  57524. default: -22
  57525. },
  57526. /**
  57527. * @description The width of the watermark
  57528. */
  57529. width: Number,
  57530. /**
  57531. * @description The height of the watermark
  57532. */
  57533. height: Number,
  57534. /**
  57535. * @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)
  57536. */
  57537. image: String,
  57538. /**
  57539. * @description Watermark text content
  57540. */
  57541. content: {
  57542. type: definePropType([String, Array]),
  57543. default: "Element Plus"
  57544. },
  57545. /**
  57546. * @description Text style
  57547. */
  57548. font: { type: definePropType(Object) },
  57549. /**
  57550. * @description The spacing between watermarks
  57551. */
  57552. gap: {
  57553. type: definePropType(Array),
  57554. default: () => [100, 100]
  57555. },
  57556. /**
  57557. * @description The offset of the watermark from the upper left corner of the container. The default is gap/2
  57558. */
  57559. offset: { type: definePropType(Array) }
  57560. });
  57561. //#endregion
  57562. //#region node_modules/element-plus/es/components/watermark/src/utils.mjs
  57563. /** converting camel-cased strings to be lowercase and link it with Separator */
  57564. function toLowercaseSeparator(key) {
  57565. return key.replace(/([A-Z])/g, "-$1").toLowerCase();
  57566. }
  57567. function getStyleStr(style) {
  57568. return Object.keys(style).map((key) => `${toLowercaseSeparator(key)}: ${style[key]};`).join(" ");
  57569. }
  57570. /** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
  57571. function getPixelRatio() {
  57572. return window.devicePixelRatio || 1;
  57573. }
  57574. /** Whether to re-render the watermark */
  57575. var reRendering = (mutation, watermarkElement) => {
  57576. let flag = false;
  57577. if (mutation.removedNodes.length && watermarkElement) flag = Array.from(mutation.removedNodes).includes(watermarkElement);
  57578. if (mutation.type === "attributes" && mutation.target === watermarkElement) flag = true;
  57579. return flag;
  57580. };
  57581. //#endregion
  57582. //#region node_modules/element-plus/es/components/watermark/src/useClips.mjs
  57583. var TEXT_ALIGN_RATIO_MAP = {
  57584. left: [0, .5],
  57585. start: [0, .5],
  57586. center: [.5, 0],
  57587. right: [1, -.5],
  57588. end: [1, -.5]
  57589. };
  57590. function prepareCanvas(width, height, ratio = 1) {
  57591. const canvas = document.createElement("canvas");
  57592. const ctx = canvas.getContext("2d");
  57593. const realWidth = width * ratio;
  57594. const realHeight = height * ratio;
  57595. canvas.setAttribute("width", `${realWidth}px`);
  57596. canvas.setAttribute("height", `${realHeight}px`);
  57597. ctx.save();
  57598. return [
  57599. ctx,
  57600. canvas,
  57601. realWidth,
  57602. realHeight
  57603. ];
  57604. }
  57605. /**
  57606. * Get the clips of text content.
  57607. * This is a lazy hook function since SSR no need this
  57608. */
  57609. function useClips() {
  57610. function getClips(content, rotate, ratio, width, height, font, gapX, gapY, space) {
  57611. const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
  57612. let baselineOffset = 0;
  57613. if (content instanceof HTMLImageElement) ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
  57614. else {
  57615. const { color, fontSize, fontStyle, fontWeight, fontFamily, textAlign, textBaseline } = font;
  57616. const mergedFontSize = Number(fontSize) * ratio;
  57617. ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
  57618. ctx.fillStyle = color;
  57619. ctx.textAlign = textAlign;
  57620. ctx.textBaseline = textBaseline;
  57621. const contents = isArray$1(content) ? content : [content];
  57622. if (textBaseline !== "top" && contents[0]) {
  57623. const argumentMetrics = ctx.measureText(contents[0]);
  57624. ctx.textBaseline = "top";
  57625. const topMetrics = ctx.measureText(contents[0]);
  57626. baselineOffset = argumentMetrics.actualBoundingBoxAscent - topMetrics.actualBoundingBoxAscent;
  57627. }
  57628. contents?.forEach((item, index) => {
  57629. const [alignRatio, spaceRatio] = TEXT_ALIGN_RATIO_MAP[textAlign];
  57630. ctx.fillText(item ?? "", contentWidth * alignRatio + space * spaceRatio, index * (mergedFontSize + font.fontGap * ratio));
  57631. });
  57632. }
  57633. const angle = Math.PI / 180 * Number(rotate);
  57634. const maxSize = Math.max(width, height);
  57635. const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
  57636. rCtx.translate(realMaxSize / 2, realMaxSize / 2);
  57637. rCtx.rotate(angle);
  57638. if (contentWidth > 0 && contentHeight > 0) rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
  57639. function getRotatePos(x, y) {
  57640. return [x * Math.cos(angle) - y * Math.sin(angle), x * Math.sin(angle) + y * Math.cos(angle)];
  57641. }
  57642. let left = 0;
  57643. let right = 0;
  57644. let top = 0;
  57645. let bottom = 0;
  57646. const halfWidth = contentWidth / 2;
  57647. const halfHeight = contentHeight / 2;
  57648. [
  57649. [0 - halfWidth, 0 - halfHeight],
  57650. [0 + halfWidth, 0 - halfHeight],
  57651. [0 + halfWidth, 0 + halfHeight],
  57652. [0 - halfWidth, 0 + halfHeight]
  57653. ].forEach(([x, y]) => {
  57654. const [targetX, targetY] = getRotatePos(x, y);
  57655. left = Math.min(left, targetX);
  57656. right = Math.max(right, targetX);
  57657. top = Math.min(top, targetY);
  57658. bottom = Math.max(bottom, targetY);
  57659. });
  57660. const cutLeft = left + realMaxSize / 2;
  57661. const cutTop = top + realMaxSize / 2;
  57662. const cutWidth = right - left;
  57663. const cutHeight = bottom - top;
  57664. const realGapX = gapX * ratio;
  57665. const realGapY = gapY * ratio;
  57666. const filledWidth = (cutWidth + realGapX) * 2;
  57667. const filledHeight = cutHeight + realGapY;
  57668. const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
  57669. function drawImg(targetX = 0, targetY = 0) {
  57670. fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY + baselineOffset, cutWidth, cutHeight);
  57671. }
  57672. drawImg();
  57673. drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
  57674. drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
  57675. return [
  57676. fCanvas.toDataURL(),
  57677. filledWidth / ratio,
  57678. filledHeight / ratio
  57679. ];
  57680. }
  57681. return getClips;
  57682. }
  57683. //#endregion
  57684. //#region node_modules/element-plus/es/components/watermark/index.mjs
  57685. var ElWatermark = withInstall(/* @__PURE__ */ defineComponent({
  57686. name: "ElWatermark",
  57687. __name: "watermark",
  57688. props: watermarkProps,
  57689. setup(__props) {
  57690. const style = { position: "relative" };
  57691. const props = __props;
  57692. const fontGap = computed(() => props.font?.fontGap ?? 3);
  57693. const color = computed(() => props.font?.color ?? "rgba(0,0,0,.15)");
  57694. const fontSize = computed(() => props.font?.fontSize ?? 16);
  57695. const fontWeight = computed(() => props.font?.fontWeight ?? "normal");
  57696. const fontStyle = computed(() => props.font?.fontStyle ?? "normal");
  57697. const fontFamily = computed(() => props.font?.fontFamily ?? "sans-serif");
  57698. const textAlign = computed(() => props.font?.textAlign ?? "center");
  57699. const textBaseline = computed(() => props.font?.textBaseline ?? "hanging");
  57700. const gapX = computed(() => props.gap[0]);
  57701. const gapY = computed(() => props.gap[1]);
  57702. const gapXCenter = computed(() => gapX.value / 2);
  57703. const gapYCenter = computed(() => gapY.value / 2);
  57704. const offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value);
  57705. const offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value);
  57706. const getMarkStyle = () => {
  57707. const markStyle = {
  57708. zIndex: props.zIndex,
  57709. position: "absolute",
  57710. left: 0,
  57711. top: 0,
  57712. width: "100%",
  57713. height: "100%",
  57714. pointerEvents: "none",
  57715. backgroundRepeat: "repeat"
  57716. };
  57717. /** Calculate the style of the offset */
  57718. let positionLeft = offsetLeft.value - gapXCenter.value;
  57719. let positionTop = offsetTop.value - gapYCenter.value;
  57720. if (positionLeft > 0) {
  57721. markStyle.left = `${positionLeft}px`;
  57722. markStyle.width = `calc(100% - ${positionLeft}px)`;
  57723. positionLeft = 0;
  57724. }
  57725. if (positionTop > 0) {
  57726. markStyle.top = `${positionTop}px`;
  57727. markStyle.height = `calc(100% - ${positionTop}px)`;
  57728. positionTop = 0;
  57729. }
  57730. markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
  57731. return markStyle;
  57732. };
  57733. const containerRef = shallowRef(null);
  57734. const watermarkRef = shallowRef();
  57735. const stopObservation = ref(false);
  57736. const destroyWatermark = () => {
  57737. if (watermarkRef.value) {
  57738. watermarkRef.value.remove();
  57739. watermarkRef.value = void 0;
  57740. }
  57741. };
  57742. const appendWatermark = (base64Url, markWidth) => {
  57743. if (containerRef.value && watermarkRef.value) {
  57744. stopObservation.value = true;
  57745. watermarkRef.value.setAttribute("style", getStyleStr({
  57746. ...getMarkStyle(),
  57747. backgroundImage: `url('${base64Url}')`,
  57748. backgroundSize: `${Math.floor(markWidth)}px`
  57749. }));
  57750. containerRef.value?.append(watermarkRef.value);
  57751. setTimeout(() => {
  57752. stopObservation.value = false;
  57753. });
  57754. }
  57755. };
  57756. /**
  57757. * Get the width and height of the watermark. The default values are as follows
  57758. * Image: [120, 64]; Content: It's calculated by content;
  57759. */
  57760. const getMarkSize = (ctx) => {
  57761. let defaultWidth = 120;
  57762. let defaultHeight = 64;
  57763. let space = 0;
  57764. const { image, content, width, height, rotate } = props;
  57765. if (!image && ctx.measureText) {
  57766. ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
  57767. const contents = isArray$1(content) ? content : [content];
  57768. let maxWidth = 0;
  57769. let maxHeight = 0;
  57770. contents.forEach((item) => {
  57771. const { width, fontBoundingBoxAscent, fontBoundingBoxDescent, actualBoundingBoxAscent, actualBoundingBoxDescent } = ctx.measureText(item);
  57772. const height = isUndefined(fontBoundingBoxAscent) ? actualBoundingBoxAscent + actualBoundingBoxDescent : fontBoundingBoxAscent + fontBoundingBoxDescent;
  57773. if (width > maxWidth) maxWidth = Math.ceil(width);
  57774. if (height > maxHeight) maxHeight = Math.ceil(height);
  57775. });
  57776. defaultWidth = maxWidth;
  57777. defaultHeight = maxHeight * contents.length + (contents.length - 1) * fontGap.value;
  57778. const angle = Math.PI / 180 * Number(rotate);
  57779. space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2);
  57780. defaultWidth += space;
  57781. }
  57782. return [
  57783. width ?? defaultWidth,
  57784. height ?? defaultHeight,
  57785. space
  57786. ];
  57787. };
  57788. const getClips = useClips();
  57789. const renderWatermark = () => {
  57790. const ctx = document.createElement("canvas").getContext("2d");
  57791. const image = props.image;
  57792. const content = props.content;
  57793. const rotate = props.rotate;
  57794. if (ctx) {
  57795. if (!watermarkRef.value) watermarkRef.value = document.createElement("div");
  57796. const ratio = getPixelRatio();
  57797. const [markWidth, markHeight, space] = getMarkSize(ctx);
  57798. const drawCanvas = (drawContent) => {
  57799. const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
  57800. color: color.value,
  57801. fontSize: fontSize.value,
  57802. fontStyle: fontStyle.value,
  57803. fontWeight: fontWeight.value,
  57804. fontFamily: fontFamily.value,
  57805. fontGap: fontGap.value,
  57806. textAlign: textAlign.value,
  57807. textBaseline: textBaseline.value
  57808. }, gapX.value, gapY.value, space);
  57809. appendWatermark(textClips, clipWidth);
  57810. };
  57811. if (image) {
  57812. const img = new Image();
  57813. img.onload = () => {
  57814. drawCanvas(img);
  57815. };
  57816. img.onerror = () => {
  57817. drawCanvas(content);
  57818. };
  57819. img.crossOrigin = "anonymous";
  57820. img.referrerPolicy = "no-referrer";
  57821. img.src = image;
  57822. } else drawCanvas(content);
  57823. }
  57824. };
  57825. onMounted(() => {
  57826. renderWatermark();
  57827. });
  57828. watch(() => props, () => {
  57829. renderWatermark();
  57830. }, {
  57831. deep: true,
  57832. flush: "post"
  57833. });
  57834. onBeforeUnmount(() => {
  57835. destroyWatermark();
  57836. });
  57837. const onMutate = (mutations) => {
  57838. if (stopObservation.value) return;
  57839. mutations.forEach((mutation) => {
  57840. if (reRendering(mutation, watermarkRef.value)) {
  57841. destroyWatermark();
  57842. renderWatermark();
  57843. }
  57844. });
  57845. };
  57846. useMutationObserver(containerRef, onMutate, {
  57847. attributes: true,
  57848. subtree: true,
  57849. childList: true
  57850. });
  57851. return (_ctx, _cache) => {
  57852. return openBlock(), createElementBlock("div", {
  57853. ref_key: "containerRef",
  57854. ref: containerRef,
  57855. style: normalizeStyle([style])
  57856. }, [renderSlot(_ctx.$slots, "default")], 4);
  57857. };
  57858. }
  57859. }));
  57860. //#endregion
  57861. //#region node_modules/element-plus/es/components/tour/src/content.mjs
  57862. var tourStrategies = ["absolute", "fixed"];
  57863. var tourPlacements = [
  57864. "top-start",
  57865. "top-end",
  57866. "top",
  57867. "bottom-start",
  57868. "bottom-end",
  57869. "bottom",
  57870. "left-start",
  57871. "left-end",
  57872. "left",
  57873. "right-start",
  57874. "right-end",
  57875. "right"
  57876. ];
  57877. /**
  57878. * @deprecated Removed after 3.0.0, Use `TourContentProps` instead.
  57879. */
  57880. var tourContentProps = buildProps({
  57881. /**
  57882. * @description position of the guide card relative to the target element
  57883. */
  57884. placement: {
  57885. type: definePropType(String),
  57886. values: tourPlacements,
  57887. default: "bottom"
  57888. },
  57889. /**
  57890. * @description the reference dom
  57891. */
  57892. reference: {
  57893. type: definePropType(Object),
  57894. default: null
  57895. },
  57896. /**
  57897. * @description position strategy of the content
  57898. */
  57899. strategy: {
  57900. type: definePropType(String),
  57901. values: tourStrategies,
  57902. default: "absolute"
  57903. },
  57904. /**
  57905. * @description offset of the arrow
  57906. */
  57907. offset: {
  57908. type: Number,
  57909. default: 10
  57910. },
  57911. /**
  57912. * @description whether to show the arrow
  57913. */
  57914. showArrow: Boolean,
  57915. /**
  57916. * @description content's zIndex
  57917. */
  57918. zIndex: {
  57919. type: Number,
  57920. default: 2001
  57921. }
  57922. });
  57923. var tourContentEmits = { close: () => true };
  57924. //#endregion
  57925. //#region node_modules/element-plus/es/components/tour/src/tour.mjs
  57926. /**
  57927. * @deprecated Removed after 3.0.0, Use `TourProps` instead.
  57928. */
  57929. var tourProps = buildProps({
  57930. /**
  57931. * @description open tour
  57932. */
  57933. modelValue: Boolean,
  57934. /**
  57935. * @description what is the current step
  57936. */
  57937. current: {
  57938. type: Number,
  57939. default: 0
  57940. },
  57941. /**
  57942. * @description whether to show the arrow
  57943. */
  57944. showArrow: {
  57945. type: Boolean,
  57946. default: true
  57947. },
  57948. /**
  57949. * @description whether to show a close button
  57950. */
  57951. showClose: {
  57952. type: Boolean,
  57953. default: true
  57954. },
  57955. /**
  57956. * @description custom close icon
  57957. */
  57958. closeIcon: { type: iconPropType },
  57959. /**
  57960. * @description position of the guide card relative to the target element
  57961. */
  57962. placement: tourContentProps.placement,
  57963. /**
  57964. * @description custom style for content
  57965. */
  57966. contentStyle: { type: definePropType([Object]) },
  57967. /**
  57968. * @description whether to enable masking, change mask style and fill color by pass custom props
  57969. */
  57970. mask: {
  57971. type: definePropType([Boolean, Object]),
  57972. default: true
  57973. },
  57974. /**
  57975. * @description transparent gap between mask and target
  57976. */
  57977. gap: {
  57978. type: definePropType(Object),
  57979. default: () => ({
  57980. offset: 6,
  57981. radius: 2
  57982. })
  57983. },
  57984. /**
  57985. * @description tour's zIndex
  57986. */
  57987. zIndex: { type: Number },
  57988. /**
  57989. * @description support pass custom scrollIntoView options
  57990. */
  57991. scrollIntoViewOptions: {
  57992. type: definePropType([Boolean, Object]),
  57993. default: () => ({ block: "center" })
  57994. },
  57995. /**
  57996. * @description type, affects the background color and text color
  57997. */
  57998. type: { type: definePropType(String) },
  57999. /**
  58000. * @description which element the TourContent appends to
  58001. */
  58002. appendTo: {
  58003. type: definePropType([String, Object]),
  58004. default: "body"
  58005. },
  58006. /**
  58007. * @description whether the Tour can be closed by pressing ESC
  58008. */
  58009. closeOnPressEscape: {
  58010. type: Boolean,
  58011. default: true
  58012. },
  58013. /**
  58014. * @description whether the target element can be clickable, when using mask
  58015. */
  58016. targetAreaClickable: {
  58017. type: Boolean,
  58018. default: true
  58019. }
  58020. });
  58021. var tourEmits = {
  58022. [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
  58023. ["update:current"]: (current) => isNumber(current),
  58024. close: (current) => isNumber(current),
  58025. finish: () => true,
  58026. change: (current) => isNumber(current)
  58027. };
  58028. //#endregion
  58029. //#region node_modules/element-plus/es/components/tour/src/step.mjs
  58030. /**
  58031. * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
  58032. */
  58033. var tourStepProps = buildProps({
  58034. /**
  58035. * @description get the element the guide card points to. empty makes it show in center of screen
  58036. */
  58037. target: { type: definePropType([
  58038. String,
  58039. Object,
  58040. Function
  58041. ]) },
  58042. /**
  58043. * @description the title of the tour content
  58044. */
  58045. title: String,
  58046. /**
  58047. * @description description
  58048. */
  58049. description: String,
  58050. /**
  58051. * @description whether to show a close button
  58052. */
  58053. showClose: {
  58054. type: Boolean,
  58055. default: void 0
  58056. },
  58057. /**
  58058. * @description custom close icon, default is Close
  58059. */
  58060. closeIcon: { type: iconPropType },
  58061. /**
  58062. * @description whether to show the arrow
  58063. */
  58064. showArrow: {
  58065. type: Boolean,
  58066. default: void 0
  58067. },
  58068. /**
  58069. * @description position of the guide card relative to the target element
  58070. */
  58071. placement: tourContentProps.placement,
  58072. /**
  58073. * @description whether to enable masking, change mask style and fill color by pass custom props
  58074. */
  58075. mask: {
  58076. type: definePropType([Boolean, Object]),
  58077. default: void 0
  58078. },
  58079. /**
  58080. * @description custom style for content
  58081. */
  58082. contentStyle: { type: definePropType([Object]) },
  58083. /**
  58084. * @description properties of the previous button
  58085. */
  58086. prevButtonProps: { type: definePropType(Object) },
  58087. /**
  58088. * @description properties of the Next button
  58089. */
  58090. nextButtonProps: { type: definePropType(Object) },
  58091. /**
  58092. * @description support pass custom scrollIntoView options
  58093. */
  58094. scrollIntoViewOptions: {
  58095. type: definePropType([Boolean, Object]),
  58096. default: void 0
  58097. },
  58098. /**
  58099. * @description type, affects the background color and text color
  58100. */
  58101. type: { type: definePropType(String) }
  58102. });
  58103. var tourStepEmits = { close: () => true };
  58104. //#endregion
  58105. //#region node_modules/element-plus/es/components/tour/src/helper.mjs
  58106. var useTarget = (target, open, gap, mergedMask, scrollIntoViewOptions) => {
  58107. const posInfo = ref(null);
  58108. const getTargetEl = () => {
  58109. let targetEl;
  58110. if (isString(target.value)) targetEl = document.querySelector(target.value);
  58111. else if (isFunction$1(target.value)) targetEl = target.value();
  58112. else targetEl = target.value;
  58113. return targetEl;
  58114. };
  58115. const updatePosInfo = () => {
  58116. const targetEl = getTargetEl();
  58117. if (!targetEl || !open.value) {
  58118. posInfo.value = null;
  58119. return;
  58120. }
  58121. if (!isInViewPort(targetEl)) targetEl.scrollIntoView(scrollIntoViewOptions.value);
  58122. const { left, top, width, height } = targetEl.getBoundingClientRect();
  58123. posInfo.value = {
  58124. left,
  58125. top,
  58126. width,
  58127. height,
  58128. radius: 0
  58129. };
  58130. };
  58131. onMounted(() => {
  58132. watch([open, target], () => {
  58133. updatePosInfo();
  58134. }, { immediate: true });
  58135. window.addEventListener("resize", updatePosInfo);
  58136. });
  58137. onBeforeUnmount(() => {
  58138. window.removeEventListener("resize", updatePosInfo);
  58139. });
  58140. const getGapOffset = (index) => (isArray$1(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ?? 6;
  58141. const mergedPosInfo = computed(() => {
  58142. if (!posInfo.value) return posInfo.value;
  58143. const gapOffsetX = getGapOffset(0);
  58144. const gapOffsetY = getGapOffset(1);
  58145. const gapRadius = gap.value?.radius || 2;
  58146. return {
  58147. left: posInfo.value.left - gapOffsetX,
  58148. top: posInfo.value.top - gapOffsetY,
  58149. width: posInfo.value.width + gapOffsetX * 2,
  58150. height: posInfo.value.height + gapOffsetY * 2,
  58151. radius: gapRadius
  58152. };
  58153. });
  58154. return {
  58155. mergedPosInfo,
  58156. triggerTarget: computed(() => {
  58157. const targetEl = getTargetEl();
  58158. if (!mergedMask.value || !targetEl || !window.DOMRect) return targetEl || void 0;
  58159. return { getBoundingClientRect() {
  58160. return window.DOMRect.fromRect({
  58161. width: mergedPosInfo.value?.width || 0,
  58162. height: mergedPosInfo.value?.height || 0,
  58163. x: mergedPosInfo.value?.left || 0,
  58164. y: mergedPosInfo.value?.top || 0
  58165. });
  58166. } };
  58167. })
  58168. };
  58169. };
  58170. var tourKey = Symbol("ElTour");
  58171. function isInViewPort(element) {
  58172. const viewWidth = window.innerWidth || document.documentElement.clientWidth;
  58173. const viewHeight = window.innerHeight || document.documentElement.clientHeight;
  58174. const { top, right, bottom, left } = element.getBoundingClientRect();
  58175. return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
  58176. }
  58177. var useFloating$1 = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex, showArrow) => {
  58178. const x = ref();
  58179. const y = ref();
  58180. const middlewareData = ref({});
  58181. const states = {
  58182. x,
  58183. y,
  58184. placement,
  58185. strategy,
  58186. middlewareData
  58187. };
  58188. const middleware = computed(() => {
  58189. const _middleware = [
  58190. offset(unref(offset$1)),
  58191. flip(),
  58192. shift(),
  58193. overflowMiddleware()
  58194. ];
  58195. if (unref(showArrow) && unref(arrowRef)) _middleware.push(arrow({ element: unref(arrowRef) }));
  58196. return _middleware;
  58197. });
  58198. const update = async () => {
  58199. if (!isClient) return;
  58200. const referenceEl = unref(referenceRef);
  58201. const contentEl = unref(contentRef);
  58202. if (!referenceEl || !contentEl) return;
  58203. const data = await computePosition(referenceEl, contentEl, {
  58204. placement: unref(placement),
  58205. strategy: unref(strategy),
  58206. middleware: unref(middleware)
  58207. });
  58208. keysOf(states).forEach((key) => {
  58209. states[key].value = data[key];
  58210. });
  58211. };
  58212. const contentStyle = computed(() => {
  58213. if (!unref(referenceRef)) return {
  58214. position: "fixed",
  58215. top: "50%",
  58216. left: "50%",
  58217. transform: "translate3d(-50%, -50%, 0)",
  58218. maxWidth: "100vw",
  58219. zIndex: unref(zIndex)
  58220. };
  58221. const { overflow } = unref(middlewareData);
  58222. return {
  58223. position: unref(strategy),
  58224. zIndex: unref(zIndex),
  58225. top: unref(y) != null ? `${unref(y)}px` : "",
  58226. left: unref(x) != null ? `${unref(x)}px` : "",
  58227. maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : ""
  58228. };
  58229. });
  58230. const arrowStyle = computed(() => {
  58231. if (!unref(showArrow)) return {};
  58232. const { arrow } = unref(middlewareData);
  58233. return {
  58234. left: arrow?.x != null ? `${arrow?.x}px` : "",
  58235. top: arrow?.y != null ? `${arrow?.y}px` : ""
  58236. };
  58237. });
  58238. let cleanup;
  58239. onMounted(() => {
  58240. const referenceEl = unref(referenceRef);
  58241. const contentEl = unref(contentRef);
  58242. if (referenceEl && contentEl) cleanup = autoUpdate(referenceEl, contentEl, update);
  58243. watchEffect(() => {
  58244. update();
  58245. });
  58246. });
  58247. onBeforeUnmount(() => {
  58248. cleanup && cleanup();
  58249. });
  58250. return {
  58251. update,
  58252. contentStyle,
  58253. arrowStyle
  58254. };
  58255. };
  58256. var overflowMiddleware = () => {
  58257. return {
  58258. name: "overflow",
  58259. async fn(state) {
  58260. const overflow = await detectOverflow(state);
  58261. let overWidth = 0;
  58262. if (overflow.left > 0) overWidth = overflow.left;
  58263. if (overflow.right > 0) overWidth = overflow.right;
  58264. return { data: { maxWidth: state.rects.floating.width - overWidth } };
  58265. }
  58266. };
  58267. };
  58268. //#endregion
  58269. //#region node_modules/element-plus/es/components/tour/src/mask.mjs
  58270. /**
  58271. * @deprecated Removed after 3.0.0, Use `MaskProps` instead.
  58272. */
  58273. var maskProps = buildProps({
  58274. /**
  58275. * @description mask's zIndex
  58276. */
  58277. zIndex: {
  58278. type: Number,
  58279. default: 1001
  58280. },
  58281. /**
  58282. * @description whether to show the mask
  58283. */
  58284. visible: Boolean,
  58285. /**
  58286. * @description mask's fill
  58287. */
  58288. fill: {
  58289. type: String,
  58290. default: "rgba(0,0,0,0.5)"
  58291. },
  58292. /***
  58293. * @description mask's transparent space position
  58294. */
  58295. pos: { type: definePropType(Object) },
  58296. /**
  58297. * @description whether the target element can be clickable, when using mask
  58298. */
  58299. targetAreaClickable: {
  58300. type: Boolean,
  58301. default: true
  58302. }
  58303. });
  58304. //#endregion
  58305. //#region node_modules/element-plus/es/components/tour/src/mask.vue_vue_type_script_setup_true_lang.mjs
  58306. var _hoisted_1$8 = { style: {
  58307. width: "100%",
  58308. height: "100%"
  58309. } };
  58310. var _hoisted_2$4 = ["d"];
  58311. //#endregion
  58312. //#region node_modules/element-plus/es/components/tour/src/mask2.mjs
  58313. var mask_default = /* @__PURE__ */ defineComponent({
  58314. name: "ElTourMask",
  58315. inheritAttrs: false,
  58316. __name: "mask",
  58317. props: maskProps,
  58318. setup(__props) {
  58319. const props = __props;
  58320. const { ns } = inject(tourKey);
  58321. const radius = computed(() => props.pos?.radius ?? 2);
  58322. const roundInfo = computed(() => {
  58323. const v = radius.value;
  58324. const baseInfo = `a${v},${v} 0 0 1`;
  58325. return {
  58326. topRight: `${baseInfo} ${v},${v}`,
  58327. bottomRight: `${baseInfo} ${-v},${v}`,
  58328. bottomLeft: `${baseInfo} ${-v},${-v}`,
  58329. topLeft: `${baseInfo} ${v},${-v}`
  58330. };
  58331. });
  58332. const { width: windowWidth, height: windowHeight } = useWindowSize();
  58333. const path = computed(() => {
  58334. const width = windowWidth.value;
  58335. const height = windowHeight.value;
  58336. const info = roundInfo.value;
  58337. const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
  58338. const _radius = radius.value;
  58339. return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
  58340. });
  58341. const maskStyle = computed(() => ({
  58342. position: "fixed",
  58343. left: 0,
  58344. right: 0,
  58345. top: 0,
  58346. bottom: 0,
  58347. zIndex: props.zIndex,
  58348. pointerEvents: props.pos && props.targetAreaClickable ? "none" : "auto"
  58349. }));
  58350. const pathStyle = computed(() => ({
  58351. fill: props.fill,
  58352. pointerEvents: "auto",
  58353. cursor: "auto"
  58354. }));
  58355. useLockscreen(toRef(props, "visible"), { ns });
  58356. return (_ctx, _cache) => {
  58357. return __props.visible ? (openBlock(), createElementBlock("div", mergeProps({
  58358. key: 0,
  58359. class: unref(ns).e("mask"),
  58360. style: maskStyle.value
  58361. }, _ctx.$attrs), [(openBlock(), createElementBlock("svg", _hoisted_1$8, [createBaseVNode("path", {
  58362. class: normalizeClass(unref(ns).e("hollow")),
  58363. style: normalizeStyle(pathStyle.value),
  58364. d: path.value
  58365. }, null, 14, _hoisted_2$4)]))], 16)) : createCommentVNode("v-if", true);
  58366. };
  58367. }
  58368. });
  58369. //#endregion
  58370. //#region node_modules/element-plus/es/components/tour/src/content.vue_vue_type_script_setup_true_lang.mjs
  58371. var _hoisted_1$7 = ["data-side"];
  58372. //#endregion
  58373. //#region node_modules/element-plus/es/components/tour/src/content2.mjs
  58374. var content_default$1 = /* @__PURE__ */ defineComponent({
  58375. name: "ElTourContent",
  58376. __name: "content",
  58377. props: tourContentProps,
  58378. emits: tourContentEmits,
  58379. setup(__props, { emit: __emit }) {
  58380. const props = __props;
  58381. const emit = __emit;
  58382. const placement = ref(props.placement);
  58383. const strategy = ref(props.strategy);
  58384. const contentRef = ref(null);
  58385. const arrowRef = ref(null);
  58386. watch(() => props.placement, () => {
  58387. placement.value = props.placement;
  58388. });
  58389. const { contentStyle, arrowStyle } = useFloating$1(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
  58390. const side = computed(() => {
  58391. return placement.value.split("-")[0];
  58392. });
  58393. const { ns } = inject(tourKey);
  58394. const onCloseRequested = () => {
  58395. emit("close");
  58396. };
  58397. const onFocusoutPrevented = (event) => {
  58398. if (event.detail.focusReason === "pointer") event.preventDefault();
  58399. };
  58400. return (_ctx, _cache) => {
  58401. return openBlock(), createElementBlock("div", {
  58402. ref_key: "contentRef",
  58403. ref: contentRef,
  58404. style: normalizeStyle(unref(contentStyle)),
  58405. class: normalizeClass(unref(ns).e("content")),
  58406. "data-side": side.value,
  58407. tabindex: "-1"
  58408. }, [createVNode(unref(focus_trap_default$1), {
  58409. loop: "",
  58410. trapped: "",
  58411. "focus-start-el": "container",
  58412. "focus-trap-el": contentRef.value || void 0,
  58413. onReleaseRequested: onCloseRequested,
  58414. onFocusoutPrevented
  58415. }, {
  58416. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  58417. _: 3
  58418. }, 8, ["focus-trap-el"]), __props.showArrow ? (openBlock(), createElementBlock("span", {
  58419. key: 0,
  58420. ref_key: "arrowRef",
  58421. ref: arrowRef,
  58422. style: normalizeStyle(unref(arrowStyle)),
  58423. class: normalizeClass(unref(ns).e("arrow"))
  58424. }, null, 6)) : createCommentVNode("v-if", true)], 14, _hoisted_1$7);
  58425. };
  58426. }
  58427. });
  58428. //#endregion
  58429. //#region node_modules/element-plus/es/components/tour/src/steps.mjs
  58430. var steps_default = defineComponent({
  58431. name: "ElTourSteps",
  58432. props: { current: {
  58433. type: Number,
  58434. default: 0
  58435. } },
  58436. emits: ["update-total"],
  58437. setup(props, { slots, emit }) {
  58438. let cacheTotal = 0;
  58439. return () => {
  58440. const children = slots.default?.();
  58441. const result = [];
  58442. let total = 0;
  58443. function filterSteps(children) {
  58444. if (!isArray$1(children)) return;
  58445. children.forEach((item) => {
  58446. if ((item?.type || {})?.name === "ElTourStep") {
  58447. result.push(item);
  58448. total += 1;
  58449. }
  58450. });
  58451. }
  58452. if (children.length) filterSteps(flattedChildren(children[0]?.children));
  58453. if (cacheTotal !== total) {
  58454. cacheTotal = total;
  58455. emit("update-total", total);
  58456. }
  58457. if (result.length) return result[props.current];
  58458. return null;
  58459. };
  58460. }
  58461. });
  58462. //#endregion
  58463. //#region node_modules/element-plus/es/components/tour/src/tour2.mjs
  58464. var tour_default = /* @__PURE__ */ defineComponent({
  58465. name: "ElTour",
  58466. inheritAttrs: false,
  58467. __name: "tour",
  58468. props: tourProps,
  58469. emits: tourEmits,
  58470. setup(__props, { emit: __emit }) {
  58471. const props = __props;
  58472. const emit = __emit;
  58473. const ns = useNamespace("tour");
  58474. const total = ref(0);
  58475. const currentStep = ref();
  58476. const current = useVModel(props, "current", emit, { passive: true });
  58477. const currentTarget = computed(() => currentStep.value?.target);
  58478. const kls = computed(() => [ns.b(), mergedType.value === "primary" ? ns.m("primary") : ""]);
  58479. const mergedPlacement = computed(() => currentStep.value?.placement || props.placement);
  58480. const mergedContentStyle = computed(() => currentStep.value?.contentStyle ?? props.contentStyle);
  58481. const mergedMask = computed(() => currentStep.value?.mask ?? props.mask);
  58482. const mergedShowMask = computed(() => !!mergedMask.value && props.modelValue);
  58483. const mergedMaskStyle = computed(() => isBoolean(mergedMask.value) ? void 0 : mergedMask.value);
  58484. const mergedShowArrow = computed(() => !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow));
  58485. const mergedScrollIntoViewOptions = computed(() => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions);
  58486. const mergedType = computed(() => currentStep.value?.type ?? props.type);
  58487. const { nextZIndex } = useZIndex();
  58488. const nowZIndex = nextZIndex();
  58489. const mergedZIndex = computed(() => props.zIndex ?? nowZIndex);
  58490. const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
  58491. watch(() => props.modelValue, (val) => {
  58492. if (!val) current.value = 0;
  58493. });
  58494. const onEscClose = () => {
  58495. if (props.closeOnPressEscape) {
  58496. emit(UPDATE_MODEL_EVENT, false);
  58497. emit("close", current.value);
  58498. }
  58499. };
  58500. const onUpdateTotal = (val) => {
  58501. total.value = val;
  58502. };
  58503. const slots = useSlots();
  58504. provide(tourKey, {
  58505. currentStep,
  58506. current,
  58507. total,
  58508. showClose: toRef(props, "showClose"),
  58509. closeIcon: toRef(props, "closeIcon"),
  58510. mergedType,
  58511. ns,
  58512. slots,
  58513. updateModelValue(modelValue) {
  58514. emit(UPDATE_MODEL_EVENT, modelValue);
  58515. },
  58516. onClose() {
  58517. emit("close", current.value);
  58518. },
  58519. onFinish() {
  58520. emit("finish");
  58521. },
  58522. onChange() {
  58523. emit(CHANGE_EVENT, current.value);
  58524. }
  58525. });
  58526. return (_ctx, _cache) => {
  58527. return openBlock(), createElementBlock(Fragment, null, [
  58528. (openBlock(), createBlock(Teleport, { to: __props.appendTo }, [createBaseVNode("div", mergeProps({ class: kls.value }, _ctx.$attrs), [createVNode(mask_default, {
  58529. visible: mergedShowMask.value,
  58530. fill: mergedMaskStyle.value?.color,
  58531. style: normalizeStyle(mergedMaskStyle.value?.style),
  58532. pos: unref(pos),
  58533. "z-index": mergedZIndex.value,
  58534. "target-area-clickable": __props.targetAreaClickable
  58535. }, null, 8, [
  58536. "visible",
  58537. "fill",
  58538. "style",
  58539. "pos",
  58540. "z-index",
  58541. "target-area-clickable"
  58542. ]), __props.modelValue ? (openBlock(), createBlock(content_default$1, {
  58543. key: unref(current),
  58544. reference: unref(triggerTarget),
  58545. placement: mergedPlacement.value,
  58546. "show-arrow": mergedShowArrow.value,
  58547. "z-index": mergedZIndex.value,
  58548. style: normalizeStyle(mergedContentStyle.value),
  58549. onClose: onEscClose
  58550. }, {
  58551. default: withCtx(() => [createVNode(unref(steps_default), {
  58552. current: unref(current),
  58553. onUpdateTotal
  58554. }, {
  58555. default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
  58556. _: 3
  58557. }, 8, ["current"])]),
  58558. _: 3
  58559. }, 8, [
  58560. "reference",
  58561. "placement",
  58562. "show-arrow",
  58563. "z-index",
  58564. "style"
  58565. ])) : createCommentVNode("v-if", true)], 16)], 8, ["to"])),
  58566. createCommentVNode(" just for IDE "),
  58567. createCommentVNode("v-if", true)
  58568. ], 64);
  58569. };
  58570. }
  58571. });
  58572. //#endregion
  58573. //#region node_modules/element-plus/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs
  58574. var _hoisted_1$6 = ["aria-label"];
  58575. //#endregion
  58576. //#region node_modules/element-plus/es/components/tour/src/step2.mjs
  58577. var step_default = /* @__PURE__ */ defineComponent({
  58578. name: "ElTourStep",
  58579. __name: "step",
  58580. props: tourStepProps,
  58581. emits: tourStepEmits,
  58582. setup(__props, { emit: __emit }) {
  58583. const props = __props;
  58584. const emit = __emit;
  58585. const { Close } = CloseComponents;
  58586. const { t } = useLocale();
  58587. const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish, onChange } = inject(tourKey);
  58588. watch(props, (val) => {
  58589. currentStep.value = val;
  58590. }, { immediate: true });
  58591. const mergedShowClose = computed(() => props.showClose ?? showClose.value);
  58592. const mergedCloseIcon = computed(() => props.closeIcon ?? closeIcon.value ?? Close);
  58593. const filterButtonProps = (btnProps) => {
  58594. if (!btnProps) return;
  58595. return omit(btnProps, ["children", "onClick"]);
  58596. };
  58597. const onPrev = () => {
  58598. current.value -= 1;
  58599. if (props.prevButtonProps?.onClick) props.prevButtonProps?.onClick();
  58600. onChange();
  58601. };
  58602. const onNext = () => {
  58603. if (current.value >= total.value - 1) onFinish();
  58604. else current.value += 1;
  58605. if (props.nextButtonProps?.onClick) props.nextButtonProps.onClick();
  58606. onChange();
  58607. };
  58608. const onFinish = () => {
  58609. onClose();
  58610. tourOnFinish();
  58611. };
  58612. const onClose = () => {
  58613. updateModelValue(false);
  58614. tourOnClose();
  58615. emit("close");
  58616. };
  58617. const handleKeydown = (e) => {
  58618. if (e.target?.isContentEditable) return;
  58619. switch (getEventCode(e)) {
  58620. case EVENT_CODE.left:
  58621. e.preventDefault();
  58622. current.value > 0 && onPrev();
  58623. break;
  58624. case EVENT_CODE.right:
  58625. e.preventDefault();
  58626. onNext();
  58627. break;
  58628. }
  58629. };
  58630. onMounted(() => {
  58631. window.addEventListener("keydown", handleKeydown);
  58632. });
  58633. onBeforeUnmount(() => {
  58634. window.removeEventListener("keydown", handleKeydown);
  58635. });
  58636. return (_ctx, _cache) => {
  58637. return openBlock(), createElementBlock(Fragment, null, [
  58638. mergedShowClose.value ? (openBlock(), createElementBlock("button", {
  58639. key: 0,
  58640. "aria-label": unref(t)("el.tour.close"),
  58641. class: normalizeClass(unref(ns).e("closebtn")),
  58642. type: "button",
  58643. onClick: onClose
  58644. }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
  58645. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(mergedCloseIcon.value)))]),
  58646. _: 1
  58647. }, 8, ["class"])], 10, _hoisted_1$6)) : createCommentVNode("v-if", true),
  58648. createBaseVNode("header", { class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }]) }, [renderSlot(_ctx.$slots, "header", {}, () => [createBaseVNode("span", {
  58649. role: "heading",
  58650. class: normalizeClass(unref(ns).e("title"))
  58651. }, toDisplayString(__props.title), 3)])], 2),
  58652. createBaseVNode("div", { class: normalizeClass(unref(ns).e("body")) }, [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", null, toDisplayString(__props.description), 1)])], 2),
  58653. createBaseVNode("footer", { class: normalizeClass(unref(ns).e("footer")) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).b("indicators")) }, [unref(tourSlots).indicators ? (openBlock(), createBlock(resolveDynamicComponent(unref(tourSlots).indicators), {
  58654. key: 0,
  58655. current: unref(current),
  58656. total: unref(total)
  58657. }, null, 8, ["current", "total"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(total), (item, index) => {
  58658. return openBlock(), createElementBlock("span", {
  58659. key: item,
  58660. class: normalizeClass([unref(ns).b("indicator"), unref(ns).is("active", index === unref(current))])
  58661. }, null, 2);
  58662. }), 128))], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).b("buttons")) }, [unref(current) > 0 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
  58663. key: 0,
  58664. size: "small",
  58665. type: unref(mergedType)
  58666. }, filterButtonProps(__props.prevButtonProps), { onClick: onPrev }), {
  58667. default: withCtx(() => [createTextVNode(toDisplayString(__props.prevButtonProps?.children ?? unref(t)("el.tour.previous")), 1)]),
  58668. _: 1
  58669. }, 16, ["type"])) : createCommentVNode("v-if", true), unref(current) <= unref(total) - 1 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
  58670. key: 1,
  58671. size: "small",
  58672. type: unref(mergedType) === "primary" ? "default" : "primary"
  58673. }, filterButtonProps(__props.nextButtonProps), { onClick: onNext }), {
  58674. default: withCtx(() => [createTextVNode(toDisplayString(__props.nextButtonProps?.children ?? (unref(current) === unref(total) - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next"))), 1)]),
  58675. _: 1
  58676. }, 16, ["type"])) : createCommentVNode("v-if", true)], 2)], 2)
  58677. ], 64);
  58678. };
  58679. }
  58680. });
  58681. //#endregion
  58682. //#region node_modules/element-plus/es/components/tour/index.mjs
  58683. var ElTour = withInstall(tour_default, { TourStep: step_default });
  58684. var ElTourStep = withNoopInstall(step_default);
  58685. //#endregion
  58686. //#region node_modules/element-plus/es/components/anchor/src/anchor.mjs
  58687. /**
  58688. * @deprecated Removed after 3.0.0, Use `AnchorProps` instead.
  58689. */
  58690. var anchorProps = buildProps({
  58691. /**
  58692. * @description scroll container
  58693. */
  58694. container: { type: definePropType([String, Object]) },
  58695. /**
  58696. * @description Set the offset of the anchor scroll
  58697. */
  58698. offset: {
  58699. type: Number,
  58700. default: 0
  58701. },
  58702. /**
  58703. * @description The offset of the element starting to trigger the anchor
  58704. */
  58705. bound: {
  58706. type: Number,
  58707. default: 15
  58708. },
  58709. /**
  58710. * @description Set the scroll duration of the container when the anchor is clicked, in milliseconds
  58711. */
  58712. duration: {
  58713. type: Number,
  58714. default: 300
  58715. },
  58716. /**
  58717. * @description Whether to show the marker
  58718. */
  58719. marker: {
  58720. type: Boolean,
  58721. default: true
  58722. },
  58723. /**
  58724. * @description Set Anchor type
  58725. */
  58726. type: {
  58727. type: definePropType(String),
  58728. default: "default"
  58729. },
  58730. /**
  58731. * @description Set Anchor direction
  58732. */
  58733. direction: {
  58734. type: definePropType(String),
  58735. default: "vertical"
  58736. },
  58737. /**
  58738. * @description Scroll whether link is selected at the top
  58739. */
  58740. selectScrollTop: Boolean
  58741. });
  58742. var anchorEmits = {
  58743. change: (href) => isString(href),
  58744. click: (e, href) => e instanceof MouseEvent && (isString(href) || isUndefined(href))
  58745. };
  58746. //#endregion
  58747. //#region node_modules/element-plus/es/utils/dom/element.mjs
  58748. var getElement = ((target) => {
  58749. if (!isClient || target === "") return null;
  58750. if (isString(target)) try {
  58751. return document.querySelector(target);
  58752. } catch {
  58753. return null;
  58754. }
  58755. return target;
  58756. });
  58757. //#endregion
  58758. //#region node_modules/element-plus/es/utils/throttleByRaf.mjs
  58759. function throttleByRaf(cb) {
  58760. let timer = 0;
  58761. const throttle = (...args) => {
  58762. if (timer) cAF(timer);
  58763. timer = rAF(() => {
  58764. cb(...args);
  58765. timer = 0;
  58766. });
  58767. };
  58768. throttle.cancel = () => {
  58769. cAF(timer);
  58770. timer = 0;
  58771. };
  58772. return throttle;
  58773. }
  58774. //#endregion
  58775. //#region node_modules/element-plus/es/components/anchor/src/constants.mjs
  58776. var anchorKey = Symbol("anchor");
  58777. //#endregion
  58778. //#region node_modules/element-plus/es/components/anchor/src/anchor2.mjs
  58779. var anchor_default = /* @__PURE__ */ defineComponent({
  58780. name: "ElAnchor",
  58781. __name: "anchor",
  58782. props: anchorProps,
  58783. emits: anchorEmits,
  58784. setup(__props, { expose: __expose, emit: __emit }) {
  58785. const props = __props;
  58786. const emit = __emit;
  58787. const slots = useSlots();
  58788. const currentAnchor = ref("");
  58789. const markerStyle = ref({});
  58790. const anchorRef = ref(null);
  58791. const markerRef = ref(null);
  58792. const containerEl = ref();
  58793. const links = {};
  58794. let isScrolling = false;
  58795. let currentScrollTop = 0;
  58796. const ns = useNamespace("anchor");
  58797. const cls = computed(() => [
  58798. ns.b(),
  58799. props.type === "underline" ? ns.m("underline") : "",
  58800. ns.m(props.direction)
  58801. ]);
  58802. const addLink = (state) => {
  58803. links[state.href] = state.el;
  58804. };
  58805. const removeLink = (href) => {
  58806. delete links[href];
  58807. };
  58808. const setCurrentAnchor = (href) => {
  58809. if (currentAnchor.value !== href) {
  58810. currentAnchor.value = href;
  58811. emit(CHANGE_EVENT, href);
  58812. }
  58813. };
  58814. let clearAnimate = null;
  58815. let currentTargetHref = "";
  58816. const scrollToAnchor = (href) => {
  58817. if (!containerEl.value) return;
  58818. const target = getElement(href);
  58819. if (!target) return;
  58820. if (clearAnimate) {
  58821. if (currentTargetHref === href) return;
  58822. clearAnimate();
  58823. }
  58824. currentTargetHref = href;
  58825. isScrolling = true;
  58826. const scrollEle = getScrollElement(target, containerEl.value);
  58827. const distance = getOffsetTopDistance(target, scrollEle);
  58828. const max = scrollEle.scrollHeight - scrollEle.clientHeight;
  58829. const to = Math.min(distance - props.offset, max);
  58830. clearAnimate = animateScrollTo(containerEl.value, currentScrollTop, to, props.duration, () => {
  58831. setTimeout(() => {
  58832. isScrolling = false;
  58833. currentTargetHref = "";
  58834. }, 20);
  58835. });
  58836. };
  58837. const scrollTo = (href) => {
  58838. if (href) {
  58839. setCurrentAnchor(href);
  58840. scrollToAnchor(href);
  58841. }
  58842. };
  58843. const handleClick = (e, href) => {
  58844. emit("click", e, href);
  58845. scrollTo(href);
  58846. };
  58847. const handleScroll = throttleByRaf(() => {
  58848. if (containerEl.value) currentScrollTop = getScrollTop(containerEl.value);
  58849. const currentHref = getCurrentHref();
  58850. if (isScrolling || isUndefined(currentHref)) return;
  58851. setCurrentAnchor(currentHref);
  58852. });
  58853. const getCurrentHref = () => {
  58854. if (!containerEl.value) return;
  58855. const scrollTop = getScrollTop(containerEl.value);
  58856. const anchorTopList = [];
  58857. for (const href of Object.keys(links)) {
  58858. const target = getElement(href);
  58859. if (!target) continue;
  58860. const distance = getOffsetTopDistance(target, getScrollElement(target, containerEl.value));
  58861. anchorTopList.push({
  58862. top: distance - props.offset - props.bound,
  58863. href
  58864. });
  58865. }
  58866. anchorTopList.sort((prev, next) => prev.top - next.top);
  58867. for (let i = 0; i < anchorTopList.length; i++) {
  58868. const item = anchorTopList[i];
  58869. const next = anchorTopList[i + 1];
  58870. if (i === 0 && scrollTop === 0) return props.selectScrollTop ? item.href : "";
  58871. if (item.top <= scrollTop && (!next || next.top > scrollTop)) return item.href;
  58872. }
  58873. };
  58874. const getContainer = () => {
  58875. const el = getElement(props.container);
  58876. if (!el || isWindow(el)) containerEl.value = window;
  58877. else containerEl.value = el;
  58878. };
  58879. useEventListener(containerEl, "scroll", handleScroll);
  58880. const updateMarkerStyle = () => {
  58881. nextTick(() => {
  58882. if (!anchorRef.value || !markerRef.value || !currentAnchor.value) {
  58883. markerStyle.value = {};
  58884. return;
  58885. }
  58886. const currentLinkEl = links[currentAnchor.value];
  58887. if (!currentLinkEl) {
  58888. markerStyle.value = {};
  58889. return;
  58890. }
  58891. const anchorRect = anchorRef.value.getBoundingClientRect();
  58892. const markerRect = markerRef.value.getBoundingClientRect();
  58893. const linkRect = currentLinkEl.getBoundingClientRect();
  58894. if (props.direction === "horizontal") markerStyle.value = {
  58895. left: `${linkRect.left - anchorRect.left}px`,
  58896. width: `${linkRect.width}px`,
  58897. opacity: 1
  58898. };
  58899. else markerStyle.value = {
  58900. top: `${linkRect.top - anchorRect.top + (linkRect.height - markerRect.height) / 2}px`,
  58901. opacity: 1
  58902. };
  58903. });
  58904. };
  58905. watch(currentAnchor, updateMarkerStyle);
  58906. watch(() => slots.default?.(), updateMarkerStyle);
  58907. onMounted(() => {
  58908. getContainer();
  58909. const hash = decodeURIComponent(window.location.hash);
  58910. if (getElement(hash)) scrollTo(hash);
  58911. else handleScroll();
  58912. });
  58913. watch(() => props.container, () => {
  58914. getContainer();
  58915. });
  58916. provide(anchorKey, {
  58917. ns,
  58918. direction: props.direction,
  58919. currentAnchor,
  58920. addLink,
  58921. removeLink,
  58922. handleClick
  58923. });
  58924. __expose({ scrollTo });
  58925. return (_ctx, _cache) => {
  58926. return openBlock(), createElementBlock("div", {
  58927. ref_key: "anchorRef",
  58928. ref: anchorRef,
  58929. class: normalizeClass(cls.value)
  58930. }, [__props.marker ? (openBlock(), createElementBlock("div", {
  58931. key: 0,
  58932. ref_key: "markerRef",
  58933. ref: markerRef,
  58934. class: normalizeClass(unref(ns).e("marker")),
  58935. style: normalizeStyle(markerStyle.value)
  58936. }, null, 6)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("list")) }, [renderSlot(_ctx.$slots, "default")], 2)], 2);
  58937. };
  58938. }
  58939. });
  58940. //#endregion
  58941. //#region node_modules/element-plus/es/components/anchor/src/anchor-link.mjs
  58942. /**
  58943. * @deprecated Removed after 3.0.0, Use `AnchorLinkProps` instead.
  58944. */
  58945. var anchorLinkProps = buildProps({
  58946. /**
  58947. * @description the text content of the anchor link
  58948. */
  58949. title: String,
  58950. /**
  58951. * @description The address of the anchor link
  58952. */
  58953. href: String
  58954. });
  58955. //#endregion
  58956. //#region node_modules/element-plus/es/components/anchor/src/anchor-link.vue_vue_type_script_setup_true_lang.mjs
  58957. var _hoisted_1$5 = ["href"];
  58958. //#endregion
  58959. //#region node_modules/element-plus/es/components/anchor/src/anchor-link2.mjs
  58960. var anchor_link_default = /* @__PURE__ */ defineComponent({
  58961. name: "ElAnchorLink",
  58962. __name: "anchor-link",
  58963. props: anchorLinkProps,
  58964. setup(__props) {
  58965. const props = __props;
  58966. const linkRef = ref(null);
  58967. const { ns, direction, currentAnchor, addLink, removeLink, handleClick: contextHandleClick } = inject(anchorKey);
  58968. const cls = computed(() => [ns.e("link"), ns.is("active", currentAnchor.value === props.href)]);
  58969. const handleClick = (e) => {
  58970. contextHandleClick(e, props.href);
  58971. };
  58972. watch(() => props.href, (val, oldVal) => {
  58973. nextTick(() => {
  58974. if (oldVal) removeLink(oldVal);
  58975. if (val) addLink({
  58976. href: val,
  58977. el: linkRef.value
  58978. });
  58979. });
  58980. });
  58981. onMounted(() => {
  58982. const { href } = props;
  58983. if (href) addLink({
  58984. href,
  58985. el: linkRef.value
  58986. });
  58987. });
  58988. onBeforeUnmount(() => {
  58989. const { href } = props;
  58990. if (href) removeLink(href);
  58991. });
  58992. return (_ctx, _cache) => {
  58993. return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).e("item")) }, [createBaseVNode("a", {
  58994. ref_key: "linkRef",
  58995. ref: linkRef,
  58996. class: normalizeClass(cls.value),
  58997. href: __props.href,
  58998. onClick: handleClick
  58999. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 10, _hoisted_1$5), _ctx.$slots["sub-link"] && unref(direction) === "vertical" ? (openBlock(), createElementBlock("div", {
  59000. key: 0,
  59001. class: normalizeClass(unref(ns).e("list"))
  59002. }, [renderSlot(_ctx.$slots, "sub-link")], 2)) : createCommentVNode("v-if", true)], 2);
  59003. };
  59004. }
  59005. });
  59006. //#endregion
  59007. //#region node_modules/element-plus/es/components/anchor/index.mjs
  59008. var ElAnchor = withInstall(anchor_default, { AnchorLink: anchor_link_default });
  59009. var ElAnchorLink = withNoopInstall(anchor_link_default);
  59010. //#endregion
  59011. //#region node_modules/element-plus/es/components/segmented/src/segmented.mjs
  59012. var defaultProps = {
  59013. label: "label",
  59014. value: "value",
  59015. disabled: "disabled"
  59016. };
  59017. /**
  59018. * @deprecated Removed after 3.0.0, Use `SegmentedProps` instead.
  59019. */
  59020. var segmentedProps = buildProps({
  59021. direction: {
  59022. type: definePropType(String),
  59023. default: "horizontal"
  59024. },
  59025. /**
  59026. * @description options of segmented
  59027. */
  59028. options: {
  59029. type: definePropType(Array),
  59030. default: () => []
  59031. },
  59032. /**
  59033. * @description binding value
  59034. */
  59035. modelValue: {
  59036. type: [
  59037. String,
  59038. Number,
  59039. Boolean
  59040. ],
  59041. default: void 0
  59042. },
  59043. /**
  59044. * @description configuration options, see the following table
  59045. */
  59046. props: {
  59047. type: definePropType(Object),
  59048. default: () => defaultProps
  59049. },
  59050. /**
  59051. * @description fit width of parent content
  59052. */
  59053. block: Boolean,
  59054. /**
  59055. * @description size of component
  59056. */
  59057. size: useSizeProp,
  59058. /**
  59059. * @description whether segmented is disabled
  59060. */
  59061. disabled: {
  59062. type: Boolean,
  59063. default: void 0
  59064. },
  59065. /**
  59066. * @description whether to trigger form validation
  59067. */
  59068. validateEvent: {
  59069. type: Boolean,
  59070. default: true
  59071. },
  59072. /**
  59073. * @description native input id
  59074. */
  59075. id: String,
  59076. /**
  59077. * @description native `name` attribute
  59078. */
  59079. name: String,
  59080. ...useAriaProps(["ariaLabel"])
  59081. });
  59082. var segmentedEmits = {
  59083. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
  59084. [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
  59085. };
  59086. //#endregion
  59087. //#region node_modules/element-plus/es/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.mjs
  59088. var _hoisted_1$4 = [
  59089. "id",
  59090. "aria-label",
  59091. "aria-labelledby"
  59092. ];
  59093. var _hoisted_2$3 = [
  59094. "name",
  59095. "disabled",
  59096. "checked",
  59097. "onChange"
  59098. ];
  59099. //#endregion
  59100. //#region node_modules/element-plus/es/components/segmented/index.mjs
  59101. var ElSegmented = withInstall(/* @__PURE__ */ defineComponent({
  59102. name: "ElSegmented",
  59103. __name: "segmented",
  59104. props: segmentedProps,
  59105. emits: segmentedEmits,
  59106. setup(__props, { emit: __emit }) {
  59107. const props = __props;
  59108. const emit = __emit;
  59109. const ns = useNamespace("segmented");
  59110. const segmentedId = useId();
  59111. const segmentedSize = useFormSize();
  59112. const _disabled = useFormDisabled();
  59113. const { formItem } = useFormItem();
  59114. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
  59115. const segmentedRef = ref(null);
  59116. const activeElement = useActiveElement();
  59117. const state = reactive({
  59118. isInit: false,
  59119. width: 0,
  59120. height: 0,
  59121. translateX: 0,
  59122. translateY: 0,
  59123. focusVisible: false
  59124. });
  59125. const handleChange = (evt, item) => {
  59126. const value = getValue(item);
  59127. emit(UPDATE_MODEL_EVENT, value);
  59128. emit(CHANGE_EVENT, value);
  59129. evt.target.checked = value === props.modelValue;
  59130. };
  59131. const aliasProps = computed(() => ({
  59132. ...defaultProps,
  59133. ...props.props
  59134. }));
  59135. const getValue = (item) => {
  59136. return isObject$2(item) ? item[aliasProps.value.value] : item;
  59137. };
  59138. const getLabel = (item) => {
  59139. return isObject$2(item) ? item[aliasProps.value.label] : item;
  59140. };
  59141. const getDisabled = (item) => {
  59142. return !!(_disabled.value || (isObject$2(item) ? item[aliasProps.value.disabled] : false));
  59143. };
  59144. const getSelected = (item) => {
  59145. return props.modelValue === getValue(item);
  59146. };
  59147. const getOption = (value) => {
  59148. return props.options.find((item) => getValue(item) === value);
  59149. };
  59150. const getItemCls = (item) => {
  59151. return [
  59152. ns.e("item"),
  59153. ns.is("selected", getSelected(item)),
  59154. ns.is("disabled", getDisabled(item))
  59155. ];
  59156. };
  59157. const updateSelect = () => {
  59158. if (!segmentedRef.value) return;
  59159. const selectedItem = segmentedRef.value.querySelector(".is-selected");
  59160. const selectedItemInput = segmentedRef.value.querySelector(".is-selected input");
  59161. if (!selectedItem || !selectedItemInput) {
  59162. state.width = 0;
  59163. state.height = 0;
  59164. state.translateX = 0;
  59165. state.translateY = 0;
  59166. state.focusVisible = false;
  59167. return;
  59168. }
  59169. state.isInit = true;
  59170. if (props.direction === "vertical") {
  59171. state.height = selectedItem.offsetHeight;
  59172. state.translateY = selectedItem.offsetTop;
  59173. } else {
  59174. state.width = selectedItem.offsetWidth;
  59175. state.translateX = selectedItem.offsetLeft;
  59176. }
  59177. try {
  59178. state.focusVisible = selectedItemInput.matches(":focus-visible");
  59179. } catch {}
  59180. };
  59181. const segmentedCls = computed(() => [
  59182. ns.b(),
  59183. ns.m(segmentedSize.value),
  59184. ns.is("block", props.block)
  59185. ]);
  59186. const selectedStyle = computed(() => ({
  59187. width: props.direction === "vertical" ? "100%" : `${state.width}px`,
  59188. height: props.direction === "vertical" ? `${state.height}px` : "100%",
  59189. transform: props.direction === "vertical" ? `translateY(${state.translateY}px)` : `translateX(${state.translateX}px)`,
  59190. display: state.isInit ? "block" : "none"
  59191. }));
  59192. const selectedCls = computed(() => [
  59193. ns.e("item-selected"),
  59194. ns.is("disabled", getDisabled(getOption(props.modelValue))),
  59195. ns.is("focus-visible", state.focusVisible)
  59196. ]);
  59197. const name = computed(() => {
  59198. return props.name || segmentedId.value;
  59199. });
  59200. useResizeObserver(segmentedRef, updateSelect);
  59201. watch(activeElement, updateSelect);
  59202. watch(() => props.options, updateSelect, {
  59203. deep: true,
  59204. flush: "post"
  59205. });
  59206. watch(() => props.modelValue, () => {
  59207. updateSelect();
  59208. if (props.validateEvent) formItem?.validate?.("change").catch(NOOP);
  59209. }, { flush: "post" });
  59210. return (_ctx, _cache) => {
  59211. return __props.options.length ? (openBlock(), createElementBlock("div", {
  59212. key: 0,
  59213. id: unref(inputId),
  59214. ref_key: "segmentedRef",
  59215. ref: segmentedRef,
  59216. class: normalizeClass(segmentedCls.value),
  59217. role: "radiogroup",
  59218. "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "segmented" : void 0,
  59219. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
  59220. }, [createBaseVNode("div", { class: normalizeClass([unref(ns).e("group"), unref(ns).m(__props.direction)]) }, [createBaseVNode("div", {
  59221. style: normalizeStyle(selectedStyle.value),
  59222. class: normalizeClass(selectedCls.value)
  59223. }, null, 6), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  59224. return openBlock(), createElementBlock("label", {
  59225. key: index,
  59226. class: normalizeClass(getItemCls(item))
  59227. }, [createBaseVNode("input", {
  59228. class: normalizeClass(unref(ns).e("item-input")),
  59229. type: "radio",
  59230. name: name.value,
  59231. disabled: getDisabled(item),
  59232. checked: getSelected(item),
  59233. onChange: ($event) => handleChange($event, item)
  59234. }, null, 42, _hoisted_2$3), createBaseVNode("div", { class: normalizeClass(unref(ns).e("item-label")) }, [renderSlot(_ctx.$slots, "default", { item }, () => [createTextVNode(toDisplayString(getLabel(item)), 1)])], 2)], 2);
  59235. }), 128))], 2)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
  59236. };
  59237. }
  59238. }));
  59239. //#endregion
  59240. //#region node_modules/element-plus/es/components/mention/src/helper.mjs
  59241. var filterOption = (pattern, option) => {
  59242. const lowerCase = pattern.toLowerCase();
  59243. return (option.label || option.value || "").toLowerCase().includes(lowerCase);
  59244. };
  59245. var getMentionCtx = (inputEl, prefix, split) => {
  59246. const { selectionEnd } = inputEl;
  59247. if (selectionEnd === null) return;
  59248. const inputValue = inputEl.value;
  59249. const prefixArray = castArray$1(prefix);
  59250. let splitIndex = -1;
  59251. let mentionCtx;
  59252. for (let i = selectionEnd - 1; i >= 0; --i) {
  59253. const char = inputValue[i];
  59254. if (splitIndex === -1 && (char === split || char === "\n" || char === "\r")) {
  59255. splitIndex = i;
  59256. continue;
  59257. }
  59258. if (prefixArray.includes(char)) {
  59259. const end = splitIndex === -1 ? selectionEnd : splitIndex;
  59260. mentionCtx = {
  59261. pattern: inputValue.slice(i + 1, end),
  59262. start: i + 1,
  59263. end,
  59264. prefix: char,
  59265. prefixIndex: i,
  59266. splitIndex,
  59267. selectionEnd
  59268. };
  59269. break;
  59270. }
  59271. }
  59272. return mentionCtx;
  59273. };
  59274. /**
  59275. * fork from textarea-caret-position
  59276. * https://github.com/component/textarea-caret-position
  59277. * The MIT License (MIT)
  59278. * Copyright (c) 2015 Jonathan Ong me@jongleberry.com
  59279. * Permission is hereby granted, free of charge, to any person obtaining a copy
  59280. * of this software and associated documentation files (the "Software"), to deal
  59281. * in the Software without restriction, including without limitation the rights
  59282. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  59283. * copies of the Software, and to permit persons to whom the Software is
  59284. * furnished to do so, subject to the following conditions:
  59285. * The above copyright notice and this permission notice shall be included in all
  59286. * copies or substantial portions of the Software.
  59287. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  59288. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  59289. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  59290. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  59291. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  59292. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  59293. * SOFTWARE.
  59294. */
  59295. var getCursorPosition = (element, options = {
  59296. debug: false,
  59297. useSelectionEnd: false
  59298. }) => {
  59299. const selectionStart = element.selectionStart !== null ? element.selectionStart : 0;
  59300. const selectionEnd = element.selectionEnd !== null ? element.selectionEnd : 0;
  59301. const position = options.useSelectionEnd ? selectionEnd : selectionStart;
  59302. const properties = [
  59303. "direction",
  59304. "boxSizing",
  59305. "width",
  59306. "height",
  59307. "overflowX",
  59308. "overflowY",
  59309. "borderTopWidth",
  59310. "borderRightWidth",
  59311. "borderBottomWidth",
  59312. "borderLeftWidth",
  59313. "borderStyle",
  59314. "paddingTop",
  59315. "paddingRight",
  59316. "paddingBottom",
  59317. "paddingLeft",
  59318. "fontStyle",
  59319. "fontVariant",
  59320. "fontWeight",
  59321. "fontStretch",
  59322. "fontSize",
  59323. "fontSizeAdjust",
  59324. "lineHeight",
  59325. "fontFamily",
  59326. "textAlign",
  59327. "textTransform",
  59328. "textIndent",
  59329. "textDecoration",
  59330. "letterSpacing",
  59331. "wordSpacing",
  59332. "tabSize",
  59333. "MozTabSize"
  59334. ];
  59335. if (options.debug) {
  59336. const el = document.querySelector("#input-textarea-caret-position-mirror-div");
  59337. if (el?.parentNode) el.parentNode.removeChild(el);
  59338. }
  59339. const div = document.createElement("div");
  59340. div.id = "input-textarea-caret-position-mirror-div";
  59341. document.body.appendChild(div);
  59342. const style = div.style;
  59343. const computed = window.getComputedStyle(element);
  59344. const isInput = element.nodeName === "INPUT";
  59345. style.whiteSpace = isInput ? "nowrap" : "pre-wrap";
  59346. if (!isInput) style.wordWrap = "break-word";
  59347. style.position = "absolute";
  59348. if (!options.debug) style.visibility = "hidden";
  59349. properties.forEach((prop) => {
  59350. if (isInput && prop === "lineHeight") if (computed.boxSizing === "border-box") {
  59351. const height = Number.parseInt(computed.height);
  59352. const outerHeight = Number.parseInt(computed.paddingTop) + Number.parseInt(computed.paddingBottom) + Number.parseInt(computed.borderTopWidth) + Number.parseInt(computed.borderBottomWidth);
  59353. const targetHeight = outerHeight + Number.parseInt(computed.lineHeight);
  59354. if (height > targetHeight) style.lineHeight = `${height - outerHeight}px`;
  59355. else if (height === targetHeight) style.lineHeight = computed.lineHeight;
  59356. else style.lineHeight = "0";
  59357. } else style.lineHeight = computed.height;
  59358. else style[prop] = computed[prop];
  59359. });
  59360. if (isFirefox()) {
  59361. if (element.scrollHeight > Number.parseInt(computed.height)) style.overflowY = "scroll";
  59362. } else style.overflow = "hidden";
  59363. div.textContent = element.value.slice(0, Math.max(0, position));
  59364. if (isInput && div.textContent) div.textContent = div.textContent.replace(/\s/g, "\xA0");
  59365. const span = document.createElement("span");
  59366. span.textContent = element.value.slice(Math.max(0, position)) || ".";
  59367. span.style.position = "relative";
  59368. span.style.left = `${-element.scrollLeft}px`;
  59369. span.style.top = `${-element.scrollTop}px`;
  59370. div.appendChild(span);
  59371. const relativePosition = {
  59372. top: span.offsetTop + Number.parseInt(computed.borderTopWidth),
  59373. left: span.offsetLeft + Number.parseInt(computed.borderLeftWidth),
  59374. height: Number.parseInt(computed.fontSize) * 1.5
  59375. };
  59376. if (options.debug) span.style.backgroundColor = "#aaa";
  59377. else document.body.removeChild(div);
  59378. if (relativePosition.left >= element.clientWidth) relativePosition.left = element.clientWidth;
  59379. return relativePosition;
  59380. };
  59381. //#endregion
  59382. //#region node_modules/element-plus/es/components/mention/src/mention.mjs
  59383. /**
  59384. * @deprecated Removed after 3.0.0, Use `MentionProps` instead.
  59385. */
  59386. var mentionProps = buildProps({
  59387. ...inputProps,
  59388. /**
  59389. * @description mention options list
  59390. */
  59391. options: {
  59392. type: definePropType(Array),
  59393. default: () => []
  59394. },
  59395. /**
  59396. * @description prefix character to trigger mentions. The string length must be exactly 1.
  59397. */
  59398. prefix: {
  59399. type: definePropType([String, Array]),
  59400. default: "@",
  59401. validator: (val) => {
  59402. if (isString(val)) return val.length === 1;
  59403. return val.every((v) => isString(v) && v.length === 1);
  59404. }
  59405. },
  59406. /**
  59407. * @description character to split mentions. The string length must be exactly 1.
  59408. */
  59409. split: {
  59410. type: String,
  59411. default: " ",
  59412. validator: (val) => val.length === 1
  59413. },
  59414. /**
  59415. * @description customize filter option logic.
  59416. */
  59417. filterOption: {
  59418. type: definePropType([Boolean, Function]),
  59419. default: () => filterOption,
  59420. validator: (val) => {
  59421. if (val === false) return true;
  59422. return isFunction$1(val);
  59423. }
  59424. },
  59425. /**
  59426. * @description set popup placement
  59427. */
  59428. placement: {
  59429. type: definePropType(String),
  59430. default: "bottom"
  59431. },
  59432. /**
  59433. * @description whether the dropdown panel has an arrow
  59434. */
  59435. showArrow: Boolean,
  59436. /**
  59437. * @description offset of the dropdown panel
  59438. */
  59439. offset: {
  59440. type: Number,
  59441. default: 0
  59442. },
  59443. /**
  59444. * @description when backspace is pressed to delete, whether the mention content is deleted as a whole
  59445. */
  59446. whole: Boolean,
  59447. /**
  59448. * @description when backspace is pressed to delete, check if the mention is a whole
  59449. */
  59450. checkIsWhole: { type: definePropType(Function) },
  59451. /**
  59452. * @description input value
  59453. */
  59454. modelValue: String,
  59455. /**
  59456. * @description whether the dropdown panel of mentions is in a loading state.
  59457. */
  59458. loading: Boolean,
  59459. /**
  59460. * @description custom class name for dropdown panel
  59461. */
  59462. popperClass: useTooltipContentProps.popperClass,
  59463. /**
  59464. * @description custom style for dropdown panel
  59465. */
  59466. popperStyle: useTooltipContentProps.popperStyle,
  59467. /**
  59468. * @description [popper.js](https://popper.js.org/docs/v2/) parameters
  59469. */
  59470. popperOptions: {
  59471. type: definePropType(Object),
  59472. default: () => ({})
  59473. },
  59474. /**
  59475. * @description configuration options
  59476. */
  59477. props: {
  59478. type: definePropType(Object),
  59479. default: () => mentionDefaultProps
  59480. }
  59481. });
  59482. var mentionEmits = {
  59483. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  59484. "whole-remove": (pattern, prefix) => isString(pattern) && isString(prefix),
  59485. input: (value) => isString(value),
  59486. search: (pattern, prefix) => isString(pattern) && isString(prefix),
  59487. select: (option, prefix) => isObject$2(option) && isString(prefix),
  59488. focus: (evt) => evt instanceof FocusEvent,
  59489. blur: (evt) => evt instanceof FocusEvent
  59490. };
  59491. var mentionDefaultProps = {
  59492. value: "value",
  59493. label: "label",
  59494. disabled: "disabled"
  59495. };
  59496. //#endregion
  59497. //#region node_modules/element-plus/es/components/mention/src/mention-dropdown.mjs
  59498. /**
  59499. * @deprecated Removed after 3.0.0, Use `MentionDropdownProps` instead.
  59500. */
  59501. var mentionDropdownProps = buildProps({
  59502. options: {
  59503. type: definePropType(Array),
  59504. default: () => []
  59505. },
  59506. loading: Boolean,
  59507. disabled: Boolean,
  59508. contentId: String,
  59509. ariaLabel: String
  59510. });
  59511. var mentionDropdownEmits = { select: (option) => isString(option.value) };
  59512. //#endregion
  59513. //#region node_modules/element-plus/es/components/mention/src/mention-dropdown.vue_vue_type_script_setup_true_lang.mjs
  59514. var _hoisted_1$3 = [
  59515. "id",
  59516. "aria-disabled",
  59517. "aria-selected",
  59518. "onMousemove",
  59519. "onClick"
  59520. ];
  59521. //#endregion
  59522. //#region node_modules/element-plus/es/components/mention/src/mention-dropdown2.mjs
  59523. var mention_dropdown_default = /* @__PURE__ */ defineComponent({
  59524. name: "ElMentionDropdown",
  59525. __name: "mention-dropdown",
  59526. props: mentionDropdownProps,
  59527. emits: mentionDropdownEmits,
  59528. setup(__props, { expose: __expose, emit: __emit }) {
  59529. const props = __props;
  59530. const emit = __emit;
  59531. const ns = useNamespace("mention");
  59532. const { t } = useLocale();
  59533. const hoveringIndex = ref(-1);
  59534. const scrollbarRef = ref();
  59535. const optionRefs = ref();
  59536. const dropdownRef = ref();
  59537. const optionkls = (item, index) => [
  59538. ns.be("dropdown", "item"),
  59539. ns.is("hovering", hoveringIndex.value === index),
  59540. ns.is("disabled", item.disabled || props.disabled)
  59541. ];
  59542. const handleSelect = (item) => {
  59543. if (item.disabled || props.disabled) return;
  59544. emit("select", item);
  59545. };
  59546. const handleMouseEnter = (index) => {
  59547. hoveringIndex.value = index;
  59548. };
  59549. const filteredAllDisabled = computed(() => props.disabled || props.options.every((item) => item.disabled));
  59550. const hoverOption = computed(() => props.options[hoveringIndex.value]);
  59551. const selectHoverOption = () => {
  59552. if (!hoverOption.value || hoverOption.value.disabled || props.disabled) return;
  59553. emit("select", hoverOption.value);
  59554. };
  59555. const navigateOptions = (direction) => {
  59556. const { options } = props;
  59557. if (options.length === 0 || filteredAllDisabled.value) return;
  59558. if (direction === "next") {
  59559. hoveringIndex.value++;
  59560. if (hoveringIndex.value === options.length) hoveringIndex.value = 0;
  59561. } else if (direction === "prev") {
  59562. hoveringIndex.value--;
  59563. if (hoveringIndex.value < 0) hoveringIndex.value = options.length - 1;
  59564. }
  59565. const option = options[hoveringIndex.value];
  59566. if (option.disabled) {
  59567. navigateOptions(direction);
  59568. return;
  59569. }
  59570. nextTick(() => scrollToOption(option));
  59571. };
  59572. const scrollToOption = (option) => {
  59573. const { options } = props;
  59574. const index = options.findIndex((item) => item.value === option.value);
  59575. const target = optionRefs.value?.[index];
  59576. if (target) {
  59577. const menu = dropdownRef.value?.querySelector?.(`.${ns.be("dropdown", "wrap")}`);
  59578. if (menu) scrollIntoView(menu, target);
  59579. }
  59580. scrollbarRef.value?.handleScroll();
  59581. };
  59582. const resetHoveringIndex = () => {
  59583. if (filteredAllDisabled.value || props.options.length === 0) hoveringIndex.value = -1;
  59584. else hoveringIndex.value = props.options.findIndex((item) => !item.disabled);
  59585. };
  59586. watch(() => props.options, resetHoveringIndex, { immediate: true });
  59587. __expose({
  59588. hoveringIndex,
  59589. navigateOptions,
  59590. selectHoverOption,
  59591. hoverOption
  59592. });
  59593. return (_ctx, _cache) => {
  59594. return openBlock(), createElementBlock("div", {
  59595. ref_key: "dropdownRef",
  59596. ref: dropdownRef,
  59597. class: normalizeClass(unref(ns).b("dropdown"))
  59598. }, [
  59599. _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
  59600. key: 0,
  59601. class: normalizeClass(unref(ns).be("dropdown", "header"))
  59602. }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
  59603. withDirectives(createVNode(unref(ElScrollbar), {
  59604. id: __props.contentId,
  59605. ref_key: "scrollbarRef",
  59606. ref: scrollbarRef,
  59607. tag: "ul",
  59608. "wrap-class": unref(ns).be("dropdown", "wrap"),
  59609. "view-class": unref(ns).be("dropdown", "list"),
  59610. role: "listbox",
  59611. "aria-label": __props.ariaLabel,
  59612. "aria-orientation": "vertical"
  59613. }, {
  59614. default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
  59615. return openBlock(), createElementBlock("li", {
  59616. id: `${__props.contentId}-${index}`,
  59617. ref_for: true,
  59618. ref_key: "optionRefs",
  59619. ref: optionRefs,
  59620. key: index,
  59621. class: normalizeClass(optionkls(item, index)),
  59622. role: "option",
  59623. "aria-disabled": item.disabled || __props.disabled || void 0,
  59624. "aria-selected": hoveringIndex.value === index,
  59625. onMousemove: ($event) => handleMouseEnter(index),
  59626. onClick: withModifiers(($event) => handleSelect(item), ["stop"])
  59627. }, [renderSlot(_ctx.$slots, "label", {
  59628. item,
  59629. index
  59630. }, () => [createBaseVNode("span", null, toDisplayString(item.label ?? item.value), 1)])], 42, _hoisted_1$3);
  59631. }), 128))]),
  59632. _: 3
  59633. }, 8, [
  59634. "id",
  59635. "wrap-class",
  59636. "view-class",
  59637. "aria-label"
  59638. ]), [[vShow, __props.options.length > 0 && !__props.loading]]),
  59639. __props.loading ? (openBlock(), createElementBlock("div", {
  59640. key: 1,
  59641. class: normalizeClass(unref(ns).be("dropdown", "loading"))
  59642. }, [renderSlot(_ctx.$slots, "loading", {}, () => [createTextVNode(toDisplayString(unref(t)("el.mention.loading")), 1)])], 2)) : createCommentVNode("v-if", true),
  59643. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  59644. key: 2,
  59645. class: normalizeClass(unref(ns).be("dropdown", "footer"))
  59646. }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
  59647. ], 2);
  59648. };
  59649. }
  59650. });
  59651. //#endregion
  59652. //#region node_modules/element-plus/es/components/mention/index.mjs
  59653. var ElMention = withInstall(/* @__PURE__ */ defineComponent({
  59654. name: "ElMention",
  59655. inheritAttrs: false,
  59656. __name: "mention",
  59657. props: mentionProps,
  59658. emits: mentionEmits,
  59659. setup(__props, { expose: __expose, emit: __emit }) {
  59660. const props = __props;
  59661. const emit = __emit;
  59662. const passInputProps = computed(() => {
  59663. const inputProps = ElInput.props ?? [];
  59664. return pick(props, isArray$1(inputProps) ? inputProps : Object.keys(inputProps));
  59665. });
  59666. const ns = useNamespace("mention");
  59667. const disabled = useFormDisabled();
  59668. const contentId = useId();
  59669. const elInputRef = ref();
  59670. const tooltipRef = ref();
  59671. const dropdownRef = ref();
  59672. const visible = ref(false);
  59673. const cursorStyle = ref();
  59674. const mentionCtx = ref();
  59675. const computedPlacement = computed(() => props.showArrow ? props.placement : `${props.placement}-start`);
  59676. const computedFallbackPlacements = computed(() => props.showArrow ? ["bottom", "top"] : ["bottom-start", "top-start"]);
  59677. const aliasProps = computed(() => ({
  59678. ...mentionDefaultProps,
  59679. ...props.props
  59680. }));
  59681. const mapOption = (option) => {
  59682. const base = {
  59683. label: option[aliasProps.value.label],
  59684. value: option[aliasProps.value.value],
  59685. disabled: option[aliasProps.value.disabled]
  59686. };
  59687. return {
  59688. ...option,
  59689. ...base
  59690. };
  59691. };
  59692. const options = computed(() => props.options.map(mapOption));
  59693. const filteredOptions = computed(() => {
  59694. const { filterOption } = props;
  59695. if (!mentionCtx.value || !filterOption) return options.value;
  59696. return options.value.filter((option) => filterOption(mentionCtx.value.pattern, option));
  59697. });
  59698. const dropdownVisible = computed(() => {
  59699. return visible.value && (!!filteredOptions.value.length || props.loading);
  59700. });
  59701. const hoveringId = computed(() => {
  59702. return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`;
  59703. });
  59704. const handleInputChange = (value) => {
  59705. emit(UPDATE_MODEL_EVENT, value);
  59706. emit(INPUT_EVENT, value);
  59707. syncAfterCursorMove();
  59708. };
  59709. const handleInputKeyDown = (event) => {
  59710. if (elInputRef.value?.isComposing) return;
  59711. const code = getEventCode(event);
  59712. switch (code) {
  59713. case EVENT_CODE.left:
  59714. case EVENT_CODE.right:
  59715. syncAfterCursorMove();
  59716. break;
  59717. case EVENT_CODE.up:
  59718. case EVENT_CODE.down:
  59719. if (!visible.value) return;
  59720. event.preventDefault();
  59721. dropdownRef.value?.navigateOptions(code === EVENT_CODE.up ? "prev" : "next");
  59722. break;
  59723. case EVENT_CODE.enter:
  59724. case EVENT_CODE.numpadEnter:
  59725. if (!visible.value) {
  59726. props.type !== "textarea" && syncAfterCursorMove();
  59727. return;
  59728. }
  59729. event.preventDefault();
  59730. if (dropdownRef.value?.hoverOption) dropdownRef.value?.selectHoverOption();
  59731. else visible.value = false;
  59732. break;
  59733. case EVENT_CODE.esc:
  59734. if (!visible.value) return;
  59735. event.preventDefault();
  59736. visible.value = false;
  59737. break;
  59738. case EVENT_CODE.backspace: if (props.whole && mentionCtx.value) {
  59739. const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } = mentionCtx.value;
  59740. const inputEl = getInputEl();
  59741. if (!inputEl) return;
  59742. const inputValue = inputEl.value;
  59743. const matchOption = options.value.find((item) => item.value === pattern);
  59744. if ((isFunction$1(props.checkIsWhole) ? props.checkIsWhole(pattern, prefix) : matchOption) && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {
  59745. event.preventDefault();
  59746. const newValue = inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1);
  59747. emit(UPDATE_MODEL_EVENT, newValue);
  59748. emit(INPUT_EVENT, newValue);
  59749. emit("whole-remove", pattern, prefix);
  59750. const newSelectionEnd = prefixIndex;
  59751. nextTick(() => {
  59752. inputEl.selectionStart = newSelectionEnd;
  59753. inputEl.selectionEnd = newSelectionEnd;
  59754. syncDropdownVisible();
  59755. });
  59756. }
  59757. }
  59758. }
  59759. };
  59760. const { wrapperRef } = useFocusController(elInputRef, {
  59761. disabled,
  59762. afterFocus() {
  59763. syncAfterCursorMove();
  59764. },
  59765. beforeBlur(event) {
  59766. return tooltipRef.value?.isFocusInsideContent(event);
  59767. },
  59768. afterBlur() {
  59769. visible.value = false;
  59770. }
  59771. });
  59772. const handleInputMouseDown = () => {
  59773. syncAfterCursorMove();
  59774. };
  59775. const getOriginalOption = (mentionOption) => {
  59776. return props.options.find((option) => {
  59777. return mentionOption.value === option[aliasProps.value.value];
  59778. });
  59779. };
  59780. const handleSelect = (item) => {
  59781. if (!mentionCtx.value) return;
  59782. const inputEl = getInputEl();
  59783. if (!inputEl) return;
  59784. const inputValue = inputEl.value;
  59785. const { split } = props;
  59786. const newEndPart = inputValue.slice(mentionCtx.value.end);
  59787. const alreadySeparated = newEndPart.startsWith(split);
  59788. const newMiddlePart = `${item.value}${alreadySeparated ? "" : split}`;
  59789. const newValue = inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart;
  59790. emit(UPDATE_MODEL_EVENT, newValue);
  59791. emit(INPUT_EVENT, newValue);
  59792. emit("select", getOriginalOption(item), mentionCtx.value.prefix);
  59793. const newSelectionEnd = mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0);
  59794. nextTick(() => {
  59795. inputEl.selectionStart = newSelectionEnd;
  59796. inputEl.selectionEnd = newSelectionEnd;
  59797. inputEl.focus();
  59798. syncDropdownVisible();
  59799. });
  59800. };
  59801. const getInputEl = () => props.type === "textarea" ? elInputRef.value?.textarea : elInputRef.value?.input;
  59802. const syncAfterCursorMove = () => {
  59803. setTimeout(() => {
  59804. syncCursor();
  59805. syncDropdownVisible();
  59806. nextTick(() => tooltipRef.value?.updatePopper());
  59807. }, 0);
  59808. };
  59809. const syncCursor = () => {
  59810. const inputEl = getInputEl();
  59811. if (!inputEl) return;
  59812. const caretPosition = getCursorPosition(inputEl);
  59813. const inputRect = inputEl.getBoundingClientRect();
  59814. const wrapperRect = wrapperRef.value.getBoundingClientRect();
  59815. cursorStyle.value = {
  59816. position: "absolute",
  59817. width: 0,
  59818. height: `${caretPosition.height}px`,
  59819. left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,
  59820. top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`
  59821. };
  59822. };
  59823. const syncDropdownVisible = () => {
  59824. const inputEl = getInputEl();
  59825. if (document.activeElement !== inputEl) {
  59826. visible.value = false;
  59827. return;
  59828. }
  59829. const { prefix, split } = props;
  59830. mentionCtx.value = getMentionCtx(inputEl, prefix, split);
  59831. if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {
  59832. visible.value = true;
  59833. emit("search", mentionCtx.value.pattern, mentionCtx.value.prefix);
  59834. return;
  59835. }
  59836. visible.value = false;
  59837. };
  59838. __expose({
  59839. input: elInputRef,
  59840. tooltip: tooltipRef,
  59841. dropdownVisible
  59842. });
  59843. return (_ctx, _cache) => {
  59844. return openBlock(), createElementBlock("div", {
  59845. ref_key: "wrapperRef",
  59846. ref: wrapperRef,
  59847. class: normalizeClass(unref(ns).b())
  59848. }, [createVNode(unref(ElInput), mergeProps(mergeProps(passInputProps.value, _ctx.$attrs), {
  59849. ref_key: "elInputRef",
  59850. ref: elInputRef,
  59851. "model-value": __props.modelValue,
  59852. disabled: unref(disabled),
  59853. role: dropdownVisible.value ? "combobox" : void 0,
  59854. "aria-activedescendant": dropdownVisible.value ? hoveringId.value || "" : void 0,
  59855. "aria-controls": dropdownVisible.value ? unref(contentId) : void 0,
  59856. "aria-expanded": dropdownVisible.value || void 0,
  59857. "aria-label": __props.ariaLabel,
  59858. "aria-autocomplete": dropdownVisible.value ? "none" : void 0,
  59859. "aria-haspopup": dropdownVisible.value ? "listbox" : void 0,
  59860. onInput: handleInputChange,
  59861. onKeydown: handleInputKeyDown,
  59862. onMousedown: handleInputMouseDown
  59863. }), createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
  59864. return {
  59865. name,
  59866. fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
  59867. };
  59868. })]), 1040, [
  59869. "model-value",
  59870. "disabled",
  59871. "role",
  59872. "aria-activedescendant",
  59873. "aria-controls",
  59874. "aria-expanded",
  59875. "aria-label",
  59876. "aria-autocomplete",
  59877. "aria-haspopup"
  59878. ]), createVNode(unref(ElTooltip), {
  59879. ref_key: "tooltipRef",
  59880. ref: tooltipRef,
  59881. visible: dropdownVisible.value,
  59882. "popper-class": [unref(ns).e("popper"), __props.popperClass],
  59883. "popper-style": __props.popperStyle,
  59884. "popper-options": __props.popperOptions,
  59885. placement: computedPlacement.value,
  59886. "fallback-placements": computedFallbackPlacements.value,
  59887. effect: "light",
  59888. pure: "",
  59889. offset: __props.offset,
  59890. "show-arrow": __props.showArrow
  59891. }, {
  59892. default: withCtx(() => [createBaseVNode("div", { style: normalizeStyle(cursorStyle.value) }, null, 4)]),
  59893. content: withCtx(() => [createVNode(mention_dropdown_default, {
  59894. ref_key: "dropdownRef",
  59895. ref: dropdownRef,
  59896. options: filteredOptions.value,
  59897. disabled: unref(disabled),
  59898. loading: __props.loading,
  59899. "content-id": unref(contentId),
  59900. "aria-label": __props.ariaLabel,
  59901. onSelect: handleSelect,
  59902. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => elInputRef.value?.focus(), ["stop"]))
  59903. }, createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
  59904. return {
  59905. name,
  59906. fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
  59907. };
  59908. })]), 1032, [
  59909. "options",
  59910. "disabled",
  59911. "loading",
  59912. "content-id",
  59913. "aria-label"
  59914. ])]),
  59915. _: 3
  59916. }, 8, [
  59917. "visible",
  59918. "popper-class",
  59919. "popper-style",
  59920. "popper-options",
  59921. "placement",
  59922. "fallback-placements",
  59923. "offset",
  59924. "show-arrow"
  59925. ])], 2);
  59926. };
  59927. }
  59928. }));
  59929. //#endregion
  59930. //#region node_modules/element-plus/es/components/splitter/src/splitter.mjs
  59931. /**
  59932. * @deprecated Removed after 3.0.0, Use `SplitterProps` instead.
  59933. */
  59934. var splitterProps = buildProps({
  59935. layout: {
  59936. type: String,
  59937. default: "horizontal",
  59938. values: ["horizontal", "vertical"]
  59939. },
  59940. lazy: Boolean
  59941. });
  59942. var splitterEmits = {
  59943. resizeStart: (index, sizes) => true,
  59944. resize: (index, sizes) => true,
  59945. resizeEnd: (index, sizes) => true,
  59946. collapse: (index, type, sizes) => true
  59947. };
  59948. //#endregion
  59949. //#region node_modules/element-plus/es/components/splitter/src/split-panel.mjs
  59950. /**
  59951. * @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.
  59952. */
  59953. var splitterPanelProps = buildProps({
  59954. min: { type: [String, Number] },
  59955. max: { type: [String, Number] },
  59956. size: { type: [String, Number] },
  59957. resizable: {
  59958. type: Boolean,
  59959. default: true
  59960. },
  59961. collapsible: Boolean
  59962. });
  59963. var splitterPanelEmits = { "update:size": (value) => typeof value === "number" || typeof value === "string" };
  59964. //#endregion
  59965. //#region node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs
  59966. function useContainer(layout) {
  59967. const containerEl = ref();
  59968. const { width, height } = useElementSize(containerEl);
  59969. return {
  59970. containerEl,
  59971. containerSize: computed(() => {
  59972. return layout.value === "horizontal" ? width.value : height.value;
  59973. })
  59974. };
  59975. }
  59976. //#endregion
  59977. //#region node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs
  59978. function getPct(str) {
  59979. return Number(str.slice(0, -1)) / 100;
  59980. }
  59981. function getPx(str) {
  59982. return Number(str.slice(0, -2));
  59983. }
  59984. function isPct(itemSize) {
  59985. return isString(itemSize) && itemSize.endsWith("%");
  59986. }
  59987. function isPx(itemSize) {
  59988. return isString(itemSize) && itemSize.endsWith("px");
  59989. }
  59990. function useSize$1(panels, containerSize) {
  59991. const propSizes = computed(() => panels.value.map((i) => i.size));
  59992. const panelCounts = computed(() => panels.value.length);
  59993. const percentSizes = ref([]);
  59994. watch([
  59995. propSizes,
  59996. panelCounts,
  59997. containerSize
  59998. ], () => {
  59999. let ptgList = [];
  60000. let emptyCount = 0;
  60001. for (let i = 0; i < panelCounts.value; i += 1) {
  60002. const itemSize = panels.value[i]?.size;
  60003. if (isPct(itemSize)) ptgList[i] = getPct(itemSize);
  60004. else if (isPx(itemSize)) ptgList[i] = getPx(itemSize) / containerSize.value;
  60005. else if (itemSize || itemSize === 0) {
  60006. const num = Number(itemSize);
  60007. if (!Number.isNaN(num)) ptgList[i] = num / containerSize.value;
  60008. } else {
  60009. emptyCount += 1;
  60010. ptgList[i] = void 0;
  60011. }
  60012. }
  60013. const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);
  60014. if (totalPtg > 1 || !emptyCount) {
  60015. const scale = 1 / totalPtg;
  60016. ptgList = ptgList.map((ptg) => ptg === void 0 ? 0 : ptg * scale);
  60017. } else {
  60018. const avgRest = (1 - totalPtg) / emptyCount;
  60019. ptgList = ptgList.map((ptg) => ptg === void 0 ? avgRest : ptg);
  60020. }
  60021. percentSizes.value = ptgList;
  60022. });
  60023. const ptg2px = (ptg) => ptg * containerSize.value;
  60024. return {
  60025. percentSizes,
  60026. pxSizes: computed(() => percentSizes.value.map(ptg2px))
  60027. };
  60028. }
  60029. //#endregion
  60030. //#region node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs
  60031. function useResize(panels, containerSize, pxSizes, lazy) {
  60032. const ptg2px = (ptg) => ptg * containerSize.value || 0;
  60033. function getLimitSize(str, defaultLimit) {
  60034. if (isPct(str)) return ptg2px(getPct(str));
  60035. else if (isPx(str)) return getPx(str);
  60036. return str ?? defaultLimit;
  60037. }
  60038. const lazyOffset = ref(0);
  60039. const movingIndex = ref(null);
  60040. let cachePxSizes = [];
  60041. let updatePanelSizes = NOOP;
  60042. const limitSizes = computed(() => panels.value.map((item) => [item.min, item.max]));
  60043. watch(lazy, () => {
  60044. if (lazyOffset.value) {
  60045. const mouseup = new MouseEvent("mouseup", { bubbles: true });
  60046. window.dispatchEvent(mouseup);
  60047. }
  60048. });
  60049. const onMoveStart = (index) => {
  60050. lazyOffset.value = 0;
  60051. movingIndex.value = {
  60052. index,
  60053. confirmed: false
  60054. };
  60055. cachePxSizes = pxSizes.value;
  60056. };
  60057. const onMoving = (index, offset) => {
  60058. let confirmedIndex = null;
  60059. if ((!movingIndex.value || !movingIndex.value.confirmed) && offset !== 0) {
  60060. if (offset > 0) {
  60061. confirmedIndex = index;
  60062. movingIndex.value = {
  60063. index,
  60064. confirmed: true
  60065. };
  60066. } else for (let i = index; i >= 0; i -= 1) if (cachePxSizes[i] > 0) {
  60067. confirmedIndex = i;
  60068. movingIndex.value = {
  60069. index: i,
  60070. confirmed: true
  60071. };
  60072. break;
  60073. }
  60074. }
  60075. const mergedIndex = confirmedIndex ?? movingIndex.value?.index ?? index;
  60076. const numSizes = [...cachePxSizes];
  60077. const nextIndex = mergedIndex + 1;
  60078. const startMinSize = getLimitSize(limitSizes.value[mergedIndex][0], 0);
  60079. const endMinSize = getLimitSize(limitSizes.value[nextIndex][0], 0);
  60080. const startMaxSize = getLimitSize(limitSizes.value[mergedIndex][1], containerSize.value || 0);
  60081. const endMaxSize = getLimitSize(limitSizes.value[nextIndex][1], containerSize.value || 0);
  60082. let mergedOffset = offset;
  60083. if (numSizes[mergedIndex] + mergedOffset < startMinSize) mergedOffset = startMinSize - numSizes[mergedIndex];
  60084. if (numSizes[nextIndex] - mergedOffset < endMinSize) mergedOffset = numSizes[nextIndex] - endMinSize;
  60085. if (numSizes[mergedIndex] + mergedOffset > startMaxSize) mergedOffset = startMaxSize - numSizes[mergedIndex];
  60086. if (numSizes[nextIndex] - mergedOffset > endMaxSize) mergedOffset = numSizes[nextIndex] - endMaxSize;
  60087. numSizes[mergedIndex] += mergedOffset;
  60088. numSizes[nextIndex] -= mergedOffset;
  60089. lazyOffset.value = mergedOffset;
  60090. updatePanelSizes = () => {
  60091. panels.value.forEach((panel, index) => {
  60092. panel.size = numSizes[index];
  60093. });
  60094. updatePanelSizes = NOOP;
  60095. };
  60096. if (!lazy.value) updatePanelSizes();
  60097. };
  60098. const onMoveEnd = () => {
  60099. if (lazy.value) updatePanelSizes();
  60100. lazyOffset.value = 0;
  60101. movingIndex.value = null;
  60102. cachePxSizes = [];
  60103. };
  60104. const cacheCollapsedSize = [];
  60105. const onCollapse = (index, type) => {
  60106. if (!cacheCollapsedSize.length) cacheCollapsedSize.push(...pxSizes.value.map((size, i) => size <= 0 ? getLimitSize(limitSizes.value[i]?.[0], 0) : size));
  60107. const currentSizes = pxSizes.value;
  60108. const currentIndex = type === "start" ? index : index + 1;
  60109. const targetIndex = type === "start" ? index + 1 : index;
  60110. const currentSize = currentSizes[currentIndex];
  60111. const targetSize = currentSizes[targetIndex];
  60112. if (currentSize !== 0 && targetSize !== 0) {
  60113. currentSizes[currentIndex] = 0;
  60114. currentSizes[targetIndex] += currentSize;
  60115. cacheCollapsedSize[index] = currentSize;
  60116. } else {
  60117. const totalSize = currentSize + targetSize;
  60118. const targetCacheCollapsedSize = clamp$2(cacheCollapsedSize[index], 0, totalSize);
  60119. const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
  60120. currentSizes[targetIndex] = targetCacheCollapsedSize;
  60121. currentSizes[currentIndex] = currentCacheCollapsedSize;
  60122. }
  60123. panels.value.forEach((panel, index) => {
  60124. panel.size = currentSizes[index];
  60125. });
  60126. };
  60127. return {
  60128. lazyOffset,
  60129. onMoveStart,
  60130. onMoving,
  60131. onMoveEnd,
  60132. movingIndex,
  60133. onCollapse
  60134. };
  60135. }
  60136. //#endregion
  60137. //#region node_modules/element-plus/es/components/splitter/src/type.mjs
  60138. var splitterRootContextKey = Symbol("splitterRootContextKey");
  60139. //#endregion
  60140. //#region node_modules/element-plus/es/components/splitter/src/splitter2.mjs
  60141. var splitter_default = /* @__PURE__ */ defineComponent({
  60142. name: "ElSplitter",
  60143. __name: "splitter",
  60144. props: splitterProps,
  60145. emits: splitterEmits,
  60146. setup(__props, { emit: __emit }) {
  60147. const ns = useNamespace("splitter");
  60148. const emits = __emit;
  60149. const props = __props;
  60150. const layout = toRef(props, "layout");
  60151. const lazy = toRef(props, "lazy");
  60152. const { containerEl, containerSize } = useContainer(layout);
  60153. const { removeChild: unregisterPanel, children: panels, addChild: registerPanel, ChildrenSorter: PanelsSorter } = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel");
  60154. watch(panels, () => {
  60155. movingIndex.value = null;
  60156. panels.value.forEach((instance, index) => {
  60157. instance.setIndex(index);
  60158. });
  60159. });
  60160. const { percentSizes, pxSizes } = useSize$1(panels, containerSize);
  60161. const { lazyOffset, movingIndex, onMoveStart, onMoving, onMoveEnd, onCollapse } = useResize(panels, containerSize, pxSizes, lazy);
  60162. const splitterStyles = computed(() => {
  60163. return { [ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0 };
  60164. });
  60165. const onResizeStart = (index) => {
  60166. onMoveStart(index);
  60167. emits("resizeStart", index, pxSizes.value);
  60168. };
  60169. const onResize = (index, offset) => {
  60170. onMoving(index, offset);
  60171. if (!lazy.value) emits("resize", index, pxSizes.value);
  60172. };
  60173. const onResizeEnd = async (index) => {
  60174. onMoveEnd();
  60175. await nextTick();
  60176. emits("resizeEnd", index, pxSizes.value);
  60177. };
  60178. const onCollapsible = (index, type) => {
  60179. onCollapse(index, type);
  60180. emits("collapse", index, type, pxSizes.value);
  60181. };
  60182. provide(splitterRootContextKey, reactive({
  60183. panels,
  60184. percentSizes,
  60185. pxSizes,
  60186. layout,
  60187. lazy,
  60188. movingIndex,
  60189. containerSize,
  60190. onMoveStart: onResizeStart,
  60191. onMoving: onResize,
  60192. onMoveEnd: onResizeEnd,
  60193. onCollapse: onCollapsible,
  60194. registerPanel,
  60195. unregisterPanel
  60196. }));
  60197. return (_ctx, _cache) => {
  60198. return openBlock(), createElementBlock("div", {
  60199. ref_key: "containerEl",
  60200. ref: containerEl,
  60201. class: normalizeClass([unref(ns).b(), unref(ns).e(layout.value)]),
  60202. style: normalizeStyle(splitterStyles.value)
  60203. }, [
  60204. renderSlot(_ctx.$slots, "default"),
  60205. createVNode(unref(PanelsSorter)),
  60206. createCommentVNode(" Prevent iframe touch events from breaking "),
  60207. unref(movingIndex) ? (openBlock(), createElementBlock("div", {
  60208. key: 0,
  60209. class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${layout.value}`)])
  60210. }, null, 2)) : createCommentVNode("v-if", true)
  60211. ], 6);
  60212. };
  60213. }
  60214. });
  60215. //#endregion
  60216. //#region node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs
  60217. function getCollapsible(collapsible) {
  60218. if (collapsible && isObject$2(collapsible)) return collapsible;
  60219. return {
  60220. start: !!collapsible,
  60221. end: !!collapsible
  60222. };
  60223. }
  60224. function isCollapsible(panel, size, nextPanel, nextSize) {
  60225. if (panel?.collapsible.end && size > 0) return true;
  60226. if (nextPanel?.collapsible.start && nextSize === 0 && size > 0) return true;
  60227. return false;
  60228. }
  60229. //#endregion
  60230. //#region node_modules/element-plus/es/components/splitter/src/split-bar.mjs
  60231. var split_bar_default = /* @__PURE__ */ defineComponent({
  60232. name: "ElSplitterBar",
  60233. __name: "split-bar",
  60234. props: {
  60235. index: {
  60236. type: Number,
  60237. required: true
  60238. },
  60239. layout: {
  60240. type: String,
  60241. values: ["horizontal", "vertical"],
  60242. default: "horizontal"
  60243. },
  60244. resizable: {
  60245. type: Boolean,
  60246. default: true
  60247. },
  60248. lazy: Boolean,
  60249. startCollapsible: Boolean,
  60250. endCollapsible: Boolean
  60251. },
  60252. emits: [
  60253. "moveStart",
  60254. "moving",
  60255. "moveEnd",
  60256. "collapse"
  60257. ],
  60258. setup(__props, { emit: __emit }) {
  60259. const ns = useNamespace("splitter-bar");
  60260. const props = __props;
  60261. const emit = __emit;
  60262. const isHorizontal = computed(() => props.layout === "horizontal");
  60263. const barWrapStyles = computed(() => {
  60264. if (isHorizontal.value) return { width: 0 };
  60265. return { height: 0 };
  60266. });
  60267. const draggerStyles = computed(() => {
  60268. return {
  60269. width: isHorizontal.value ? "16px" : "100%",
  60270. height: isHorizontal.value ? "100%" : "16px",
  60271. cursor: !props.resizable ? "auto" : isHorizontal.value ? "ew-resize" : "ns-resize",
  60272. touchAction: "none"
  60273. };
  60274. });
  60275. const draggerPseudoClass = computed(() => {
  60276. const prefix = ns.e("dragger");
  60277. return {
  60278. [`${prefix}-horizontal`]: isHorizontal.value,
  60279. [`${prefix}-vertical`]: !isHorizontal.value,
  60280. [`${prefix}-active`]: !!startPos.value
  60281. };
  60282. });
  60283. const startPos = ref(null);
  60284. const onMousedown = (e) => {
  60285. if (!props.resizable) return;
  60286. startPos.value = [e.pageX, e.pageY];
  60287. emit("moveStart", props.index);
  60288. window.addEventListener("mouseup", onMouseUp);
  60289. window.addEventListener("mousemove", onMouseMove);
  60290. };
  60291. const onTouchStart = (e) => {
  60292. if (props.resizable && e.touches.length === 1) {
  60293. e.preventDefault();
  60294. const touch = e.touches[0];
  60295. startPos.value = [touch.pageX, touch.pageY];
  60296. emit("moveStart", props.index);
  60297. window.addEventListener("touchend", onTouchEnd);
  60298. window.addEventListener("touchmove", onTouchMove);
  60299. }
  60300. };
  60301. const onMouseMove = (e) => {
  60302. const { pageX, pageY } = e;
  60303. const offsetX = pageX - startPos.value[0];
  60304. const offsetY = pageY - startPos.value[1];
  60305. const offset = isHorizontal.value ? offsetX : offsetY;
  60306. emit("moving", props.index, offset);
  60307. };
  60308. const onTouchMove = (e) => {
  60309. if (e.touches.length === 1) {
  60310. e.preventDefault();
  60311. const touch = e.touches[0];
  60312. const offsetX = touch.pageX - startPos.value[0];
  60313. const offsetY = touch.pageY - startPos.value[1];
  60314. const offset = isHorizontal.value ? offsetX : offsetY;
  60315. emit("moving", props.index, offset);
  60316. }
  60317. };
  60318. const onMouseUp = () => {
  60319. startPos.value = null;
  60320. window.removeEventListener("mouseup", onMouseUp);
  60321. window.removeEventListener("mousemove", onMouseMove);
  60322. emit("moveEnd", props.index);
  60323. };
  60324. const onTouchEnd = () => {
  60325. startPos.value = null;
  60326. window.removeEventListener("touchend", onTouchEnd);
  60327. window.removeEventListener("touchmove", onTouchMove);
  60328. emit("moveEnd", props.index);
  60329. };
  60330. const StartIcon = computed(() => isHorizontal.value ? arrow_left_default : arrow_up_default);
  60331. const EndIcon = computed(() => isHorizontal.value ? arrow_right_default : arrow_down_default);
  60332. return (_ctx, _cache) => {
  60333. return openBlock(), createElementBlock("div", {
  60334. class: normalizeClass([unref(ns).b()]),
  60335. style: normalizeStyle(barWrapStyles.value)
  60336. }, [
  60337. __props.startCollapsible ? (openBlock(), createElementBlock("div", {
  60338. key: 0,
  60339. class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-start`)]),
  60340. onClick: _cache[0] || (_cache[0] = ($event) => emit("collapse", __props.index, "start"))
  60341. }, [renderSlot(_ctx.$slots, "start-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(StartIcon.value), { style: {
  60342. "width": "12px",
  60343. "height": "12px"
  60344. } }))])], 2)) : createCommentVNode("v-if", true),
  60345. createBaseVNode("div", {
  60346. class: normalizeClass([
  60347. unref(ns).e("dragger"),
  60348. draggerPseudoClass.value,
  60349. unref(ns).is("disabled", !__props.resizable),
  60350. unref(ns).is("lazy", __props.resizable && __props.lazy)
  60351. ]),
  60352. style: normalizeStyle(draggerStyles.value),
  60353. onMousedown,
  60354. onTouchstart: onTouchStart
  60355. }, null, 38),
  60356. __props.endCollapsible ? (openBlock(), createElementBlock("div", {
  60357. key: 1,
  60358. class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-end`)]),
  60359. onClick: _cache[1] || (_cache[1] = ($event) => emit("collapse", __props.index, "end"))
  60360. }, [renderSlot(_ctx.$slots, "end-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(EndIcon.value), { style: {
  60361. "width": "12px",
  60362. "height": "12px"
  60363. } }))])], 2)) : createCommentVNode("v-if", true)
  60364. ], 6);
  60365. };
  60366. }
  60367. });
  60368. //#endregion
  60369. //#region node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs
  60370. var COMPONENT_NAME = "ElSplitterPanel";
  60371. //#endregion
  60372. //#region node_modules/element-plus/es/components/splitter/src/split-panel2.mjs
  60373. var split_panel_default = /* @__PURE__ */ defineComponent({
  60374. name: COMPONENT_NAME,
  60375. __name: "split-panel",
  60376. props: splitterPanelProps,
  60377. emits: splitterPanelEmits,
  60378. setup(__props, { expose: __expose, emit: __emit }) {
  60379. const ns = useNamespace("splitter-panel");
  60380. const props = __props;
  60381. const emits = __emit;
  60382. const splitterContext = inject(splitterRootContextKey);
  60383. if (!splitterContext) throwError(COMPONENT_NAME, "usage: <el-splitter><el-splitter-panel /></el-splitter/>");
  60384. const { panels, layout, lazy, containerSize, pxSizes } = toRefs(splitterContext);
  60385. const { registerPanel, unregisterPanel, onCollapse, onMoveEnd, onMoveStart, onMoving } = splitterContext;
  60386. const panelEl = ref();
  60387. const instance = getCurrentInstance();
  60388. const uid = instance.uid;
  60389. const index = ref(0);
  60390. const panel = computed(() => panels.value[index.value]);
  60391. const setIndex = (val) => {
  60392. index.value = val;
  60393. };
  60394. const panelSize = computed(() => {
  60395. if (!panel.value) return 0;
  60396. return pxSizes.value[index.value] ?? 0;
  60397. });
  60398. const nextSize = computed(() => {
  60399. if (!panel.value) return 0;
  60400. return pxSizes.value[index.value + 1] ?? 0;
  60401. });
  60402. const nextPanel = computed(() => {
  60403. if (panel.value) return panels.value[index.value + 1];
  60404. return null;
  60405. });
  60406. const isResizable = computed(() => {
  60407. if (!nextPanel.value) return false;
  60408. return props.resizable && nextPanel.value?.resizable && (panelSize.value !== 0 || !props.min) && (nextSize.value !== 0 || !nextPanel.value.min);
  60409. });
  60410. const isShowBar = computed(() => {
  60411. if (!panel.value) return false;
  60412. return index.value !== panels.value.length - 1;
  60413. });
  60414. const startCollapsible = computed(() => isCollapsible(panel.value, panelSize.value, nextPanel.value, nextSize.value));
  60415. const endCollapsible = computed(() => isCollapsible(nextPanel.value, nextSize.value, panel.value, panelSize.value));
  60416. function sizeToPx(str) {
  60417. if (isPct(str)) return getPct(str) * containerSize.value || 0;
  60418. else if (isPx(str)) return getPx(str);
  60419. return str ?? 0;
  60420. }
  60421. let isSizeUpdating = false;
  60422. watch(() => props.size, () => {
  60423. if (!isSizeUpdating && panel.value) {
  60424. if (!containerSize.value) {
  60425. panel.value.size = props.size;
  60426. return;
  60427. }
  60428. const size = sizeToPx(props.size);
  60429. const maxSize = sizeToPx(props.max);
  60430. const minSize = sizeToPx(props.min);
  60431. const finalSize = Math.min(Math.max(size, minSize || 0), maxSize || size);
  60432. if (finalSize !== size) emits("update:size", finalSize);
  60433. panel.value.size = finalSize;
  60434. }
  60435. });
  60436. watch(() => panel.value?.size, (val) => {
  60437. if (val !== props.size) {
  60438. isSizeUpdating = true;
  60439. emits("update:size", val);
  60440. nextTick(() => isSizeUpdating = false);
  60441. }
  60442. });
  60443. watch(() => props.resizable, (val) => {
  60444. if (panel.value) panel.value.resizable = val;
  60445. });
  60446. const _panel = reactive({
  60447. uid,
  60448. getVnode: () => instance.vnode,
  60449. setIndex,
  60450. ...props,
  60451. collapsible: computed(() => getCollapsible(props.collapsible))
  60452. });
  60453. registerPanel(_panel);
  60454. onBeforeUnmount(() => unregisterPanel(_panel));
  60455. __expose({
  60456. /** @description splitter-panel html element */
  60457. splitterPanelRef: panelEl });
  60458. return (_ctx, _cache) => {
  60459. return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("div", mergeProps({
  60460. ref_key: "panelEl",
  60461. ref: panelEl,
  60462. class: [unref(ns).b()],
  60463. style: { flexBasis: `${panelSize.value}px` }
  60464. }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16), isShowBar.value ? (openBlock(), createBlock(split_bar_default, {
  60465. key: 0,
  60466. index: index.value,
  60467. layout: unref(layout),
  60468. lazy: unref(lazy),
  60469. resizable: isResizable.value,
  60470. "start-collapsible": startCollapsible.value,
  60471. "end-collapsible": endCollapsible.value,
  60472. onMoveStart: unref(onMoveStart),
  60473. onMoving: unref(onMoving),
  60474. onMoveEnd: unref(onMoveEnd),
  60475. onCollapse: unref(onCollapse)
  60476. }, {
  60477. "start-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "start-collapsible")]),
  60478. "end-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "end-collapsible")]),
  60479. _: 3
  60480. }, 8, [
  60481. "index",
  60482. "layout",
  60483. "lazy",
  60484. "resizable",
  60485. "start-collapsible",
  60486. "end-collapsible",
  60487. "onMoveStart",
  60488. "onMoving",
  60489. "onMoveEnd",
  60490. "onCollapse"
  60491. ])) : createCommentVNode("v-if", true)], 64);
  60492. };
  60493. }
  60494. });
  60495. //#endregion
  60496. //#region node_modules/element-plus/es/components/splitter/index.mjs
  60497. var ElSplitter = withInstall(splitter_default, { SplitPanel: split_panel_default });
  60498. var ElSplitterPanel = withNoopInstall(split_panel_default);
  60499. //#endregion
  60500. //#region node_modules/element-plus/es/components/infinite-scroll/src/index.mjs
  60501. var SCOPE$1 = "ElInfiniteScroll";
  60502. var attributes = {
  60503. delay: {
  60504. type: Number,
  60505. default: 200
  60506. },
  60507. distance: {
  60508. type: Number,
  60509. default: 0
  60510. },
  60511. disabled: {
  60512. type: Boolean,
  60513. default: false
  60514. },
  60515. immediate: {
  60516. type: Boolean,
  60517. default: true
  60518. }
  60519. };
  60520. var getScrollOptions = (el, instance) => {
  60521. return Object.entries(attributes).reduce((acm, [name, option]) => {
  60522. const { type, default: defaultValue } = option;
  60523. const attrVal = el.getAttribute(`infinite-scroll-${name}`);
  60524. let value = instance[attrVal] ?? attrVal ?? defaultValue;
  60525. value = value === "false" ? false : value;
  60526. value = type(value);
  60527. acm[name] = Number.isNaN(value) ? defaultValue : value;
  60528. return acm;
  60529. }, {});
  60530. };
  60531. var destroyObserver = (el) => {
  60532. const { observer } = el[SCOPE$1];
  60533. if (observer) {
  60534. observer.disconnect();
  60535. delete el[SCOPE$1].observer;
  60536. }
  60537. };
  60538. var handleScroll = (el, cb) => {
  60539. const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE$1];
  60540. const { disabled, distance } = getScrollOptions(el, instance);
  60541. const { clientHeight, scrollHeight, scrollTop } = containerEl;
  60542. const delta = scrollTop - lastScrollTop;
  60543. el[SCOPE$1].lastScrollTop = scrollTop;
  60544. if (observer || disabled || delta < 0) return;
  60545. let shouldTrigger = false;
  60546. if (container === el) shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance;
  60547. else {
  60548. const { clientTop, scrollHeight: height } = el;
  60549. const offsetTop = getOffsetTopDistance(el, containerEl);
  60550. shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance;
  60551. }
  60552. if (shouldTrigger) cb.call(instance);
  60553. };
  60554. function checkFull(el, cb) {
  60555. const { containerEl, instance } = el[SCOPE$1];
  60556. const { disabled } = getScrollOptions(el, instance);
  60557. if (disabled || containerEl.clientHeight === 0) return;
  60558. if (containerEl.scrollHeight <= containerEl.clientHeight) cb.call(instance);
  60559. else destroyObserver(el);
  60560. }
  60561. //#endregion
  60562. //#region node_modules/element-plus/es/components/infinite-scroll/index.mjs
  60563. var _InfiniteScroll = {
  60564. async mounted(el, binding) {
  60565. const { instance, value: cb } = binding;
  60566. useDeprecated({
  60567. scope: SCOPE$1,
  60568. from: "the directive v-infinite-scroll",
  60569. replacement: "the el-scrollbar infinite scroll",
  60570. version: "3.0.0",
  60571. ref: "https://element-plus.org/en-US/component/scrollbar#infinite-scroll"
  60572. }, true);
  60573. if (!isFunction$1(cb)) throwError(SCOPE$1, "'v-infinite-scroll' binding value must be a function");
  60574. await nextTick();
  60575. const { delay, immediate } = getScrollOptions(el, instance);
  60576. const container = getScrollContainer(el, true);
  60577. const containerEl = container === window ? document.documentElement : container;
  60578. const onScroll = throttle(handleScroll.bind(null, el, cb), delay);
  60579. if (!container) return;
  60580. el[SCOPE$1] = {
  60581. instance,
  60582. container,
  60583. containerEl,
  60584. delay,
  60585. cb,
  60586. onScroll,
  60587. lastScrollTop: containerEl.scrollTop
  60588. };
  60589. if (immediate) {
  60590. const observer = new MutationObserver(throttle(checkFull.bind(null, el, cb), 50));
  60591. el[SCOPE$1].observer = observer;
  60592. observer.observe(el, {
  60593. childList: true,
  60594. subtree: true
  60595. });
  60596. checkFull(el, cb);
  60597. }
  60598. container.addEventListener("scroll", onScroll);
  60599. },
  60600. unmounted(el) {
  60601. if (!el["ElInfiniteScroll"]) return;
  60602. const { container, onScroll } = el[SCOPE$1];
  60603. container?.removeEventListener("scroll", onScroll);
  60604. destroyObserver(el);
  60605. },
  60606. async updated(el) {
  60607. if (!el["ElInfiniteScroll"]) await nextTick();
  60608. else {
  60609. const { containerEl, cb, observer } = el[SCOPE$1];
  60610. if (containerEl.clientHeight && observer) checkFull(el, cb);
  60611. }
  60612. }
  60613. };
  60614. _InfiniteScroll.install = (app) => {
  60615. app.directive("InfiniteScroll", _InfiniteScroll);
  60616. };
  60617. var ElInfiniteScroll = _InfiniteScroll;
  60618. //#endregion
  60619. //#region node_modules/element-plus/es/components/loading/src/loading.mjs
  60620. function createLoadingComponent(options, appContext) {
  60621. let afterLeaveTimer;
  60622. const afterLeaveFlag = ref(false);
  60623. const data = reactive({
  60624. ...options,
  60625. originalPosition: "",
  60626. originalOverflow: "",
  60627. visible: false
  60628. });
  60629. function setText(text) {
  60630. data.text = text;
  60631. }
  60632. function destroySelf() {
  60633. const target = data.parent;
  60634. const ns = vm.ns;
  60635. if (!target.vLoadingAddClassList) {
  60636. let loadingNumber = target.getAttribute("loading-number");
  60637. loadingNumber = Number.parseInt(loadingNumber) - 1;
  60638. if (!loadingNumber) {
  60639. removeClass(target, ns.bm("parent", "relative"));
  60640. target.removeAttribute("loading-number");
  60641. } else target.setAttribute("loading-number", loadingNumber.toString());
  60642. removeClass(target, ns.bm("parent", "hidden"));
  60643. }
  60644. removeElLoadingChild();
  60645. loadingInstance.unmount();
  60646. }
  60647. function removeElLoadingChild() {
  60648. vm.$el?.parentNode?.removeChild(vm.$el);
  60649. }
  60650. function close() {
  60651. if (options.beforeClose && !options.beforeClose()) return;
  60652. afterLeaveFlag.value = true;
  60653. clearTimeout(afterLeaveTimer);
  60654. afterLeaveTimer = setTimeout(handleAfterLeave, 400);
  60655. data.visible = false;
  60656. options.closed?.();
  60657. }
  60658. function handleAfterLeave() {
  60659. if (!afterLeaveFlag.value) return;
  60660. const target = data.parent;
  60661. afterLeaveFlag.value = false;
  60662. target.vLoadingAddClassList = void 0;
  60663. destroySelf();
  60664. }
  60665. const loadingInstance = createApp(defineComponent({
  60666. name: "ElLoading",
  60667. setup(_, { expose }) {
  60668. const { ns, zIndex } = useGlobalComponentSettings("loading");
  60669. expose({
  60670. ns,
  60671. zIndex
  60672. });
  60673. return () => {
  60674. const svg = data.spinner || data.svg;
  60675. const spinner = h$1("svg", {
  60676. class: "circular",
  60677. viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50",
  60678. ...svg ? { innerHTML: svg } : {}
  60679. }, [h$1("circle", {
  60680. class: "path",
  60681. cx: "25",
  60682. cy: "25",
  60683. r: "20",
  60684. fill: "none"
  60685. })]);
  60686. const spinnerText = data.text ? h$1("p", { class: ns.b("text") }, [data.text]) : void 0;
  60687. return h$1(Transition, {
  60688. name: ns.b("fade"),
  60689. onAfterLeave: handleAfterLeave
  60690. }, { default: withCtx(() => [withDirectives(createVNode("div", {
  60691. style: { backgroundColor: data.background || "" },
  60692. class: [
  60693. ns.b("mask"),
  60694. data.customClass,
  60695. ns.is("fullscreen", data.fullscreen)
  60696. ]
  60697. }, [h$1("div", { class: ns.b("spinner") }, [spinner, spinnerText])]), [[vShow, data.visible]])]) });
  60698. };
  60699. }
  60700. }));
  60701. Object.assign(loadingInstance._context, appContext ?? {});
  60702. const vm = loadingInstance.mount(document.createElement("div"));
  60703. return {
  60704. ...toRefs(data),
  60705. setText,
  60706. removeElLoadingChild,
  60707. close,
  60708. handleAfterLeave,
  60709. vm,
  60710. get $el() {
  60711. return vm.$el;
  60712. }
  60713. };
  60714. }
  60715. //#endregion
  60716. //#region node_modules/element-plus/es/components/loading/src/service.mjs
  60717. var fullscreenInstance = void 0;
  60718. var Loading = function(options = {}, context) {
  60719. if (!isClient) return void 0;
  60720. const resolved = resolveOptions(options);
  60721. if (resolved.fullscreen && fullscreenInstance) return fullscreenInstance;
  60722. const instance = createLoadingComponent({
  60723. ...resolved,
  60724. closed: () => {
  60725. resolved.closed?.();
  60726. if (resolved.fullscreen) fullscreenInstance = void 0;
  60727. }
  60728. }, context ?? Loading._context);
  60729. addStyle(resolved, resolved.parent, instance);
  60730. addClassList(resolved, resolved.parent, instance);
  60731. resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
  60732. /**
  60733. * add loading-number to parent.
  60734. * because if a fullscreen loading is triggered when somewhere
  60735. * a v-loading.body was triggered before and it's parent is
  60736. * document.body which with a margin , the fullscreen loading's
  60737. * destroySelf function will remove 'el-loading-parent--relative',
  60738. * and then the position of v-loading.body will be error.
  60739. */
  60740. let loadingNumber = resolved.parent.getAttribute("loading-number");
  60741. if (!loadingNumber) loadingNumber = "1";
  60742. else loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
  60743. resolved.parent.setAttribute("loading-number", loadingNumber);
  60744. resolved.parent.appendChild(instance.$el);
  60745. nextTick(() => instance.visible.value = resolved.visible);
  60746. if (resolved.fullscreen) fullscreenInstance = instance;
  60747. return instance;
  60748. };
  60749. var resolveOptions = (options) => {
  60750. let target;
  60751. if (isString(options.target)) target = document.querySelector(options.target) ?? document.body;
  60752. else target = options.target || document.body;
  60753. return {
  60754. parent: target === document.body || options.body ? document.body : target,
  60755. background: options.background || "",
  60756. svg: options.svg || "",
  60757. svgViewBox: options.svgViewBox || "",
  60758. spinner: options.spinner || false,
  60759. text: options.text || "",
  60760. fullscreen: target === document.body && (options.fullscreen ?? true),
  60761. lock: options.lock ?? false,
  60762. customClass: options.customClass || "",
  60763. visible: options.visible ?? true,
  60764. beforeClose: options.beforeClose,
  60765. closed: options.closed,
  60766. target
  60767. };
  60768. };
  60769. var addStyle = async (options, parent, instance) => {
  60770. const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex;
  60771. const maskStyle = {};
  60772. if (options.fullscreen) {
  60773. instance.originalPosition.value = getStyle(document.body, "position");
  60774. instance.originalOverflow.value = getStyle(document.body, "overflow");
  60775. maskStyle.zIndex = nextZIndex();
  60776. } else if (options.parent === document.body) {
  60777. instance.originalPosition.value = getStyle(document.body, "position");
  60778. /**
  60779. * await dom render when visible is true in init,
  60780. * because some component's height maybe 0.
  60781. * e.g. el-table.
  60782. */
  60783. await nextTick();
  60784. for (const property of ["top", "left"]) {
  60785. const scroll = property === "top" ? "scrollTop" : "scrollLeft";
  60786. maskStyle[property] = `${options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property}`), 10)}px`;
  60787. }
  60788. for (const property of ["height", "width"]) maskStyle[property] = `${options.target.getBoundingClientRect()[property]}px`;
  60789. } else instance.originalPosition.value = getStyle(parent, "position");
  60790. for (const [key, value] of Object.entries(maskStyle)) instance.$el.style[key] = value;
  60791. };
  60792. var addClassList = (options, parent, instance) => {
  60793. const ns = instance.vm.ns || instance.vm._.exposed.ns;
  60794. if (![
  60795. "absolute",
  60796. "fixed",
  60797. "sticky"
  60798. ].includes(instance.originalPosition.value)) addClass(parent, ns.bm("parent", "relative"));
  60799. else removeClass(parent, ns.bm("parent", "relative"));
  60800. if (options.fullscreen && options.lock) addClass(parent, ns.bm("parent", "hidden"));
  60801. else removeClass(parent, ns.bm("parent", "hidden"));
  60802. };
  60803. Loading._context = null;
  60804. //#endregion
  60805. //#region node_modules/element-plus/es/components/loading/src/directive.mjs
  60806. var INSTANCE_KEY = Symbol("ElLoading");
  60807. var getAttributeName = (name) => {
  60808. return `element-loading-${hyphenate$1(name)}`;
  60809. };
  60810. var createInstance = (el, binding) => {
  60811. const vm = binding.instance;
  60812. const getBindingProp = (key) => isObject$2(binding.value) ? binding.value[key] : void 0;
  60813. const resolveExpression = (key) => {
  60814. return ref(isString(key) && vm?.[key] || key);
  60815. };
  60816. const getProp = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(getAttributeName(name)));
  60817. const fullscreen = getBindingProp("fullscreen") ?? binding.modifiers.fullscreen;
  60818. const options = {
  60819. text: getProp("text"),
  60820. svg: getProp("svg"),
  60821. svgViewBox: getProp("svgViewBox"),
  60822. spinner: getProp("spinner"),
  60823. background: getProp("background"),
  60824. customClass: getProp("customClass"),
  60825. fullscreen,
  60826. target: getBindingProp("target") ?? (fullscreen ? void 0 : el),
  60827. body: getBindingProp("body") ?? binding.modifiers.body,
  60828. lock: getBindingProp("lock") ?? binding.modifiers.lock
  60829. };
  60830. const instance = Loading(options);
  60831. instance._context = vLoading._context;
  60832. el[INSTANCE_KEY] = {
  60833. options,
  60834. instance
  60835. };
  60836. };
  60837. var updateOptions = (originalOptions, newOptions) => {
  60838. for (const key of Object.keys(originalOptions)) if (isRef(originalOptions[key])) originalOptions[key].value = newOptions[key];
  60839. };
  60840. var vLoading = {
  60841. mounted(el, binding) {
  60842. if (binding.value) createInstance(el, binding);
  60843. },
  60844. updated(el, binding) {
  60845. const instance = el[INSTANCE_KEY];
  60846. if (!binding.value) {
  60847. instance?.instance.close();
  60848. el[INSTANCE_KEY] = null;
  60849. return;
  60850. }
  60851. if (!instance) createInstance(el, binding);
  60852. else updateOptions(instance.options, isObject$2(binding.value) ? binding.value : {
  60853. text: el.getAttribute(getAttributeName("text")),
  60854. svg: el.getAttribute(getAttributeName("svg")),
  60855. svgViewBox: el.getAttribute(getAttributeName("svgViewBox")),
  60856. spinner: el.getAttribute(getAttributeName("spinner")),
  60857. background: el.getAttribute(getAttributeName("background")),
  60858. customClass: el.getAttribute(getAttributeName("customClass"))
  60859. });
  60860. },
  60861. unmounted(el) {
  60862. el[INSTANCE_KEY]?.instance.close();
  60863. el[INSTANCE_KEY] = null;
  60864. }
  60865. };
  60866. vLoading._context = null;
  60867. //#endregion
  60868. //#region node_modules/element-plus/es/components/loading/index.mjs
  60869. var ElLoading = {
  60870. install(app) {
  60871. Loading._context = app._context;
  60872. vLoading._context = app._context;
  60873. app.directive("loading", vLoading);
  60874. app.config.globalProperties.$loading = Loading;
  60875. },
  60876. directive: vLoading,
  60877. service: Loading
  60878. };
  60879. //#endregion
  60880. //#region node_modules/element-plus/es/components/message/src/message.mjs
  60881. var messageTypes = [
  60882. "primary",
  60883. "success",
  60884. "info",
  60885. "warning",
  60886. "error"
  60887. ];
  60888. var messagePlacement = [
  60889. "top",
  60890. "top-left",
  60891. "top-right",
  60892. "bottom",
  60893. "bottom-left",
  60894. "bottom-right"
  60895. ];
  60896. var MESSAGE_DEFAULT_PLACEMENT = "top";
  60897. var messageDefaults = mutable({
  60898. customClass: "",
  60899. dangerouslyUseHTMLString: false,
  60900. duration: 3e3,
  60901. icon: void 0,
  60902. id: "",
  60903. message: "",
  60904. onClose: void 0,
  60905. showClose: false,
  60906. type: "info",
  60907. plain: false,
  60908. offset: 16,
  60909. placement: void 0,
  60910. zIndex: 0,
  60911. grouping: false,
  60912. repeatNum: 1,
  60913. appendTo: isClient ? document.body : void 0
  60914. });
  60915. /**
  60916. * @deprecated Removed after 3.0.0, Use `MessageProps` instead.
  60917. */
  60918. var messageProps = buildProps({
  60919. /**
  60920. * @description custom class name for Message
  60921. */
  60922. customClass: {
  60923. type: String,
  60924. default: messageDefaults.customClass
  60925. },
  60926. /**
  60927. * @description whether `message` is treated as HTML string
  60928. */
  60929. dangerouslyUseHTMLString: {
  60930. type: Boolean,
  60931. default: messageDefaults.dangerouslyUseHTMLString
  60932. },
  60933. /**
  60934. * @description display duration, millisecond. If set to 0, it will not turn off automatically
  60935. */
  60936. duration: {
  60937. type: Number,
  60938. default: messageDefaults.duration
  60939. },
  60940. /**
  60941. * @description custom icon component, overrides `type`
  60942. */
  60943. icon: {
  60944. type: iconPropType,
  60945. default: messageDefaults.icon
  60946. },
  60947. /**
  60948. * @description message dom id
  60949. */
  60950. id: {
  60951. type: String,
  60952. default: messageDefaults.id
  60953. },
  60954. /**
  60955. * @description message text
  60956. */
  60957. message: {
  60958. type: definePropType([
  60959. String,
  60960. Object,
  60961. Function
  60962. ]),
  60963. default: messageDefaults.message
  60964. },
  60965. /**
  60966. * @description callback function when closed with the message instance as the parameter
  60967. */
  60968. onClose: {
  60969. type: definePropType(Function),
  60970. default: messageDefaults.onClose
  60971. },
  60972. /**
  60973. * @description whether to show a close button
  60974. */
  60975. showClose: {
  60976. type: Boolean,
  60977. default: messageDefaults.showClose
  60978. },
  60979. /**
  60980. * @description message type
  60981. */
  60982. type: {
  60983. type: String,
  60984. values: messageTypes,
  60985. default: messageDefaults.type
  60986. },
  60987. /**
  60988. * @description whether message is plain
  60989. */
  60990. plain: {
  60991. type: Boolean,
  60992. default: messageDefaults.plain
  60993. },
  60994. /**
  60995. * @description set the distance to the top of viewport
  60996. */
  60997. offset: {
  60998. type: Number,
  60999. default: messageDefaults.offset
  61000. },
  61001. /**
  61002. * @description message placement position
  61003. */
  61004. placement: {
  61005. type: String,
  61006. values: messagePlacement,
  61007. default: messageDefaults.placement
  61008. },
  61009. /**
  61010. * @description message element zIndex value
  61011. */
  61012. zIndex: {
  61013. type: Number,
  61014. default: messageDefaults.zIndex
  61015. },
  61016. /**
  61017. * @description merge messages with the same content, type of VNode message is not supported
  61018. */
  61019. grouping: {
  61020. type: Boolean,
  61021. default: messageDefaults.grouping
  61022. },
  61023. /**
  61024. * @description The number of repetitions, similar to badge, is used as the initial number when used with `grouping`
  61025. */
  61026. repeatNum: {
  61027. type: Number,
  61028. default: messageDefaults.repeatNum
  61029. }
  61030. });
  61031. var messageEmits = { destroy: () => true };
  61032. //#endregion
  61033. //#region node_modules/element-plus/es/components/message/src/instance.mjs
  61034. var placementInstances = shallowReactive({});
  61035. var getOrCreatePlacementInstances = (placement) => {
  61036. if (!placementInstances[placement]) placementInstances[placement] = shallowReactive([]);
  61037. return placementInstances[placement];
  61038. };
  61039. var getInstance = (id, placement) => {
  61040. const instances = placementInstances[placement] || [];
  61041. const idx = instances.findIndex((instance) => instance.id === id);
  61042. const current = instances[idx];
  61043. let prev;
  61044. if (idx > 0) prev = instances[idx - 1];
  61045. return {
  61046. current,
  61047. prev
  61048. };
  61049. };
  61050. var getLastOffset = (id, placement) => {
  61051. const { prev } = getInstance(id, placement);
  61052. if (!prev) return 0;
  61053. return prev.vm.exposed.bottom.value;
  61054. };
  61055. var getOffsetOrSpace = (id, offset, placement) => {
  61056. return (placementInstances[placement] || []).findIndex((instance) => instance.id === id) > 0 ? 16 : offset;
  61057. };
  61058. //#endregion
  61059. //#region node_modules/element-plus/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs
  61060. var _hoisted_1$2 = ["id"];
  61061. var _hoisted_2$2 = ["innerHTML"];
  61062. //#endregion
  61063. //#region node_modules/element-plus/es/components/message/src/message2.mjs
  61064. var message_default = /* @__PURE__ */ defineComponent({
  61065. name: "ElMessage",
  61066. __name: "message",
  61067. props: messageProps,
  61068. emits: messageEmits,
  61069. setup(__props, { expose: __expose, emit: __emit }) {
  61070. const { Close } = TypeComponents;
  61071. const props = __props;
  61072. const emit = __emit;
  61073. const isStartTransition = ref(false);
  61074. const { ns, zIndex } = useGlobalComponentSettings("message");
  61075. const { currentZIndex, nextZIndex } = zIndex;
  61076. const messageRef = ref();
  61077. const visible = ref(false);
  61078. const height = ref(0);
  61079. let stopTimer = void 0;
  61080. const badgeType = computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
  61081. const typeClass = computed(() => {
  61082. const type = props.type;
  61083. return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
  61084. });
  61085. const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || "");
  61086. const placement = computed(() => props.placement || "top");
  61087. const lastOffset = computed(() => getLastOffset(props.id, placement.value));
  61088. const offset = computed(() => {
  61089. return Math.max(getOffsetOrSpace(props.id, props.offset, placement.value) + lastOffset.value, props.offset);
  61090. });
  61091. const bottom = computed(() => height.value + offset.value);
  61092. const horizontalClass = computed(() => {
  61093. if (placement.value.includes("left")) return ns.is("left");
  61094. if (placement.value.includes("right")) return ns.is("right");
  61095. return ns.is("center");
  61096. });
  61097. const verticalProperty = computed(() => placement.value.startsWith("top") ? "top" : "bottom");
  61098. const customStyle = computed(() => ({
  61099. [verticalProperty.value]: `${offset.value}px`,
  61100. zIndex: currentZIndex.value
  61101. }));
  61102. function startTimer() {
  61103. if (props.duration === 0) return;
  61104. ({stop: stopTimer} = useTimeoutFn(() => {
  61105. close();
  61106. }, props.duration));
  61107. }
  61108. function clearTimer() {
  61109. stopTimer?.();
  61110. }
  61111. function close() {
  61112. visible.value = false;
  61113. nextTick(() => {
  61114. if (!isStartTransition.value) {
  61115. props.onClose?.();
  61116. emit("destroy");
  61117. }
  61118. });
  61119. }
  61120. function keydown(event) {
  61121. if (getEventCode(event) === EVENT_CODE.esc) close();
  61122. }
  61123. onMounted(() => {
  61124. startTimer();
  61125. nextZIndex();
  61126. visible.value = true;
  61127. });
  61128. watch(() => props.repeatNum, () => {
  61129. clearTimer();
  61130. startTimer();
  61131. });
  61132. useEventListener(document, "keydown", keydown);
  61133. useResizeObserver(messageRef, () => {
  61134. height.value = messageRef.value.getBoundingClientRect().height;
  61135. });
  61136. __expose({
  61137. visible,
  61138. bottom,
  61139. close
  61140. });
  61141. return (_ctx, _cache) => {
  61142. return openBlock(), createBlock(Transition, {
  61143. name: unref(ns).b("fade"),
  61144. onBeforeEnter: _cache[0] || (_cache[0] = ($event) => isStartTransition.value = true),
  61145. onBeforeLeave: __props.onClose,
  61146. onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
  61147. persisted: ""
  61148. }, {
  61149. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  61150. id: __props.id,
  61151. ref_key: "messageRef",
  61152. ref: messageRef,
  61153. class: normalizeClass([
  61154. unref(ns).b(),
  61155. { [unref(ns).m(__props.type)]: __props.type },
  61156. unref(ns).is("closable", __props.showClose),
  61157. unref(ns).is("plain", __props.plain),
  61158. unref(ns).is("bottom", verticalProperty.value === "bottom"),
  61159. horizontalClass.value,
  61160. __props.customClass
  61161. ]),
  61162. style: normalizeStyle(customStyle.value),
  61163. role: "alert",
  61164. onMouseenter: clearTimer,
  61165. onMouseleave: startTimer
  61166. }, [
  61167. __props.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), {
  61168. key: 0,
  61169. value: __props.repeatNum,
  61170. type: badgeType.value,
  61171. class: normalizeClass(unref(ns).e("badge"))
  61172. }, null, 8, [
  61173. "value",
  61174. "type",
  61175. "class"
  61176. ])) : createCommentVNode("v-if", true),
  61177. iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
  61178. key: 1,
  61179. class: normalizeClass([unref(ns).e("icon"), typeClass.value])
  61180. }, {
  61181. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))]),
  61182. _: 1
  61183. }, 8, ["class"])) : createCommentVNode("v-if", true),
  61184. !__props.dangerouslyUseHTMLString || _ctx.$slots.default ? (openBlock(), createElementBlock("p", {
  61185. key: 2,
  61186. class: normalizeClass(unref(ns).e("content"))
  61187. }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.message), 1)])], 2)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", {
  61188. class: normalizeClass(unref(ns).e("content")),
  61189. innerHTML: __props.message
  61190. }, null, 10, _hoisted_2$2)], 2112)),
  61191. __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
  61192. key: 4,
  61193. class: normalizeClass(unref(ns).e("closeBtn")),
  61194. onClick: withModifiers(close, ["stop"])
  61195. }, {
  61196. default: withCtx(() => [createVNode(unref(Close))]),
  61197. _: 1
  61198. }, 8, ["class"])) : createCommentVNode("v-if", true)
  61199. ], 46, _hoisted_1$2), [[vShow, visible.value]])]),
  61200. _: 3
  61201. }, 8, ["name", "onBeforeLeave"]);
  61202. };
  61203. }
  61204. });
  61205. //#endregion
  61206. //#region node_modules/element-plus/es/components/message/src/method.mjs
  61207. var seed$1 = 1;
  61208. var normalizeAppendTo = (normalized) => {
  61209. if (!normalized.appendTo) normalized.appendTo = document.body;
  61210. else if (isString(normalized.appendTo)) {
  61211. let appendTo = document.querySelector(normalized.appendTo);
  61212. if (!isElement$1(appendTo)) {
  61213. debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  61214. appendTo = document.body;
  61215. }
  61216. normalized.appendTo = appendTo;
  61217. }
  61218. };
  61219. var normalizePlacement = (normalized) => {
  61220. if (!normalized.placement && isString(messageConfig.placement) && messageConfig.placement) normalized.placement = messageConfig.placement;
  61221. if (!normalized.placement) normalized.placement = "top";
  61222. if (!messagePlacement.includes(normalized.placement)) {
  61223. debugWarn("ElMessage", `Invalid placement: ${normalized.placement}. Falling back to 'top'.`);
  61224. normalized.placement = "top";
  61225. }
  61226. };
  61227. var normalizeOptions = (params) => {
  61228. const options = !params || isString(params) || isVNode(params) || isFunction$1(params) ? { message: params } : params;
  61229. const normalized = {
  61230. ...messageDefaults,
  61231. ...options
  61232. };
  61233. normalizeAppendTo(normalized);
  61234. normalizePlacement(normalized);
  61235. if (isBoolean(messageConfig.grouping) && !normalized.grouping) normalized.grouping = messageConfig.grouping;
  61236. if (isNumber(messageConfig.duration) && normalized.duration === 3e3) normalized.duration = messageConfig.duration;
  61237. if (isNumber(messageConfig.offset) && normalized.offset === 16) normalized.offset = messageConfig.offset;
  61238. if (isBoolean(messageConfig.showClose) && !normalized.showClose) normalized.showClose = messageConfig.showClose;
  61239. if (isBoolean(messageConfig.plain) && !normalized.plain) normalized.plain = messageConfig.plain;
  61240. return normalized;
  61241. };
  61242. var closeMessage = (instance) => {
  61243. const instances = placementInstances[instance.props.placement || "top"];
  61244. const idx = instances.indexOf(instance);
  61245. if (idx === -1) return;
  61246. instances.splice(idx, 1);
  61247. const { handler } = instance;
  61248. handler.close();
  61249. };
  61250. var createMessage = ({ appendTo, ...options }, context) => {
  61251. const id = `message_${seed$1++}`;
  61252. const userOnClose = options.onClose;
  61253. const container = document.createElement("div");
  61254. const props = {
  61255. ...options,
  61256. id,
  61257. onClose: () => {
  61258. userOnClose?.();
  61259. closeMessage(instance);
  61260. },
  61261. onDestroy: () => {
  61262. render(null, container);
  61263. }
  61264. };
  61265. const vnode = createVNode(message_default, props, isFunction$1(props.message) || isVNode(props.message) ? { default: isFunction$1(props.message) ? props.message : () => props.message } : null);
  61266. vnode.appContext = context || message._context;
  61267. render(vnode, container);
  61268. appendTo.appendChild(container.firstElementChild);
  61269. const vm = vnode.component;
  61270. const instance = {
  61271. id,
  61272. vnode,
  61273. vm,
  61274. handler: { close: () => {
  61275. vm.exposed.close();
  61276. } },
  61277. props: vnode.component.props
  61278. };
  61279. return instance;
  61280. };
  61281. var message = (options = {}, context) => {
  61282. if (!isClient) return { close: () => void 0 };
  61283. const normalized = normalizeOptions(options);
  61284. const instances = getOrCreatePlacementInstances(normalized.placement || "top");
  61285. if (normalized.grouping && instances.length) {
  61286. const instance = instances.find(({ vnode: vm }) => vm.props?.message === normalized.message);
  61287. if (instance) {
  61288. instance.props.repeatNum += 1;
  61289. instance.props.type = normalized.type;
  61290. return instance.handler;
  61291. }
  61292. }
  61293. if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) return { close: () => void 0 };
  61294. const instance = createMessage(normalized, context);
  61295. instances.push(instance);
  61296. return instance.handler;
  61297. };
  61298. messageTypes.forEach((type) => {
  61299. message[type] = (options = {}, appContext) => {
  61300. return message({
  61301. ...normalizeOptions(options),
  61302. type
  61303. }, appContext);
  61304. };
  61305. });
  61306. function closeAll$1(type) {
  61307. for (const placement in placementInstances) if (hasOwn(placementInstances, placement)) {
  61308. const instances = [...placementInstances[placement]];
  61309. for (const instance of instances) if (!type || type === instance.props.type) instance.handler.close();
  61310. }
  61311. }
  61312. function closeAllByPlacement(placement) {
  61313. if (!placementInstances[placement]) return;
  61314. [...placementInstances[placement]].forEach((instance) => instance.handler.close());
  61315. }
  61316. message.closeAll = closeAll$1;
  61317. message.closeAllByPlacement = closeAllByPlacement;
  61318. message._context = null;
  61319. //#endregion
  61320. //#region node_modules/element-plus/es/components/message/index.mjs
  61321. var ElMessage = withInstallFunction(message, "$message");
  61322. //#endregion
  61323. //#region node_modules/element-plus/es/components/message-box/src/index.vue_vue_type_script_lang.mjs
  61324. var index_vue_vue_type_script_lang_default = defineComponent({
  61325. name: "ElMessageBox",
  61326. directives: { TrapFocus },
  61327. components: {
  61328. ElButton,
  61329. ElFocusTrap: focus_trap_default$1,
  61330. ElInput,
  61331. ElOverlay,
  61332. ElIcon,
  61333. ...TypeComponents
  61334. },
  61335. inheritAttrs: false,
  61336. props: {
  61337. buttonSize: {
  61338. type: String,
  61339. validator: isValidComponentSize
  61340. },
  61341. modal: {
  61342. type: Boolean,
  61343. default: true
  61344. },
  61345. lockScroll: {
  61346. type: Boolean,
  61347. default: true
  61348. },
  61349. showClose: {
  61350. type: Boolean,
  61351. default: true
  61352. },
  61353. closeOnClickModal: {
  61354. type: Boolean,
  61355. default: true
  61356. },
  61357. closeOnPressEscape: {
  61358. type: Boolean,
  61359. default: true
  61360. },
  61361. closeOnHashChange: {
  61362. type: Boolean,
  61363. default: true
  61364. },
  61365. center: Boolean,
  61366. draggable: Boolean,
  61367. overflow: Boolean,
  61368. roundButton: Boolean,
  61369. container: {
  61370. type: String,
  61371. default: "body"
  61372. },
  61373. boxType: {
  61374. type: String,
  61375. default: ""
  61376. }
  61377. },
  61378. emits: ["vanish", "action"],
  61379. setup(props, { emit }) {
  61380. const { locale, zIndex, ns, size: btnSize } = useGlobalComponentSettings("message-box", computed(() => props.buttonSize));
  61381. const { t } = locale;
  61382. const { nextZIndex } = zIndex;
  61383. const visible = ref(false);
  61384. const state = reactive({
  61385. autofocus: true,
  61386. beforeClose: null,
  61387. callback: null,
  61388. cancelButtonText: "",
  61389. cancelButtonClass: "",
  61390. confirmButtonText: "",
  61391. confirmButtonClass: "",
  61392. cancelButtonType: "",
  61393. confirmButtonType: "primary",
  61394. customClass: "",
  61395. customStyle: {},
  61396. dangerouslyUseHTMLString: false,
  61397. distinguishCancelAndClose: false,
  61398. icon: "",
  61399. closeIcon: "",
  61400. inputPattern: null,
  61401. inputPlaceholder: "",
  61402. inputType: "text",
  61403. inputValue: "",
  61404. inputValidator: void 0,
  61405. inputErrorMessage: "",
  61406. message: "",
  61407. modalFade: true,
  61408. modalClass: "",
  61409. showCancelButton: false,
  61410. showConfirmButton: true,
  61411. type: "",
  61412. title: void 0,
  61413. showInput: false,
  61414. action: "",
  61415. confirmButtonLoading: false,
  61416. cancelButtonLoading: false,
  61417. confirmButtonLoadingIcon: markRaw(loading_default),
  61418. cancelButtonLoadingIcon: markRaw(loading_default),
  61419. confirmButtonDisabled: false,
  61420. editorErrorMessage: "",
  61421. validateError: false,
  61422. zIndex: nextZIndex()
  61423. });
  61424. const typeClass = computed(() => {
  61425. const type = state.type;
  61426. return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
  61427. });
  61428. const contentId = useId();
  61429. const inputId = useId();
  61430. const iconComponent = computed(() => {
  61431. const type = state.type;
  61432. return state.icon || type && TypeComponentsMap[type] || "";
  61433. });
  61434. const hasMessage = computed(() => !!state.message);
  61435. const rootRef = ref();
  61436. const headerRef = ref();
  61437. const focusStartRef = ref();
  61438. const inputRef = ref();
  61439. const confirmRef = ref();
  61440. const confirmButtonClasses = computed(() => state.confirmButtonClass);
  61441. watch(() => state.inputValue, async (val) => {
  61442. await nextTick();
  61443. if (props.boxType === "prompt" && val) validate();
  61444. }, { immediate: true });
  61445. watch(() => visible.value, (val) => {
  61446. if (val) {
  61447. if (props.boxType !== "prompt") if (state.autofocus) focusStartRef.value = confirmRef.value?.$el ?? rootRef.value;
  61448. else focusStartRef.value = rootRef.value;
  61449. state.zIndex = nextZIndex();
  61450. }
  61451. if (props.boxType !== "prompt") return;
  61452. if (val) nextTick().then(() => {
  61453. if (inputRef.value && inputRef.value.$el) if (state.autofocus) focusStartRef.value = getInputElement() ?? rootRef.value;
  61454. else focusStartRef.value = rootRef.value;
  61455. });
  61456. else {
  61457. state.editorErrorMessage = "";
  61458. state.validateError = false;
  61459. }
  61460. });
  61461. const { isDragging } = useDraggable(rootRef, headerRef, computed(() => props.draggable), computed(() => props.overflow));
  61462. onMounted(async () => {
  61463. await nextTick();
  61464. if (props.closeOnHashChange) window.addEventListener("hashchange", doClose);
  61465. });
  61466. onBeforeUnmount(() => {
  61467. if (props.closeOnHashChange) window.removeEventListener("hashchange", doClose);
  61468. });
  61469. function doClose() {
  61470. if (!visible.value) return;
  61471. visible.value = false;
  61472. nextTick(() => {
  61473. if (state.action) emit("action", state.action);
  61474. });
  61475. }
  61476. const handleWrapperClick = () => {
  61477. if (props.closeOnClickModal) handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
  61478. };
  61479. const overlayEvent = useSameTarget(handleWrapperClick);
  61480. const handleInputEnter = (e) => {
  61481. if (state.inputType !== "textarea" && !inputRef.value?.isComposing) {
  61482. e.preventDefault();
  61483. return handleAction("confirm");
  61484. }
  61485. };
  61486. const handleAction = (action) => {
  61487. if (props.boxType === "prompt" && action === "confirm" && !validate()) return;
  61488. state.action = action;
  61489. if (state.beforeClose) state.beforeClose?.(action, state, doClose);
  61490. else doClose();
  61491. };
  61492. const validate = () => {
  61493. if (props.boxType === "prompt") {
  61494. const inputPattern = state.inputPattern;
  61495. if (inputPattern && !inputPattern.test(state.inputValue || "")) {
  61496. state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
  61497. state.validateError = true;
  61498. return false;
  61499. }
  61500. const inputValidator = state.inputValidator;
  61501. if (isFunction$1(inputValidator)) {
  61502. const validateResult = inputValidator(state.inputValue);
  61503. if (validateResult === false) {
  61504. state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
  61505. state.validateError = true;
  61506. return false;
  61507. }
  61508. if (isString(validateResult)) {
  61509. state.editorErrorMessage = validateResult;
  61510. state.validateError = true;
  61511. return false;
  61512. }
  61513. }
  61514. }
  61515. state.editorErrorMessage = "";
  61516. state.validateError = false;
  61517. return true;
  61518. };
  61519. const getInputElement = () => {
  61520. const inputRefs = inputRef.value?.$refs;
  61521. return inputRefs?.input ?? inputRefs?.textarea;
  61522. };
  61523. const handleClose = () => {
  61524. handleAction("close");
  61525. };
  61526. const onCloseRequested = () => {
  61527. if (props.closeOnPressEscape) handleClose();
  61528. };
  61529. if (props.lockScroll) useLockscreen(visible, { ns });
  61530. return {
  61531. ...toRefs(state),
  61532. ns,
  61533. overlayEvent,
  61534. visible,
  61535. hasMessage,
  61536. typeClass,
  61537. contentId,
  61538. inputId,
  61539. btnSize,
  61540. iconComponent,
  61541. confirmButtonClasses,
  61542. rootRef,
  61543. focusStartRef,
  61544. headerRef,
  61545. inputRef,
  61546. isDragging,
  61547. confirmRef,
  61548. doClose,
  61549. handleClose,
  61550. onCloseRequested,
  61551. handleWrapperClick,
  61552. handleInputEnter,
  61553. handleAction,
  61554. t
  61555. };
  61556. }
  61557. });
  61558. //#endregion
  61559. //#region node_modules/element-plus/es/components/message-box/src/index.mjs
  61560. var _hoisted_1$1 = ["aria-label", "aria-describedby"];
  61561. var _hoisted_2$1 = ["aria-label"];
  61562. var _hoisted_3$1 = ["id"];
  61563. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  61564. const _component_el_icon = resolveComponent("el-icon");
  61565. const _component_el_input = resolveComponent("el-input");
  61566. const _component_el_button = resolveComponent("el-button");
  61567. const _component_el_focus_trap = resolveComponent("el-focus-trap");
  61568. const _component_el_overlay = resolveComponent("el-overlay");
  61569. return openBlock(), createBlock(Transition, {
  61570. name: "fade-in-linear",
  61571. onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish")),
  61572. persisted: ""
  61573. }, {
  61574. default: withCtx(() => [withDirectives(createVNode(_component_el_overlay, {
  61575. "z-index": _ctx.zIndex,
  61576. "overlay-class": [_ctx.ns.is("message-box"), _ctx.modalClass],
  61577. mask: _ctx.modal
  61578. }, {
  61579. default: withCtx(() => [createBaseVNode("div", {
  61580. role: "dialog",
  61581. "aria-label": _ctx.title,
  61582. "aria-modal": "true",
  61583. "aria-describedby": !_ctx.showInput ? _ctx.contentId : void 0,
  61584. class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),
  61585. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),
  61586. onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),
  61587. onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))
  61588. }, [createVNode(_component_el_focus_trap, {
  61589. loop: "",
  61590. trapped: _ctx.visible,
  61591. "focus-trap-el": _ctx.rootRef,
  61592. "focus-start-el": _ctx.focusStartRef,
  61593. onReleaseRequested: _ctx.onCloseRequested
  61594. }, {
  61595. default: withCtx(() => [createBaseVNode("div", {
  61596. ref: "rootRef",
  61597. class: normalizeClass([
  61598. _ctx.ns.b(),
  61599. _ctx.customClass,
  61600. _ctx.ns.is("draggable", _ctx.draggable),
  61601. _ctx.ns.is("dragging", _ctx.isDragging),
  61602. { [_ctx.ns.m("center")]: _ctx.center }
  61603. ]),
  61604. style: normalizeStyle(_ctx.customStyle),
  61605. tabindex: "-1",
  61606. onClick: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"]))
  61607. }, [
  61608. _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", {
  61609. key: 0,
  61610. ref: "headerRef",
  61611. class: normalizeClass([_ctx.ns.e("header"), { "show-close": _ctx.showClose }])
  61612. }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("title")) }, [_ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
  61613. key: 0,
  61614. class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
  61615. }, {
  61616. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  61617. _: 1
  61618. }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("span", null, toDisplayString(_ctx.title), 1)], 2), _ctx.showClose ? (openBlock(), createElementBlock("button", {
  61619. key: 0,
  61620. type: "button",
  61621. class: normalizeClass(_ctx.ns.e("headerbtn")),
  61622. "aria-label": _ctx.t("el.messagebox.close"),
  61623. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
  61624. onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
  61625. }, [createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("close")) }, {
  61626. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || "close")))]),
  61627. _: 1
  61628. }, 8, ["class"])], 42, _hoisted_2$1)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
  61629. createBaseVNode("div", {
  61630. id: _ctx.contentId,
  61631. class: normalizeClass(_ctx.ns.e("content"))
  61632. }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("container")) }, [_ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
  61633. key: 0,
  61634. class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
  61635. }, {
  61636. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
  61637. _: 1
  61638. }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.hasMessage ? (openBlock(), createElementBlock("div", {
  61639. key: 1,
  61640. class: normalizeClass(_ctx.ns.e("message"))
  61641. }, [renderSlot(_ctx.$slots, "default", {}, () => [!_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
  61642. key: 0,
  61643. for: _ctx.showInput ? _ctx.inputId : void 0,
  61644. textContent: toDisplayString(_ctx.message)
  61645. }, null, 8, ["for", "textContent"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
  61646. key: 1,
  61647. for: _ctx.showInput ? _ctx.inputId : void 0,
  61648. innerHTML: _ctx.message
  61649. }, null, 8, ["for", "innerHTML"]))])], 2)) : createCommentVNode("v-if", true)], 2), withDirectives(createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("input")) }, [createVNode(_component_el_input, {
  61650. id: _ctx.inputId,
  61651. ref: "inputRef",
  61652. modelValue: _ctx.inputValue,
  61653. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
  61654. type: _ctx.inputType,
  61655. placeholder: _ctx.inputPlaceholder,
  61656. "aria-invalid": _ctx.validateError,
  61657. class: normalizeClass({ invalid: _ctx.validateError }),
  61658. onKeydown: withKeys(_ctx.handleInputEnter, ["enter"])
  61659. }, null, 8, [
  61660. "id",
  61661. "modelValue",
  61662. "type",
  61663. "placeholder",
  61664. "aria-invalid",
  61665. "class",
  61666. "onKeydown"
  61667. ]), createBaseVNode("div", {
  61668. class: normalizeClass(_ctx.ns.e("errormsg")),
  61669. style: normalizeStyle({ visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden" })
  61670. }, toDisplayString(_ctx.editorErrorMessage), 7)], 2), [[vShow, _ctx.showInput]])], 10, _hoisted_3$1),
  61671. _ctx.showCancelButton || _ctx.showConfirmButton ? (openBlock(), createElementBlock("div", {
  61672. key: 1,
  61673. class: normalizeClass(_ctx.ns.e("btns"))
  61674. }, [_ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
  61675. key: 0,
  61676. type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
  61677. text: _ctx.cancelButtonType === "text",
  61678. loading: _ctx.cancelButtonLoading,
  61679. "loading-icon": _ctx.cancelButtonLoadingIcon,
  61680. class: normalizeClass([_ctx.cancelButtonClass]),
  61681. round: _ctx.roundButton,
  61682. size: _ctx.btnSize,
  61683. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
  61684. onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
  61685. }, {
  61686. default: withCtx(() => [createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)]),
  61687. _: 1
  61688. }, 8, [
  61689. "type",
  61690. "text",
  61691. "loading",
  61692. "loading-icon",
  61693. "class",
  61694. "round",
  61695. "size"
  61696. ])) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_el_button, {
  61697. ref: "confirmRef",
  61698. type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
  61699. text: _ctx.confirmButtonType === "text",
  61700. loading: _ctx.confirmButtonLoading,
  61701. "loading-icon": _ctx.confirmButtonLoadingIcon,
  61702. class: normalizeClass([_ctx.confirmButtonClasses]),
  61703. round: _ctx.roundButton,
  61704. disabled: _ctx.confirmButtonDisabled,
  61705. size: _ctx.btnSize,
  61706. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
  61707. onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
  61708. }, {
  61709. default: withCtx(() => [createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)]),
  61710. _: 1
  61711. }, 8, [
  61712. "type",
  61713. "text",
  61714. "loading",
  61715. "loading-icon",
  61716. "class",
  61717. "round",
  61718. "disabled",
  61719. "size"
  61720. ]), [[vShow, _ctx.showConfirmButton]])], 2)) : createCommentVNode("v-if", true)
  61721. ], 6)]),
  61722. _: 3
  61723. }, 8, [
  61724. "trapped",
  61725. "focus-trap-el",
  61726. "focus-start-el",
  61727. "onReleaseRequested"
  61728. ])], 42, _hoisted_1$1)]),
  61729. _: 3
  61730. }, 8, [
  61731. "z-index",
  61732. "overlay-class",
  61733. "mask"
  61734. ]), [[vShow, _ctx.visible]])]),
  61735. _: 3
  61736. });
  61737. }
  61738. var src_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
  61739. //#endregion
  61740. //#region node_modules/element-plus/es/components/message-box/src/messageBox.mjs
  61741. var messageInstance = /* @__PURE__ */ new Map();
  61742. var getAppendToElement = (props) => {
  61743. let appendTo = document.body;
  61744. if (props.appendTo) {
  61745. if (isString(props.appendTo)) appendTo = document.querySelector(props.appendTo);
  61746. if (isElement$1(props.appendTo)) appendTo = props.appendTo;
  61747. if (!isElement$1(appendTo)) {
  61748. debugWarn("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  61749. appendTo = document.body;
  61750. }
  61751. }
  61752. return appendTo;
  61753. };
  61754. var handleAction = (vnode, action) => {
  61755. const vm = vnode.component?.proxy;
  61756. return () => vm.handleAction(action);
  61757. };
  61758. var initInstance = (props, container, appContext = null) => {
  61759. const vnode = createVNode(src_default, props, isFunction$1(props.message) || isVNode(props.message) ? { default: isFunction$1(props.message) ? () => props.message({
  61760. confirm: handleAction(vnode, "confirm"),
  61761. cancel: handleAction(vnode, "cancel"),
  61762. close: handleAction(vnode, "close")
  61763. }) : () => props.message } : null);
  61764. vnode.appContext = appContext;
  61765. render(vnode, container);
  61766. getAppendToElement(props).appendChild(container.firstElementChild);
  61767. return vnode.component;
  61768. };
  61769. var genContainer = () => {
  61770. return document.createElement("div");
  61771. };
  61772. var showMessage = (options, appContext) => {
  61773. const container = genContainer();
  61774. options.onVanish = () => {
  61775. render(null, container);
  61776. messageInstance.delete(vm);
  61777. };
  61778. options.onAction = (action) => {
  61779. const currentMsg = messageInstance.get(vm);
  61780. let resolve;
  61781. if (options.showInput) resolve = {
  61782. value: vm.inputValue,
  61783. action
  61784. };
  61785. else resolve = action;
  61786. if (options.callback) options.callback(resolve, instance.proxy);
  61787. else if (action === "cancel" || action === "close") if (options.distinguishCancelAndClose && action !== "cancel") currentMsg.reject("close");
  61788. else currentMsg.reject("cancel");
  61789. else currentMsg.resolve(resolve);
  61790. };
  61791. const instance = initInstance(options, container, appContext);
  61792. const vm = instance.proxy;
  61793. for (const prop in options) if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) if (prop === "closeIcon" && isObject$2(options[prop])) vm[prop] = markRaw(options[prop]);
  61794. else vm[prop] = options[prop];
  61795. vm.visible = true;
  61796. return vm;
  61797. };
  61798. function MessageBox(options, appContext = null) {
  61799. if (!isClient) return Promise.reject();
  61800. let callback;
  61801. if (isString(options) || isVNode(options)) options = { message: options };
  61802. else callback = options.callback;
  61803. return new Promise((resolve, reject) => {
  61804. const vm = showMessage(options, appContext ?? MessageBox._context);
  61805. messageInstance.set(vm, {
  61806. options,
  61807. callback,
  61808. resolve,
  61809. reject
  61810. });
  61811. });
  61812. }
  61813. var MESSAGE_BOX_VARIANTS = [
  61814. "alert",
  61815. "confirm",
  61816. "prompt"
  61817. ];
  61818. var MESSAGE_BOX_DEFAULT_OPTS = {
  61819. alert: {
  61820. closeOnPressEscape: false,
  61821. closeOnClickModal: false
  61822. },
  61823. confirm: { showCancelButton: true },
  61824. prompt: {
  61825. showCancelButton: true,
  61826. showInput: true
  61827. }
  61828. };
  61829. MESSAGE_BOX_VARIANTS.forEach((boxType) => {
  61830. MessageBox[boxType] = messageBoxFactory(boxType);
  61831. });
  61832. function messageBoxFactory(boxType) {
  61833. return (message, title, options, appContext) => {
  61834. let titleOrOpts = "";
  61835. if (isObject$2(title)) {
  61836. options = title;
  61837. titleOrOpts = "";
  61838. } else if (isUndefined(title)) titleOrOpts = "";
  61839. else titleOrOpts = title;
  61840. return MessageBox(Object.assign({
  61841. title: titleOrOpts,
  61842. message,
  61843. type: "",
  61844. ...MESSAGE_BOX_DEFAULT_OPTS[boxType]
  61845. }, options, { boxType }), appContext);
  61846. };
  61847. }
  61848. MessageBox.close = () => {
  61849. messageInstance.forEach((_, vm) => {
  61850. vm.doClose();
  61851. });
  61852. messageInstance.clear();
  61853. };
  61854. MessageBox._context = null;
  61855. //#endregion
  61856. //#region node_modules/element-plus/es/components/message-box/index.mjs
  61857. var _MessageBox = MessageBox;
  61858. _MessageBox.install = (app) => {
  61859. _MessageBox._context = app._context;
  61860. app.config.globalProperties.$msgbox = _MessageBox;
  61861. app.config.globalProperties.$messageBox = _MessageBox;
  61862. app.config.globalProperties.$alert = _MessageBox.alert;
  61863. app.config.globalProperties.$confirm = _MessageBox.confirm;
  61864. app.config.globalProperties.$prompt = _MessageBox.prompt;
  61865. };
  61866. var ElMessageBox = _MessageBox;
  61867. //#endregion
  61868. //#region node_modules/element-plus/es/components/notification/src/notification.mjs
  61869. var notificationTypes = [
  61870. "primary",
  61871. "success",
  61872. "info",
  61873. "warning",
  61874. "error"
  61875. ];
  61876. /**
  61877. * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.
  61878. */
  61879. var notificationProps = buildProps({
  61880. /**
  61881. * @description custom class name for Notification
  61882. */
  61883. customClass: {
  61884. type: String,
  61885. default: ""
  61886. },
  61887. /**
  61888. * @description whether `message` is treated as HTML string
  61889. */
  61890. dangerouslyUseHTMLString: Boolean,
  61891. /**
  61892. * @description duration before close. It will not automatically close if set 0
  61893. */
  61894. duration: {
  61895. type: Number,
  61896. default: 4500
  61897. },
  61898. /**
  61899. * @description custom icon component. It will be overridden by `type`
  61900. */
  61901. icon: { type: iconPropType },
  61902. /**
  61903. * @description notification dom id
  61904. */
  61905. id: {
  61906. type: String,
  61907. default: ""
  61908. },
  61909. /**
  61910. * @description description text
  61911. */
  61912. message: {
  61913. type: definePropType([
  61914. String,
  61915. Object,
  61916. Function
  61917. ]),
  61918. default: ""
  61919. },
  61920. /**
  61921. * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset
  61922. */
  61923. offset: {
  61924. type: Number,
  61925. default: 0
  61926. },
  61927. /**
  61928. * @description callback function when notification clicked
  61929. */
  61930. onClick: {
  61931. type: definePropType(Function),
  61932. default: () => void 0
  61933. },
  61934. /**
  61935. * @description callback function when closed
  61936. */
  61937. onClose: {
  61938. type: definePropType(Function),
  61939. required: true
  61940. },
  61941. /**
  61942. * @description custom position
  61943. */
  61944. position: {
  61945. type: String,
  61946. values: [
  61947. "top-right",
  61948. "top-left",
  61949. "bottom-right",
  61950. "bottom-left"
  61951. ],
  61952. default: "top-right"
  61953. },
  61954. /**
  61955. * @description whether to show a close button
  61956. */
  61957. showClose: {
  61958. type: Boolean,
  61959. default: true
  61960. },
  61961. /**
  61962. * @description title
  61963. */
  61964. title: {
  61965. type: String,
  61966. default: ""
  61967. },
  61968. /**
  61969. * @description notification type
  61970. */
  61971. type: {
  61972. type: String,
  61973. values: [...notificationTypes, ""],
  61974. default: ""
  61975. },
  61976. /**
  61977. * @description initial zIndex
  61978. */
  61979. zIndex: Number,
  61980. /**
  61981. * @description custom close icon, default is Close
  61982. */
  61983. closeIcon: {
  61984. type: iconPropType,
  61985. default: close_default
  61986. }
  61987. });
  61988. var notificationEmits = { destroy: () => true };
  61989. //#endregion
  61990. //#region node_modules/element-plus/es/components/notification/src/notification.vue_vue_type_script_setup_true_lang.mjs
  61991. var _hoisted_1 = ["id"];
  61992. var _hoisted_2 = ["textContent"];
  61993. var _hoisted_3 = { key: 0 };
  61994. var _hoisted_4 = ["innerHTML"];
  61995. //#endregion
  61996. //#region node_modules/element-plus/es/components/notification/src/notification2.mjs
  61997. var notification_default = /* @__PURE__ */ defineComponent({
  61998. name: "ElNotification",
  61999. __name: "notification",
  62000. props: notificationProps,
  62001. emits: notificationEmits,
  62002. setup(__props, { expose: __expose }) {
  62003. const props = __props;
  62004. const { ns, zIndex } = useGlobalComponentSettings("notification");
  62005. const { nextZIndex, currentZIndex } = zIndex;
  62006. const visible = ref(false);
  62007. let timer = void 0;
  62008. const typeClass = computed(() => {
  62009. const type = props.type;
  62010. return type && TypeComponentsMap[props.type] ? ns.m(type) : "";
  62011. });
  62012. const iconComponent = computed(() => {
  62013. if (!props.type) return props.icon;
  62014. return TypeComponentsMap[props.type] || props.icon;
  62015. });
  62016. const horizontalClass = computed(() => props.position.endsWith("right") ? "right" : "left");
  62017. const verticalProperty = computed(() => props.position.startsWith("top") ? "top" : "bottom");
  62018. const positionStyle = computed(() => {
  62019. return {
  62020. [verticalProperty.value]: `${props.offset}px`,
  62021. zIndex: props.zIndex ?? currentZIndex.value
  62022. };
  62023. });
  62024. function startTimer() {
  62025. if (props.duration > 0) ({stop: timer} = useTimeoutFn(() => {
  62026. if (visible.value) close();
  62027. }, props.duration));
  62028. }
  62029. function clearTimer() {
  62030. timer?.();
  62031. }
  62032. function close() {
  62033. visible.value = false;
  62034. }
  62035. function onKeydown(event) {
  62036. switch (getEventCode(event)) {
  62037. case EVENT_CODE.delete:
  62038. case EVENT_CODE.backspace:
  62039. clearTimer();
  62040. break;
  62041. case EVENT_CODE.esc:
  62042. if (visible.value) close();
  62043. break;
  62044. default:
  62045. startTimer();
  62046. break;
  62047. }
  62048. }
  62049. onMounted(() => {
  62050. startTimer();
  62051. nextZIndex();
  62052. visible.value = true;
  62053. });
  62054. useEventListener(document, "keydown", onKeydown);
  62055. __expose({
  62056. visible,
  62057. /** @description close notification */
  62058. close
  62059. });
  62060. return (_ctx, _cache) => {
  62061. return openBlock(), createBlock(Transition, {
  62062. name: unref(ns).b("fade"),
  62063. onBeforeLeave: __props.onClose,
  62064. onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
  62065. persisted: ""
  62066. }, {
  62067. default: withCtx(() => [withDirectives(createBaseVNode("div", {
  62068. id: __props.id,
  62069. class: normalizeClass([
  62070. unref(ns).b(),
  62071. __props.customClass,
  62072. horizontalClass.value
  62073. ]),
  62074. style: normalizeStyle(positionStyle.value),
  62075. role: "alert",
  62076. onMouseenter: clearTimer,
  62077. onMouseleave: startTimer,
  62078. onClick: _cache[0] || (_cache[0] = (...args) => __props.onClick && __props.onClick(...args))
  62079. }, [iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
  62080. key: 0,
  62081. class: normalizeClass([unref(ns).e("icon"), typeClass.value])
  62082. }, {
  62083. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))]),
  62084. _: 1
  62085. }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("group")) }, [
  62086. createBaseVNode("h2", {
  62087. class: normalizeClass(unref(ns).e("title")),
  62088. textContent: toDisplayString(__props.title)
  62089. }, null, 10, _hoisted_2),
  62090. withDirectives(createBaseVNode("div", {
  62091. class: normalizeClass(unref(ns).e("content")),
  62092. style: normalizeStyle(!!__props.title ? void 0 : { margin: 0 })
  62093. }, [renderSlot(_ctx.$slots, "default", {}, () => [!__props.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(__props.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", { innerHTML: __props.message }, null, 8, _hoisted_4)], 2112))])], 6), [[vShow, __props.message]]),
  62094. __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
  62095. key: 0,
  62096. class: normalizeClass(unref(ns).e("closeBtn")),
  62097. onClick: withModifiers(close, ["stop"])
  62098. }, {
  62099. default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon)))]),
  62100. _: 1
  62101. }, 8, ["class"])) : createCommentVNode("v-if", true)
  62102. ], 2)], 46, _hoisted_1), [[vShow, visible.value]])]),
  62103. _: 3
  62104. }, 8, ["name", "onBeforeLeave"]);
  62105. };
  62106. }
  62107. });
  62108. //#endregion
  62109. //#region node_modules/element-plus/es/components/notification/src/notify.mjs
  62110. var notifications = {
  62111. "top-left": [],
  62112. "top-right": [],
  62113. "bottom-left": [],
  62114. "bottom-right": []
  62115. };
  62116. var GAP_SIZE = 16;
  62117. var seed = 1;
  62118. var notify = function(options = {}, context) {
  62119. if (!isClient) return { close: () => void 0 };
  62120. if (isString(options) || isVNode(options)) options = { message: options };
  62121. const position = options.position || "top-right";
  62122. let verticalOffset = options.offset || 0;
  62123. notifications[position].forEach(({ vm }) => {
  62124. verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE;
  62125. });
  62126. verticalOffset += GAP_SIZE;
  62127. const id = `notification_${seed++}`;
  62128. const userOnClose = options.onClose;
  62129. const props = {
  62130. ...options,
  62131. offset: verticalOffset,
  62132. id,
  62133. onClose: () => {
  62134. close(id, position, userOnClose);
  62135. }
  62136. };
  62137. let appendTo = document.body;
  62138. if (isElement$1(options.appendTo)) appendTo = options.appendTo;
  62139. else if (isString(options.appendTo)) appendTo = document.querySelector(options.appendTo);
  62140. if (!isElement$1(appendTo)) {
  62141. debugWarn("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  62142. appendTo = document.body;
  62143. }
  62144. const container = document.createElement("div");
  62145. const vm = createVNode(notification_default, props, isFunction$1(props.message) ? props.message : isVNode(props.message) ? () => props.message : null);
  62146. vm.appContext = isUndefined(context) ? notify._context : context;
  62147. vm.props.onDestroy = () => {
  62148. render(null, container);
  62149. };
  62150. render(vm, container);
  62151. notifications[position].push({ vm });
  62152. appendTo.appendChild(container.firstElementChild);
  62153. return { close: () => {
  62154. vm.component.exposed.visible.value = false;
  62155. } };
  62156. };
  62157. notificationTypes.forEach((type) => {
  62158. notify[type] = (options = {}, appContext) => {
  62159. if (isString(options) || isVNode(options)) options = { message: options };
  62160. return notify({
  62161. ...options,
  62162. type
  62163. }, appContext);
  62164. };
  62165. });
  62166. /**
  62167. * This function gets called when user click `x` button or press `esc` or the time reached its limitation.
  62168. * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called
  62169. * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.
  62170. * @param {String} id notification id to be closed
  62171. * @param {Position} position the positioning strategy
  62172. * @param {Function} userOnClose the callback called when close passed by user
  62173. */
  62174. function close(id, position, userOnClose) {
  62175. const orientedNotifications = notifications[position];
  62176. const idx = orientedNotifications.findIndex(({ vm }) => vm.component?.props.id === id);
  62177. if (idx === -1) return;
  62178. const { vm } = orientedNotifications[idx];
  62179. if (!vm) return;
  62180. userOnClose?.(vm);
  62181. const removedHeight = vm.el.offsetHeight;
  62182. const verticalPos = position.split("-")[0];
  62183. orientedNotifications.splice(idx, 1);
  62184. const len = orientedNotifications.length;
  62185. if (len < 1) return;
  62186. for (let i = idx; i < len; i++) {
  62187. const { el, component } = orientedNotifications[i].vm;
  62188. const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE;
  62189. component.props.offset = pos;
  62190. }
  62191. }
  62192. function closeAll() {
  62193. for (const orientedNotifications of Object.values(notifications)) orientedNotifications.forEach(({ vm }) => {
  62194. vm.component.exposed.visible.value = false;
  62195. });
  62196. }
  62197. function updateOffsets(position = "top-right") {
  62198. let verticalOffset = notifications[position][0]?.vm.component?.props?.offset || 0;
  62199. for (const { vm } of notifications[position]) {
  62200. vm.component.props.offset = verticalOffset;
  62201. verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE;
  62202. }
  62203. }
  62204. notify.closeAll = closeAll;
  62205. notify.updateOffsets = updateOffsets;
  62206. notify._context = null;
  62207. //#endregion
  62208. //#region node_modules/element-plus/es/components/notification/index.mjs
  62209. var ElNotification = withInstallFunction(notify, "$notify");
  62210. //#endregion
  62211. //#region node_modules/element-plus/es/components/popover/src/popover.mjs
  62212. /**
  62213. * @deprecated Removed after 3.0.0, Use `PopoverProps` instead.
  62214. */
  62215. var popoverProps = buildProps({
  62216. /**
  62217. * @description how the popover is triggered, not valid in controlled mode
  62218. */
  62219. trigger: useTooltipTriggerProps.trigger,
  62220. /**
  62221. * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of popover through the keyboard, not valid in controlled mode
  62222. */
  62223. triggerKeys: useTooltipTriggerProps.triggerKeys,
  62224. /**
  62225. * @description popover placement
  62226. */
  62227. placement: dropdownProps.placement,
  62228. /**
  62229. * @description whether Popover is disabled
  62230. */
  62231. disabled: useTooltipTriggerProps.disabled,
  62232. /**
  62233. * @description whether popover is visible
  62234. */
  62235. visible: useTooltipContentProps.visible,
  62236. /**
  62237. * @description popover transition animation
  62238. */
  62239. transition: useTooltipContentProps.transition,
  62240. /**
  62241. * @description parameters for [popper.js](https://popper.js.org/docs/v2/)
  62242. */
  62243. popperOptions: dropdownProps.popperOptions,
  62244. /**
  62245. * @description [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Popover
  62246. */
  62247. tabindex: dropdownProps.tabindex,
  62248. /**
  62249. * @description popover content, can be replaced with a default `slot`
  62250. */
  62251. content: useTooltipContentProps.content,
  62252. /**
  62253. * @description custom style for popover
  62254. */
  62255. popperStyle: useTooltipContentProps.popperStyle,
  62256. /**
  62257. * @description custom class name for popover
  62258. */
  62259. popperClass: useTooltipContentProps.popperClass,
  62260. enterable: {
  62261. ...useTooltipContentProps.enterable,
  62262. default: true
  62263. },
  62264. /**
  62265. * @description Tooltip theme, built-in theme: `dark` / `light`
  62266. */
  62267. effect: {
  62268. ...useTooltipContentProps.effect,
  62269. default: "light"
  62270. },
  62271. /**
  62272. * @description whether popover dropdown is teleported to the body
  62273. */
  62274. teleported: useTooltipContentProps.teleported,
  62275. /**
  62276. * @description which select dropdown appends to
  62277. */
  62278. appendTo: useTooltipContentProps.appendTo,
  62279. /**
  62280. * @description popover title
  62281. */
  62282. title: String,
  62283. /**
  62284. * @description popover width
  62285. */
  62286. width: {
  62287. type: [String, Number],
  62288. default: 150
  62289. },
  62290. /**
  62291. * @description popover offset
  62292. */
  62293. offset: {
  62294. type: Number,
  62295. default: void 0
  62296. },
  62297. /**
  62298. * @description delay of appearance, in millisecond, not valid in controlled mode
  62299. */
  62300. showAfter: {
  62301. type: Number,
  62302. default: 0
  62303. },
  62304. /**
  62305. * @description delay of disappear, in millisecond, not valid in controlled mode
  62306. */
  62307. hideAfter: {
  62308. type: Number,
  62309. default: 200
  62310. },
  62311. /**
  62312. * @description timeout in milliseconds to hide tooltip, not valid in controlled mode
  62313. */
  62314. autoClose: {
  62315. type: Number,
  62316. default: 0
  62317. },
  62318. /**
  62319. * @description whether a tooltip arrow is displayed or not. For more info, please refer to [ElPopper](https://github.com/element-plus/element-plus/tree/dev/packages/components/popper)
  62320. */
  62321. showArrow: {
  62322. type: Boolean,
  62323. default: true
  62324. },
  62325. /**
  62326. * @description when popover inactive and `persistent` is `false` , popover will be destroyed
  62327. */
  62328. persistent: {
  62329. type: Boolean,
  62330. default: true
  62331. },
  62332. "onUpdate:visible": { type: Function }
  62333. });
  62334. var popoverEmits = {
  62335. "update:visible": (value) => isBoolean(value),
  62336. "before-enter": () => true,
  62337. "before-leave": () => true,
  62338. "after-enter": () => true,
  62339. "after-leave": () => true
  62340. };
  62341. /**
  62342. * @description default values for PopoverProps
  62343. */
  62344. var popoverPropsDefaults = {
  62345. trigger: "hover",
  62346. triggerKeys: () => [
  62347. EVENT_CODE.enter,
  62348. EVENT_CODE.numpadEnter,
  62349. EVENT_CODE.space
  62350. ],
  62351. placement: "bottom",
  62352. visible: null,
  62353. popperOptions: () => ({}),
  62354. tabindex: 0,
  62355. content: "",
  62356. popperStyle: void 0,
  62357. enterable: true,
  62358. effect: "light",
  62359. teleported: true,
  62360. width: 150,
  62361. offset: void 0,
  62362. showAfter: 0,
  62363. hideAfter: 200,
  62364. autoClose: 0,
  62365. showArrow: true,
  62366. persistent: true
  62367. };
  62368. //#endregion
  62369. //#region node_modules/element-plus/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs
  62370. var updateEventKeyRaw = `onUpdate:visible`;
  62371. //#endregion
  62372. //#region node_modules/element-plus/es/components/popover/src/popover2.mjs
  62373. var popover_default = /* @__PURE__ */ defineComponent({
  62374. name: "ElPopover",
  62375. __name: "popover",
  62376. props: popoverProps,
  62377. emits: popoverEmits,
  62378. setup(__props, { expose: __expose, emit: __emit }) {
  62379. const props = __props;
  62380. const emit = __emit;
  62381. const onUpdateVisible = computed(() => {
  62382. return props[updateEventKeyRaw];
  62383. });
  62384. const ns = useNamespace("popover");
  62385. const tooltipRef = ref();
  62386. const popperRef = computed(() => {
  62387. return unref(tooltipRef)?.popperRef;
  62388. });
  62389. const style = computed(() => {
  62390. return [{ width: addUnit(props.width) }, props.popperStyle];
  62391. });
  62392. const kls = computed(() => {
  62393. return [
  62394. ns.b(),
  62395. props.popperClass,
  62396. { [ns.m("plain")]: !!props.content }
  62397. ];
  62398. });
  62399. const gpuAcceleration = computed(() => {
  62400. return props.transition === `${ns.namespace.value}-fade-in-linear`;
  62401. });
  62402. const hide = () => {
  62403. tooltipRef.value?.hide();
  62404. };
  62405. const beforeEnter = () => {
  62406. emit("before-enter");
  62407. };
  62408. const beforeLeave = () => {
  62409. emit("before-leave");
  62410. };
  62411. const afterEnter = () => {
  62412. emit("after-enter");
  62413. };
  62414. const afterLeave = () => {
  62415. emit("update:visible", false);
  62416. emit("after-leave");
  62417. };
  62418. __expose({
  62419. /** @description popper ref */
  62420. popperRef,
  62421. /** @description hide popover */
  62422. hide
  62423. });
  62424. return (_ctx, _cache) => {
  62425. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  62426. ref_key: "tooltipRef",
  62427. ref: tooltipRef
  62428. }, _ctx.$attrs, {
  62429. trigger: __props.trigger,
  62430. "trigger-keys": __props.triggerKeys,
  62431. placement: __props.placement,
  62432. disabled: __props.disabled,
  62433. visible: __props.visible,
  62434. transition: __props.transition,
  62435. "popper-options": __props.popperOptions,
  62436. tabindex: __props.tabindex,
  62437. content: __props.content,
  62438. offset: __props.offset,
  62439. "show-after": __props.showAfter,
  62440. "hide-after": __props.hideAfter,
  62441. "auto-close": __props.autoClose,
  62442. "show-arrow": __props.showArrow,
  62443. "aria-label": __props.title,
  62444. effect: __props.effect,
  62445. enterable: __props.enterable,
  62446. "popper-class": kls.value,
  62447. "popper-style": style.value,
  62448. teleported: __props.teleported,
  62449. "append-to": __props.appendTo,
  62450. persistent: __props.persistent,
  62451. "gpu-acceleration": gpuAcceleration.value,
  62452. "onUpdate:visible": onUpdateVisible.value,
  62453. onBeforeShow: beforeEnter,
  62454. onBeforeHide: beforeLeave,
  62455. onShow: afterEnter,
  62456. onHide: afterLeave
  62457. }), {
  62458. content: withCtx(() => [__props.title ? (openBlock(), createElementBlock("div", {
  62459. key: 0,
  62460. class: normalizeClass(unref(ns).e("title")),
  62461. role: "title"
  62462. }, toDisplayString(__props.title), 3)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", { hide }, () => [createTextVNode(toDisplayString(__props.content), 1)])]),
  62463. default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
  62464. _: 3
  62465. }, 16, [
  62466. "trigger",
  62467. "trigger-keys",
  62468. "placement",
  62469. "disabled",
  62470. "visible",
  62471. "transition",
  62472. "popper-options",
  62473. "tabindex",
  62474. "content",
  62475. "offset",
  62476. "show-after",
  62477. "hide-after",
  62478. "auto-close",
  62479. "show-arrow",
  62480. "aria-label",
  62481. "effect",
  62482. "enterable",
  62483. "popper-class",
  62484. "popper-style",
  62485. "teleported",
  62486. "append-to",
  62487. "persistent",
  62488. "gpu-acceleration",
  62489. "onUpdate:visible"
  62490. ]);
  62491. };
  62492. }
  62493. });
  62494. //#endregion
  62495. //#region node_modules/element-plus/es/components/popover/src/directive.mjs
  62496. var attachEvents = (el, binding) => {
  62497. const popover = (binding.arg || binding.value)?.popperRef;
  62498. if (popover) popover.triggerRef = el;
  62499. };
  62500. //#endregion
  62501. //#region node_modules/element-plus/es/components/popover/index.mjs
  62502. var ElPopoverDirective = withInstallDirective({
  62503. mounted(el, binding) {
  62504. attachEvents(el, binding);
  62505. },
  62506. updated(el, binding) {
  62507. attachEvents(el, binding);
  62508. }
  62509. }, "popover");
  62510. var ElPopover = withInstall(popover_default, { directive: ElPopoverDirective });
  62511. //#endregion
  62512. //#region node_modules/element-plus/es/version.mjs
  62513. var version$1 = "2.14.1";
  62514. //#endregion
  62515. //#region node_modules/element-plus/es/make-installer.mjs
  62516. var makeInstaller = (components = []) => {
  62517. const install = (app, options) => {
  62518. if (app[INSTALLED_KEY]) return;
  62519. app[INSTALLED_KEY] = true;
  62520. components.forEach((c) => app.use(c));
  62521. if (options) provideGlobalConfig(options, app, true);
  62522. };
  62523. return {
  62524. version: version$1,
  62525. install
  62526. };
  62527. };
  62528. //#endregion
  62529. //#region node_modules/element-plus/es/component.mjs
  62530. var component_default = [
  62531. ElAffix,
  62532. ElAlert,
  62533. ElAutocomplete,
  62534. ElAutoResizer,
  62535. ElAvatar,
  62536. ElAvatarGroup,
  62537. ElBacktop,
  62538. ElBadge,
  62539. ElBreadcrumb,
  62540. ElBreadcrumbItem,
  62541. ElButton,
  62542. ElButtonGroup,
  62543. ElCalendar,
  62544. ElCard,
  62545. ElCarousel,
  62546. ElCarouselItem,
  62547. ElCascader,
  62548. ElCascaderPanel,
  62549. ElCheckTag,
  62550. ElCheckbox,
  62551. ElCheckboxButton,
  62552. ElCheckboxGroup,
  62553. ElCol,
  62554. ElCollapse,
  62555. ElCollapseItem,
  62556. ElCollapseTransition,
  62557. ElColorPickerPanel,
  62558. ElColorPicker,
  62559. ElConfigProvider,
  62560. ElContainer,
  62561. ElAside,
  62562. ElFooter,
  62563. ElHeader,
  62564. ElMain,
  62565. ElDatePicker,
  62566. ElDatePickerPanel,
  62567. ElDescriptions,
  62568. ElDescriptionsItem,
  62569. ElDialog,
  62570. ElDivider,
  62571. ElDrawer,
  62572. ElDropdown,
  62573. ElDropdownItem,
  62574. ElDropdownMenu,
  62575. ElEmpty,
  62576. ElForm,
  62577. ElFormItem,
  62578. ElIcon,
  62579. ElImage,
  62580. ElImageViewer,
  62581. ElInput,
  62582. ElInputNumber,
  62583. ElInputTag,
  62584. ElInputOtp,
  62585. ElLink,
  62586. ElMenu,
  62587. ElMenuItem,
  62588. ElMenuItemGroup,
  62589. ElSubMenu,
  62590. ElPageHeader,
  62591. ElPagination,
  62592. ElPopconfirm,
  62593. ElPopover,
  62594. ElPopper,
  62595. ElProgress,
  62596. ElRadio,
  62597. ElRadioButton,
  62598. ElRadioGroup,
  62599. ElRate,
  62600. ElResult,
  62601. ElRow,
  62602. ElScrollbar,
  62603. ElSelect,
  62604. ElOption,
  62605. ElOptionGroup,
  62606. ElSelectV2,
  62607. ElSkeleton,
  62608. ElSkeletonItem,
  62609. ElSlider,
  62610. ElSpace,
  62611. ElStatistic,
  62612. ElCountdown,
  62613. ElSteps,
  62614. ElStep,
  62615. ElSwitch,
  62616. ElTable,
  62617. ElTableColumn,
  62618. ElTableV2,
  62619. ElTabs,
  62620. ElTabPane,
  62621. ElTag,
  62622. ElText,
  62623. ElTimePicker,
  62624. ElTimeSelect,
  62625. ElTimeline,
  62626. ElTimelineItem,
  62627. ElTooltip,
  62628. ElTransfer,
  62629. ElTree,
  62630. ElTreeSelect,
  62631. ElTreeV2,
  62632. ElUpload,
  62633. ElWatermark,
  62634. ElTour,
  62635. ElTourStep,
  62636. ElAnchor,
  62637. ElAnchorLink,
  62638. ElSegmented,
  62639. ElMention,
  62640. ElSplitter,
  62641. ElSplitterPanel
  62642. ];
  62643. //#endregion
  62644. //#region node_modules/element-plus/es/plugin.mjs
  62645. var plugin_default = [
  62646. ElInfiniteScroll,
  62647. ElLoading,
  62648. ElMessage,
  62649. ElMessageBox,
  62650. ElNotification,
  62651. ElPopoverDirective
  62652. ];
  62653. //#endregion
  62654. //#region node_modules/element-plus/es/defaults.mjs
  62655. var defaults_default = makeInstaller([...component_default, ...plugin_default]);
  62656. //#endregion
  62657. //#region node_modules/element-plus/es/index.mjs
  62658. var install = defaults_default.install;
  62659. var version = defaults_default.version;
  62660. var element_plus_default = defaults_default;
  62661. //#endregion
  62662. var dayjs = import_dayjs_min.default;
  62663. export { BAR_MAP, BORDER_HORIZONTAL_WIDTH, CAROUSEL_ITEM_NAME, CASCADER_PANEL_HEIGHT, CASCADER_PANEL_INJECTION_KEY, CASCADER_PANEL_ITEM_SIZE, CHANGE_EVENT, ClickOutside, picker_default as CommonPicker, CommonProps, DEFAULT_DIALOG_TRANSITION, DEFAULT_EMPTY_VALUES, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_STEP, DEFAULT_VALUE_ON_CLEAR, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DefaultProps, DynamicSizeGrid, DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElAvatarGroup, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElColorPickerPanel, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDatePickerPanel, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputOtp, ElInputTag, ElLink, ElLoading, vLoading as ElLoadingDirective, vLoading, Loading as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, arrow_default as ElPopperArrow, content_default as ElPopperContent, trigger_default as ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid, FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, MENU_INJECTION_KEY, MESSAGE_DEFAULT_PLACEMENT, MINIMUM_INPUT_WIDTH, Mousewheel, NODE_INSTANCE_INJECTION_KEY, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_COMMON_COLOR_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, RowAlign, RowJustify, SCOPE, SIZE_INJECTION_KEY, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, panel_time_pick_default as TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, ZINDEX_INJECTION_KEY, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, ariaProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarGroupContextKey, avatarGroupProps, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxDefaultProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, checkboxPropsDefaults, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerEmits, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps, colorPickerProps, colorPickerPropsDefaults, columnAlignment, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, datePickerPanelProps, datePickerProps, dayOrDaysToDate, dayjs, element_plus_default as default, defaultInitialZIndex, defaultNamespace, defaultProps, descriptionItemProps, descriptionProps, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, emptyValuesContextKey, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputOtpEmits, inputProps, inputPropsDefaults, inputTagEmits, inputTagProps, install, linkEmits, linkProps, localeContextKey, makeInstaller, makeList, mentionDefaultProps, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messagePlacement, messageProps, messageTypes, namespaceContextKey, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popoverPropsDefaults, popperArrowProps, popperArrowPropsDefaults, popperContentEmits, popperContentProps, popperContentPropsDefaults, popperCoreConfigProps, popperCoreConfigPropsDefaults, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioButtonPropsDefaults, radioDefaultProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioGroupPropsDefaults, radioProps, radioPropsBase, radioPropsDefaults, rangeArr, rateEmits, rateProps, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits, timelineItemProps, timelineProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, translate, treeEmits, treeProps, uploadBaseProps, uploadBasePropsDefaults, uploadContentProps, uploadContentPropsDefaults, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, uploadPropsDefaults, useAriaProps, useAttrs, useCalcInputWidth, useCascaderConfig, useComposition, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDelayedTogglePropsDefaults, useDeprecated, useDialog, useDisabled, useDraggable, useEmptyValues, useEmptyValuesProps, useEscapeKeydown, useFloating, useFloatingProps, useFocus, useFocusController, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useForwardRef, useForwardRefDirective, useGetDerivedNamespace, useGlobalComponentSettings, useGlobalConfig, useGlobalSize, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useSameTarget, useSize, useSizeProp, useSizeProps, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipContentPropsDefaults, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTooltipTriggerPropsDefaults, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vRepeatClick, valueEquals, version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps, zIndexContextKey };
  62664. //# sourceMappingURL=element-plus.js.map