element-plus.js 1.8 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480
  1. import {
  2. arrow_down_default,
  3. arrow_left_default,
  4. arrow_right_default,
  5. arrow_up_default,
  6. back_default,
  7. calendar_default,
  8. caret_right_default,
  9. caret_top_default,
  10. check_default,
  11. circle_check_default,
  12. circle_check_filled_default,
  13. circle_close_default,
  14. circle_close_filled_default,
  15. clock_default,
  16. close_default,
  17. d_arrow_left_default,
  18. d_arrow_right_default,
  19. delete_default,
  20. document_default,
  21. full_screen_default,
  22. hide_default,
  23. info_filled_default,
  24. loading_default,
  25. minus_default,
  26. more_default,
  27. more_filled_default,
  28. picture_filled_default,
  29. plus_default,
  30. question_filled_default,
  31. refresh_left_default,
  32. refresh_right_default,
  33. scale_to_original_default,
  34. search_default,
  35. sort_down_default,
  36. sort_up_default,
  37. star_default,
  38. star_filled_default,
  39. success_filled_default,
  40. view_default,
  41. warning_filled_default,
  42. zoom_in_default,
  43. zoom_out_default
  44. } from "./chunk-6SL35DSX.js";
  45. import {
  46. Comment,
  47. Fragment,
  48. NOOP,
  49. Teleport,
  50. Text,
  51. Transition,
  52. TransitionGroup,
  53. camelize,
  54. capitalize,
  55. cloneVNode,
  56. computed,
  57. computed2,
  58. createApp,
  59. createBaseVNode,
  60. createBlock,
  61. createCommentVNode,
  62. createElementBlock,
  63. createSlots,
  64. createTextVNode,
  65. createVNode,
  66. defineComponent,
  67. effectScope,
  68. getCurrentInstance,
  69. getCurrentScope,
  70. guardReactiveProps,
  71. h,
  72. hasOwn,
  73. hyphenate,
  74. inject,
  75. isArray,
  76. isDate,
  77. isFunction,
  78. isObject,
  79. isPromise,
  80. isRef,
  81. isString,
  82. isVNode,
  83. markRaw,
  84. mergeProps,
  85. nextTick,
  86. normalizeClass,
  87. normalizeProps,
  88. normalizeStyle,
  89. onBeforeMount,
  90. onBeforeUnmount,
  91. onBeforeUpdate,
  92. onDeactivated,
  93. onMounted,
  94. onScopeDispose,
  95. onUnmounted,
  96. onUpdated,
  97. openBlock,
  98. provide,
  99. reactive,
  100. readonly,
  101. ref,
  102. render,
  103. renderList,
  104. renderSlot,
  105. resolveComponent,
  106. resolveDirective,
  107. resolveDynamicComponent,
  108. shallowReactive,
  109. shallowRef,
  110. toDisplayString,
  111. toHandlers,
  112. toRaw,
  113. toRawType,
  114. toRef,
  115. toRefs,
  116. triggerRef,
  117. unref,
  118. useAttrs,
  119. useSlots,
  120. vModelCheckbox,
  121. vModelRadio,
  122. vModelText,
  123. vShow,
  124. warn,
  125. watch,
  126. watchEffect,
  127. withCtx,
  128. withDirectives,
  129. withKeys,
  130. withModifiers
  131. } from "./chunk-27TSZX5F.js";
  132. import {
  133. __commonJS,
  134. __toESM
  135. } from "./chunk-S5KM4IGW.js";
  136. // node_modules/dayjs/dayjs.min.js
  137. var require_dayjs_min = __commonJS({
  138. "node_modules/dayjs/dayjs.min.js"(exports2, module2) {
  139. !function(t, e) {
  140. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
  141. }(exports2, function() {
  142. "use strict";
  143. var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", f2 = "month", h3 = "quarter", c2 = "year", d2 = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|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, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
  144. var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
  145. return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
  146. } }, m2 = function(t2, e2, n2) {
  147. var r2 = String(t2);
  148. return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
  149. }, v2 = { s: m2, z: function(t2) {
  150. var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
  151. return (e2 <= 0 ? "+" : "-") + m2(r2, 2, "0") + ":" + m2(i2, 2, "0");
  152. }, m: function t2(e2, n2) {
  153. if (e2.date() < n2.date())
  154. return -t2(n2, e2);
  155. var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f2), s3 = n2 - i2 < 0, u3 = e2.clone().add(r2 + (s3 ? -1 : 1), f2);
  156. return +(-(r2 + (n2 - i2) / (s3 ? i2 - u3 : u3 - i2)) || 0);
  157. }, a: function(t2) {
  158. return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
  159. }, p: function(t2) {
  160. return { M: f2, y: c2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i, ms: r, Q: h3 }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
  161. }, u: function(t2) {
  162. return void 0 === t2;
  163. } }, g = "en", D2 = {};
  164. D2[g] = M2;
  165. var p2 = function(t2) {
  166. return t2 instanceof _2;
  167. }, S2 = function t2(e2, n2, r2) {
  168. var i2;
  169. if (!e2)
  170. return g;
  171. if ("string" == typeof e2) {
  172. var s3 = e2.toLowerCase();
  173. D2[s3] && (i2 = s3), n2 && (D2[s3] = n2, i2 = s3);
  174. var u3 = e2.split("-");
  175. if (!i2 && u3.length > 1)
  176. return t2(u3[0]);
  177. } else {
  178. var a3 = e2.name;
  179. D2[a3] = e2, i2 = a3;
  180. }
  181. return !r2 && i2 && (g = i2), i2 || !r2 && g;
  182. }, w2 = function(t2, e2) {
  183. if (p2(t2))
  184. return t2.clone();
  185. var n2 = "object" == typeof e2 ? e2 : {};
  186. return n2.date = t2, n2.args = arguments, new _2(n2);
  187. }, O2 = v2;
  188. O2.l = S2, O2.i = p2, O2.w = function(t2, e2) {
  189. return w2(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
  190. };
  191. var _2 = function() {
  192. function M3(t2) {
  193. this.$L = S2(t2.locale, null, true), this.parse(t2);
  194. }
  195. var m3 = M3.prototype;
  196. return m3.parse = function(t2) {
  197. this.$d = function(t3) {
  198. var e2 = t3.date, n2 = t3.utc;
  199. if (null === e2)
  200. return new Date(NaN);
  201. if (O2.u(e2))
  202. return new Date();
  203. if (e2 instanceof Date)
  204. return new Date(e2);
  205. if ("string" == typeof e2 && !/Z$/i.test(e2)) {
  206. var r2 = e2.match($);
  207. if (r2) {
  208. var i2 = r2[2] - 1 || 0, s3 = (r2[7] || "0").substring(0, 3);
  209. return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3);
  210. }
  211. }
  212. return new Date(e2);
  213. }(t2), this.$x = t2.x || {}, this.init();
  214. }, m3.init = function() {
  215. var t2 = this.$d;
  216. this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
  217. }, m3.$utils = function() {
  218. return O2;
  219. }, m3.isValid = function() {
  220. return !(this.$d.toString() === l2);
  221. }, m3.isSame = function(t2, e2) {
  222. var n2 = w2(t2);
  223. return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
  224. }, m3.isAfter = function(t2, e2) {
  225. return w2(t2) < this.startOf(e2);
  226. }, m3.isBefore = function(t2, e2) {
  227. return this.endOf(e2) < w2(t2);
  228. }, m3.$g = function(t2, e2, n2) {
  229. return O2.u(t2) ? this[e2] : this.set(n2, t2);
  230. }, m3.unix = function() {
  231. return Math.floor(this.valueOf() / 1e3);
  232. }, m3.valueOf = function() {
  233. return this.$d.getTime();
  234. }, m3.startOf = function(t2, e2) {
  235. var n2 = this, r2 = !!O2.u(e2) || e2, h4 = O2.p(t2), l3 = function(t3, e3) {
  236. var i2 = O2.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
  237. return r2 ? i2 : i2.endOf(a2);
  238. }, $2 = function(t3, e3) {
  239. return O2.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
  240. }, y2 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
  241. switch (h4) {
  242. case c2:
  243. return r2 ? l3(1, 0) : l3(31, 11);
  244. case f2:
  245. return r2 ? l3(1, M4) : l3(0, M4 + 1);
  246. case o2:
  247. var g2 = this.$locale().weekStart || 0, D3 = (y2 < g2 ? y2 + 7 : y2) - g2;
  248. return l3(r2 ? m4 - D3 : m4 + (6 - D3), M4);
  249. case a2:
  250. case d2:
  251. return $2(v3 + "Hours", 0);
  252. case u2:
  253. return $2(v3 + "Minutes", 1);
  254. case s2:
  255. return $2(v3 + "Seconds", 2);
  256. case i:
  257. return $2(v3 + "Milliseconds", 3);
  258. default:
  259. return this.clone();
  260. }
  261. }, m3.endOf = function(t2) {
  262. return this.startOf(t2, false);
  263. }, m3.$set = function(t2, e2) {
  264. var n2, o3 = O2.p(t2), h4 = "set" + (this.$u ? "UTC" : ""), l3 = (n2 = {}, n2[a2] = h4 + "Date", n2[d2] = h4 + "Date", n2[f2] = h4 + "Month", n2[c2] = h4 + "FullYear", n2[u2] = h4 + "Hours", n2[s2] = h4 + "Minutes", n2[i] = h4 + "Seconds", n2[r] = h4 + "Milliseconds", n2)[o3], $2 = o3 === a2 ? this.$D + (e2 - this.$W) : e2;
  265. if (o3 === f2 || o3 === c2) {
  266. var y2 = this.clone().set(d2, 1);
  267. y2.$d[l3]($2), y2.init(), this.$d = y2.set(d2, Math.min(this.$D, y2.daysInMonth())).$d;
  268. } else
  269. l3 && this.$d[l3]($2);
  270. return this.init(), this;
  271. }, m3.set = function(t2, e2) {
  272. return this.clone().$set(t2, e2);
  273. }, m3.get = function(t2) {
  274. return this[O2.p(t2)]();
  275. }, m3.add = function(r2, h4) {
  276. var d3, l3 = this;
  277. r2 = Number(r2);
  278. var $2 = O2.p(h4), y2 = function(t2) {
  279. var e2 = w2(l3);
  280. return O2.w(e2.date(e2.date() + Math.round(t2 * r2)), l3);
  281. };
  282. if ($2 === f2)
  283. return this.set(f2, this.$M + r2);
  284. if ($2 === c2)
  285. return this.set(c2, this.$y + r2);
  286. if ($2 === a2)
  287. return y2(1);
  288. if ($2 === o2)
  289. return y2(7);
  290. var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n, d3[i] = t, d3)[$2] || 1, m4 = this.$d.getTime() + r2 * M4;
  291. return O2.w(m4, this);
  292. }, m3.subtract = function(t2, e2) {
  293. return this.add(-1 * t2, e2);
  294. }, m3.format = function(t2) {
  295. var e2 = this, n2 = this.$locale();
  296. if (!this.isValid())
  297. return n2.invalidDate || l2;
  298. var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n2.weekdays, f3 = n2.months, h4 = function(t3, n3, i3, s4) {
  299. return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s4);
  300. }, c3 = function(t3) {
  301. return O2.s(s3 % 12 || 12, t3, "0");
  302. }, d3 = n2.meridiem || function(t3, e3, n3) {
  303. var r3 = t3 < 12 ? "AM" : "PM";
  304. return n3 ? r3.toLowerCase() : r3;
  305. }, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a3 + 1, MM: O2.s(a3 + 1, 2, "0"), MMM: h4(n2.monthsShort, a3, f3, 3), MMMM: h4(f3, a3), D: this.$D, DD: O2.s(this.$D, 2, "0"), d: String(this.$W), dd: h4(n2.weekdaysMin, this.$W, o3, 2), ddd: h4(n2.weekdaysShort, this.$W, o3, 3), dddd: o3[this.$W], H: String(s3), HH: O2.s(s3, 2, "0"), h: c3(1), hh: c3(2), a: d3(s3, u3, true), A: d3(s3, u3, false), m: String(u3), mm: O2.s(u3, 2, "0"), s: String(this.$s), ss: O2.s(this.$s, 2, "0"), SSS: O2.s(this.$ms, 3, "0"), Z: i2 };
  306. return r2.replace(y, function(t3, e3) {
  307. return e3 || $2[t3] || i2.replace(":", "");
  308. });
  309. }, m3.utcOffset = function() {
  310. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  311. }, m3.diff = function(r2, d3, l3) {
  312. var $2, y2 = O2.p(d3), M4 = w2(r2), m4 = (M4.utcOffset() - this.utcOffset()) * e, v3 = this - M4, g2 = O2.m(this, M4);
  313. return g2 = ($2 = {}, $2[c2] = g2 / 12, $2[f2] = g2, $2[h3] = g2 / 3, $2[o2] = (v3 - m4) / 6048e5, $2[a2] = (v3 - m4) / 864e5, $2[u2] = v3 / n, $2[s2] = v3 / e, $2[i] = v3 / t, $2)[y2] || v3, l3 ? g2 : O2.a(g2);
  314. }, m3.daysInMonth = function() {
  315. return this.endOf(f2).$D;
  316. }, m3.$locale = function() {
  317. return D2[this.$L];
  318. }, m3.locale = function(t2, e2) {
  319. if (!t2)
  320. return this.$L;
  321. var n2 = this.clone(), r2 = S2(t2, e2, true);
  322. return r2 && (n2.$L = r2), n2;
  323. }, m3.clone = function() {
  324. return O2.w(this.$d, this);
  325. }, m3.toDate = function() {
  326. return new Date(this.valueOf());
  327. }, m3.toJSON = function() {
  328. return this.isValid() ? this.toISOString() : null;
  329. }, m3.toISOString = function() {
  330. return this.$d.toISOString();
  331. }, m3.toString = function() {
  332. return this.$d.toUTCString();
  333. }, M3;
  334. }(), T2 = _2.prototype;
  335. return w2.prototype = T2, [["$ms", r], ["$s", i], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", f2], ["$y", c2], ["$D", d2]].forEach(function(t2) {
  336. T2[t2[1]] = function(e2) {
  337. return this.$g(e2, t2[0], t2[1]);
  338. };
  339. }), w2.extend = function(t2, e2) {
  340. return t2.$i || (t2(e2, _2, w2), t2.$i = true), w2;
  341. }, w2.locale = S2, w2.isDayjs = p2, w2.unix = function(t2) {
  342. return w2(1e3 * t2);
  343. }, w2.en = D2[g], w2.Ls = D2, w2.p = {}, w2;
  344. });
  345. }
  346. });
  347. // node_modules/dayjs/plugin/customParseFormat.js
  348. var require_customParseFormat = __commonJS({
  349. "node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) {
  350. !function(e, t) {
  351. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
  352. }(exports2, function() {
  353. "use strict";
  354. var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d\d/, r = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, o2 = {}, s2 = function(e2) {
  355. return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
  356. };
  357. var a2 = function(e2) {
  358. return function(t2) {
  359. this[e2] = +t2;
  360. };
  361. }, f2 = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
  362. (this.zone || (this.zone = {})).offset = function(e3) {
  363. if (!e3)
  364. return 0;
  365. if ("Z" === e3)
  366. return 0;
  367. var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
  368. return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
  369. }(e2);
  370. }], h3 = function(e2) {
  371. var t2 = o2[e2];
  372. return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
  373. }, u2 = function(e2, t2) {
  374. var n2, r2 = o2.meridiem;
  375. if (r2) {
  376. for (var i2 = 1; i2 <= 24; i2 += 1)
  377. if (e2.indexOf(r2(i2, 0, t2)) > -1) {
  378. n2 = i2 > 12;
  379. break;
  380. }
  381. } else
  382. n2 = e2 === (t2 ? "pm" : "PM");
  383. return n2;
  384. }, d2 = { A: [i, function(e2) {
  385. this.afternoon = u2(e2, false);
  386. }], a: [i, function(e2) {
  387. this.afternoon = u2(e2, true);
  388. }], S: [/\d/, function(e2) {
  389. this.milliseconds = 100 * +e2;
  390. }], SS: [n, function(e2) {
  391. this.milliseconds = 10 * +e2;
  392. }], SSS: [/\d{3}/, function(e2) {
  393. this.milliseconds = +e2;
  394. }], s: [r, a2("seconds")], ss: [r, a2("seconds")], m: [r, a2("minutes")], mm: [r, a2("minutes")], H: [r, a2("hours")], h: [r, a2("hours")], HH: [r, a2("hours")], hh: [r, a2("hours")], D: [r, a2("day")], DD: [n, a2("day")], Do: [i, function(e2) {
  395. var t2 = o2.ordinal, n2 = e2.match(/\d+/);
  396. if (this.day = n2[0], t2)
  397. for (var r2 = 1; r2 <= 31; r2 += 1)
  398. t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
  399. }], M: [r, a2("month")], MM: [n, a2("month")], MMM: [i, function(e2) {
  400. var t2 = h3("months"), n2 = (h3("monthsShort") || t2.map(function(e3) {
  401. return e3.slice(0, 3);
  402. })).indexOf(e2) + 1;
  403. if (n2 < 1)
  404. throw new Error();
  405. this.month = n2 % 12 || n2;
  406. }], MMMM: [i, function(e2) {
  407. var t2 = h3("months").indexOf(e2) + 1;
  408. if (t2 < 1)
  409. throw new Error();
  410. this.month = t2 % 12 || t2;
  411. }], Y: [/[+-]?\d+/, a2("year")], YY: [n, function(e2) {
  412. this.year = s2(e2);
  413. }], YYYY: [/\d{4}/, a2("year")], Z: f2, ZZ: f2 };
  414. function c2(n2) {
  415. var r2, i2;
  416. r2 = n2, i2 = o2 && o2.formats;
  417. for (var s3 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
  418. var o3 = r3 && r3.toUpperCase();
  419. return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
  420. return t3 || n4.slice(1);
  421. });
  422. })).match(t), a3 = s3.length, f3 = 0; f3 < a3; f3 += 1) {
  423. var h4 = s3[f3], u3 = d2[h4], c3 = u3 && u3[0], l2 = u3 && u3[1];
  424. s3[f3] = l2 ? { regex: c3, parser: l2 } : h4.replace(/^\[|\]$/g, "");
  425. }
  426. return function(e2) {
  427. for (var t2 = {}, n3 = 0, r3 = 0; n3 < a3; n3 += 1) {
  428. var i3 = s3[n3];
  429. if ("string" == typeof i3)
  430. r3 += i3.length;
  431. else {
  432. var o3 = i3.regex, f4 = i3.parser, h5 = e2.slice(r3), u4 = o3.exec(h5)[0];
  433. f4.call(t2, u4), e2 = e2.replace(u4, "");
  434. }
  435. }
  436. return function(e3) {
  437. var t3 = e3.afternoon;
  438. if (void 0 !== t3) {
  439. var n4 = e3.hours;
  440. t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
  441. }
  442. }(t2), t2;
  443. };
  444. }
  445. return function(e2, t2, n2) {
  446. n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (s2 = e2.parseTwoDigitYear);
  447. var r2 = t2.prototype, i2 = r2.parse;
  448. r2.parse = function(e3) {
  449. var t3 = e3.date, r3 = e3.utc, s3 = e3.args;
  450. this.$u = r3;
  451. var a3 = s3[1];
  452. if ("string" == typeof a3) {
  453. var f3 = true === s3[2], h4 = true === s3[3], u3 = f3 || h4, d3 = s3[2];
  454. h4 && (d3 = s3[2]), o2 = this.$locale(), !f3 && d3 && (o2 = n2.Ls[d3]), this.$d = function(e4, t4, n3) {
  455. try {
  456. if (["x", "X"].indexOf(t4) > -1)
  457. return new Date(("X" === t4 ? 1e3 : 1) * e4);
  458. var r4 = c2(t4)(e4), i3 = r4.year, o3 = r4.month, s4 = r4.day, a4 = r4.hours, f4 = r4.minutes, h5 = r4.seconds, u4 = r4.milliseconds, d4 = r4.zone, l3 = new Date(), m3 = s4 || (i3 || o3 ? 1 : l3.getDate()), M3 = i3 || l3.getFullYear(), Y2 = 0;
  459. i3 && !o3 || (Y2 = o3 > 0 ? o3 - 1 : l3.getMonth());
  460. var p2 = a4 || 0, v2 = f4 || 0, D2 = h5 || 0, g = u4 || 0;
  461. return d4 ? new Date(Date.UTC(M3, Y2, m3, p2, v2, D2, g + 60 * d4.offset * 1e3)) : n3 ? new Date(Date.UTC(M3, Y2, m3, p2, v2, D2, g)) : new Date(M3, Y2, m3, p2, v2, D2, g);
  462. } catch (e5) {
  463. return new Date("");
  464. }
  465. }(t3, a3, r3), this.init(), d3 && true !== d3 && (this.$L = this.locale(d3).$L), u3 && t3 != this.format(a3) && (this.$d = new Date("")), o2 = {};
  466. } else if (a3 instanceof Array)
  467. for (var l2 = a3.length, m2 = 1; m2 <= l2; m2 += 1) {
  468. s3[1] = a3[m2 - 1];
  469. var M2 = n2.apply(this, s3);
  470. if (M2.isValid()) {
  471. this.$d = M2.$d, this.$L = M2.$L, this.init();
  472. break;
  473. }
  474. m2 === l2 && (this.$d = new Date(""));
  475. }
  476. else
  477. i2.call(this, e3);
  478. };
  479. };
  480. });
  481. }
  482. });
  483. // node_modules/dayjs/plugin/localeData.js
  484. var require_localeData = __commonJS({
  485. "node_modules/dayjs/plugin/localeData.js"(exports2, module2) {
  486. !function(n, e) {
  487. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e();
  488. }(exports2, function() {
  489. "use strict";
  490. return function(n, e, t) {
  491. var r = e.prototype, o2 = function(n2) {
  492. return n2 && (n2.indexOf ? n2 : n2.s);
  493. }, u2 = function(n2, e2, t2, r2, u3) {
  494. var i2 = n2.name ? n2 : n2.$locale(), a3 = o2(i2[e2]), s3 = o2(i2[t2]), f2 = a3 || s3.map(function(n3) {
  495. return n3.slice(0, r2);
  496. });
  497. if (!u3)
  498. return f2;
  499. var d2 = i2.weekStart;
  500. return f2.map(function(n3, e3) {
  501. return f2[(e3 + (d2 || 0)) % 7];
  502. });
  503. }, i = function() {
  504. return t.Ls[t.locale()];
  505. }, a2 = function(n2, e2) {
  506. return n2.formats[e2] || function(n3) {
  507. return n3.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n4, e3, t2) {
  508. return e3 || t2.slice(1);
  509. });
  510. }(n2.formats[e2.toUpperCase()]);
  511. }, s2 = function() {
  512. var n2 = this;
  513. return { months: function(e2) {
  514. return e2 ? e2.format("MMMM") : u2(n2, "months");
  515. }, monthsShort: function(e2) {
  516. return e2 ? e2.format("MMM") : u2(n2, "monthsShort", "months", 3);
  517. }, firstDayOfWeek: function() {
  518. return n2.$locale().weekStart || 0;
  519. }, weekdays: function(e2) {
  520. return e2 ? e2.format("dddd") : u2(n2, "weekdays");
  521. }, weekdaysMin: function(e2) {
  522. return e2 ? e2.format("dd") : u2(n2, "weekdaysMin", "weekdays", 2);
  523. }, weekdaysShort: function(e2) {
  524. return e2 ? e2.format("ddd") : u2(n2, "weekdaysShort", "weekdays", 3);
  525. }, longDateFormat: function(e2) {
  526. return a2(n2.$locale(), e2);
  527. }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
  528. };
  529. r.localeData = function() {
  530. return s2.bind(this)();
  531. }, t.localeData = function() {
  532. var n2 = i();
  533. return { firstDayOfWeek: function() {
  534. return n2.weekStart || 0;
  535. }, weekdays: function() {
  536. return t.weekdays();
  537. }, weekdaysShort: function() {
  538. return t.weekdaysShort();
  539. }, weekdaysMin: function() {
  540. return t.weekdaysMin();
  541. }, months: function() {
  542. return t.months();
  543. }, monthsShort: function() {
  544. return t.monthsShort();
  545. }, longDateFormat: function(e2) {
  546. return a2(n2, e2);
  547. }, meridiem: n2.meridiem, ordinal: n2.ordinal };
  548. }, t.months = function() {
  549. return u2(i(), "months");
  550. }, t.monthsShort = function() {
  551. return u2(i(), "monthsShort", "months", 3);
  552. }, t.weekdays = function(n2) {
  553. return u2(i(), "weekdays", null, null, n2);
  554. }, t.weekdaysShort = function(n2) {
  555. return u2(i(), "weekdaysShort", "weekdays", 3, n2);
  556. }, t.weekdaysMin = function(n2) {
  557. return u2(i(), "weekdaysMin", "weekdays", 2, n2);
  558. };
  559. };
  560. });
  561. }
  562. });
  563. // node_modules/dayjs/plugin/advancedFormat.js
  564. var require_advancedFormat = __commonJS({
  565. "node_modules/dayjs/plugin/advancedFormat.js"(exports2, module2) {
  566. !function(e, t) {
  567. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t();
  568. }(exports2, function() {
  569. "use strict";
  570. return function(e, t) {
  571. var r = t.prototype, n = r.format;
  572. r.format = function(e2) {
  573. var t2 = this, r2 = this.$locale();
  574. if (!this.isValid())
  575. return n.bind(this)(e2);
  576. var s2 = this.$utils(), a2 = (e2 || "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(e3) {
  577. switch (e3) {
  578. case "Q":
  579. return Math.ceil((t2.$M + 1) / 3);
  580. case "Do":
  581. return r2.ordinal(t2.$D);
  582. case "gggg":
  583. return t2.weekYear();
  584. case "GGGG":
  585. return t2.isoWeekYear();
  586. case "wo":
  587. return r2.ordinal(t2.week(), "W");
  588. case "w":
  589. case "ww":
  590. return s2.s(t2.week(), "w" === e3 ? 1 : 2, "0");
  591. case "W":
  592. case "WW":
  593. return s2.s(t2.isoWeek(), "W" === e3 ? 1 : 2, "0");
  594. case "k":
  595. case "kk":
  596. return s2.s(String(0 === t2.$H ? 24 : t2.$H), "k" === e3 ? 1 : 2, "0");
  597. case "X":
  598. return Math.floor(t2.$d.getTime() / 1e3);
  599. case "x":
  600. return t2.$d.getTime();
  601. case "z":
  602. return "[" + t2.offsetName() + "]";
  603. case "zzz":
  604. return "[" + t2.offsetName("long") + "]";
  605. default:
  606. return e3;
  607. }
  608. });
  609. return n.bind(this)(a2);
  610. };
  611. };
  612. });
  613. }
  614. });
  615. // node_modules/dayjs/plugin/weekOfYear.js
  616. var require_weekOfYear = __commonJS({
  617. "node_modules/dayjs/plugin/weekOfYear.js"(exports2, module2) {
  618. !function(e, t) {
  619. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t();
  620. }(exports2, function() {
  621. "use strict";
  622. var e = "week", t = "year";
  623. return function(i, n, r) {
  624. var f2 = n.prototype;
  625. f2.week = function(i2) {
  626. if (void 0 === i2 && (i2 = null), null !== i2)
  627. return this.add(7 * (i2 - this.week()), "day");
  628. var n2 = this.$locale().yearStart || 1;
  629. if (11 === this.month() && this.date() > 25) {
  630. var f3 = r(this).startOf(t).add(1, t).date(n2), s2 = r(this).endOf(e);
  631. if (f3.isBefore(s2))
  632. return 1;
  633. }
  634. var a2 = r(this).startOf(t).date(n2).startOf(e).subtract(1, "millisecond"), o2 = this.diff(a2, e, true);
  635. return o2 < 0 ? r(this).startOf("week").week() : Math.ceil(o2);
  636. }, f2.weeks = function(e2) {
  637. return void 0 === e2 && (e2 = null), this.week(e2);
  638. };
  639. };
  640. });
  641. }
  642. });
  643. // node_modules/dayjs/plugin/weekYear.js
  644. var require_weekYear = __commonJS({
  645. "node_modules/dayjs/plugin/weekYear.js"(exports2, module2) {
  646. !function(e, t) {
  647. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t();
  648. }(exports2, function() {
  649. "use strict";
  650. return function(e, t) {
  651. t.prototype.weekYear = function() {
  652. var e2 = this.month(), t2 = this.week(), n = this.year();
  653. return 1 === t2 && 11 === e2 ? n + 1 : 0 === e2 && t2 >= 52 ? n - 1 : n;
  654. };
  655. };
  656. });
  657. }
  658. });
  659. // node_modules/dayjs/plugin/dayOfYear.js
  660. var require_dayOfYear = __commonJS({
  661. "node_modules/dayjs/plugin/dayOfYear.js"(exports2, module2) {
  662. !function(e, t) {
  663. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_dayOfYear = t();
  664. }(exports2, function() {
  665. "use strict";
  666. return function(e, t, n) {
  667. t.prototype.dayOfYear = function(e2) {
  668. var t2 = Math.round((n(this).startOf("day") - n(this).startOf("year")) / 864e5) + 1;
  669. return null == e2 ? t2 : this.add(e2 - t2, "day");
  670. };
  671. };
  672. });
  673. }
  674. });
  675. // node_modules/dayjs/plugin/isSameOrAfter.js
  676. var require_isSameOrAfter = __commonJS({
  677. "node_modules/dayjs/plugin/isSameOrAfter.js"(exports2, module2) {
  678. !function(e, t) {
  679. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t();
  680. }(exports2, function() {
  681. "use strict";
  682. return function(e, t) {
  683. t.prototype.isSameOrAfter = function(e2, t2) {
  684. return this.isSame(e2, t2) || this.isAfter(e2, t2);
  685. };
  686. };
  687. });
  688. }
  689. });
  690. // node_modules/dayjs/plugin/isSameOrBefore.js
  691. var require_isSameOrBefore = __commonJS({
  692. "node_modules/dayjs/plugin/isSameOrBefore.js"(exports2, module2) {
  693. !function(e, i) {
  694. "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i();
  695. }(exports2, function() {
  696. "use strict";
  697. return function(e, i) {
  698. i.prototype.isSameOrBefore = function(e2, i2) {
  699. return this.isSame(e2, i2) || this.isBefore(e2, i2);
  700. };
  701. };
  702. });
  703. }
  704. });
  705. // node_modules/escape-html/index.js
  706. var require_escape_html = __commonJS({
  707. "node_modules/escape-html/index.js"(exports2, module2) {
  708. "use strict";
  709. var matchHtmlRegExp = /["'&<>]/;
  710. module2.exports = escapeHtml2;
  711. function escapeHtml2(string3) {
  712. var str = "" + string3;
  713. var match = matchHtmlRegExp.exec(str);
  714. if (!match) {
  715. return str;
  716. }
  717. var escape2;
  718. var html = "";
  719. var index = 0;
  720. var lastIndex = 0;
  721. for (index = match.index; index < str.length; index++) {
  722. switch (str.charCodeAt(index)) {
  723. case 34:
  724. escape2 = "&quot;";
  725. break;
  726. case 38:
  727. escape2 = "&amp;";
  728. break;
  729. case 39:
  730. escape2 = "&#39;";
  731. break;
  732. case 60:
  733. escape2 = "&lt;";
  734. break;
  735. case 62:
  736. escape2 = "&gt;";
  737. break;
  738. default:
  739. continue;
  740. }
  741. if (lastIndex !== index) {
  742. html += str.substring(lastIndex, index);
  743. }
  744. lastIndex = index + 1;
  745. html += escape2;
  746. }
  747. return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
  748. }
  749. }
  750. });
  751. // node_modules/lodash-es/_freeGlobal.js
  752. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  753. var freeGlobal_default = freeGlobal;
  754. // node_modules/lodash-es/_root.js
  755. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  756. var root = freeGlobal_default || freeSelf || Function("return this")();
  757. var root_default = root;
  758. // node_modules/lodash-es/_Symbol.js
  759. var Symbol2 = root_default.Symbol;
  760. var Symbol_default = Symbol2;
  761. // node_modules/lodash-es/_getRawTag.js
  762. var objectProto = Object.prototype;
  763. var hasOwnProperty = objectProto.hasOwnProperty;
  764. var nativeObjectToString = objectProto.toString;
  765. var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
  766. function getRawTag(value) {
  767. var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
  768. try {
  769. value[symToStringTag] = void 0;
  770. var unmasked = true;
  771. } catch (e) {
  772. }
  773. var result2 = nativeObjectToString.call(value);
  774. if (unmasked) {
  775. if (isOwn) {
  776. value[symToStringTag] = tag;
  777. } else {
  778. delete value[symToStringTag];
  779. }
  780. }
  781. return result2;
  782. }
  783. var getRawTag_default = getRawTag;
  784. // node_modules/lodash-es/_objectToString.js
  785. var objectProto2 = Object.prototype;
  786. var nativeObjectToString2 = objectProto2.toString;
  787. function objectToString(value) {
  788. return nativeObjectToString2.call(value);
  789. }
  790. var objectToString_default = objectToString;
  791. // node_modules/lodash-es/_baseGetTag.js
  792. var nullTag = "[object Null]";
  793. var undefinedTag = "[object Undefined]";
  794. var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
  795. function baseGetTag(value) {
  796. if (value == null) {
  797. return value === void 0 ? undefinedTag : nullTag;
  798. }
  799. return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
  800. }
  801. var baseGetTag_default = baseGetTag;
  802. // node_modules/lodash-es/isObjectLike.js
  803. function isObjectLike(value) {
  804. return value != null && typeof value == "object";
  805. }
  806. var isObjectLike_default = isObjectLike;
  807. // node_modules/lodash-es/isSymbol.js
  808. var symbolTag = "[object Symbol]";
  809. function isSymbol(value) {
  810. return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
  811. }
  812. var isSymbol_default = isSymbol;
  813. // node_modules/lodash-es/_baseToNumber.js
  814. var NAN = 0 / 0;
  815. function baseToNumber(value) {
  816. if (typeof value == "number") {
  817. return value;
  818. }
  819. if (isSymbol_default(value)) {
  820. return NAN;
  821. }
  822. return +value;
  823. }
  824. var baseToNumber_default = baseToNumber;
  825. // node_modules/lodash-es/_arrayMap.js
  826. function arrayMap(array4, iteratee2) {
  827. var index = -1, length = array4 == null ? 0 : array4.length, result2 = Array(length);
  828. while (++index < length) {
  829. result2[index] = iteratee2(array4[index], index, array4);
  830. }
  831. return result2;
  832. }
  833. var arrayMap_default = arrayMap;
  834. // node_modules/lodash-es/isArray.js
  835. var isArray2 = Array.isArray;
  836. var isArray_default = isArray2;
  837. // node_modules/lodash-es/_baseToString.js
  838. var INFINITY = 1 / 0;
  839. var symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
  840. var symbolToString = symbolProto ? symbolProto.toString : void 0;
  841. function baseToString(value) {
  842. if (typeof value == "string") {
  843. return value;
  844. }
  845. if (isArray_default(value)) {
  846. return arrayMap_default(value, baseToString) + "";
  847. }
  848. if (isSymbol_default(value)) {
  849. return symbolToString ? symbolToString.call(value) : "";
  850. }
  851. var result2 = value + "";
  852. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  853. }
  854. var baseToString_default = baseToString;
  855. // node_modules/lodash-es/_createMathOperation.js
  856. function createMathOperation(operator, defaultValue) {
  857. return function(value, other) {
  858. var result2;
  859. if (value === void 0 && other === void 0) {
  860. return defaultValue;
  861. }
  862. if (value !== void 0) {
  863. result2 = value;
  864. }
  865. if (other !== void 0) {
  866. if (result2 === void 0) {
  867. return other;
  868. }
  869. if (typeof value == "string" || typeof other == "string") {
  870. value = baseToString_default(value);
  871. other = baseToString_default(other);
  872. } else {
  873. value = baseToNumber_default(value);
  874. other = baseToNumber_default(other);
  875. }
  876. result2 = operator(value, other);
  877. }
  878. return result2;
  879. };
  880. }
  881. var createMathOperation_default = createMathOperation;
  882. // node_modules/lodash-es/add.js
  883. var add = createMathOperation_default(function(augend, addend) {
  884. return augend + addend;
  885. }, 0);
  886. var add_default = add;
  887. // node_modules/lodash-es/_trimmedEndIndex.js
  888. var reWhitespace = /\s/;
  889. function trimmedEndIndex(string3) {
  890. var index = string3.length;
  891. while (index-- && reWhitespace.test(string3.charAt(index))) {
  892. }
  893. return index;
  894. }
  895. var trimmedEndIndex_default = trimmedEndIndex;
  896. // node_modules/lodash-es/_baseTrim.js
  897. var reTrimStart = /^\s+/;
  898. function baseTrim(string3) {
  899. return string3 ? string3.slice(0, trimmedEndIndex_default(string3) + 1).replace(reTrimStart, "") : string3;
  900. }
  901. var baseTrim_default = baseTrim;
  902. // node_modules/lodash-es/isObject.js
  903. function isObject2(value) {
  904. var type4 = typeof value;
  905. return value != null && (type4 == "object" || type4 == "function");
  906. }
  907. var isObject_default = isObject2;
  908. // node_modules/lodash-es/toNumber.js
  909. var NAN2 = 0 / 0;
  910. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  911. var reIsBinary = /^0b[01]+$/i;
  912. var reIsOctal = /^0o[0-7]+$/i;
  913. var freeParseInt = parseInt;
  914. function toNumber(value) {
  915. if (typeof value == "number") {
  916. return value;
  917. }
  918. if (isSymbol_default(value)) {
  919. return NAN2;
  920. }
  921. if (isObject_default(value)) {
  922. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  923. value = isObject_default(other) ? other + "" : other;
  924. }
  925. if (typeof value != "string") {
  926. return value === 0 ? value : +value;
  927. }
  928. value = baseTrim_default(value);
  929. var isBinary = reIsBinary.test(value);
  930. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN2 : +value;
  931. }
  932. var toNumber_default = toNumber;
  933. // node_modules/lodash-es/toFinite.js
  934. var INFINITY2 = 1 / 0;
  935. var MAX_INTEGER = 17976931348623157e292;
  936. function toFinite(value) {
  937. if (!value) {
  938. return value === 0 ? value : 0;
  939. }
  940. value = toNumber_default(value);
  941. if (value === INFINITY2 || value === -INFINITY2) {
  942. var sign = value < 0 ? -1 : 1;
  943. return sign * MAX_INTEGER;
  944. }
  945. return value === value ? value : 0;
  946. }
  947. var toFinite_default = toFinite;
  948. // node_modules/lodash-es/toInteger.js
  949. function toInteger(value) {
  950. var result2 = toFinite_default(value), remainder = result2 % 1;
  951. return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
  952. }
  953. var toInteger_default = toInteger;
  954. // node_modules/lodash-es/after.js
  955. var FUNC_ERROR_TEXT = "Expected a function";
  956. function after(n, func) {
  957. if (typeof func != "function") {
  958. throw new TypeError(FUNC_ERROR_TEXT);
  959. }
  960. n = toInteger_default(n);
  961. return function() {
  962. if (--n < 1) {
  963. return func.apply(this, arguments);
  964. }
  965. };
  966. }
  967. var after_default = after;
  968. // node_modules/lodash-es/identity.js
  969. function identity(value) {
  970. return value;
  971. }
  972. var identity_default = identity;
  973. // node_modules/lodash-es/isFunction.js
  974. var asyncTag = "[object AsyncFunction]";
  975. var funcTag = "[object Function]";
  976. var genTag = "[object GeneratorFunction]";
  977. var proxyTag = "[object Proxy]";
  978. function isFunction2(value) {
  979. if (!isObject_default(value)) {
  980. return false;
  981. }
  982. var tag = baseGetTag_default(value);
  983. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  984. }
  985. var isFunction_default = isFunction2;
  986. // node_modules/lodash-es/_coreJsData.js
  987. var coreJsData = root_default["__core-js_shared__"];
  988. var coreJsData_default = coreJsData;
  989. // node_modules/lodash-es/_isMasked.js
  990. var maskSrcKey = function() {
  991. var uid2 = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
  992. return uid2 ? "Symbol(src)_1." + uid2 : "";
  993. }();
  994. function isMasked(func) {
  995. return !!maskSrcKey && maskSrcKey in func;
  996. }
  997. var isMasked_default = isMasked;
  998. // node_modules/lodash-es/_toSource.js
  999. var funcProto = Function.prototype;
  1000. var funcToString = funcProto.toString;
  1001. function toSource(func) {
  1002. if (func != null) {
  1003. try {
  1004. return funcToString.call(func);
  1005. } catch (e) {
  1006. }
  1007. try {
  1008. return func + "";
  1009. } catch (e) {
  1010. }
  1011. }
  1012. return "";
  1013. }
  1014. var toSource_default = toSource;
  1015. // node_modules/lodash-es/_baseIsNative.js
  1016. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  1017. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1018. var funcProto2 = Function.prototype;
  1019. var objectProto3 = Object.prototype;
  1020. var funcToString2 = funcProto2.toString;
  1021. var hasOwnProperty2 = objectProto3.hasOwnProperty;
  1022. var reIsNative = RegExp(
  1023. "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  1024. );
  1025. function baseIsNative(value) {
  1026. if (!isObject_default(value) || isMasked_default(value)) {
  1027. return false;
  1028. }
  1029. var pattern4 = isFunction_default(value) ? reIsNative : reIsHostCtor;
  1030. return pattern4.test(toSource_default(value));
  1031. }
  1032. var baseIsNative_default = baseIsNative;
  1033. // node_modules/lodash-es/_getValue.js
  1034. function getValue(object4, key) {
  1035. return object4 == null ? void 0 : object4[key];
  1036. }
  1037. var getValue_default = getValue;
  1038. // node_modules/lodash-es/_getNative.js
  1039. function getNative(object4, key) {
  1040. var value = getValue_default(object4, key);
  1041. return baseIsNative_default(value) ? value : void 0;
  1042. }
  1043. var getNative_default = getNative;
  1044. // node_modules/lodash-es/_WeakMap.js
  1045. var WeakMap = getNative_default(root_default, "WeakMap");
  1046. var WeakMap_default = WeakMap;
  1047. // node_modules/lodash-es/_metaMap.js
  1048. var metaMap = WeakMap_default && new WeakMap_default();
  1049. var metaMap_default = metaMap;
  1050. // node_modules/lodash-es/_baseSetData.js
  1051. var baseSetData = !metaMap_default ? identity_default : function(func, data) {
  1052. metaMap_default.set(func, data);
  1053. return func;
  1054. };
  1055. var baseSetData_default = baseSetData;
  1056. // node_modules/lodash-es/_baseCreate.js
  1057. var objectCreate = Object.create;
  1058. var baseCreate = function() {
  1059. function object4() {
  1060. }
  1061. return function(proto) {
  1062. if (!isObject_default(proto)) {
  1063. return {};
  1064. }
  1065. if (objectCreate) {
  1066. return objectCreate(proto);
  1067. }
  1068. object4.prototype = proto;
  1069. var result2 = new object4();
  1070. object4.prototype = void 0;
  1071. return result2;
  1072. };
  1073. }();
  1074. var baseCreate_default = baseCreate;
  1075. // node_modules/lodash-es/_createCtor.js
  1076. function createCtor(Ctor) {
  1077. return function() {
  1078. var args = arguments;
  1079. switch (args.length) {
  1080. case 0:
  1081. return new Ctor();
  1082. case 1:
  1083. return new Ctor(args[0]);
  1084. case 2:
  1085. return new Ctor(args[0], args[1]);
  1086. case 3:
  1087. return new Ctor(args[0], args[1], args[2]);
  1088. case 4:
  1089. return new Ctor(args[0], args[1], args[2], args[3]);
  1090. case 5:
  1091. return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  1092. case 6:
  1093. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  1094. case 7:
  1095. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  1096. }
  1097. var thisBinding = baseCreate_default(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
  1098. return isObject_default(result2) ? result2 : thisBinding;
  1099. };
  1100. }
  1101. var createCtor_default = createCtor;
  1102. // node_modules/lodash-es/_createBind.js
  1103. var WRAP_BIND_FLAG = 1;
  1104. function createBind(func, bitmask, thisArg) {
  1105. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor_default(func);
  1106. function wrapper() {
  1107. var fn2 = this && this !== root_default && this instanceof wrapper ? Ctor : func;
  1108. return fn2.apply(isBind ? thisArg : this, arguments);
  1109. }
  1110. return wrapper;
  1111. }
  1112. var createBind_default = createBind;
  1113. // node_modules/lodash-es/_apply.js
  1114. function apply(func, thisArg, args) {
  1115. switch (args.length) {
  1116. case 0:
  1117. return func.call(thisArg);
  1118. case 1:
  1119. return func.call(thisArg, args[0]);
  1120. case 2:
  1121. return func.call(thisArg, args[0], args[1]);
  1122. case 3:
  1123. return func.call(thisArg, args[0], args[1], args[2]);
  1124. }
  1125. return func.apply(thisArg, args);
  1126. }
  1127. var apply_default = apply;
  1128. // node_modules/lodash-es/_composeArgs.js
  1129. var nativeMax = Math.max;
  1130. function composeArgs(args, partials, holders, isCurried) {
  1131. var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array(leftLength + rangeLength), isUncurried = !isCurried;
  1132. while (++leftIndex < leftLength) {
  1133. result2[leftIndex] = partials[leftIndex];
  1134. }
  1135. while (++argsIndex < holdersLength) {
  1136. if (isUncurried || argsIndex < argsLength) {
  1137. result2[holders[argsIndex]] = args[argsIndex];
  1138. }
  1139. }
  1140. while (rangeLength--) {
  1141. result2[leftIndex++] = args[argsIndex++];
  1142. }
  1143. return result2;
  1144. }
  1145. var composeArgs_default = composeArgs;
  1146. // node_modules/lodash-es/_composeArgsRight.js
  1147. var nativeMax2 = Math.max;
  1148. function composeArgsRight(args, partials, holders, isCurried) {
  1149. var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax2(argsLength - holdersLength, 0), result2 = Array(rangeLength + rightLength), isUncurried = !isCurried;
  1150. while (++argsIndex < rangeLength) {
  1151. result2[argsIndex] = args[argsIndex];
  1152. }
  1153. var offset2 = argsIndex;
  1154. while (++rightIndex < rightLength) {
  1155. result2[offset2 + rightIndex] = partials[rightIndex];
  1156. }
  1157. while (++holdersIndex < holdersLength) {
  1158. if (isUncurried || argsIndex < argsLength) {
  1159. result2[offset2 + holders[holdersIndex]] = args[argsIndex++];
  1160. }
  1161. }
  1162. return result2;
  1163. }
  1164. var composeArgsRight_default = composeArgsRight;
  1165. // node_modules/lodash-es/_countHolders.js
  1166. function countHolders(array4, placeholder) {
  1167. var length = array4.length, result2 = 0;
  1168. while (length--) {
  1169. if (array4[length] === placeholder) {
  1170. ++result2;
  1171. }
  1172. }
  1173. return result2;
  1174. }
  1175. var countHolders_default = countHolders;
  1176. // node_modules/lodash-es/_baseLodash.js
  1177. function baseLodash() {
  1178. }
  1179. var baseLodash_default = baseLodash;
  1180. // node_modules/lodash-es/_LazyWrapper.js
  1181. var MAX_ARRAY_LENGTH = 4294967295;
  1182. function LazyWrapper(value) {
  1183. this.__wrapped__ = value;
  1184. this.__actions__ = [];
  1185. this.__dir__ = 1;
  1186. this.__filtered__ = false;
  1187. this.__iteratees__ = [];
  1188. this.__takeCount__ = MAX_ARRAY_LENGTH;
  1189. this.__views__ = [];
  1190. }
  1191. LazyWrapper.prototype = baseCreate_default(baseLodash_default.prototype);
  1192. LazyWrapper.prototype.constructor = LazyWrapper;
  1193. var LazyWrapper_default = LazyWrapper;
  1194. // node_modules/lodash-es/noop.js
  1195. function noop() {
  1196. }
  1197. var noop_default = noop;
  1198. // node_modules/lodash-es/_getData.js
  1199. var getData = !metaMap_default ? noop_default : function(func) {
  1200. return metaMap_default.get(func);
  1201. };
  1202. var getData_default = getData;
  1203. // node_modules/lodash-es/_realNames.js
  1204. var realNames = {};
  1205. var realNames_default = realNames;
  1206. // node_modules/lodash-es/_getFuncName.js
  1207. var objectProto4 = Object.prototype;
  1208. var hasOwnProperty3 = objectProto4.hasOwnProperty;
  1209. function getFuncName(func) {
  1210. var result2 = func.name + "", array4 = realNames_default[result2], length = hasOwnProperty3.call(realNames_default, result2) ? array4.length : 0;
  1211. while (length--) {
  1212. var data = array4[length], otherFunc = data.func;
  1213. if (otherFunc == null || otherFunc == func) {
  1214. return data.name;
  1215. }
  1216. }
  1217. return result2;
  1218. }
  1219. var getFuncName_default = getFuncName;
  1220. // node_modules/lodash-es/_LodashWrapper.js
  1221. function LodashWrapper(value, chainAll) {
  1222. this.__wrapped__ = value;
  1223. this.__actions__ = [];
  1224. this.__chain__ = !!chainAll;
  1225. this.__index__ = 0;
  1226. this.__values__ = void 0;
  1227. }
  1228. LodashWrapper.prototype = baseCreate_default(baseLodash_default.prototype);
  1229. LodashWrapper.prototype.constructor = LodashWrapper;
  1230. var LodashWrapper_default = LodashWrapper;
  1231. // node_modules/lodash-es/_copyArray.js
  1232. function copyArray(source, array4) {
  1233. var index = -1, length = source.length;
  1234. array4 || (array4 = Array(length));
  1235. while (++index < length) {
  1236. array4[index] = source[index];
  1237. }
  1238. return array4;
  1239. }
  1240. var copyArray_default = copyArray;
  1241. // node_modules/lodash-es/_wrapperClone.js
  1242. function wrapperClone(wrapper) {
  1243. if (wrapper instanceof LazyWrapper_default) {
  1244. return wrapper.clone();
  1245. }
  1246. var result2 = new LodashWrapper_default(wrapper.__wrapped__, wrapper.__chain__);
  1247. result2.__actions__ = copyArray_default(wrapper.__actions__);
  1248. result2.__index__ = wrapper.__index__;
  1249. result2.__values__ = wrapper.__values__;
  1250. return result2;
  1251. }
  1252. var wrapperClone_default = wrapperClone;
  1253. // node_modules/lodash-es/wrapperLodash.js
  1254. var objectProto5 = Object.prototype;
  1255. var hasOwnProperty4 = objectProto5.hasOwnProperty;
  1256. function lodash(value) {
  1257. if (isObjectLike_default(value) && !isArray_default(value) && !(value instanceof LazyWrapper_default)) {
  1258. if (value instanceof LodashWrapper_default) {
  1259. return value;
  1260. }
  1261. if (hasOwnProperty4.call(value, "__wrapped__")) {
  1262. return wrapperClone_default(value);
  1263. }
  1264. }
  1265. return new LodashWrapper_default(value);
  1266. }
  1267. lodash.prototype = baseLodash_default.prototype;
  1268. lodash.prototype.constructor = lodash;
  1269. var wrapperLodash_default = lodash;
  1270. // node_modules/lodash-es/_isLaziable.js
  1271. function isLaziable(func) {
  1272. var funcName = getFuncName_default(func), other = wrapperLodash_default[funcName];
  1273. if (typeof other != "function" || !(funcName in LazyWrapper_default.prototype)) {
  1274. return false;
  1275. }
  1276. if (func === other) {
  1277. return true;
  1278. }
  1279. var data = getData_default(other);
  1280. return !!data && func === data[0];
  1281. }
  1282. var isLaziable_default = isLaziable;
  1283. // node_modules/lodash-es/_shortOut.js
  1284. var HOT_COUNT = 800;
  1285. var HOT_SPAN = 16;
  1286. var nativeNow = Date.now;
  1287. function shortOut(func) {
  1288. var count = 0, lastCalled = 0;
  1289. return function() {
  1290. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  1291. lastCalled = stamp;
  1292. if (remaining > 0) {
  1293. if (++count >= HOT_COUNT) {
  1294. return arguments[0];
  1295. }
  1296. } else {
  1297. count = 0;
  1298. }
  1299. return func.apply(void 0, arguments);
  1300. };
  1301. }
  1302. var shortOut_default = shortOut;
  1303. // node_modules/lodash-es/_setData.js
  1304. var setData = shortOut_default(baseSetData_default);
  1305. var setData_default = setData;
  1306. // node_modules/lodash-es/_getWrapDetails.js
  1307. var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/;
  1308. var reSplitDetails = /,? & /;
  1309. function getWrapDetails(source) {
  1310. var match = source.match(reWrapDetails);
  1311. return match ? match[1].split(reSplitDetails) : [];
  1312. }
  1313. var getWrapDetails_default = getWrapDetails;
  1314. // node_modules/lodash-es/_insertWrapDetails.js
  1315. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;
  1316. function insertWrapDetails(source, details) {
  1317. var length = details.length;
  1318. if (!length) {
  1319. return source;
  1320. }
  1321. var lastIndex = length - 1;
  1322. details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
  1323. details = details.join(length > 2 ? ", " : " ");
  1324. return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
  1325. }
  1326. var insertWrapDetails_default = insertWrapDetails;
  1327. // node_modules/lodash-es/constant.js
  1328. function constant(value) {
  1329. return function() {
  1330. return value;
  1331. };
  1332. }
  1333. var constant_default = constant;
  1334. // node_modules/lodash-es/_defineProperty.js
  1335. var defineProperty = function() {
  1336. try {
  1337. var func = getNative_default(Object, "defineProperty");
  1338. func({}, "", {});
  1339. return func;
  1340. } catch (e) {
  1341. }
  1342. }();
  1343. var defineProperty_default = defineProperty;
  1344. // node_modules/lodash-es/_baseSetToString.js
  1345. var baseSetToString = !defineProperty_default ? identity_default : function(func, string3) {
  1346. return defineProperty_default(func, "toString", {
  1347. "configurable": true,
  1348. "enumerable": false,
  1349. "value": constant_default(string3),
  1350. "writable": true
  1351. });
  1352. };
  1353. var baseSetToString_default = baseSetToString;
  1354. // node_modules/lodash-es/_setToString.js
  1355. var setToString = shortOut_default(baseSetToString_default);
  1356. var setToString_default = setToString;
  1357. // node_modules/lodash-es/_arrayEach.js
  1358. function arrayEach(array4, iteratee2) {
  1359. var index = -1, length = array4 == null ? 0 : array4.length;
  1360. while (++index < length) {
  1361. if (iteratee2(array4[index], index, array4) === false) {
  1362. break;
  1363. }
  1364. }
  1365. return array4;
  1366. }
  1367. var arrayEach_default = arrayEach;
  1368. // node_modules/lodash-es/_baseFindIndex.js
  1369. function baseFindIndex(array4, predicate, fromIndex, fromRight) {
  1370. var length = array4.length, index = fromIndex + (fromRight ? 1 : -1);
  1371. while (fromRight ? index-- : ++index < length) {
  1372. if (predicate(array4[index], index, array4)) {
  1373. return index;
  1374. }
  1375. }
  1376. return -1;
  1377. }
  1378. var baseFindIndex_default = baseFindIndex;
  1379. // node_modules/lodash-es/_baseIsNaN.js
  1380. function baseIsNaN(value) {
  1381. return value !== value;
  1382. }
  1383. var baseIsNaN_default = baseIsNaN;
  1384. // node_modules/lodash-es/_strictIndexOf.js
  1385. function strictIndexOf(array4, value, fromIndex) {
  1386. var index = fromIndex - 1, length = array4.length;
  1387. while (++index < length) {
  1388. if (array4[index] === value) {
  1389. return index;
  1390. }
  1391. }
  1392. return -1;
  1393. }
  1394. var strictIndexOf_default = strictIndexOf;
  1395. // node_modules/lodash-es/_baseIndexOf.js
  1396. function baseIndexOf(array4, value, fromIndex) {
  1397. return value === value ? strictIndexOf_default(array4, value, fromIndex) : baseFindIndex_default(array4, baseIsNaN_default, fromIndex);
  1398. }
  1399. var baseIndexOf_default = baseIndexOf;
  1400. // node_modules/lodash-es/_arrayIncludes.js
  1401. function arrayIncludes(array4, value) {
  1402. var length = array4 == null ? 0 : array4.length;
  1403. return !!length && baseIndexOf_default(array4, value, 0) > -1;
  1404. }
  1405. var arrayIncludes_default = arrayIncludes;
  1406. // node_modules/lodash-es/_updateWrapDetails.js
  1407. var WRAP_BIND_FLAG2 = 1;
  1408. var WRAP_BIND_KEY_FLAG = 2;
  1409. var WRAP_CURRY_FLAG = 8;
  1410. var WRAP_CURRY_RIGHT_FLAG = 16;
  1411. var WRAP_PARTIAL_FLAG = 32;
  1412. var WRAP_PARTIAL_RIGHT_FLAG = 64;
  1413. var WRAP_ARY_FLAG = 128;
  1414. var WRAP_REARG_FLAG = 256;
  1415. var WRAP_FLIP_FLAG = 512;
  1416. var wrapFlags = [
  1417. ["ary", WRAP_ARY_FLAG],
  1418. ["bind", WRAP_BIND_FLAG2],
  1419. ["bindKey", WRAP_BIND_KEY_FLAG],
  1420. ["curry", WRAP_CURRY_FLAG],
  1421. ["curryRight", WRAP_CURRY_RIGHT_FLAG],
  1422. ["flip", WRAP_FLIP_FLAG],
  1423. ["partial", WRAP_PARTIAL_FLAG],
  1424. ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
  1425. ["rearg", WRAP_REARG_FLAG]
  1426. ];
  1427. function updateWrapDetails(details, bitmask) {
  1428. arrayEach_default(wrapFlags, function(pair) {
  1429. var value = "_." + pair[0];
  1430. if (bitmask & pair[1] && !arrayIncludes_default(details, value)) {
  1431. details.push(value);
  1432. }
  1433. });
  1434. return details.sort();
  1435. }
  1436. var updateWrapDetails_default = updateWrapDetails;
  1437. // node_modules/lodash-es/_setWrapToString.js
  1438. function setWrapToString(wrapper, reference, bitmask) {
  1439. var source = reference + "";
  1440. return setToString_default(wrapper, insertWrapDetails_default(source, updateWrapDetails_default(getWrapDetails_default(source), bitmask)));
  1441. }
  1442. var setWrapToString_default = setWrapToString;
  1443. // node_modules/lodash-es/_createRecurry.js
  1444. var WRAP_BIND_FLAG3 = 1;
  1445. var WRAP_BIND_KEY_FLAG2 = 2;
  1446. var WRAP_CURRY_BOUND_FLAG = 4;
  1447. var WRAP_CURRY_FLAG2 = 8;
  1448. var WRAP_PARTIAL_FLAG2 = 32;
  1449. var WRAP_PARTIAL_RIGHT_FLAG2 = 64;
  1450. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
  1451. var isCurry = bitmask & WRAP_CURRY_FLAG2, newHolders = isCurry ? holders : void 0, newHoldersRight = isCurry ? void 0 : holders, newPartials = isCurry ? partials : void 0, newPartialsRight = isCurry ? void 0 : partials;
  1452. bitmask |= isCurry ? WRAP_PARTIAL_FLAG2 : WRAP_PARTIAL_RIGHT_FLAG2;
  1453. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG2 : WRAP_PARTIAL_FLAG2);
  1454. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  1455. bitmask &= ~(WRAP_BIND_FLAG3 | WRAP_BIND_KEY_FLAG2);
  1456. }
  1457. var newData = [
  1458. func,
  1459. bitmask,
  1460. thisArg,
  1461. newPartials,
  1462. newHolders,
  1463. newPartialsRight,
  1464. newHoldersRight,
  1465. argPos,
  1466. ary2,
  1467. arity
  1468. ];
  1469. var result2 = wrapFunc.apply(void 0, newData);
  1470. if (isLaziable_default(func)) {
  1471. setData_default(result2, newData);
  1472. }
  1473. result2.placeholder = placeholder;
  1474. return setWrapToString_default(result2, func, bitmask);
  1475. }
  1476. var createRecurry_default = createRecurry;
  1477. // node_modules/lodash-es/_getHolder.js
  1478. function getHolder(func) {
  1479. var object4 = func;
  1480. return object4.placeholder;
  1481. }
  1482. var getHolder_default = getHolder;
  1483. // node_modules/lodash-es/_isIndex.js
  1484. var MAX_SAFE_INTEGER = 9007199254740991;
  1485. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1486. function isIndex(value, length) {
  1487. var type4 = typeof value;
  1488. length = length == null ? MAX_SAFE_INTEGER : length;
  1489. return !!length && (type4 == "number" || type4 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  1490. }
  1491. var isIndex_default = isIndex;
  1492. // node_modules/lodash-es/_reorder.js
  1493. var nativeMin = Math.min;
  1494. function reorder(array4, indexes) {
  1495. var arrLength = array4.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray_default(array4);
  1496. while (length--) {
  1497. var index = indexes[length];
  1498. array4[length] = isIndex_default(index, arrLength) ? oldArray[index] : void 0;
  1499. }
  1500. return array4;
  1501. }
  1502. var reorder_default = reorder;
  1503. // node_modules/lodash-es/_replaceHolders.js
  1504. var PLACEHOLDER = "__lodash_placeholder__";
  1505. function replaceHolders(array4, placeholder) {
  1506. var index = -1, length = array4.length, resIndex = 0, result2 = [];
  1507. while (++index < length) {
  1508. var value = array4[index];
  1509. if (value === placeholder || value === PLACEHOLDER) {
  1510. array4[index] = PLACEHOLDER;
  1511. result2[resIndex++] = index;
  1512. }
  1513. }
  1514. return result2;
  1515. }
  1516. var replaceHolders_default = replaceHolders;
  1517. // node_modules/lodash-es/_createHybrid.js
  1518. var WRAP_BIND_FLAG4 = 1;
  1519. var WRAP_BIND_KEY_FLAG3 = 2;
  1520. var WRAP_CURRY_FLAG3 = 8;
  1521. var WRAP_CURRY_RIGHT_FLAG2 = 16;
  1522. var WRAP_ARY_FLAG2 = 128;
  1523. var WRAP_FLIP_FLAG2 = 512;
  1524. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
  1525. var isAry = bitmask & WRAP_ARY_FLAG2, isBind = bitmask & WRAP_BIND_FLAG4, isBindKey = bitmask & WRAP_BIND_KEY_FLAG3, isCurried = bitmask & (WRAP_CURRY_FLAG3 | WRAP_CURRY_RIGHT_FLAG2), isFlip = bitmask & WRAP_FLIP_FLAG2, Ctor = isBindKey ? void 0 : createCtor_default(func);
  1526. function wrapper() {
  1527. var length = arguments.length, args = Array(length), index = length;
  1528. while (index--) {
  1529. args[index] = arguments[index];
  1530. }
  1531. if (isCurried) {
  1532. var placeholder = getHolder_default(wrapper), holdersCount = countHolders_default(args, placeholder);
  1533. }
  1534. if (partials) {
  1535. args = composeArgs_default(args, partials, holders, isCurried);
  1536. }
  1537. if (partialsRight) {
  1538. args = composeArgsRight_default(args, partialsRight, holdersRight, isCurried);
  1539. }
  1540. length -= holdersCount;
  1541. if (isCurried && length < arity) {
  1542. var newHolders = replaceHolders_default(args, placeholder);
  1543. return createRecurry_default(
  1544. func,
  1545. bitmask,
  1546. createHybrid,
  1547. wrapper.placeholder,
  1548. thisArg,
  1549. args,
  1550. newHolders,
  1551. argPos,
  1552. ary2,
  1553. arity - length
  1554. );
  1555. }
  1556. var thisBinding = isBind ? thisArg : this, fn2 = isBindKey ? thisBinding[func] : func;
  1557. length = args.length;
  1558. if (argPos) {
  1559. args = reorder_default(args, argPos);
  1560. } else if (isFlip && length > 1) {
  1561. args.reverse();
  1562. }
  1563. if (isAry && ary2 < length) {
  1564. args.length = ary2;
  1565. }
  1566. if (this && this !== root_default && this instanceof wrapper) {
  1567. fn2 = Ctor || createCtor_default(fn2);
  1568. }
  1569. return fn2.apply(thisBinding, args);
  1570. }
  1571. return wrapper;
  1572. }
  1573. var createHybrid_default = createHybrid;
  1574. // node_modules/lodash-es/_createCurry.js
  1575. function createCurry(func, bitmask, arity) {
  1576. var Ctor = createCtor_default(func);
  1577. function wrapper() {
  1578. var length = arguments.length, args = Array(length), index = length, placeholder = getHolder_default(wrapper);
  1579. while (index--) {
  1580. args[index] = arguments[index];
  1581. }
  1582. var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders_default(args, placeholder);
  1583. length -= holders.length;
  1584. if (length < arity) {
  1585. return createRecurry_default(
  1586. func,
  1587. bitmask,
  1588. createHybrid_default,
  1589. wrapper.placeholder,
  1590. void 0,
  1591. args,
  1592. holders,
  1593. void 0,
  1594. void 0,
  1595. arity - length
  1596. );
  1597. }
  1598. var fn2 = this && this !== root_default && this instanceof wrapper ? Ctor : func;
  1599. return apply_default(fn2, this, args);
  1600. }
  1601. return wrapper;
  1602. }
  1603. var createCurry_default = createCurry;
  1604. // node_modules/lodash-es/_createPartial.js
  1605. var WRAP_BIND_FLAG5 = 1;
  1606. function createPartial(func, bitmask, thisArg, partials) {
  1607. var isBind = bitmask & WRAP_BIND_FLAG5, Ctor = createCtor_default(func);
  1608. function wrapper() {
  1609. var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn2 = this && this !== root_default && this instanceof wrapper ? Ctor : func;
  1610. while (++leftIndex < leftLength) {
  1611. args[leftIndex] = partials[leftIndex];
  1612. }
  1613. while (argsLength--) {
  1614. args[leftIndex++] = arguments[++argsIndex];
  1615. }
  1616. return apply_default(fn2, isBind ? thisArg : this, args);
  1617. }
  1618. return wrapper;
  1619. }
  1620. var createPartial_default = createPartial;
  1621. // node_modules/lodash-es/_mergeData.js
  1622. var PLACEHOLDER2 = "__lodash_placeholder__";
  1623. var WRAP_BIND_FLAG6 = 1;
  1624. var WRAP_BIND_KEY_FLAG4 = 2;
  1625. var WRAP_CURRY_BOUND_FLAG2 = 4;
  1626. var WRAP_CURRY_FLAG4 = 8;
  1627. var WRAP_ARY_FLAG3 = 128;
  1628. var WRAP_REARG_FLAG2 = 256;
  1629. var nativeMin2 = Math.min;
  1630. function mergeData(data, source) {
  1631. var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG6 | WRAP_BIND_KEY_FLAG4 | WRAP_ARY_FLAG3);
  1632. var isCombo = srcBitmask == WRAP_ARY_FLAG3 && bitmask == WRAP_CURRY_FLAG4 || srcBitmask == WRAP_ARY_FLAG3 && bitmask == WRAP_REARG_FLAG2 && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG3 | WRAP_REARG_FLAG2) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG4;
  1633. if (!(isCommon || isCombo)) {
  1634. return data;
  1635. }
  1636. if (srcBitmask & WRAP_BIND_FLAG6) {
  1637. data[2] = source[2];
  1638. newBitmask |= bitmask & WRAP_BIND_FLAG6 ? 0 : WRAP_CURRY_BOUND_FLAG2;
  1639. }
  1640. var value = source[3];
  1641. if (value) {
  1642. var partials = data[3];
  1643. data[3] = partials ? composeArgs_default(partials, value, source[4]) : value;
  1644. data[4] = partials ? replaceHolders_default(data[3], PLACEHOLDER2) : source[4];
  1645. }
  1646. value = source[5];
  1647. if (value) {
  1648. partials = data[5];
  1649. data[5] = partials ? composeArgsRight_default(partials, value, source[6]) : value;
  1650. data[6] = partials ? replaceHolders_default(data[5], PLACEHOLDER2) : source[6];
  1651. }
  1652. value = source[7];
  1653. if (value) {
  1654. data[7] = value;
  1655. }
  1656. if (srcBitmask & WRAP_ARY_FLAG3) {
  1657. data[8] = data[8] == null ? source[8] : nativeMin2(data[8], source[8]);
  1658. }
  1659. if (data[9] == null) {
  1660. data[9] = source[9];
  1661. }
  1662. data[0] = source[0];
  1663. data[1] = newBitmask;
  1664. return data;
  1665. }
  1666. var mergeData_default = mergeData;
  1667. // node_modules/lodash-es/_createWrap.js
  1668. var FUNC_ERROR_TEXT2 = "Expected a function";
  1669. var WRAP_BIND_FLAG7 = 1;
  1670. var WRAP_BIND_KEY_FLAG5 = 2;
  1671. var WRAP_CURRY_FLAG5 = 8;
  1672. var WRAP_CURRY_RIGHT_FLAG3 = 16;
  1673. var WRAP_PARTIAL_FLAG3 = 32;
  1674. var WRAP_PARTIAL_RIGHT_FLAG3 = 64;
  1675. var nativeMax3 = Math.max;
  1676. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
  1677. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG5;
  1678. if (!isBindKey && typeof func != "function") {
  1679. throw new TypeError(FUNC_ERROR_TEXT2);
  1680. }
  1681. var length = partials ? partials.length : 0;
  1682. if (!length) {
  1683. bitmask &= ~(WRAP_PARTIAL_FLAG3 | WRAP_PARTIAL_RIGHT_FLAG3);
  1684. partials = holders = void 0;
  1685. }
  1686. ary2 = ary2 === void 0 ? ary2 : nativeMax3(toInteger_default(ary2), 0);
  1687. arity = arity === void 0 ? arity : toInteger_default(arity);
  1688. length -= holders ? holders.length : 0;
  1689. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG3) {
  1690. var partialsRight = partials, holdersRight = holders;
  1691. partials = holders = void 0;
  1692. }
  1693. var data = isBindKey ? void 0 : getData_default(func);
  1694. var newData = [
  1695. func,
  1696. bitmask,
  1697. thisArg,
  1698. partials,
  1699. holders,
  1700. partialsRight,
  1701. holdersRight,
  1702. argPos,
  1703. ary2,
  1704. arity
  1705. ];
  1706. if (data) {
  1707. mergeData_default(newData, data);
  1708. }
  1709. func = newData[0];
  1710. bitmask = newData[1];
  1711. thisArg = newData[2];
  1712. partials = newData[3];
  1713. holders = newData[4];
  1714. arity = newData[9] = newData[9] === void 0 ? isBindKey ? 0 : func.length : nativeMax3(newData[9] - length, 0);
  1715. if (!arity && bitmask & (WRAP_CURRY_FLAG5 | WRAP_CURRY_RIGHT_FLAG3)) {
  1716. bitmask &= ~(WRAP_CURRY_FLAG5 | WRAP_CURRY_RIGHT_FLAG3);
  1717. }
  1718. if (!bitmask || bitmask == WRAP_BIND_FLAG7) {
  1719. var result2 = createBind_default(func, bitmask, thisArg);
  1720. } else if (bitmask == WRAP_CURRY_FLAG5 || bitmask == WRAP_CURRY_RIGHT_FLAG3) {
  1721. result2 = createCurry_default(func, bitmask, arity);
  1722. } else if ((bitmask == WRAP_PARTIAL_FLAG3 || bitmask == (WRAP_BIND_FLAG7 | WRAP_PARTIAL_FLAG3)) && !holders.length) {
  1723. result2 = createPartial_default(func, bitmask, thisArg, partials);
  1724. } else {
  1725. result2 = createHybrid_default.apply(void 0, newData);
  1726. }
  1727. var setter = data ? baseSetData_default : setData_default;
  1728. return setWrapToString_default(setter(result2, newData), func, bitmask);
  1729. }
  1730. var createWrap_default = createWrap;
  1731. // node_modules/lodash-es/ary.js
  1732. var WRAP_ARY_FLAG4 = 128;
  1733. function ary(func, n, guard) {
  1734. n = guard ? void 0 : n;
  1735. n = func && n == null ? func.length : n;
  1736. return createWrap_default(func, WRAP_ARY_FLAG4, void 0, void 0, void 0, void 0, n);
  1737. }
  1738. var ary_default = ary;
  1739. // node_modules/lodash-es/_baseAssignValue.js
  1740. function baseAssignValue(object4, key, value) {
  1741. if (key == "__proto__" && defineProperty_default) {
  1742. defineProperty_default(object4, key, {
  1743. "configurable": true,
  1744. "enumerable": true,
  1745. "value": value,
  1746. "writable": true
  1747. });
  1748. } else {
  1749. object4[key] = value;
  1750. }
  1751. }
  1752. var baseAssignValue_default = baseAssignValue;
  1753. // node_modules/lodash-es/eq.js
  1754. function eq(value, other) {
  1755. return value === other || value !== value && other !== other;
  1756. }
  1757. var eq_default = eq;
  1758. // node_modules/lodash-es/_assignValue.js
  1759. var objectProto6 = Object.prototype;
  1760. var hasOwnProperty5 = objectProto6.hasOwnProperty;
  1761. function assignValue(object4, key, value) {
  1762. var objValue = object4[key];
  1763. if (!(hasOwnProperty5.call(object4, key) && eq_default(objValue, value)) || value === void 0 && !(key in object4)) {
  1764. baseAssignValue_default(object4, key, value);
  1765. }
  1766. }
  1767. var assignValue_default = assignValue;
  1768. // node_modules/lodash-es/_copyObject.js
  1769. function copyObject(source, props, object4, customizer) {
  1770. var isNew = !object4;
  1771. object4 || (object4 = {});
  1772. var index = -1, length = props.length;
  1773. while (++index < length) {
  1774. var key = props[index];
  1775. var newValue = customizer ? customizer(object4[key], source[key], key, object4, source) : void 0;
  1776. if (newValue === void 0) {
  1777. newValue = source[key];
  1778. }
  1779. if (isNew) {
  1780. baseAssignValue_default(object4, key, newValue);
  1781. } else {
  1782. assignValue_default(object4, key, newValue);
  1783. }
  1784. }
  1785. return object4;
  1786. }
  1787. var copyObject_default = copyObject;
  1788. // node_modules/lodash-es/_overRest.js
  1789. var nativeMax4 = Math.max;
  1790. function overRest(func, start, transform2) {
  1791. start = nativeMax4(start === void 0 ? func.length - 1 : start, 0);
  1792. return function() {
  1793. var args = arguments, index = -1, length = nativeMax4(args.length - start, 0), array4 = Array(length);
  1794. while (++index < length) {
  1795. array4[index] = args[start + index];
  1796. }
  1797. index = -1;
  1798. var otherArgs = Array(start + 1);
  1799. while (++index < start) {
  1800. otherArgs[index] = args[index];
  1801. }
  1802. otherArgs[start] = transform2(array4);
  1803. return apply_default(func, this, otherArgs);
  1804. };
  1805. }
  1806. var overRest_default = overRest;
  1807. // node_modules/lodash-es/_baseRest.js
  1808. function baseRest(func, start) {
  1809. return setToString_default(overRest_default(func, start, identity_default), func + "");
  1810. }
  1811. var baseRest_default = baseRest;
  1812. // node_modules/lodash-es/isLength.js
  1813. var MAX_SAFE_INTEGER2 = 9007199254740991;
  1814. function isLength(value) {
  1815. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
  1816. }
  1817. var isLength_default = isLength;
  1818. // node_modules/lodash-es/isArrayLike.js
  1819. function isArrayLike(value) {
  1820. return value != null && isLength_default(value.length) && !isFunction_default(value);
  1821. }
  1822. var isArrayLike_default = isArrayLike;
  1823. // node_modules/lodash-es/_isIterateeCall.js
  1824. function isIterateeCall(value, index, object4) {
  1825. if (!isObject_default(object4)) {
  1826. return false;
  1827. }
  1828. var type4 = typeof index;
  1829. if (type4 == "number" ? isArrayLike_default(object4) && isIndex_default(index, object4.length) : type4 == "string" && index in object4) {
  1830. return eq_default(object4[index], value);
  1831. }
  1832. return false;
  1833. }
  1834. var isIterateeCall_default = isIterateeCall;
  1835. // node_modules/lodash-es/_createAssigner.js
  1836. function createAssigner(assigner) {
  1837. return baseRest_default(function(object4, sources) {
  1838. var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
  1839. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
  1840. if (guard && isIterateeCall_default(sources[0], sources[1], guard)) {
  1841. customizer = length < 3 ? void 0 : customizer;
  1842. length = 1;
  1843. }
  1844. object4 = Object(object4);
  1845. while (++index < length) {
  1846. var source = sources[index];
  1847. if (source) {
  1848. assigner(object4, source, index, customizer);
  1849. }
  1850. }
  1851. return object4;
  1852. });
  1853. }
  1854. var createAssigner_default = createAssigner;
  1855. // node_modules/lodash-es/_isPrototype.js
  1856. var objectProto7 = Object.prototype;
  1857. function isPrototype(value) {
  1858. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto7;
  1859. return value === proto;
  1860. }
  1861. var isPrototype_default = isPrototype;
  1862. // node_modules/lodash-es/_baseTimes.js
  1863. function baseTimes(n, iteratee2) {
  1864. var index = -1, result2 = Array(n);
  1865. while (++index < n) {
  1866. result2[index] = iteratee2(index);
  1867. }
  1868. return result2;
  1869. }
  1870. var baseTimes_default = baseTimes;
  1871. // node_modules/lodash-es/_baseIsArguments.js
  1872. var argsTag = "[object Arguments]";
  1873. function baseIsArguments(value) {
  1874. return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
  1875. }
  1876. var baseIsArguments_default = baseIsArguments;
  1877. // node_modules/lodash-es/isArguments.js
  1878. var objectProto8 = Object.prototype;
  1879. var hasOwnProperty6 = objectProto8.hasOwnProperty;
  1880. var propertyIsEnumerable = objectProto8.propertyIsEnumerable;
  1881. var isArguments = baseIsArguments_default(function() {
  1882. return arguments;
  1883. }()) ? baseIsArguments_default : function(value) {
  1884. return isObjectLike_default(value) && hasOwnProperty6.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  1885. };
  1886. var isArguments_default = isArguments;
  1887. // node_modules/lodash-es/stubFalse.js
  1888. function stubFalse() {
  1889. return false;
  1890. }
  1891. var stubFalse_default = stubFalse;
  1892. // node_modules/lodash-es/isBuffer.js
  1893. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  1894. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  1895. var moduleExports = freeModule && freeModule.exports === freeExports;
  1896. var Buffer = moduleExports ? root_default.Buffer : void 0;
  1897. var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
  1898. var isBuffer = nativeIsBuffer || stubFalse_default;
  1899. var isBuffer_default = isBuffer;
  1900. // node_modules/lodash-es/_baseIsTypedArray.js
  1901. var argsTag2 = "[object Arguments]";
  1902. var arrayTag = "[object Array]";
  1903. var boolTag = "[object Boolean]";
  1904. var dateTag = "[object Date]";
  1905. var errorTag = "[object Error]";
  1906. var funcTag2 = "[object Function]";
  1907. var mapTag = "[object Map]";
  1908. var numberTag = "[object Number]";
  1909. var objectTag = "[object Object]";
  1910. var regexpTag = "[object RegExp]";
  1911. var setTag = "[object Set]";
  1912. var stringTag = "[object String]";
  1913. var weakMapTag = "[object WeakMap]";
  1914. var arrayBufferTag = "[object ArrayBuffer]";
  1915. var dataViewTag = "[object DataView]";
  1916. var float32Tag = "[object Float32Array]";
  1917. var float64Tag = "[object Float64Array]";
  1918. var int8Tag = "[object Int8Array]";
  1919. var int16Tag = "[object Int16Array]";
  1920. var int32Tag = "[object Int32Array]";
  1921. var uint8Tag = "[object Uint8Array]";
  1922. var uint8ClampedTag = "[object Uint8ClampedArray]";
  1923. var uint16Tag = "[object Uint16Array]";
  1924. var uint32Tag = "[object Uint32Array]";
  1925. var typedArrayTags = {};
  1926. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  1927. typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  1928. function baseIsTypedArray(value) {
  1929. return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
  1930. }
  1931. var baseIsTypedArray_default = baseIsTypedArray;
  1932. // node_modules/lodash-es/_baseUnary.js
  1933. function baseUnary(func) {
  1934. return function(value) {
  1935. return func(value);
  1936. };
  1937. }
  1938. var baseUnary_default = baseUnary;
  1939. // node_modules/lodash-es/_nodeUtil.js
  1940. var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
  1941. var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
  1942. var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
  1943. var freeProcess = moduleExports2 && freeGlobal_default.process;
  1944. var nodeUtil = function() {
  1945. try {
  1946. var types2 = freeModule2 && freeModule2.require && freeModule2.require("util").types;
  1947. if (types2) {
  1948. return types2;
  1949. }
  1950. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  1951. } catch (e) {
  1952. }
  1953. }();
  1954. var nodeUtil_default = nodeUtil;
  1955. // node_modules/lodash-es/isTypedArray.js
  1956. var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
  1957. var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
  1958. var isTypedArray_default = isTypedArray;
  1959. // node_modules/lodash-es/_arrayLikeKeys.js
  1960. var objectProto9 = Object.prototype;
  1961. var hasOwnProperty7 = objectProto9.hasOwnProperty;
  1962. function arrayLikeKeys(value, inherited) {
  1963. var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes_default(value.length, String) : [], length = result2.length;
  1964. for (var key in value) {
  1965. if ((inherited || hasOwnProperty7.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex_default(key, length)))) {
  1966. result2.push(key);
  1967. }
  1968. }
  1969. return result2;
  1970. }
  1971. var arrayLikeKeys_default = arrayLikeKeys;
  1972. // node_modules/lodash-es/_overArg.js
  1973. function overArg(func, transform2) {
  1974. return function(arg) {
  1975. return func(transform2(arg));
  1976. };
  1977. }
  1978. var overArg_default = overArg;
  1979. // node_modules/lodash-es/_nativeKeys.js
  1980. var nativeKeys = overArg_default(Object.keys, Object);
  1981. var nativeKeys_default = nativeKeys;
  1982. // node_modules/lodash-es/_baseKeys.js
  1983. var objectProto10 = Object.prototype;
  1984. var hasOwnProperty8 = objectProto10.hasOwnProperty;
  1985. function baseKeys(object4) {
  1986. if (!isPrototype_default(object4)) {
  1987. return nativeKeys_default(object4);
  1988. }
  1989. var result2 = [];
  1990. for (var key in Object(object4)) {
  1991. if (hasOwnProperty8.call(object4, key) && key != "constructor") {
  1992. result2.push(key);
  1993. }
  1994. }
  1995. return result2;
  1996. }
  1997. var baseKeys_default = baseKeys;
  1998. // node_modules/lodash-es/keys.js
  1999. function keys(object4) {
  2000. return isArrayLike_default(object4) ? arrayLikeKeys_default(object4) : baseKeys_default(object4);
  2001. }
  2002. var keys_default = keys;
  2003. // node_modules/lodash-es/assign.js
  2004. var objectProto11 = Object.prototype;
  2005. var hasOwnProperty9 = objectProto11.hasOwnProperty;
  2006. var assign = createAssigner_default(function(object4, source) {
  2007. if (isPrototype_default(source) || isArrayLike_default(source)) {
  2008. copyObject_default(source, keys_default(source), object4);
  2009. return;
  2010. }
  2011. for (var key in source) {
  2012. if (hasOwnProperty9.call(source, key)) {
  2013. assignValue_default(object4, key, source[key]);
  2014. }
  2015. }
  2016. });
  2017. var assign_default = assign;
  2018. // node_modules/lodash-es/_nativeKeysIn.js
  2019. function nativeKeysIn(object4) {
  2020. var result2 = [];
  2021. if (object4 != null) {
  2022. for (var key in Object(object4)) {
  2023. result2.push(key);
  2024. }
  2025. }
  2026. return result2;
  2027. }
  2028. var nativeKeysIn_default = nativeKeysIn;
  2029. // node_modules/lodash-es/_baseKeysIn.js
  2030. var objectProto12 = Object.prototype;
  2031. var hasOwnProperty10 = objectProto12.hasOwnProperty;
  2032. function baseKeysIn(object4) {
  2033. if (!isObject_default(object4)) {
  2034. return nativeKeysIn_default(object4);
  2035. }
  2036. var isProto = isPrototype_default(object4), result2 = [];
  2037. for (var key in object4) {
  2038. if (!(key == "constructor" && (isProto || !hasOwnProperty10.call(object4, key)))) {
  2039. result2.push(key);
  2040. }
  2041. }
  2042. return result2;
  2043. }
  2044. var baseKeysIn_default = baseKeysIn;
  2045. // node_modules/lodash-es/keysIn.js
  2046. function keysIn(object4) {
  2047. return isArrayLike_default(object4) ? arrayLikeKeys_default(object4, true) : baseKeysIn_default(object4);
  2048. }
  2049. var keysIn_default = keysIn;
  2050. // node_modules/lodash-es/assignIn.js
  2051. var assignIn = createAssigner_default(function(object4, source) {
  2052. copyObject_default(source, keysIn_default(source), object4);
  2053. });
  2054. var assignIn_default = assignIn;
  2055. // node_modules/lodash-es/assignInWith.js
  2056. var assignInWith = createAssigner_default(function(object4, source, srcIndex, customizer) {
  2057. copyObject_default(source, keysIn_default(source), object4, customizer);
  2058. });
  2059. var assignInWith_default = assignInWith;
  2060. // node_modules/lodash-es/assignWith.js
  2061. var assignWith = createAssigner_default(function(object4, source, srcIndex, customizer) {
  2062. copyObject_default(source, keys_default(source), object4, customizer);
  2063. });
  2064. var assignWith_default = assignWith;
  2065. // node_modules/lodash-es/_isKey.js
  2066. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
  2067. var reIsPlainProp = /^\w*$/;
  2068. function isKey(value, object4) {
  2069. if (isArray_default(value)) {
  2070. return false;
  2071. }
  2072. var type4 = typeof value;
  2073. if (type4 == "number" || type4 == "symbol" || type4 == "boolean" || value == null || isSymbol_default(value)) {
  2074. return true;
  2075. }
  2076. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object4 != null && value in Object(object4);
  2077. }
  2078. var isKey_default = isKey;
  2079. // node_modules/lodash-es/_nativeCreate.js
  2080. var nativeCreate = getNative_default(Object, "create");
  2081. var nativeCreate_default = nativeCreate;
  2082. // node_modules/lodash-es/_hashClear.js
  2083. function hashClear() {
  2084. this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
  2085. this.size = 0;
  2086. }
  2087. var hashClear_default = hashClear;
  2088. // node_modules/lodash-es/_hashDelete.js
  2089. function hashDelete(key) {
  2090. var result2 = this.has(key) && delete this.__data__[key];
  2091. this.size -= result2 ? 1 : 0;
  2092. return result2;
  2093. }
  2094. var hashDelete_default = hashDelete;
  2095. // node_modules/lodash-es/_hashGet.js
  2096. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  2097. var objectProto13 = Object.prototype;
  2098. var hasOwnProperty11 = objectProto13.hasOwnProperty;
  2099. function hashGet(key) {
  2100. var data = this.__data__;
  2101. if (nativeCreate_default) {
  2102. var result2 = data[key];
  2103. return result2 === HASH_UNDEFINED ? void 0 : result2;
  2104. }
  2105. return hasOwnProperty11.call(data, key) ? data[key] : void 0;
  2106. }
  2107. var hashGet_default = hashGet;
  2108. // node_modules/lodash-es/_hashHas.js
  2109. var objectProto14 = Object.prototype;
  2110. var hasOwnProperty12 = objectProto14.hasOwnProperty;
  2111. function hashHas(key) {
  2112. var data = this.__data__;
  2113. return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty12.call(data, key);
  2114. }
  2115. var hashHas_default = hashHas;
  2116. // node_modules/lodash-es/_hashSet.js
  2117. var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
  2118. function hashSet(key, value) {
  2119. var data = this.__data__;
  2120. this.size += this.has(key) ? 0 : 1;
  2121. data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
  2122. return this;
  2123. }
  2124. var hashSet_default = hashSet;
  2125. // node_modules/lodash-es/_Hash.js
  2126. function Hash(entries) {
  2127. var index = -1, length = entries == null ? 0 : entries.length;
  2128. this.clear();
  2129. while (++index < length) {
  2130. var entry = entries[index];
  2131. this.set(entry[0], entry[1]);
  2132. }
  2133. }
  2134. Hash.prototype.clear = hashClear_default;
  2135. Hash.prototype["delete"] = hashDelete_default;
  2136. Hash.prototype.get = hashGet_default;
  2137. Hash.prototype.has = hashHas_default;
  2138. Hash.prototype.set = hashSet_default;
  2139. var Hash_default = Hash;
  2140. // node_modules/lodash-es/_listCacheClear.js
  2141. function listCacheClear() {
  2142. this.__data__ = [];
  2143. this.size = 0;
  2144. }
  2145. var listCacheClear_default = listCacheClear;
  2146. // node_modules/lodash-es/_assocIndexOf.js
  2147. function assocIndexOf(array4, key) {
  2148. var length = array4.length;
  2149. while (length--) {
  2150. if (eq_default(array4[length][0], key)) {
  2151. return length;
  2152. }
  2153. }
  2154. return -1;
  2155. }
  2156. var assocIndexOf_default = assocIndexOf;
  2157. // node_modules/lodash-es/_listCacheDelete.js
  2158. var arrayProto = Array.prototype;
  2159. var splice = arrayProto.splice;
  2160. function listCacheDelete(key) {
  2161. var data = this.__data__, index = assocIndexOf_default(data, key);
  2162. if (index < 0) {
  2163. return false;
  2164. }
  2165. var lastIndex = data.length - 1;
  2166. if (index == lastIndex) {
  2167. data.pop();
  2168. } else {
  2169. splice.call(data, index, 1);
  2170. }
  2171. --this.size;
  2172. return true;
  2173. }
  2174. var listCacheDelete_default = listCacheDelete;
  2175. // node_modules/lodash-es/_listCacheGet.js
  2176. function listCacheGet(key) {
  2177. var data = this.__data__, index = assocIndexOf_default(data, key);
  2178. return index < 0 ? void 0 : data[index][1];
  2179. }
  2180. var listCacheGet_default = listCacheGet;
  2181. // node_modules/lodash-es/_listCacheHas.js
  2182. function listCacheHas(key) {
  2183. return assocIndexOf_default(this.__data__, key) > -1;
  2184. }
  2185. var listCacheHas_default = listCacheHas;
  2186. // node_modules/lodash-es/_listCacheSet.js
  2187. function listCacheSet(key, value) {
  2188. var data = this.__data__, index = assocIndexOf_default(data, key);
  2189. if (index < 0) {
  2190. ++this.size;
  2191. data.push([key, value]);
  2192. } else {
  2193. data[index][1] = value;
  2194. }
  2195. return this;
  2196. }
  2197. var listCacheSet_default = listCacheSet;
  2198. // node_modules/lodash-es/_ListCache.js
  2199. function ListCache(entries) {
  2200. var index = -1, length = entries == null ? 0 : entries.length;
  2201. this.clear();
  2202. while (++index < length) {
  2203. var entry = entries[index];
  2204. this.set(entry[0], entry[1]);
  2205. }
  2206. }
  2207. ListCache.prototype.clear = listCacheClear_default;
  2208. ListCache.prototype["delete"] = listCacheDelete_default;
  2209. ListCache.prototype.get = listCacheGet_default;
  2210. ListCache.prototype.has = listCacheHas_default;
  2211. ListCache.prototype.set = listCacheSet_default;
  2212. var ListCache_default = ListCache;
  2213. // node_modules/lodash-es/_Map.js
  2214. var Map2 = getNative_default(root_default, "Map");
  2215. var Map_default = Map2;
  2216. // node_modules/lodash-es/_mapCacheClear.js
  2217. function mapCacheClear() {
  2218. this.size = 0;
  2219. this.__data__ = {
  2220. "hash": new Hash_default(),
  2221. "map": new (Map_default || ListCache_default)(),
  2222. "string": new Hash_default()
  2223. };
  2224. }
  2225. var mapCacheClear_default = mapCacheClear;
  2226. // node_modules/lodash-es/_isKeyable.js
  2227. function isKeyable(value) {
  2228. var type4 = typeof value;
  2229. return type4 == "string" || type4 == "number" || type4 == "symbol" || type4 == "boolean" ? value !== "__proto__" : value === null;
  2230. }
  2231. var isKeyable_default = isKeyable;
  2232. // node_modules/lodash-es/_getMapData.js
  2233. function getMapData(map2, key) {
  2234. var data = map2.__data__;
  2235. return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  2236. }
  2237. var getMapData_default = getMapData;
  2238. // node_modules/lodash-es/_mapCacheDelete.js
  2239. function mapCacheDelete(key) {
  2240. var result2 = getMapData_default(this, key)["delete"](key);
  2241. this.size -= result2 ? 1 : 0;
  2242. return result2;
  2243. }
  2244. var mapCacheDelete_default = mapCacheDelete;
  2245. // node_modules/lodash-es/_mapCacheGet.js
  2246. function mapCacheGet(key) {
  2247. return getMapData_default(this, key).get(key);
  2248. }
  2249. var mapCacheGet_default = mapCacheGet;
  2250. // node_modules/lodash-es/_mapCacheHas.js
  2251. function mapCacheHas(key) {
  2252. return getMapData_default(this, key).has(key);
  2253. }
  2254. var mapCacheHas_default = mapCacheHas;
  2255. // node_modules/lodash-es/_mapCacheSet.js
  2256. function mapCacheSet(key, value) {
  2257. var data = getMapData_default(this, key), size3 = data.size;
  2258. data.set(key, value);
  2259. this.size += data.size == size3 ? 0 : 1;
  2260. return this;
  2261. }
  2262. var mapCacheSet_default = mapCacheSet;
  2263. // node_modules/lodash-es/_MapCache.js
  2264. function MapCache(entries) {
  2265. var index = -1, length = entries == null ? 0 : entries.length;
  2266. this.clear();
  2267. while (++index < length) {
  2268. var entry = entries[index];
  2269. this.set(entry[0], entry[1]);
  2270. }
  2271. }
  2272. MapCache.prototype.clear = mapCacheClear_default;
  2273. MapCache.prototype["delete"] = mapCacheDelete_default;
  2274. MapCache.prototype.get = mapCacheGet_default;
  2275. MapCache.prototype.has = mapCacheHas_default;
  2276. MapCache.prototype.set = mapCacheSet_default;
  2277. var MapCache_default = MapCache;
  2278. // node_modules/lodash-es/memoize.js
  2279. var FUNC_ERROR_TEXT3 = "Expected a function";
  2280. function memoize(func, resolver) {
  2281. if (typeof func != "function" || resolver != null && typeof resolver != "function") {
  2282. throw new TypeError(FUNC_ERROR_TEXT3);
  2283. }
  2284. var memoized = function() {
  2285. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache;
  2286. if (cache2.has(key)) {
  2287. return cache2.get(key);
  2288. }
  2289. var result2 = func.apply(this, args);
  2290. memoized.cache = cache2.set(key, result2) || cache2;
  2291. return result2;
  2292. };
  2293. memoized.cache = new (memoize.Cache || MapCache_default)();
  2294. return memoized;
  2295. }
  2296. memoize.Cache = MapCache_default;
  2297. var memoize_default = memoize;
  2298. // node_modules/lodash-es/_memoizeCapped.js
  2299. var MAX_MEMOIZE_SIZE = 500;
  2300. function memoizeCapped(func) {
  2301. var result2 = memoize_default(func, function(key) {
  2302. if (cache2.size === MAX_MEMOIZE_SIZE) {
  2303. cache2.clear();
  2304. }
  2305. return key;
  2306. });
  2307. var cache2 = result2.cache;
  2308. return result2;
  2309. }
  2310. var memoizeCapped_default = memoizeCapped;
  2311. // node_modules/lodash-es/_stringToPath.js
  2312. var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  2313. var reEscapeChar = /\\(\\)?/g;
  2314. var stringToPath = memoizeCapped_default(function(string3) {
  2315. var result2 = [];
  2316. if (string3.charCodeAt(0) === 46) {
  2317. result2.push("");
  2318. }
  2319. string3.replace(rePropName, function(match, number4, quote, subString) {
  2320. result2.push(quote ? subString.replace(reEscapeChar, "$1") : number4 || match);
  2321. });
  2322. return result2;
  2323. });
  2324. var stringToPath_default = stringToPath;
  2325. // node_modules/lodash-es/toString.js
  2326. function toString(value) {
  2327. return value == null ? "" : baseToString_default(value);
  2328. }
  2329. var toString_default = toString;
  2330. // node_modules/lodash-es/_castPath.js
  2331. function castPath(value, object4) {
  2332. if (isArray_default(value)) {
  2333. return value;
  2334. }
  2335. return isKey_default(value, object4) ? [value] : stringToPath_default(toString_default(value));
  2336. }
  2337. var castPath_default = castPath;
  2338. // node_modules/lodash-es/_toKey.js
  2339. var INFINITY3 = 1 / 0;
  2340. function toKey(value) {
  2341. if (typeof value == "string" || isSymbol_default(value)) {
  2342. return value;
  2343. }
  2344. var result2 = value + "";
  2345. return result2 == "0" && 1 / value == -INFINITY3 ? "-0" : result2;
  2346. }
  2347. var toKey_default = toKey;
  2348. // node_modules/lodash-es/_baseGet.js
  2349. function baseGet(object4, path) {
  2350. path = castPath_default(path, object4);
  2351. var index = 0, length = path.length;
  2352. while (object4 != null && index < length) {
  2353. object4 = object4[toKey_default(path[index++])];
  2354. }
  2355. return index && index == length ? object4 : void 0;
  2356. }
  2357. var baseGet_default = baseGet;
  2358. // node_modules/lodash-es/get.js
  2359. function get(object4, path, defaultValue) {
  2360. var result2 = object4 == null ? void 0 : baseGet_default(object4, path);
  2361. return result2 === void 0 ? defaultValue : result2;
  2362. }
  2363. var get_default = get;
  2364. // node_modules/lodash-es/_baseAt.js
  2365. function baseAt(object4, paths) {
  2366. var index = -1, length = paths.length, result2 = Array(length), skip = object4 == null;
  2367. while (++index < length) {
  2368. result2[index] = skip ? void 0 : get_default(object4, paths[index]);
  2369. }
  2370. return result2;
  2371. }
  2372. var baseAt_default = baseAt;
  2373. // node_modules/lodash-es/_arrayPush.js
  2374. function arrayPush(array4, values2) {
  2375. var index = -1, length = values2.length, offset2 = array4.length;
  2376. while (++index < length) {
  2377. array4[offset2 + index] = values2[index];
  2378. }
  2379. return array4;
  2380. }
  2381. var arrayPush_default = arrayPush;
  2382. // node_modules/lodash-es/_isFlattenable.js
  2383. var spreadableSymbol = Symbol_default ? Symbol_default.isConcatSpreadable : void 0;
  2384. function isFlattenable(value) {
  2385. return isArray_default(value) || isArguments_default(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  2386. }
  2387. var isFlattenable_default = isFlattenable;
  2388. // node_modules/lodash-es/_baseFlatten.js
  2389. function baseFlatten(array4, depth, predicate, isStrict, result2) {
  2390. var index = -1, length = array4.length;
  2391. predicate || (predicate = isFlattenable_default);
  2392. result2 || (result2 = []);
  2393. while (++index < length) {
  2394. var value = array4[index];
  2395. if (depth > 0 && predicate(value)) {
  2396. if (depth > 1) {
  2397. baseFlatten(value, depth - 1, predicate, isStrict, result2);
  2398. } else {
  2399. arrayPush_default(result2, value);
  2400. }
  2401. } else if (!isStrict) {
  2402. result2[result2.length] = value;
  2403. }
  2404. }
  2405. return result2;
  2406. }
  2407. var baseFlatten_default = baseFlatten;
  2408. // node_modules/lodash-es/flatten.js
  2409. function flatten(array4) {
  2410. var length = array4 == null ? 0 : array4.length;
  2411. return length ? baseFlatten_default(array4, 1) : [];
  2412. }
  2413. var flatten_default = flatten;
  2414. // node_modules/lodash-es/_flatRest.js
  2415. function flatRest(func) {
  2416. return setToString_default(overRest_default(func, void 0, flatten_default), func + "");
  2417. }
  2418. var flatRest_default = flatRest;
  2419. // node_modules/lodash-es/at.js
  2420. var at = flatRest_default(baseAt_default);
  2421. var at_default = at;
  2422. // node_modules/lodash-es/_getPrototype.js
  2423. var getPrototype = overArg_default(Object.getPrototypeOf, Object);
  2424. var getPrototype_default = getPrototype;
  2425. // node_modules/lodash-es/isPlainObject.js
  2426. var objectTag2 = "[object Object]";
  2427. var funcProto3 = Function.prototype;
  2428. var objectProto15 = Object.prototype;
  2429. var funcToString3 = funcProto3.toString;
  2430. var hasOwnProperty13 = objectProto15.hasOwnProperty;
  2431. var objectCtorString = funcToString3.call(Object);
  2432. function isPlainObject(value) {
  2433. if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag2) {
  2434. return false;
  2435. }
  2436. var proto = getPrototype_default(value);
  2437. if (proto === null) {
  2438. return true;
  2439. }
  2440. var Ctor = hasOwnProperty13.call(proto, "constructor") && proto.constructor;
  2441. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
  2442. }
  2443. var isPlainObject_default = isPlainObject;
  2444. // node_modules/lodash-es/isError.js
  2445. var domExcTag = "[object DOMException]";
  2446. var errorTag2 = "[object Error]";
  2447. function isError(value) {
  2448. if (!isObjectLike_default(value)) {
  2449. return false;
  2450. }
  2451. var tag = baseGetTag_default(value);
  2452. return tag == errorTag2 || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject_default(value);
  2453. }
  2454. var isError_default = isError;
  2455. // node_modules/lodash-es/attempt.js
  2456. var attempt = baseRest_default(function(func, args) {
  2457. try {
  2458. return apply_default(func, void 0, args);
  2459. } catch (e) {
  2460. return isError_default(e) ? e : new Error(e);
  2461. }
  2462. });
  2463. var attempt_default = attempt;
  2464. // node_modules/lodash-es/before.js
  2465. var FUNC_ERROR_TEXT4 = "Expected a function";
  2466. function before(n, func) {
  2467. var result2;
  2468. if (typeof func != "function") {
  2469. throw new TypeError(FUNC_ERROR_TEXT4);
  2470. }
  2471. n = toInteger_default(n);
  2472. return function() {
  2473. if (--n > 0) {
  2474. result2 = func.apply(this, arguments);
  2475. }
  2476. if (n <= 1) {
  2477. func = void 0;
  2478. }
  2479. return result2;
  2480. };
  2481. }
  2482. var before_default = before;
  2483. // node_modules/lodash-es/bind.js
  2484. var WRAP_BIND_FLAG8 = 1;
  2485. var WRAP_PARTIAL_FLAG4 = 32;
  2486. var bind = baseRest_default(function(func, thisArg, partials) {
  2487. var bitmask = WRAP_BIND_FLAG8;
  2488. if (partials.length) {
  2489. var holders = replaceHolders_default(partials, getHolder_default(bind));
  2490. bitmask |= WRAP_PARTIAL_FLAG4;
  2491. }
  2492. return createWrap_default(func, bitmask, thisArg, partials, holders);
  2493. });
  2494. bind.placeholder = {};
  2495. var bind_default = bind;
  2496. // node_modules/lodash-es/bindAll.js
  2497. var bindAll = flatRest_default(function(object4, methodNames) {
  2498. arrayEach_default(methodNames, function(key) {
  2499. key = toKey_default(key);
  2500. baseAssignValue_default(object4, key, bind_default(object4[key], object4));
  2501. });
  2502. return object4;
  2503. });
  2504. var bindAll_default = bindAll;
  2505. // node_modules/lodash-es/bindKey.js
  2506. var WRAP_BIND_FLAG9 = 1;
  2507. var WRAP_BIND_KEY_FLAG6 = 2;
  2508. var WRAP_PARTIAL_FLAG5 = 32;
  2509. var bindKey = baseRest_default(function(object4, key, partials) {
  2510. var bitmask = WRAP_BIND_FLAG9 | WRAP_BIND_KEY_FLAG6;
  2511. if (partials.length) {
  2512. var holders = replaceHolders_default(partials, getHolder_default(bindKey));
  2513. bitmask |= WRAP_PARTIAL_FLAG5;
  2514. }
  2515. return createWrap_default(key, bitmask, object4, partials, holders);
  2516. });
  2517. bindKey.placeholder = {};
  2518. var bindKey_default = bindKey;
  2519. // node_modules/lodash-es/_baseSlice.js
  2520. function baseSlice(array4, start, end2) {
  2521. var index = -1, length = array4.length;
  2522. if (start < 0) {
  2523. start = -start > length ? 0 : length + start;
  2524. }
  2525. end2 = end2 > length ? length : end2;
  2526. if (end2 < 0) {
  2527. end2 += length;
  2528. }
  2529. length = start > end2 ? 0 : end2 - start >>> 0;
  2530. start >>>= 0;
  2531. var result2 = Array(length);
  2532. while (++index < length) {
  2533. result2[index] = array4[index + start];
  2534. }
  2535. return result2;
  2536. }
  2537. var baseSlice_default = baseSlice;
  2538. // node_modules/lodash-es/_castSlice.js
  2539. function castSlice(array4, start, end2) {
  2540. var length = array4.length;
  2541. end2 = end2 === void 0 ? length : end2;
  2542. return !start && end2 >= length ? array4 : baseSlice_default(array4, start, end2);
  2543. }
  2544. var castSlice_default = castSlice;
  2545. // node_modules/lodash-es/_hasUnicode.js
  2546. var rsAstralRange = "\\ud800-\\udfff";
  2547. var rsComboMarksRange = "\\u0300-\\u036f";
  2548. var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
  2549. var rsComboSymbolsRange = "\\u20d0-\\u20ff";
  2550. var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
  2551. var rsVarRange = "\\ufe0e\\ufe0f";
  2552. var rsZWJ = "\\u200d";
  2553. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
  2554. function hasUnicode(string3) {
  2555. return reHasUnicode.test(string3);
  2556. }
  2557. var hasUnicode_default = hasUnicode;
  2558. // node_modules/lodash-es/_asciiToArray.js
  2559. function asciiToArray(string3) {
  2560. return string3.split("");
  2561. }
  2562. var asciiToArray_default = asciiToArray;
  2563. // node_modules/lodash-es/_unicodeToArray.js
  2564. var rsAstralRange2 = "\\ud800-\\udfff";
  2565. var rsComboMarksRange2 = "\\u0300-\\u036f";
  2566. var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f";
  2567. var rsComboSymbolsRange2 = "\\u20d0-\\u20ff";
  2568. var rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
  2569. var rsVarRange2 = "\\ufe0e\\ufe0f";
  2570. var rsAstral = "[" + rsAstralRange2 + "]";
  2571. var rsCombo = "[" + rsComboRange2 + "]";
  2572. var rsFitz = "\\ud83c[\\udffb-\\udfff]";
  2573. var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
  2574. var rsNonAstral = "[^" + rsAstralRange2 + "]";
  2575. var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
  2576. var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
  2577. var rsZWJ2 = "\\u200d";
  2578. var reOptMod = rsModifier + "?";
  2579. var rsOptVar = "[" + rsVarRange2 + "]?";
  2580. var rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
  2581. var rsSeq = rsOptVar + reOptMod + rsOptJoin;
  2582. var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
  2583. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  2584. function unicodeToArray(string3) {
  2585. return string3.match(reUnicode) || [];
  2586. }
  2587. var unicodeToArray_default = unicodeToArray;
  2588. // node_modules/lodash-es/_stringToArray.js
  2589. function stringToArray(string3) {
  2590. return hasUnicode_default(string3) ? unicodeToArray_default(string3) : asciiToArray_default(string3);
  2591. }
  2592. var stringToArray_default = stringToArray;
  2593. // node_modules/lodash-es/_createCaseFirst.js
  2594. function createCaseFirst(methodName) {
  2595. return function(string3) {
  2596. string3 = toString_default(string3);
  2597. var strSymbols = hasUnicode_default(string3) ? stringToArray_default(string3) : void 0;
  2598. var chr = strSymbols ? strSymbols[0] : string3.charAt(0);
  2599. var trailing = strSymbols ? castSlice_default(strSymbols, 1).join("") : string3.slice(1);
  2600. return chr[methodName]() + trailing;
  2601. };
  2602. }
  2603. var createCaseFirst_default = createCaseFirst;
  2604. // node_modules/lodash-es/upperFirst.js
  2605. var upperFirst = createCaseFirst_default("toUpperCase");
  2606. var upperFirst_default = upperFirst;
  2607. // node_modules/lodash-es/capitalize.js
  2608. function capitalize2(string3) {
  2609. return upperFirst_default(toString_default(string3).toLowerCase());
  2610. }
  2611. var capitalize_default = capitalize2;
  2612. // node_modules/lodash-es/_arrayReduce.js
  2613. function arrayReduce(array4, iteratee2, accumulator, initAccum) {
  2614. var index = -1, length = array4 == null ? 0 : array4.length;
  2615. if (initAccum && length) {
  2616. accumulator = array4[++index];
  2617. }
  2618. while (++index < length) {
  2619. accumulator = iteratee2(accumulator, array4[index], index, array4);
  2620. }
  2621. return accumulator;
  2622. }
  2623. var arrayReduce_default = arrayReduce;
  2624. // node_modules/lodash-es/_basePropertyOf.js
  2625. function basePropertyOf(object4) {
  2626. return function(key) {
  2627. return object4 == null ? void 0 : object4[key];
  2628. };
  2629. }
  2630. var basePropertyOf_default = basePropertyOf;
  2631. // node_modules/lodash-es/_deburrLetter.js
  2632. var deburredLetters = {
  2633. "\xC0": "A",
  2634. "\xC1": "A",
  2635. "\xC2": "A",
  2636. "\xC3": "A",
  2637. "\xC4": "A",
  2638. "\xC5": "A",
  2639. "\xE0": "a",
  2640. "\xE1": "a",
  2641. "\xE2": "a",
  2642. "\xE3": "a",
  2643. "\xE4": "a",
  2644. "\xE5": "a",
  2645. "\xC7": "C",
  2646. "\xE7": "c",
  2647. "\xD0": "D",
  2648. "\xF0": "d",
  2649. "\xC8": "E",
  2650. "\xC9": "E",
  2651. "\xCA": "E",
  2652. "\xCB": "E",
  2653. "\xE8": "e",
  2654. "\xE9": "e",
  2655. "\xEA": "e",
  2656. "\xEB": "e",
  2657. "\xCC": "I",
  2658. "\xCD": "I",
  2659. "\xCE": "I",
  2660. "\xCF": "I",
  2661. "\xEC": "i",
  2662. "\xED": "i",
  2663. "\xEE": "i",
  2664. "\xEF": "i",
  2665. "\xD1": "N",
  2666. "\xF1": "n",
  2667. "\xD2": "O",
  2668. "\xD3": "O",
  2669. "\xD4": "O",
  2670. "\xD5": "O",
  2671. "\xD6": "O",
  2672. "\xD8": "O",
  2673. "\xF2": "o",
  2674. "\xF3": "o",
  2675. "\xF4": "o",
  2676. "\xF5": "o",
  2677. "\xF6": "o",
  2678. "\xF8": "o",
  2679. "\xD9": "U",
  2680. "\xDA": "U",
  2681. "\xDB": "U",
  2682. "\xDC": "U",
  2683. "\xF9": "u",
  2684. "\xFA": "u",
  2685. "\xFB": "u",
  2686. "\xFC": "u",
  2687. "\xDD": "Y",
  2688. "\xFD": "y",
  2689. "\xFF": "y",
  2690. "\xC6": "Ae",
  2691. "\xE6": "ae",
  2692. "\xDE": "Th",
  2693. "\xFE": "th",
  2694. "\xDF": "ss",
  2695. "\u0100": "A",
  2696. "\u0102": "A",
  2697. "\u0104": "A",
  2698. "\u0101": "a",
  2699. "\u0103": "a",
  2700. "\u0105": "a",
  2701. "\u0106": "C",
  2702. "\u0108": "C",
  2703. "\u010A": "C",
  2704. "\u010C": "C",
  2705. "\u0107": "c",
  2706. "\u0109": "c",
  2707. "\u010B": "c",
  2708. "\u010D": "c",
  2709. "\u010E": "D",
  2710. "\u0110": "D",
  2711. "\u010F": "d",
  2712. "\u0111": "d",
  2713. "\u0112": "E",
  2714. "\u0114": "E",
  2715. "\u0116": "E",
  2716. "\u0118": "E",
  2717. "\u011A": "E",
  2718. "\u0113": "e",
  2719. "\u0115": "e",
  2720. "\u0117": "e",
  2721. "\u0119": "e",
  2722. "\u011B": "e",
  2723. "\u011C": "G",
  2724. "\u011E": "G",
  2725. "\u0120": "G",
  2726. "\u0122": "G",
  2727. "\u011D": "g",
  2728. "\u011F": "g",
  2729. "\u0121": "g",
  2730. "\u0123": "g",
  2731. "\u0124": "H",
  2732. "\u0126": "H",
  2733. "\u0125": "h",
  2734. "\u0127": "h",
  2735. "\u0128": "I",
  2736. "\u012A": "I",
  2737. "\u012C": "I",
  2738. "\u012E": "I",
  2739. "\u0130": "I",
  2740. "\u0129": "i",
  2741. "\u012B": "i",
  2742. "\u012D": "i",
  2743. "\u012F": "i",
  2744. "\u0131": "i",
  2745. "\u0134": "J",
  2746. "\u0135": "j",
  2747. "\u0136": "K",
  2748. "\u0137": "k",
  2749. "\u0138": "k",
  2750. "\u0139": "L",
  2751. "\u013B": "L",
  2752. "\u013D": "L",
  2753. "\u013F": "L",
  2754. "\u0141": "L",
  2755. "\u013A": "l",
  2756. "\u013C": "l",
  2757. "\u013E": "l",
  2758. "\u0140": "l",
  2759. "\u0142": "l",
  2760. "\u0143": "N",
  2761. "\u0145": "N",
  2762. "\u0147": "N",
  2763. "\u014A": "N",
  2764. "\u0144": "n",
  2765. "\u0146": "n",
  2766. "\u0148": "n",
  2767. "\u014B": "n",
  2768. "\u014C": "O",
  2769. "\u014E": "O",
  2770. "\u0150": "O",
  2771. "\u014D": "o",
  2772. "\u014F": "o",
  2773. "\u0151": "o",
  2774. "\u0154": "R",
  2775. "\u0156": "R",
  2776. "\u0158": "R",
  2777. "\u0155": "r",
  2778. "\u0157": "r",
  2779. "\u0159": "r",
  2780. "\u015A": "S",
  2781. "\u015C": "S",
  2782. "\u015E": "S",
  2783. "\u0160": "S",
  2784. "\u015B": "s",
  2785. "\u015D": "s",
  2786. "\u015F": "s",
  2787. "\u0161": "s",
  2788. "\u0162": "T",
  2789. "\u0164": "T",
  2790. "\u0166": "T",
  2791. "\u0163": "t",
  2792. "\u0165": "t",
  2793. "\u0167": "t",
  2794. "\u0168": "U",
  2795. "\u016A": "U",
  2796. "\u016C": "U",
  2797. "\u016E": "U",
  2798. "\u0170": "U",
  2799. "\u0172": "U",
  2800. "\u0169": "u",
  2801. "\u016B": "u",
  2802. "\u016D": "u",
  2803. "\u016F": "u",
  2804. "\u0171": "u",
  2805. "\u0173": "u",
  2806. "\u0174": "W",
  2807. "\u0175": "w",
  2808. "\u0176": "Y",
  2809. "\u0177": "y",
  2810. "\u0178": "Y",
  2811. "\u0179": "Z",
  2812. "\u017B": "Z",
  2813. "\u017D": "Z",
  2814. "\u017A": "z",
  2815. "\u017C": "z",
  2816. "\u017E": "z",
  2817. "\u0132": "IJ",
  2818. "\u0133": "ij",
  2819. "\u0152": "Oe",
  2820. "\u0153": "oe",
  2821. "\u0149": "'n",
  2822. "\u017F": "s"
  2823. };
  2824. var deburrLetter = basePropertyOf_default(deburredLetters);
  2825. var deburrLetter_default = deburrLetter;
  2826. // node_modules/lodash-es/deburr.js
  2827. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  2828. var rsComboMarksRange3 = "\\u0300-\\u036f";
  2829. var reComboHalfMarksRange3 = "\\ufe20-\\ufe2f";
  2830. var rsComboSymbolsRange3 = "\\u20d0-\\u20ff";
  2831. var rsComboRange3 = rsComboMarksRange3 + reComboHalfMarksRange3 + rsComboSymbolsRange3;
  2832. var rsCombo2 = "[" + rsComboRange3 + "]";
  2833. var reComboMark = RegExp(rsCombo2, "g");
  2834. function deburr(string3) {
  2835. string3 = toString_default(string3);
  2836. return string3 && string3.replace(reLatin, deburrLetter_default).replace(reComboMark, "");
  2837. }
  2838. var deburr_default = deburr;
  2839. // node_modules/lodash-es/_asciiWords.js
  2840. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  2841. function asciiWords(string3) {
  2842. return string3.match(reAsciiWord) || [];
  2843. }
  2844. var asciiWords_default = asciiWords;
  2845. // node_modules/lodash-es/_hasUnicodeWord.js
  2846. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  2847. function hasUnicodeWord(string3) {
  2848. return reHasUnicodeWord.test(string3);
  2849. }
  2850. var hasUnicodeWord_default = hasUnicodeWord;
  2851. // node_modules/lodash-es/_unicodeWords.js
  2852. var rsAstralRange3 = "\\ud800-\\udfff";
  2853. var rsComboMarksRange4 = "\\u0300-\\u036f";
  2854. var reComboHalfMarksRange4 = "\\ufe20-\\ufe2f";
  2855. var rsComboSymbolsRange4 = "\\u20d0-\\u20ff";
  2856. var rsComboRange4 = rsComboMarksRange4 + reComboHalfMarksRange4 + rsComboSymbolsRange4;
  2857. var rsDingbatRange = "\\u2700-\\u27bf";
  2858. var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
  2859. var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
  2860. var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
  2861. var rsPunctuationRange = "\\u2000-\\u206f";
  2862. var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
  2863. var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
  2864. var rsVarRange3 = "\\ufe0e\\ufe0f";
  2865. var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  2866. var rsApos = "['\u2019]";
  2867. var rsBreak = "[" + rsBreakRange + "]";
  2868. var rsCombo3 = "[" + rsComboRange4 + "]";
  2869. var rsDigits = "\\d+";
  2870. var rsDingbat = "[" + rsDingbatRange + "]";
  2871. var rsLower = "[" + rsLowerRange + "]";
  2872. var rsMisc = "[^" + rsAstralRange3 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
  2873. var rsFitz2 = "\\ud83c[\\udffb-\\udfff]";
  2874. var rsModifier2 = "(?:" + rsCombo3 + "|" + rsFitz2 + ")";
  2875. var rsNonAstral2 = "[^" + rsAstralRange3 + "]";
  2876. var rsRegional2 = "(?:\\ud83c[\\udde6-\\uddff]){2}";
  2877. var rsSurrPair2 = "[\\ud800-\\udbff][\\udc00-\\udfff]";
  2878. var rsUpper = "[" + rsUpperRange + "]";
  2879. var rsZWJ3 = "\\u200d";
  2880. var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
  2881. var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
  2882. var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
  2883. var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
  2884. var reOptMod2 = rsModifier2 + "?";
  2885. var rsOptVar2 = "[" + rsVarRange3 + "]?";
  2886. var rsOptJoin2 = "(?:" + rsZWJ3 + "(?:" + [rsNonAstral2, rsRegional2, rsSurrPair2].join("|") + ")" + rsOptVar2 + reOptMod2 + ")*";
  2887. var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
  2888. var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
  2889. var rsSeq2 = rsOptVar2 + reOptMod2 + rsOptJoin2;
  2890. var rsEmoji = "(?:" + [rsDingbat, rsRegional2, rsSurrPair2].join("|") + ")" + rsSeq2;
  2891. var reUnicodeWord = RegExp([
  2892. rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
  2893. rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
  2894. rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
  2895. rsUpper + "+" + rsOptContrUpper,
  2896. rsOrdUpper,
  2897. rsOrdLower,
  2898. rsDigits,
  2899. rsEmoji
  2900. ].join("|"), "g");
  2901. function unicodeWords(string3) {
  2902. return string3.match(reUnicodeWord) || [];
  2903. }
  2904. var unicodeWords_default = unicodeWords;
  2905. // node_modules/lodash-es/words.js
  2906. function words(string3, pattern4, guard) {
  2907. string3 = toString_default(string3);
  2908. pattern4 = guard ? void 0 : pattern4;
  2909. if (pattern4 === void 0) {
  2910. return hasUnicodeWord_default(string3) ? unicodeWords_default(string3) : asciiWords_default(string3);
  2911. }
  2912. return string3.match(pattern4) || [];
  2913. }
  2914. var words_default = words;
  2915. // node_modules/lodash-es/_createCompounder.js
  2916. var rsApos2 = "['\u2019]";
  2917. var reApos = RegExp(rsApos2, "g");
  2918. function createCompounder(callback) {
  2919. return function(string3) {
  2920. return arrayReduce_default(words_default(deburr_default(string3).replace(reApos, "")), callback, "");
  2921. };
  2922. }
  2923. var createCompounder_default = createCompounder;
  2924. // node_modules/lodash-es/camelCase.js
  2925. var camelCase = createCompounder_default(function(result2, word, index) {
  2926. word = word.toLowerCase();
  2927. return result2 + (index ? capitalize_default(word) : word);
  2928. });
  2929. var camelCase_default = camelCase;
  2930. // node_modules/lodash-es/castArray.js
  2931. function castArray() {
  2932. if (!arguments.length) {
  2933. return [];
  2934. }
  2935. var value = arguments[0];
  2936. return isArray_default(value) ? value : [value];
  2937. }
  2938. var castArray_default = castArray;
  2939. // node_modules/lodash-es/_createRound.js
  2940. var nativeIsFinite = root_default.isFinite;
  2941. var nativeMin3 = Math.min;
  2942. function createRound(methodName) {
  2943. var func = Math[methodName];
  2944. return function(number4, precision) {
  2945. number4 = toNumber_default(number4);
  2946. precision = precision == null ? 0 : nativeMin3(toInteger_default(precision), 292);
  2947. if (precision && nativeIsFinite(number4)) {
  2948. var pair = (toString_default(number4) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
  2949. pair = (toString_default(value) + "e").split("e");
  2950. return +(pair[0] + "e" + (+pair[1] - precision));
  2951. }
  2952. return func(number4);
  2953. };
  2954. }
  2955. var createRound_default = createRound;
  2956. // node_modules/lodash-es/ceil.js
  2957. var ceil = createRound_default("ceil");
  2958. var ceil_default = ceil;
  2959. // node_modules/lodash-es/chain.js
  2960. function chain(value) {
  2961. var result2 = wrapperLodash_default(value);
  2962. result2.__chain__ = true;
  2963. return result2;
  2964. }
  2965. var chain_default = chain;
  2966. // node_modules/lodash-es/chunk.js
  2967. var nativeCeil = Math.ceil;
  2968. var nativeMax5 = Math.max;
  2969. function chunk(array4, size3, guard) {
  2970. if (guard ? isIterateeCall_default(array4, size3, guard) : size3 === void 0) {
  2971. size3 = 1;
  2972. } else {
  2973. size3 = nativeMax5(toInteger_default(size3), 0);
  2974. }
  2975. var length = array4 == null ? 0 : array4.length;
  2976. if (!length || size3 < 1) {
  2977. return [];
  2978. }
  2979. var index = 0, resIndex = 0, result2 = Array(nativeCeil(length / size3));
  2980. while (index < length) {
  2981. result2[resIndex++] = baseSlice_default(array4, index, index += size3);
  2982. }
  2983. return result2;
  2984. }
  2985. var chunk_default = chunk;
  2986. // node_modules/lodash-es/_baseClamp.js
  2987. function baseClamp(number4, lower, upper) {
  2988. if (number4 === number4) {
  2989. if (upper !== void 0) {
  2990. number4 = number4 <= upper ? number4 : upper;
  2991. }
  2992. if (lower !== void 0) {
  2993. number4 = number4 >= lower ? number4 : lower;
  2994. }
  2995. }
  2996. return number4;
  2997. }
  2998. var baseClamp_default = baseClamp;
  2999. // node_modules/lodash-es/clamp.js
  3000. function clamp(number4, lower, upper) {
  3001. if (upper === void 0) {
  3002. upper = lower;
  3003. lower = void 0;
  3004. }
  3005. if (upper !== void 0) {
  3006. upper = toNumber_default(upper);
  3007. upper = upper === upper ? upper : 0;
  3008. }
  3009. if (lower !== void 0) {
  3010. lower = toNumber_default(lower);
  3011. lower = lower === lower ? lower : 0;
  3012. }
  3013. return baseClamp_default(toNumber_default(number4), lower, upper);
  3014. }
  3015. var clamp_default = clamp;
  3016. // node_modules/lodash-es/_stackClear.js
  3017. function stackClear() {
  3018. this.__data__ = new ListCache_default();
  3019. this.size = 0;
  3020. }
  3021. var stackClear_default = stackClear;
  3022. // node_modules/lodash-es/_stackDelete.js
  3023. function stackDelete(key) {
  3024. var data = this.__data__, result2 = data["delete"](key);
  3025. this.size = data.size;
  3026. return result2;
  3027. }
  3028. var stackDelete_default = stackDelete;
  3029. // node_modules/lodash-es/_stackGet.js
  3030. function stackGet(key) {
  3031. return this.__data__.get(key);
  3032. }
  3033. var stackGet_default = stackGet;
  3034. // node_modules/lodash-es/_stackHas.js
  3035. function stackHas(key) {
  3036. return this.__data__.has(key);
  3037. }
  3038. var stackHas_default = stackHas;
  3039. // node_modules/lodash-es/_stackSet.js
  3040. var LARGE_ARRAY_SIZE = 200;
  3041. function stackSet(key, value) {
  3042. var data = this.__data__;
  3043. if (data instanceof ListCache_default) {
  3044. var pairs = data.__data__;
  3045. if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
  3046. pairs.push([key, value]);
  3047. this.size = ++data.size;
  3048. return this;
  3049. }
  3050. data = this.__data__ = new MapCache_default(pairs);
  3051. }
  3052. data.set(key, value);
  3053. this.size = data.size;
  3054. return this;
  3055. }
  3056. var stackSet_default = stackSet;
  3057. // node_modules/lodash-es/_Stack.js
  3058. function Stack(entries) {
  3059. var data = this.__data__ = new ListCache_default(entries);
  3060. this.size = data.size;
  3061. }
  3062. Stack.prototype.clear = stackClear_default;
  3063. Stack.prototype["delete"] = stackDelete_default;
  3064. Stack.prototype.get = stackGet_default;
  3065. Stack.prototype.has = stackHas_default;
  3066. Stack.prototype.set = stackSet_default;
  3067. var Stack_default = Stack;
  3068. // node_modules/lodash-es/_baseAssign.js
  3069. function baseAssign(object4, source) {
  3070. return object4 && copyObject_default(source, keys_default(source), object4);
  3071. }
  3072. var baseAssign_default = baseAssign;
  3073. // node_modules/lodash-es/_baseAssignIn.js
  3074. function baseAssignIn(object4, source) {
  3075. return object4 && copyObject_default(source, keysIn_default(source), object4);
  3076. }
  3077. var baseAssignIn_default = baseAssignIn;
  3078. // node_modules/lodash-es/_cloneBuffer.js
  3079. var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports;
  3080. var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module;
  3081. var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3;
  3082. var Buffer2 = moduleExports3 ? root_default.Buffer : void 0;
  3083. var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
  3084. function cloneBuffer(buffer, isDeep) {
  3085. if (isDeep) {
  3086. return buffer.slice();
  3087. }
  3088. var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  3089. buffer.copy(result2);
  3090. return result2;
  3091. }
  3092. var cloneBuffer_default = cloneBuffer;
  3093. // node_modules/lodash-es/_arrayFilter.js
  3094. function arrayFilter(array4, predicate) {
  3095. var index = -1, length = array4 == null ? 0 : array4.length, resIndex = 0, result2 = [];
  3096. while (++index < length) {
  3097. var value = array4[index];
  3098. if (predicate(value, index, array4)) {
  3099. result2[resIndex++] = value;
  3100. }
  3101. }
  3102. return result2;
  3103. }
  3104. var arrayFilter_default = arrayFilter;
  3105. // node_modules/lodash-es/stubArray.js
  3106. function stubArray() {
  3107. return [];
  3108. }
  3109. var stubArray_default = stubArray;
  3110. // node_modules/lodash-es/_getSymbols.js
  3111. var objectProto16 = Object.prototype;
  3112. var propertyIsEnumerable2 = objectProto16.propertyIsEnumerable;
  3113. var nativeGetSymbols = Object.getOwnPropertySymbols;
  3114. var getSymbols = !nativeGetSymbols ? stubArray_default : function(object4) {
  3115. if (object4 == null) {
  3116. return [];
  3117. }
  3118. object4 = Object(object4);
  3119. return arrayFilter_default(nativeGetSymbols(object4), function(symbol) {
  3120. return propertyIsEnumerable2.call(object4, symbol);
  3121. });
  3122. };
  3123. var getSymbols_default = getSymbols;
  3124. // node_modules/lodash-es/_copySymbols.js
  3125. function copySymbols(source, object4) {
  3126. return copyObject_default(source, getSymbols_default(source), object4);
  3127. }
  3128. var copySymbols_default = copySymbols;
  3129. // node_modules/lodash-es/_getSymbolsIn.js
  3130. var nativeGetSymbols2 = Object.getOwnPropertySymbols;
  3131. var getSymbolsIn = !nativeGetSymbols2 ? stubArray_default : function(object4) {
  3132. var result2 = [];
  3133. while (object4) {
  3134. arrayPush_default(result2, getSymbols_default(object4));
  3135. object4 = getPrototype_default(object4);
  3136. }
  3137. return result2;
  3138. };
  3139. var getSymbolsIn_default = getSymbolsIn;
  3140. // node_modules/lodash-es/_copySymbolsIn.js
  3141. function copySymbolsIn(source, object4) {
  3142. return copyObject_default(source, getSymbolsIn_default(source), object4);
  3143. }
  3144. var copySymbolsIn_default = copySymbolsIn;
  3145. // node_modules/lodash-es/_baseGetAllKeys.js
  3146. function baseGetAllKeys(object4, keysFunc, symbolsFunc) {
  3147. var result2 = keysFunc(object4);
  3148. return isArray_default(object4) ? result2 : arrayPush_default(result2, symbolsFunc(object4));
  3149. }
  3150. var baseGetAllKeys_default = baseGetAllKeys;
  3151. // node_modules/lodash-es/_getAllKeys.js
  3152. function getAllKeys(object4) {
  3153. return baseGetAllKeys_default(object4, keys_default, getSymbols_default);
  3154. }
  3155. var getAllKeys_default = getAllKeys;
  3156. // node_modules/lodash-es/_getAllKeysIn.js
  3157. function getAllKeysIn(object4) {
  3158. return baseGetAllKeys_default(object4, keysIn_default, getSymbolsIn_default);
  3159. }
  3160. var getAllKeysIn_default = getAllKeysIn;
  3161. // node_modules/lodash-es/_DataView.js
  3162. var DataView = getNative_default(root_default, "DataView");
  3163. var DataView_default = DataView;
  3164. // node_modules/lodash-es/_Promise.js
  3165. var Promise2 = getNative_default(root_default, "Promise");
  3166. var Promise_default = Promise2;
  3167. // node_modules/lodash-es/_Set.js
  3168. var Set2 = getNative_default(root_default, "Set");
  3169. var Set_default = Set2;
  3170. // node_modules/lodash-es/_getTag.js
  3171. var mapTag2 = "[object Map]";
  3172. var objectTag3 = "[object Object]";
  3173. var promiseTag = "[object Promise]";
  3174. var setTag2 = "[object Set]";
  3175. var weakMapTag2 = "[object WeakMap]";
  3176. var dataViewTag2 = "[object DataView]";
  3177. var dataViewCtorString = toSource_default(DataView_default);
  3178. var mapCtorString = toSource_default(Map_default);
  3179. var promiseCtorString = toSource_default(Promise_default);
  3180. var setCtorString = toSource_default(Set_default);
  3181. var weakMapCtorString = toSource_default(WeakMap_default);
  3182. var getTag = baseGetTag_default;
  3183. if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) {
  3184. getTag = function(value) {
  3185. var result2 = baseGetTag_default(value), Ctor = result2 == objectTag3 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
  3186. if (ctorString) {
  3187. switch (ctorString) {
  3188. case dataViewCtorString:
  3189. return dataViewTag2;
  3190. case mapCtorString:
  3191. return mapTag2;
  3192. case promiseCtorString:
  3193. return promiseTag;
  3194. case setCtorString:
  3195. return setTag2;
  3196. case weakMapCtorString:
  3197. return weakMapTag2;
  3198. }
  3199. }
  3200. return result2;
  3201. };
  3202. }
  3203. var getTag_default = getTag;
  3204. // node_modules/lodash-es/_initCloneArray.js
  3205. var objectProto17 = Object.prototype;
  3206. var hasOwnProperty14 = objectProto17.hasOwnProperty;
  3207. function initCloneArray(array4) {
  3208. var length = array4.length, result2 = new array4.constructor(length);
  3209. if (length && typeof array4[0] == "string" && hasOwnProperty14.call(array4, "index")) {
  3210. result2.index = array4.index;
  3211. result2.input = array4.input;
  3212. }
  3213. return result2;
  3214. }
  3215. var initCloneArray_default = initCloneArray;
  3216. // node_modules/lodash-es/_Uint8Array.js
  3217. var Uint8Array2 = root_default.Uint8Array;
  3218. var Uint8Array_default = Uint8Array2;
  3219. // node_modules/lodash-es/_cloneArrayBuffer.js
  3220. function cloneArrayBuffer(arrayBuffer) {
  3221. var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
  3222. new Uint8Array_default(result2).set(new Uint8Array_default(arrayBuffer));
  3223. return result2;
  3224. }
  3225. var cloneArrayBuffer_default = cloneArrayBuffer;
  3226. // node_modules/lodash-es/_cloneDataView.js
  3227. function cloneDataView(dataView, isDeep) {
  3228. var buffer = isDeep ? cloneArrayBuffer_default(dataView.buffer) : dataView.buffer;
  3229. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  3230. }
  3231. var cloneDataView_default = cloneDataView;
  3232. // node_modules/lodash-es/_cloneRegExp.js
  3233. var reFlags = /\w*$/;
  3234. function cloneRegExp(regexp4) {
  3235. var result2 = new regexp4.constructor(regexp4.source, reFlags.exec(regexp4));
  3236. result2.lastIndex = regexp4.lastIndex;
  3237. return result2;
  3238. }
  3239. var cloneRegExp_default = cloneRegExp;
  3240. // node_modules/lodash-es/_cloneSymbol.js
  3241. var symbolProto2 = Symbol_default ? Symbol_default.prototype : void 0;
  3242. var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
  3243. function cloneSymbol(symbol) {
  3244. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  3245. }
  3246. var cloneSymbol_default = cloneSymbol;
  3247. // node_modules/lodash-es/_cloneTypedArray.js
  3248. function cloneTypedArray(typedArray, isDeep) {
  3249. var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
  3250. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  3251. }
  3252. var cloneTypedArray_default = cloneTypedArray;
  3253. // node_modules/lodash-es/_initCloneByTag.js
  3254. var boolTag2 = "[object Boolean]";
  3255. var dateTag2 = "[object Date]";
  3256. var mapTag3 = "[object Map]";
  3257. var numberTag2 = "[object Number]";
  3258. var regexpTag2 = "[object RegExp]";
  3259. var setTag3 = "[object Set]";
  3260. var stringTag2 = "[object String]";
  3261. var symbolTag2 = "[object Symbol]";
  3262. var arrayBufferTag2 = "[object ArrayBuffer]";
  3263. var dataViewTag3 = "[object DataView]";
  3264. var float32Tag2 = "[object Float32Array]";
  3265. var float64Tag2 = "[object Float64Array]";
  3266. var int8Tag2 = "[object Int8Array]";
  3267. var int16Tag2 = "[object Int16Array]";
  3268. var int32Tag2 = "[object Int32Array]";
  3269. var uint8Tag2 = "[object Uint8Array]";
  3270. var uint8ClampedTag2 = "[object Uint8ClampedArray]";
  3271. var uint16Tag2 = "[object Uint16Array]";
  3272. var uint32Tag2 = "[object Uint32Array]";
  3273. function initCloneByTag(object4, tag, isDeep) {
  3274. var Ctor = object4.constructor;
  3275. switch (tag) {
  3276. case arrayBufferTag2:
  3277. return cloneArrayBuffer_default(object4);
  3278. case boolTag2:
  3279. case dateTag2:
  3280. return new Ctor(+object4);
  3281. case dataViewTag3:
  3282. return cloneDataView_default(object4, isDeep);
  3283. case float32Tag2:
  3284. case float64Tag2:
  3285. case int8Tag2:
  3286. case int16Tag2:
  3287. case int32Tag2:
  3288. case uint8Tag2:
  3289. case uint8ClampedTag2:
  3290. case uint16Tag2:
  3291. case uint32Tag2:
  3292. return cloneTypedArray_default(object4, isDeep);
  3293. case mapTag3:
  3294. return new Ctor();
  3295. case numberTag2:
  3296. case stringTag2:
  3297. return new Ctor(object4);
  3298. case regexpTag2:
  3299. return cloneRegExp_default(object4);
  3300. case setTag3:
  3301. return new Ctor();
  3302. case symbolTag2:
  3303. return cloneSymbol_default(object4);
  3304. }
  3305. }
  3306. var initCloneByTag_default = initCloneByTag;
  3307. // node_modules/lodash-es/_initCloneObject.js
  3308. function initCloneObject(object4) {
  3309. return typeof object4.constructor == "function" && !isPrototype_default(object4) ? baseCreate_default(getPrototype_default(object4)) : {};
  3310. }
  3311. var initCloneObject_default = initCloneObject;
  3312. // node_modules/lodash-es/_baseIsMap.js
  3313. var mapTag4 = "[object Map]";
  3314. function baseIsMap(value) {
  3315. return isObjectLike_default(value) && getTag_default(value) == mapTag4;
  3316. }
  3317. var baseIsMap_default = baseIsMap;
  3318. // node_modules/lodash-es/isMap.js
  3319. var nodeIsMap = nodeUtil_default && nodeUtil_default.isMap;
  3320. var isMap = nodeIsMap ? baseUnary_default(nodeIsMap) : baseIsMap_default;
  3321. var isMap_default = isMap;
  3322. // node_modules/lodash-es/_baseIsSet.js
  3323. var setTag4 = "[object Set]";
  3324. function baseIsSet(value) {
  3325. return isObjectLike_default(value) && getTag_default(value) == setTag4;
  3326. }
  3327. var baseIsSet_default = baseIsSet;
  3328. // node_modules/lodash-es/isSet.js
  3329. var nodeIsSet = nodeUtil_default && nodeUtil_default.isSet;
  3330. var isSet = nodeIsSet ? baseUnary_default(nodeIsSet) : baseIsSet_default;
  3331. var isSet_default = isSet;
  3332. // node_modules/lodash-es/_baseClone.js
  3333. var CLONE_DEEP_FLAG = 1;
  3334. var CLONE_FLAT_FLAG = 2;
  3335. var CLONE_SYMBOLS_FLAG = 4;
  3336. var argsTag3 = "[object Arguments]";
  3337. var arrayTag2 = "[object Array]";
  3338. var boolTag3 = "[object Boolean]";
  3339. var dateTag3 = "[object Date]";
  3340. var errorTag3 = "[object Error]";
  3341. var funcTag3 = "[object Function]";
  3342. var genTag2 = "[object GeneratorFunction]";
  3343. var mapTag5 = "[object Map]";
  3344. var numberTag3 = "[object Number]";
  3345. var objectTag4 = "[object Object]";
  3346. var regexpTag3 = "[object RegExp]";
  3347. var setTag5 = "[object Set]";
  3348. var stringTag3 = "[object String]";
  3349. var symbolTag3 = "[object Symbol]";
  3350. var weakMapTag3 = "[object WeakMap]";
  3351. var arrayBufferTag3 = "[object ArrayBuffer]";
  3352. var dataViewTag4 = "[object DataView]";
  3353. var float32Tag3 = "[object Float32Array]";
  3354. var float64Tag3 = "[object Float64Array]";
  3355. var int8Tag3 = "[object Int8Array]";
  3356. var int16Tag3 = "[object Int16Array]";
  3357. var int32Tag3 = "[object Int32Array]";
  3358. var uint8Tag3 = "[object Uint8Array]";
  3359. var uint8ClampedTag3 = "[object Uint8ClampedArray]";
  3360. var uint16Tag3 = "[object Uint16Array]";
  3361. var uint32Tag3 = "[object Uint32Array]";
  3362. var cloneableTags = {};
  3363. cloneableTags[argsTag3] = cloneableTags[arrayTag2] = cloneableTags[arrayBufferTag3] = cloneableTags[dataViewTag4] = cloneableTags[boolTag3] = cloneableTags[dateTag3] = cloneableTags[float32Tag3] = cloneableTags[float64Tag3] = cloneableTags[int8Tag3] = cloneableTags[int16Tag3] = cloneableTags[int32Tag3] = cloneableTags[mapTag5] = cloneableTags[numberTag3] = cloneableTags[objectTag4] = cloneableTags[regexpTag3] = cloneableTags[setTag5] = cloneableTags[stringTag3] = cloneableTags[symbolTag3] = cloneableTags[uint8Tag3] = cloneableTags[uint8ClampedTag3] = cloneableTags[uint16Tag3] = cloneableTags[uint32Tag3] = true;
  3364. cloneableTags[errorTag3] = cloneableTags[funcTag3] = cloneableTags[weakMapTag3] = false;
  3365. function baseClone(value, bitmask, customizer, key, object4, stack) {
  3366. var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  3367. if (customizer) {
  3368. result2 = object4 ? customizer(value, key, object4, stack) : customizer(value);
  3369. }
  3370. if (result2 !== void 0) {
  3371. return result2;
  3372. }
  3373. if (!isObject_default(value)) {
  3374. return value;
  3375. }
  3376. var isArr = isArray_default(value);
  3377. if (isArr) {
  3378. result2 = initCloneArray_default(value);
  3379. if (!isDeep) {
  3380. return copyArray_default(value, result2);
  3381. }
  3382. } else {
  3383. var tag = getTag_default(value), isFunc = tag == funcTag3 || tag == genTag2;
  3384. if (isBuffer_default(value)) {
  3385. return cloneBuffer_default(value, isDeep);
  3386. }
  3387. if (tag == objectTag4 || tag == argsTag3 || isFunc && !object4) {
  3388. result2 = isFlat || isFunc ? {} : initCloneObject_default(value);
  3389. if (!isDeep) {
  3390. return isFlat ? copySymbolsIn_default(value, baseAssignIn_default(result2, value)) : copySymbols_default(value, baseAssign_default(result2, value));
  3391. }
  3392. } else {
  3393. if (!cloneableTags[tag]) {
  3394. return object4 ? value : {};
  3395. }
  3396. result2 = initCloneByTag_default(value, tag, isDeep);
  3397. }
  3398. }
  3399. stack || (stack = new Stack_default());
  3400. var stacked = stack.get(value);
  3401. if (stacked) {
  3402. return stacked;
  3403. }
  3404. stack.set(value, result2);
  3405. if (isSet_default(value)) {
  3406. value.forEach(function(subValue) {
  3407. result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  3408. });
  3409. } else if (isMap_default(value)) {
  3410. value.forEach(function(subValue, key2) {
  3411. result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  3412. });
  3413. }
  3414. var keysFunc = isFull ? isFlat ? getAllKeysIn_default : getAllKeys_default : isFlat ? keysIn_default : keys_default;
  3415. var props = isArr ? void 0 : keysFunc(value);
  3416. arrayEach_default(props || value, function(subValue, key2) {
  3417. if (props) {
  3418. key2 = subValue;
  3419. subValue = value[key2];
  3420. }
  3421. assignValue_default(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  3422. });
  3423. return result2;
  3424. }
  3425. var baseClone_default = baseClone;
  3426. // node_modules/lodash-es/clone.js
  3427. var CLONE_SYMBOLS_FLAG2 = 4;
  3428. function clone(value) {
  3429. return baseClone_default(value, CLONE_SYMBOLS_FLAG2);
  3430. }
  3431. var clone_default = clone;
  3432. // node_modules/lodash-es/cloneDeep.js
  3433. var CLONE_DEEP_FLAG2 = 1;
  3434. var CLONE_SYMBOLS_FLAG3 = 4;
  3435. function cloneDeep(value) {
  3436. return baseClone_default(value, CLONE_DEEP_FLAG2 | CLONE_SYMBOLS_FLAG3);
  3437. }
  3438. var cloneDeep_default = cloneDeep;
  3439. // node_modules/lodash-es/cloneDeepWith.js
  3440. var CLONE_DEEP_FLAG3 = 1;
  3441. var CLONE_SYMBOLS_FLAG4 = 4;
  3442. function cloneDeepWith(value, customizer) {
  3443. customizer = typeof customizer == "function" ? customizer : void 0;
  3444. return baseClone_default(value, CLONE_DEEP_FLAG3 | CLONE_SYMBOLS_FLAG4, customizer);
  3445. }
  3446. var cloneDeepWith_default = cloneDeepWith;
  3447. // node_modules/lodash-es/cloneWith.js
  3448. var CLONE_SYMBOLS_FLAG5 = 4;
  3449. function cloneWith(value, customizer) {
  3450. customizer = typeof customizer == "function" ? customizer : void 0;
  3451. return baseClone_default(value, CLONE_SYMBOLS_FLAG5, customizer);
  3452. }
  3453. var cloneWith_default = cloneWith;
  3454. // node_modules/lodash-es/commit.js
  3455. function wrapperCommit() {
  3456. return new LodashWrapper_default(this.value(), this.__chain__);
  3457. }
  3458. var commit_default = wrapperCommit;
  3459. // node_modules/lodash-es/compact.js
  3460. function compact(array4) {
  3461. var index = -1, length = array4 == null ? 0 : array4.length, resIndex = 0, result2 = [];
  3462. while (++index < length) {
  3463. var value = array4[index];
  3464. if (value) {
  3465. result2[resIndex++] = value;
  3466. }
  3467. }
  3468. return result2;
  3469. }
  3470. var compact_default = compact;
  3471. // node_modules/lodash-es/concat.js
  3472. function concat() {
  3473. var length = arguments.length;
  3474. if (!length) {
  3475. return [];
  3476. }
  3477. var args = Array(length - 1), array4 = arguments[0], index = length;
  3478. while (index--) {
  3479. args[index - 1] = arguments[index];
  3480. }
  3481. return arrayPush_default(isArray_default(array4) ? copyArray_default(array4) : [array4], baseFlatten_default(args, 1));
  3482. }
  3483. var concat_default = concat;
  3484. // node_modules/lodash-es/_setCacheAdd.js
  3485. var HASH_UNDEFINED3 = "__lodash_hash_undefined__";
  3486. function setCacheAdd(value) {
  3487. this.__data__.set(value, HASH_UNDEFINED3);
  3488. return this;
  3489. }
  3490. var setCacheAdd_default = setCacheAdd;
  3491. // node_modules/lodash-es/_setCacheHas.js
  3492. function setCacheHas(value) {
  3493. return this.__data__.has(value);
  3494. }
  3495. var setCacheHas_default = setCacheHas;
  3496. // node_modules/lodash-es/_SetCache.js
  3497. function SetCache(values2) {
  3498. var index = -1, length = values2 == null ? 0 : values2.length;
  3499. this.__data__ = new MapCache_default();
  3500. while (++index < length) {
  3501. this.add(values2[index]);
  3502. }
  3503. }
  3504. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd_default;
  3505. SetCache.prototype.has = setCacheHas_default;
  3506. var SetCache_default = SetCache;
  3507. // node_modules/lodash-es/_arraySome.js
  3508. function arraySome(array4, predicate) {
  3509. var index = -1, length = array4 == null ? 0 : array4.length;
  3510. while (++index < length) {
  3511. if (predicate(array4[index], index, array4)) {
  3512. return true;
  3513. }
  3514. }
  3515. return false;
  3516. }
  3517. var arraySome_default = arraySome;
  3518. // node_modules/lodash-es/_cacheHas.js
  3519. function cacheHas(cache2, key) {
  3520. return cache2.has(key);
  3521. }
  3522. var cacheHas_default = cacheHas;
  3523. // node_modules/lodash-es/_equalArrays.js
  3524. var COMPARE_PARTIAL_FLAG = 1;
  3525. var COMPARE_UNORDERED_FLAG = 2;
  3526. function equalArrays(array4, other, bitmask, customizer, equalFunc, stack) {
  3527. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array4.length, othLength = other.length;
  3528. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  3529. return false;
  3530. }
  3531. var arrStacked = stack.get(array4);
  3532. var othStacked = stack.get(other);
  3533. if (arrStacked && othStacked) {
  3534. return arrStacked == other && othStacked == array4;
  3535. }
  3536. var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache_default() : void 0;
  3537. stack.set(array4, other);
  3538. stack.set(other, array4);
  3539. while (++index < arrLength) {
  3540. var arrValue = array4[index], othValue = other[index];
  3541. if (customizer) {
  3542. var compared = isPartial ? customizer(othValue, arrValue, index, other, array4, stack) : customizer(arrValue, othValue, index, array4, other, stack);
  3543. }
  3544. if (compared !== void 0) {
  3545. if (compared) {
  3546. continue;
  3547. }
  3548. result2 = false;
  3549. break;
  3550. }
  3551. if (seen) {
  3552. if (!arraySome_default(other, function(othValue2, othIndex) {
  3553. if (!cacheHas_default(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
  3554. return seen.push(othIndex);
  3555. }
  3556. })) {
  3557. result2 = false;
  3558. break;
  3559. }
  3560. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  3561. result2 = false;
  3562. break;
  3563. }
  3564. }
  3565. stack["delete"](array4);
  3566. stack["delete"](other);
  3567. return result2;
  3568. }
  3569. var equalArrays_default = equalArrays;
  3570. // node_modules/lodash-es/_mapToArray.js
  3571. function mapToArray(map2) {
  3572. var index = -1, result2 = Array(map2.size);
  3573. map2.forEach(function(value, key) {
  3574. result2[++index] = [key, value];
  3575. });
  3576. return result2;
  3577. }
  3578. var mapToArray_default = mapToArray;
  3579. // node_modules/lodash-es/_setToArray.js
  3580. function setToArray(set4) {
  3581. var index = -1, result2 = Array(set4.size);
  3582. set4.forEach(function(value) {
  3583. result2[++index] = value;
  3584. });
  3585. return result2;
  3586. }
  3587. var setToArray_default = setToArray;
  3588. // node_modules/lodash-es/_equalByTag.js
  3589. var COMPARE_PARTIAL_FLAG2 = 1;
  3590. var COMPARE_UNORDERED_FLAG2 = 2;
  3591. var boolTag4 = "[object Boolean]";
  3592. var dateTag4 = "[object Date]";
  3593. var errorTag4 = "[object Error]";
  3594. var mapTag6 = "[object Map]";
  3595. var numberTag4 = "[object Number]";
  3596. var regexpTag4 = "[object RegExp]";
  3597. var setTag6 = "[object Set]";
  3598. var stringTag4 = "[object String]";
  3599. var symbolTag4 = "[object Symbol]";
  3600. var arrayBufferTag4 = "[object ArrayBuffer]";
  3601. var dataViewTag5 = "[object DataView]";
  3602. var symbolProto3 = Symbol_default ? Symbol_default.prototype : void 0;
  3603. var symbolValueOf2 = symbolProto3 ? symbolProto3.valueOf : void 0;
  3604. function equalByTag(object4, other, tag, bitmask, customizer, equalFunc, stack) {
  3605. switch (tag) {
  3606. case dataViewTag5:
  3607. if (object4.byteLength != other.byteLength || object4.byteOffset != other.byteOffset) {
  3608. return false;
  3609. }
  3610. object4 = object4.buffer;
  3611. other = other.buffer;
  3612. case arrayBufferTag4:
  3613. if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array_default(object4), new Uint8Array_default(other))) {
  3614. return false;
  3615. }
  3616. return true;
  3617. case boolTag4:
  3618. case dateTag4:
  3619. case numberTag4:
  3620. return eq_default(+object4, +other);
  3621. case errorTag4:
  3622. return object4.name == other.name && object4.message == other.message;
  3623. case regexpTag4:
  3624. case stringTag4:
  3625. return object4 == other + "";
  3626. case mapTag6:
  3627. var convert = mapToArray_default;
  3628. case setTag6:
  3629. var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
  3630. convert || (convert = setToArray_default);
  3631. if (object4.size != other.size && !isPartial) {
  3632. return false;
  3633. }
  3634. var stacked = stack.get(object4);
  3635. if (stacked) {
  3636. return stacked == other;
  3637. }
  3638. bitmask |= COMPARE_UNORDERED_FLAG2;
  3639. stack.set(object4, other);
  3640. var result2 = equalArrays_default(convert(object4), convert(other), bitmask, customizer, equalFunc, stack);
  3641. stack["delete"](object4);
  3642. return result2;
  3643. case symbolTag4:
  3644. if (symbolValueOf2) {
  3645. return symbolValueOf2.call(object4) == symbolValueOf2.call(other);
  3646. }
  3647. }
  3648. return false;
  3649. }
  3650. var equalByTag_default = equalByTag;
  3651. // node_modules/lodash-es/_equalObjects.js
  3652. var COMPARE_PARTIAL_FLAG3 = 1;
  3653. var objectProto18 = Object.prototype;
  3654. var hasOwnProperty15 = objectProto18.hasOwnProperty;
  3655. function equalObjects(object4, other, bitmask, customizer, equalFunc, stack) {
  3656. var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = getAllKeys_default(object4), objLength = objProps.length, othProps = getAllKeys_default(other), othLength = othProps.length;
  3657. if (objLength != othLength && !isPartial) {
  3658. return false;
  3659. }
  3660. var index = objLength;
  3661. while (index--) {
  3662. var key = objProps[index];
  3663. if (!(isPartial ? key in other : hasOwnProperty15.call(other, key))) {
  3664. return false;
  3665. }
  3666. }
  3667. var objStacked = stack.get(object4);
  3668. var othStacked = stack.get(other);
  3669. if (objStacked && othStacked) {
  3670. return objStacked == other && othStacked == object4;
  3671. }
  3672. var result2 = true;
  3673. stack.set(object4, other);
  3674. stack.set(other, object4);
  3675. var skipCtor = isPartial;
  3676. while (++index < objLength) {
  3677. key = objProps[index];
  3678. var objValue = object4[key], othValue = other[key];
  3679. if (customizer) {
  3680. var compared = isPartial ? customizer(othValue, objValue, key, other, object4, stack) : customizer(objValue, othValue, key, object4, other, stack);
  3681. }
  3682. if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  3683. result2 = false;
  3684. break;
  3685. }
  3686. skipCtor || (skipCtor = key == "constructor");
  3687. }
  3688. if (result2 && !skipCtor) {
  3689. var objCtor = object4.constructor, othCtor = other.constructor;
  3690. if (objCtor != othCtor && ("constructor" in object4 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
  3691. result2 = false;
  3692. }
  3693. }
  3694. stack["delete"](object4);
  3695. stack["delete"](other);
  3696. return result2;
  3697. }
  3698. var equalObjects_default = equalObjects;
  3699. // node_modules/lodash-es/_baseIsEqualDeep.js
  3700. var COMPARE_PARTIAL_FLAG4 = 1;
  3701. var argsTag4 = "[object Arguments]";
  3702. var arrayTag3 = "[object Array]";
  3703. var objectTag5 = "[object Object]";
  3704. var objectProto19 = Object.prototype;
  3705. var hasOwnProperty16 = objectProto19.hasOwnProperty;
  3706. function baseIsEqualDeep(object4, other, bitmask, customizer, equalFunc, stack) {
  3707. var objIsArr = isArray_default(object4), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag3 : getTag_default(object4), othTag = othIsArr ? arrayTag3 : getTag_default(other);
  3708. objTag = objTag == argsTag4 ? objectTag5 : objTag;
  3709. othTag = othTag == argsTag4 ? objectTag5 : othTag;
  3710. var objIsObj = objTag == objectTag5, othIsObj = othTag == objectTag5, isSameTag = objTag == othTag;
  3711. if (isSameTag && isBuffer_default(object4)) {
  3712. if (!isBuffer_default(other)) {
  3713. return false;
  3714. }
  3715. objIsArr = true;
  3716. objIsObj = false;
  3717. }
  3718. if (isSameTag && !objIsObj) {
  3719. stack || (stack = new Stack_default());
  3720. return objIsArr || isTypedArray_default(object4) ? equalArrays_default(object4, other, bitmask, customizer, equalFunc, stack) : equalByTag_default(object4, other, objTag, bitmask, customizer, equalFunc, stack);
  3721. }
  3722. if (!(bitmask & COMPARE_PARTIAL_FLAG4)) {
  3723. var objIsWrapped = objIsObj && hasOwnProperty16.call(object4, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty16.call(other, "__wrapped__");
  3724. if (objIsWrapped || othIsWrapped) {
  3725. var objUnwrapped = objIsWrapped ? object4.value() : object4, othUnwrapped = othIsWrapped ? other.value() : other;
  3726. stack || (stack = new Stack_default());
  3727. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  3728. }
  3729. }
  3730. if (!isSameTag) {
  3731. return false;
  3732. }
  3733. stack || (stack = new Stack_default());
  3734. return equalObjects_default(object4, other, bitmask, customizer, equalFunc, stack);
  3735. }
  3736. var baseIsEqualDeep_default = baseIsEqualDeep;
  3737. // node_modules/lodash-es/_baseIsEqual.js
  3738. function baseIsEqual(value, other, bitmask, customizer, stack) {
  3739. if (value === other) {
  3740. return true;
  3741. }
  3742. if (value == null || other == null || !isObjectLike_default(value) && !isObjectLike_default(other)) {
  3743. return value !== value && other !== other;
  3744. }
  3745. return baseIsEqualDeep_default(value, other, bitmask, customizer, baseIsEqual, stack);
  3746. }
  3747. var baseIsEqual_default = baseIsEqual;
  3748. // node_modules/lodash-es/_baseIsMatch.js
  3749. var COMPARE_PARTIAL_FLAG5 = 1;
  3750. var COMPARE_UNORDERED_FLAG3 = 2;
  3751. function baseIsMatch(object4, source, matchData, customizer) {
  3752. var index = matchData.length, length = index, noCustomizer = !customizer;
  3753. if (object4 == null) {
  3754. return !length;
  3755. }
  3756. object4 = Object(object4);
  3757. while (index--) {
  3758. var data = matchData[index];
  3759. if (noCustomizer && data[2] ? data[1] !== object4[data[0]] : !(data[0] in object4)) {
  3760. return false;
  3761. }
  3762. }
  3763. while (++index < length) {
  3764. data = matchData[index];
  3765. var key = data[0], objValue = object4[key], srcValue = data[1];
  3766. if (noCustomizer && data[2]) {
  3767. if (objValue === void 0 && !(key in object4)) {
  3768. return false;
  3769. }
  3770. } else {
  3771. var stack = new Stack_default();
  3772. if (customizer) {
  3773. var result2 = customizer(objValue, srcValue, key, object4, source, stack);
  3774. }
  3775. if (!(result2 === void 0 ? baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG5 | COMPARE_UNORDERED_FLAG3, customizer, stack) : result2)) {
  3776. return false;
  3777. }
  3778. }
  3779. }
  3780. return true;
  3781. }
  3782. var baseIsMatch_default = baseIsMatch;
  3783. // node_modules/lodash-es/_isStrictComparable.js
  3784. function isStrictComparable(value) {
  3785. return value === value && !isObject_default(value);
  3786. }
  3787. var isStrictComparable_default = isStrictComparable;
  3788. // node_modules/lodash-es/_getMatchData.js
  3789. function getMatchData(object4) {
  3790. var result2 = keys_default(object4), length = result2.length;
  3791. while (length--) {
  3792. var key = result2[length], value = object4[key];
  3793. result2[length] = [key, value, isStrictComparable_default(value)];
  3794. }
  3795. return result2;
  3796. }
  3797. var getMatchData_default = getMatchData;
  3798. // node_modules/lodash-es/_matchesStrictComparable.js
  3799. function matchesStrictComparable(key, srcValue) {
  3800. return function(object4) {
  3801. if (object4 == null) {
  3802. return false;
  3803. }
  3804. return object4[key] === srcValue && (srcValue !== void 0 || key in Object(object4));
  3805. };
  3806. }
  3807. var matchesStrictComparable_default = matchesStrictComparable;
  3808. // node_modules/lodash-es/_baseMatches.js
  3809. function baseMatches(source) {
  3810. var matchData = getMatchData_default(source);
  3811. if (matchData.length == 1 && matchData[0][2]) {
  3812. return matchesStrictComparable_default(matchData[0][0], matchData[0][1]);
  3813. }
  3814. return function(object4) {
  3815. return object4 === source || baseIsMatch_default(object4, source, matchData);
  3816. };
  3817. }
  3818. var baseMatches_default = baseMatches;
  3819. // node_modules/lodash-es/_baseHasIn.js
  3820. function baseHasIn(object4, key) {
  3821. return object4 != null && key in Object(object4);
  3822. }
  3823. var baseHasIn_default = baseHasIn;
  3824. // node_modules/lodash-es/_hasPath.js
  3825. function hasPath(object4, path, hasFunc) {
  3826. path = castPath_default(path, object4);
  3827. var index = -1, length = path.length, result2 = false;
  3828. while (++index < length) {
  3829. var key = toKey_default(path[index]);
  3830. if (!(result2 = object4 != null && hasFunc(object4, key))) {
  3831. break;
  3832. }
  3833. object4 = object4[key];
  3834. }
  3835. if (result2 || ++index != length) {
  3836. return result2;
  3837. }
  3838. length = object4 == null ? 0 : object4.length;
  3839. return !!length && isLength_default(length) && isIndex_default(key, length) && (isArray_default(object4) || isArguments_default(object4));
  3840. }
  3841. var hasPath_default = hasPath;
  3842. // node_modules/lodash-es/hasIn.js
  3843. function hasIn(object4, path) {
  3844. return object4 != null && hasPath_default(object4, path, baseHasIn_default);
  3845. }
  3846. var hasIn_default = hasIn;
  3847. // node_modules/lodash-es/_baseMatchesProperty.js
  3848. var COMPARE_PARTIAL_FLAG6 = 1;
  3849. var COMPARE_UNORDERED_FLAG4 = 2;
  3850. function baseMatchesProperty(path, srcValue) {
  3851. if (isKey_default(path) && isStrictComparable_default(srcValue)) {
  3852. return matchesStrictComparable_default(toKey_default(path), srcValue);
  3853. }
  3854. return function(object4) {
  3855. var objValue = get_default(object4, path);
  3856. return objValue === void 0 && objValue === srcValue ? hasIn_default(object4, path) : baseIsEqual_default(srcValue, objValue, COMPARE_PARTIAL_FLAG6 | COMPARE_UNORDERED_FLAG4);
  3857. };
  3858. }
  3859. var baseMatchesProperty_default = baseMatchesProperty;
  3860. // node_modules/lodash-es/_baseProperty.js
  3861. function baseProperty(key) {
  3862. return function(object4) {
  3863. return object4 == null ? void 0 : object4[key];
  3864. };
  3865. }
  3866. var baseProperty_default = baseProperty;
  3867. // node_modules/lodash-es/_basePropertyDeep.js
  3868. function basePropertyDeep(path) {
  3869. return function(object4) {
  3870. return baseGet_default(object4, path);
  3871. };
  3872. }
  3873. var basePropertyDeep_default = basePropertyDeep;
  3874. // node_modules/lodash-es/property.js
  3875. function property(path) {
  3876. return isKey_default(path) ? baseProperty_default(toKey_default(path)) : basePropertyDeep_default(path);
  3877. }
  3878. var property_default = property;
  3879. // node_modules/lodash-es/_baseIteratee.js
  3880. function baseIteratee(value) {
  3881. if (typeof value == "function") {
  3882. return value;
  3883. }
  3884. if (value == null) {
  3885. return identity_default;
  3886. }
  3887. if (typeof value == "object") {
  3888. return isArray_default(value) ? baseMatchesProperty_default(value[0], value[1]) : baseMatches_default(value);
  3889. }
  3890. return property_default(value);
  3891. }
  3892. var baseIteratee_default = baseIteratee;
  3893. // node_modules/lodash-es/cond.js
  3894. var FUNC_ERROR_TEXT5 = "Expected a function";
  3895. function cond(pairs) {
  3896. var length = pairs == null ? 0 : pairs.length, toIteratee = baseIteratee_default;
  3897. pairs = !length ? [] : arrayMap_default(pairs, function(pair) {
  3898. if (typeof pair[1] != "function") {
  3899. throw new TypeError(FUNC_ERROR_TEXT5);
  3900. }
  3901. return [toIteratee(pair[0]), pair[1]];
  3902. });
  3903. return baseRest_default(function(args) {
  3904. var index = -1;
  3905. while (++index < length) {
  3906. var pair = pairs[index];
  3907. if (apply_default(pair[0], this, args)) {
  3908. return apply_default(pair[1], this, args);
  3909. }
  3910. }
  3911. });
  3912. }
  3913. var cond_default = cond;
  3914. // node_modules/lodash-es/_baseConformsTo.js
  3915. function baseConformsTo(object4, source, props) {
  3916. var length = props.length;
  3917. if (object4 == null) {
  3918. return !length;
  3919. }
  3920. object4 = Object(object4);
  3921. while (length--) {
  3922. var key = props[length], predicate = source[key], value = object4[key];
  3923. if (value === void 0 && !(key in object4) || !predicate(value)) {
  3924. return false;
  3925. }
  3926. }
  3927. return true;
  3928. }
  3929. var baseConformsTo_default = baseConformsTo;
  3930. // node_modules/lodash-es/_baseConforms.js
  3931. function baseConforms(source) {
  3932. var props = keys_default(source);
  3933. return function(object4) {
  3934. return baseConformsTo_default(object4, source, props);
  3935. };
  3936. }
  3937. var baseConforms_default = baseConforms;
  3938. // node_modules/lodash-es/conforms.js
  3939. var CLONE_DEEP_FLAG4 = 1;
  3940. function conforms(source) {
  3941. return baseConforms_default(baseClone_default(source, CLONE_DEEP_FLAG4));
  3942. }
  3943. var conforms_default = conforms;
  3944. // node_modules/lodash-es/conformsTo.js
  3945. function conformsTo(object4, source) {
  3946. return source == null || baseConformsTo_default(object4, source, keys_default(source));
  3947. }
  3948. var conformsTo_default = conformsTo;
  3949. // node_modules/lodash-es/_arrayAggregator.js
  3950. function arrayAggregator(array4, setter, iteratee2, accumulator) {
  3951. var index = -1, length = array4 == null ? 0 : array4.length;
  3952. while (++index < length) {
  3953. var value = array4[index];
  3954. setter(accumulator, value, iteratee2(value), array4);
  3955. }
  3956. return accumulator;
  3957. }
  3958. var arrayAggregator_default = arrayAggregator;
  3959. // node_modules/lodash-es/_createBaseFor.js
  3960. function createBaseFor(fromRight) {
  3961. return function(object4, iteratee2, keysFunc) {
  3962. var index = -1, iterable = Object(object4), props = keysFunc(object4), length = props.length;
  3963. while (length--) {
  3964. var key = props[fromRight ? length : ++index];
  3965. if (iteratee2(iterable[key], key, iterable) === false) {
  3966. break;
  3967. }
  3968. }
  3969. return object4;
  3970. };
  3971. }
  3972. var createBaseFor_default = createBaseFor;
  3973. // node_modules/lodash-es/_baseFor.js
  3974. var baseFor = createBaseFor_default();
  3975. var baseFor_default = baseFor;
  3976. // node_modules/lodash-es/_baseForOwn.js
  3977. function baseForOwn(object4, iteratee2) {
  3978. return object4 && baseFor_default(object4, iteratee2, keys_default);
  3979. }
  3980. var baseForOwn_default = baseForOwn;
  3981. // node_modules/lodash-es/_createBaseEach.js
  3982. function createBaseEach(eachFunc, fromRight) {
  3983. return function(collection, iteratee2) {
  3984. if (collection == null) {
  3985. return collection;
  3986. }
  3987. if (!isArrayLike_default(collection)) {
  3988. return eachFunc(collection, iteratee2);
  3989. }
  3990. var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
  3991. while (fromRight ? index-- : ++index < length) {
  3992. if (iteratee2(iterable[index], index, iterable) === false) {
  3993. break;
  3994. }
  3995. }
  3996. return collection;
  3997. };
  3998. }
  3999. var createBaseEach_default = createBaseEach;
  4000. // node_modules/lodash-es/_baseEach.js
  4001. var baseEach = createBaseEach_default(baseForOwn_default);
  4002. var baseEach_default = baseEach;
  4003. // node_modules/lodash-es/_baseAggregator.js
  4004. function baseAggregator(collection, setter, iteratee2, accumulator) {
  4005. baseEach_default(collection, function(value, key, collection2) {
  4006. setter(accumulator, value, iteratee2(value), collection2);
  4007. });
  4008. return accumulator;
  4009. }
  4010. var baseAggregator_default = baseAggregator;
  4011. // node_modules/lodash-es/_createAggregator.js
  4012. function createAggregator(setter, initializer) {
  4013. return function(collection, iteratee2) {
  4014. var func = isArray_default(collection) ? arrayAggregator_default : baseAggregator_default, accumulator = initializer ? initializer() : {};
  4015. return func(collection, setter, baseIteratee_default(iteratee2, 2), accumulator);
  4016. };
  4017. }
  4018. var createAggregator_default = createAggregator;
  4019. // node_modules/lodash-es/countBy.js
  4020. var objectProto20 = Object.prototype;
  4021. var hasOwnProperty17 = objectProto20.hasOwnProperty;
  4022. var countBy = createAggregator_default(function(result2, value, key) {
  4023. if (hasOwnProperty17.call(result2, key)) {
  4024. ++result2[key];
  4025. } else {
  4026. baseAssignValue_default(result2, key, 1);
  4027. }
  4028. });
  4029. var countBy_default = countBy;
  4030. // node_modules/lodash-es/create.js
  4031. function create(prototype, properties) {
  4032. var result2 = baseCreate_default(prototype);
  4033. return properties == null ? result2 : baseAssign_default(result2, properties);
  4034. }
  4035. var create_default = create;
  4036. // node_modules/lodash-es/curry.js
  4037. var WRAP_CURRY_FLAG6 = 8;
  4038. function curry(func, arity, guard) {
  4039. arity = guard ? void 0 : arity;
  4040. var result2 = createWrap_default(func, WRAP_CURRY_FLAG6, void 0, void 0, void 0, void 0, void 0, arity);
  4041. result2.placeholder = curry.placeholder;
  4042. return result2;
  4043. }
  4044. curry.placeholder = {};
  4045. var curry_default = curry;
  4046. // node_modules/lodash-es/curryRight.js
  4047. var WRAP_CURRY_RIGHT_FLAG4 = 16;
  4048. function curryRight(func, arity, guard) {
  4049. arity = guard ? void 0 : arity;
  4050. var result2 = createWrap_default(func, WRAP_CURRY_RIGHT_FLAG4, void 0, void 0, void 0, void 0, void 0, arity);
  4051. result2.placeholder = curryRight.placeholder;
  4052. return result2;
  4053. }
  4054. curryRight.placeholder = {};
  4055. var curryRight_default = curryRight;
  4056. // node_modules/lodash-es/now.js
  4057. var now = function() {
  4058. return root_default.Date.now();
  4059. };
  4060. var now_default = now;
  4061. // node_modules/lodash-es/debounce.js
  4062. var FUNC_ERROR_TEXT6 = "Expected a function";
  4063. var nativeMax6 = Math.max;
  4064. var nativeMin4 = Math.min;
  4065. function debounce(func, wait, options) {
  4066. var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  4067. if (typeof func != "function") {
  4068. throw new TypeError(FUNC_ERROR_TEXT6);
  4069. }
  4070. wait = toNumber_default(wait) || 0;
  4071. if (isObject_default(options)) {
  4072. leading = !!options.leading;
  4073. maxing = "maxWait" in options;
  4074. maxWait = maxing ? nativeMax6(toNumber_default(options.maxWait) || 0, wait) : maxWait;
  4075. trailing = "trailing" in options ? !!options.trailing : trailing;
  4076. }
  4077. function invokeFunc(time) {
  4078. var args = lastArgs, thisArg = lastThis;
  4079. lastArgs = lastThis = void 0;
  4080. lastInvokeTime = time;
  4081. result2 = func.apply(thisArg, args);
  4082. return result2;
  4083. }
  4084. function leadingEdge(time) {
  4085. lastInvokeTime = time;
  4086. timerId = setTimeout(timerExpired, wait);
  4087. return leading ? invokeFunc(time) : result2;
  4088. }
  4089. function remainingWait(time) {
  4090. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  4091. return maxing ? nativeMin4(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  4092. }
  4093. function shouldInvoke(time) {
  4094. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
  4095. return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  4096. }
  4097. function timerExpired() {
  4098. var time = now_default();
  4099. if (shouldInvoke(time)) {
  4100. return trailingEdge(time);
  4101. }
  4102. timerId = setTimeout(timerExpired, remainingWait(time));
  4103. }
  4104. function trailingEdge(time) {
  4105. timerId = void 0;
  4106. if (trailing && lastArgs) {
  4107. return invokeFunc(time);
  4108. }
  4109. lastArgs = lastThis = void 0;
  4110. return result2;
  4111. }
  4112. function cancel() {
  4113. if (timerId !== void 0) {
  4114. clearTimeout(timerId);
  4115. }
  4116. lastInvokeTime = 0;
  4117. lastArgs = lastCallTime = lastThis = timerId = void 0;
  4118. }
  4119. function flush() {
  4120. return timerId === void 0 ? result2 : trailingEdge(now_default());
  4121. }
  4122. function debounced() {
  4123. var time = now_default(), isInvoking = shouldInvoke(time);
  4124. lastArgs = arguments;
  4125. lastThis = this;
  4126. lastCallTime = time;
  4127. if (isInvoking) {
  4128. if (timerId === void 0) {
  4129. return leadingEdge(lastCallTime);
  4130. }
  4131. if (maxing) {
  4132. clearTimeout(timerId);
  4133. timerId = setTimeout(timerExpired, wait);
  4134. return invokeFunc(lastCallTime);
  4135. }
  4136. }
  4137. if (timerId === void 0) {
  4138. timerId = setTimeout(timerExpired, wait);
  4139. }
  4140. return result2;
  4141. }
  4142. debounced.cancel = cancel;
  4143. debounced.flush = flush;
  4144. return debounced;
  4145. }
  4146. var debounce_default = debounce;
  4147. // node_modules/lodash-es/defaultTo.js
  4148. function defaultTo(value, defaultValue) {
  4149. return value == null || value !== value ? defaultValue : value;
  4150. }
  4151. var defaultTo_default = defaultTo;
  4152. // node_modules/lodash-es/defaults.js
  4153. var objectProto21 = Object.prototype;
  4154. var hasOwnProperty18 = objectProto21.hasOwnProperty;
  4155. var defaults = baseRest_default(function(object4, sources) {
  4156. object4 = Object(object4);
  4157. var index = -1;
  4158. var length = sources.length;
  4159. var guard = length > 2 ? sources[2] : void 0;
  4160. if (guard && isIterateeCall_default(sources[0], sources[1], guard)) {
  4161. length = 1;
  4162. }
  4163. while (++index < length) {
  4164. var source = sources[index];
  4165. var props = keysIn_default(source);
  4166. var propsIndex = -1;
  4167. var propsLength = props.length;
  4168. while (++propsIndex < propsLength) {
  4169. var key = props[propsIndex];
  4170. var value = object4[key];
  4171. if (value === void 0 || eq_default(value, objectProto21[key]) && !hasOwnProperty18.call(object4, key)) {
  4172. object4[key] = source[key];
  4173. }
  4174. }
  4175. }
  4176. return object4;
  4177. });
  4178. var defaults_default = defaults;
  4179. // node_modules/lodash-es/_assignMergeValue.js
  4180. function assignMergeValue(object4, key, value) {
  4181. if (value !== void 0 && !eq_default(object4[key], value) || value === void 0 && !(key in object4)) {
  4182. baseAssignValue_default(object4, key, value);
  4183. }
  4184. }
  4185. var assignMergeValue_default = assignMergeValue;
  4186. // node_modules/lodash-es/isArrayLikeObject.js
  4187. function isArrayLikeObject(value) {
  4188. return isObjectLike_default(value) && isArrayLike_default(value);
  4189. }
  4190. var isArrayLikeObject_default = isArrayLikeObject;
  4191. // node_modules/lodash-es/_safeGet.js
  4192. function safeGet(object4, key) {
  4193. if (key === "constructor" && typeof object4[key] === "function") {
  4194. return;
  4195. }
  4196. if (key == "__proto__") {
  4197. return;
  4198. }
  4199. return object4[key];
  4200. }
  4201. var safeGet_default = safeGet;
  4202. // node_modules/lodash-es/toPlainObject.js
  4203. function toPlainObject(value) {
  4204. return copyObject_default(value, keysIn_default(value));
  4205. }
  4206. var toPlainObject_default = toPlainObject;
  4207. // node_modules/lodash-es/_baseMergeDeep.js
  4208. function baseMergeDeep(object4, source, key, srcIndex, mergeFunc, customizer, stack) {
  4209. var objValue = safeGet_default(object4, key), srcValue = safeGet_default(source, key), stacked = stack.get(srcValue);
  4210. if (stacked) {
  4211. assignMergeValue_default(object4, key, stacked);
  4212. return;
  4213. }
  4214. var newValue = customizer ? customizer(objValue, srcValue, key + "", object4, source, stack) : void 0;
  4215. var isCommon = newValue === void 0;
  4216. if (isCommon) {
  4217. var isArr = isArray_default(srcValue), isBuff = !isArr && isBuffer_default(srcValue), isTyped = !isArr && !isBuff && isTypedArray_default(srcValue);
  4218. newValue = srcValue;
  4219. if (isArr || isBuff || isTyped) {
  4220. if (isArray_default(objValue)) {
  4221. newValue = objValue;
  4222. } else if (isArrayLikeObject_default(objValue)) {
  4223. newValue = copyArray_default(objValue);
  4224. } else if (isBuff) {
  4225. isCommon = false;
  4226. newValue = cloneBuffer_default(srcValue, true);
  4227. } else if (isTyped) {
  4228. isCommon = false;
  4229. newValue = cloneTypedArray_default(srcValue, true);
  4230. } else {
  4231. newValue = [];
  4232. }
  4233. } else if (isPlainObject_default(srcValue) || isArguments_default(srcValue)) {
  4234. newValue = objValue;
  4235. if (isArguments_default(objValue)) {
  4236. newValue = toPlainObject_default(objValue);
  4237. } else if (!isObject_default(objValue) || isFunction_default(objValue)) {
  4238. newValue = initCloneObject_default(srcValue);
  4239. }
  4240. } else {
  4241. isCommon = false;
  4242. }
  4243. }
  4244. if (isCommon) {
  4245. stack.set(srcValue, newValue);
  4246. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  4247. stack["delete"](srcValue);
  4248. }
  4249. assignMergeValue_default(object4, key, newValue);
  4250. }
  4251. var baseMergeDeep_default = baseMergeDeep;
  4252. // node_modules/lodash-es/_baseMerge.js
  4253. function baseMerge(object4, source, srcIndex, customizer, stack) {
  4254. if (object4 === source) {
  4255. return;
  4256. }
  4257. baseFor_default(source, function(srcValue, key) {
  4258. stack || (stack = new Stack_default());
  4259. if (isObject_default(srcValue)) {
  4260. baseMergeDeep_default(object4, source, key, srcIndex, baseMerge, customizer, stack);
  4261. } else {
  4262. var newValue = customizer ? customizer(safeGet_default(object4, key), srcValue, key + "", object4, source, stack) : void 0;
  4263. if (newValue === void 0) {
  4264. newValue = srcValue;
  4265. }
  4266. assignMergeValue_default(object4, key, newValue);
  4267. }
  4268. }, keysIn_default);
  4269. }
  4270. var baseMerge_default = baseMerge;
  4271. // node_modules/lodash-es/_customDefaultsMerge.js
  4272. function customDefaultsMerge(objValue, srcValue, key, object4, source, stack) {
  4273. if (isObject_default(objValue) && isObject_default(srcValue)) {
  4274. stack.set(srcValue, objValue);
  4275. baseMerge_default(objValue, srcValue, void 0, customDefaultsMerge, stack);
  4276. stack["delete"](srcValue);
  4277. }
  4278. return objValue;
  4279. }
  4280. var customDefaultsMerge_default = customDefaultsMerge;
  4281. // node_modules/lodash-es/mergeWith.js
  4282. var mergeWith = createAssigner_default(function(object4, source, srcIndex, customizer) {
  4283. baseMerge_default(object4, source, srcIndex, customizer);
  4284. });
  4285. var mergeWith_default = mergeWith;
  4286. // node_modules/lodash-es/defaultsDeep.js
  4287. var defaultsDeep = baseRest_default(function(args) {
  4288. args.push(void 0, customDefaultsMerge_default);
  4289. return apply_default(mergeWith_default, void 0, args);
  4290. });
  4291. var defaultsDeep_default = defaultsDeep;
  4292. // node_modules/lodash-es/_baseDelay.js
  4293. var FUNC_ERROR_TEXT7 = "Expected a function";
  4294. function baseDelay(func, wait, args) {
  4295. if (typeof func != "function") {
  4296. throw new TypeError(FUNC_ERROR_TEXT7);
  4297. }
  4298. return setTimeout(function() {
  4299. func.apply(void 0, args);
  4300. }, wait);
  4301. }
  4302. var baseDelay_default = baseDelay;
  4303. // node_modules/lodash-es/defer.js
  4304. var defer = baseRest_default(function(func, args) {
  4305. return baseDelay_default(func, 1, args);
  4306. });
  4307. var defer_default = defer;
  4308. // node_modules/lodash-es/delay.js
  4309. var delay = baseRest_default(function(func, wait, args) {
  4310. return baseDelay_default(func, toNumber_default(wait) || 0, args);
  4311. });
  4312. var delay_default = delay;
  4313. // node_modules/lodash-es/_arrayIncludesWith.js
  4314. function arrayIncludesWith(array4, value, comparator) {
  4315. var index = -1, length = array4 == null ? 0 : array4.length;
  4316. while (++index < length) {
  4317. if (comparator(value, array4[index])) {
  4318. return true;
  4319. }
  4320. }
  4321. return false;
  4322. }
  4323. var arrayIncludesWith_default = arrayIncludesWith;
  4324. // node_modules/lodash-es/_baseDifference.js
  4325. var LARGE_ARRAY_SIZE2 = 200;
  4326. function baseDifference(array4, values2, iteratee2, comparator) {
  4327. var index = -1, includes2 = arrayIncludes_default, isCommon = true, length = array4.length, result2 = [], valuesLength = values2.length;
  4328. if (!length) {
  4329. return result2;
  4330. }
  4331. if (iteratee2) {
  4332. values2 = arrayMap_default(values2, baseUnary_default(iteratee2));
  4333. }
  4334. if (comparator) {
  4335. includes2 = arrayIncludesWith_default;
  4336. isCommon = false;
  4337. } else if (values2.length >= LARGE_ARRAY_SIZE2) {
  4338. includes2 = cacheHas_default;
  4339. isCommon = false;
  4340. values2 = new SetCache_default(values2);
  4341. }
  4342. outer:
  4343. while (++index < length) {
  4344. var value = array4[index], computed3 = iteratee2 == null ? value : iteratee2(value);
  4345. value = comparator || value !== 0 ? value : 0;
  4346. if (isCommon && computed3 === computed3) {
  4347. var valuesIndex = valuesLength;
  4348. while (valuesIndex--) {
  4349. if (values2[valuesIndex] === computed3) {
  4350. continue outer;
  4351. }
  4352. }
  4353. result2.push(value);
  4354. } else if (!includes2(values2, computed3, comparator)) {
  4355. result2.push(value);
  4356. }
  4357. }
  4358. return result2;
  4359. }
  4360. var baseDifference_default = baseDifference;
  4361. // node_modules/lodash-es/difference.js
  4362. var difference = baseRest_default(function(array4, values2) {
  4363. return isArrayLikeObject_default(array4) ? baseDifference_default(array4, baseFlatten_default(values2, 1, isArrayLikeObject_default, true)) : [];
  4364. });
  4365. var difference_default = difference;
  4366. // node_modules/lodash-es/last.js
  4367. function last(array4) {
  4368. var length = array4 == null ? 0 : array4.length;
  4369. return length ? array4[length - 1] : void 0;
  4370. }
  4371. var last_default = last;
  4372. // node_modules/lodash-es/differenceBy.js
  4373. var differenceBy = baseRest_default(function(array4, values2) {
  4374. var iteratee2 = last_default(values2);
  4375. if (isArrayLikeObject_default(iteratee2)) {
  4376. iteratee2 = void 0;
  4377. }
  4378. return isArrayLikeObject_default(array4) ? baseDifference_default(array4, baseFlatten_default(values2, 1, isArrayLikeObject_default, true), baseIteratee_default(iteratee2, 2)) : [];
  4379. });
  4380. var differenceBy_default = differenceBy;
  4381. // node_modules/lodash-es/differenceWith.js
  4382. var differenceWith = baseRest_default(function(array4, values2) {
  4383. var comparator = last_default(values2);
  4384. if (isArrayLikeObject_default(comparator)) {
  4385. comparator = void 0;
  4386. }
  4387. return isArrayLikeObject_default(array4) ? baseDifference_default(array4, baseFlatten_default(values2, 1, isArrayLikeObject_default, true), void 0, comparator) : [];
  4388. });
  4389. var differenceWith_default = differenceWith;
  4390. // node_modules/lodash-es/divide.js
  4391. var divide = createMathOperation_default(function(dividend, divisor) {
  4392. return dividend / divisor;
  4393. }, 1);
  4394. var divide_default = divide;
  4395. // node_modules/lodash-es/drop.js
  4396. function drop(array4, n, guard) {
  4397. var length = array4 == null ? 0 : array4.length;
  4398. if (!length) {
  4399. return [];
  4400. }
  4401. n = guard || n === void 0 ? 1 : toInteger_default(n);
  4402. return baseSlice_default(array4, n < 0 ? 0 : n, length);
  4403. }
  4404. var drop_default = drop;
  4405. // node_modules/lodash-es/dropRight.js
  4406. function dropRight(array4, n, guard) {
  4407. var length = array4 == null ? 0 : array4.length;
  4408. if (!length) {
  4409. return [];
  4410. }
  4411. n = guard || n === void 0 ? 1 : toInteger_default(n);
  4412. n = length - n;
  4413. return baseSlice_default(array4, 0, n < 0 ? 0 : n);
  4414. }
  4415. var dropRight_default = dropRight;
  4416. // node_modules/lodash-es/_baseWhile.js
  4417. function baseWhile(array4, predicate, isDrop, fromRight) {
  4418. var length = array4.length, index = fromRight ? length : -1;
  4419. while ((fromRight ? index-- : ++index < length) && predicate(array4[index], index, array4)) {
  4420. }
  4421. return isDrop ? baseSlice_default(array4, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice_default(array4, fromRight ? index + 1 : 0, fromRight ? length : index);
  4422. }
  4423. var baseWhile_default = baseWhile;
  4424. // node_modules/lodash-es/dropRightWhile.js
  4425. function dropRightWhile(array4, predicate) {
  4426. return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3), true, true) : [];
  4427. }
  4428. var dropRightWhile_default = dropRightWhile;
  4429. // node_modules/lodash-es/dropWhile.js
  4430. function dropWhile(array4, predicate) {
  4431. return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3), true) : [];
  4432. }
  4433. var dropWhile_default = dropWhile;
  4434. // node_modules/lodash-es/_castFunction.js
  4435. function castFunction(value) {
  4436. return typeof value == "function" ? value : identity_default;
  4437. }
  4438. var castFunction_default = castFunction;
  4439. // node_modules/lodash-es/forEach.js
  4440. function forEach(collection, iteratee2) {
  4441. var func = isArray_default(collection) ? arrayEach_default : baseEach_default;
  4442. return func(collection, castFunction_default(iteratee2));
  4443. }
  4444. var forEach_default = forEach;
  4445. // node_modules/lodash-es/_arrayEachRight.js
  4446. function arrayEachRight(array4, iteratee2) {
  4447. var length = array4 == null ? 0 : array4.length;
  4448. while (length--) {
  4449. if (iteratee2(array4[length], length, array4) === false) {
  4450. break;
  4451. }
  4452. }
  4453. return array4;
  4454. }
  4455. var arrayEachRight_default = arrayEachRight;
  4456. // node_modules/lodash-es/_baseForRight.js
  4457. var baseForRight = createBaseFor_default(true);
  4458. var baseForRight_default = baseForRight;
  4459. // node_modules/lodash-es/_baseForOwnRight.js
  4460. function baseForOwnRight(object4, iteratee2) {
  4461. return object4 && baseForRight_default(object4, iteratee2, keys_default);
  4462. }
  4463. var baseForOwnRight_default = baseForOwnRight;
  4464. // node_modules/lodash-es/_baseEachRight.js
  4465. var baseEachRight = createBaseEach_default(baseForOwnRight_default, true);
  4466. var baseEachRight_default = baseEachRight;
  4467. // node_modules/lodash-es/forEachRight.js
  4468. function forEachRight(collection, iteratee2) {
  4469. var func = isArray_default(collection) ? arrayEachRight_default : baseEachRight_default;
  4470. return func(collection, castFunction_default(iteratee2));
  4471. }
  4472. var forEachRight_default = forEachRight;
  4473. // node_modules/lodash-es/endsWith.js
  4474. function endsWith(string3, target2, position) {
  4475. string3 = toString_default(string3);
  4476. target2 = baseToString_default(target2);
  4477. var length = string3.length;
  4478. position = position === void 0 ? length : baseClamp_default(toInteger_default(position), 0, length);
  4479. var end2 = position;
  4480. position -= target2.length;
  4481. return position >= 0 && string3.slice(position, end2) == target2;
  4482. }
  4483. var endsWith_default = endsWith;
  4484. // node_modules/lodash-es/_baseToPairs.js
  4485. function baseToPairs(object4, props) {
  4486. return arrayMap_default(props, function(key) {
  4487. return [key, object4[key]];
  4488. });
  4489. }
  4490. var baseToPairs_default = baseToPairs;
  4491. // node_modules/lodash-es/_setToPairs.js
  4492. function setToPairs(set4) {
  4493. var index = -1, result2 = Array(set4.size);
  4494. set4.forEach(function(value) {
  4495. result2[++index] = [value, value];
  4496. });
  4497. return result2;
  4498. }
  4499. var setToPairs_default = setToPairs;
  4500. // node_modules/lodash-es/_createToPairs.js
  4501. var mapTag7 = "[object Map]";
  4502. var setTag7 = "[object Set]";
  4503. function createToPairs(keysFunc) {
  4504. return function(object4) {
  4505. var tag = getTag_default(object4);
  4506. if (tag == mapTag7) {
  4507. return mapToArray_default(object4);
  4508. }
  4509. if (tag == setTag7) {
  4510. return setToPairs_default(object4);
  4511. }
  4512. return baseToPairs_default(object4, keysFunc(object4));
  4513. };
  4514. }
  4515. var createToPairs_default = createToPairs;
  4516. // node_modules/lodash-es/toPairs.js
  4517. var toPairs = createToPairs_default(keys_default);
  4518. var toPairs_default = toPairs;
  4519. // node_modules/lodash-es/toPairsIn.js
  4520. var toPairsIn = createToPairs_default(keysIn_default);
  4521. var toPairsIn_default = toPairsIn;
  4522. // node_modules/lodash-es/_escapeHtmlChar.js
  4523. var htmlEscapes = {
  4524. "&": "&amp;",
  4525. "<": "&lt;",
  4526. ">": "&gt;",
  4527. '"': "&quot;",
  4528. "'": "&#39;"
  4529. };
  4530. var escapeHtmlChar = basePropertyOf_default(htmlEscapes);
  4531. var escapeHtmlChar_default = escapeHtmlChar;
  4532. // node_modules/lodash-es/escape.js
  4533. var reUnescapedHtml = /[&<>"']/g;
  4534. var reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  4535. function escape(string3) {
  4536. string3 = toString_default(string3);
  4537. return string3 && reHasUnescapedHtml.test(string3) ? string3.replace(reUnescapedHtml, escapeHtmlChar_default) : string3;
  4538. }
  4539. var escape_default = escape;
  4540. // node_modules/lodash-es/escapeRegExp.js
  4541. var reRegExpChar2 = /[\\^$.*+?()[\]{}|]/g;
  4542. var reHasRegExpChar = RegExp(reRegExpChar2.source);
  4543. function escapeRegExp(string3) {
  4544. string3 = toString_default(string3);
  4545. return string3 && reHasRegExpChar.test(string3) ? string3.replace(reRegExpChar2, "\\$&") : string3;
  4546. }
  4547. var escapeRegExp_default = escapeRegExp;
  4548. // node_modules/lodash-es/_arrayEvery.js
  4549. function arrayEvery(array4, predicate) {
  4550. var index = -1, length = array4 == null ? 0 : array4.length;
  4551. while (++index < length) {
  4552. if (!predicate(array4[index], index, array4)) {
  4553. return false;
  4554. }
  4555. }
  4556. return true;
  4557. }
  4558. var arrayEvery_default = arrayEvery;
  4559. // node_modules/lodash-es/_baseEvery.js
  4560. function baseEvery(collection, predicate) {
  4561. var result2 = true;
  4562. baseEach_default(collection, function(value, index, collection2) {
  4563. result2 = !!predicate(value, index, collection2);
  4564. return result2;
  4565. });
  4566. return result2;
  4567. }
  4568. var baseEvery_default = baseEvery;
  4569. // node_modules/lodash-es/every.js
  4570. function every(collection, predicate, guard) {
  4571. var func = isArray_default(collection) ? arrayEvery_default : baseEvery_default;
  4572. if (guard && isIterateeCall_default(collection, predicate, guard)) {
  4573. predicate = void 0;
  4574. }
  4575. return func(collection, baseIteratee_default(predicate, 3));
  4576. }
  4577. var every_default = every;
  4578. // node_modules/lodash-es/toLength.js
  4579. var MAX_ARRAY_LENGTH2 = 4294967295;
  4580. function toLength(value) {
  4581. return value ? baseClamp_default(toInteger_default(value), 0, MAX_ARRAY_LENGTH2) : 0;
  4582. }
  4583. var toLength_default = toLength;
  4584. // node_modules/lodash-es/_baseFill.js
  4585. function baseFill(array4, value, start, end2) {
  4586. var length = array4.length;
  4587. start = toInteger_default(start);
  4588. if (start < 0) {
  4589. start = -start > length ? 0 : length + start;
  4590. }
  4591. end2 = end2 === void 0 || end2 > length ? length : toInteger_default(end2);
  4592. if (end2 < 0) {
  4593. end2 += length;
  4594. }
  4595. end2 = start > end2 ? 0 : toLength_default(end2);
  4596. while (start < end2) {
  4597. array4[start++] = value;
  4598. }
  4599. return array4;
  4600. }
  4601. var baseFill_default = baseFill;
  4602. // node_modules/lodash-es/fill.js
  4603. function fill(array4, value, start, end2) {
  4604. var length = array4 == null ? 0 : array4.length;
  4605. if (!length) {
  4606. return [];
  4607. }
  4608. if (start && typeof start != "number" && isIterateeCall_default(array4, value, start)) {
  4609. start = 0;
  4610. end2 = length;
  4611. }
  4612. return baseFill_default(array4, value, start, end2);
  4613. }
  4614. var fill_default = fill;
  4615. // node_modules/lodash-es/_baseFilter.js
  4616. function baseFilter(collection, predicate) {
  4617. var result2 = [];
  4618. baseEach_default(collection, function(value, index, collection2) {
  4619. if (predicate(value, index, collection2)) {
  4620. result2.push(value);
  4621. }
  4622. });
  4623. return result2;
  4624. }
  4625. var baseFilter_default = baseFilter;
  4626. // node_modules/lodash-es/filter.js
  4627. function filter(collection, predicate) {
  4628. var func = isArray_default(collection) ? arrayFilter_default : baseFilter_default;
  4629. return func(collection, baseIteratee_default(predicate, 3));
  4630. }
  4631. var filter_default = filter;
  4632. // node_modules/lodash-es/_createFind.js
  4633. function createFind(findIndexFunc) {
  4634. return function(collection, predicate, fromIndex) {
  4635. var iterable = Object(collection);
  4636. if (!isArrayLike_default(collection)) {
  4637. var iteratee2 = baseIteratee_default(predicate, 3);
  4638. collection = keys_default(collection);
  4639. predicate = function(key) {
  4640. return iteratee2(iterable[key], key, iterable);
  4641. };
  4642. }
  4643. var index = findIndexFunc(collection, predicate, fromIndex);
  4644. return index > -1 ? iterable[iteratee2 ? collection[index] : index] : void 0;
  4645. };
  4646. }
  4647. var createFind_default = createFind;
  4648. // node_modules/lodash-es/findIndex.js
  4649. var nativeMax7 = Math.max;
  4650. function findIndex(array4, predicate, fromIndex) {
  4651. var length = array4 == null ? 0 : array4.length;
  4652. if (!length) {
  4653. return -1;
  4654. }
  4655. var index = fromIndex == null ? 0 : toInteger_default(fromIndex);
  4656. if (index < 0) {
  4657. index = nativeMax7(length + index, 0);
  4658. }
  4659. return baseFindIndex_default(array4, baseIteratee_default(predicate, 3), index);
  4660. }
  4661. var findIndex_default = findIndex;
  4662. // node_modules/lodash-es/find.js
  4663. var find = createFind_default(findIndex_default);
  4664. var find_default = find;
  4665. // node_modules/lodash-es/_baseFindKey.js
  4666. function baseFindKey(collection, predicate, eachFunc) {
  4667. var result2;
  4668. eachFunc(collection, function(value, key, collection2) {
  4669. if (predicate(value, key, collection2)) {
  4670. result2 = key;
  4671. return false;
  4672. }
  4673. });
  4674. return result2;
  4675. }
  4676. var baseFindKey_default = baseFindKey;
  4677. // node_modules/lodash-es/findKey.js
  4678. function findKey(object4, predicate) {
  4679. return baseFindKey_default(object4, baseIteratee_default(predicate, 3), baseForOwn_default);
  4680. }
  4681. var findKey_default = findKey;
  4682. // node_modules/lodash-es/findLastIndex.js
  4683. var nativeMax8 = Math.max;
  4684. var nativeMin5 = Math.min;
  4685. function findLastIndex(array4, predicate, fromIndex) {
  4686. var length = array4 == null ? 0 : array4.length;
  4687. if (!length) {
  4688. return -1;
  4689. }
  4690. var index = length - 1;
  4691. if (fromIndex !== void 0) {
  4692. index = toInteger_default(fromIndex);
  4693. index = fromIndex < 0 ? nativeMax8(length + index, 0) : nativeMin5(index, length - 1);
  4694. }
  4695. return baseFindIndex_default(array4, baseIteratee_default(predicate, 3), index, true);
  4696. }
  4697. var findLastIndex_default = findLastIndex;
  4698. // node_modules/lodash-es/findLast.js
  4699. var findLast = createFind_default(findLastIndex_default);
  4700. var findLast_default = findLast;
  4701. // node_modules/lodash-es/findLastKey.js
  4702. function findLastKey(object4, predicate) {
  4703. return baseFindKey_default(object4, baseIteratee_default(predicate, 3), baseForOwnRight_default);
  4704. }
  4705. var findLastKey_default = findLastKey;
  4706. // node_modules/lodash-es/head.js
  4707. function head(array4) {
  4708. return array4 && array4.length ? array4[0] : void 0;
  4709. }
  4710. var head_default = head;
  4711. // node_modules/lodash-es/_baseMap.js
  4712. function baseMap(collection, iteratee2) {
  4713. var index = -1, result2 = isArrayLike_default(collection) ? Array(collection.length) : [];
  4714. baseEach_default(collection, function(value, key, collection2) {
  4715. result2[++index] = iteratee2(value, key, collection2);
  4716. });
  4717. return result2;
  4718. }
  4719. var baseMap_default = baseMap;
  4720. // node_modules/lodash-es/map.js
  4721. function map(collection, iteratee2) {
  4722. var func = isArray_default(collection) ? arrayMap_default : baseMap_default;
  4723. return func(collection, baseIteratee_default(iteratee2, 3));
  4724. }
  4725. var map_default = map;
  4726. // node_modules/lodash-es/flatMap.js
  4727. function flatMap(collection, iteratee2) {
  4728. return baseFlatten_default(map_default(collection, iteratee2), 1);
  4729. }
  4730. var flatMap_default = flatMap;
  4731. // node_modules/lodash-es/flatMapDeep.js
  4732. var INFINITY4 = 1 / 0;
  4733. function flatMapDeep(collection, iteratee2) {
  4734. return baseFlatten_default(map_default(collection, iteratee2), INFINITY4);
  4735. }
  4736. var flatMapDeep_default = flatMapDeep;
  4737. // node_modules/lodash-es/flatMapDepth.js
  4738. function flatMapDepth(collection, iteratee2, depth) {
  4739. depth = depth === void 0 ? 1 : toInteger_default(depth);
  4740. return baseFlatten_default(map_default(collection, iteratee2), depth);
  4741. }
  4742. var flatMapDepth_default = flatMapDepth;
  4743. // node_modules/lodash-es/flattenDeep.js
  4744. var INFINITY5 = 1 / 0;
  4745. function flattenDeep(array4) {
  4746. var length = array4 == null ? 0 : array4.length;
  4747. return length ? baseFlatten_default(array4, INFINITY5) : [];
  4748. }
  4749. var flattenDeep_default = flattenDeep;
  4750. // node_modules/lodash-es/flattenDepth.js
  4751. function flattenDepth(array4, depth) {
  4752. var length = array4 == null ? 0 : array4.length;
  4753. if (!length) {
  4754. return [];
  4755. }
  4756. depth = depth === void 0 ? 1 : toInteger_default(depth);
  4757. return baseFlatten_default(array4, depth);
  4758. }
  4759. var flattenDepth_default = flattenDepth;
  4760. // node_modules/lodash-es/flip.js
  4761. var WRAP_FLIP_FLAG3 = 512;
  4762. function flip(func) {
  4763. return createWrap_default(func, WRAP_FLIP_FLAG3);
  4764. }
  4765. var flip_default = flip;
  4766. // node_modules/lodash-es/floor.js
  4767. var floor = createRound_default("floor");
  4768. var floor_default = floor;
  4769. // node_modules/lodash-es/_createFlow.js
  4770. var FUNC_ERROR_TEXT8 = "Expected a function";
  4771. var WRAP_CURRY_FLAG7 = 8;
  4772. var WRAP_PARTIAL_FLAG6 = 32;
  4773. var WRAP_ARY_FLAG5 = 128;
  4774. var WRAP_REARG_FLAG3 = 256;
  4775. function createFlow(fromRight) {
  4776. return flatRest_default(function(funcs) {
  4777. var length = funcs.length, index = length, prereq = LodashWrapper_default.prototype.thru;
  4778. if (fromRight) {
  4779. funcs.reverse();
  4780. }
  4781. while (index--) {
  4782. var func = funcs[index];
  4783. if (typeof func != "function") {
  4784. throw new TypeError(FUNC_ERROR_TEXT8);
  4785. }
  4786. if (prereq && !wrapper && getFuncName_default(func) == "wrapper") {
  4787. var wrapper = new LodashWrapper_default([], true);
  4788. }
  4789. }
  4790. index = wrapper ? index : length;
  4791. while (++index < length) {
  4792. func = funcs[index];
  4793. var funcName = getFuncName_default(func), data = funcName == "wrapper" ? getData_default(func) : void 0;
  4794. if (data && isLaziable_default(data[0]) && data[1] == (WRAP_ARY_FLAG5 | WRAP_CURRY_FLAG7 | WRAP_PARTIAL_FLAG6 | WRAP_REARG_FLAG3) && !data[4].length && data[9] == 1) {
  4795. wrapper = wrapper[getFuncName_default(data[0])].apply(wrapper, data[3]);
  4796. } else {
  4797. wrapper = func.length == 1 && isLaziable_default(func) ? wrapper[funcName]() : wrapper.thru(func);
  4798. }
  4799. }
  4800. return function() {
  4801. var args = arguments, value = args[0];
  4802. if (wrapper && args.length == 1 && isArray_default(value)) {
  4803. return wrapper.plant(value).value();
  4804. }
  4805. var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
  4806. while (++index2 < length) {
  4807. result2 = funcs[index2].call(this, result2);
  4808. }
  4809. return result2;
  4810. };
  4811. });
  4812. }
  4813. var createFlow_default = createFlow;
  4814. // node_modules/lodash-es/flow.js
  4815. var flow = createFlow_default();
  4816. var flow_default = flow;
  4817. // node_modules/lodash-es/flowRight.js
  4818. var flowRight = createFlow_default(true);
  4819. var flowRight_default = flowRight;
  4820. // node_modules/lodash-es/forIn.js
  4821. function forIn(object4, iteratee2) {
  4822. return object4 == null ? object4 : baseFor_default(object4, castFunction_default(iteratee2), keysIn_default);
  4823. }
  4824. var forIn_default = forIn;
  4825. // node_modules/lodash-es/forInRight.js
  4826. function forInRight(object4, iteratee2) {
  4827. return object4 == null ? object4 : baseForRight_default(object4, castFunction_default(iteratee2), keysIn_default);
  4828. }
  4829. var forInRight_default = forInRight;
  4830. // node_modules/lodash-es/forOwn.js
  4831. function forOwn(object4, iteratee2) {
  4832. return object4 && baseForOwn_default(object4, castFunction_default(iteratee2));
  4833. }
  4834. var forOwn_default = forOwn;
  4835. // node_modules/lodash-es/forOwnRight.js
  4836. function forOwnRight(object4, iteratee2) {
  4837. return object4 && baseForOwnRight_default(object4, castFunction_default(iteratee2));
  4838. }
  4839. var forOwnRight_default = forOwnRight;
  4840. // node_modules/lodash-es/fromPairs.js
  4841. function fromPairs(pairs) {
  4842. var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
  4843. while (++index < length) {
  4844. var pair = pairs[index];
  4845. result2[pair[0]] = pair[1];
  4846. }
  4847. return result2;
  4848. }
  4849. var fromPairs_default = fromPairs;
  4850. // node_modules/lodash-es/_baseFunctions.js
  4851. function baseFunctions(object4, props) {
  4852. return arrayFilter_default(props, function(key) {
  4853. return isFunction_default(object4[key]);
  4854. });
  4855. }
  4856. var baseFunctions_default = baseFunctions;
  4857. // node_modules/lodash-es/functions.js
  4858. function functions(object4) {
  4859. return object4 == null ? [] : baseFunctions_default(object4, keys_default(object4));
  4860. }
  4861. var functions_default = functions;
  4862. // node_modules/lodash-es/functionsIn.js
  4863. function functionsIn(object4) {
  4864. return object4 == null ? [] : baseFunctions_default(object4, keysIn_default(object4));
  4865. }
  4866. var functionsIn_default = functionsIn;
  4867. // node_modules/lodash-es/groupBy.js
  4868. var objectProto22 = Object.prototype;
  4869. var hasOwnProperty19 = objectProto22.hasOwnProperty;
  4870. var groupBy = createAggregator_default(function(result2, value, key) {
  4871. if (hasOwnProperty19.call(result2, key)) {
  4872. result2[key].push(value);
  4873. } else {
  4874. baseAssignValue_default(result2, key, [value]);
  4875. }
  4876. });
  4877. var groupBy_default = groupBy;
  4878. // node_modules/lodash-es/_baseGt.js
  4879. function baseGt(value, other) {
  4880. return value > other;
  4881. }
  4882. var baseGt_default = baseGt;
  4883. // node_modules/lodash-es/_createRelationalOperation.js
  4884. function createRelationalOperation(operator) {
  4885. return function(value, other) {
  4886. if (!(typeof value == "string" && typeof other == "string")) {
  4887. value = toNumber_default(value);
  4888. other = toNumber_default(other);
  4889. }
  4890. return operator(value, other);
  4891. };
  4892. }
  4893. var createRelationalOperation_default = createRelationalOperation;
  4894. // node_modules/lodash-es/gt.js
  4895. var gt = createRelationalOperation_default(baseGt_default);
  4896. var gt_default = gt;
  4897. // node_modules/lodash-es/gte.js
  4898. var gte = createRelationalOperation_default(function(value, other) {
  4899. return value >= other;
  4900. });
  4901. var gte_default = gte;
  4902. // node_modules/lodash-es/_baseHas.js
  4903. var objectProto23 = Object.prototype;
  4904. var hasOwnProperty20 = objectProto23.hasOwnProperty;
  4905. function baseHas(object4, key) {
  4906. return object4 != null && hasOwnProperty20.call(object4, key);
  4907. }
  4908. var baseHas_default = baseHas;
  4909. // node_modules/lodash-es/has.js
  4910. function has(object4, path) {
  4911. return object4 != null && hasPath_default(object4, path, baseHas_default);
  4912. }
  4913. var has_default = has;
  4914. // node_modules/lodash-es/_baseInRange.js
  4915. var nativeMax9 = Math.max;
  4916. var nativeMin6 = Math.min;
  4917. function baseInRange(number4, start, end2) {
  4918. return number4 >= nativeMin6(start, end2) && number4 < nativeMax9(start, end2);
  4919. }
  4920. var baseInRange_default = baseInRange;
  4921. // node_modules/lodash-es/inRange.js
  4922. function inRange(number4, start, end2) {
  4923. start = toFinite_default(start);
  4924. if (end2 === void 0) {
  4925. end2 = start;
  4926. start = 0;
  4927. } else {
  4928. end2 = toFinite_default(end2);
  4929. }
  4930. number4 = toNumber_default(number4);
  4931. return baseInRange_default(number4, start, end2);
  4932. }
  4933. var inRange_default = inRange;
  4934. // node_modules/lodash-es/isString.js
  4935. var stringTag5 = "[object String]";
  4936. function isString2(value) {
  4937. return typeof value == "string" || !isArray_default(value) && isObjectLike_default(value) && baseGetTag_default(value) == stringTag5;
  4938. }
  4939. var isString_default = isString2;
  4940. // node_modules/lodash-es/_baseValues.js
  4941. function baseValues(object4, props) {
  4942. return arrayMap_default(props, function(key) {
  4943. return object4[key];
  4944. });
  4945. }
  4946. var baseValues_default = baseValues;
  4947. // node_modules/lodash-es/values.js
  4948. function values(object4) {
  4949. return object4 == null ? [] : baseValues_default(object4, keys_default(object4));
  4950. }
  4951. var values_default = values;
  4952. // node_modules/lodash-es/includes.js
  4953. var nativeMax10 = Math.max;
  4954. function includes(collection, value, fromIndex, guard) {
  4955. collection = isArrayLike_default(collection) ? collection : values_default(collection);
  4956. fromIndex = fromIndex && !guard ? toInteger_default(fromIndex) : 0;
  4957. var length = collection.length;
  4958. if (fromIndex < 0) {
  4959. fromIndex = nativeMax10(length + fromIndex, 0);
  4960. }
  4961. return isString_default(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf_default(collection, value, fromIndex) > -1;
  4962. }
  4963. var includes_default = includes;
  4964. // node_modules/lodash-es/indexOf.js
  4965. var nativeMax11 = Math.max;
  4966. function indexOf(array4, value, fromIndex) {
  4967. var length = array4 == null ? 0 : array4.length;
  4968. if (!length) {
  4969. return -1;
  4970. }
  4971. var index = fromIndex == null ? 0 : toInteger_default(fromIndex);
  4972. if (index < 0) {
  4973. index = nativeMax11(length + index, 0);
  4974. }
  4975. return baseIndexOf_default(array4, value, index);
  4976. }
  4977. var indexOf_default = indexOf;
  4978. // node_modules/lodash-es/initial.js
  4979. function initial(array4) {
  4980. var length = array4 == null ? 0 : array4.length;
  4981. return length ? baseSlice_default(array4, 0, -1) : [];
  4982. }
  4983. var initial_default = initial;
  4984. // node_modules/lodash-es/_baseIntersection.js
  4985. var nativeMin7 = Math.min;
  4986. function baseIntersection(arrays, iteratee2, comparator) {
  4987. var includes2 = comparator ? arrayIncludesWith_default : arrayIncludes_default, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result2 = [];
  4988. while (othIndex--) {
  4989. var array4 = arrays[othIndex];
  4990. if (othIndex && iteratee2) {
  4991. array4 = arrayMap_default(array4, baseUnary_default(iteratee2));
  4992. }
  4993. maxLength = nativeMin7(array4.length, maxLength);
  4994. caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array4.length >= 120) ? new SetCache_default(othIndex && array4) : void 0;
  4995. }
  4996. array4 = arrays[0];
  4997. var index = -1, seen = caches[0];
  4998. outer:
  4999. while (++index < length && result2.length < maxLength) {
  5000. var value = array4[index], computed3 = iteratee2 ? iteratee2(value) : value;
  5001. value = comparator || value !== 0 ? value : 0;
  5002. if (!(seen ? cacheHas_default(seen, computed3) : includes2(result2, computed3, comparator))) {
  5003. othIndex = othLength;
  5004. while (--othIndex) {
  5005. var cache2 = caches[othIndex];
  5006. if (!(cache2 ? cacheHas_default(cache2, computed3) : includes2(arrays[othIndex], computed3, comparator))) {
  5007. continue outer;
  5008. }
  5009. }
  5010. if (seen) {
  5011. seen.push(computed3);
  5012. }
  5013. result2.push(value);
  5014. }
  5015. }
  5016. return result2;
  5017. }
  5018. var baseIntersection_default = baseIntersection;
  5019. // node_modules/lodash-es/_castArrayLikeObject.js
  5020. function castArrayLikeObject(value) {
  5021. return isArrayLikeObject_default(value) ? value : [];
  5022. }
  5023. var castArrayLikeObject_default = castArrayLikeObject;
  5024. // node_modules/lodash-es/intersection.js
  5025. var intersection = baseRest_default(function(arrays) {
  5026. var mapped = arrayMap_default(arrays, castArrayLikeObject_default);
  5027. return mapped.length && mapped[0] === arrays[0] ? baseIntersection_default(mapped) : [];
  5028. });
  5029. var intersection_default = intersection;
  5030. // node_modules/lodash-es/intersectionBy.js
  5031. var intersectionBy = baseRest_default(function(arrays) {
  5032. var iteratee2 = last_default(arrays), mapped = arrayMap_default(arrays, castArrayLikeObject_default);
  5033. if (iteratee2 === last_default(mapped)) {
  5034. iteratee2 = void 0;
  5035. } else {
  5036. mapped.pop();
  5037. }
  5038. return mapped.length && mapped[0] === arrays[0] ? baseIntersection_default(mapped, baseIteratee_default(iteratee2, 2)) : [];
  5039. });
  5040. var intersectionBy_default = intersectionBy;
  5041. // node_modules/lodash-es/intersectionWith.js
  5042. var intersectionWith = baseRest_default(function(arrays) {
  5043. var comparator = last_default(arrays), mapped = arrayMap_default(arrays, castArrayLikeObject_default);
  5044. comparator = typeof comparator == "function" ? comparator : void 0;
  5045. if (comparator) {
  5046. mapped.pop();
  5047. }
  5048. return mapped.length && mapped[0] === arrays[0] ? baseIntersection_default(mapped, void 0, comparator) : [];
  5049. });
  5050. var intersectionWith_default = intersectionWith;
  5051. // node_modules/lodash-es/_baseInverter.js
  5052. function baseInverter(object4, setter, iteratee2, accumulator) {
  5053. baseForOwn_default(object4, function(value, key, object5) {
  5054. setter(accumulator, iteratee2(value), key, object5);
  5055. });
  5056. return accumulator;
  5057. }
  5058. var baseInverter_default = baseInverter;
  5059. // node_modules/lodash-es/_createInverter.js
  5060. function createInverter(setter, toIteratee) {
  5061. return function(object4, iteratee2) {
  5062. return baseInverter_default(object4, setter, toIteratee(iteratee2), {});
  5063. };
  5064. }
  5065. var createInverter_default = createInverter;
  5066. // node_modules/lodash-es/invert.js
  5067. var objectProto24 = Object.prototype;
  5068. var nativeObjectToString3 = objectProto24.toString;
  5069. var invert = createInverter_default(function(result2, value, key) {
  5070. if (value != null && typeof value.toString != "function") {
  5071. value = nativeObjectToString3.call(value);
  5072. }
  5073. result2[value] = key;
  5074. }, constant_default(identity_default));
  5075. var invert_default = invert;
  5076. // node_modules/lodash-es/invertBy.js
  5077. var objectProto25 = Object.prototype;
  5078. var hasOwnProperty21 = objectProto25.hasOwnProperty;
  5079. var nativeObjectToString4 = objectProto25.toString;
  5080. var invertBy = createInverter_default(function(result2, value, key) {
  5081. if (value != null && typeof value.toString != "function") {
  5082. value = nativeObjectToString4.call(value);
  5083. }
  5084. if (hasOwnProperty21.call(result2, value)) {
  5085. result2[value].push(key);
  5086. } else {
  5087. result2[value] = [key];
  5088. }
  5089. }, baseIteratee_default);
  5090. var invertBy_default = invertBy;
  5091. // node_modules/lodash-es/_parent.js
  5092. function parent(object4, path) {
  5093. return path.length < 2 ? object4 : baseGet_default(object4, baseSlice_default(path, 0, -1));
  5094. }
  5095. var parent_default = parent;
  5096. // node_modules/lodash-es/_baseInvoke.js
  5097. function baseInvoke(object4, path, args) {
  5098. path = castPath_default(path, object4);
  5099. object4 = parent_default(object4, path);
  5100. var func = object4 == null ? object4 : object4[toKey_default(last_default(path))];
  5101. return func == null ? void 0 : apply_default(func, object4, args);
  5102. }
  5103. var baseInvoke_default = baseInvoke;
  5104. // node_modules/lodash-es/invoke.js
  5105. var invoke = baseRest_default(baseInvoke_default);
  5106. var invoke_default = invoke;
  5107. // node_modules/lodash-es/invokeMap.js
  5108. var invokeMap = baseRest_default(function(collection, path, args) {
  5109. var index = -1, isFunc = typeof path == "function", result2 = isArrayLike_default(collection) ? Array(collection.length) : [];
  5110. baseEach_default(collection, function(value) {
  5111. result2[++index] = isFunc ? apply_default(path, value, args) : baseInvoke_default(value, path, args);
  5112. });
  5113. return result2;
  5114. });
  5115. var invokeMap_default = invokeMap;
  5116. // node_modules/lodash-es/_baseIsArrayBuffer.js
  5117. var arrayBufferTag5 = "[object ArrayBuffer]";
  5118. function baseIsArrayBuffer(value) {
  5119. return isObjectLike_default(value) && baseGetTag_default(value) == arrayBufferTag5;
  5120. }
  5121. var baseIsArrayBuffer_default = baseIsArrayBuffer;
  5122. // node_modules/lodash-es/isArrayBuffer.js
  5123. var nodeIsArrayBuffer = nodeUtil_default && nodeUtil_default.isArrayBuffer;
  5124. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary_default(nodeIsArrayBuffer) : baseIsArrayBuffer_default;
  5125. var isArrayBuffer_default = isArrayBuffer;
  5126. // node_modules/lodash-es/isBoolean.js
  5127. var boolTag5 = "[object Boolean]";
  5128. function isBoolean(value) {
  5129. return value === true || value === false || isObjectLike_default(value) && baseGetTag_default(value) == boolTag5;
  5130. }
  5131. var isBoolean_default = isBoolean;
  5132. // node_modules/lodash-es/_baseIsDate.js
  5133. var dateTag5 = "[object Date]";
  5134. function baseIsDate(value) {
  5135. return isObjectLike_default(value) && baseGetTag_default(value) == dateTag5;
  5136. }
  5137. var baseIsDate_default = baseIsDate;
  5138. // node_modules/lodash-es/isDate.js
  5139. var nodeIsDate = nodeUtil_default && nodeUtil_default.isDate;
  5140. var isDate2 = nodeIsDate ? baseUnary_default(nodeIsDate) : baseIsDate_default;
  5141. var isDate_default = isDate2;
  5142. // node_modules/lodash-es/isElement.js
  5143. function isElement(value) {
  5144. return isObjectLike_default(value) && value.nodeType === 1 && !isPlainObject_default(value);
  5145. }
  5146. var isElement_default = isElement;
  5147. // node_modules/lodash-es/isEmpty.js
  5148. var mapTag8 = "[object Map]";
  5149. var setTag8 = "[object Set]";
  5150. var objectProto26 = Object.prototype;
  5151. var hasOwnProperty22 = objectProto26.hasOwnProperty;
  5152. function isEmpty(value) {
  5153. if (value == null) {
  5154. return true;
  5155. }
  5156. if (isArrayLike_default(value) && (isArray_default(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer_default(value) || isTypedArray_default(value) || isArguments_default(value))) {
  5157. return !value.length;
  5158. }
  5159. var tag = getTag_default(value);
  5160. if (tag == mapTag8 || tag == setTag8) {
  5161. return !value.size;
  5162. }
  5163. if (isPrototype_default(value)) {
  5164. return !baseKeys_default(value).length;
  5165. }
  5166. for (var key in value) {
  5167. if (hasOwnProperty22.call(value, key)) {
  5168. return false;
  5169. }
  5170. }
  5171. return true;
  5172. }
  5173. var isEmpty_default = isEmpty;
  5174. // node_modules/lodash-es/isEqual.js
  5175. function isEqual(value, other) {
  5176. return baseIsEqual_default(value, other);
  5177. }
  5178. var isEqual_default = isEqual;
  5179. // node_modules/lodash-es/isEqualWith.js
  5180. function isEqualWith(value, other, customizer) {
  5181. customizer = typeof customizer == "function" ? customizer : void 0;
  5182. var result2 = customizer ? customizer(value, other) : void 0;
  5183. return result2 === void 0 ? baseIsEqual_default(value, other, void 0, customizer) : !!result2;
  5184. }
  5185. var isEqualWith_default = isEqualWith;
  5186. // node_modules/lodash-es/isFinite.js
  5187. var nativeIsFinite2 = root_default.isFinite;
  5188. function isFinite(value) {
  5189. return typeof value == "number" && nativeIsFinite2(value);
  5190. }
  5191. var isFinite_default = isFinite;
  5192. // node_modules/lodash-es/isInteger.js
  5193. function isInteger(value) {
  5194. return typeof value == "number" && value == toInteger_default(value);
  5195. }
  5196. var isInteger_default = isInteger;
  5197. // node_modules/lodash-es/isMatch.js
  5198. function isMatch(object4, source) {
  5199. return object4 === source || baseIsMatch_default(object4, source, getMatchData_default(source));
  5200. }
  5201. var isMatch_default = isMatch;
  5202. // node_modules/lodash-es/isMatchWith.js
  5203. function isMatchWith(object4, source, customizer) {
  5204. customizer = typeof customizer == "function" ? customizer : void 0;
  5205. return baseIsMatch_default(object4, source, getMatchData_default(source), customizer);
  5206. }
  5207. var isMatchWith_default = isMatchWith;
  5208. // node_modules/lodash-es/isNumber.js
  5209. var numberTag5 = "[object Number]";
  5210. function isNumber(value) {
  5211. return typeof value == "number" || isObjectLike_default(value) && baseGetTag_default(value) == numberTag5;
  5212. }
  5213. var isNumber_default = isNumber;
  5214. // node_modules/lodash-es/isNaN.js
  5215. function isNaN2(value) {
  5216. return isNumber_default(value) && value != +value;
  5217. }
  5218. var isNaN_default = isNaN2;
  5219. // node_modules/lodash-es/_isMaskable.js
  5220. var isMaskable = coreJsData_default ? isFunction_default : stubFalse_default;
  5221. var isMaskable_default = isMaskable;
  5222. // node_modules/lodash-es/isNative.js
  5223. var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";
  5224. function isNative(value) {
  5225. if (isMaskable_default(value)) {
  5226. throw new Error(CORE_ERROR_TEXT);
  5227. }
  5228. return baseIsNative_default(value);
  5229. }
  5230. var isNative_default = isNative;
  5231. // node_modules/lodash-es/isNil.js
  5232. function isNil(value) {
  5233. return value == null;
  5234. }
  5235. var isNil_default = isNil;
  5236. // node_modules/lodash-es/isNull.js
  5237. function isNull(value) {
  5238. return value === null;
  5239. }
  5240. var isNull_default = isNull;
  5241. // node_modules/lodash-es/_baseIsRegExp.js
  5242. var regexpTag5 = "[object RegExp]";
  5243. function baseIsRegExp(value) {
  5244. return isObjectLike_default(value) && baseGetTag_default(value) == regexpTag5;
  5245. }
  5246. var baseIsRegExp_default = baseIsRegExp;
  5247. // node_modules/lodash-es/isRegExp.js
  5248. var nodeIsRegExp = nodeUtil_default && nodeUtil_default.isRegExp;
  5249. var isRegExp = nodeIsRegExp ? baseUnary_default(nodeIsRegExp) : baseIsRegExp_default;
  5250. var isRegExp_default = isRegExp;
  5251. // node_modules/lodash-es/isSafeInteger.js
  5252. var MAX_SAFE_INTEGER3 = 9007199254740991;
  5253. function isSafeInteger(value) {
  5254. return isInteger_default(value) && value >= -MAX_SAFE_INTEGER3 && value <= MAX_SAFE_INTEGER3;
  5255. }
  5256. var isSafeInteger_default = isSafeInteger;
  5257. // node_modules/lodash-es/isUndefined.js
  5258. function isUndefined(value) {
  5259. return value === void 0;
  5260. }
  5261. var isUndefined_default = isUndefined;
  5262. // node_modules/lodash-es/isWeakMap.js
  5263. var weakMapTag4 = "[object WeakMap]";
  5264. function isWeakMap(value) {
  5265. return isObjectLike_default(value) && getTag_default(value) == weakMapTag4;
  5266. }
  5267. var isWeakMap_default = isWeakMap;
  5268. // node_modules/lodash-es/isWeakSet.js
  5269. var weakSetTag = "[object WeakSet]";
  5270. function isWeakSet(value) {
  5271. return isObjectLike_default(value) && baseGetTag_default(value) == weakSetTag;
  5272. }
  5273. var isWeakSet_default = isWeakSet;
  5274. // node_modules/lodash-es/iteratee.js
  5275. var CLONE_DEEP_FLAG5 = 1;
  5276. function iteratee(func) {
  5277. return baseIteratee_default(typeof func == "function" ? func : baseClone_default(func, CLONE_DEEP_FLAG5));
  5278. }
  5279. var iteratee_default = iteratee;
  5280. // node_modules/lodash-es/join.js
  5281. var arrayProto2 = Array.prototype;
  5282. var nativeJoin = arrayProto2.join;
  5283. function join(array4, separator) {
  5284. return array4 == null ? "" : nativeJoin.call(array4, separator);
  5285. }
  5286. var join_default = join;
  5287. // node_modules/lodash-es/kebabCase.js
  5288. var kebabCase = createCompounder_default(function(result2, word, index) {
  5289. return result2 + (index ? "-" : "") + word.toLowerCase();
  5290. });
  5291. var kebabCase_default = kebabCase;
  5292. // node_modules/lodash-es/keyBy.js
  5293. var keyBy = createAggregator_default(function(result2, value, key) {
  5294. baseAssignValue_default(result2, key, value);
  5295. });
  5296. var keyBy_default = keyBy;
  5297. // node_modules/lodash-es/_strictLastIndexOf.js
  5298. function strictLastIndexOf(array4, value, fromIndex) {
  5299. var index = fromIndex + 1;
  5300. while (index--) {
  5301. if (array4[index] === value) {
  5302. return index;
  5303. }
  5304. }
  5305. return index;
  5306. }
  5307. var strictLastIndexOf_default = strictLastIndexOf;
  5308. // node_modules/lodash-es/lastIndexOf.js
  5309. var nativeMax12 = Math.max;
  5310. var nativeMin8 = Math.min;
  5311. function lastIndexOf(array4, value, fromIndex) {
  5312. var length = array4 == null ? 0 : array4.length;
  5313. if (!length) {
  5314. return -1;
  5315. }
  5316. var index = length;
  5317. if (fromIndex !== void 0) {
  5318. index = toInteger_default(fromIndex);
  5319. index = index < 0 ? nativeMax12(length + index, 0) : nativeMin8(index, length - 1);
  5320. }
  5321. return value === value ? strictLastIndexOf_default(array4, value, index) : baseFindIndex_default(array4, baseIsNaN_default, index, true);
  5322. }
  5323. var lastIndexOf_default = lastIndexOf;
  5324. // node_modules/lodash-es/lowerCase.js
  5325. var lowerCase = createCompounder_default(function(result2, word, index) {
  5326. return result2 + (index ? " " : "") + word.toLowerCase();
  5327. });
  5328. var lowerCase_default = lowerCase;
  5329. // node_modules/lodash-es/lowerFirst.js
  5330. var lowerFirst = createCaseFirst_default("toLowerCase");
  5331. var lowerFirst_default = lowerFirst;
  5332. // node_modules/lodash-es/_baseLt.js
  5333. function baseLt(value, other) {
  5334. return value < other;
  5335. }
  5336. var baseLt_default = baseLt;
  5337. // node_modules/lodash-es/lt.js
  5338. var lt = createRelationalOperation_default(baseLt_default);
  5339. var lt_default = lt;
  5340. // node_modules/lodash-es/lte.js
  5341. var lte = createRelationalOperation_default(function(value, other) {
  5342. return value <= other;
  5343. });
  5344. var lte_default = lte;
  5345. // node_modules/lodash-es/mapKeys.js
  5346. function mapKeys(object4, iteratee2) {
  5347. var result2 = {};
  5348. iteratee2 = baseIteratee_default(iteratee2, 3);
  5349. baseForOwn_default(object4, function(value, key, object5) {
  5350. baseAssignValue_default(result2, iteratee2(value, key, object5), value);
  5351. });
  5352. return result2;
  5353. }
  5354. var mapKeys_default = mapKeys;
  5355. // node_modules/lodash-es/mapValues.js
  5356. function mapValues(object4, iteratee2) {
  5357. var result2 = {};
  5358. iteratee2 = baseIteratee_default(iteratee2, 3);
  5359. baseForOwn_default(object4, function(value, key, object5) {
  5360. baseAssignValue_default(result2, key, iteratee2(value, key, object5));
  5361. });
  5362. return result2;
  5363. }
  5364. var mapValues_default = mapValues;
  5365. // node_modules/lodash-es/matches.js
  5366. var CLONE_DEEP_FLAG6 = 1;
  5367. function matches(source) {
  5368. return baseMatches_default(baseClone_default(source, CLONE_DEEP_FLAG6));
  5369. }
  5370. var matches_default = matches;
  5371. // node_modules/lodash-es/matchesProperty.js
  5372. var CLONE_DEEP_FLAG7 = 1;
  5373. function matchesProperty(path, srcValue) {
  5374. return baseMatchesProperty_default(path, baseClone_default(srcValue, CLONE_DEEP_FLAG7));
  5375. }
  5376. var matchesProperty_default = matchesProperty;
  5377. // node_modules/lodash-es/_baseExtremum.js
  5378. function baseExtremum(array4, iteratee2, comparator) {
  5379. var index = -1, length = array4.length;
  5380. while (++index < length) {
  5381. var value = array4[index], current = iteratee2(value);
  5382. if (current != null && (computed3 === void 0 ? current === current && !isSymbol_default(current) : comparator(current, computed3))) {
  5383. var computed3 = current, result2 = value;
  5384. }
  5385. }
  5386. return result2;
  5387. }
  5388. var baseExtremum_default = baseExtremum;
  5389. // node_modules/lodash-es/max.js
  5390. function max(array4) {
  5391. return array4 && array4.length ? baseExtremum_default(array4, identity_default, baseGt_default) : void 0;
  5392. }
  5393. var max_default = max;
  5394. // node_modules/lodash-es/maxBy.js
  5395. function maxBy(array4, iteratee2) {
  5396. return array4 && array4.length ? baseExtremum_default(array4, baseIteratee_default(iteratee2, 2), baseGt_default) : void 0;
  5397. }
  5398. var maxBy_default = maxBy;
  5399. // node_modules/lodash-es/_baseSum.js
  5400. function baseSum(array4, iteratee2) {
  5401. var result2, index = -1, length = array4.length;
  5402. while (++index < length) {
  5403. var current = iteratee2(array4[index]);
  5404. if (current !== void 0) {
  5405. result2 = result2 === void 0 ? current : result2 + current;
  5406. }
  5407. }
  5408. return result2;
  5409. }
  5410. var baseSum_default = baseSum;
  5411. // node_modules/lodash-es/_baseMean.js
  5412. var NAN3 = 0 / 0;
  5413. function baseMean(array4, iteratee2) {
  5414. var length = array4 == null ? 0 : array4.length;
  5415. return length ? baseSum_default(array4, iteratee2) / length : NAN3;
  5416. }
  5417. var baseMean_default = baseMean;
  5418. // node_modules/lodash-es/mean.js
  5419. function mean(array4) {
  5420. return baseMean_default(array4, identity_default);
  5421. }
  5422. var mean_default = mean;
  5423. // node_modules/lodash-es/meanBy.js
  5424. function meanBy(array4, iteratee2) {
  5425. return baseMean_default(array4, baseIteratee_default(iteratee2, 2));
  5426. }
  5427. var meanBy_default = meanBy;
  5428. // node_modules/lodash-es/merge.js
  5429. var merge = createAssigner_default(function(object4, source, srcIndex) {
  5430. baseMerge_default(object4, source, srcIndex);
  5431. });
  5432. var merge_default = merge;
  5433. // node_modules/lodash-es/method.js
  5434. var method = baseRest_default(function(path, args) {
  5435. return function(object4) {
  5436. return baseInvoke_default(object4, path, args);
  5437. };
  5438. });
  5439. var method_default = method;
  5440. // node_modules/lodash-es/methodOf.js
  5441. var methodOf = baseRest_default(function(object4, args) {
  5442. return function(path) {
  5443. return baseInvoke_default(object4, path, args);
  5444. };
  5445. });
  5446. var methodOf_default = methodOf;
  5447. // node_modules/lodash-es/min.js
  5448. function min(array4) {
  5449. return array4 && array4.length ? baseExtremum_default(array4, identity_default, baseLt_default) : void 0;
  5450. }
  5451. var min_default = min;
  5452. // node_modules/lodash-es/minBy.js
  5453. function minBy(array4, iteratee2) {
  5454. return array4 && array4.length ? baseExtremum_default(array4, baseIteratee_default(iteratee2, 2), baseLt_default) : void 0;
  5455. }
  5456. var minBy_default = minBy;
  5457. // node_modules/lodash-es/mixin.js
  5458. function mixin(object4, source, options) {
  5459. var props = keys_default(source), methodNames = baseFunctions_default(source, props);
  5460. var chain2 = !(isObject_default(options) && "chain" in options) || !!options.chain, isFunc = isFunction_default(object4);
  5461. arrayEach_default(methodNames, function(methodName) {
  5462. var func = source[methodName];
  5463. object4[methodName] = func;
  5464. if (isFunc) {
  5465. object4.prototype[methodName] = function() {
  5466. var chainAll = this.__chain__;
  5467. if (chain2 || chainAll) {
  5468. var result2 = object4(this.__wrapped__), actions = result2.__actions__ = copyArray_default(this.__actions__);
  5469. actions.push({ "func": func, "args": arguments, "thisArg": object4 });
  5470. result2.__chain__ = chainAll;
  5471. return result2;
  5472. }
  5473. return func.apply(object4, arrayPush_default([this.value()], arguments));
  5474. };
  5475. }
  5476. });
  5477. return object4;
  5478. }
  5479. var mixin_default = mixin;
  5480. // node_modules/lodash-es/multiply.js
  5481. var multiply = createMathOperation_default(function(multiplier, multiplicand) {
  5482. return multiplier * multiplicand;
  5483. }, 1);
  5484. var multiply_default = multiply;
  5485. // node_modules/lodash-es/negate.js
  5486. var FUNC_ERROR_TEXT9 = "Expected a function";
  5487. function negate(predicate) {
  5488. if (typeof predicate != "function") {
  5489. throw new TypeError(FUNC_ERROR_TEXT9);
  5490. }
  5491. return function() {
  5492. var args = arguments;
  5493. switch (args.length) {
  5494. case 0:
  5495. return !predicate.call(this);
  5496. case 1:
  5497. return !predicate.call(this, args[0]);
  5498. case 2:
  5499. return !predicate.call(this, args[0], args[1]);
  5500. case 3:
  5501. return !predicate.call(this, args[0], args[1], args[2]);
  5502. }
  5503. return !predicate.apply(this, args);
  5504. };
  5505. }
  5506. var negate_default = negate;
  5507. // node_modules/lodash-es/_iteratorToArray.js
  5508. function iteratorToArray(iterator) {
  5509. var data, result2 = [];
  5510. while (!(data = iterator.next()).done) {
  5511. result2.push(data.value);
  5512. }
  5513. return result2;
  5514. }
  5515. var iteratorToArray_default = iteratorToArray;
  5516. // node_modules/lodash-es/toArray.js
  5517. var mapTag9 = "[object Map]";
  5518. var setTag9 = "[object Set]";
  5519. var symIterator = Symbol_default ? Symbol_default.iterator : void 0;
  5520. function toArray(value) {
  5521. if (!value) {
  5522. return [];
  5523. }
  5524. if (isArrayLike_default(value)) {
  5525. return isString_default(value) ? stringToArray_default(value) : copyArray_default(value);
  5526. }
  5527. if (symIterator && value[symIterator]) {
  5528. return iteratorToArray_default(value[symIterator]());
  5529. }
  5530. var tag = getTag_default(value), func = tag == mapTag9 ? mapToArray_default : tag == setTag9 ? setToArray_default : values_default;
  5531. return func(value);
  5532. }
  5533. var toArray_default = toArray;
  5534. // node_modules/lodash-es/next.js
  5535. function wrapperNext() {
  5536. if (this.__values__ === void 0) {
  5537. this.__values__ = toArray_default(this.value());
  5538. }
  5539. var done = this.__index__ >= this.__values__.length, value = done ? void 0 : this.__values__[this.__index__++];
  5540. return { "done": done, "value": value };
  5541. }
  5542. var next_default = wrapperNext;
  5543. // node_modules/lodash-es/_baseNth.js
  5544. function baseNth(array4, n) {
  5545. var length = array4.length;
  5546. if (!length) {
  5547. return;
  5548. }
  5549. n += n < 0 ? length : 0;
  5550. return isIndex_default(n, length) ? array4[n] : void 0;
  5551. }
  5552. var baseNth_default = baseNth;
  5553. // node_modules/lodash-es/nth.js
  5554. function nth(array4, n) {
  5555. return array4 && array4.length ? baseNth_default(array4, toInteger_default(n)) : void 0;
  5556. }
  5557. var nth_default = nth;
  5558. // node_modules/lodash-es/nthArg.js
  5559. function nthArg(n) {
  5560. n = toInteger_default(n);
  5561. return baseRest_default(function(args) {
  5562. return baseNth_default(args, n);
  5563. });
  5564. }
  5565. var nthArg_default = nthArg;
  5566. // node_modules/lodash-es/_baseUnset.js
  5567. function baseUnset(object4, path) {
  5568. path = castPath_default(path, object4);
  5569. object4 = parent_default(object4, path);
  5570. return object4 == null || delete object4[toKey_default(last_default(path))];
  5571. }
  5572. var baseUnset_default = baseUnset;
  5573. // node_modules/lodash-es/_customOmitClone.js
  5574. function customOmitClone(value) {
  5575. return isPlainObject_default(value) ? void 0 : value;
  5576. }
  5577. var customOmitClone_default = customOmitClone;
  5578. // node_modules/lodash-es/omit.js
  5579. var CLONE_DEEP_FLAG8 = 1;
  5580. var CLONE_FLAT_FLAG2 = 2;
  5581. var CLONE_SYMBOLS_FLAG6 = 4;
  5582. var omit = flatRest_default(function(object4, paths) {
  5583. var result2 = {};
  5584. if (object4 == null) {
  5585. return result2;
  5586. }
  5587. var isDeep = false;
  5588. paths = arrayMap_default(paths, function(path) {
  5589. path = castPath_default(path, object4);
  5590. isDeep || (isDeep = path.length > 1);
  5591. return path;
  5592. });
  5593. copyObject_default(object4, getAllKeysIn_default(object4), result2);
  5594. if (isDeep) {
  5595. result2 = baseClone_default(result2, CLONE_DEEP_FLAG8 | CLONE_FLAT_FLAG2 | CLONE_SYMBOLS_FLAG6, customOmitClone_default);
  5596. }
  5597. var length = paths.length;
  5598. while (length--) {
  5599. baseUnset_default(result2, paths[length]);
  5600. }
  5601. return result2;
  5602. });
  5603. var omit_default = omit;
  5604. // node_modules/lodash-es/_baseSet.js
  5605. function baseSet(object4, path, value, customizer) {
  5606. if (!isObject_default(object4)) {
  5607. return object4;
  5608. }
  5609. path = castPath_default(path, object4);
  5610. var index = -1, length = path.length, lastIndex = length - 1, nested = object4;
  5611. while (nested != null && ++index < length) {
  5612. var key = toKey_default(path[index]), newValue = value;
  5613. if (key === "__proto__" || key === "constructor" || key === "prototype") {
  5614. return object4;
  5615. }
  5616. if (index != lastIndex) {
  5617. var objValue = nested[key];
  5618. newValue = customizer ? customizer(objValue, key, nested) : void 0;
  5619. if (newValue === void 0) {
  5620. newValue = isObject_default(objValue) ? objValue : isIndex_default(path[index + 1]) ? [] : {};
  5621. }
  5622. }
  5623. assignValue_default(nested, key, newValue);
  5624. nested = nested[key];
  5625. }
  5626. return object4;
  5627. }
  5628. var baseSet_default = baseSet;
  5629. // node_modules/lodash-es/_basePickBy.js
  5630. function basePickBy(object4, paths, predicate) {
  5631. var index = -1, length = paths.length, result2 = {};
  5632. while (++index < length) {
  5633. var path = paths[index], value = baseGet_default(object4, path);
  5634. if (predicate(value, path)) {
  5635. baseSet_default(result2, castPath_default(path, object4), value);
  5636. }
  5637. }
  5638. return result2;
  5639. }
  5640. var basePickBy_default = basePickBy;
  5641. // node_modules/lodash-es/pickBy.js
  5642. function pickBy(object4, predicate) {
  5643. if (object4 == null) {
  5644. return {};
  5645. }
  5646. var props = arrayMap_default(getAllKeysIn_default(object4), function(prop) {
  5647. return [prop];
  5648. });
  5649. predicate = baseIteratee_default(predicate);
  5650. return basePickBy_default(object4, props, function(value, path) {
  5651. return predicate(value, path[0]);
  5652. });
  5653. }
  5654. var pickBy_default = pickBy;
  5655. // node_modules/lodash-es/omitBy.js
  5656. function omitBy(object4, predicate) {
  5657. return pickBy_default(object4, negate_default(baseIteratee_default(predicate)));
  5658. }
  5659. var omitBy_default = omitBy;
  5660. // node_modules/lodash-es/once.js
  5661. function once(func) {
  5662. return before_default(2, func);
  5663. }
  5664. var once_default = once;
  5665. // node_modules/lodash-es/_baseSortBy.js
  5666. function baseSortBy(array4, comparer) {
  5667. var length = array4.length;
  5668. array4.sort(comparer);
  5669. while (length--) {
  5670. array4[length] = array4[length].value;
  5671. }
  5672. return array4;
  5673. }
  5674. var baseSortBy_default = baseSortBy;
  5675. // node_modules/lodash-es/_compareAscending.js
  5676. function compareAscending(value, other) {
  5677. if (value !== other) {
  5678. var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol_default(value);
  5679. var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol_default(other);
  5680. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  5681. return 1;
  5682. }
  5683. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  5684. return -1;
  5685. }
  5686. }
  5687. return 0;
  5688. }
  5689. var compareAscending_default = compareAscending;
  5690. // node_modules/lodash-es/_compareMultiple.js
  5691. function compareMultiple(object4, other, orders) {
  5692. var index = -1, objCriteria = object4.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
  5693. while (++index < length) {
  5694. var result2 = compareAscending_default(objCriteria[index], othCriteria[index]);
  5695. if (result2) {
  5696. if (index >= ordersLength) {
  5697. return result2;
  5698. }
  5699. var order = orders[index];
  5700. return result2 * (order == "desc" ? -1 : 1);
  5701. }
  5702. }
  5703. return object4.index - other.index;
  5704. }
  5705. var compareMultiple_default = compareMultiple;
  5706. // node_modules/lodash-es/_baseOrderBy.js
  5707. function baseOrderBy(collection, iteratees, orders) {
  5708. if (iteratees.length) {
  5709. iteratees = arrayMap_default(iteratees, function(iteratee2) {
  5710. if (isArray_default(iteratee2)) {
  5711. return function(value) {
  5712. return baseGet_default(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
  5713. };
  5714. }
  5715. return iteratee2;
  5716. });
  5717. } else {
  5718. iteratees = [identity_default];
  5719. }
  5720. var index = -1;
  5721. iteratees = arrayMap_default(iteratees, baseUnary_default(baseIteratee_default));
  5722. var result2 = baseMap_default(collection, function(value, key, collection2) {
  5723. var criteria = arrayMap_default(iteratees, function(iteratee2) {
  5724. return iteratee2(value);
  5725. });
  5726. return { "criteria": criteria, "index": ++index, "value": value };
  5727. });
  5728. return baseSortBy_default(result2, function(object4, other) {
  5729. return compareMultiple_default(object4, other, orders);
  5730. });
  5731. }
  5732. var baseOrderBy_default = baseOrderBy;
  5733. // node_modules/lodash-es/orderBy.js
  5734. function orderBy(collection, iteratees, orders, guard) {
  5735. if (collection == null) {
  5736. return [];
  5737. }
  5738. if (!isArray_default(iteratees)) {
  5739. iteratees = iteratees == null ? [] : [iteratees];
  5740. }
  5741. orders = guard ? void 0 : orders;
  5742. if (!isArray_default(orders)) {
  5743. orders = orders == null ? [] : [orders];
  5744. }
  5745. return baseOrderBy_default(collection, iteratees, orders);
  5746. }
  5747. var orderBy_default = orderBy;
  5748. // node_modules/lodash-es/_createOver.js
  5749. function createOver(arrayFunc) {
  5750. return flatRest_default(function(iteratees) {
  5751. iteratees = arrayMap_default(iteratees, baseUnary_default(baseIteratee_default));
  5752. return baseRest_default(function(args) {
  5753. var thisArg = this;
  5754. return arrayFunc(iteratees, function(iteratee2) {
  5755. return apply_default(iteratee2, thisArg, args);
  5756. });
  5757. });
  5758. });
  5759. }
  5760. var createOver_default = createOver;
  5761. // node_modules/lodash-es/over.js
  5762. var over = createOver_default(arrayMap_default);
  5763. var over_default = over;
  5764. // node_modules/lodash-es/_castRest.js
  5765. var castRest = baseRest_default;
  5766. var castRest_default = castRest;
  5767. // node_modules/lodash-es/overArgs.js
  5768. var nativeMin9 = Math.min;
  5769. var overArgs = castRest_default(function(func, transforms) {
  5770. transforms = transforms.length == 1 && isArray_default(transforms[0]) ? arrayMap_default(transforms[0], baseUnary_default(baseIteratee_default)) : arrayMap_default(baseFlatten_default(transforms, 1), baseUnary_default(baseIteratee_default));
  5771. var funcsLength = transforms.length;
  5772. return baseRest_default(function(args) {
  5773. var index = -1, length = nativeMin9(args.length, funcsLength);
  5774. while (++index < length) {
  5775. args[index] = transforms[index].call(this, args[index]);
  5776. }
  5777. return apply_default(func, this, args);
  5778. });
  5779. });
  5780. var overArgs_default = overArgs;
  5781. // node_modules/lodash-es/overEvery.js
  5782. var overEvery = createOver_default(arrayEvery_default);
  5783. var overEvery_default = overEvery;
  5784. // node_modules/lodash-es/overSome.js
  5785. var overSome = createOver_default(arraySome_default);
  5786. var overSome_default = overSome;
  5787. // node_modules/lodash-es/_baseRepeat.js
  5788. var MAX_SAFE_INTEGER4 = 9007199254740991;
  5789. var nativeFloor = Math.floor;
  5790. function baseRepeat(string3, n) {
  5791. var result2 = "";
  5792. if (!string3 || n < 1 || n > MAX_SAFE_INTEGER4) {
  5793. return result2;
  5794. }
  5795. do {
  5796. if (n % 2) {
  5797. result2 += string3;
  5798. }
  5799. n = nativeFloor(n / 2);
  5800. if (n) {
  5801. string3 += string3;
  5802. }
  5803. } while (n);
  5804. return result2;
  5805. }
  5806. var baseRepeat_default = baseRepeat;
  5807. // node_modules/lodash-es/_asciiSize.js
  5808. var asciiSize = baseProperty_default("length");
  5809. var asciiSize_default = asciiSize;
  5810. // node_modules/lodash-es/_unicodeSize.js
  5811. var rsAstralRange4 = "\\ud800-\\udfff";
  5812. var rsComboMarksRange5 = "\\u0300-\\u036f";
  5813. var reComboHalfMarksRange5 = "\\ufe20-\\ufe2f";
  5814. var rsComboSymbolsRange5 = "\\u20d0-\\u20ff";
  5815. var rsComboRange5 = rsComboMarksRange5 + reComboHalfMarksRange5 + rsComboSymbolsRange5;
  5816. var rsVarRange4 = "\\ufe0e\\ufe0f";
  5817. var rsAstral2 = "[" + rsAstralRange4 + "]";
  5818. var rsCombo4 = "[" + rsComboRange5 + "]";
  5819. var rsFitz3 = "\\ud83c[\\udffb-\\udfff]";
  5820. var rsModifier3 = "(?:" + rsCombo4 + "|" + rsFitz3 + ")";
  5821. var rsNonAstral3 = "[^" + rsAstralRange4 + "]";
  5822. var rsRegional3 = "(?:\\ud83c[\\udde6-\\uddff]){2}";
  5823. var rsSurrPair3 = "[\\ud800-\\udbff][\\udc00-\\udfff]";
  5824. var rsZWJ4 = "\\u200d";
  5825. var reOptMod3 = rsModifier3 + "?";
  5826. var rsOptVar3 = "[" + rsVarRange4 + "]?";
  5827. var rsOptJoin3 = "(?:" + rsZWJ4 + "(?:" + [rsNonAstral3, rsRegional3, rsSurrPair3].join("|") + ")" + rsOptVar3 + reOptMod3 + ")*";
  5828. var rsSeq3 = rsOptVar3 + reOptMod3 + rsOptJoin3;
  5829. var rsSymbol2 = "(?:" + [rsNonAstral3 + rsCombo4 + "?", rsCombo4, rsRegional3, rsSurrPair3, rsAstral2].join("|") + ")";
  5830. var reUnicode2 = RegExp(rsFitz3 + "(?=" + rsFitz3 + ")|" + rsSymbol2 + rsSeq3, "g");
  5831. function unicodeSize(string3) {
  5832. var result2 = reUnicode2.lastIndex = 0;
  5833. while (reUnicode2.test(string3)) {
  5834. ++result2;
  5835. }
  5836. return result2;
  5837. }
  5838. var unicodeSize_default = unicodeSize;
  5839. // node_modules/lodash-es/_stringSize.js
  5840. function stringSize(string3) {
  5841. return hasUnicode_default(string3) ? unicodeSize_default(string3) : asciiSize_default(string3);
  5842. }
  5843. var stringSize_default = stringSize;
  5844. // node_modules/lodash-es/_createPadding.js
  5845. var nativeCeil2 = Math.ceil;
  5846. function createPadding(length, chars) {
  5847. chars = chars === void 0 ? " " : baseToString_default(chars);
  5848. var charsLength = chars.length;
  5849. if (charsLength < 2) {
  5850. return charsLength ? baseRepeat_default(chars, length) : chars;
  5851. }
  5852. var result2 = baseRepeat_default(chars, nativeCeil2(length / stringSize_default(chars)));
  5853. return hasUnicode_default(chars) ? castSlice_default(stringToArray_default(result2), 0, length).join("") : result2.slice(0, length);
  5854. }
  5855. var createPadding_default = createPadding;
  5856. // node_modules/lodash-es/pad.js
  5857. var nativeCeil3 = Math.ceil;
  5858. var nativeFloor2 = Math.floor;
  5859. function pad(string3, length, chars) {
  5860. string3 = toString_default(string3);
  5861. length = toInteger_default(length);
  5862. var strLength = length ? stringSize_default(string3) : 0;
  5863. if (!length || strLength >= length) {
  5864. return string3;
  5865. }
  5866. var mid = (length - strLength) / 2;
  5867. return createPadding_default(nativeFloor2(mid), chars) + string3 + createPadding_default(nativeCeil3(mid), chars);
  5868. }
  5869. var pad_default = pad;
  5870. // node_modules/lodash-es/padEnd.js
  5871. function padEnd(string3, length, chars) {
  5872. string3 = toString_default(string3);
  5873. length = toInteger_default(length);
  5874. var strLength = length ? stringSize_default(string3) : 0;
  5875. return length && strLength < length ? string3 + createPadding_default(length - strLength, chars) : string3;
  5876. }
  5877. var padEnd_default = padEnd;
  5878. // node_modules/lodash-es/padStart.js
  5879. function padStart(string3, length, chars) {
  5880. string3 = toString_default(string3);
  5881. length = toInteger_default(length);
  5882. var strLength = length ? stringSize_default(string3) : 0;
  5883. return length && strLength < length ? createPadding_default(length - strLength, chars) + string3 : string3;
  5884. }
  5885. var padStart_default = padStart;
  5886. // node_modules/lodash-es/parseInt.js
  5887. var reTrimStart2 = /^\s+/;
  5888. var nativeParseInt = root_default.parseInt;
  5889. function parseInt2(string3, radix, guard) {
  5890. if (guard || radix == null) {
  5891. radix = 0;
  5892. } else if (radix) {
  5893. radix = +radix;
  5894. }
  5895. return nativeParseInt(toString_default(string3).replace(reTrimStart2, ""), radix || 0);
  5896. }
  5897. var parseInt_default = parseInt2;
  5898. // node_modules/lodash-es/partial.js
  5899. var WRAP_PARTIAL_FLAG7 = 32;
  5900. var partial = baseRest_default(function(func, partials) {
  5901. var holders = replaceHolders_default(partials, getHolder_default(partial));
  5902. return createWrap_default(func, WRAP_PARTIAL_FLAG7, void 0, partials, holders);
  5903. });
  5904. partial.placeholder = {};
  5905. var partial_default = partial;
  5906. // node_modules/lodash-es/partialRight.js
  5907. var WRAP_PARTIAL_RIGHT_FLAG4 = 64;
  5908. var partialRight = baseRest_default(function(func, partials) {
  5909. var holders = replaceHolders_default(partials, getHolder_default(partialRight));
  5910. return createWrap_default(func, WRAP_PARTIAL_RIGHT_FLAG4, void 0, partials, holders);
  5911. });
  5912. partialRight.placeholder = {};
  5913. var partialRight_default = partialRight;
  5914. // node_modules/lodash-es/partition.js
  5915. var partition = createAggregator_default(function(result2, value, key) {
  5916. result2[key ? 0 : 1].push(value);
  5917. }, function() {
  5918. return [[], []];
  5919. });
  5920. var partition_default = partition;
  5921. // node_modules/lodash-es/_basePick.js
  5922. function basePick(object4, paths) {
  5923. return basePickBy_default(object4, paths, function(value, path) {
  5924. return hasIn_default(object4, path);
  5925. });
  5926. }
  5927. var basePick_default = basePick;
  5928. // node_modules/lodash-es/pick.js
  5929. var pick = flatRest_default(function(object4, paths) {
  5930. return object4 == null ? {} : basePick_default(object4, paths);
  5931. });
  5932. var pick_default = pick;
  5933. // node_modules/lodash-es/plant.js
  5934. function wrapperPlant(value) {
  5935. var result2, parent2 = this;
  5936. while (parent2 instanceof baseLodash_default) {
  5937. var clone2 = wrapperClone_default(parent2);
  5938. clone2.__index__ = 0;
  5939. clone2.__values__ = void 0;
  5940. if (result2) {
  5941. previous.__wrapped__ = clone2;
  5942. } else {
  5943. result2 = clone2;
  5944. }
  5945. var previous = clone2;
  5946. parent2 = parent2.__wrapped__;
  5947. }
  5948. previous.__wrapped__ = value;
  5949. return result2;
  5950. }
  5951. var plant_default = wrapperPlant;
  5952. // node_modules/lodash-es/propertyOf.js
  5953. function propertyOf(object4) {
  5954. return function(path) {
  5955. return object4 == null ? void 0 : baseGet_default(object4, path);
  5956. };
  5957. }
  5958. var propertyOf_default = propertyOf;
  5959. // node_modules/lodash-es/_baseIndexOfWith.js
  5960. function baseIndexOfWith(array4, value, fromIndex, comparator) {
  5961. var index = fromIndex - 1, length = array4.length;
  5962. while (++index < length) {
  5963. if (comparator(array4[index], value)) {
  5964. return index;
  5965. }
  5966. }
  5967. return -1;
  5968. }
  5969. var baseIndexOfWith_default = baseIndexOfWith;
  5970. // node_modules/lodash-es/_basePullAll.js
  5971. var arrayProto3 = Array.prototype;
  5972. var splice2 = arrayProto3.splice;
  5973. function basePullAll(array4, values2, iteratee2, comparator) {
  5974. var indexOf2 = comparator ? baseIndexOfWith_default : baseIndexOf_default, index = -1, length = values2.length, seen = array4;
  5975. if (array4 === values2) {
  5976. values2 = copyArray_default(values2);
  5977. }
  5978. if (iteratee2) {
  5979. seen = arrayMap_default(array4, baseUnary_default(iteratee2));
  5980. }
  5981. while (++index < length) {
  5982. var fromIndex = 0, value = values2[index], computed3 = iteratee2 ? iteratee2(value) : value;
  5983. while ((fromIndex = indexOf2(seen, computed3, fromIndex, comparator)) > -1) {
  5984. if (seen !== array4) {
  5985. splice2.call(seen, fromIndex, 1);
  5986. }
  5987. splice2.call(array4, fromIndex, 1);
  5988. }
  5989. }
  5990. return array4;
  5991. }
  5992. var basePullAll_default = basePullAll;
  5993. // node_modules/lodash-es/pullAll.js
  5994. function pullAll(array4, values2) {
  5995. return array4 && array4.length && values2 && values2.length ? basePullAll_default(array4, values2) : array4;
  5996. }
  5997. var pullAll_default = pullAll;
  5998. // node_modules/lodash-es/pull.js
  5999. var pull = baseRest_default(pullAll_default);
  6000. var pull_default = pull;
  6001. // node_modules/lodash-es/pullAllBy.js
  6002. function pullAllBy(array4, values2, iteratee2) {
  6003. return array4 && array4.length && values2 && values2.length ? basePullAll_default(array4, values2, baseIteratee_default(iteratee2, 2)) : array4;
  6004. }
  6005. var pullAllBy_default = pullAllBy;
  6006. // node_modules/lodash-es/pullAllWith.js
  6007. function pullAllWith(array4, values2, comparator) {
  6008. return array4 && array4.length && values2 && values2.length ? basePullAll_default(array4, values2, void 0, comparator) : array4;
  6009. }
  6010. var pullAllWith_default = pullAllWith;
  6011. // node_modules/lodash-es/_basePullAt.js
  6012. var arrayProto4 = Array.prototype;
  6013. var splice3 = arrayProto4.splice;
  6014. function basePullAt(array4, indexes) {
  6015. var length = array4 ? indexes.length : 0, lastIndex = length - 1;
  6016. while (length--) {
  6017. var index = indexes[length];
  6018. if (length == lastIndex || index !== previous) {
  6019. var previous = index;
  6020. if (isIndex_default(index)) {
  6021. splice3.call(array4, index, 1);
  6022. } else {
  6023. baseUnset_default(array4, index);
  6024. }
  6025. }
  6026. }
  6027. return array4;
  6028. }
  6029. var basePullAt_default = basePullAt;
  6030. // node_modules/lodash-es/pullAt.js
  6031. var pullAt = flatRest_default(function(array4, indexes) {
  6032. var length = array4 == null ? 0 : array4.length, result2 = baseAt_default(array4, indexes);
  6033. basePullAt_default(array4, arrayMap_default(indexes, function(index) {
  6034. return isIndex_default(index, length) ? +index : index;
  6035. }).sort(compareAscending_default));
  6036. return result2;
  6037. });
  6038. var pullAt_default = pullAt;
  6039. // node_modules/lodash-es/_baseRandom.js
  6040. var nativeFloor3 = Math.floor;
  6041. var nativeRandom = Math.random;
  6042. function baseRandom(lower, upper) {
  6043. return lower + nativeFloor3(nativeRandom() * (upper - lower + 1));
  6044. }
  6045. var baseRandom_default = baseRandom;
  6046. // node_modules/lodash-es/random.js
  6047. var freeParseFloat = parseFloat;
  6048. var nativeMin10 = Math.min;
  6049. var nativeRandom2 = Math.random;
  6050. function random(lower, upper, floating) {
  6051. if (floating && typeof floating != "boolean" && isIterateeCall_default(lower, upper, floating)) {
  6052. upper = floating = void 0;
  6053. }
  6054. if (floating === void 0) {
  6055. if (typeof upper == "boolean") {
  6056. floating = upper;
  6057. upper = void 0;
  6058. } else if (typeof lower == "boolean") {
  6059. floating = lower;
  6060. lower = void 0;
  6061. }
  6062. }
  6063. if (lower === void 0 && upper === void 0) {
  6064. lower = 0;
  6065. upper = 1;
  6066. } else {
  6067. lower = toFinite_default(lower);
  6068. if (upper === void 0) {
  6069. upper = lower;
  6070. lower = 0;
  6071. } else {
  6072. upper = toFinite_default(upper);
  6073. }
  6074. }
  6075. if (lower > upper) {
  6076. var temp = lower;
  6077. lower = upper;
  6078. upper = temp;
  6079. }
  6080. if (floating || lower % 1 || upper % 1) {
  6081. var rand = nativeRandom2();
  6082. return nativeMin10(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
  6083. }
  6084. return baseRandom_default(lower, upper);
  6085. }
  6086. var random_default = random;
  6087. // node_modules/lodash-es/_baseRange.js
  6088. var nativeCeil4 = Math.ceil;
  6089. var nativeMax13 = Math.max;
  6090. function baseRange(start, end2, step, fromRight) {
  6091. var index = -1, length = nativeMax13(nativeCeil4((end2 - start) / (step || 1)), 0), result2 = Array(length);
  6092. while (length--) {
  6093. result2[fromRight ? length : ++index] = start;
  6094. start += step;
  6095. }
  6096. return result2;
  6097. }
  6098. var baseRange_default = baseRange;
  6099. // node_modules/lodash-es/_createRange.js
  6100. function createRange(fromRight) {
  6101. return function(start, end2, step) {
  6102. if (step && typeof step != "number" && isIterateeCall_default(start, end2, step)) {
  6103. end2 = step = void 0;
  6104. }
  6105. start = toFinite_default(start);
  6106. if (end2 === void 0) {
  6107. end2 = start;
  6108. start = 0;
  6109. } else {
  6110. end2 = toFinite_default(end2);
  6111. }
  6112. step = step === void 0 ? start < end2 ? 1 : -1 : toFinite_default(step);
  6113. return baseRange_default(start, end2, step, fromRight);
  6114. };
  6115. }
  6116. var createRange_default = createRange;
  6117. // node_modules/lodash-es/range.js
  6118. var range = createRange_default();
  6119. var range_default = range;
  6120. // node_modules/lodash-es/rangeRight.js
  6121. var rangeRight = createRange_default(true);
  6122. var rangeRight_default = rangeRight;
  6123. // node_modules/lodash-es/rearg.js
  6124. var WRAP_REARG_FLAG4 = 256;
  6125. var rearg = flatRest_default(function(func, indexes) {
  6126. return createWrap_default(func, WRAP_REARG_FLAG4, void 0, void 0, void 0, indexes);
  6127. });
  6128. var rearg_default = rearg;
  6129. // node_modules/lodash-es/_baseReduce.js
  6130. function baseReduce(collection, iteratee2, accumulator, initAccum, eachFunc) {
  6131. eachFunc(collection, function(value, index, collection2) {
  6132. accumulator = initAccum ? (initAccum = false, value) : iteratee2(accumulator, value, index, collection2);
  6133. });
  6134. return accumulator;
  6135. }
  6136. var baseReduce_default = baseReduce;
  6137. // node_modules/lodash-es/reduce.js
  6138. function reduce(collection, iteratee2, accumulator) {
  6139. var func = isArray_default(collection) ? arrayReduce_default : baseReduce_default, initAccum = arguments.length < 3;
  6140. return func(collection, baseIteratee_default(iteratee2, 4), accumulator, initAccum, baseEach_default);
  6141. }
  6142. var reduce_default = reduce;
  6143. // node_modules/lodash-es/_arrayReduceRight.js
  6144. function arrayReduceRight(array4, iteratee2, accumulator, initAccum) {
  6145. var length = array4 == null ? 0 : array4.length;
  6146. if (initAccum && length) {
  6147. accumulator = array4[--length];
  6148. }
  6149. while (length--) {
  6150. accumulator = iteratee2(accumulator, array4[length], length, array4);
  6151. }
  6152. return accumulator;
  6153. }
  6154. var arrayReduceRight_default = arrayReduceRight;
  6155. // node_modules/lodash-es/reduceRight.js
  6156. function reduceRight(collection, iteratee2, accumulator) {
  6157. var func = isArray_default(collection) ? arrayReduceRight_default : baseReduce_default, initAccum = arguments.length < 3;
  6158. return func(collection, baseIteratee_default(iteratee2, 4), accumulator, initAccum, baseEachRight_default);
  6159. }
  6160. var reduceRight_default = reduceRight;
  6161. // node_modules/lodash-es/reject.js
  6162. function reject(collection, predicate) {
  6163. var func = isArray_default(collection) ? arrayFilter_default : baseFilter_default;
  6164. return func(collection, negate_default(baseIteratee_default(predicate, 3)));
  6165. }
  6166. var reject_default = reject;
  6167. // node_modules/lodash-es/remove.js
  6168. function remove(array4, predicate) {
  6169. var result2 = [];
  6170. if (!(array4 && array4.length)) {
  6171. return result2;
  6172. }
  6173. var index = -1, indexes = [], length = array4.length;
  6174. predicate = baseIteratee_default(predicate, 3);
  6175. while (++index < length) {
  6176. var value = array4[index];
  6177. if (predicate(value, index, array4)) {
  6178. result2.push(value);
  6179. indexes.push(index);
  6180. }
  6181. }
  6182. basePullAt_default(array4, indexes);
  6183. return result2;
  6184. }
  6185. var remove_default = remove;
  6186. // node_modules/lodash-es/repeat.js
  6187. function repeat(string3, n, guard) {
  6188. if (guard ? isIterateeCall_default(string3, n, guard) : n === void 0) {
  6189. n = 1;
  6190. } else {
  6191. n = toInteger_default(n);
  6192. }
  6193. return baseRepeat_default(toString_default(string3), n);
  6194. }
  6195. var repeat_default = repeat;
  6196. // node_modules/lodash-es/replace.js
  6197. function replace() {
  6198. var args = arguments, string3 = toString_default(args[0]);
  6199. return args.length < 3 ? string3 : string3.replace(args[1], args[2]);
  6200. }
  6201. var replace_default = replace;
  6202. // node_modules/lodash-es/rest.js
  6203. var FUNC_ERROR_TEXT10 = "Expected a function";
  6204. function rest(func, start) {
  6205. if (typeof func != "function") {
  6206. throw new TypeError(FUNC_ERROR_TEXT10);
  6207. }
  6208. start = start === void 0 ? start : toInteger_default(start);
  6209. return baseRest_default(func, start);
  6210. }
  6211. var rest_default = rest;
  6212. // node_modules/lodash-es/result.js
  6213. function result(object4, path, defaultValue) {
  6214. path = castPath_default(path, object4);
  6215. var index = -1, length = path.length;
  6216. if (!length) {
  6217. length = 1;
  6218. object4 = void 0;
  6219. }
  6220. while (++index < length) {
  6221. var value = object4 == null ? void 0 : object4[toKey_default(path[index])];
  6222. if (value === void 0) {
  6223. index = length;
  6224. value = defaultValue;
  6225. }
  6226. object4 = isFunction_default(value) ? value.call(object4) : value;
  6227. }
  6228. return object4;
  6229. }
  6230. var result_default = result;
  6231. // node_modules/lodash-es/reverse.js
  6232. var arrayProto5 = Array.prototype;
  6233. var nativeReverse = arrayProto5.reverse;
  6234. function reverse(array4) {
  6235. return array4 == null ? array4 : nativeReverse.call(array4);
  6236. }
  6237. var reverse_default = reverse;
  6238. // node_modules/lodash-es/round.js
  6239. var round = createRound_default("round");
  6240. var round_default = round;
  6241. // node_modules/lodash-es/_arraySample.js
  6242. function arraySample(array4) {
  6243. var length = array4.length;
  6244. return length ? array4[baseRandom_default(0, length - 1)] : void 0;
  6245. }
  6246. var arraySample_default = arraySample;
  6247. // node_modules/lodash-es/_baseSample.js
  6248. function baseSample(collection) {
  6249. return arraySample_default(values_default(collection));
  6250. }
  6251. var baseSample_default = baseSample;
  6252. // node_modules/lodash-es/sample.js
  6253. function sample(collection) {
  6254. var func = isArray_default(collection) ? arraySample_default : baseSample_default;
  6255. return func(collection);
  6256. }
  6257. var sample_default = sample;
  6258. // node_modules/lodash-es/_shuffleSelf.js
  6259. function shuffleSelf(array4, size3) {
  6260. var index = -1, length = array4.length, lastIndex = length - 1;
  6261. size3 = size3 === void 0 ? length : size3;
  6262. while (++index < size3) {
  6263. var rand = baseRandom_default(index, lastIndex), value = array4[rand];
  6264. array4[rand] = array4[index];
  6265. array4[index] = value;
  6266. }
  6267. array4.length = size3;
  6268. return array4;
  6269. }
  6270. var shuffleSelf_default = shuffleSelf;
  6271. // node_modules/lodash-es/_arraySampleSize.js
  6272. function arraySampleSize(array4, n) {
  6273. return shuffleSelf_default(copyArray_default(array4), baseClamp_default(n, 0, array4.length));
  6274. }
  6275. var arraySampleSize_default = arraySampleSize;
  6276. // node_modules/lodash-es/_baseSampleSize.js
  6277. function baseSampleSize(collection, n) {
  6278. var array4 = values_default(collection);
  6279. return shuffleSelf_default(array4, baseClamp_default(n, 0, array4.length));
  6280. }
  6281. var baseSampleSize_default = baseSampleSize;
  6282. // node_modules/lodash-es/sampleSize.js
  6283. function sampleSize(collection, n, guard) {
  6284. if (guard ? isIterateeCall_default(collection, n, guard) : n === void 0) {
  6285. n = 1;
  6286. } else {
  6287. n = toInteger_default(n);
  6288. }
  6289. var func = isArray_default(collection) ? arraySampleSize_default : baseSampleSize_default;
  6290. return func(collection, n);
  6291. }
  6292. var sampleSize_default = sampleSize;
  6293. // node_modules/lodash-es/set.js
  6294. function set(object4, path, value) {
  6295. return object4 == null ? object4 : baseSet_default(object4, path, value);
  6296. }
  6297. var set_default = set;
  6298. // node_modules/lodash-es/setWith.js
  6299. function setWith(object4, path, value, customizer) {
  6300. customizer = typeof customizer == "function" ? customizer : void 0;
  6301. return object4 == null ? object4 : baseSet_default(object4, path, value, customizer);
  6302. }
  6303. var setWith_default = setWith;
  6304. // node_modules/lodash-es/_arrayShuffle.js
  6305. function arrayShuffle(array4) {
  6306. return shuffleSelf_default(copyArray_default(array4));
  6307. }
  6308. var arrayShuffle_default = arrayShuffle;
  6309. // node_modules/lodash-es/_baseShuffle.js
  6310. function baseShuffle(collection) {
  6311. return shuffleSelf_default(values_default(collection));
  6312. }
  6313. var baseShuffle_default = baseShuffle;
  6314. // node_modules/lodash-es/shuffle.js
  6315. function shuffle(collection) {
  6316. var func = isArray_default(collection) ? arrayShuffle_default : baseShuffle_default;
  6317. return func(collection);
  6318. }
  6319. var shuffle_default = shuffle;
  6320. // node_modules/lodash-es/size.js
  6321. var mapTag10 = "[object Map]";
  6322. var setTag10 = "[object Set]";
  6323. function size(collection) {
  6324. if (collection == null) {
  6325. return 0;
  6326. }
  6327. if (isArrayLike_default(collection)) {
  6328. return isString_default(collection) ? stringSize_default(collection) : collection.length;
  6329. }
  6330. var tag = getTag_default(collection);
  6331. if (tag == mapTag10 || tag == setTag10) {
  6332. return collection.size;
  6333. }
  6334. return baseKeys_default(collection).length;
  6335. }
  6336. var size_default = size;
  6337. // node_modules/lodash-es/slice.js
  6338. function slice(array4, start, end2) {
  6339. var length = array4 == null ? 0 : array4.length;
  6340. if (!length) {
  6341. return [];
  6342. }
  6343. if (end2 && typeof end2 != "number" && isIterateeCall_default(array4, start, end2)) {
  6344. start = 0;
  6345. end2 = length;
  6346. } else {
  6347. start = start == null ? 0 : toInteger_default(start);
  6348. end2 = end2 === void 0 ? length : toInteger_default(end2);
  6349. }
  6350. return baseSlice_default(array4, start, end2);
  6351. }
  6352. var slice_default = slice;
  6353. // node_modules/lodash-es/snakeCase.js
  6354. var snakeCase = createCompounder_default(function(result2, word, index) {
  6355. return result2 + (index ? "_" : "") + word.toLowerCase();
  6356. });
  6357. var snakeCase_default = snakeCase;
  6358. // node_modules/lodash-es/_baseSome.js
  6359. function baseSome(collection, predicate) {
  6360. var result2;
  6361. baseEach_default(collection, function(value, index, collection2) {
  6362. result2 = predicate(value, index, collection2);
  6363. return !result2;
  6364. });
  6365. return !!result2;
  6366. }
  6367. var baseSome_default = baseSome;
  6368. // node_modules/lodash-es/some.js
  6369. function some(collection, predicate, guard) {
  6370. var func = isArray_default(collection) ? arraySome_default : baseSome_default;
  6371. if (guard && isIterateeCall_default(collection, predicate, guard)) {
  6372. predicate = void 0;
  6373. }
  6374. return func(collection, baseIteratee_default(predicate, 3));
  6375. }
  6376. var some_default = some;
  6377. // node_modules/lodash-es/sortBy.js
  6378. var sortBy = baseRest_default(function(collection, iteratees) {
  6379. if (collection == null) {
  6380. return [];
  6381. }
  6382. var length = iteratees.length;
  6383. if (length > 1 && isIterateeCall_default(collection, iteratees[0], iteratees[1])) {
  6384. iteratees = [];
  6385. } else if (length > 2 && isIterateeCall_default(iteratees[0], iteratees[1], iteratees[2])) {
  6386. iteratees = [iteratees[0]];
  6387. }
  6388. return baseOrderBy_default(collection, baseFlatten_default(iteratees, 1), []);
  6389. });
  6390. var sortBy_default = sortBy;
  6391. // node_modules/lodash-es/_baseSortedIndexBy.js
  6392. var MAX_ARRAY_LENGTH3 = 4294967295;
  6393. var MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH3 - 1;
  6394. var nativeFloor4 = Math.floor;
  6395. var nativeMin11 = Math.min;
  6396. function baseSortedIndexBy(array4, value, iteratee2, retHighest) {
  6397. var low = 0, high = array4 == null ? 0 : array4.length;
  6398. if (high === 0) {
  6399. return 0;
  6400. }
  6401. value = iteratee2(value);
  6402. var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol_default(value), valIsUndefined = value === void 0;
  6403. while (low < high) {
  6404. var mid = nativeFloor4((low + high) / 2), computed3 = iteratee2(array4[mid]), othIsDefined = computed3 !== void 0, othIsNull = computed3 === null, othIsReflexive = computed3 === computed3, othIsSymbol = isSymbol_default(computed3);
  6405. if (valIsNaN) {
  6406. var setLow = retHighest || othIsReflexive;
  6407. } else if (valIsUndefined) {
  6408. setLow = othIsReflexive && (retHighest || othIsDefined);
  6409. } else if (valIsNull) {
  6410. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  6411. } else if (valIsSymbol) {
  6412. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  6413. } else if (othIsNull || othIsSymbol) {
  6414. setLow = false;
  6415. } else {
  6416. setLow = retHighest ? computed3 <= value : computed3 < value;
  6417. }
  6418. if (setLow) {
  6419. low = mid + 1;
  6420. } else {
  6421. high = mid;
  6422. }
  6423. }
  6424. return nativeMin11(high, MAX_ARRAY_INDEX);
  6425. }
  6426. var baseSortedIndexBy_default = baseSortedIndexBy;
  6427. // node_modules/lodash-es/_baseSortedIndex.js
  6428. var MAX_ARRAY_LENGTH4 = 4294967295;
  6429. var HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH4 >>> 1;
  6430. function baseSortedIndex(array4, value, retHighest) {
  6431. var low = 0, high = array4 == null ? low : array4.length;
  6432. if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  6433. while (low < high) {
  6434. var mid = low + high >>> 1, computed3 = array4[mid];
  6435. if (computed3 !== null && !isSymbol_default(computed3) && (retHighest ? computed3 <= value : computed3 < value)) {
  6436. low = mid + 1;
  6437. } else {
  6438. high = mid;
  6439. }
  6440. }
  6441. return high;
  6442. }
  6443. return baseSortedIndexBy_default(array4, value, identity_default, retHighest);
  6444. }
  6445. var baseSortedIndex_default = baseSortedIndex;
  6446. // node_modules/lodash-es/sortedIndex.js
  6447. function sortedIndex(array4, value) {
  6448. return baseSortedIndex_default(array4, value);
  6449. }
  6450. var sortedIndex_default = sortedIndex;
  6451. // node_modules/lodash-es/sortedIndexBy.js
  6452. function sortedIndexBy(array4, value, iteratee2) {
  6453. return baseSortedIndexBy_default(array4, value, baseIteratee_default(iteratee2, 2));
  6454. }
  6455. var sortedIndexBy_default = sortedIndexBy;
  6456. // node_modules/lodash-es/sortedIndexOf.js
  6457. function sortedIndexOf(array4, value) {
  6458. var length = array4 == null ? 0 : array4.length;
  6459. if (length) {
  6460. var index = baseSortedIndex_default(array4, value);
  6461. if (index < length && eq_default(array4[index], value)) {
  6462. return index;
  6463. }
  6464. }
  6465. return -1;
  6466. }
  6467. var sortedIndexOf_default = sortedIndexOf;
  6468. // node_modules/lodash-es/sortedLastIndex.js
  6469. function sortedLastIndex(array4, value) {
  6470. return baseSortedIndex_default(array4, value, true);
  6471. }
  6472. var sortedLastIndex_default = sortedLastIndex;
  6473. // node_modules/lodash-es/sortedLastIndexBy.js
  6474. function sortedLastIndexBy(array4, value, iteratee2) {
  6475. return baseSortedIndexBy_default(array4, value, baseIteratee_default(iteratee2, 2), true);
  6476. }
  6477. var sortedLastIndexBy_default = sortedLastIndexBy;
  6478. // node_modules/lodash-es/sortedLastIndexOf.js
  6479. function sortedLastIndexOf(array4, value) {
  6480. var length = array4 == null ? 0 : array4.length;
  6481. if (length) {
  6482. var index = baseSortedIndex_default(array4, value, true) - 1;
  6483. if (eq_default(array4[index], value)) {
  6484. return index;
  6485. }
  6486. }
  6487. return -1;
  6488. }
  6489. var sortedLastIndexOf_default = sortedLastIndexOf;
  6490. // node_modules/lodash-es/_baseSortedUniq.js
  6491. function baseSortedUniq(array4, iteratee2) {
  6492. var index = -1, length = array4.length, resIndex = 0, result2 = [];
  6493. while (++index < length) {
  6494. var value = array4[index], computed3 = iteratee2 ? iteratee2(value) : value;
  6495. if (!index || !eq_default(computed3, seen)) {
  6496. var seen = computed3;
  6497. result2[resIndex++] = value === 0 ? 0 : value;
  6498. }
  6499. }
  6500. return result2;
  6501. }
  6502. var baseSortedUniq_default = baseSortedUniq;
  6503. // node_modules/lodash-es/sortedUniq.js
  6504. function sortedUniq(array4) {
  6505. return array4 && array4.length ? baseSortedUniq_default(array4) : [];
  6506. }
  6507. var sortedUniq_default = sortedUniq;
  6508. // node_modules/lodash-es/sortedUniqBy.js
  6509. function sortedUniqBy(array4, iteratee2) {
  6510. return array4 && array4.length ? baseSortedUniq_default(array4, baseIteratee_default(iteratee2, 2)) : [];
  6511. }
  6512. var sortedUniqBy_default = sortedUniqBy;
  6513. // node_modules/lodash-es/split.js
  6514. var MAX_ARRAY_LENGTH5 = 4294967295;
  6515. function split(string3, separator, limit) {
  6516. if (limit && typeof limit != "number" && isIterateeCall_default(string3, separator, limit)) {
  6517. separator = limit = void 0;
  6518. }
  6519. limit = limit === void 0 ? MAX_ARRAY_LENGTH5 : limit >>> 0;
  6520. if (!limit) {
  6521. return [];
  6522. }
  6523. string3 = toString_default(string3);
  6524. if (string3 && (typeof separator == "string" || separator != null && !isRegExp_default(separator))) {
  6525. separator = baseToString_default(separator);
  6526. if (!separator && hasUnicode_default(string3)) {
  6527. return castSlice_default(stringToArray_default(string3), 0, limit);
  6528. }
  6529. }
  6530. return string3.split(separator, limit);
  6531. }
  6532. var split_default = split;
  6533. // node_modules/lodash-es/spread.js
  6534. var FUNC_ERROR_TEXT11 = "Expected a function";
  6535. var nativeMax14 = Math.max;
  6536. function spread(func, start) {
  6537. if (typeof func != "function") {
  6538. throw new TypeError(FUNC_ERROR_TEXT11);
  6539. }
  6540. start = start == null ? 0 : nativeMax14(toInteger_default(start), 0);
  6541. return baseRest_default(function(args) {
  6542. var array4 = args[start], otherArgs = castSlice_default(args, 0, start);
  6543. if (array4) {
  6544. arrayPush_default(otherArgs, array4);
  6545. }
  6546. return apply_default(func, this, otherArgs);
  6547. });
  6548. }
  6549. var spread_default = spread;
  6550. // node_modules/lodash-es/startCase.js
  6551. var startCase = createCompounder_default(function(result2, word, index) {
  6552. return result2 + (index ? " " : "") + upperFirst_default(word);
  6553. });
  6554. var startCase_default = startCase;
  6555. // node_modules/lodash-es/startsWith.js
  6556. function startsWith(string3, target2, position) {
  6557. string3 = toString_default(string3);
  6558. position = position == null ? 0 : baseClamp_default(toInteger_default(position), 0, string3.length);
  6559. target2 = baseToString_default(target2);
  6560. return string3.slice(position, position + target2.length) == target2;
  6561. }
  6562. var startsWith_default = startsWith;
  6563. // node_modules/lodash-es/stubObject.js
  6564. function stubObject() {
  6565. return {};
  6566. }
  6567. var stubObject_default = stubObject;
  6568. // node_modules/lodash-es/stubString.js
  6569. function stubString() {
  6570. return "";
  6571. }
  6572. var stubString_default = stubString;
  6573. // node_modules/lodash-es/stubTrue.js
  6574. function stubTrue() {
  6575. return true;
  6576. }
  6577. var stubTrue_default = stubTrue;
  6578. // node_modules/lodash-es/subtract.js
  6579. var subtract = createMathOperation_default(function(minuend, subtrahend) {
  6580. return minuend - subtrahend;
  6581. }, 0);
  6582. var subtract_default = subtract;
  6583. // node_modules/lodash-es/sum.js
  6584. function sum(array4) {
  6585. return array4 && array4.length ? baseSum_default(array4, identity_default) : 0;
  6586. }
  6587. var sum_default = sum;
  6588. // node_modules/lodash-es/sumBy.js
  6589. function sumBy(array4, iteratee2) {
  6590. return array4 && array4.length ? baseSum_default(array4, baseIteratee_default(iteratee2, 2)) : 0;
  6591. }
  6592. var sumBy_default = sumBy;
  6593. // node_modules/lodash-es/tail.js
  6594. function tail(array4) {
  6595. var length = array4 == null ? 0 : array4.length;
  6596. return length ? baseSlice_default(array4, 1, length) : [];
  6597. }
  6598. var tail_default = tail;
  6599. // node_modules/lodash-es/take.js
  6600. function take(array4, n, guard) {
  6601. if (!(array4 && array4.length)) {
  6602. return [];
  6603. }
  6604. n = guard || n === void 0 ? 1 : toInteger_default(n);
  6605. return baseSlice_default(array4, 0, n < 0 ? 0 : n);
  6606. }
  6607. var take_default = take;
  6608. // node_modules/lodash-es/takeRight.js
  6609. function takeRight(array4, n, guard) {
  6610. var length = array4 == null ? 0 : array4.length;
  6611. if (!length) {
  6612. return [];
  6613. }
  6614. n = guard || n === void 0 ? 1 : toInteger_default(n);
  6615. n = length - n;
  6616. return baseSlice_default(array4, n < 0 ? 0 : n, length);
  6617. }
  6618. var takeRight_default = takeRight;
  6619. // node_modules/lodash-es/takeRightWhile.js
  6620. function takeRightWhile(array4, predicate) {
  6621. return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3), false, true) : [];
  6622. }
  6623. var takeRightWhile_default = takeRightWhile;
  6624. // node_modules/lodash-es/takeWhile.js
  6625. function takeWhile(array4, predicate) {
  6626. return array4 && array4.length ? baseWhile_default(array4, baseIteratee_default(predicate, 3)) : [];
  6627. }
  6628. var takeWhile_default = takeWhile;
  6629. // node_modules/lodash-es/tap.js
  6630. function tap(value, interceptor) {
  6631. interceptor(value);
  6632. return value;
  6633. }
  6634. var tap_default = tap;
  6635. // node_modules/lodash-es/_customDefaultsAssignIn.js
  6636. var objectProto27 = Object.prototype;
  6637. var hasOwnProperty23 = objectProto27.hasOwnProperty;
  6638. function customDefaultsAssignIn(objValue, srcValue, key, object4) {
  6639. if (objValue === void 0 || eq_default(objValue, objectProto27[key]) && !hasOwnProperty23.call(object4, key)) {
  6640. return srcValue;
  6641. }
  6642. return objValue;
  6643. }
  6644. var customDefaultsAssignIn_default = customDefaultsAssignIn;
  6645. // node_modules/lodash-es/_escapeStringChar.js
  6646. var stringEscapes = {
  6647. "\\": "\\",
  6648. "'": "'",
  6649. "\n": "n",
  6650. "\r": "r",
  6651. "\u2028": "u2028",
  6652. "\u2029": "u2029"
  6653. };
  6654. function escapeStringChar(chr) {
  6655. return "\\" + stringEscapes[chr];
  6656. }
  6657. var escapeStringChar_default = escapeStringChar;
  6658. // node_modules/lodash-es/_reInterpolate.js
  6659. var reInterpolate = /<%=([\s\S]+?)%>/g;
  6660. var reInterpolate_default = reInterpolate;
  6661. // node_modules/lodash-es/_reEscape.js
  6662. var reEscape = /<%-([\s\S]+?)%>/g;
  6663. var reEscape_default = reEscape;
  6664. // node_modules/lodash-es/_reEvaluate.js
  6665. var reEvaluate = /<%([\s\S]+?)%>/g;
  6666. var reEvaluate_default = reEvaluate;
  6667. // node_modules/lodash-es/templateSettings.js
  6668. var templateSettings = {
  6669. "escape": reEscape_default,
  6670. "evaluate": reEvaluate_default,
  6671. "interpolate": reInterpolate_default,
  6672. "variable": "",
  6673. "imports": {
  6674. "_": { "escape": escape_default }
  6675. }
  6676. };
  6677. var templateSettings_default = templateSettings;
  6678. // node_modules/lodash-es/template.js
  6679. var INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
  6680. var reEmptyStringLeading = /\b__p \+= '';/g;
  6681. var reEmptyStringMiddle = /\b(__p \+=) '' \+/g;
  6682. var reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  6683. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  6684. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  6685. var reNoMatch = /($^)/;
  6686. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  6687. var objectProto28 = Object.prototype;
  6688. var hasOwnProperty24 = objectProto28.hasOwnProperty;
  6689. function template(string3, options, guard) {
  6690. var settings = templateSettings_default.imports._.templateSettings || templateSettings_default;
  6691. if (guard && isIterateeCall_default(string3, options, guard)) {
  6692. options = void 0;
  6693. }
  6694. string3 = toString_default(string3);
  6695. options = assignInWith_default({}, options, settings, customDefaultsAssignIn_default);
  6696. var imports = assignInWith_default({}, options.imports, settings.imports, customDefaultsAssignIn_default), importsKeys = keys_default(imports), importsValues = baseValues_default(imports, importsKeys);
  6697. var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
  6698. var reDelimiters = RegExp(
  6699. (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate_default ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
  6700. "g"
  6701. );
  6702. var sourceURL = hasOwnProperty24.call(options, "sourceURL") ? "//# sourceURL=" + (options.sourceURL + "").replace(/\s/g, " ") + "\n" : "";
  6703. string3.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset2) {
  6704. interpolateValue || (interpolateValue = esTemplateValue);
  6705. source += string3.slice(index, offset2).replace(reUnescapedString, escapeStringChar_default);
  6706. if (escapeValue) {
  6707. isEscaping = true;
  6708. source += "' +\n__e(" + escapeValue + ") +\n'";
  6709. }
  6710. if (evaluateValue) {
  6711. isEvaluating = true;
  6712. source += "';\n" + evaluateValue + ";\n__p += '";
  6713. }
  6714. if (interpolateValue) {
  6715. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  6716. }
  6717. index = offset2 + match.length;
  6718. return match;
  6719. });
  6720. source += "';\n";
  6721. var variable = hasOwnProperty24.call(options, "variable") && options.variable;
  6722. if (!variable) {
  6723. source = "with (obj) {\n" + source + "\n}\n";
  6724. } else if (reForbiddenIdentifierChars.test(variable)) {
  6725. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  6726. }
  6727. source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
  6728. source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
  6729. var result2 = attempt_default(function() {
  6730. return Function(importsKeys, sourceURL + "return " + source).apply(void 0, importsValues);
  6731. });
  6732. result2.source = source;
  6733. if (isError_default(result2)) {
  6734. throw result2;
  6735. }
  6736. return result2;
  6737. }
  6738. var template_default = template;
  6739. // node_modules/lodash-es/throttle.js
  6740. var FUNC_ERROR_TEXT12 = "Expected a function";
  6741. function throttle(func, wait, options) {
  6742. var leading = true, trailing = true;
  6743. if (typeof func != "function") {
  6744. throw new TypeError(FUNC_ERROR_TEXT12);
  6745. }
  6746. if (isObject_default(options)) {
  6747. leading = "leading" in options ? !!options.leading : leading;
  6748. trailing = "trailing" in options ? !!options.trailing : trailing;
  6749. }
  6750. return debounce_default(func, wait, {
  6751. "leading": leading,
  6752. "maxWait": wait,
  6753. "trailing": trailing
  6754. });
  6755. }
  6756. var throttle_default = throttle;
  6757. // node_modules/lodash-es/thru.js
  6758. function thru(value, interceptor) {
  6759. return interceptor(value);
  6760. }
  6761. var thru_default = thru;
  6762. // node_modules/lodash-es/times.js
  6763. var MAX_SAFE_INTEGER5 = 9007199254740991;
  6764. var MAX_ARRAY_LENGTH6 = 4294967295;
  6765. var nativeMin12 = Math.min;
  6766. function times(n, iteratee2) {
  6767. n = toInteger_default(n);
  6768. if (n < 1 || n > MAX_SAFE_INTEGER5) {
  6769. return [];
  6770. }
  6771. var index = MAX_ARRAY_LENGTH6, length = nativeMin12(n, MAX_ARRAY_LENGTH6);
  6772. iteratee2 = castFunction_default(iteratee2);
  6773. n -= MAX_ARRAY_LENGTH6;
  6774. var result2 = baseTimes_default(length, iteratee2);
  6775. while (++index < n) {
  6776. iteratee2(index);
  6777. }
  6778. return result2;
  6779. }
  6780. var times_default = times;
  6781. // node_modules/lodash-es/toIterator.js
  6782. function wrapperToIterator() {
  6783. return this;
  6784. }
  6785. var toIterator_default = wrapperToIterator;
  6786. // node_modules/lodash-es/_baseWrapperValue.js
  6787. function baseWrapperValue(value, actions) {
  6788. var result2 = value;
  6789. if (result2 instanceof LazyWrapper_default) {
  6790. result2 = result2.value();
  6791. }
  6792. return arrayReduce_default(actions, function(result3, action) {
  6793. return action.func.apply(action.thisArg, arrayPush_default([result3], action.args));
  6794. }, result2);
  6795. }
  6796. var baseWrapperValue_default = baseWrapperValue;
  6797. // node_modules/lodash-es/wrapperValue.js
  6798. function wrapperValue() {
  6799. return baseWrapperValue_default(this.__wrapped__, this.__actions__);
  6800. }
  6801. var wrapperValue_default = wrapperValue;
  6802. // node_modules/lodash-es/toLower.js
  6803. function toLower(value) {
  6804. return toString_default(value).toLowerCase();
  6805. }
  6806. var toLower_default = toLower;
  6807. // node_modules/lodash-es/toPath.js
  6808. function toPath(value) {
  6809. if (isArray_default(value)) {
  6810. return arrayMap_default(value, toKey_default);
  6811. }
  6812. return isSymbol_default(value) ? [value] : copyArray_default(stringToPath_default(toString_default(value)));
  6813. }
  6814. var toPath_default = toPath;
  6815. // node_modules/lodash-es/toSafeInteger.js
  6816. var MAX_SAFE_INTEGER6 = 9007199254740991;
  6817. function toSafeInteger(value) {
  6818. return value ? baseClamp_default(toInteger_default(value), -MAX_SAFE_INTEGER6, MAX_SAFE_INTEGER6) : value === 0 ? value : 0;
  6819. }
  6820. var toSafeInteger_default = toSafeInteger;
  6821. // node_modules/lodash-es/toUpper.js
  6822. function toUpper(value) {
  6823. return toString_default(value).toUpperCase();
  6824. }
  6825. var toUpper_default = toUpper;
  6826. // node_modules/lodash-es/transform.js
  6827. function transform(object4, iteratee2, accumulator) {
  6828. var isArr = isArray_default(object4), isArrLike = isArr || isBuffer_default(object4) || isTypedArray_default(object4);
  6829. iteratee2 = baseIteratee_default(iteratee2, 4);
  6830. if (accumulator == null) {
  6831. var Ctor = object4 && object4.constructor;
  6832. if (isArrLike) {
  6833. accumulator = isArr ? new Ctor() : [];
  6834. } else if (isObject_default(object4)) {
  6835. accumulator = isFunction_default(Ctor) ? baseCreate_default(getPrototype_default(object4)) : {};
  6836. } else {
  6837. accumulator = {};
  6838. }
  6839. }
  6840. (isArrLike ? arrayEach_default : baseForOwn_default)(object4, function(value, index, object5) {
  6841. return iteratee2(accumulator, value, index, object5);
  6842. });
  6843. return accumulator;
  6844. }
  6845. var transform_default = transform;
  6846. // node_modules/lodash-es/_charsEndIndex.js
  6847. function charsEndIndex(strSymbols, chrSymbols) {
  6848. var index = strSymbols.length;
  6849. while (index-- && baseIndexOf_default(chrSymbols, strSymbols[index], 0) > -1) {
  6850. }
  6851. return index;
  6852. }
  6853. var charsEndIndex_default = charsEndIndex;
  6854. // node_modules/lodash-es/_charsStartIndex.js
  6855. function charsStartIndex(strSymbols, chrSymbols) {
  6856. var index = -1, length = strSymbols.length;
  6857. while (++index < length && baseIndexOf_default(chrSymbols, strSymbols[index], 0) > -1) {
  6858. }
  6859. return index;
  6860. }
  6861. var charsStartIndex_default = charsStartIndex;
  6862. // node_modules/lodash-es/trim.js
  6863. function trim(string3, chars, guard) {
  6864. string3 = toString_default(string3);
  6865. if (string3 && (guard || chars === void 0)) {
  6866. return baseTrim_default(string3);
  6867. }
  6868. if (!string3 || !(chars = baseToString_default(chars))) {
  6869. return string3;
  6870. }
  6871. var strSymbols = stringToArray_default(string3), chrSymbols = stringToArray_default(chars), start = charsStartIndex_default(strSymbols, chrSymbols), end2 = charsEndIndex_default(strSymbols, chrSymbols) + 1;
  6872. return castSlice_default(strSymbols, start, end2).join("");
  6873. }
  6874. var trim_default = trim;
  6875. // node_modules/lodash-es/trimEnd.js
  6876. function trimEnd(string3, chars, guard) {
  6877. string3 = toString_default(string3);
  6878. if (string3 && (guard || chars === void 0)) {
  6879. return string3.slice(0, trimmedEndIndex_default(string3) + 1);
  6880. }
  6881. if (!string3 || !(chars = baseToString_default(chars))) {
  6882. return string3;
  6883. }
  6884. var strSymbols = stringToArray_default(string3), end2 = charsEndIndex_default(strSymbols, stringToArray_default(chars)) + 1;
  6885. return castSlice_default(strSymbols, 0, end2).join("");
  6886. }
  6887. var trimEnd_default = trimEnd;
  6888. // node_modules/lodash-es/trimStart.js
  6889. var reTrimStart3 = /^\s+/;
  6890. function trimStart(string3, chars, guard) {
  6891. string3 = toString_default(string3);
  6892. if (string3 && (guard || chars === void 0)) {
  6893. return string3.replace(reTrimStart3, "");
  6894. }
  6895. if (!string3 || !(chars = baseToString_default(chars))) {
  6896. return string3;
  6897. }
  6898. var strSymbols = stringToArray_default(string3), start = charsStartIndex_default(strSymbols, stringToArray_default(chars));
  6899. return castSlice_default(strSymbols, start).join("");
  6900. }
  6901. var trimStart_default = trimStart;
  6902. // node_modules/lodash-es/truncate.js
  6903. var DEFAULT_TRUNC_LENGTH = 30;
  6904. var DEFAULT_TRUNC_OMISSION = "...";
  6905. var reFlags2 = /\w*$/;
  6906. function truncate(string3, options) {
  6907. var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
  6908. if (isObject_default(options)) {
  6909. var separator = "separator" in options ? options.separator : separator;
  6910. length = "length" in options ? toInteger_default(options.length) : length;
  6911. omission = "omission" in options ? baseToString_default(options.omission) : omission;
  6912. }
  6913. string3 = toString_default(string3);
  6914. var strLength = string3.length;
  6915. if (hasUnicode_default(string3)) {
  6916. var strSymbols = stringToArray_default(string3);
  6917. strLength = strSymbols.length;
  6918. }
  6919. if (length >= strLength) {
  6920. return string3;
  6921. }
  6922. var end2 = length - stringSize_default(omission);
  6923. if (end2 < 1) {
  6924. return omission;
  6925. }
  6926. var result2 = strSymbols ? castSlice_default(strSymbols, 0, end2).join("") : string3.slice(0, end2);
  6927. if (separator === void 0) {
  6928. return result2 + omission;
  6929. }
  6930. if (strSymbols) {
  6931. end2 += result2.length - end2;
  6932. }
  6933. if (isRegExp_default(separator)) {
  6934. if (string3.slice(end2).search(separator)) {
  6935. var match, substring = result2;
  6936. if (!separator.global) {
  6937. separator = RegExp(separator.source, toString_default(reFlags2.exec(separator)) + "g");
  6938. }
  6939. separator.lastIndex = 0;
  6940. while (match = separator.exec(substring)) {
  6941. var newEnd = match.index;
  6942. }
  6943. result2 = result2.slice(0, newEnd === void 0 ? end2 : newEnd);
  6944. }
  6945. } else if (string3.indexOf(baseToString_default(separator), end2) != end2) {
  6946. var index = result2.lastIndexOf(separator);
  6947. if (index > -1) {
  6948. result2 = result2.slice(0, index);
  6949. }
  6950. }
  6951. return result2 + omission;
  6952. }
  6953. var truncate_default = truncate;
  6954. // node_modules/lodash-es/unary.js
  6955. function unary(func) {
  6956. return ary_default(func, 1);
  6957. }
  6958. var unary_default = unary;
  6959. // node_modules/lodash-es/_unescapeHtmlChar.js
  6960. var htmlUnescapes = {
  6961. "&amp;": "&",
  6962. "&lt;": "<",
  6963. "&gt;": ">",
  6964. "&quot;": '"',
  6965. "&#39;": "'"
  6966. };
  6967. var unescapeHtmlChar = basePropertyOf_default(htmlUnescapes);
  6968. var unescapeHtmlChar_default = unescapeHtmlChar;
  6969. // node_modules/lodash-es/unescape.js
  6970. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g;
  6971. var reHasEscapedHtml = RegExp(reEscapedHtml.source);
  6972. function unescape(string3) {
  6973. string3 = toString_default(string3);
  6974. return string3 && reHasEscapedHtml.test(string3) ? string3.replace(reEscapedHtml, unescapeHtmlChar_default) : string3;
  6975. }
  6976. var unescape_default = unescape;
  6977. // node_modules/lodash-es/_createSet.js
  6978. var INFINITY6 = 1 / 0;
  6979. var createSet = !(Set_default && 1 / setToArray_default(new Set_default([, -0]))[1] == INFINITY6) ? noop_default : function(values2) {
  6980. return new Set_default(values2);
  6981. };
  6982. var createSet_default = createSet;
  6983. // node_modules/lodash-es/_baseUniq.js
  6984. var LARGE_ARRAY_SIZE3 = 200;
  6985. function baseUniq(array4, iteratee2, comparator) {
  6986. var index = -1, includes2 = arrayIncludes_default, length = array4.length, isCommon = true, result2 = [], seen = result2;
  6987. if (comparator) {
  6988. isCommon = false;
  6989. includes2 = arrayIncludesWith_default;
  6990. } else if (length >= LARGE_ARRAY_SIZE3) {
  6991. var set4 = iteratee2 ? null : createSet_default(array4);
  6992. if (set4) {
  6993. return setToArray_default(set4);
  6994. }
  6995. isCommon = false;
  6996. includes2 = cacheHas_default;
  6997. seen = new SetCache_default();
  6998. } else {
  6999. seen = iteratee2 ? [] : result2;
  7000. }
  7001. outer:
  7002. while (++index < length) {
  7003. var value = array4[index], computed3 = iteratee2 ? iteratee2(value) : value;
  7004. value = comparator || value !== 0 ? value : 0;
  7005. if (isCommon && computed3 === computed3) {
  7006. var seenIndex = seen.length;
  7007. while (seenIndex--) {
  7008. if (seen[seenIndex] === computed3) {
  7009. continue outer;
  7010. }
  7011. }
  7012. if (iteratee2) {
  7013. seen.push(computed3);
  7014. }
  7015. result2.push(value);
  7016. } else if (!includes2(seen, computed3, comparator)) {
  7017. if (seen !== result2) {
  7018. seen.push(computed3);
  7019. }
  7020. result2.push(value);
  7021. }
  7022. }
  7023. return result2;
  7024. }
  7025. var baseUniq_default = baseUniq;
  7026. // node_modules/lodash-es/union.js
  7027. var union = baseRest_default(function(arrays) {
  7028. return baseUniq_default(baseFlatten_default(arrays, 1, isArrayLikeObject_default, true));
  7029. });
  7030. var union_default = union;
  7031. // node_modules/lodash-es/unionBy.js
  7032. var unionBy = baseRest_default(function(arrays) {
  7033. var iteratee2 = last_default(arrays);
  7034. if (isArrayLikeObject_default(iteratee2)) {
  7035. iteratee2 = void 0;
  7036. }
  7037. return baseUniq_default(baseFlatten_default(arrays, 1, isArrayLikeObject_default, true), baseIteratee_default(iteratee2, 2));
  7038. });
  7039. var unionBy_default = unionBy;
  7040. // node_modules/lodash-es/unionWith.js
  7041. var unionWith = baseRest_default(function(arrays) {
  7042. var comparator = last_default(arrays);
  7043. comparator = typeof comparator == "function" ? comparator : void 0;
  7044. return baseUniq_default(baseFlatten_default(arrays, 1, isArrayLikeObject_default, true), void 0, comparator);
  7045. });
  7046. var unionWith_default = unionWith;
  7047. // node_modules/lodash-es/uniq.js
  7048. function uniq(array4) {
  7049. return array4 && array4.length ? baseUniq_default(array4) : [];
  7050. }
  7051. var uniq_default = uniq;
  7052. // node_modules/lodash-es/uniqBy.js
  7053. function uniqBy(array4, iteratee2) {
  7054. return array4 && array4.length ? baseUniq_default(array4, baseIteratee_default(iteratee2, 2)) : [];
  7055. }
  7056. var uniqBy_default = uniqBy;
  7057. // node_modules/lodash-es/uniqWith.js
  7058. function uniqWith(array4, comparator) {
  7059. comparator = typeof comparator == "function" ? comparator : void 0;
  7060. return array4 && array4.length ? baseUniq_default(array4, void 0, comparator) : [];
  7061. }
  7062. var uniqWith_default = uniqWith;
  7063. // node_modules/lodash-es/uniqueId.js
  7064. var idCounter = 0;
  7065. function uniqueId(prefix) {
  7066. var id2 = ++idCounter;
  7067. return toString_default(prefix) + id2;
  7068. }
  7069. var uniqueId_default = uniqueId;
  7070. // node_modules/lodash-es/unset.js
  7071. function unset(object4, path) {
  7072. return object4 == null ? true : baseUnset_default(object4, path);
  7073. }
  7074. var unset_default = unset;
  7075. // node_modules/lodash-es/unzip.js
  7076. var nativeMax15 = Math.max;
  7077. function unzip(array4) {
  7078. if (!(array4 && array4.length)) {
  7079. return [];
  7080. }
  7081. var length = 0;
  7082. array4 = arrayFilter_default(array4, function(group) {
  7083. if (isArrayLikeObject_default(group)) {
  7084. length = nativeMax15(group.length, length);
  7085. return true;
  7086. }
  7087. });
  7088. return baseTimes_default(length, function(index) {
  7089. return arrayMap_default(array4, baseProperty_default(index));
  7090. });
  7091. }
  7092. var unzip_default = unzip;
  7093. // node_modules/lodash-es/unzipWith.js
  7094. function unzipWith(array4, iteratee2) {
  7095. if (!(array4 && array4.length)) {
  7096. return [];
  7097. }
  7098. var result2 = unzip_default(array4);
  7099. if (iteratee2 == null) {
  7100. return result2;
  7101. }
  7102. return arrayMap_default(result2, function(group) {
  7103. return apply_default(iteratee2, void 0, group);
  7104. });
  7105. }
  7106. var unzipWith_default = unzipWith;
  7107. // node_modules/lodash-es/_baseUpdate.js
  7108. function baseUpdate(object4, path, updater, customizer) {
  7109. return baseSet_default(object4, path, updater(baseGet_default(object4, path)), customizer);
  7110. }
  7111. var baseUpdate_default = baseUpdate;
  7112. // node_modules/lodash-es/update.js
  7113. function update(object4, path, updater) {
  7114. return object4 == null ? object4 : baseUpdate_default(object4, path, castFunction_default(updater));
  7115. }
  7116. var update_default = update;
  7117. // node_modules/lodash-es/updateWith.js
  7118. function updateWith(object4, path, updater, customizer) {
  7119. customizer = typeof customizer == "function" ? customizer : void 0;
  7120. return object4 == null ? object4 : baseUpdate_default(object4, path, castFunction_default(updater), customizer);
  7121. }
  7122. var updateWith_default = updateWith;
  7123. // node_modules/lodash-es/upperCase.js
  7124. var upperCase = createCompounder_default(function(result2, word, index) {
  7125. return result2 + (index ? " " : "") + word.toUpperCase();
  7126. });
  7127. var upperCase_default = upperCase;
  7128. // node_modules/lodash-es/valuesIn.js
  7129. function valuesIn(object4) {
  7130. return object4 == null ? [] : baseValues_default(object4, keysIn_default(object4));
  7131. }
  7132. var valuesIn_default = valuesIn;
  7133. // node_modules/lodash-es/without.js
  7134. var without = baseRest_default(function(array4, values2) {
  7135. return isArrayLikeObject_default(array4) ? baseDifference_default(array4, values2) : [];
  7136. });
  7137. var without_default = without;
  7138. // node_modules/lodash-es/wrap.js
  7139. function wrap(value, wrapper) {
  7140. return partial_default(castFunction_default(wrapper), value);
  7141. }
  7142. var wrap_default = wrap;
  7143. // node_modules/lodash-es/wrapperAt.js
  7144. var wrapperAt = flatRest_default(function(paths) {
  7145. var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object4) {
  7146. return baseAt_default(object4, paths);
  7147. };
  7148. if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper_default) || !isIndex_default(start)) {
  7149. return this.thru(interceptor);
  7150. }
  7151. value = value.slice(start, +start + (length ? 1 : 0));
  7152. value.__actions__.push({
  7153. "func": thru_default,
  7154. "args": [interceptor],
  7155. "thisArg": void 0
  7156. });
  7157. return new LodashWrapper_default(value, this.__chain__).thru(function(array4) {
  7158. if (length && !array4.length) {
  7159. array4.push(void 0);
  7160. }
  7161. return array4;
  7162. });
  7163. });
  7164. var wrapperAt_default = wrapperAt;
  7165. // node_modules/lodash-es/wrapperChain.js
  7166. function wrapperChain() {
  7167. return chain_default(this);
  7168. }
  7169. var wrapperChain_default = wrapperChain;
  7170. // node_modules/lodash-es/wrapperReverse.js
  7171. function wrapperReverse() {
  7172. var value = this.__wrapped__;
  7173. if (value instanceof LazyWrapper_default) {
  7174. var wrapped = value;
  7175. if (this.__actions__.length) {
  7176. wrapped = new LazyWrapper_default(this);
  7177. }
  7178. wrapped = wrapped.reverse();
  7179. wrapped.__actions__.push({
  7180. "func": thru_default,
  7181. "args": [reverse_default],
  7182. "thisArg": void 0
  7183. });
  7184. return new LodashWrapper_default(wrapped, this.__chain__);
  7185. }
  7186. return this.thru(reverse_default);
  7187. }
  7188. var wrapperReverse_default = wrapperReverse;
  7189. // node_modules/lodash-es/_baseXor.js
  7190. function baseXor(arrays, iteratee2, comparator) {
  7191. var length = arrays.length;
  7192. if (length < 2) {
  7193. return length ? baseUniq_default(arrays[0]) : [];
  7194. }
  7195. var index = -1, result2 = Array(length);
  7196. while (++index < length) {
  7197. var array4 = arrays[index], othIndex = -1;
  7198. while (++othIndex < length) {
  7199. if (othIndex != index) {
  7200. result2[index] = baseDifference_default(result2[index] || array4, arrays[othIndex], iteratee2, comparator);
  7201. }
  7202. }
  7203. }
  7204. return baseUniq_default(baseFlatten_default(result2, 1), iteratee2, comparator);
  7205. }
  7206. var baseXor_default = baseXor;
  7207. // node_modules/lodash-es/xor.js
  7208. var xor = baseRest_default(function(arrays) {
  7209. return baseXor_default(arrayFilter_default(arrays, isArrayLikeObject_default));
  7210. });
  7211. var xor_default = xor;
  7212. // node_modules/lodash-es/xorBy.js
  7213. var xorBy = baseRest_default(function(arrays) {
  7214. var iteratee2 = last_default(arrays);
  7215. if (isArrayLikeObject_default(iteratee2)) {
  7216. iteratee2 = void 0;
  7217. }
  7218. return baseXor_default(arrayFilter_default(arrays, isArrayLikeObject_default), baseIteratee_default(iteratee2, 2));
  7219. });
  7220. var xorBy_default = xorBy;
  7221. // node_modules/lodash-es/xorWith.js
  7222. var xorWith = baseRest_default(function(arrays) {
  7223. var comparator = last_default(arrays);
  7224. comparator = typeof comparator == "function" ? comparator : void 0;
  7225. return baseXor_default(arrayFilter_default(arrays, isArrayLikeObject_default), void 0, comparator);
  7226. });
  7227. var xorWith_default = xorWith;
  7228. // node_modules/lodash-es/zip.js
  7229. var zip = baseRest_default(unzip_default);
  7230. var zip_default = zip;
  7231. // node_modules/lodash-es/_baseZipObject.js
  7232. function baseZipObject(props, values2, assignFunc) {
  7233. var index = -1, length = props.length, valsLength = values2.length, result2 = {};
  7234. while (++index < length) {
  7235. var value = index < valsLength ? values2[index] : void 0;
  7236. assignFunc(result2, props[index], value);
  7237. }
  7238. return result2;
  7239. }
  7240. var baseZipObject_default = baseZipObject;
  7241. // node_modules/lodash-es/zipObject.js
  7242. function zipObject(props, values2) {
  7243. return baseZipObject_default(props || [], values2 || [], assignValue_default);
  7244. }
  7245. var zipObject_default = zipObject;
  7246. // node_modules/lodash-es/zipObjectDeep.js
  7247. function zipObjectDeep(props, values2) {
  7248. return baseZipObject_default(props || [], values2 || [], baseSet_default);
  7249. }
  7250. var zipObjectDeep_default = zipObjectDeep;
  7251. // node_modules/lodash-es/zipWith.js
  7252. var zipWith = baseRest_default(function(arrays) {
  7253. var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : void 0;
  7254. iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : void 0;
  7255. return unzipWith_default(arrays, iteratee2);
  7256. });
  7257. var zipWith_default = zipWith;
  7258. // node_modules/lodash-es/array.default.js
  7259. var array_default_default = {
  7260. chunk: chunk_default,
  7261. compact: compact_default,
  7262. concat: concat_default,
  7263. difference: difference_default,
  7264. differenceBy: differenceBy_default,
  7265. differenceWith: differenceWith_default,
  7266. drop: drop_default,
  7267. dropRight: dropRight_default,
  7268. dropRightWhile: dropRightWhile_default,
  7269. dropWhile: dropWhile_default,
  7270. fill: fill_default,
  7271. findIndex: findIndex_default,
  7272. findLastIndex: findLastIndex_default,
  7273. first: head_default,
  7274. flatten: flatten_default,
  7275. flattenDeep: flattenDeep_default,
  7276. flattenDepth: flattenDepth_default,
  7277. fromPairs: fromPairs_default,
  7278. head: head_default,
  7279. indexOf: indexOf_default,
  7280. initial: initial_default,
  7281. intersection: intersection_default,
  7282. intersectionBy: intersectionBy_default,
  7283. intersectionWith: intersectionWith_default,
  7284. join: join_default,
  7285. last: last_default,
  7286. lastIndexOf: lastIndexOf_default,
  7287. nth: nth_default,
  7288. pull: pull_default,
  7289. pullAll: pullAll_default,
  7290. pullAllBy: pullAllBy_default,
  7291. pullAllWith: pullAllWith_default,
  7292. pullAt: pullAt_default,
  7293. remove: remove_default,
  7294. reverse: reverse_default,
  7295. slice: slice_default,
  7296. sortedIndex: sortedIndex_default,
  7297. sortedIndexBy: sortedIndexBy_default,
  7298. sortedIndexOf: sortedIndexOf_default,
  7299. sortedLastIndex: sortedLastIndex_default,
  7300. sortedLastIndexBy: sortedLastIndexBy_default,
  7301. sortedLastIndexOf: sortedLastIndexOf_default,
  7302. sortedUniq: sortedUniq_default,
  7303. sortedUniqBy: sortedUniqBy_default,
  7304. tail: tail_default,
  7305. take: take_default,
  7306. takeRight: takeRight_default,
  7307. takeRightWhile: takeRightWhile_default,
  7308. takeWhile: takeWhile_default,
  7309. union: union_default,
  7310. unionBy: unionBy_default,
  7311. unionWith: unionWith_default,
  7312. uniq: uniq_default,
  7313. uniqBy: uniqBy_default,
  7314. uniqWith: uniqWith_default,
  7315. unzip: unzip_default,
  7316. unzipWith: unzipWith_default,
  7317. without: without_default,
  7318. xor: xor_default,
  7319. xorBy: xorBy_default,
  7320. xorWith: xorWith_default,
  7321. zip: zip_default,
  7322. zipObject: zipObject_default,
  7323. zipObjectDeep: zipObjectDeep_default,
  7324. zipWith: zipWith_default
  7325. };
  7326. // node_modules/lodash-es/collection.default.js
  7327. var collection_default_default = {
  7328. countBy: countBy_default,
  7329. each: forEach_default,
  7330. eachRight: forEachRight_default,
  7331. every: every_default,
  7332. filter: filter_default,
  7333. find: find_default,
  7334. findLast: findLast_default,
  7335. flatMap: flatMap_default,
  7336. flatMapDeep: flatMapDeep_default,
  7337. flatMapDepth: flatMapDepth_default,
  7338. forEach: forEach_default,
  7339. forEachRight: forEachRight_default,
  7340. groupBy: groupBy_default,
  7341. includes: includes_default,
  7342. invokeMap: invokeMap_default,
  7343. keyBy: keyBy_default,
  7344. map: map_default,
  7345. orderBy: orderBy_default,
  7346. partition: partition_default,
  7347. reduce: reduce_default,
  7348. reduceRight: reduceRight_default,
  7349. reject: reject_default,
  7350. sample: sample_default,
  7351. sampleSize: sampleSize_default,
  7352. shuffle: shuffle_default,
  7353. size: size_default,
  7354. some: some_default,
  7355. sortBy: sortBy_default
  7356. };
  7357. // node_modules/lodash-es/date.default.js
  7358. var date_default_default = {
  7359. now: now_default
  7360. };
  7361. // node_modules/lodash-es/function.default.js
  7362. var function_default_default = {
  7363. after: after_default,
  7364. ary: ary_default,
  7365. before: before_default,
  7366. bind: bind_default,
  7367. bindKey: bindKey_default,
  7368. curry: curry_default,
  7369. curryRight: curryRight_default,
  7370. debounce: debounce_default,
  7371. defer: defer_default,
  7372. delay: delay_default,
  7373. flip: flip_default,
  7374. memoize: memoize_default,
  7375. negate: negate_default,
  7376. once: once_default,
  7377. overArgs: overArgs_default,
  7378. partial: partial_default,
  7379. partialRight: partialRight_default,
  7380. rearg: rearg_default,
  7381. rest: rest_default,
  7382. spread: spread_default,
  7383. throttle: throttle_default,
  7384. unary: unary_default,
  7385. wrap: wrap_default
  7386. };
  7387. // node_modules/lodash-es/lang.default.js
  7388. var lang_default_default = {
  7389. castArray: castArray_default,
  7390. clone: clone_default,
  7391. cloneDeep: cloneDeep_default,
  7392. cloneDeepWith: cloneDeepWith_default,
  7393. cloneWith: cloneWith_default,
  7394. conformsTo: conformsTo_default,
  7395. eq: eq_default,
  7396. gt: gt_default,
  7397. gte: gte_default,
  7398. isArguments: isArguments_default,
  7399. isArray: isArray_default,
  7400. isArrayBuffer: isArrayBuffer_default,
  7401. isArrayLike: isArrayLike_default,
  7402. isArrayLikeObject: isArrayLikeObject_default,
  7403. isBoolean: isBoolean_default,
  7404. isBuffer: isBuffer_default,
  7405. isDate: isDate_default,
  7406. isElement: isElement_default,
  7407. isEmpty: isEmpty_default,
  7408. isEqual: isEqual_default,
  7409. isEqualWith: isEqualWith_default,
  7410. isError: isError_default,
  7411. isFinite: isFinite_default,
  7412. isFunction: isFunction_default,
  7413. isInteger: isInteger_default,
  7414. isLength: isLength_default,
  7415. isMap: isMap_default,
  7416. isMatch: isMatch_default,
  7417. isMatchWith: isMatchWith_default,
  7418. isNaN: isNaN_default,
  7419. isNative: isNative_default,
  7420. isNil: isNil_default,
  7421. isNull: isNull_default,
  7422. isNumber: isNumber_default,
  7423. isObject: isObject_default,
  7424. isObjectLike: isObjectLike_default,
  7425. isPlainObject: isPlainObject_default,
  7426. isRegExp: isRegExp_default,
  7427. isSafeInteger: isSafeInteger_default,
  7428. isSet: isSet_default,
  7429. isString: isString_default,
  7430. isSymbol: isSymbol_default,
  7431. isTypedArray: isTypedArray_default,
  7432. isUndefined: isUndefined_default,
  7433. isWeakMap: isWeakMap_default,
  7434. isWeakSet: isWeakSet_default,
  7435. lt: lt_default,
  7436. lte: lte_default,
  7437. toArray: toArray_default,
  7438. toFinite: toFinite_default,
  7439. toInteger: toInteger_default,
  7440. toLength: toLength_default,
  7441. toNumber: toNumber_default,
  7442. toPlainObject: toPlainObject_default,
  7443. toSafeInteger: toSafeInteger_default,
  7444. toString: toString_default
  7445. };
  7446. // node_modules/lodash-es/math.default.js
  7447. var math_default_default = {
  7448. add: add_default,
  7449. ceil: ceil_default,
  7450. divide: divide_default,
  7451. floor: floor_default,
  7452. max: max_default,
  7453. maxBy: maxBy_default,
  7454. mean: mean_default,
  7455. meanBy: meanBy_default,
  7456. min: min_default,
  7457. minBy: minBy_default,
  7458. multiply: multiply_default,
  7459. round: round_default,
  7460. subtract: subtract_default,
  7461. sum: sum_default,
  7462. sumBy: sumBy_default
  7463. };
  7464. // node_modules/lodash-es/number.default.js
  7465. var number_default_default = {
  7466. clamp: clamp_default,
  7467. inRange: inRange_default,
  7468. random: random_default
  7469. };
  7470. // node_modules/lodash-es/object.default.js
  7471. var object_default_default = {
  7472. assign: assign_default,
  7473. assignIn: assignIn_default,
  7474. assignInWith: assignInWith_default,
  7475. assignWith: assignWith_default,
  7476. at: at_default,
  7477. create: create_default,
  7478. defaults: defaults_default,
  7479. defaultsDeep: defaultsDeep_default,
  7480. entries: toPairs_default,
  7481. entriesIn: toPairsIn_default,
  7482. extend: assignIn_default,
  7483. extendWith: assignInWith_default,
  7484. findKey: findKey_default,
  7485. findLastKey: findLastKey_default,
  7486. forIn: forIn_default,
  7487. forInRight: forInRight_default,
  7488. forOwn: forOwn_default,
  7489. forOwnRight: forOwnRight_default,
  7490. functions: functions_default,
  7491. functionsIn: functionsIn_default,
  7492. get: get_default,
  7493. has: has_default,
  7494. hasIn: hasIn_default,
  7495. invert: invert_default,
  7496. invertBy: invertBy_default,
  7497. invoke: invoke_default,
  7498. keys: keys_default,
  7499. keysIn: keysIn_default,
  7500. mapKeys: mapKeys_default,
  7501. mapValues: mapValues_default,
  7502. merge: merge_default,
  7503. mergeWith: mergeWith_default,
  7504. omit: omit_default,
  7505. omitBy: omitBy_default,
  7506. pick: pick_default,
  7507. pickBy: pickBy_default,
  7508. result: result_default,
  7509. set: set_default,
  7510. setWith: setWith_default,
  7511. toPairs: toPairs_default,
  7512. toPairsIn: toPairsIn_default,
  7513. transform: transform_default,
  7514. unset: unset_default,
  7515. update: update_default,
  7516. updateWith: updateWith_default,
  7517. values: values_default,
  7518. valuesIn: valuesIn_default
  7519. };
  7520. // node_modules/lodash-es/seq.default.js
  7521. var seq_default_default = {
  7522. at: wrapperAt_default,
  7523. chain: chain_default,
  7524. commit: commit_default,
  7525. lodash: wrapperLodash_default,
  7526. next: next_default,
  7527. plant: plant_default,
  7528. reverse: wrapperReverse_default,
  7529. tap: tap_default,
  7530. thru: thru_default,
  7531. toIterator: toIterator_default,
  7532. toJSON: wrapperValue_default,
  7533. value: wrapperValue_default,
  7534. valueOf: wrapperValue_default,
  7535. wrapperChain: wrapperChain_default
  7536. };
  7537. // node_modules/lodash-es/string.default.js
  7538. var string_default_default = {
  7539. camelCase: camelCase_default,
  7540. capitalize: capitalize_default,
  7541. deburr: deburr_default,
  7542. endsWith: endsWith_default,
  7543. escape: escape_default,
  7544. escapeRegExp: escapeRegExp_default,
  7545. kebabCase: kebabCase_default,
  7546. lowerCase: lowerCase_default,
  7547. lowerFirst: lowerFirst_default,
  7548. pad: pad_default,
  7549. padEnd: padEnd_default,
  7550. padStart: padStart_default,
  7551. parseInt: parseInt_default,
  7552. repeat: repeat_default,
  7553. replace: replace_default,
  7554. snakeCase: snakeCase_default,
  7555. split: split_default,
  7556. startCase: startCase_default,
  7557. startsWith: startsWith_default,
  7558. template: template_default,
  7559. templateSettings: templateSettings_default,
  7560. toLower: toLower_default,
  7561. toUpper: toUpper_default,
  7562. trim: trim_default,
  7563. trimEnd: trimEnd_default,
  7564. trimStart: trimStart_default,
  7565. truncate: truncate_default,
  7566. unescape: unescape_default,
  7567. upperCase: upperCase_default,
  7568. upperFirst: upperFirst_default,
  7569. words: words_default
  7570. };
  7571. // node_modules/lodash-es/util.default.js
  7572. var util_default_default = {
  7573. attempt: attempt_default,
  7574. bindAll: bindAll_default,
  7575. cond: cond_default,
  7576. conforms: conforms_default,
  7577. constant: constant_default,
  7578. defaultTo: defaultTo_default,
  7579. flow: flow_default,
  7580. flowRight: flowRight_default,
  7581. identity: identity_default,
  7582. iteratee: iteratee_default,
  7583. matches: matches_default,
  7584. matchesProperty: matchesProperty_default,
  7585. method: method_default,
  7586. methodOf: methodOf_default,
  7587. mixin: mixin_default,
  7588. noop: noop_default,
  7589. nthArg: nthArg_default,
  7590. over: over_default,
  7591. overEvery: overEvery_default,
  7592. overSome: overSome_default,
  7593. property: property_default,
  7594. propertyOf: propertyOf_default,
  7595. range: range_default,
  7596. rangeRight: rangeRight_default,
  7597. stubArray: stubArray_default,
  7598. stubFalse: stubFalse_default,
  7599. stubObject: stubObject_default,
  7600. stubString: stubString_default,
  7601. stubTrue: stubTrue_default,
  7602. times: times_default,
  7603. toPath: toPath_default,
  7604. uniqueId: uniqueId_default
  7605. };
  7606. // node_modules/lodash-es/_lazyClone.js
  7607. function lazyClone() {
  7608. var result2 = new LazyWrapper_default(this.__wrapped__);
  7609. result2.__actions__ = copyArray_default(this.__actions__);
  7610. result2.__dir__ = this.__dir__;
  7611. result2.__filtered__ = this.__filtered__;
  7612. result2.__iteratees__ = copyArray_default(this.__iteratees__);
  7613. result2.__takeCount__ = this.__takeCount__;
  7614. result2.__views__ = copyArray_default(this.__views__);
  7615. return result2;
  7616. }
  7617. var lazyClone_default = lazyClone;
  7618. // node_modules/lodash-es/_lazyReverse.js
  7619. function lazyReverse() {
  7620. if (this.__filtered__) {
  7621. var result2 = new LazyWrapper_default(this);
  7622. result2.__dir__ = -1;
  7623. result2.__filtered__ = true;
  7624. } else {
  7625. result2 = this.clone();
  7626. result2.__dir__ *= -1;
  7627. }
  7628. return result2;
  7629. }
  7630. var lazyReverse_default = lazyReverse;
  7631. // node_modules/lodash-es/_getView.js
  7632. var nativeMax16 = Math.max;
  7633. var nativeMin13 = Math.min;
  7634. function getView(start, end2, transforms) {
  7635. var index = -1, length = transforms.length;
  7636. while (++index < length) {
  7637. var data = transforms[index], size3 = data.size;
  7638. switch (data.type) {
  7639. case "drop":
  7640. start += size3;
  7641. break;
  7642. case "dropRight":
  7643. end2 -= size3;
  7644. break;
  7645. case "take":
  7646. end2 = nativeMin13(end2, start + size3);
  7647. break;
  7648. case "takeRight":
  7649. start = nativeMax16(start, end2 - size3);
  7650. break;
  7651. }
  7652. }
  7653. return { "start": start, "end": end2 };
  7654. }
  7655. var getView_default = getView;
  7656. // node_modules/lodash-es/_lazyValue.js
  7657. var LAZY_FILTER_FLAG = 1;
  7658. var LAZY_MAP_FLAG = 2;
  7659. var nativeMin14 = Math.min;
  7660. function lazyValue() {
  7661. var array4 = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray_default(array4), isRight = dir < 0, arrLength = isArr ? array4.length : 0, view = getView_default(0, arrLength, this.__views__), start = view.start, end2 = view.end, length = end2 - start, index = isRight ? end2 : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin14(length, this.__takeCount__);
  7662. if (!isArr || !isRight && arrLength == length && takeCount == length) {
  7663. return baseWrapperValue_default(array4, this.__actions__);
  7664. }
  7665. var result2 = [];
  7666. outer:
  7667. while (length-- && resIndex < takeCount) {
  7668. index += dir;
  7669. var iterIndex = -1, value = array4[index];
  7670. while (++iterIndex < iterLength) {
  7671. var data = iteratees[iterIndex], iteratee2 = data.iteratee, type4 = data.type, computed3 = iteratee2(value);
  7672. if (type4 == LAZY_MAP_FLAG) {
  7673. value = computed3;
  7674. } else if (!computed3) {
  7675. if (type4 == LAZY_FILTER_FLAG) {
  7676. continue outer;
  7677. } else {
  7678. break outer;
  7679. }
  7680. }
  7681. }
  7682. result2[resIndex++] = value;
  7683. }
  7684. return result2;
  7685. }
  7686. var lazyValue_default = lazyValue;
  7687. // node_modules/lodash-es/lodash.default.js
  7688. var VERSION = "4.17.21";
  7689. var WRAP_BIND_KEY_FLAG7 = 2;
  7690. var LAZY_FILTER_FLAG2 = 1;
  7691. var LAZY_WHILE_FLAG = 3;
  7692. var MAX_ARRAY_LENGTH7 = 4294967295;
  7693. var arrayProto6 = Array.prototype;
  7694. var objectProto29 = Object.prototype;
  7695. var hasOwnProperty25 = objectProto29.hasOwnProperty;
  7696. var symIterator2 = Symbol_default ? Symbol_default.iterator : void 0;
  7697. var nativeMax17 = Math.max;
  7698. var nativeMin15 = Math.min;
  7699. var mixin2 = function(func) {
  7700. return function(object4, source, options) {
  7701. if (options == null) {
  7702. var isObj = isObject_default(source), props = isObj && keys_default(source), methodNames = props && props.length && baseFunctions_default(source, props);
  7703. if (!(methodNames ? methodNames.length : isObj)) {
  7704. options = source;
  7705. source = object4;
  7706. object4 = this;
  7707. }
  7708. }
  7709. return func(object4, source, options);
  7710. };
  7711. }(mixin_default);
  7712. wrapperLodash_default.after = function_default_default.after;
  7713. wrapperLodash_default.ary = function_default_default.ary;
  7714. wrapperLodash_default.assign = object_default_default.assign;
  7715. wrapperLodash_default.assignIn = object_default_default.assignIn;
  7716. wrapperLodash_default.assignInWith = object_default_default.assignInWith;
  7717. wrapperLodash_default.assignWith = object_default_default.assignWith;
  7718. wrapperLodash_default.at = object_default_default.at;
  7719. wrapperLodash_default.before = function_default_default.before;
  7720. wrapperLodash_default.bind = function_default_default.bind;
  7721. wrapperLodash_default.bindAll = util_default_default.bindAll;
  7722. wrapperLodash_default.bindKey = function_default_default.bindKey;
  7723. wrapperLodash_default.castArray = lang_default_default.castArray;
  7724. wrapperLodash_default.chain = seq_default_default.chain;
  7725. wrapperLodash_default.chunk = array_default_default.chunk;
  7726. wrapperLodash_default.compact = array_default_default.compact;
  7727. wrapperLodash_default.concat = array_default_default.concat;
  7728. wrapperLodash_default.cond = util_default_default.cond;
  7729. wrapperLodash_default.conforms = util_default_default.conforms;
  7730. wrapperLodash_default.constant = util_default_default.constant;
  7731. wrapperLodash_default.countBy = collection_default_default.countBy;
  7732. wrapperLodash_default.create = object_default_default.create;
  7733. wrapperLodash_default.curry = function_default_default.curry;
  7734. wrapperLodash_default.curryRight = function_default_default.curryRight;
  7735. wrapperLodash_default.debounce = function_default_default.debounce;
  7736. wrapperLodash_default.defaults = object_default_default.defaults;
  7737. wrapperLodash_default.defaultsDeep = object_default_default.defaultsDeep;
  7738. wrapperLodash_default.defer = function_default_default.defer;
  7739. wrapperLodash_default.delay = function_default_default.delay;
  7740. wrapperLodash_default.difference = array_default_default.difference;
  7741. wrapperLodash_default.differenceBy = array_default_default.differenceBy;
  7742. wrapperLodash_default.differenceWith = array_default_default.differenceWith;
  7743. wrapperLodash_default.drop = array_default_default.drop;
  7744. wrapperLodash_default.dropRight = array_default_default.dropRight;
  7745. wrapperLodash_default.dropRightWhile = array_default_default.dropRightWhile;
  7746. wrapperLodash_default.dropWhile = array_default_default.dropWhile;
  7747. wrapperLodash_default.fill = array_default_default.fill;
  7748. wrapperLodash_default.filter = collection_default_default.filter;
  7749. wrapperLodash_default.flatMap = collection_default_default.flatMap;
  7750. wrapperLodash_default.flatMapDeep = collection_default_default.flatMapDeep;
  7751. wrapperLodash_default.flatMapDepth = collection_default_default.flatMapDepth;
  7752. wrapperLodash_default.flatten = array_default_default.flatten;
  7753. wrapperLodash_default.flattenDeep = array_default_default.flattenDeep;
  7754. wrapperLodash_default.flattenDepth = array_default_default.flattenDepth;
  7755. wrapperLodash_default.flip = function_default_default.flip;
  7756. wrapperLodash_default.flow = util_default_default.flow;
  7757. wrapperLodash_default.flowRight = util_default_default.flowRight;
  7758. wrapperLodash_default.fromPairs = array_default_default.fromPairs;
  7759. wrapperLodash_default.functions = object_default_default.functions;
  7760. wrapperLodash_default.functionsIn = object_default_default.functionsIn;
  7761. wrapperLodash_default.groupBy = collection_default_default.groupBy;
  7762. wrapperLodash_default.initial = array_default_default.initial;
  7763. wrapperLodash_default.intersection = array_default_default.intersection;
  7764. wrapperLodash_default.intersectionBy = array_default_default.intersectionBy;
  7765. wrapperLodash_default.intersectionWith = array_default_default.intersectionWith;
  7766. wrapperLodash_default.invert = object_default_default.invert;
  7767. wrapperLodash_default.invertBy = object_default_default.invertBy;
  7768. wrapperLodash_default.invokeMap = collection_default_default.invokeMap;
  7769. wrapperLodash_default.iteratee = util_default_default.iteratee;
  7770. wrapperLodash_default.keyBy = collection_default_default.keyBy;
  7771. wrapperLodash_default.keys = keys_default;
  7772. wrapperLodash_default.keysIn = object_default_default.keysIn;
  7773. wrapperLodash_default.map = collection_default_default.map;
  7774. wrapperLodash_default.mapKeys = object_default_default.mapKeys;
  7775. wrapperLodash_default.mapValues = object_default_default.mapValues;
  7776. wrapperLodash_default.matches = util_default_default.matches;
  7777. wrapperLodash_default.matchesProperty = util_default_default.matchesProperty;
  7778. wrapperLodash_default.memoize = function_default_default.memoize;
  7779. wrapperLodash_default.merge = object_default_default.merge;
  7780. wrapperLodash_default.mergeWith = object_default_default.mergeWith;
  7781. wrapperLodash_default.method = util_default_default.method;
  7782. wrapperLodash_default.methodOf = util_default_default.methodOf;
  7783. wrapperLodash_default.mixin = mixin2;
  7784. wrapperLodash_default.negate = negate_default;
  7785. wrapperLodash_default.nthArg = util_default_default.nthArg;
  7786. wrapperLodash_default.omit = object_default_default.omit;
  7787. wrapperLodash_default.omitBy = object_default_default.omitBy;
  7788. wrapperLodash_default.once = function_default_default.once;
  7789. wrapperLodash_default.orderBy = collection_default_default.orderBy;
  7790. wrapperLodash_default.over = util_default_default.over;
  7791. wrapperLodash_default.overArgs = function_default_default.overArgs;
  7792. wrapperLodash_default.overEvery = util_default_default.overEvery;
  7793. wrapperLodash_default.overSome = util_default_default.overSome;
  7794. wrapperLodash_default.partial = function_default_default.partial;
  7795. wrapperLodash_default.partialRight = function_default_default.partialRight;
  7796. wrapperLodash_default.partition = collection_default_default.partition;
  7797. wrapperLodash_default.pick = object_default_default.pick;
  7798. wrapperLodash_default.pickBy = object_default_default.pickBy;
  7799. wrapperLodash_default.property = util_default_default.property;
  7800. wrapperLodash_default.propertyOf = util_default_default.propertyOf;
  7801. wrapperLodash_default.pull = array_default_default.pull;
  7802. wrapperLodash_default.pullAll = array_default_default.pullAll;
  7803. wrapperLodash_default.pullAllBy = array_default_default.pullAllBy;
  7804. wrapperLodash_default.pullAllWith = array_default_default.pullAllWith;
  7805. wrapperLodash_default.pullAt = array_default_default.pullAt;
  7806. wrapperLodash_default.range = util_default_default.range;
  7807. wrapperLodash_default.rangeRight = util_default_default.rangeRight;
  7808. wrapperLodash_default.rearg = function_default_default.rearg;
  7809. wrapperLodash_default.reject = collection_default_default.reject;
  7810. wrapperLodash_default.remove = array_default_default.remove;
  7811. wrapperLodash_default.rest = function_default_default.rest;
  7812. wrapperLodash_default.reverse = array_default_default.reverse;
  7813. wrapperLodash_default.sampleSize = collection_default_default.sampleSize;
  7814. wrapperLodash_default.set = object_default_default.set;
  7815. wrapperLodash_default.setWith = object_default_default.setWith;
  7816. wrapperLodash_default.shuffle = collection_default_default.shuffle;
  7817. wrapperLodash_default.slice = array_default_default.slice;
  7818. wrapperLodash_default.sortBy = collection_default_default.sortBy;
  7819. wrapperLodash_default.sortedUniq = array_default_default.sortedUniq;
  7820. wrapperLodash_default.sortedUniqBy = array_default_default.sortedUniqBy;
  7821. wrapperLodash_default.split = string_default_default.split;
  7822. wrapperLodash_default.spread = function_default_default.spread;
  7823. wrapperLodash_default.tail = array_default_default.tail;
  7824. wrapperLodash_default.take = array_default_default.take;
  7825. wrapperLodash_default.takeRight = array_default_default.takeRight;
  7826. wrapperLodash_default.takeRightWhile = array_default_default.takeRightWhile;
  7827. wrapperLodash_default.takeWhile = array_default_default.takeWhile;
  7828. wrapperLodash_default.tap = seq_default_default.tap;
  7829. wrapperLodash_default.throttle = function_default_default.throttle;
  7830. wrapperLodash_default.thru = thru_default;
  7831. wrapperLodash_default.toArray = lang_default_default.toArray;
  7832. wrapperLodash_default.toPairs = object_default_default.toPairs;
  7833. wrapperLodash_default.toPairsIn = object_default_default.toPairsIn;
  7834. wrapperLodash_default.toPath = util_default_default.toPath;
  7835. wrapperLodash_default.toPlainObject = lang_default_default.toPlainObject;
  7836. wrapperLodash_default.transform = object_default_default.transform;
  7837. wrapperLodash_default.unary = function_default_default.unary;
  7838. wrapperLodash_default.union = array_default_default.union;
  7839. wrapperLodash_default.unionBy = array_default_default.unionBy;
  7840. wrapperLodash_default.unionWith = array_default_default.unionWith;
  7841. wrapperLodash_default.uniq = array_default_default.uniq;
  7842. wrapperLodash_default.uniqBy = array_default_default.uniqBy;
  7843. wrapperLodash_default.uniqWith = array_default_default.uniqWith;
  7844. wrapperLodash_default.unset = object_default_default.unset;
  7845. wrapperLodash_default.unzip = array_default_default.unzip;
  7846. wrapperLodash_default.unzipWith = array_default_default.unzipWith;
  7847. wrapperLodash_default.update = object_default_default.update;
  7848. wrapperLodash_default.updateWith = object_default_default.updateWith;
  7849. wrapperLodash_default.values = object_default_default.values;
  7850. wrapperLodash_default.valuesIn = object_default_default.valuesIn;
  7851. wrapperLodash_default.without = array_default_default.without;
  7852. wrapperLodash_default.words = string_default_default.words;
  7853. wrapperLodash_default.wrap = function_default_default.wrap;
  7854. wrapperLodash_default.xor = array_default_default.xor;
  7855. wrapperLodash_default.xorBy = array_default_default.xorBy;
  7856. wrapperLodash_default.xorWith = array_default_default.xorWith;
  7857. wrapperLodash_default.zip = array_default_default.zip;
  7858. wrapperLodash_default.zipObject = array_default_default.zipObject;
  7859. wrapperLodash_default.zipObjectDeep = array_default_default.zipObjectDeep;
  7860. wrapperLodash_default.zipWith = array_default_default.zipWith;
  7861. wrapperLodash_default.entries = object_default_default.toPairs;
  7862. wrapperLodash_default.entriesIn = object_default_default.toPairsIn;
  7863. wrapperLodash_default.extend = object_default_default.assignIn;
  7864. wrapperLodash_default.extendWith = object_default_default.assignInWith;
  7865. mixin2(wrapperLodash_default, wrapperLodash_default);
  7866. wrapperLodash_default.add = math_default_default.add;
  7867. wrapperLodash_default.attempt = util_default_default.attempt;
  7868. wrapperLodash_default.camelCase = string_default_default.camelCase;
  7869. wrapperLodash_default.capitalize = string_default_default.capitalize;
  7870. wrapperLodash_default.ceil = math_default_default.ceil;
  7871. wrapperLodash_default.clamp = number_default_default.clamp;
  7872. wrapperLodash_default.clone = lang_default_default.clone;
  7873. wrapperLodash_default.cloneDeep = lang_default_default.cloneDeep;
  7874. wrapperLodash_default.cloneDeepWith = lang_default_default.cloneDeepWith;
  7875. wrapperLodash_default.cloneWith = lang_default_default.cloneWith;
  7876. wrapperLodash_default.conformsTo = lang_default_default.conformsTo;
  7877. wrapperLodash_default.deburr = string_default_default.deburr;
  7878. wrapperLodash_default.defaultTo = util_default_default.defaultTo;
  7879. wrapperLodash_default.divide = math_default_default.divide;
  7880. wrapperLodash_default.endsWith = string_default_default.endsWith;
  7881. wrapperLodash_default.eq = lang_default_default.eq;
  7882. wrapperLodash_default.escape = string_default_default.escape;
  7883. wrapperLodash_default.escapeRegExp = string_default_default.escapeRegExp;
  7884. wrapperLodash_default.every = collection_default_default.every;
  7885. wrapperLodash_default.find = collection_default_default.find;
  7886. wrapperLodash_default.findIndex = array_default_default.findIndex;
  7887. wrapperLodash_default.findKey = object_default_default.findKey;
  7888. wrapperLodash_default.findLast = collection_default_default.findLast;
  7889. wrapperLodash_default.findLastIndex = array_default_default.findLastIndex;
  7890. wrapperLodash_default.findLastKey = object_default_default.findLastKey;
  7891. wrapperLodash_default.floor = math_default_default.floor;
  7892. wrapperLodash_default.forEach = collection_default_default.forEach;
  7893. wrapperLodash_default.forEachRight = collection_default_default.forEachRight;
  7894. wrapperLodash_default.forIn = object_default_default.forIn;
  7895. wrapperLodash_default.forInRight = object_default_default.forInRight;
  7896. wrapperLodash_default.forOwn = object_default_default.forOwn;
  7897. wrapperLodash_default.forOwnRight = object_default_default.forOwnRight;
  7898. wrapperLodash_default.get = object_default_default.get;
  7899. wrapperLodash_default.gt = lang_default_default.gt;
  7900. wrapperLodash_default.gte = lang_default_default.gte;
  7901. wrapperLodash_default.has = object_default_default.has;
  7902. wrapperLodash_default.hasIn = object_default_default.hasIn;
  7903. wrapperLodash_default.head = array_default_default.head;
  7904. wrapperLodash_default.identity = identity_default;
  7905. wrapperLodash_default.includes = collection_default_default.includes;
  7906. wrapperLodash_default.indexOf = array_default_default.indexOf;
  7907. wrapperLodash_default.inRange = number_default_default.inRange;
  7908. wrapperLodash_default.invoke = object_default_default.invoke;
  7909. wrapperLodash_default.isArguments = lang_default_default.isArguments;
  7910. wrapperLodash_default.isArray = isArray_default;
  7911. wrapperLodash_default.isArrayBuffer = lang_default_default.isArrayBuffer;
  7912. wrapperLodash_default.isArrayLike = lang_default_default.isArrayLike;
  7913. wrapperLodash_default.isArrayLikeObject = lang_default_default.isArrayLikeObject;
  7914. wrapperLodash_default.isBoolean = lang_default_default.isBoolean;
  7915. wrapperLodash_default.isBuffer = lang_default_default.isBuffer;
  7916. wrapperLodash_default.isDate = lang_default_default.isDate;
  7917. wrapperLodash_default.isElement = lang_default_default.isElement;
  7918. wrapperLodash_default.isEmpty = lang_default_default.isEmpty;
  7919. wrapperLodash_default.isEqual = lang_default_default.isEqual;
  7920. wrapperLodash_default.isEqualWith = lang_default_default.isEqualWith;
  7921. wrapperLodash_default.isError = lang_default_default.isError;
  7922. wrapperLodash_default.isFinite = lang_default_default.isFinite;
  7923. wrapperLodash_default.isFunction = lang_default_default.isFunction;
  7924. wrapperLodash_default.isInteger = lang_default_default.isInteger;
  7925. wrapperLodash_default.isLength = lang_default_default.isLength;
  7926. wrapperLodash_default.isMap = lang_default_default.isMap;
  7927. wrapperLodash_default.isMatch = lang_default_default.isMatch;
  7928. wrapperLodash_default.isMatchWith = lang_default_default.isMatchWith;
  7929. wrapperLodash_default.isNaN = lang_default_default.isNaN;
  7930. wrapperLodash_default.isNative = lang_default_default.isNative;
  7931. wrapperLodash_default.isNil = lang_default_default.isNil;
  7932. wrapperLodash_default.isNull = lang_default_default.isNull;
  7933. wrapperLodash_default.isNumber = lang_default_default.isNumber;
  7934. wrapperLodash_default.isObject = isObject_default;
  7935. wrapperLodash_default.isObjectLike = lang_default_default.isObjectLike;
  7936. wrapperLodash_default.isPlainObject = lang_default_default.isPlainObject;
  7937. wrapperLodash_default.isRegExp = lang_default_default.isRegExp;
  7938. wrapperLodash_default.isSafeInteger = lang_default_default.isSafeInteger;
  7939. wrapperLodash_default.isSet = lang_default_default.isSet;
  7940. wrapperLodash_default.isString = lang_default_default.isString;
  7941. wrapperLodash_default.isSymbol = lang_default_default.isSymbol;
  7942. wrapperLodash_default.isTypedArray = lang_default_default.isTypedArray;
  7943. wrapperLodash_default.isUndefined = lang_default_default.isUndefined;
  7944. wrapperLodash_default.isWeakMap = lang_default_default.isWeakMap;
  7945. wrapperLodash_default.isWeakSet = lang_default_default.isWeakSet;
  7946. wrapperLodash_default.join = array_default_default.join;
  7947. wrapperLodash_default.kebabCase = string_default_default.kebabCase;
  7948. wrapperLodash_default.last = last_default;
  7949. wrapperLodash_default.lastIndexOf = array_default_default.lastIndexOf;
  7950. wrapperLodash_default.lowerCase = string_default_default.lowerCase;
  7951. wrapperLodash_default.lowerFirst = string_default_default.lowerFirst;
  7952. wrapperLodash_default.lt = lang_default_default.lt;
  7953. wrapperLodash_default.lte = lang_default_default.lte;
  7954. wrapperLodash_default.max = math_default_default.max;
  7955. wrapperLodash_default.maxBy = math_default_default.maxBy;
  7956. wrapperLodash_default.mean = math_default_default.mean;
  7957. wrapperLodash_default.meanBy = math_default_default.meanBy;
  7958. wrapperLodash_default.min = math_default_default.min;
  7959. wrapperLodash_default.minBy = math_default_default.minBy;
  7960. wrapperLodash_default.stubArray = util_default_default.stubArray;
  7961. wrapperLodash_default.stubFalse = util_default_default.stubFalse;
  7962. wrapperLodash_default.stubObject = util_default_default.stubObject;
  7963. wrapperLodash_default.stubString = util_default_default.stubString;
  7964. wrapperLodash_default.stubTrue = util_default_default.stubTrue;
  7965. wrapperLodash_default.multiply = math_default_default.multiply;
  7966. wrapperLodash_default.nth = array_default_default.nth;
  7967. wrapperLodash_default.noop = util_default_default.noop;
  7968. wrapperLodash_default.now = date_default_default.now;
  7969. wrapperLodash_default.pad = string_default_default.pad;
  7970. wrapperLodash_default.padEnd = string_default_default.padEnd;
  7971. wrapperLodash_default.padStart = string_default_default.padStart;
  7972. wrapperLodash_default.parseInt = string_default_default.parseInt;
  7973. wrapperLodash_default.random = number_default_default.random;
  7974. wrapperLodash_default.reduce = collection_default_default.reduce;
  7975. wrapperLodash_default.reduceRight = collection_default_default.reduceRight;
  7976. wrapperLodash_default.repeat = string_default_default.repeat;
  7977. wrapperLodash_default.replace = string_default_default.replace;
  7978. wrapperLodash_default.result = object_default_default.result;
  7979. wrapperLodash_default.round = math_default_default.round;
  7980. wrapperLodash_default.sample = collection_default_default.sample;
  7981. wrapperLodash_default.size = collection_default_default.size;
  7982. wrapperLodash_default.snakeCase = string_default_default.snakeCase;
  7983. wrapperLodash_default.some = collection_default_default.some;
  7984. wrapperLodash_default.sortedIndex = array_default_default.sortedIndex;
  7985. wrapperLodash_default.sortedIndexBy = array_default_default.sortedIndexBy;
  7986. wrapperLodash_default.sortedIndexOf = array_default_default.sortedIndexOf;
  7987. wrapperLodash_default.sortedLastIndex = array_default_default.sortedLastIndex;
  7988. wrapperLodash_default.sortedLastIndexBy = array_default_default.sortedLastIndexBy;
  7989. wrapperLodash_default.sortedLastIndexOf = array_default_default.sortedLastIndexOf;
  7990. wrapperLodash_default.startCase = string_default_default.startCase;
  7991. wrapperLodash_default.startsWith = string_default_default.startsWith;
  7992. wrapperLodash_default.subtract = math_default_default.subtract;
  7993. wrapperLodash_default.sum = math_default_default.sum;
  7994. wrapperLodash_default.sumBy = math_default_default.sumBy;
  7995. wrapperLodash_default.template = string_default_default.template;
  7996. wrapperLodash_default.times = util_default_default.times;
  7997. wrapperLodash_default.toFinite = lang_default_default.toFinite;
  7998. wrapperLodash_default.toInteger = toInteger_default;
  7999. wrapperLodash_default.toLength = lang_default_default.toLength;
  8000. wrapperLodash_default.toLower = string_default_default.toLower;
  8001. wrapperLodash_default.toNumber = lang_default_default.toNumber;
  8002. wrapperLodash_default.toSafeInteger = lang_default_default.toSafeInteger;
  8003. wrapperLodash_default.toString = lang_default_default.toString;
  8004. wrapperLodash_default.toUpper = string_default_default.toUpper;
  8005. wrapperLodash_default.trim = string_default_default.trim;
  8006. wrapperLodash_default.trimEnd = string_default_default.trimEnd;
  8007. wrapperLodash_default.trimStart = string_default_default.trimStart;
  8008. wrapperLodash_default.truncate = string_default_default.truncate;
  8009. wrapperLodash_default.unescape = string_default_default.unescape;
  8010. wrapperLodash_default.uniqueId = util_default_default.uniqueId;
  8011. wrapperLodash_default.upperCase = string_default_default.upperCase;
  8012. wrapperLodash_default.upperFirst = string_default_default.upperFirst;
  8013. wrapperLodash_default.each = collection_default_default.forEach;
  8014. wrapperLodash_default.eachRight = collection_default_default.forEachRight;
  8015. wrapperLodash_default.first = array_default_default.head;
  8016. mixin2(wrapperLodash_default, function() {
  8017. var source = {};
  8018. baseForOwn_default(wrapperLodash_default, function(func, methodName) {
  8019. if (!hasOwnProperty25.call(wrapperLodash_default.prototype, methodName)) {
  8020. source[methodName] = func;
  8021. }
  8022. });
  8023. return source;
  8024. }(), { "chain": false });
  8025. wrapperLodash_default.VERSION = VERSION;
  8026. (wrapperLodash_default.templateSettings = string_default_default.templateSettings).imports._ = wrapperLodash_default;
  8027. arrayEach_default(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
  8028. wrapperLodash_default[methodName].placeholder = wrapperLodash_default;
  8029. });
  8030. arrayEach_default(["drop", "take"], function(methodName, index) {
  8031. LazyWrapper_default.prototype[methodName] = function(n) {
  8032. n = n === void 0 ? 1 : nativeMax17(toInteger_default(n), 0);
  8033. var result2 = this.__filtered__ && !index ? new LazyWrapper_default(this) : this.clone();
  8034. if (result2.__filtered__) {
  8035. result2.__takeCount__ = nativeMin15(n, result2.__takeCount__);
  8036. } else {
  8037. result2.__views__.push({
  8038. "size": nativeMin15(n, MAX_ARRAY_LENGTH7),
  8039. "type": methodName + (result2.__dir__ < 0 ? "Right" : "")
  8040. });
  8041. }
  8042. return result2;
  8043. };
  8044. LazyWrapper_default.prototype[methodName + "Right"] = function(n) {
  8045. return this.reverse()[methodName](n).reverse();
  8046. };
  8047. });
  8048. arrayEach_default(["filter", "map", "takeWhile"], function(methodName, index) {
  8049. var type4 = index + 1, isFilter = type4 == LAZY_FILTER_FLAG2 || type4 == LAZY_WHILE_FLAG;
  8050. LazyWrapper_default.prototype[methodName] = function(iteratee2) {
  8051. var result2 = this.clone();
  8052. result2.__iteratees__.push({
  8053. "iteratee": baseIteratee_default(iteratee2, 3),
  8054. "type": type4
  8055. });
  8056. result2.__filtered__ = result2.__filtered__ || isFilter;
  8057. return result2;
  8058. };
  8059. });
  8060. arrayEach_default(["head", "last"], function(methodName, index) {
  8061. var takeName = "take" + (index ? "Right" : "");
  8062. LazyWrapper_default.prototype[methodName] = function() {
  8063. return this[takeName](1).value()[0];
  8064. };
  8065. });
  8066. arrayEach_default(["initial", "tail"], function(methodName, index) {
  8067. var dropName = "drop" + (index ? "" : "Right");
  8068. LazyWrapper_default.prototype[methodName] = function() {
  8069. return this.__filtered__ ? new LazyWrapper_default(this) : this[dropName](1);
  8070. };
  8071. });
  8072. LazyWrapper_default.prototype.compact = function() {
  8073. return this.filter(identity_default);
  8074. };
  8075. LazyWrapper_default.prototype.find = function(predicate) {
  8076. return this.filter(predicate).head();
  8077. };
  8078. LazyWrapper_default.prototype.findLast = function(predicate) {
  8079. return this.reverse().find(predicate);
  8080. };
  8081. LazyWrapper_default.prototype.invokeMap = baseRest_default(function(path, args) {
  8082. if (typeof path == "function") {
  8083. return new LazyWrapper_default(this);
  8084. }
  8085. return this.map(function(value) {
  8086. return baseInvoke_default(value, path, args);
  8087. });
  8088. });
  8089. LazyWrapper_default.prototype.reject = function(predicate) {
  8090. return this.filter(negate_default(baseIteratee_default(predicate)));
  8091. };
  8092. LazyWrapper_default.prototype.slice = function(start, end2) {
  8093. start = toInteger_default(start);
  8094. var result2 = this;
  8095. if (result2.__filtered__ && (start > 0 || end2 < 0)) {
  8096. return new LazyWrapper_default(result2);
  8097. }
  8098. if (start < 0) {
  8099. result2 = result2.takeRight(-start);
  8100. } else if (start) {
  8101. result2 = result2.drop(start);
  8102. }
  8103. if (end2 !== void 0) {
  8104. end2 = toInteger_default(end2);
  8105. result2 = end2 < 0 ? result2.dropRight(-end2) : result2.take(end2 - start);
  8106. }
  8107. return result2;
  8108. };
  8109. LazyWrapper_default.prototype.takeRightWhile = function(predicate) {
  8110. return this.reverse().takeWhile(predicate).reverse();
  8111. };
  8112. LazyWrapper_default.prototype.toArray = function() {
  8113. return this.take(MAX_ARRAY_LENGTH7);
  8114. };
  8115. baseForOwn_default(LazyWrapper_default.prototype, function(func, methodName) {
  8116. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = wrapperLodash_default[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
  8117. if (!lodashFunc) {
  8118. return;
  8119. }
  8120. wrapperLodash_default.prototype[methodName] = function() {
  8121. var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper_default, iteratee2 = args[0], useLazy = isLazy || isArray_default(value);
  8122. var interceptor = function(value2) {
  8123. var result3 = lodashFunc.apply(wrapperLodash_default, arrayPush_default([value2], args));
  8124. return isTaker && chainAll ? result3[0] : result3;
  8125. };
  8126. if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
  8127. isLazy = useLazy = false;
  8128. }
  8129. var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
  8130. if (!retUnwrapped && useLazy) {
  8131. value = onlyLazy ? value : new LazyWrapper_default(this);
  8132. var result2 = func.apply(value, args);
  8133. result2.__actions__.push({ "func": thru_default, "args": [interceptor], "thisArg": void 0 });
  8134. return new LodashWrapper_default(result2, chainAll);
  8135. }
  8136. if (isUnwrapped && onlyLazy) {
  8137. return func.apply(this, args);
  8138. }
  8139. result2 = this.thru(interceptor);
  8140. return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
  8141. };
  8142. });
  8143. arrayEach_default(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
  8144. var func = arrayProto6[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  8145. wrapperLodash_default.prototype[methodName] = function() {
  8146. var args = arguments;
  8147. if (retUnwrapped && !this.__chain__) {
  8148. var value = this.value();
  8149. return func.apply(isArray_default(value) ? value : [], args);
  8150. }
  8151. return this[chainName](function(value2) {
  8152. return func.apply(isArray_default(value2) ? value2 : [], args);
  8153. });
  8154. };
  8155. });
  8156. baseForOwn_default(LazyWrapper_default.prototype, function(func, methodName) {
  8157. var lodashFunc = wrapperLodash_default[methodName];
  8158. if (lodashFunc) {
  8159. var key = lodashFunc.name + "";
  8160. if (!hasOwnProperty25.call(realNames_default, key)) {
  8161. realNames_default[key] = [];
  8162. }
  8163. realNames_default[key].push({ "name": methodName, "func": lodashFunc });
  8164. }
  8165. });
  8166. realNames_default[createHybrid_default(void 0, WRAP_BIND_KEY_FLAG7).name] = [{
  8167. "name": "wrapper",
  8168. "func": void 0
  8169. }];
  8170. LazyWrapper_default.prototype.clone = lazyClone_default;
  8171. LazyWrapper_default.prototype.reverse = lazyReverse_default;
  8172. LazyWrapper_default.prototype.value = lazyValue_default;
  8173. wrapperLodash_default.prototype.at = seq_default_default.at;
  8174. wrapperLodash_default.prototype.chain = seq_default_default.wrapperChain;
  8175. wrapperLodash_default.prototype.commit = seq_default_default.commit;
  8176. wrapperLodash_default.prototype.next = seq_default_default.next;
  8177. wrapperLodash_default.prototype.plant = seq_default_default.plant;
  8178. wrapperLodash_default.prototype.reverse = seq_default_default.reverse;
  8179. wrapperLodash_default.prototype.toJSON = wrapperLodash_default.prototype.valueOf = wrapperLodash_default.prototype.value = seq_default_default.value;
  8180. wrapperLodash_default.prototype.first = wrapperLodash_default.prototype.head;
  8181. if (symIterator2) {
  8182. wrapperLodash_default.prototype[symIterator2] = seq_default_default.toIterator;
  8183. }
  8184. // node_modules/element-plus/es/utils/dom/aria.mjs
  8185. 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])`;
  8186. var isVisible = (element) => {
  8187. if (false)
  8188. return true;
  8189. const computed3 = getComputedStyle(element);
  8190. return computed3.position === "fixed" ? false : element.offsetParent !== null;
  8191. };
  8192. var obtainAllFocusableElements = (element) => {
  8193. return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
  8194. };
  8195. var isFocusable = (element) => {
  8196. if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) {
  8197. return true;
  8198. }
  8199. if (element.disabled) {
  8200. return false;
  8201. }
  8202. switch (element.nodeName) {
  8203. case "A": {
  8204. return !!element.href && element.rel !== "ignore";
  8205. }
  8206. case "INPUT": {
  8207. return !(element.type === "hidden" || element.type === "file");
  8208. }
  8209. case "BUTTON":
  8210. case "SELECT":
  8211. case "TEXTAREA": {
  8212. return true;
  8213. }
  8214. default: {
  8215. return false;
  8216. }
  8217. }
  8218. };
  8219. var triggerEvent = function(elm, name, ...opts) {
  8220. let eventName;
  8221. if (name.includes("mouse") || name.includes("click")) {
  8222. eventName = "MouseEvents";
  8223. } else if (name.includes("key")) {
  8224. eventName = "KeyboardEvent";
  8225. } else {
  8226. eventName = "HTMLEvents";
  8227. }
  8228. const evt = document.createEvent(eventName);
  8229. evt.initEvent(name, ...opts);
  8230. elm.dispatchEvent(evt);
  8231. return elm;
  8232. };
  8233. var isLeaf = (el) => !el.getAttribute("aria-owns");
  8234. var getSibling = (el, distance, elClass) => {
  8235. const { parentNode } = el;
  8236. if (!parentNode)
  8237. return null;
  8238. const siblings = parentNode.querySelectorAll(elClass);
  8239. const index = Array.prototype.indexOf.call(siblings, el);
  8240. return siblings[index + distance] || null;
  8241. };
  8242. var focusNode = (el) => {
  8243. if (!el)
  8244. return;
  8245. el.focus();
  8246. !isLeaf(el) && el.click();
  8247. };
  8248. // node_modules/element-plus/es/utils/dom/event.mjs
  8249. var composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => {
  8250. const handleEvent = (event) => {
  8251. const shouldPrevent = theirsHandler == null ? void 0 : theirsHandler(event);
  8252. if (checkForDefaultPrevented === false || !shouldPrevent) {
  8253. return oursHandler == null ? void 0 : oursHandler(event);
  8254. }
  8255. };
  8256. return handleEvent;
  8257. };
  8258. var whenMouse = (handler) => {
  8259. return (e) => e.pointerType === "mouse" ? handler(e) : void 0;
  8260. };
  8261. // node_modules/@vueuse/shared/index.mjs
  8262. var __defProp$9 = Object.defineProperty;
  8263. var __defProps$6 = Object.defineProperties;
  8264. var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
  8265. var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
  8266. var __hasOwnProp$b = Object.prototype.hasOwnProperty;
  8267. var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
  8268. var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  8269. var __spreadValues$9 = (a2, b2) => {
  8270. for (var prop in b2 || (b2 = {}))
  8271. if (__hasOwnProp$b.call(b2, prop))
  8272. __defNormalProp$9(a2, prop, b2[prop]);
  8273. if (__getOwnPropSymbols$b)
  8274. for (var prop of __getOwnPropSymbols$b(b2)) {
  8275. if (__propIsEnum$b.call(b2, prop))
  8276. __defNormalProp$9(a2, prop, b2[prop]);
  8277. }
  8278. return a2;
  8279. };
  8280. var __spreadProps$6 = (a2, b2) => __defProps$6(a2, __getOwnPropDescs$6(b2));
  8281. function computedEager(fn2, options) {
  8282. var _a2;
  8283. const result2 = shallowRef();
  8284. watchEffect(() => {
  8285. result2.value = fn2();
  8286. }, __spreadProps$6(__spreadValues$9({}, options), {
  8287. flush: (_a2 = options == null ? void 0 : options.flush) != null ? _a2 : "sync"
  8288. }));
  8289. return readonly(result2);
  8290. }
  8291. var _a;
  8292. var isClient = typeof window !== "undefined";
  8293. var isDef = (val) => typeof val !== "undefined";
  8294. var isBoolean2 = (val) => typeof val === "boolean";
  8295. var isFunction3 = (val) => typeof val === "function";
  8296. var isNumber2 = (val) => typeof val === "number";
  8297. var isString3 = (val) => typeof val === "string";
  8298. var noop2 = () => {
  8299. };
  8300. var isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
  8301. function resolveUnref(r) {
  8302. return typeof r === "function" ? r() : unref(r);
  8303. }
  8304. function createFilterWrapper(filter2, fn2) {
  8305. function wrapper(...args) {
  8306. filter2(() => fn2.apply(this, args), { fn: fn2, thisArg: this, args });
  8307. }
  8308. return wrapper;
  8309. }
  8310. function debounceFilter(ms, options = {}) {
  8311. let timer;
  8312. let maxTimer;
  8313. const filter2 = (invoke2) => {
  8314. const duration = resolveUnref(ms);
  8315. const maxDuration = resolveUnref(options.maxWait);
  8316. if (timer)
  8317. clearTimeout(timer);
  8318. if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
  8319. if (maxTimer) {
  8320. clearTimeout(maxTimer);
  8321. maxTimer = null;
  8322. }
  8323. return invoke2();
  8324. }
  8325. if (maxDuration && !maxTimer) {
  8326. maxTimer = setTimeout(() => {
  8327. if (timer)
  8328. clearTimeout(timer);
  8329. maxTimer = null;
  8330. invoke2();
  8331. }, maxDuration);
  8332. }
  8333. timer = setTimeout(() => {
  8334. if (maxTimer)
  8335. clearTimeout(maxTimer);
  8336. maxTimer = null;
  8337. invoke2();
  8338. }, duration);
  8339. };
  8340. return filter2;
  8341. }
  8342. function throttleFilter(ms, trailing = true, leading = true) {
  8343. let lastExec = 0;
  8344. let timer;
  8345. let isLeading = true;
  8346. const clear = () => {
  8347. if (timer) {
  8348. clearTimeout(timer);
  8349. timer = void 0;
  8350. }
  8351. };
  8352. const filter2 = (invoke2) => {
  8353. const duration = resolveUnref(ms);
  8354. const elapsed = Date.now() - lastExec;
  8355. clear();
  8356. if (duration <= 0) {
  8357. lastExec = Date.now();
  8358. return invoke2();
  8359. }
  8360. if (elapsed > duration && (leading || !isLeading)) {
  8361. lastExec = Date.now();
  8362. invoke2();
  8363. } else if (trailing) {
  8364. timer = setTimeout(() => {
  8365. lastExec = Date.now();
  8366. isLeading = true;
  8367. clear();
  8368. invoke2();
  8369. }, duration - elapsed);
  8370. }
  8371. if (!leading && !timer)
  8372. timer = setTimeout(() => isLeading = true, duration);
  8373. isLeading = false;
  8374. };
  8375. return filter2;
  8376. }
  8377. function identity2(arg) {
  8378. return arg;
  8379. }
  8380. function tryOnScopeDispose(fn2) {
  8381. if (getCurrentScope()) {
  8382. onScopeDispose(fn2);
  8383. return true;
  8384. }
  8385. return false;
  8386. }
  8387. function useDebounceFn(fn2, ms = 200, options = {}) {
  8388. return createFilterWrapper(debounceFilter(ms, options), fn2);
  8389. }
  8390. function refDebounced(value, ms = 200, options = {}) {
  8391. const debounced = ref(value.value);
  8392. const updater = useDebounceFn(() => {
  8393. debounced.value = value.value;
  8394. }, ms, options);
  8395. watch(value, () => updater());
  8396. return debounced;
  8397. }
  8398. function useThrottleFn(fn2, ms = 200, trailing = false, leading = true) {
  8399. return createFilterWrapper(throttleFilter(ms, trailing, leading), fn2);
  8400. }
  8401. function tryOnMounted(fn2, sync = true) {
  8402. if (getCurrentInstance())
  8403. onMounted(fn2);
  8404. else if (sync)
  8405. fn2();
  8406. else
  8407. nextTick(fn2);
  8408. }
  8409. function useTimeoutFn(cb, interval, options = {}) {
  8410. const {
  8411. immediate = true
  8412. } = options;
  8413. const isPending = ref(false);
  8414. let timer = null;
  8415. function clear() {
  8416. if (timer) {
  8417. clearTimeout(timer);
  8418. timer = null;
  8419. }
  8420. }
  8421. function stop() {
  8422. isPending.value = false;
  8423. clear();
  8424. }
  8425. function start(...args) {
  8426. clear();
  8427. isPending.value = true;
  8428. timer = setTimeout(() => {
  8429. isPending.value = false;
  8430. timer = null;
  8431. cb(...args);
  8432. }, resolveUnref(interval));
  8433. }
  8434. if (immediate) {
  8435. isPending.value = true;
  8436. if (isClient)
  8437. start();
  8438. }
  8439. tryOnScopeDispose(stop);
  8440. return {
  8441. isPending,
  8442. start,
  8443. stop
  8444. };
  8445. }
  8446. // node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs
  8447. var isVue22 = false;
  8448. // node_modules/@vueuse/core/index.mjs
  8449. function unrefElement(elRef) {
  8450. var _a2;
  8451. const plain = resolveUnref(elRef);
  8452. return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
  8453. }
  8454. var defaultWindow = isClient ? window : void 0;
  8455. var defaultDocument = isClient ? window.document : void 0;
  8456. var defaultNavigator = isClient ? window.navigator : void 0;
  8457. var defaultLocation = isClient ? window.location : void 0;
  8458. function useEventListener(...args) {
  8459. let target2;
  8460. let events;
  8461. let listeners;
  8462. let options;
  8463. if (isString3(args[0]) || Array.isArray(args[0])) {
  8464. [events, listeners, options] = args;
  8465. target2 = defaultWindow;
  8466. } else {
  8467. [target2, events, listeners, options] = args;
  8468. }
  8469. if (!target2)
  8470. return noop2;
  8471. if (!Array.isArray(events))
  8472. events = [events];
  8473. if (!Array.isArray(listeners))
  8474. listeners = [listeners];
  8475. const cleanups = [];
  8476. const cleanup = () => {
  8477. cleanups.forEach((fn2) => fn2());
  8478. cleanups.length = 0;
  8479. };
  8480. const register2 = (el, event, listener) => {
  8481. el.addEventListener(event, listener, options);
  8482. return () => el.removeEventListener(event, listener, options);
  8483. };
  8484. const stopWatch = watch(() => unrefElement(target2), (el) => {
  8485. cleanup();
  8486. if (!el)
  8487. return;
  8488. cleanups.push(...events.flatMap((event) => {
  8489. return listeners.map((listener) => register2(el, event, listener));
  8490. }));
  8491. }, { immediate: true, flush: "post" });
  8492. const stop = () => {
  8493. stopWatch();
  8494. cleanup();
  8495. };
  8496. tryOnScopeDispose(stop);
  8497. return stop;
  8498. }
  8499. function onClickOutside(target2, handler, options = {}) {
  8500. const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
  8501. if (!window2)
  8502. return;
  8503. let shouldListen = true;
  8504. let fallback;
  8505. const shouldIgnore = (event) => {
  8506. return ignore.some((target22) => {
  8507. if (typeof target22 === "string") {
  8508. return Array.from(window2.document.querySelectorAll(target22)).some((el) => el === event.target || event.composedPath().includes(el));
  8509. } else {
  8510. const el = unrefElement(target22);
  8511. return el && (event.target === el || event.composedPath().includes(el));
  8512. }
  8513. });
  8514. };
  8515. const listener = (event) => {
  8516. window2.clearTimeout(fallback);
  8517. const el = unrefElement(target2);
  8518. if (!el || el === event.target || event.composedPath().includes(el))
  8519. return;
  8520. if (event.detail === 0)
  8521. shouldListen = !shouldIgnore(event);
  8522. if (!shouldListen) {
  8523. shouldListen = true;
  8524. return;
  8525. }
  8526. handler(event);
  8527. };
  8528. const cleanup = [
  8529. useEventListener(window2, "click", listener, { passive: true, capture }),
  8530. useEventListener(window2, "pointerdown", (e) => {
  8531. const el = unrefElement(target2);
  8532. if (el)
  8533. shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
  8534. }, { passive: true }),
  8535. useEventListener(window2, "pointerup", (e) => {
  8536. if (e.button === 0) {
  8537. const path = e.composedPath();
  8538. e.composedPath = () => path;
  8539. fallback = window2.setTimeout(() => listener(e), 50);
  8540. }
  8541. }, { passive: true }),
  8542. detectIframe && useEventListener(window2, "blur", (event) => {
  8543. var _a2;
  8544. const el = unrefElement(target2);
  8545. if (((_a2 = window2.document.activeElement) == null ? void 0 : _a2.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement)))
  8546. handler(event);
  8547. })
  8548. ].filter(Boolean);
  8549. const stop = () => cleanup.forEach((fn2) => fn2());
  8550. return stop;
  8551. }
  8552. function useSupported(callback, sync = false) {
  8553. const isSupported = ref();
  8554. const update2 = () => isSupported.value = Boolean(callback());
  8555. update2();
  8556. tryOnMounted(update2, sync);
  8557. return isSupported;
  8558. }
  8559. function cloneFnJSON(source) {
  8560. return JSON.parse(JSON.stringify(source));
  8561. }
  8562. var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  8563. var globalKey = "__vueuse_ssr_handlers__";
  8564. _global[globalKey] = _global[globalKey] || {};
  8565. var handlers = _global[globalKey];
  8566. function useCssVar(prop, target2, { window: window2 = defaultWindow, initialValue = "" } = {}) {
  8567. const variable = ref(initialValue);
  8568. const elRef = computed2(() => {
  8569. var _a2;
  8570. return unrefElement(target2) || ((_a2 = window2 == null ? void 0 : window2.document) == null ? void 0 : _a2.documentElement);
  8571. });
  8572. watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {
  8573. var _a2;
  8574. if (el && window2) {
  8575. const value = (_a2 = window2.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a2.trim();
  8576. variable.value = value || initialValue;
  8577. }
  8578. }, { immediate: true });
  8579. watch(variable, (val) => {
  8580. var _a2;
  8581. if ((_a2 = elRef.value) == null ? void 0 : _a2.style)
  8582. elRef.value.style.setProperty(resolveUnref(prop), val);
  8583. });
  8584. return variable;
  8585. }
  8586. function useDocumentVisibility({ document: document2 = defaultDocument } = {}) {
  8587. if (!document2)
  8588. return ref("visible");
  8589. const visibility = ref(document2.visibilityState);
  8590. useEventListener(document2, "visibilitychange", () => {
  8591. visibility.value = document2.visibilityState;
  8592. });
  8593. return visibility;
  8594. }
  8595. var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
  8596. var __hasOwnProp$f = Object.prototype.hasOwnProperty;
  8597. var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
  8598. var __objRest$2 = (source, exclude) => {
  8599. var target2 = {};
  8600. for (var prop in source)
  8601. if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
  8602. target2[prop] = source[prop];
  8603. if (source != null && __getOwnPropSymbols$f)
  8604. for (var prop of __getOwnPropSymbols$f(source)) {
  8605. if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
  8606. target2[prop] = source[prop];
  8607. }
  8608. return target2;
  8609. };
  8610. function useResizeObserver(target2, callback, options = {}) {
  8611. const _a2 = options, { window: window2 = defaultWindow } = _a2, observerOptions = __objRest$2(_a2, ["window"]);
  8612. let observer;
  8613. const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
  8614. const cleanup = () => {
  8615. if (observer) {
  8616. observer.disconnect();
  8617. observer = void 0;
  8618. }
  8619. };
  8620. const stopWatch = watch(() => unrefElement(target2), (el) => {
  8621. cleanup();
  8622. if (isSupported.value && window2 && el) {
  8623. observer = new ResizeObserver(callback);
  8624. observer.observe(el, observerOptions);
  8625. }
  8626. }, { immediate: true, flush: "post" });
  8627. const stop = () => {
  8628. cleanup();
  8629. stopWatch();
  8630. };
  8631. tryOnScopeDispose(stop);
  8632. return {
  8633. isSupported,
  8634. stop
  8635. };
  8636. }
  8637. function useElementBounding(target2, options = {}) {
  8638. const {
  8639. reset = true,
  8640. windowResize = true,
  8641. windowScroll = true,
  8642. immediate = true
  8643. } = options;
  8644. const height = ref(0);
  8645. const bottom = ref(0);
  8646. const left2 = ref(0);
  8647. const right2 = ref(0);
  8648. const top = ref(0);
  8649. const width = ref(0);
  8650. const x2 = ref(0);
  8651. const y = ref(0);
  8652. function update2() {
  8653. const el = unrefElement(target2);
  8654. if (!el) {
  8655. if (reset) {
  8656. height.value = 0;
  8657. bottom.value = 0;
  8658. left2.value = 0;
  8659. right2.value = 0;
  8660. top.value = 0;
  8661. width.value = 0;
  8662. x2.value = 0;
  8663. y.value = 0;
  8664. }
  8665. return;
  8666. }
  8667. const rect = el.getBoundingClientRect();
  8668. height.value = rect.height;
  8669. bottom.value = rect.bottom;
  8670. left2.value = rect.left;
  8671. right2.value = rect.right;
  8672. top.value = rect.top;
  8673. width.value = rect.width;
  8674. x2.value = rect.x;
  8675. y.value = rect.y;
  8676. }
  8677. useResizeObserver(target2, update2);
  8678. watch(() => unrefElement(target2), (ele) => !ele && update2());
  8679. if (windowScroll)
  8680. useEventListener("scroll", update2, { passive: true });
  8681. if (windowResize)
  8682. useEventListener("resize", update2, { passive: true });
  8683. tryOnMounted(() => {
  8684. if (immediate)
  8685. update2();
  8686. });
  8687. return {
  8688. height,
  8689. bottom,
  8690. left: left2,
  8691. right: right2,
  8692. top,
  8693. width,
  8694. x: x2,
  8695. y,
  8696. update: update2
  8697. };
  8698. }
  8699. var defaultState = {
  8700. x: 0,
  8701. y: 0,
  8702. pointerId: 0,
  8703. pressure: 0,
  8704. tiltX: 0,
  8705. tiltY: 0,
  8706. width: 0,
  8707. height: 0,
  8708. twist: 0,
  8709. pointerType: null
  8710. };
  8711. var keys2 = Object.keys(defaultState);
  8712. var SwipeDirection;
  8713. (function(SwipeDirection2) {
  8714. SwipeDirection2["UP"] = "UP";
  8715. SwipeDirection2["RIGHT"] = "RIGHT";
  8716. SwipeDirection2["DOWN"] = "DOWN";
  8717. SwipeDirection2["LEFT"] = "LEFT";
  8718. SwipeDirection2["NONE"] = "NONE";
  8719. })(SwipeDirection || (SwipeDirection = {}));
  8720. var __defProp = Object.defineProperty;
  8721. var __getOwnPropSymbols = Object.getOwnPropertySymbols;
  8722. var __hasOwnProp = Object.prototype.hasOwnProperty;
  8723. var __propIsEnum = Object.prototype.propertyIsEnumerable;
  8724. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  8725. var __spreadValues = (a2, b2) => {
  8726. for (var prop in b2 || (b2 = {}))
  8727. if (__hasOwnProp.call(b2, prop))
  8728. __defNormalProp(a2, prop, b2[prop]);
  8729. if (__getOwnPropSymbols)
  8730. for (var prop of __getOwnPropSymbols(b2)) {
  8731. if (__propIsEnum.call(b2, prop))
  8732. __defNormalProp(a2, prop, b2[prop]);
  8733. }
  8734. return a2;
  8735. };
  8736. var _TransitionPresets = {
  8737. easeInSine: [0.12, 0, 0.39, 0],
  8738. easeOutSine: [0.61, 1, 0.88, 1],
  8739. easeInOutSine: [0.37, 0, 0.63, 1],
  8740. easeInQuad: [0.11, 0, 0.5, 0],
  8741. easeOutQuad: [0.5, 1, 0.89, 1],
  8742. easeInOutQuad: [0.45, 0, 0.55, 1],
  8743. easeInCubic: [0.32, 0, 0.67, 0],
  8744. easeOutCubic: [0.33, 1, 0.68, 1],
  8745. easeInOutCubic: [0.65, 0, 0.35, 1],
  8746. easeInQuart: [0.5, 0, 0.75, 0],
  8747. easeOutQuart: [0.25, 1, 0.5, 1],
  8748. easeInOutQuart: [0.76, 0, 0.24, 1],
  8749. easeInQuint: [0.64, 0, 0.78, 0],
  8750. easeOutQuint: [0.22, 1, 0.36, 1],
  8751. easeInOutQuint: [0.83, 0, 0.17, 1],
  8752. easeInExpo: [0.7, 0, 0.84, 0],
  8753. easeOutExpo: [0.16, 1, 0.3, 1],
  8754. easeInOutExpo: [0.87, 0, 0.13, 1],
  8755. easeInCirc: [0.55, 0, 1, 0.45],
  8756. easeOutCirc: [0, 0.55, 0.45, 1],
  8757. easeInOutCirc: [0.85, 0, 0.15, 1],
  8758. easeInBack: [0.36, 0, 0.66, -0.56],
  8759. easeOutBack: [0.34, 1.56, 0.64, 1],
  8760. easeInOutBack: [0.68, -0.6, 0.32, 1.6]
  8761. };
  8762. var TransitionPresets = __spreadValues({
  8763. linear: identity2
  8764. }, _TransitionPresets);
  8765. function useVModel(props, key, emit, options = {}) {
  8766. var _a2, _b, _c, _d, _e;
  8767. const {
  8768. clone: clone2 = false,
  8769. passive = false,
  8770. eventName,
  8771. deep = false,
  8772. defaultValue
  8773. } = options;
  8774. const vm = getCurrentInstance();
  8775. const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a2 = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a2.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
  8776. let event = eventName;
  8777. if (!key) {
  8778. if (isVue22) {
  8779. const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;
  8780. key = (modelOptions == null ? void 0 : modelOptions.value) || "value";
  8781. if (!eventName)
  8782. event = (modelOptions == null ? void 0 : modelOptions.event) || "input";
  8783. } else {
  8784. key = "modelValue";
  8785. }
  8786. }
  8787. event = eventName || event || `update:${key.toString()}`;
  8788. const cloneFn = (val) => !clone2 ? val : isFunction3(clone2) ? clone2(val) : cloneFnJSON(val);
  8789. const getValue3 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
  8790. if (passive) {
  8791. const initialValue = getValue3();
  8792. const proxy = ref(initialValue);
  8793. watch(() => props[key], (v2) => proxy.value = cloneFn(v2));
  8794. watch(proxy, (v2) => {
  8795. if (v2 !== props[key] || deep)
  8796. _emit(event, v2);
  8797. }, { deep });
  8798. return proxy;
  8799. } else {
  8800. return computed2({
  8801. get() {
  8802. return getValue3();
  8803. },
  8804. set(value) {
  8805. _emit(event, value);
  8806. }
  8807. });
  8808. }
  8809. }
  8810. function useWindowFocus({ window: window2 = defaultWindow } = {}) {
  8811. if (!window2)
  8812. return ref(false);
  8813. const focused = ref(window2.document.hasFocus());
  8814. useEventListener(window2, "blur", () => {
  8815. focused.value = false;
  8816. });
  8817. useEventListener(window2, "focus", () => {
  8818. focused.value = true;
  8819. });
  8820. return focused;
  8821. }
  8822. function useWindowSize(options = {}) {
  8823. const {
  8824. window: window2 = defaultWindow,
  8825. initialWidth = Infinity,
  8826. initialHeight = Infinity,
  8827. listenOrientation = true,
  8828. includeScrollbar = true
  8829. } = options;
  8830. const width = ref(initialWidth);
  8831. const height = ref(initialHeight);
  8832. const update2 = () => {
  8833. if (window2) {
  8834. if (includeScrollbar) {
  8835. width.value = window2.innerWidth;
  8836. height.value = window2.innerHeight;
  8837. } else {
  8838. width.value = window2.document.documentElement.clientWidth;
  8839. height.value = window2.document.documentElement.clientHeight;
  8840. }
  8841. }
  8842. };
  8843. update2();
  8844. tryOnMounted(update2);
  8845. useEventListener("resize", update2, { passive: true });
  8846. if (listenOrientation)
  8847. useEventListener("orientationchange", update2, { passive: true });
  8848. return { width, height };
  8849. }
  8850. // node_modules/element-plus/es/utils/dom/position.mjs
  8851. var isInContainer = (el, container) => {
  8852. if (!isClient || !el || !container)
  8853. return false;
  8854. const elRect = el.getBoundingClientRect();
  8855. let containerRect;
  8856. if (container instanceof Element) {
  8857. containerRect = container.getBoundingClientRect();
  8858. } else {
  8859. containerRect = {
  8860. top: 0,
  8861. right: window.innerWidth,
  8862. bottom: window.innerHeight,
  8863. left: 0
  8864. };
  8865. }
  8866. return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
  8867. };
  8868. var getOffsetTop = (el) => {
  8869. let offset2 = 0;
  8870. let parent2 = el;
  8871. while (parent2) {
  8872. offset2 += parent2.offsetTop;
  8873. parent2 = parent2.offsetParent;
  8874. }
  8875. return offset2;
  8876. };
  8877. var getOffsetTopDistance = (el, containerEl) => {
  8878. return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));
  8879. };
  8880. var getClientXY = (event) => {
  8881. let clientX;
  8882. let clientY;
  8883. if (event.type === "touchend") {
  8884. clientY = event.changedTouches[0].clientY;
  8885. clientX = event.changedTouches[0].clientX;
  8886. } else if (event.type.startsWith("touch")) {
  8887. clientY = event.touches[0].clientY;
  8888. clientX = event.touches[0].clientX;
  8889. } else {
  8890. clientY = event.clientY;
  8891. clientX = event.clientX;
  8892. }
  8893. return {
  8894. clientX,
  8895. clientY
  8896. };
  8897. };
  8898. // node_modules/element-plus/es/utils/types.mjs
  8899. var isUndefined2 = (val) => val === void 0;
  8900. var isEmpty2 = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length;
  8901. var isElement2 = (e) => {
  8902. if (typeof Element === "undefined")
  8903. return false;
  8904. return e instanceof Element;
  8905. };
  8906. var isPropAbsent = (prop) => {
  8907. return isNil_default(prop);
  8908. };
  8909. var isStringNumber = (val) => {
  8910. if (!isString(val)) {
  8911. return false;
  8912. }
  8913. return !Number.isNaN(Number(val));
  8914. };
  8915. // node_modules/element-plus/es/utils/strings.mjs
  8916. var escapeStringRegexp = (string3 = "") => string3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
  8917. var capitalize3 = (str) => capitalize(str);
  8918. // node_modules/element-plus/es/utils/objects.mjs
  8919. var keysOf = (arr) => Object.keys(arr);
  8920. var entriesOf = (arr) => Object.entries(arr);
  8921. var getProp = (obj, path, defaultValue) => {
  8922. return {
  8923. get value() {
  8924. return get_default(obj, path, defaultValue);
  8925. },
  8926. set value(val) {
  8927. set_default(obj, path, val);
  8928. }
  8929. };
  8930. };
  8931. // node_modules/element-plus/es/utils/error.mjs
  8932. var ElementPlusError = class extends Error {
  8933. constructor(m2) {
  8934. super(m2);
  8935. this.name = "ElementPlusError";
  8936. }
  8937. };
  8938. function throwError(scope, m2) {
  8939. throw new ElementPlusError(`[${scope}] ${m2}`);
  8940. }
  8941. function debugWarn(scope, message2) {
  8942. if (true) {
  8943. const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message2}`) : scope;
  8944. console.warn(error);
  8945. }
  8946. }
  8947. // node_modules/element-plus/es/utils/dom/style.mjs
  8948. var SCOPE = "utils/dom/style";
  8949. var classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
  8950. var hasClass = (el, cls) => {
  8951. if (!el || !cls)
  8952. return false;
  8953. if (cls.includes(" "))
  8954. throw new Error("className should not contain space.");
  8955. return el.classList.contains(cls);
  8956. };
  8957. var addClass = (el, cls) => {
  8958. if (!el || !cls.trim())
  8959. return;
  8960. el.classList.add(...classNameToArray(cls));
  8961. };
  8962. var removeClass = (el, cls) => {
  8963. if (!el || !cls.trim())
  8964. return;
  8965. el.classList.remove(...classNameToArray(cls));
  8966. };
  8967. var getStyle = (element, styleName) => {
  8968. var _a2;
  8969. if (!isClient || !element || !styleName)
  8970. return "";
  8971. let key = camelize(styleName);
  8972. if (key === "float")
  8973. key = "cssFloat";
  8974. try {
  8975. const style = element.style[key];
  8976. if (style)
  8977. return style;
  8978. const computed3 = (_a2 = document.defaultView) == null ? void 0 : _a2.getComputedStyle(element, "");
  8979. return computed3 ? computed3[key] : "";
  8980. } catch (e) {
  8981. return element.style[key];
  8982. }
  8983. };
  8984. function addUnit(value, defaultUnit = "px") {
  8985. if (!value)
  8986. return "";
  8987. if (isNumber2(value) || isStringNumber(value)) {
  8988. return `${value}${defaultUnit}`;
  8989. } else if (isString(value)) {
  8990. return value;
  8991. }
  8992. debugWarn(SCOPE, "binding value must be a string or number");
  8993. }
  8994. // node_modules/element-plus/es/utils/dom/scroll.mjs
  8995. var isScroll = (el, isVertical) => {
  8996. if (!isClient)
  8997. return false;
  8998. const key = {
  8999. undefined: "overflow",
  9000. true: "overflow-y",
  9001. false: "overflow-x"
  9002. }[String(isVertical)];
  9003. const overflow = getStyle(el, key);
  9004. return ["scroll", "auto", "overlay"].some((s2) => overflow.includes(s2));
  9005. };
  9006. var getScrollContainer = (el, isVertical) => {
  9007. if (!isClient)
  9008. return;
  9009. let parent2 = el;
  9010. while (parent2) {
  9011. if ([window, document, document.documentElement].includes(parent2))
  9012. return window;
  9013. if (isScroll(parent2, isVertical))
  9014. return parent2;
  9015. parent2 = parent2.parentNode;
  9016. }
  9017. return parent2;
  9018. };
  9019. var scrollBarWidth;
  9020. var getScrollBarWidth = (namespace) => {
  9021. var _a2;
  9022. if (!isClient)
  9023. return 0;
  9024. if (scrollBarWidth !== void 0)
  9025. return scrollBarWidth;
  9026. const outer = document.createElement("div");
  9027. outer.className = `${namespace}-scrollbar__wrap`;
  9028. outer.style.visibility = "hidden";
  9029. outer.style.width = "100px";
  9030. outer.style.position = "absolute";
  9031. outer.style.top = "-9999px";
  9032. document.body.appendChild(outer);
  9033. const widthNoScroll = outer.offsetWidth;
  9034. outer.style.overflow = "scroll";
  9035. const inner = document.createElement("div");
  9036. inner.style.width = "100%";
  9037. outer.appendChild(inner);
  9038. const widthWithScroll = inner.offsetWidth;
  9039. (_a2 = outer.parentNode) == null ? void 0 : _a2.removeChild(outer);
  9040. scrollBarWidth = widthNoScroll - widthWithScroll;
  9041. return scrollBarWidth;
  9042. };
  9043. function scrollIntoView(container, selected) {
  9044. if (!isClient)
  9045. return;
  9046. if (!selected) {
  9047. container.scrollTop = 0;
  9048. return;
  9049. }
  9050. const offsetParents = [];
  9051. let pointer = selected.offsetParent;
  9052. while (pointer !== null && container !== pointer && container.contains(pointer)) {
  9053. offsetParents.push(pointer);
  9054. pointer = pointer.offsetParent;
  9055. }
  9056. const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
  9057. const bottom = top + selected.offsetHeight;
  9058. const viewRectTop = container.scrollTop;
  9059. const viewRectBottom = viewRectTop + container.clientHeight;
  9060. if (top < viewRectTop) {
  9061. container.scrollTop = top;
  9062. } else if (bottom > viewRectBottom) {
  9063. container.scrollTop = bottom - container.clientHeight;
  9064. }
  9065. }
  9066. // node_modules/element-plus/es/utils/vue/global-node.mjs
  9067. var globalNodes = [];
  9068. var target = !isClient ? void 0 : document.body;
  9069. function createGlobalNode(id2) {
  9070. const el = document.createElement("div");
  9071. if (id2 !== void 0) {
  9072. el.setAttribute("id", id2);
  9073. }
  9074. target.appendChild(el);
  9075. globalNodes.push(el);
  9076. return el;
  9077. }
  9078. function removeGlobalNode(el) {
  9079. globalNodes.splice(globalNodes.indexOf(el), 1);
  9080. el.remove();
  9081. }
  9082. // node_modules/element-plus/es/utils/vue/props/runtime.mjs
  9083. var epPropKey = "__epPropKey";
  9084. var definePropType = (val) => val;
  9085. var isEpProp = (val) => isObject(val) && !!val[epPropKey];
  9086. var buildProp = (prop, key) => {
  9087. if (!isObject(prop) || isEpProp(prop))
  9088. return prop;
  9089. const { values: values2, required: required4, default: defaultValue, type: type4, validator } = prop;
  9090. const _validator = values2 || validator ? (val) => {
  9091. let valid = false;
  9092. let allowedValues = [];
  9093. if (values2) {
  9094. allowedValues = Array.from(values2);
  9095. if (hasOwn(prop, "default")) {
  9096. allowedValues.push(defaultValue);
  9097. }
  9098. valid || (valid = allowedValues.includes(val));
  9099. }
  9100. if (validator)
  9101. valid || (valid = validator(val));
  9102. if (!valid && allowedValues.length > 0) {
  9103. const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
  9104. warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
  9105. }
  9106. return valid;
  9107. } : void 0;
  9108. const epProp = {
  9109. type: type4,
  9110. required: !!required4,
  9111. validator: _validator,
  9112. [epPropKey]: true
  9113. };
  9114. if (hasOwn(prop, "default"))
  9115. epProp.default = defaultValue;
  9116. return epProp;
  9117. };
  9118. var buildProps = (props) => fromPairs_default(Object.entries(props).map(([key, option]) => [
  9119. key,
  9120. buildProp(option, key)
  9121. ]));
  9122. // node_modules/element-plus/es/utils/vue/icon.mjs
  9123. var iconPropType = definePropType([
  9124. String,
  9125. Object,
  9126. Function
  9127. ]);
  9128. var CloseComponents = {
  9129. Close: close_default
  9130. };
  9131. var TypeComponents = {
  9132. Close: close_default,
  9133. SuccessFilled: success_filled_default,
  9134. InfoFilled: info_filled_default,
  9135. WarningFilled: warning_filled_default,
  9136. CircleCloseFilled: circle_close_filled_default
  9137. };
  9138. var TypeComponentsMap = {
  9139. success: success_filled_default,
  9140. warning: warning_filled_default,
  9141. error: circle_close_filled_default,
  9142. info: info_filled_default
  9143. };
  9144. var ValidateComponentsMap = {
  9145. validating: loading_default,
  9146. success: circle_check_default,
  9147. error: circle_close_default
  9148. };
  9149. // node_modules/element-plus/es/utils/vue/install.mjs
  9150. var withInstall = (main, extra) => {
  9151. ;
  9152. main.install = (app) => {
  9153. for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
  9154. app.component(comp.name, comp);
  9155. }
  9156. };
  9157. if (extra) {
  9158. for (const [key, comp] of Object.entries(extra)) {
  9159. ;
  9160. main[key] = comp;
  9161. }
  9162. }
  9163. return main;
  9164. };
  9165. var withInstallFunction = (fn2, name) => {
  9166. ;
  9167. fn2.install = (app) => {
  9168. ;
  9169. fn2._context = app._context;
  9170. app.config.globalProperties[name] = fn2;
  9171. };
  9172. return fn2;
  9173. };
  9174. var withInstallDirective = (directive, name) => {
  9175. ;
  9176. directive.install = (app) => {
  9177. app.directive(name, directive);
  9178. };
  9179. return directive;
  9180. };
  9181. var withNoopInstall = (component2) => {
  9182. ;
  9183. component2.install = NOOP;
  9184. return component2;
  9185. };
  9186. // node_modules/element-plus/es/utils/vue/refs.mjs
  9187. var composeRefs = (...refs) => {
  9188. return (el) => {
  9189. refs.forEach((ref2) => {
  9190. if (isFunction(ref2)) {
  9191. ref2(el);
  9192. } else {
  9193. ref2.value = el;
  9194. }
  9195. });
  9196. };
  9197. };
  9198. // node_modules/element-plus/es/constants/aria.mjs
  9199. var EVENT_CODE = {
  9200. tab: "Tab",
  9201. enter: "Enter",
  9202. space: "Space",
  9203. left: "ArrowLeft",
  9204. up: "ArrowUp",
  9205. right: "ArrowRight",
  9206. down: "ArrowDown",
  9207. esc: "Escape",
  9208. delete: "Delete",
  9209. backspace: "Backspace",
  9210. numpadEnter: "NumpadEnter",
  9211. pageUp: "PageUp",
  9212. pageDown: "PageDown",
  9213. home: "Home",
  9214. end: "End"
  9215. };
  9216. // node_modules/element-plus/es/constants/date.mjs
  9217. var datePickTypes = [
  9218. "year",
  9219. "month",
  9220. "date",
  9221. "dates",
  9222. "week",
  9223. "datetime",
  9224. "datetimerange",
  9225. "daterange",
  9226. "monthrange"
  9227. ];
  9228. var WEEK_DAYS = [
  9229. "sun",
  9230. "mon",
  9231. "tue",
  9232. "wed",
  9233. "thu",
  9234. "fri",
  9235. "sat"
  9236. ];
  9237. // node_modules/element-plus/es/constants/event.mjs
  9238. var UPDATE_MODEL_EVENT = "update:modelValue";
  9239. var CHANGE_EVENT = "change";
  9240. var INPUT_EVENT = "input";
  9241. // node_modules/element-plus/es/constants/key.mjs
  9242. var INSTALLED_KEY = Symbol("INSTALLED_KEY");
  9243. // node_modules/element-plus/es/constants/size.mjs
  9244. var componentSizes = ["", "default", "small", "large"];
  9245. var componentSizeMap = {
  9246. large: 40,
  9247. default: 32,
  9248. small: 24
  9249. };
  9250. // node_modules/element-plus/es/utils/vue/size.mjs
  9251. var getComponentSize = (size3) => {
  9252. return componentSizeMap[size3 || "default"];
  9253. };
  9254. // node_modules/element-plus/es/utils/vue/validator.mjs
  9255. var isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
  9256. // node_modules/element-plus/es/utils/vue/vnode.mjs
  9257. var SCOPE2 = "utils/vue/vnode";
  9258. var PatchFlags = ((PatchFlags2) => {
  9259. PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT";
  9260. PatchFlags2[PatchFlags2["CLASS"] = 2] = "CLASS";
  9261. PatchFlags2[PatchFlags2["STYLE"] = 4] = "STYLE";
  9262. PatchFlags2[PatchFlags2["PROPS"] = 8] = "PROPS";
  9263. PatchFlags2[PatchFlags2["FULL_PROPS"] = 16] = "FULL_PROPS";
  9264. PatchFlags2[PatchFlags2["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
  9265. PatchFlags2[PatchFlags2["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
  9266. PatchFlags2[PatchFlags2["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
  9267. PatchFlags2[PatchFlags2["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
  9268. PatchFlags2[PatchFlags2["NEED_PATCH"] = 512] = "NEED_PATCH";
  9269. PatchFlags2[PatchFlags2["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
  9270. PatchFlags2[PatchFlags2["HOISTED"] = -1] = "HOISTED";
  9271. PatchFlags2[PatchFlags2["BAIL"] = -2] = "BAIL";
  9272. return PatchFlags2;
  9273. })(PatchFlags || {});
  9274. function isFragment(node) {
  9275. return isVNode(node) && node.type === Fragment;
  9276. }
  9277. function isComment(node) {
  9278. return isVNode(node) && node.type === Comment;
  9279. }
  9280. function isValidElementNode(node) {
  9281. return isVNode(node) && !isFragment(node) && !isComment(node);
  9282. }
  9283. var getNormalizedProps = (node) => {
  9284. if (!isVNode(node)) {
  9285. debugWarn(SCOPE2, "[getNormalizedProps] must be a VNode");
  9286. return {};
  9287. }
  9288. const raw = node.props || {};
  9289. const type4 = (isVNode(node.type) ? node.type.props : void 0) || {};
  9290. const props = {};
  9291. Object.keys(type4).forEach((key) => {
  9292. if (hasOwn(type4[key], "default")) {
  9293. props[key] = type4[key].default;
  9294. }
  9295. });
  9296. Object.keys(raw).forEach((key) => {
  9297. props[camelize(key)] = raw[key];
  9298. });
  9299. return props;
  9300. };
  9301. var ensureOnlyChild = (children) => {
  9302. if (!isArray(children) || children.length > 1) {
  9303. throw new Error("expect to receive a single Vue element child");
  9304. }
  9305. return children[0];
  9306. };
  9307. var flattedChildren = (children) => {
  9308. const vNodes = isArray(children) ? children : [children];
  9309. const result2 = [];
  9310. vNodes.forEach((child) => {
  9311. var _a2;
  9312. if (isArray(child)) {
  9313. result2.push(...flattedChildren(child));
  9314. } else if (isVNode(child) && isArray(child.children)) {
  9315. result2.push(...flattedChildren(child.children));
  9316. } else {
  9317. result2.push(child);
  9318. if (isVNode(child) && ((_a2 = child.component) == null ? void 0 : _a2.subTree)) {
  9319. result2.push(...flattedChildren(child.component.subTree));
  9320. }
  9321. }
  9322. });
  9323. return result2;
  9324. };
  9325. // node_modules/element-plus/es/utils/animation.mjs
  9326. var cubic = (value) => {
  9327. return value ** 3;
  9328. };
  9329. var easeInOutCubic = (value) => value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2;
  9330. // node_modules/element-plus/es/utils/arrays.mjs
  9331. var unique = (arr) => [...new Set(arr)];
  9332. var castArray2 = (arr) => {
  9333. if (!arr && arr !== 0)
  9334. return [];
  9335. return Array.isArray(arr) ? arr : [arr];
  9336. };
  9337. // node_modules/element-plus/es/utils/browser.mjs
  9338. var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
  9339. // node_modules/element-plus/es/utils/i18n.mjs
  9340. var isKorean = (text) => /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi.test(text);
  9341. // node_modules/element-plus/es/utils/raf.mjs
  9342. var rAF = (fn2) => isClient ? window.requestAnimationFrame(fn2) : setTimeout(fn2, 16);
  9343. var cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
  9344. // node_modules/element-plus/es/utils/rand.mjs
  9345. var generateId = () => Math.floor(Math.random() * 1e4);
  9346. // node_modules/element-plus/es/utils/typescript.mjs
  9347. var mutable = (val) => val;
  9348. // node_modules/element-plus/es/hooks/use-attrs/index.mjs
  9349. var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
  9350. var LISTENER_PREFIX = /^on[A-Z]/;
  9351. var useAttrs2 = (params = {}) => {
  9352. const { excludeListeners = false, excludeKeys } = params;
  9353. const allExcludeKeys = computed2(() => {
  9354. return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
  9355. });
  9356. const instance = getCurrentInstance();
  9357. if (!instance) {
  9358. debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
  9359. return computed2(() => ({}));
  9360. }
  9361. return computed2(() => {
  9362. var _a2;
  9363. return fromPairs_default(Object.entries((_a2 = instance.proxy) == null ? void 0 : _a2.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
  9364. });
  9365. };
  9366. // node_modules/element-plus/es/tokens/breadcrumb.mjs
  9367. var breadcrumbKey = Symbol("breadcrumbKey");
  9368. // node_modules/element-plus/es/tokens/button.mjs
  9369. var buttonGroupContextKey = Symbol("buttonGroupContextKey");
  9370. // node_modules/element-plus/es/tokens/carousel.mjs
  9371. var carouselContextKey = Symbol("carouselContextKey");
  9372. // node_modules/element-plus/es/tokens/checkbox.mjs
  9373. var checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
  9374. // node_modules/element-plus/es/tokens/collapse.mjs
  9375. var collapseContextKey = Symbol("collapseContextKey");
  9376. // node_modules/element-plus/es/tokens/config-provider.mjs
  9377. var configProviderContextKey = Symbol();
  9378. // node_modules/element-plus/es/tokens/dialog.mjs
  9379. var dialogInjectionKey = Symbol("dialogInjectionKey");
  9380. // node_modules/element-plus/es/tokens/form.mjs
  9381. var formContextKey = Symbol("formContextKey");
  9382. var formItemContextKey = Symbol("formItemContextKey");
  9383. // node_modules/element-plus/es/tokens/pagination.mjs
  9384. var elPaginationKey = Symbol("elPaginationKey");
  9385. // node_modules/element-plus/es/tokens/radio.mjs
  9386. var radioGroupKey = Symbol("radioGroupKey");
  9387. // node_modules/element-plus/es/tokens/row.mjs
  9388. var rowContextKey = Symbol("rowContextKey");
  9389. // node_modules/element-plus/es/tokens/scrollbar.mjs
  9390. var scrollbarContextKey = Symbol("scrollbarContextKey");
  9391. // node_modules/element-plus/es/tokens/slider.mjs
  9392. var sliderContextKey = Symbol("sliderContextKey");
  9393. // node_modules/element-plus/es/tokens/tabs.mjs
  9394. var tabsRootContextKey = Symbol("tabsRootContextKey");
  9395. // node_modules/element-plus/es/tokens/upload.mjs
  9396. var uploadContextKey = Symbol("uploadContextKey");
  9397. // node_modules/element-plus/es/tokens/popper.mjs
  9398. var POPPER_INJECTION_KEY = Symbol("popper");
  9399. var POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
  9400. // node_modules/element-plus/es/tokens/tooltip.mjs
  9401. var TOOLTIP_INJECTION_KEY = Symbol("elTooltip");
  9402. // node_modules/element-plus/es/tokens/tooltip-v2.mjs
  9403. var tooltipV2RootKey = Symbol("tooltipV2");
  9404. var tooltipV2ContentKey = Symbol("tooltipV2Content");
  9405. var TOOLTIP_V2_OPEN = "tooltip_v2.open";
  9406. // node_modules/element-plus/es/tokens/date-picker.mjs
  9407. var ROOT_PICKER_INJECTION_KEY = Symbol();
  9408. // node_modules/element-plus/es/hooks/use-prop/index.mjs
  9409. var useProp = (name) => {
  9410. const vm = getCurrentInstance();
  9411. return computed2(() => {
  9412. var _a2, _b;
  9413. return (_b = ((_a2 = vm.proxy) == null ? void 0 : _a2.$props)[name]) != null ? _b : void 0;
  9414. });
  9415. };
  9416. // node_modules/element-plus/es/hooks/use-global-config/index.mjs
  9417. var globalConfig = ref();
  9418. function useGlobalConfig(key, defaultValue = void 0) {
  9419. const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
  9420. if (key) {
  9421. return computed2(() => {
  9422. var _a2, _b;
  9423. return (_b = (_a2 = config.value) == null ? void 0 : _a2[key]) != null ? _b : defaultValue;
  9424. });
  9425. } else {
  9426. return config;
  9427. }
  9428. }
  9429. var provideGlobalConfig = (config, app, global2 = false) => {
  9430. var _a2;
  9431. const inSetup = !!getCurrentInstance();
  9432. const oldConfig = inSetup ? useGlobalConfig() : void 0;
  9433. const provideFn = (_a2 = app == null ? void 0 : app.provide) != null ? _a2 : inSetup ? provide : void 0;
  9434. if (!provideFn) {
  9435. debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
  9436. return;
  9437. }
  9438. const context = computed2(() => {
  9439. const cfg = unref(config);
  9440. if (!(oldConfig == null ? void 0 : oldConfig.value))
  9441. return cfg;
  9442. return mergeConfig(oldConfig.value, cfg);
  9443. });
  9444. provideFn(configProviderContextKey, context);
  9445. if (global2 || !globalConfig.value) {
  9446. globalConfig.value = context.value;
  9447. }
  9448. return context;
  9449. };
  9450. var mergeConfig = (a2, b2) => {
  9451. var _a2;
  9452. const keys3 = [.../* @__PURE__ */ new Set([...keysOf(a2), ...keysOf(b2)])];
  9453. const obj = {};
  9454. for (const key of keys3) {
  9455. obj[key] = (_a2 = b2[key]) != null ? _a2 : a2[key];
  9456. }
  9457. return obj;
  9458. };
  9459. // node_modules/element-plus/es/hooks/use-common-props/index.mjs
  9460. var useSizeProp = buildProp({
  9461. type: String,
  9462. values: componentSizes,
  9463. required: false
  9464. });
  9465. var useSize = (fallback, ignore = {}) => {
  9466. const emptyRef = ref(void 0);
  9467. const size3 = ignore.prop ? emptyRef : useProp("size");
  9468. const globalConfig2 = ignore.global ? emptyRef : useGlobalConfig("size");
  9469. const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
  9470. const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
  9471. return computed2(() => size3.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig2.value || "");
  9472. };
  9473. var useDisabled = (fallback) => {
  9474. const disabled = useProp("disabled");
  9475. const form = inject(formContextKey, void 0);
  9476. return computed2(() => disabled.value || unref(fallback) || (form == null ? void 0 : form.disabled) || false);
  9477. };
  9478. // node_modules/element-plus/es/hooks/use-deprecated/index.mjs
  9479. var useDeprecated = ({ from, replacement, scope, version: version4, ref: ref2, type: type4 = "API" }, condition) => {
  9480. watch(() => unref(condition), (val) => {
  9481. if (val) {
  9482. debugWarn(scope, `[${type4}] ${from} is about to be deprecated in version ${version4}, please use ${replacement} instead.
  9483. For more detail, please visit: ${ref2}
  9484. `);
  9485. }
  9486. }, {
  9487. immediate: true
  9488. });
  9489. };
  9490. // node_modules/element-plus/es/hooks/use-draggable/index.mjs
  9491. var useDraggable = (targetRef, dragRef, draggable2) => {
  9492. let transform2 = {
  9493. offsetX: 0,
  9494. offsetY: 0
  9495. };
  9496. const onMousedown = (e) => {
  9497. const downX = e.clientX;
  9498. const downY = e.clientY;
  9499. const { offsetX, offsetY } = transform2;
  9500. const targetRect = targetRef.value.getBoundingClientRect();
  9501. const targetLeft = targetRect.left;
  9502. const targetTop = targetRect.top;
  9503. const targetWidth = targetRect.width;
  9504. const targetHeight = targetRect.height;
  9505. const clientWidth = document.documentElement.clientWidth;
  9506. const clientHeight = document.documentElement.clientHeight;
  9507. const minLeft = -targetLeft + offsetX;
  9508. const minTop = -targetTop + offsetY;
  9509. const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
  9510. const maxTop = clientHeight - targetTop - targetHeight + offsetY;
  9511. const onMousemove = (e2) => {
  9512. const moveX = Math.min(Math.max(offsetX + e2.clientX - downX, minLeft), maxLeft);
  9513. const moveY = Math.min(Math.max(offsetY + e2.clientY - downY, minTop), maxTop);
  9514. transform2 = {
  9515. offsetX: moveX,
  9516. offsetY: moveY
  9517. };
  9518. targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
  9519. };
  9520. const onMouseup = () => {
  9521. document.removeEventListener("mousemove", onMousemove);
  9522. document.removeEventListener("mouseup", onMouseup);
  9523. };
  9524. document.addEventListener("mousemove", onMousemove);
  9525. document.addEventListener("mouseup", onMouseup);
  9526. };
  9527. const onDraggable = () => {
  9528. if (dragRef.value && targetRef.value) {
  9529. dragRef.value.addEventListener("mousedown", onMousedown);
  9530. }
  9531. };
  9532. const offDraggable = () => {
  9533. if (dragRef.value && targetRef.value) {
  9534. dragRef.value.removeEventListener("mousedown", onMousedown);
  9535. }
  9536. };
  9537. onMounted(() => {
  9538. watchEffect(() => {
  9539. if (draggable2.value) {
  9540. onDraggable();
  9541. } else {
  9542. offDraggable();
  9543. }
  9544. });
  9545. });
  9546. onBeforeUnmount(() => {
  9547. offDraggable();
  9548. });
  9549. };
  9550. // node_modules/element-plus/es/hooks/use-focus/index.mjs
  9551. var useFocus = (el) => {
  9552. return {
  9553. focus: () => {
  9554. var _a2, _b;
  9555. (_b = (_a2 = el.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
  9556. }
  9557. };
  9558. };
  9559. // node_modules/element-plus/es/hooks/use-namespace/index.mjs
  9560. var defaultNamespace = "el";
  9561. var statePrefix = "is-";
  9562. var _bem = (namespace, block, blockSuffix, element, modifier) => {
  9563. let cls = `${namespace}-${block}`;
  9564. if (blockSuffix) {
  9565. cls += `-${blockSuffix}`;
  9566. }
  9567. if (element) {
  9568. cls += `__${element}`;
  9569. }
  9570. if (modifier) {
  9571. cls += `--${modifier}`;
  9572. }
  9573. return cls;
  9574. };
  9575. var useNamespace = (block) => {
  9576. const namespace = useGlobalConfig("namespace", defaultNamespace);
  9577. const b2 = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
  9578. const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
  9579. const m2 = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
  9580. const be2 = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
  9581. const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
  9582. const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
  9583. const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
  9584. const is = (name, ...args) => {
  9585. const state = args.length >= 1 ? args[0] : true;
  9586. return name && state ? `${statePrefix}${name}` : "";
  9587. };
  9588. const cssVar = (object4) => {
  9589. const styles = {};
  9590. for (const key in object4) {
  9591. if (object4[key]) {
  9592. styles[`--${namespace.value}-${key}`] = object4[key];
  9593. }
  9594. }
  9595. return styles;
  9596. };
  9597. const cssVarBlock = (object4) => {
  9598. const styles = {};
  9599. for (const key in object4) {
  9600. if (object4[key]) {
  9601. styles[`--${namespace.value}-${block}-${key}`] = object4[key];
  9602. }
  9603. }
  9604. return styles;
  9605. };
  9606. const cssVarName = (name) => `--${namespace.value}-${name}`;
  9607. const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
  9608. return {
  9609. namespace,
  9610. b: b2,
  9611. e,
  9612. m: m2,
  9613. be: be2,
  9614. em,
  9615. bm,
  9616. bem,
  9617. is,
  9618. cssVar,
  9619. cssVarName,
  9620. cssVarBlock,
  9621. cssVarBlockName
  9622. };
  9623. };
  9624. // node_modules/element-plus/es/hooks/use-id/index.mjs
  9625. var defaultIdInjection = {
  9626. prefix: Math.floor(Math.random() * 1e4),
  9627. current: 0
  9628. };
  9629. var ID_INJECTION_KEY = Symbol("elIdInjection");
  9630. var useIdInjection = () => {
  9631. return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
  9632. };
  9633. var useId = (deterministicId) => {
  9634. const idInjection = useIdInjection();
  9635. if (!isClient && idInjection === defaultIdInjection) {
  9636. debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
  9637. usage: app.provide(ID_INJECTION_KEY, {
  9638. prefix: number,
  9639. current: number,
  9640. })`);
  9641. }
  9642. const namespace = useGlobalConfig("namespace", defaultNamespace);
  9643. const idRef = computed2(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
  9644. return idRef;
  9645. };
  9646. // node_modules/element-plus/es/hooks/use-form-item/index.mjs
  9647. var useFormItem = () => {
  9648. const form = inject(formContextKey, void 0);
  9649. const formItem = inject(formItemContextKey, void 0);
  9650. return {
  9651. form,
  9652. formItem
  9653. };
  9654. };
  9655. var useFormItemInputId = (props, {
  9656. formItemContext,
  9657. disableIdGeneration,
  9658. disableIdManagement
  9659. }) => {
  9660. if (!disableIdGeneration) {
  9661. disableIdGeneration = ref(false);
  9662. }
  9663. if (!disableIdManagement) {
  9664. disableIdManagement = ref(false);
  9665. }
  9666. const inputId = ref();
  9667. let idUnwatch = void 0;
  9668. const isLabeledByFormItem = computed2(() => {
  9669. var _a2;
  9670. return !!(!props.label && formItemContext && formItemContext.inputIds && ((_a2 = formItemContext.inputIds) == null ? void 0 : _a2.length) <= 1);
  9671. });
  9672. onMounted(() => {
  9673. idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id2, disableIdGeneration2]) => {
  9674. const newId = id2 != null ? id2 : !disableIdGeneration2 ? useId().value : void 0;
  9675. if (newId !== inputId.value) {
  9676. if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
  9677. inputId.value && formItemContext.removeInputId(inputId.value);
  9678. if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) {
  9679. formItemContext.addInputId(newId);
  9680. }
  9681. }
  9682. inputId.value = newId;
  9683. }
  9684. }, { immediate: true });
  9685. });
  9686. onUnmounted(() => {
  9687. idUnwatch && idUnwatch();
  9688. if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
  9689. inputId.value && formItemContext.removeInputId(inputId.value);
  9690. }
  9691. });
  9692. return {
  9693. isLabeledByFormItem,
  9694. inputId
  9695. };
  9696. };
  9697. // node_modules/element-plus/es/locale/lang/en.mjs
  9698. var English = {
  9699. name: "en",
  9700. el: {
  9701. colorpicker: {
  9702. confirm: "OK",
  9703. clear: "Clear",
  9704. defaultLabel: "color picker",
  9705. description: "current color is {color}. press enter to select a new color."
  9706. },
  9707. datepicker: {
  9708. now: "Now",
  9709. today: "Today",
  9710. cancel: "Cancel",
  9711. clear: "Clear",
  9712. confirm: "OK",
  9713. dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
  9714. monthTablePrompt: "Use the arrow keys and enter to select the month",
  9715. yearTablePrompt: "Use the arrow keys and enter to select the year",
  9716. selectedDate: "Selected date",
  9717. selectDate: "Select date",
  9718. selectTime: "Select time",
  9719. startDate: "Start Date",
  9720. startTime: "Start Time",
  9721. endDate: "End Date",
  9722. endTime: "End Time",
  9723. prevYear: "Previous Year",
  9724. nextYear: "Next Year",
  9725. prevMonth: "Previous Month",
  9726. nextMonth: "Next Month",
  9727. year: "",
  9728. month1: "January",
  9729. month2: "February",
  9730. month3: "March",
  9731. month4: "April",
  9732. month5: "May",
  9733. month6: "June",
  9734. month7: "July",
  9735. month8: "August",
  9736. month9: "September",
  9737. month10: "October",
  9738. month11: "November",
  9739. month12: "December",
  9740. week: "week",
  9741. weeks: {
  9742. sun: "Sun",
  9743. mon: "Mon",
  9744. tue: "Tue",
  9745. wed: "Wed",
  9746. thu: "Thu",
  9747. fri: "Fri",
  9748. sat: "Sat"
  9749. },
  9750. weeksFull: {
  9751. sun: "Sunday",
  9752. mon: "Monday",
  9753. tue: "Tuesday",
  9754. wed: "Wednesday",
  9755. thu: "Thursday",
  9756. fri: "Friday",
  9757. sat: "Saturday"
  9758. },
  9759. months: {
  9760. jan: "Jan",
  9761. feb: "Feb",
  9762. mar: "Mar",
  9763. apr: "Apr",
  9764. may: "May",
  9765. jun: "Jun",
  9766. jul: "Jul",
  9767. aug: "Aug",
  9768. sep: "Sep",
  9769. oct: "Oct",
  9770. nov: "Nov",
  9771. dec: "Dec"
  9772. }
  9773. },
  9774. inputNumber: {
  9775. decrease: "decrease number",
  9776. increase: "increase number"
  9777. },
  9778. select: {
  9779. loading: "Loading",
  9780. noMatch: "No matching data",
  9781. noData: "No data",
  9782. placeholder: "Select"
  9783. },
  9784. dropdown: {
  9785. toggleDropdown: "Toggle Dropdown"
  9786. },
  9787. cascader: {
  9788. noMatch: "No matching data",
  9789. loading: "Loading",
  9790. placeholder: "Select",
  9791. noData: "No data"
  9792. },
  9793. pagination: {
  9794. goto: "Go to",
  9795. pagesize: "/page",
  9796. total: "Total {total}",
  9797. pageClassifier: "",
  9798. deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
  9799. },
  9800. dialog: {
  9801. close: "Close this dialog"
  9802. },
  9803. drawer: {
  9804. close: "Close this dialog"
  9805. },
  9806. messagebox: {
  9807. title: "Message",
  9808. confirm: "OK",
  9809. cancel: "Cancel",
  9810. error: "Illegal input",
  9811. close: "Close this dialog"
  9812. },
  9813. upload: {
  9814. deleteTip: "press delete to remove",
  9815. delete: "Delete",
  9816. preview: "Preview",
  9817. continue: "Continue"
  9818. },
  9819. slider: {
  9820. defaultLabel: "slider between {min} and {max}",
  9821. defaultRangeStartLabel: "pick start value",
  9822. defaultRangeEndLabel: "pick end value"
  9823. },
  9824. table: {
  9825. emptyText: "No Data",
  9826. confirmFilter: "Confirm",
  9827. resetFilter: "Reset",
  9828. clearFilter: "All",
  9829. sumText: "Sum"
  9830. },
  9831. tree: {
  9832. emptyText: "No Data"
  9833. },
  9834. transfer: {
  9835. noMatch: "No matching data",
  9836. noData: "No data",
  9837. titles: ["List 1", "List 2"],
  9838. filterPlaceholder: "Enter keyword",
  9839. noCheckedFormat: "{total} items",
  9840. hasCheckedFormat: "{checked}/{total} checked"
  9841. },
  9842. image: {
  9843. error: "FAILED"
  9844. },
  9845. pageHeader: {
  9846. title: "Back"
  9847. },
  9848. popconfirm: {
  9849. confirmButtonText: "Yes",
  9850. cancelButtonText: "No"
  9851. }
  9852. }
  9853. };
  9854. // node_modules/element-plus/es/hooks/use-locale/index.mjs
  9855. var buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
  9856. var translate = (path, option, locale) => get_default(locale, path, path).replace(/\{(\w+)\}/g, (_2, key) => {
  9857. var _a2;
  9858. return `${(_a2 = option == null ? void 0 : option[key]) != null ? _a2 : `{${key}}`}`;
  9859. });
  9860. var buildLocaleContext = (locale) => {
  9861. const lang = computed2(() => unref(locale).name);
  9862. const localeRef = isRef(locale) ? locale : ref(locale);
  9863. return {
  9864. lang,
  9865. locale: localeRef,
  9866. t: buildTranslator(locale)
  9867. };
  9868. };
  9869. var useLocale = () => {
  9870. const locale = useGlobalConfig("locale");
  9871. return buildLocaleContext(computed2(() => locale.value || English));
  9872. };
  9873. // node_modules/element-plus/es/hooks/use-lockscreen/index.mjs
  9874. var useLockscreen = (trigger) => {
  9875. if (!isRef(trigger)) {
  9876. throwError("[useLockscreen]", "You need to pass a ref param to this function");
  9877. }
  9878. const ns2 = useNamespace("popup");
  9879. const hiddenCls = computed(() => ns2.bm("parent", "hidden"));
  9880. if (!isClient || hasClass(document.body, hiddenCls.value)) {
  9881. return;
  9882. }
  9883. let scrollBarWidth2 = 0;
  9884. let withoutHiddenClass = false;
  9885. let bodyWidth = "0";
  9886. const cleanup = () => {
  9887. setTimeout(() => {
  9888. removeClass(document.body, hiddenCls.value);
  9889. if (withoutHiddenClass) {
  9890. document.body.style.width = bodyWidth;
  9891. }
  9892. }, 200);
  9893. };
  9894. watch(trigger, (val) => {
  9895. if (!val) {
  9896. cleanup();
  9897. return;
  9898. }
  9899. withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
  9900. if (withoutHiddenClass) {
  9901. bodyWidth = document.body.style.width;
  9902. }
  9903. scrollBarWidth2 = getScrollBarWidth(ns2.namespace.value);
  9904. const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
  9905. const bodyOverflowY = getStyle(document.body, "overflowY");
  9906. if (scrollBarWidth2 > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) {
  9907. document.body.style.width = `calc(100% - ${scrollBarWidth2}px)`;
  9908. }
  9909. addClass(document.body, hiddenCls.value);
  9910. });
  9911. onScopeDispose(() => cleanup());
  9912. };
  9913. // node_modules/element-plus/es/hooks/use-modal/index.mjs
  9914. var modalStack = [];
  9915. var closeModal = (e) => {
  9916. if (modalStack.length === 0)
  9917. return;
  9918. if (e.code === EVENT_CODE.esc) {
  9919. e.stopPropagation();
  9920. const topModal = modalStack[modalStack.length - 1];
  9921. topModal.handleClose();
  9922. }
  9923. };
  9924. var useModal = (instance, visibleRef) => {
  9925. watch(visibleRef, (val) => {
  9926. if (val) {
  9927. modalStack.push(instance);
  9928. } else {
  9929. modalStack.splice(modalStack.indexOf(instance), 1);
  9930. }
  9931. });
  9932. };
  9933. if (isClient)
  9934. useEventListener(document, "keydown", closeModal);
  9935. // node_modules/element-plus/es/hooks/use-model-toggle/index.mjs
  9936. var _prop = buildProp({
  9937. type: definePropType(Boolean),
  9938. default: null
  9939. });
  9940. var _event = buildProp({
  9941. type: definePropType(Function)
  9942. });
  9943. var createModelToggleComposable = (name) => {
  9944. const updateEventKey = `update:${name}`;
  9945. const updateEventKeyRaw2 = `onUpdate:${name}`;
  9946. const useModelToggleEmits2 = [updateEventKey];
  9947. const useModelToggleProps2 = {
  9948. [name]: _prop,
  9949. [updateEventKeyRaw2]: _event
  9950. };
  9951. const useModelToggle2 = ({
  9952. indicator,
  9953. toggleReason,
  9954. shouldHideWhenRouteChanges,
  9955. shouldProceed,
  9956. onShow,
  9957. onHide
  9958. }) => {
  9959. const instance = getCurrentInstance();
  9960. const { emit } = instance;
  9961. const props = instance.props;
  9962. const hasUpdateHandler = computed2(() => isFunction(props[updateEventKeyRaw2]));
  9963. const isModelBindingAbsent = computed2(() => props[name] === null);
  9964. const doShow = (event) => {
  9965. if (indicator.value === true) {
  9966. return;
  9967. }
  9968. indicator.value = true;
  9969. if (toggleReason) {
  9970. toggleReason.value = event;
  9971. }
  9972. if (isFunction(onShow)) {
  9973. onShow(event);
  9974. }
  9975. };
  9976. const doHide = (event) => {
  9977. if (indicator.value === false) {
  9978. return;
  9979. }
  9980. indicator.value = false;
  9981. if (toggleReason) {
  9982. toggleReason.value = event;
  9983. }
  9984. if (isFunction(onHide)) {
  9985. onHide(event);
  9986. }
  9987. };
  9988. const show = (event) => {
  9989. if (props.disabled === true || isFunction(shouldProceed) && !shouldProceed())
  9990. return;
  9991. const shouldEmit = hasUpdateHandler.value && isClient;
  9992. if (shouldEmit) {
  9993. emit(updateEventKey, true);
  9994. }
  9995. if (isModelBindingAbsent.value || !shouldEmit) {
  9996. doShow(event);
  9997. }
  9998. };
  9999. const hide2 = (event) => {
  10000. if (props.disabled === true || !isClient)
  10001. return;
  10002. const shouldEmit = hasUpdateHandler.value && isClient;
  10003. if (shouldEmit) {
  10004. emit(updateEventKey, false);
  10005. }
  10006. if (isModelBindingAbsent.value || !shouldEmit) {
  10007. doHide(event);
  10008. }
  10009. };
  10010. const onChange = (val) => {
  10011. if (!isBoolean2(val))
  10012. return;
  10013. if (props.disabled && val) {
  10014. if (hasUpdateHandler.value) {
  10015. emit(updateEventKey, false);
  10016. }
  10017. } else if (indicator.value !== val) {
  10018. if (val) {
  10019. doShow();
  10020. } else {
  10021. doHide();
  10022. }
  10023. }
  10024. };
  10025. const toggle = () => {
  10026. if (indicator.value) {
  10027. hide2();
  10028. } else {
  10029. show();
  10030. }
  10031. };
  10032. watch(() => props[name], onChange);
  10033. if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) {
  10034. watch(() => ({
  10035. ...instance.proxy.$route
  10036. }), () => {
  10037. if (shouldHideWhenRouteChanges.value && indicator.value) {
  10038. hide2();
  10039. }
  10040. });
  10041. }
  10042. onMounted(() => {
  10043. onChange(props[name]);
  10044. });
  10045. return {
  10046. hide: hide2,
  10047. show,
  10048. toggle,
  10049. hasUpdateHandler
  10050. };
  10051. };
  10052. return {
  10053. useModelToggle: useModelToggle2,
  10054. useModelToggleProps: useModelToggleProps2,
  10055. useModelToggleEmits: useModelToggleEmits2
  10056. };
  10057. };
  10058. var { useModelToggle, useModelToggleProps, useModelToggleEmits } = createModelToggleComposable("modelValue");
  10059. // node_modules/element-plus/es/hooks/use-prevent-global/index.mjs
  10060. var usePreventGlobal = (indicator, evt, cb) => {
  10061. const prevent = (e) => {
  10062. if (cb(e))
  10063. e.stopImmediatePropagation();
  10064. };
  10065. let stop = void 0;
  10066. watch(() => indicator.value, (val) => {
  10067. if (val) {
  10068. stop = useEventListener(document, evt, prevent, true);
  10069. } else {
  10070. stop == null ? void 0 : stop();
  10071. }
  10072. }, { immediate: true });
  10073. };
  10074. // node_modules/element-plus/es/hooks/use-restore-active/index.mjs
  10075. var useRestoreActive = (toggle, initialFocus) => {
  10076. let previousActive;
  10077. watch(() => toggle.value, (val) => {
  10078. var _a2, _b;
  10079. if (val) {
  10080. previousActive = document.activeElement;
  10081. if (isRef(initialFocus)) {
  10082. (_b = (_a2 = initialFocus.value).focus) == null ? void 0 : _b.call(_a2);
  10083. }
  10084. } else {
  10085. if (false) {
  10086. previousActive.focus.call(previousActive);
  10087. } else {
  10088. previousActive.focus();
  10089. }
  10090. }
  10091. });
  10092. };
  10093. // node_modules/element-plus/es/hooks/use-same-target/index.mjs
  10094. var useSameTarget = (handleClick) => {
  10095. if (!handleClick) {
  10096. return { onClick: NOOP, onMousedown: NOOP, onMouseup: NOOP };
  10097. }
  10098. let mousedownTarget = false;
  10099. let mouseupTarget = false;
  10100. const onClick = (e) => {
  10101. if (mousedownTarget && mouseupTarget) {
  10102. handleClick(e);
  10103. }
  10104. mousedownTarget = mouseupTarget = false;
  10105. };
  10106. const onMousedown = (e) => {
  10107. mousedownTarget = e.target === e.currentTarget;
  10108. };
  10109. const onMouseup = (e) => {
  10110. mouseupTarget = e.target === e.currentTarget;
  10111. };
  10112. return { onClick, onMousedown, onMouseup };
  10113. };
  10114. // node_modules/element-plus/es/hooks/use-teleport/index.mjs
  10115. var useTeleport = (contentRenderer, appendToBody) => {
  10116. const isTeleportVisible = ref(false);
  10117. if (!isClient) {
  10118. return {
  10119. isTeleportVisible,
  10120. showTeleport: NOOP,
  10121. hideTeleport: NOOP,
  10122. renderTeleport: NOOP
  10123. };
  10124. }
  10125. let $el = null;
  10126. const showTeleport = () => {
  10127. isTeleportVisible.value = true;
  10128. if ($el !== null)
  10129. return;
  10130. $el = createGlobalNode();
  10131. };
  10132. const hideTeleport = () => {
  10133. isTeleportVisible.value = false;
  10134. if ($el !== null) {
  10135. removeGlobalNode($el);
  10136. $el = null;
  10137. }
  10138. };
  10139. const renderTeleport = () => {
  10140. return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [h(Teleport, { to: $el }, contentRenderer())] : void 0;
  10141. };
  10142. onUnmounted(hideTeleport);
  10143. return {
  10144. isTeleportVisible,
  10145. showTeleport,
  10146. hideTeleport,
  10147. renderTeleport
  10148. };
  10149. };
  10150. // node_modules/element-plus/es/hooks/use-throttle-render/index.mjs
  10151. var useThrottleRender = (loading, throttle2 = 0) => {
  10152. if (throttle2 === 0)
  10153. return loading;
  10154. const throttled = ref(false);
  10155. let timeoutHandle = 0;
  10156. const dispatchThrottling = () => {
  10157. if (timeoutHandle) {
  10158. clearTimeout(timeoutHandle);
  10159. }
  10160. timeoutHandle = window.setTimeout(() => {
  10161. throttled.value = loading.value;
  10162. }, throttle2);
  10163. };
  10164. onMounted(dispatchThrottling);
  10165. watch(() => loading.value, (val) => {
  10166. if (val) {
  10167. dispatchThrottling();
  10168. } else {
  10169. throttled.value = val;
  10170. }
  10171. });
  10172. return throttled;
  10173. };
  10174. // node_modules/element-plus/es/hooks/use-timeout/index.mjs
  10175. function useTimeout() {
  10176. let timeoutHandle;
  10177. const registerTimeout = (fn2, delay2) => {
  10178. cancelTimeout();
  10179. timeoutHandle = window.setTimeout(fn2, delay2);
  10180. };
  10181. const cancelTimeout = () => window.clearTimeout(timeoutHandle);
  10182. tryOnScopeDispose(() => cancelTimeout());
  10183. return {
  10184. registerTimeout,
  10185. cancelTimeout
  10186. };
  10187. }
  10188. // node_modules/element-plus/es/hooks/use-transition-fallthrough/index.mjs
  10189. var AFTER_APPEAR = "after-appear";
  10190. var AFTER_ENTER = "after-enter";
  10191. var AFTER_LEAVE = "after-leave";
  10192. var APPEAR = "appear";
  10193. var APPEAR_CANCELLED = "appear-cancelled";
  10194. var BEFORE_ENTER = "before-enter";
  10195. var BEFORE_LEAVE = "before-leave";
  10196. var ENTER = "enter";
  10197. var ENTER_CANCELLED = "enter-cancelled";
  10198. var LEAVE = "leave";
  10199. var LEAVE_CANCELLED = "leave-cancelled";
  10200. var useTransitionFallthroughEmits = [
  10201. AFTER_APPEAR,
  10202. AFTER_ENTER,
  10203. AFTER_LEAVE,
  10204. APPEAR,
  10205. APPEAR_CANCELLED,
  10206. BEFORE_ENTER,
  10207. BEFORE_LEAVE,
  10208. ENTER,
  10209. ENTER_CANCELLED,
  10210. LEAVE,
  10211. LEAVE_CANCELLED
  10212. ];
  10213. var useTransitionFallthrough = () => {
  10214. const { emit } = getCurrentInstance();
  10215. return {
  10216. onAfterAppear: () => {
  10217. emit(AFTER_APPEAR);
  10218. },
  10219. onAfterEnter: () => {
  10220. emit(AFTER_ENTER);
  10221. },
  10222. onAfterLeave: () => {
  10223. emit(AFTER_LEAVE);
  10224. },
  10225. onAppearCancelled: () => {
  10226. emit(APPEAR_CANCELLED);
  10227. },
  10228. onBeforeEnter: () => {
  10229. emit(BEFORE_ENTER);
  10230. },
  10231. onBeforeLeave: () => {
  10232. emit(BEFORE_LEAVE);
  10233. },
  10234. onEnter: () => {
  10235. emit(ENTER);
  10236. },
  10237. onEnterCancelled: () => {
  10238. emit(ENTER_CANCELLED);
  10239. },
  10240. onLeave: () => {
  10241. emit(LEAVE);
  10242. },
  10243. onLeaveCancelled: () => {
  10244. emit(LEAVE_CANCELLED);
  10245. }
  10246. };
  10247. };
  10248. // node_modules/element-plus/es/hooks/use-escape-keydown/index.mjs
  10249. var registeredEscapeHandlers = [];
  10250. var cachedHandler = (e) => {
  10251. const event = e;
  10252. if (event.key === EVENT_CODE.esc) {
  10253. registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
  10254. }
  10255. };
  10256. var useEscapeKeydown = (handler) => {
  10257. onMounted(() => {
  10258. if (registeredEscapeHandlers.length === 0) {
  10259. document.addEventListener("keydown", cachedHandler);
  10260. }
  10261. if (isClient)
  10262. registeredEscapeHandlers.push(handler);
  10263. });
  10264. onBeforeUnmount(() => {
  10265. registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
  10266. if (registeredEscapeHandlers.length === 0) {
  10267. if (isClient)
  10268. document.removeEventListener("keydown", cachedHandler);
  10269. }
  10270. });
  10271. };
  10272. // node_modules/element-plus/es/hooks/use-popper-container/index.mjs
  10273. var cachedContainer;
  10274. var usePopperContainerId = () => {
  10275. const namespace = useGlobalConfig("namespace", defaultNamespace);
  10276. const idInjection = useIdInjection();
  10277. const id2 = computed2(() => {
  10278. return `${namespace.value}-popper-container-${idInjection.prefix}`;
  10279. });
  10280. const selector = computed2(() => `#${id2.value}`);
  10281. return {
  10282. id: id2,
  10283. selector
  10284. };
  10285. };
  10286. var createContainer = (id2) => {
  10287. const container = document.createElement("div");
  10288. container.id = id2;
  10289. document.body.appendChild(container);
  10290. return container;
  10291. };
  10292. var usePopperContainer = () => {
  10293. onBeforeMount(() => {
  10294. if (!isClient)
  10295. return;
  10296. const { id: id2, selector } = usePopperContainerId();
  10297. if (!cachedContainer && !document.body.querySelector(selector.value)) {
  10298. cachedContainer = createContainer(id2.value);
  10299. }
  10300. });
  10301. };
  10302. // node_modules/element-plus/es/hooks/use-intermediate-render/index.mjs
  10303. var useDelayedRender = ({
  10304. indicator,
  10305. intermediateIndicator,
  10306. shouldSetIntermediate = () => true,
  10307. beforeShow,
  10308. afterShow,
  10309. afterHide,
  10310. beforeHide
  10311. }) => {
  10312. watch(() => unref(indicator), (val) => {
  10313. if (val) {
  10314. beforeShow == null ? void 0 : beforeShow();
  10315. nextTick(() => {
  10316. if (!unref(indicator))
  10317. return;
  10318. if (shouldSetIntermediate("show")) {
  10319. intermediateIndicator.value = true;
  10320. }
  10321. });
  10322. } else {
  10323. beforeHide == null ? void 0 : beforeHide();
  10324. nextTick(() => {
  10325. if (unref(indicator))
  10326. return;
  10327. if (shouldSetIntermediate("hide")) {
  10328. intermediateIndicator.value = false;
  10329. }
  10330. });
  10331. }
  10332. });
  10333. watch(() => intermediateIndicator.value, (val) => {
  10334. if (val) {
  10335. afterShow == null ? void 0 : afterShow();
  10336. } else {
  10337. afterHide == null ? void 0 : afterHide();
  10338. }
  10339. });
  10340. };
  10341. // node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs
  10342. var useDelayedToggleProps = buildProps({
  10343. showAfter: {
  10344. type: Number,
  10345. default: 0
  10346. },
  10347. hideAfter: {
  10348. type: Number,
  10349. default: 200
  10350. }
  10351. });
  10352. var useDelayedToggle = ({
  10353. showAfter,
  10354. hideAfter,
  10355. open,
  10356. close: close2
  10357. }) => {
  10358. const { registerTimeout } = useTimeout();
  10359. const onOpen = (event) => {
  10360. registerTimeout(() => {
  10361. open(event);
  10362. }, unref(showAfter));
  10363. };
  10364. const onClose = (event) => {
  10365. registerTimeout(() => {
  10366. close2(event);
  10367. }, unref(hideAfter));
  10368. };
  10369. return {
  10370. onOpen,
  10371. onClose
  10372. };
  10373. };
  10374. // node_modules/element-plus/es/hooks/use-forward-ref/index.mjs
  10375. var FORWARD_REF_INJECTION_KEY = Symbol("elForwardRef");
  10376. var useForwardRef = (forwardRef) => {
  10377. const setForwardRef = (el) => {
  10378. forwardRef.value = el;
  10379. };
  10380. provide(FORWARD_REF_INJECTION_KEY, {
  10381. setForwardRef
  10382. });
  10383. };
  10384. var useForwardRefDirective = (setForwardRef) => {
  10385. return {
  10386. mounted(el) {
  10387. setForwardRef(el);
  10388. },
  10389. updated(el) {
  10390. setForwardRef(el);
  10391. },
  10392. unmounted() {
  10393. setForwardRef(null);
  10394. }
  10395. };
  10396. };
  10397. // node_modules/element-plus/es/hooks/use-z-index/index.mjs
  10398. var zIndex = ref(0);
  10399. var useZIndex = () => {
  10400. const initialZIndex = useGlobalConfig("zIndex", 2e3);
  10401. const currentZIndex = computed2(() => initialZIndex.value + zIndex.value);
  10402. const nextZIndex = () => {
  10403. zIndex.value++;
  10404. return currentZIndex.value;
  10405. };
  10406. return {
  10407. initialZIndex,
  10408. currentZIndex,
  10409. nextZIndex
  10410. };
  10411. };
  10412. // node_modules/@floating-ui/core/dist/floating-ui.core.esm.js
  10413. function getSide(placement) {
  10414. return placement.split("-")[0];
  10415. }
  10416. function getAlignment(placement) {
  10417. return placement.split("-")[1];
  10418. }
  10419. function getMainAxisFromPlacement(placement) {
  10420. return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
  10421. }
  10422. function getLengthFromAxis(axis) {
  10423. return axis === "y" ? "height" : "width";
  10424. }
  10425. function computeCoordsFromPlacement(_ref, placement, rtl) {
  10426. let {
  10427. reference,
  10428. floating
  10429. } = _ref;
  10430. const commonX = reference.x + reference.width / 2 - floating.width / 2;
  10431. const commonY = reference.y + reference.height / 2 - floating.height / 2;
  10432. const mainAxis = getMainAxisFromPlacement(placement);
  10433. const length = getLengthFromAxis(mainAxis);
  10434. const commonAlign = reference[length] / 2 - floating[length] / 2;
  10435. const side = getSide(placement);
  10436. const isVertical = mainAxis === "x";
  10437. let coords;
  10438. switch (side) {
  10439. case "top":
  10440. coords = {
  10441. x: commonX,
  10442. y: reference.y - floating.height
  10443. };
  10444. break;
  10445. case "bottom":
  10446. coords = {
  10447. x: commonX,
  10448. y: reference.y + reference.height
  10449. };
  10450. break;
  10451. case "right":
  10452. coords = {
  10453. x: reference.x + reference.width,
  10454. y: commonY
  10455. };
  10456. break;
  10457. case "left":
  10458. coords = {
  10459. x: reference.x - floating.width,
  10460. y: commonY
  10461. };
  10462. break;
  10463. default:
  10464. coords = {
  10465. x: reference.x,
  10466. y: reference.y
  10467. };
  10468. }
  10469. switch (getAlignment(placement)) {
  10470. case "start":
  10471. coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
  10472. break;
  10473. case "end":
  10474. coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
  10475. break;
  10476. }
  10477. return coords;
  10478. }
  10479. var computePosition = async (reference, floating, config) => {
  10480. const {
  10481. placement = "bottom",
  10482. strategy = "absolute",
  10483. middleware = [],
  10484. platform: platform2
  10485. } = config;
  10486. const validMiddleware = middleware.filter(Boolean);
  10487. const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
  10488. if (true) {
  10489. if (platform2 == null) {
  10490. console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" "));
  10491. }
  10492. if (validMiddleware.filter((_ref) => {
  10493. let {
  10494. name
  10495. } = _ref;
  10496. return name === "autoPlacement" || name === "flip";
  10497. }).length > 1) {
  10498. throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware", "detected. This will lead to an infinite loop. Ensure only one of", "either has been passed to the `middleware` array."].join(" "));
  10499. }
  10500. if (!reference || !floating) {
  10501. console.error(["Floating UI: The reference and/or floating element was not defined", "when `computePosition()` was called. Ensure that both elements have", "been created and can be measured."].join(" "));
  10502. }
  10503. }
  10504. let rects = await platform2.getElementRects({
  10505. reference,
  10506. floating,
  10507. strategy
  10508. });
  10509. let {
  10510. x: x2,
  10511. y
  10512. } = computeCoordsFromPlacement(rects, placement, rtl);
  10513. let statefulPlacement = placement;
  10514. let middlewareData = {};
  10515. let resetCount = 0;
  10516. for (let i = 0; i < validMiddleware.length; i++) {
  10517. const {
  10518. name,
  10519. fn: fn2
  10520. } = validMiddleware[i];
  10521. const {
  10522. x: nextX,
  10523. y: nextY,
  10524. data,
  10525. reset
  10526. } = await fn2({
  10527. x: x2,
  10528. y,
  10529. initialPlacement: placement,
  10530. placement: statefulPlacement,
  10531. strategy,
  10532. middlewareData,
  10533. rects,
  10534. platform: platform2,
  10535. elements: {
  10536. reference,
  10537. floating
  10538. }
  10539. });
  10540. x2 = nextX != null ? nextX : x2;
  10541. y = nextY != null ? nextY : y;
  10542. middlewareData = {
  10543. ...middlewareData,
  10544. [name]: {
  10545. ...middlewareData[name],
  10546. ...data
  10547. }
  10548. };
  10549. if (true) {
  10550. if (resetCount > 50) {
  10551. console.warn(["Floating UI: The middleware lifecycle appears to be running in an", "infinite loop. This is usually caused by a `reset` continually", "being returned without a break condition."].join(" "));
  10552. }
  10553. }
  10554. if (reset && resetCount <= 50) {
  10555. resetCount++;
  10556. if (typeof reset === "object") {
  10557. if (reset.placement) {
  10558. statefulPlacement = reset.placement;
  10559. }
  10560. if (reset.rects) {
  10561. rects = reset.rects === true ? await platform2.getElementRects({
  10562. reference,
  10563. floating,
  10564. strategy
  10565. }) : reset.rects;
  10566. }
  10567. ({
  10568. x: x2,
  10569. y
  10570. } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
  10571. }
  10572. i = -1;
  10573. continue;
  10574. }
  10575. }
  10576. return {
  10577. x: x2,
  10578. y,
  10579. placement: statefulPlacement,
  10580. strategy,
  10581. middlewareData
  10582. };
  10583. };
  10584. function expandPaddingObject(padding) {
  10585. return {
  10586. top: 0,
  10587. right: 0,
  10588. bottom: 0,
  10589. left: 0,
  10590. ...padding
  10591. };
  10592. }
  10593. function getSideObjectFromPadding(padding) {
  10594. return typeof padding !== "number" ? expandPaddingObject(padding) : {
  10595. top: padding,
  10596. right: padding,
  10597. bottom: padding,
  10598. left: padding
  10599. };
  10600. }
  10601. function rectToClientRect(rect) {
  10602. return {
  10603. ...rect,
  10604. top: rect.y,
  10605. left: rect.x,
  10606. right: rect.x + rect.width,
  10607. bottom: rect.y + rect.height
  10608. };
  10609. }
  10610. var min2 = Math.min;
  10611. var max2 = Math.max;
  10612. function within(min$1, value, max$1) {
  10613. return max2(min$1, min2(value, max$1));
  10614. }
  10615. var arrow = (options) => ({
  10616. name: "arrow",
  10617. options,
  10618. async fn(middlewareArguments) {
  10619. const {
  10620. element,
  10621. padding = 0
  10622. } = options != null ? options : {};
  10623. const {
  10624. x: x2,
  10625. y,
  10626. placement,
  10627. rects,
  10628. platform: platform2
  10629. } = middlewareArguments;
  10630. if (element == null) {
  10631. if (true) {
  10632. console.warn("Floating UI: No `element` was passed to the `arrow` middleware.");
  10633. }
  10634. return {};
  10635. }
  10636. const paddingObject = getSideObjectFromPadding(padding);
  10637. const coords = {
  10638. x: x2,
  10639. y
  10640. };
  10641. const axis = getMainAxisFromPlacement(placement);
  10642. const alignment = getAlignment(placement);
  10643. const length = getLengthFromAxis(axis);
  10644. const arrowDimensions = await platform2.getDimensions(element);
  10645. const minProp = axis === "y" ? "top" : "left";
  10646. const maxProp = axis === "y" ? "bottom" : "right";
  10647. const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
  10648. const startDiff = coords[axis] - rects.reference[axis];
  10649. const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
  10650. let clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
  10651. if (clientSize === 0) {
  10652. clientSize = rects.floating[length];
  10653. }
  10654. const centerToReference = endDiff / 2 - startDiff / 2;
  10655. const min5 = paddingObject[minProp];
  10656. const max5 = clientSize - arrowDimensions[length] - paddingObject[maxProp];
  10657. const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
  10658. const offset2 = within(min5, center, max5);
  10659. const alignmentPadding = alignment === "start" ? paddingObject[minProp] : paddingObject[maxProp];
  10660. const shouldAddOffset = alignmentPadding > 0 && center !== offset2 && rects.reference[length] <= rects.floating[length];
  10661. const alignmentOffset = shouldAddOffset ? center < min5 ? min5 - center : max5 - center : 0;
  10662. return {
  10663. [axis]: coords[axis] - alignmentOffset,
  10664. data: {
  10665. [axis]: offset2,
  10666. centerOffset: center - offset2
  10667. }
  10668. };
  10669. }
  10670. });
  10671. var sides = ["top", "right", "bottom", "left"];
  10672. var allPlacements = sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
  10673. async function convertValueToCoords(middlewareArguments, value) {
  10674. const {
  10675. placement,
  10676. platform: platform2,
  10677. elements
  10678. } = middlewareArguments;
  10679. const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
  10680. const side = getSide(placement);
  10681. const alignment = getAlignment(placement);
  10682. const isVertical = getMainAxisFromPlacement(placement) === "x";
  10683. const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
  10684. const crossAxisMulti = rtl && isVertical ? -1 : 1;
  10685. const rawValue = typeof value === "function" ? value(middlewareArguments) : value;
  10686. let {
  10687. mainAxis,
  10688. crossAxis,
  10689. alignmentAxis
  10690. } = typeof rawValue === "number" ? {
  10691. mainAxis: rawValue,
  10692. crossAxis: 0,
  10693. alignmentAxis: null
  10694. } : {
  10695. mainAxis: 0,
  10696. crossAxis: 0,
  10697. alignmentAxis: null,
  10698. ...rawValue
  10699. };
  10700. if (alignment && typeof alignmentAxis === "number") {
  10701. crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
  10702. }
  10703. return isVertical ? {
  10704. x: crossAxis * crossAxisMulti,
  10705. y: mainAxis * mainAxisMulti
  10706. } : {
  10707. x: mainAxis * mainAxisMulti,
  10708. y: crossAxis * crossAxisMulti
  10709. };
  10710. }
  10711. var offset = function(value) {
  10712. if (value === void 0) {
  10713. value = 0;
  10714. }
  10715. return {
  10716. name: "offset",
  10717. options: value,
  10718. async fn(middlewareArguments) {
  10719. const {
  10720. x: x2,
  10721. y
  10722. } = middlewareArguments;
  10723. const diffCoords = await convertValueToCoords(middlewareArguments, value);
  10724. return {
  10725. x: x2 + diffCoords.x,
  10726. y: y + diffCoords.y,
  10727. data: diffCoords
  10728. };
  10729. }
  10730. };
  10731. };
  10732. // node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js
  10733. function isWindow(value) {
  10734. return value && value.document && value.location && value.alert && value.setInterval;
  10735. }
  10736. function getWindow(node) {
  10737. if (node == null) {
  10738. return window;
  10739. }
  10740. if (!isWindow(node)) {
  10741. const ownerDocument = node.ownerDocument;
  10742. return ownerDocument ? ownerDocument.defaultView || window : window;
  10743. }
  10744. return node;
  10745. }
  10746. function getComputedStyle2(element) {
  10747. return getWindow(element).getComputedStyle(element);
  10748. }
  10749. function getNodeName(node) {
  10750. return isWindow(node) ? "" : node ? (node.nodeName || "").toLowerCase() : "";
  10751. }
  10752. function getUAString() {
  10753. const uaData = navigator.userAgentData;
  10754. if (uaData != null && uaData.brands) {
  10755. return uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
  10756. }
  10757. return navigator.userAgent;
  10758. }
  10759. function isHTMLElement(value) {
  10760. return value instanceof getWindow(value).HTMLElement;
  10761. }
  10762. function isElement3(value) {
  10763. return value instanceof getWindow(value).Element;
  10764. }
  10765. function isNode(value) {
  10766. return value instanceof getWindow(value).Node;
  10767. }
  10768. function isShadowRoot(node) {
  10769. if (typeof ShadowRoot === "undefined") {
  10770. return false;
  10771. }
  10772. const OwnElement = getWindow(node).ShadowRoot;
  10773. return node instanceof OwnElement || node instanceof ShadowRoot;
  10774. }
  10775. function isOverflowElement(element) {
  10776. const {
  10777. overflow,
  10778. overflowX,
  10779. overflowY,
  10780. display
  10781. } = getComputedStyle2(element);
  10782. return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
  10783. }
  10784. function isTableElement(element) {
  10785. return ["table", "td", "th"].includes(getNodeName(element));
  10786. }
  10787. function isContainingBlock(element) {
  10788. const isFirefox2 = /firefox/i.test(getUAString());
  10789. const css = getComputedStyle2(element);
  10790. return css.transform !== "none" || css.perspective !== "none" || isFirefox2 && css.willChange === "filter" || isFirefox2 && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some(
  10791. (value) => {
  10792. const contain = css.contain;
  10793. return contain != null ? contain.includes(value) : false;
  10794. }
  10795. );
  10796. }
  10797. function isLayoutViewport() {
  10798. return !/^((?!chrome|android).)*safari/i.test(getUAString());
  10799. }
  10800. function isLastTraversableNode(node) {
  10801. return ["html", "body", "#document"].includes(getNodeName(node));
  10802. }
  10803. var min3 = Math.min;
  10804. var max3 = Math.max;
  10805. var round2 = Math.round;
  10806. function getBoundingClientRect(element, includeScale, isFixedStrategy) {
  10807. var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
  10808. if (includeScale === void 0) {
  10809. includeScale = false;
  10810. }
  10811. if (isFixedStrategy === void 0) {
  10812. isFixedStrategy = false;
  10813. }
  10814. const clientRect = element.getBoundingClientRect();
  10815. let scaleX = 1;
  10816. let scaleY = 1;
  10817. if (includeScale && isHTMLElement(element)) {
  10818. scaleX = element.offsetWidth > 0 ? round2(clientRect.width) / element.offsetWidth || 1 : 1;
  10819. scaleY = element.offsetHeight > 0 ? round2(clientRect.height) / element.offsetHeight || 1 : 1;
  10820. }
  10821. const win = isElement3(element) ? getWindow(element) : window;
  10822. const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
  10823. const x2 = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
  10824. const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
  10825. const width = clientRect.width / scaleX;
  10826. const height = clientRect.height / scaleY;
  10827. return {
  10828. width,
  10829. height,
  10830. top: y,
  10831. right: x2 + width,
  10832. bottom: y + height,
  10833. left: x2,
  10834. x: x2,
  10835. y
  10836. };
  10837. }
  10838. function getDocumentElement(node) {
  10839. return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
  10840. }
  10841. function getNodeScroll(element) {
  10842. if (isElement3(element)) {
  10843. return {
  10844. scrollLeft: element.scrollLeft,
  10845. scrollTop: element.scrollTop
  10846. };
  10847. }
  10848. return {
  10849. scrollLeft: element.pageXOffset,
  10850. scrollTop: element.pageYOffset
  10851. };
  10852. }
  10853. function getWindowScrollBarX(element) {
  10854. return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
  10855. }
  10856. function isScaled(element) {
  10857. const rect = getBoundingClientRect(element);
  10858. return round2(rect.width) !== element.offsetWidth || round2(rect.height) !== element.offsetHeight;
  10859. }
  10860. function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
  10861. const isOffsetParentAnElement = isHTMLElement(offsetParent);
  10862. const documentElement = getDocumentElement(offsetParent);
  10863. const rect = getBoundingClientRect(
  10864. element,
  10865. isOffsetParentAnElement && isScaled(offsetParent),
  10866. strategy === "fixed"
  10867. );
  10868. let scroll = {
  10869. scrollLeft: 0,
  10870. scrollTop: 0
  10871. };
  10872. const offsets = {
  10873. x: 0,
  10874. y: 0
  10875. };
  10876. if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
  10877. if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
  10878. scroll = getNodeScroll(offsetParent);
  10879. }
  10880. if (isHTMLElement(offsetParent)) {
  10881. const offsetRect = getBoundingClientRect(offsetParent, true);
  10882. offsets.x = offsetRect.x + offsetParent.clientLeft;
  10883. offsets.y = offsetRect.y + offsetParent.clientTop;
  10884. } else if (documentElement) {
  10885. offsets.x = getWindowScrollBarX(documentElement);
  10886. }
  10887. }
  10888. return {
  10889. x: rect.left + scroll.scrollLeft - offsets.x,
  10890. y: rect.top + scroll.scrollTop - offsets.y,
  10891. width: rect.width,
  10892. height: rect.height
  10893. };
  10894. }
  10895. function getParentNode(node) {
  10896. if (getNodeName(node) === "html") {
  10897. return node;
  10898. }
  10899. return node.assignedSlot || node.parentNode || (isShadowRoot(node) ? node.host : null) || getDocumentElement(node);
  10900. }
  10901. function getTrueOffsetParent(element) {
  10902. if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") {
  10903. return null;
  10904. }
  10905. return element.offsetParent;
  10906. }
  10907. function getContainingBlock(element) {
  10908. let currentNode = getParentNode(element);
  10909. if (isShadowRoot(currentNode)) {
  10910. currentNode = currentNode.host;
  10911. }
  10912. while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
  10913. if (isContainingBlock(currentNode)) {
  10914. return currentNode;
  10915. } else {
  10916. const parent2 = currentNode.parentNode;
  10917. currentNode = isShadowRoot(parent2) ? parent2.host : parent2;
  10918. }
  10919. }
  10920. return null;
  10921. }
  10922. function getOffsetParent(element) {
  10923. const window2 = getWindow(element);
  10924. let offsetParent = getTrueOffsetParent(element);
  10925. while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") {
  10926. offsetParent = getTrueOffsetParent(offsetParent);
  10927. }
  10928. if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
  10929. return window2;
  10930. }
  10931. return offsetParent || getContainingBlock(element) || window2;
  10932. }
  10933. function getDimensions(element) {
  10934. if (isHTMLElement(element)) {
  10935. return {
  10936. width: element.offsetWidth,
  10937. height: element.offsetHeight
  10938. };
  10939. }
  10940. const rect = getBoundingClientRect(element);
  10941. return {
  10942. width: rect.width,
  10943. height: rect.height
  10944. };
  10945. }
  10946. function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
  10947. let {
  10948. rect,
  10949. offsetParent,
  10950. strategy
  10951. } = _ref;
  10952. const isOffsetParentAnElement = isHTMLElement(offsetParent);
  10953. const documentElement = getDocumentElement(offsetParent);
  10954. if (offsetParent === documentElement) {
  10955. return rect;
  10956. }
  10957. let scroll = {
  10958. scrollLeft: 0,
  10959. scrollTop: 0
  10960. };
  10961. const offsets = {
  10962. x: 0,
  10963. y: 0
  10964. };
  10965. if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
  10966. if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
  10967. scroll = getNodeScroll(offsetParent);
  10968. }
  10969. if (isHTMLElement(offsetParent)) {
  10970. const offsetRect = getBoundingClientRect(offsetParent, true);
  10971. offsets.x = offsetRect.x + offsetParent.clientLeft;
  10972. offsets.y = offsetRect.y + offsetParent.clientTop;
  10973. }
  10974. }
  10975. return {
  10976. ...rect,
  10977. x: rect.x - scroll.scrollLeft + offsets.x,
  10978. y: rect.y - scroll.scrollTop + offsets.y
  10979. };
  10980. }
  10981. function getViewportRect(element, strategy) {
  10982. const win = getWindow(element);
  10983. const html = getDocumentElement(element);
  10984. const visualViewport = win.visualViewport;
  10985. let width = html.clientWidth;
  10986. let height = html.clientHeight;
  10987. let x2 = 0;
  10988. let y = 0;
  10989. if (visualViewport) {
  10990. width = visualViewport.width;
  10991. height = visualViewport.height;
  10992. const layoutViewport = isLayoutViewport();
  10993. if (layoutViewport || !layoutViewport && strategy === "fixed") {
  10994. x2 = visualViewport.offsetLeft;
  10995. y = visualViewport.offsetTop;
  10996. }
  10997. }
  10998. return {
  10999. width,
  11000. height,
  11001. x: x2,
  11002. y
  11003. };
  11004. }
  11005. function getDocumentRect(element) {
  11006. var _element$ownerDocumen;
  11007. const html = getDocumentElement(element);
  11008. const scroll = getNodeScroll(element);
  11009. const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
  11010. const width = max3(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
  11011. const height = max3(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
  11012. let x2 = -scroll.scrollLeft + getWindowScrollBarX(element);
  11013. const y = -scroll.scrollTop;
  11014. if (getComputedStyle2(body || html).direction === "rtl") {
  11015. x2 += max3(html.clientWidth, body ? body.clientWidth : 0) - width;
  11016. }
  11017. return {
  11018. width,
  11019. height,
  11020. x: x2,
  11021. y
  11022. };
  11023. }
  11024. function getNearestOverflowAncestor(node) {
  11025. const parentNode = getParentNode(node);
  11026. if (isLastTraversableNode(parentNode)) {
  11027. return node.ownerDocument.body;
  11028. }
  11029. if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
  11030. return parentNode;
  11031. }
  11032. return getNearestOverflowAncestor(parentNode);
  11033. }
  11034. function getOverflowAncestors(node, list) {
  11035. var _node$ownerDocument;
  11036. if (list === void 0) {
  11037. list = [];
  11038. }
  11039. const scrollableAncestor = getNearestOverflowAncestor(node);
  11040. const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
  11041. const win = getWindow(scrollableAncestor);
  11042. const target2 = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
  11043. const updatedList = list.concat(target2);
  11044. return isBody ? updatedList : updatedList.concat(getOverflowAncestors(target2));
  11045. }
  11046. function contains(parent2, child) {
  11047. const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();
  11048. if (parent2.contains(child)) {
  11049. return true;
  11050. } else if (rootNode && isShadowRoot(rootNode)) {
  11051. let next = child;
  11052. do {
  11053. if (next && parent2 === next) {
  11054. return true;
  11055. }
  11056. next = next.parentNode || next.host;
  11057. } while (next);
  11058. }
  11059. return false;
  11060. }
  11061. function getNearestParentCapableOfEscapingClipping(element, clippingAncestors) {
  11062. let currentNode = element;
  11063. while (currentNode && !isLastTraversableNode(currentNode) && !clippingAncestors.includes(currentNode)) {
  11064. if (isElement3(currentNode) && ["absolute", "fixed"].includes(getComputedStyle2(currentNode).position)) {
  11065. break;
  11066. }
  11067. const parentNode = getParentNode(currentNode);
  11068. currentNode = isShadowRoot(parentNode) ? parentNode.host : parentNode;
  11069. }
  11070. return currentNode;
  11071. }
  11072. function getInnerBoundingClientRect(element, strategy) {
  11073. const clientRect = getBoundingClientRect(element, false, strategy === "fixed");
  11074. const top = clientRect.top + element.clientTop;
  11075. const left2 = clientRect.left + element.clientLeft;
  11076. return {
  11077. top,
  11078. left: left2,
  11079. x: left2,
  11080. y: top,
  11081. right: left2 + element.clientWidth,
  11082. bottom: top + element.clientHeight,
  11083. width: element.clientWidth,
  11084. height: element.clientHeight
  11085. };
  11086. }
  11087. function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
  11088. if (clippingParent === "viewport") {
  11089. return rectToClientRect(getViewportRect(element, strategy));
  11090. }
  11091. if (isElement3(clippingParent)) {
  11092. return getInnerBoundingClientRect(clippingParent, strategy);
  11093. }
  11094. return rectToClientRect(getDocumentRect(getDocumentElement(element)));
  11095. }
  11096. function getClippingAncestors(element) {
  11097. const clippingAncestors = getOverflowAncestors(element);
  11098. const nearestEscapableParent = getNearestParentCapableOfEscapingClipping(element, clippingAncestors);
  11099. let clipperElement = null;
  11100. if (nearestEscapableParent && isHTMLElement(nearestEscapableParent)) {
  11101. const offsetParent = getOffsetParent(nearestEscapableParent);
  11102. if (isOverflowElement(nearestEscapableParent)) {
  11103. clipperElement = nearestEscapableParent;
  11104. } else if (isHTMLElement(offsetParent)) {
  11105. clipperElement = offsetParent;
  11106. }
  11107. }
  11108. if (!isElement3(clipperElement)) {
  11109. return [];
  11110. }
  11111. return clippingAncestors.filter((clippingAncestors2) => clipperElement && isElement3(clippingAncestors2) && contains(clippingAncestors2, clipperElement) && getNodeName(clippingAncestors2) !== "body");
  11112. }
  11113. function getClippingRect(_ref) {
  11114. let {
  11115. element,
  11116. boundary,
  11117. rootBoundary,
  11118. strategy
  11119. } = _ref;
  11120. const mainClippingAncestors = boundary === "clippingAncestors" ? getClippingAncestors(element) : [].concat(boundary);
  11121. const clippingAncestors = [...mainClippingAncestors, rootBoundary];
  11122. const firstClippingAncestor = clippingAncestors[0];
  11123. const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
  11124. const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
  11125. accRect.top = max3(rect.top, accRect.top);
  11126. accRect.right = min3(rect.right, accRect.right);
  11127. accRect.bottom = min3(rect.bottom, accRect.bottom);
  11128. accRect.left = max3(rect.left, accRect.left);
  11129. return accRect;
  11130. }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
  11131. return {
  11132. width: clippingRect.right - clippingRect.left,
  11133. height: clippingRect.bottom - clippingRect.top,
  11134. x: clippingRect.left,
  11135. y: clippingRect.top
  11136. };
  11137. }
  11138. var platform = {
  11139. getClippingRect,
  11140. convertOffsetParentRelativeRectToViewportRelativeRect,
  11141. isElement: isElement3,
  11142. getDimensions,
  11143. getOffsetParent,
  11144. getDocumentElement,
  11145. getElementRects: (_ref) => {
  11146. let {
  11147. reference,
  11148. floating,
  11149. strategy
  11150. } = _ref;
  11151. return {
  11152. reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
  11153. floating: {
  11154. ...getDimensions(floating),
  11155. x: 0,
  11156. y: 0
  11157. }
  11158. };
  11159. },
  11160. getClientRects: (element) => Array.from(element.getClientRects()),
  11161. isRTL: (element) => getComputedStyle2(element).direction === "rtl"
  11162. };
  11163. var computePosition2 = (reference, floating, options) => computePosition(reference, floating, {
  11164. platform,
  11165. ...options
  11166. });
  11167. // node_modules/element-plus/es/hooks/use-floating/index.mjs
  11168. var useFloatingProps = buildProps({});
  11169. var unrefReference = (elRef) => {
  11170. if (!isClient)
  11171. return;
  11172. if (!elRef)
  11173. return elRef;
  11174. const unrefEl = unrefElement(elRef);
  11175. if (unrefEl)
  11176. return unrefEl;
  11177. return isRef(elRef) ? unrefEl : elRef;
  11178. };
  11179. var getPositionDataWithUnit = (record, key) => {
  11180. const value = record == null ? void 0 : record[key];
  11181. return isNil_default(value) ? "" : `${value}px`;
  11182. };
  11183. var useFloating = ({
  11184. middleware,
  11185. placement,
  11186. strategy
  11187. }) => {
  11188. const referenceRef = ref();
  11189. const contentRef = ref();
  11190. const x2 = ref();
  11191. const y = ref();
  11192. const middlewareData = ref({});
  11193. const states = {
  11194. x: x2,
  11195. y,
  11196. placement,
  11197. strategy,
  11198. middlewareData
  11199. };
  11200. const update2 = async () => {
  11201. if (!isClient)
  11202. return;
  11203. const referenceEl = unrefReference(referenceRef);
  11204. const contentEl = unrefElement(contentRef);
  11205. if (!referenceEl || !contentEl)
  11206. return;
  11207. const data = await computePosition2(referenceEl, contentEl, {
  11208. placement: unref(placement),
  11209. strategy: unref(strategy),
  11210. middleware: unref(middleware)
  11211. });
  11212. keysOf(states).forEach((key) => {
  11213. states[key].value = data[key];
  11214. });
  11215. };
  11216. onMounted(() => {
  11217. watchEffect(() => {
  11218. update2();
  11219. });
  11220. });
  11221. return {
  11222. ...states,
  11223. update: update2,
  11224. referenceRef,
  11225. contentRef
  11226. };
  11227. };
  11228. var arrowMiddleware = ({
  11229. arrowRef,
  11230. padding
  11231. }) => {
  11232. return {
  11233. name: "arrow",
  11234. options: {
  11235. element: arrowRef,
  11236. padding
  11237. },
  11238. fn(args) {
  11239. const arrowEl = unref(arrowRef);
  11240. if (!arrowEl)
  11241. return {};
  11242. return arrow({
  11243. element: arrowEl,
  11244. padding
  11245. }).fn(args);
  11246. }
  11247. };
  11248. };
  11249. // node_modules/element-plus/es/hooks/use-cursor/index.mjs
  11250. function useCursor(input) {
  11251. const selectionRef = ref();
  11252. function recordCursor() {
  11253. if (input.value == void 0)
  11254. return;
  11255. const { selectionStart, selectionEnd, value } = input.value;
  11256. if (selectionStart == null || selectionEnd == null)
  11257. return;
  11258. const beforeTxt = value.slice(0, Math.max(0, selectionStart));
  11259. const afterTxt = value.slice(Math.max(0, selectionEnd));
  11260. selectionRef.value = {
  11261. selectionStart,
  11262. selectionEnd,
  11263. value,
  11264. beforeTxt,
  11265. afterTxt
  11266. };
  11267. }
  11268. function setCursor() {
  11269. if (input.value == void 0 || selectionRef.value == void 0)
  11270. return;
  11271. const { value } = input.value;
  11272. const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
  11273. if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
  11274. return;
  11275. let startPos = value.length;
  11276. if (value.endsWith(afterTxt)) {
  11277. startPos = value.length - afterTxt.length;
  11278. } else if (value.startsWith(beforeTxt)) {
  11279. startPos = beforeTxt.length;
  11280. } else {
  11281. const beforeLastChar = beforeTxt[selectionStart - 1];
  11282. const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
  11283. if (newIndex !== -1) {
  11284. startPos = newIndex + 1;
  11285. }
  11286. }
  11287. input.value.setSelectionRange(startPos, startPos);
  11288. }
  11289. return [recordCursor, setCursor];
  11290. }
  11291. // node_modules/element-plus/es/hooks/use-ordered-children/index.mjs
  11292. var getOrderedChildren = (vm, childComponentName, children) => {
  11293. const nodes = flattedChildren(vm.subTree).filter((n) => {
  11294. var _a2;
  11295. return isVNode(n) && ((_a2 = n.type) == null ? void 0 : _a2.name) === childComponentName && !!n.component;
  11296. });
  11297. const uids = nodes.map((n) => n.component.uid);
  11298. return uids.map((uid2) => children[uid2]).filter((p2) => !!p2);
  11299. };
  11300. var useOrderedChildren = (vm, childComponentName) => {
  11301. const children = {};
  11302. const orderedChildren = shallowRef([]);
  11303. const addChild = (child) => {
  11304. children[child.uid] = child;
  11305. orderedChildren.value = getOrderedChildren(vm, childComponentName, children);
  11306. };
  11307. const removeChild = (uid2) => {
  11308. delete children[uid2];
  11309. orderedChildren.value = orderedChildren.value.filter((children2) => children2.uid !== uid2);
  11310. };
  11311. return {
  11312. children: orderedChildren,
  11313. addChild,
  11314. removeChild
  11315. };
  11316. };
  11317. // node_modules/element-plus/es/version.mjs
  11318. var version2 = "2.2.27";
  11319. // node_modules/element-plus/es/make-installer.mjs
  11320. var makeInstaller = (components = []) => {
  11321. const install2 = (app, options) => {
  11322. if (app[INSTALLED_KEY])
  11323. return;
  11324. app[INSTALLED_KEY] = true;
  11325. components.forEach((c2) => app.use(c2));
  11326. if (options)
  11327. provideGlobalConfig(options, app, true);
  11328. };
  11329. return {
  11330. version: version2,
  11331. install: install2
  11332. };
  11333. };
  11334. // node_modules/element-plus/es/components/affix/src/affix.mjs
  11335. var affixProps = buildProps({
  11336. zIndex: {
  11337. type: definePropType([Number, String]),
  11338. default: 100
  11339. },
  11340. target: {
  11341. type: String,
  11342. default: ""
  11343. },
  11344. offset: {
  11345. type: Number,
  11346. default: 0
  11347. },
  11348. position: {
  11349. type: String,
  11350. values: ["top", "bottom"],
  11351. default: "top"
  11352. }
  11353. });
  11354. var affixEmits = {
  11355. scroll: ({ scrollTop, fixed }) => isNumber2(scrollTop) && isBoolean2(fixed),
  11356. [CHANGE_EVENT]: (fixed) => isBoolean2(fixed)
  11357. };
  11358. // node_modules/element-plus/es/_virtual/plugin-vue_export-helper.mjs
  11359. var _export_sfc = (sfc, props) => {
  11360. const target2 = sfc.__vccOpts || sfc;
  11361. for (const [key, val] of props) {
  11362. target2[key] = val;
  11363. }
  11364. return target2;
  11365. };
  11366. // node_modules/element-plus/es/components/affix/src/affix2.mjs
  11367. var COMPONENT_NAME = "ElAffix";
  11368. var __default__ = defineComponent({
  11369. name: COMPONENT_NAME
  11370. });
  11371. var _sfc_main = defineComponent({
  11372. ...__default__,
  11373. props: affixProps,
  11374. emits: affixEmits,
  11375. setup(__props, { expose, emit }) {
  11376. const props = __props;
  11377. const ns2 = useNamespace("affix");
  11378. const target2 = shallowRef();
  11379. const root2 = shallowRef();
  11380. const scrollContainer = shallowRef();
  11381. const { height: windowHeight } = useWindowSize();
  11382. const {
  11383. height: rootHeight,
  11384. width: rootWidth,
  11385. top: rootTop,
  11386. bottom: rootBottom,
  11387. update: updateRoot
  11388. } = useElementBounding(root2, { windowScroll: false });
  11389. const targetRect = useElementBounding(target2);
  11390. const fixed = ref(false);
  11391. const scrollTop = ref(0);
  11392. const transform2 = ref(0);
  11393. const rootStyle = computed2(() => {
  11394. return {
  11395. height: fixed.value ? `${rootHeight.value}px` : "",
  11396. width: fixed.value ? `${rootWidth.value}px` : ""
  11397. };
  11398. });
  11399. const affixStyle = computed2(() => {
  11400. if (!fixed.value)
  11401. return {};
  11402. const offset2 = props.offset ? addUnit(props.offset) : 0;
  11403. return {
  11404. height: `${rootHeight.value}px`,
  11405. width: `${rootWidth.value}px`,
  11406. top: props.position === "top" ? offset2 : "",
  11407. bottom: props.position === "bottom" ? offset2 : "",
  11408. transform: transform2.value ? `translateY(${transform2.value}px)` : "",
  11409. zIndex: props.zIndex
  11410. };
  11411. });
  11412. const update2 = () => {
  11413. if (!scrollContainer.value)
  11414. return;
  11415. scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
  11416. if (props.position === "top") {
  11417. if (props.target) {
  11418. const difference2 = targetRect.bottom.value - props.offset - rootHeight.value;
  11419. fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0;
  11420. transform2.value = difference2 < 0 ? difference2 : 0;
  11421. } else {
  11422. fixed.value = props.offset > rootTop.value;
  11423. }
  11424. } else if (props.target) {
  11425. const difference2 = windowHeight.value - targetRect.top.value - props.offset - rootHeight.value;
  11426. fixed.value = windowHeight.value - props.offset < rootBottom.value && windowHeight.value > targetRect.top.value;
  11427. transform2.value = difference2 < 0 ? -difference2 : 0;
  11428. } else {
  11429. fixed.value = windowHeight.value - props.offset < rootBottom.value;
  11430. }
  11431. };
  11432. const handleScroll2 = () => {
  11433. updateRoot();
  11434. emit("scroll", {
  11435. scrollTop: scrollTop.value,
  11436. fixed: fixed.value
  11437. });
  11438. };
  11439. watch(fixed, (val) => emit("change", val));
  11440. onMounted(() => {
  11441. var _a2;
  11442. if (props.target) {
  11443. target2.value = (_a2 = document.querySelector(props.target)) != null ? _a2 : void 0;
  11444. if (!target2.value)
  11445. throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
  11446. } else {
  11447. target2.value = document.documentElement;
  11448. }
  11449. scrollContainer.value = getScrollContainer(root2.value, true);
  11450. updateRoot();
  11451. });
  11452. useEventListener(scrollContainer, "scroll", handleScroll2);
  11453. watchEffect(update2);
  11454. expose({
  11455. update: update2,
  11456. updateRoot
  11457. });
  11458. return (_ctx, _cache) => {
  11459. return openBlock(), createElementBlock("div", {
  11460. ref_key: "root",
  11461. ref: root2,
  11462. class: normalizeClass(unref(ns2).b()),
  11463. style: normalizeStyle(unref(rootStyle))
  11464. }, [
  11465. createBaseVNode("div", {
  11466. class: normalizeClass({ [unref(ns2).m("fixed")]: fixed.value }),
  11467. style: normalizeStyle(unref(affixStyle))
  11468. }, [
  11469. renderSlot(_ctx.$slots, "default")
  11470. ], 6)
  11471. ], 6);
  11472. };
  11473. }
  11474. });
  11475. var Affix = _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/affix/src/affix.vue"]]);
  11476. // node_modules/element-plus/es/components/affix/index.mjs
  11477. var ElAffix = withInstall(Affix);
  11478. // node_modules/element-plus/es/components/icon/src/icon.mjs
  11479. var iconProps = buildProps({
  11480. size: {
  11481. type: definePropType([Number, String])
  11482. },
  11483. color: {
  11484. type: String
  11485. }
  11486. });
  11487. // node_modules/element-plus/es/components/icon/src/icon2.mjs
  11488. var __default__2 = defineComponent({
  11489. name: "ElIcon",
  11490. inheritAttrs: false
  11491. });
  11492. var _sfc_main2 = defineComponent({
  11493. ...__default__2,
  11494. props: iconProps,
  11495. setup(__props) {
  11496. const props = __props;
  11497. const ns2 = useNamespace("icon");
  11498. const style = computed2(() => {
  11499. const { size: size3, color } = props;
  11500. if (!size3 && !color)
  11501. return {};
  11502. return {
  11503. fontSize: isUndefined2(size3) ? void 0 : addUnit(size3),
  11504. "--color": color
  11505. };
  11506. });
  11507. return (_ctx, _cache) => {
  11508. return openBlock(), createElementBlock("i", mergeProps({
  11509. class: unref(ns2).b(),
  11510. style: unref(style)
  11511. }, _ctx.$attrs), [
  11512. renderSlot(_ctx.$slots, "default")
  11513. ], 16);
  11514. };
  11515. }
  11516. });
  11517. var Icon = _export_sfc(_sfc_main2, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
  11518. // node_modules/element-plus/es/components/icon/index.mjs
  11519. var ElIcon = withInstall(Icon);
  11520. // node_modules/element-plus/es/components/alert/src/alert.mjs
  11521. var alertEffects = ["light", "dark"];
  11522. var alertProps = buildProps({
  11523. title: {
  11524. type: String,
  11525. default: ""
  11526. },
  11527. description: {
  11528. type: String,
  11529. default: ""
  11530. },
  11531. type: {
  11532. type: String,
  11533. values: keysOf(TypeComponentsMap),
  11534. default: "info"
  11535. },
  11536. closable: {
  11537. type: Boolean,
  11538. default: true
  11539. },
  11540. closeText: {
  11541. type: String,
  11542. default: ""
  11543. },
  11544. showIcon: Boolean,
  11545. center: Boolean,
  11546. effect: {
  11547. type: String,
  11548. values: alertEffects,
  11549. default: "light"
  11550. }
  11551. });
  11552. var alertEmits = {
  11553. close: (evt) => evt instanceof MouseEvent
  11554. };
  11555. // node_modules/element-plus/es/components/alert/src/alert2.mjs
  11556. var __default__3 = defineComponent({
  11557. name: "ElAlert"
  11558. });
  11559. var _sfc_main3 = defineComponent({
  11560. ...__default__3,
  11561. props: alertProps,
  11562. emits: alertEmits,
  11563. setup(__props, { emit }) {
  11564. const props = __props;
  11565. const { Close } = TypeComponents;
  11566. const slots = useSlots();
  11567. const ns2 = useNamespace("alert");
  11568. const visible = ref(true);
  11569. const iconComponent = computed2(() => TypeComponentsMap[props.type]);
  11570. const iconClass = computed2(() => [
  11571. ns2.e("icon"),
  11572. { [ns2.is("big")]: !!props.description || !!slots.default }
  11573. ]);
  11574. const isBoldTitle = computed2(() => {
  11575. return { [ns2.is("bold")]: props.description || slots.default };
  11576. });
  11577. const close2 = (evt) => {
  11578. visible.value = false;
  11579. emit("close", evt);
  11580. };
  11581. return (_ctx, _cache) => {
  11582. return openBlock(), createBlock(Transition, {
  11583. name: unref(ns2).b("fade"),
  11584. persisted: ""
  11585. }, {
  11586. default: withCtx(() => [
  11587. withDirectives(createBaseVNode("div", {
  11588. class: normalizeClass([unref(ns2).b(), unref(ns2).m(_ctx.type), unref(ns2).is("center", _ctx.center), unref(ns2).is(_ctx.effect)]),
  11589. role: "alert"
  11590. }, [
  11591. _ctx.showIcon && unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
  11592. key: 0,
  11593. class: normalizeClass(unref(iconClass))
  11594. }, {
  11595. default: withCtx(() => [
  11596. (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
  11597. ]),
  11598. _: 1
  11599. }, 8, ["class"])) : createCommentVNode("v-if", true),
  11600. createBaseVNode("div", {
  11601. class: normalizeClass(unref(ns2).e("content"))
  11602. }, [
  11603. _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
  11604. key: 0,
  11605. class: normalizeClass([unref(ns2).e("title"), unref(isBoldTitle)])
  11606. }, [
  11607. renderSlot(_ctx.$slots, "title", {}, () => [
  11608. createTextVNode(toDisplayString(_ctx.title), 1)
  11609. ])
  11610. ], 2)) : createCommentVNode("v-if", true),
  11611. _ctx.$slots.default || _ctx.description ? (openBlock(), createElementBlock("p", {
  11612. key: 1,
  11613. class: normalizeClass(unref(ns2).e("description"))
  11614. }, [
  11615. renderSlot(_ctx.$slots, "default", {}, () => [
  11616. createTextVNode(toDisplayString(_ctx.description), 1)
  11617. ])
  11618. ], 2)) : createCommentVNode("v-if", true),
  11619. _ctx.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
  11620. _ctx.closeText ? (openBlock(), createElementBlock("div", {
  11621. key: 0,
  11622. class: normalizeClass([unref(ns2).e("close-btn"), unref(ns2).is("customed")]),
  11623. onClick: close2
  11624. }, toDisplayString(_ctx.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
  11625. key: 1,
  11626. class: normalizeClass(unref(ns2).e("close-btn")),
  11627. onClick: close2
  11628. }, {
  11629. default: withCtx(() => [
  11630. createVNode(unref(Close))
  11631. ]),
  11632. _: 1
  11633. }, 8, ["class"]))
  11634. ], 64)) : createCommentVNode("v-if", true)
  11635. ], 2)
  11636. ], 2), [
  11637. [vShow, visible.value]
  11638. ])
  11639. ]),
  11640. _: 3
  11641. }, 8, ["name"]);
  11642. };
  11643. }
  11644. });
  11645. var Alert = _export_sfc(_sfc_main3, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);
  11646. // node_modules/element-plus/es/components/alert/index.mjs
  11647. var ElAlert = withInstall(Alert);
  11648. // node_modules/element-plus/es/components/input/src/utils.mjs
  11649. var hiddenTextarea = void 0;
  11650. var HIDDEN_STYLE = `
  11651. height:0 !important;
  11652. visibility:hidden !important;
  11653. overflow:hidden !important;
  11654. position:absolute !important;
  11655. z-index:-1000 !important;
  11656. top:0 !important;
  11657. right:0 !important;
  11658. `;
  11659. var CONTEXT_STYLE = [
  11660. "letter-spacing",
  11661. "line-height",
  11662. "padding-top",
  11663. "padding-bottom",
  11664. "font-family",
  11665. "font-weight",
  11666. "font-size",
  11667. "text-rendering",
  11668. "text-transform",
  11669. "width",
  11670. "text-indent",
  11671. "padding-left",
  11672. "padding-right",
  11673. "border-width",
  11674. "box-sizing"
  11675. ];
  11676. function calculateNodeStyling(targetElement) {
  11677. const style = window.getComputedStyle(targetElement);
  11678. const boxSizing = style.getPropertyValue("box-sizing");
  11679. const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
  11680. const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
  11681. const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
  11682. return { contextStyle, paddingSize, borderSize, boxSizing };
  11683. }
  11684. function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
  11685. var _a2;
  11686. if (!hiddenTextarea) {
  11687. hiddenTextarea = document.createElement("textarea");
  11688. document.body.appendChild(hiddenTextarea);
  11689. }
  11690. const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
  11691. hiddenTextarea.setAttribute("style", `${contextStyle};${HIDDEN_STYLE}`);
  11692. hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
  11693. let height = hiddenTextarea.scrollHeight;
  11694. const result2 = {};
  11695. if (boxSizing === "border-box") {
  11696. height = height + borderSize;
  11697. } else if (boxSizing === "content-box") {
  11698. height = height - paddingSize;
  11699. }
  11700. hiddenTextarea.value = "";
  11701. const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  11702. if (isNumber2(minRows)) {
  11703. let minHeight = singleRowHeight * minRows;
  11704. if (boxSizing === "border-box") {
  11705. minHeight = minHeight + paddingSize + borderSize;
  11706. }
  11707. height = Math.max(minHeight, height);
  11708. result2.minHeight = `${minHeight}px`;
  11709. }
  11710. if (isNumber2(maxRows)) {
  11711. let maxHeight = singleRowHeight * maxRows;
  11712. if (boxSizing === "border-box") {
  11713. maxHeight = maxHeight + paddingSize + borderSize;
  11714. }
  11715. height = Math.min(maxHeight, height);
  11716. }
  11717. result2.height = `${height}px`;
  11718. (_a2 = hiddenTextarea.parentNode) == null ? void 0 : _a2.removeChild(hiddenTextarea);
  11719. hiddenTextarea = void 0;
  11720. return result2;
  11721. }
  11722. // node_modules/element-plus/es/components/input/src/input.mjs
  11723. var inputProps = buildProps({
  11724. id: {
  11725. type: String,
  11726. default: void 0
  11727. },
  11728. size: useSizeProp,
  11729. disabled: Boolean,
  11730. modelValue: {
  11731. type: definePropType([
  11732. String,
  11733. Number,
  11734. Object
  11735. ]),
  11736. default: ""
  11737. },
  11738. type: {
  11739. type: String,
  11740. default: "text"
  11741. },
  11742. resize: {
  11743. type: String,
  11744. values: ["none", "both", "horizontal", "vertical"]
  11745. },
  11746. autosize: {
  11747. type: definePropType([Boolean, Object]),
  11748. default: false
  11749. },
  11750. autocomplete: {
  11751. type: String,
  11752. default: "off"
  11753. },
  11754. formatter: {
  11755. type: Function
  11756. },
  11757. parser: {
  11758. type: Function
  11759. },
  11760. placeholder: {
  11761. type: String
  11762. },
  11763. form: {
  11764. type: String
  11765. },
  11766. readonly: {
  11767. type: Boolean,
  11768. default: false
  11769. },
  11770. clearable: {
  11771. type: Boolean,
  11772. default: false
  11773. },
  11774. showPassword: {
  11775. type: Boolean,
  11776. default: false
  11777. },
  11778. showWordLimit: {
  11779. type: Boolean,
  11780. default: false
  11781. },
  11782. suffixIcon: {
  11783. type: iconPropType
  11784. },
  11785. prefixIcon: {
  11786. type: iconPropType
  11787. },
  11788. containerRole: {
  11789. type: String,
  11790. default: void 0
  11791. },
  11792. label: {
  11793. type: String,
  11794. default: void 0
  11795. },
  11796. tabindex: {
  11797. type: [String, Number],
  11798. default: 0
  11799. },
  11800. validateEvent: {
  11801. type: Boolean,
  11802. default: true
  11803. },
  11804. inputStyle: {
  11805. type: definePropType([Object, Array, String]),
  11806. default: () => mutable({})
  11807. }
  11808. });
  11809. var inputEmits = {
  11810. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  11811. input: (value) => isString(value),
  11812. change: (value) => isString(value),
  11813. focus: (evt) => evt instanceof FocusEvent,
  11814. blur: (evt) => evt instanceof FocusEvent,
  11815. clear: () => true,
  11816. mouseleave: (evt) => evt instanceof MouseEvent,
  11817. mouseenter: (evt) => evt instanceof MouseEvent,
  11818. keydown: (evt) => evt instanceof Event,
  11819. compositionstart: (evt) => evt instanceof CompositionEvent,
  11820. compositionupdate: (evt) => evt instanceof CompositionEvent,
  11821. compositionend: (evt) => evt instanceof CompositionEvent
  11822. };
  11823. // node_modules/element-plus/es/components/input/src/input2.mjs
  11824. var _hoisted_1 = ["role"];
  11825. var _hoisted_2 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"];
  11826. var _hoisted_3 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"];
  11827. var __default__4 = defineComponent({
  11828. name: "ElInput",
  11829. inheritAttrs: false
  11830. });
  11831. var _sfc_main4 = defineComponent({
  11832. ...__default__4,
  11833. props: inputProps,
  11834. emits: inputEmits,
  11835. setup(__props, { expose, emit }) {
  11836. const props = __props;
  11837. const rawAttrs = useAttrs();
  11838. const slots = useSlots();
  11839. const containerAttrs = computed2(() => {
  11840. const comboBoxAttrs = {};
  11841. if (props.containerRole === "combobox") {
  11842. comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
  11843. comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
  11844. comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
  11845. }
  11846. return comboBoxAttrs;
  11847. });
  11848. const containerKls = computed2(() => [
  11849. props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
  11850. nsInput.m(inputSize.value),
  11851. nsInput.is("disabled", inputDisabled.value),
  11852. nsInput.is("exceed", inputExceed.value),
  11853. {
  11854. [nsInput.b("group")]: slots.prepend || slots.append,
  11855. [nsInput.bm("group", "append")]: slots.append,
  11856. [nsInput.bm("group", "prepend")]: slots.prepend,
  11857. [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
  11858. [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
  11859. [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value
  11860. },
  11861. rawAttrs.class
  11862. ]);
  11863. const wrapperKls = computed2(() => [
  11864. nsInput.e("wrapper"),
  11865. nsInput.is("focus", focused.value)
  11866. ]);
  11867. const attrs = useAttrs2({
  11868. excludeKeys: computed2(() => {
  11869. return Object.keys(containerAttrs.value);
  11870. })
  11871. });
  11872. const { form, formItem } = useFormItem();
  11873. const { inputId } = useFormItemInputId(props, {
  11874. formItemContext: formItem
  11875. });
  11876. const inputSize = useSize();
  11877. const inputDisabled = useDisabled();
  11878. const nsInput = useNamespace("input");
  11879. const nsTextarea = useNamespace("textarea");
  11880. const input = shallowRef();
  11881. const textarea = shallowRef();
  11882. const focused = ref(false);
  11883. const hovering = ref(false);
  11884. const isComposing = ref(false);
  11885. const passwordVisible = ref(false);
  11886. const countStyle = ref();
  11887. const textareaCalcStyle = shallowRef(props.inputStyle);
  11888. const _ref = computed2(() => input.value || textarea.value);
  11889. const needStatusIcon = computed2(() => {
  11890. var _a2;
  11891. return (_a2 = form == null ? void 0 : form.statusIcon) != null ? _a2 : false;
  11892. });
  11893. const validateState = computed2(() => (formItem == null ? void 0 : formItem.validateState) || "");
  11894. const validateIcon = computed2(() => validateState.value && ValidateComponentsMap[validateState.value]);
  11895. const passwordIcon = computed2(() => passwordVisible.value ? view_default : hide_default);
  11896. const containerStyle = computed2(() => [
  11897. rawAttrs.style,
  11898. props.inputStyle
  11899. ]);
  11900. const textareaStyle = computed2(() => [
  11901. props.inputStyle,
  11902. textareaCalcStyle.value,
  11903. { resize: props.resize }
  11904. ]);
  11905. const nativeInputValue = computed2(() => isNil_default(props.modelValue) ? "" : String(props.modelValue));
  11906. const showClear = computed2(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (focused.value || hovering.value));
  11907. const showPwdVisible = computed2(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || focused.value));
  11908. const isWordLimitVisible = computed2(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
  11909. const textLength = computed2(() => Array.from(nativeInputValue.value).length);
  11910. const inputExceed = computed2(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
  11911. const suffixVisible = computed2(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
  11912. const [recordCursor, setCursor] = useCursor(input);
  11913. useResizeObserver(textarea, (entries) => {
  11914. if (!isWordLimitVisible.value || props.resize !== "both")
  11915. return;
  11916. const entry = entries[0];
  11917. const { width } = entry.contentRect;
  11918. countStyle.value = {
  11919. right: `calc(100% - ${width + 15 + 6}px)`
  11920. };
  11921. });
  11922. const resizeTextarea = () => {
  11923. const { type: type4, autosize } = props;
  11924. if (!isClient || type4 !== "textarea")
  11925. return;
  11926. if (autosize) {
  11927. const minRows = isObject(autosize) ? autosize.minRows : void 0;
  11928. const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
  11929. textareaCalcStyle.value = {
  11930. ...calcTextareaHeight(textarea.value, minRows, maxRows)
  11931. };
  11932. } else {
  11933. textareaCalcStyle.value = {
  11934. minHeight: calcTextareaHeight(textarea.value).minHeight
  11935. };
  11936. }
  11937. };
  11938. const setNativeInputValue = () => {
  11939. const input2 = _ref.value;
  11940. if (!input2 || input2.value === nativeInputValue.value)
  11941. return;
  11942. input2.value = nativeInputValue.value;
  11943. };
  11944. const handleInput = async (event) => {
  11945. recordCursor();
  11946. let { value } = event.target;
  11947. if (props.formatter) {
  11948. value = props.parser ? props.parser(value) : value;
  11949. value = props.formatter(value);
  11950. }
  11951. if (isComposing.value)
  11952. return;
  11953. if (value === nativeInputValue.value) {
  11954. setNativeInputValue();
  11955. return;
  11956. }
  11957. emit(UPDATE_MODEL_EVENT, value);
  11958. emit("input", value);
  11959. await nextTick();
  11960. setNativeInputValue();
  11961. setCursor();
  11962. };
  11963. const handleChange = (event) => {
  11964. emit("change", event.target.value);
  11965. };
  11966. const handleCompositionStart = (event) => {
  11967. emit("compositionstart", event);
  11968. isComposing.value = true;
  11969. };
  11970. const handleCompositionUpdate = (event) => {
  11971. var _a2;
  11972. emit("compositionupdate", event);
  11973. const text = (_a2 = event.target) == null ? void 0 : _a2.value;
  11974. const lastCharacter = text[text.length - 1] || "";
  11975. isComposing.value = !isKorean(lastCharacter);
  11976. };
  11977. const handleCompositionEnd = (event) => {
  11978. emit("compositionend", event);
  11979. if (isComposing.value) {
  11980. isComposing.value = false;
  11981. handleInput(event);
  11982. }
  11983. };
  11984. const handlePasswordVisible = () => {
  11985. passwordVisible.value = !passwordVisible.value;
  11986. focus();
  11987. };
  11988. const focus = async () => {
  11989. var _a2;
  11990. await nextTick();
  11991. (_a2 = _ref.value) == null ? void 0 : _a2.focus();
  11992. };
  11993. const blur = () => {
  11994. var _a2;
  11995. return (_a2 = _ref.value) == null ? void 0 : _a2.blur();
  11996. };
  11997. const handleFocus = (event) => {
  11998. focused.value = true;
  11999. emit("focus", event);
  12000. };
  12001. const handleBlur = (event) => {
  12002. var _a2;
  12003. focused.value = false;
  12004. emit("blur", event);
  12005. if (props.validateEvent) {
  12006. (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur").catch((err) => debugWarn(err));
  12007. }
  12008. };
  12009. const handleMouseLeave = (evt) => {
  12010. hovering.value = false;
  12011. emit("mouseleave", evt);
  12012. };
  12013. const handleMouseEnter = (evt) => {
  12014. hovering.value = true;
  12015. emit("mouseenter", evt);
  12016. };
  12017. const handleKeydown = (evt) => {
  12018. emit("keydown", evt);
  12019. };
  12020. const select = () => {
  12021. var _a2;
  12022. (_a2 = _ref.value) == null ? void 0 : _a2.select();
  12023. };
  12024. const clear = () => {
  12025. emit(UPDATE_MODEL_EVENT, "");
  12026. emit("change", "");
  12027. emit("clear");
  12028. emit("input", "");
  12029. };
  12030. watch(() => props.modelValue, () => {
  12031. var _a2;
  12032. nextTick(() => resizeTextarea());
  12033. if (props.validateEvent) {
  12034. (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change").catch((err) => debugWarn(err));
  12035. }
  12036. });
  12037. watch(nativeInputValue, () => setNativeInputValue());
  12038. watch(() => props.type, async () => {
  12039. await nextTick();
  12040. setNativeInputValue();
  12041. resizeTextarea();
  12042. });
  12043. onMounted(() => {
  12044. if (!props.formatter && props.parser) {
  12045. debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
  12046. }
  12047. setNativeInputValue();
  12048. nextTick(resizeTextarea);
  12049. });
  12050. expose({
  12051. input,
  12052. textarea,
  12053. ref: _ref,
  12054. textareaStyle,
  12055. autosize: toRef(props, "autosize"),
  12056. focus,
  12057. blur,
  12058. select,
  12059. clear,
  12060. resizeTextarea
  12061. });
  12062. return (_ctx, _cache) => {
  12063. return withDirectives((openBlock(), createElementBlock("div", mergeProps(unref(containerAttrs), {
  12064. class: unref(containerKls),
  12065. style: unref(containerStyle),
  12066. role: _ctx.containerRole,
  12067. onMouseenter: handleMouseEnter,
  12068. onMouseleave: handleMouseLeave
  12069. }), [
  12070. createCommentVNode(" input "),
  12071. _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  12072. createCommentVNode(" prepend slot "),
  12073. _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
  12074. key: 0,
  12075. class: normalizeClass(unref(nsInput).be("group", "prepend"))
  12076. }, [
  12077. renderSlot(_ctx.$slots, "prepend")
  12078. ], 2)) : createCommentVNode("v-if", true),
  12079. createBaseVNode("div", {
  12080. class: normalizeClass(unref(wrapperKls))
  12081. }, [
  12082. createCommentVNode(" prefix slot "),
  12083. _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
  12084. key: 0,
  12085. class: normalizeClass(unref(nsInput).e("prefix"))
  12086. }, [
  12087. createBaseVNode("span", {
  12088. class: normalizeClass(unref(nsInput).e("prefix-inner")),
  12089. onClick: focus
  12090. }, [
  12091. renderSlot(_ctx.$slots, "prefix"),
  12092. _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  12093. key: 0,
  12094. class: normalizeClass(unref(nsInput).e("icon"))
  12095. }, {
  12096. default: withCtx(() => [
  12097. (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
  12098. ]),
  12099. _: 1
  12100. }, 8, ["class"])) : createCommentVNode("v-if", true)
  12101. ], 2)
  12102. ], 2)) : createCommentVNode("v-if", true),
  12103. createBaseVNode("input", mergeProps({
  12104. id: unref(inputId),
  12105. ref_key: "input",
  12106. ref: input,
  12107. class: unref(nsInput).e("inner")
  12108. }, unref(attrs), {
  12109. type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
  12110. disabled: unref(inputDisabled),
  12111. formatter: _ctx.formatter,
  12112. parser: _ctx.parser,
  12113. readonly: _ctx.readonly,
  12114. autocomplete: _ctx.autocomplete,
  12115. tabindex: _ctx.tabindex,
  12116. "aria-label": _ctx.label,
  12117. placeholder: _ctx.placeholder,
  12118. style: _ctx.inputStyle,
  12119. form: props.form,
  12120. onCompositionstart: handleCompositionStart,
  12121. onCompositionupdate: handleCompositionUpdate,
  12122. onCompositionend: handleCompositionEnd,
  12123. onInput: handleInput,
  12124. onFocus: handleFocus,
  12125. onBlur: handleBlur,
  12126. onChange: handleChange,
  12127. onKeydown: handleKeydown
  12128. }), null, 16, _hoisted_2),
  12129. createCommentVNode(" suffix slot "),
  12130. unref(suffixVisible) ? (openBlock(), createElementBlock("span", {
  12131. key: 1,
  12132. class: normalizeClass(unref(nsInput).e("suffix"))
  12133. }, [
  12134. createBaseVNode("span", {
  12135. class: normalizeClass(unref(nsInput).e("suffix-inner")),
  12136. onClick: focus
  12137. }, [
  12138. !unref(showClear) || !unref(showPwdVisible) || !unref(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  12139. renderSlot(_ctx.$slots, "suffix"),
  12140. _ctx.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  12141. key: 0,
  12142. class: normalizeClass(unref(nsInput).e("icon"))
  12143. }, {
  12144. default: withCtx(() => [
  12145. (openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))
  12146. ]),
  12147. _: 1
  12148. }, 8, ["class"])) : createCommentVNode("v-if", true)
  12149. ], 64)) : createCommentVNode("v-if", true),
  12150. unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
  12151. key: 1,
  12152. class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
  12153. onMousedown: withModifiers(unref(NOOP), ["prevent"]),
  12154. onClick: clear
  12155. }, {
  12156. default: withCtx(() => [
  12157. createVNode(unref(circle_close_default))
  12158. ]),
  12159. _: 1
  12160. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
  12161. unref(showPwdVisible) ? (openBlock(), createBlock(unref(ElIcon), {
  12162. key: 2,
  12163. class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
  12164. onClick: handlePasswordVisible
  12165. }, {
  12166. default: withCtx(() => [
  12167. (openBlock(), createBlock(resolveDynamicComponent(unref(passwordIcon))))
  12168. ]),
  12169. _: 1
  12170. }, 8, ["class"])) : createCommentVNode("v-if", true),
  12171. unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
  12172. key: 3,
  12173. class: normalizeClass(unref(nsInput).e("count"))
  12174. }, [
  12175. createBaseVNode("span", {
  12176. class: normalizeClass(unref(nsInput).e("count-inner"))
  12177. }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 3)
  12178. ], 2)) : createCommentVNode("v-if", true),
  12179. unref(validateState) && unref(validateIcon) && unref(needStatusIcon) ? (openBlock(), createBlock(unref(ElIcon), {
  12180. key: 4,
  12181. class: normalizeClass([
  12182. unref(nsInput).e("icon"),
  12183. unref(nsInput).e("validateIcon"),
  12184. unref(nsInput).is("loading", unref(validateState) === "validating")
  12185. ])
  12186. }, {
  12187. default: withCtx(() => [
  12188. (openBlock(), createBlock(resolveDynamicComponent(unref(validateIcon))))
  12189. ]),
  12190. _: 1
  12191. }, 8, ["class"])) : createCommentVNode("v-if", true)
  12192. ], 2)
  12193. ], 2)) : createCommentVNode("v-if", true)
  12194. ], 2),
  12195. createCommentVNode(" append slot "),
  12196. _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
  12197. key: 1,
  12198. class: normalizeClass(unref(nsInput).be("group", "append"))
  12199. }, [
  12200. renderSlot(_ctx.$slots, "append")
  12201. ], 2)) : createCommentVNode("v-if", true)
  12202. ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  12203. createCommentVNode(" textarea "),
  12204. createBaseVNode("textarea", mergeProps({
  12205. id: unref(inputId),
  12206. ref_key: "textarea",
  12207. ref: textarea,
  12208. class: unref(nsTextarea).e("inner")
  12209. }, unref(attrs), {
  12210. tabindex: _ctx.tabindex,
  12211. disabled: unref(inputDisabled),
  12212. readonly: _ctx.readonly,
  12213. autocomplete: _ctx.autocomplete,
  12214. style: unref(textareaStyle),
  12215. "aria-label": _ctx.label,
  12216. placeholder: _ctx.placeholder,
  12217. form: props.form,
  12218. onCompositionstart: handleCompositionStart,
  12219. onCompositionupdate: handleCompositionUpdate,
  12220. onCompositionend: handleCompositionEnd,
  12221. onInput: handleInput,
  12222. onFocus: handleFocus,
  12223. onBlur: handleBlur,
  12224. onChange: handleChange,
  12225. onKeydown: handleKeydown
  12226. }), null, 16, _hoisted_3),
  12227. unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
  12228. key: 0,
  12229. style: normalizeStyle(countStyle.value),
  12230. class: normalizeClass(unref(nsInput).e("count"))
  12231. }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 7)) : createCommentVNode("v-if", true)
  12232. ], 64))
  12233. ], 16, _hoisted_1)), [
  12234. [vShow, _ctx.type !== "hidden"]
  12235. ]);
  12236. };
  12237. }
  12238. });
  12239. var Input = _export_sfc(_sfc_main4, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);
  12240. // node_modules/element-plus/es/components/input/index.mjs
  12241. var ElInput = withInstall(Input);
  12242. // node_modules/element-plus/es/components/scrollbar/src/util.mjs
  12243. var GAP = 4;
  12244. var BAR_MAP = {
  12245. vertical: {
  12246. offset: "offsetHeight",
  12247. scroll: "scrollTop",
  12248. scrollSize: "scrollHeight",
  12249. size: "height",
  12250. key: "vertical",
  12251. axis: "Y",
  12252. client: "clientY",
  12253. direction: "top"
  12254. },
  12255. horizontal: {
  12256. offset: "offsetWidth",
  12257. scroll: "scrollLeft",
  12258. scrollSize: "scrollWidth",
  12259. size: "width",
  12260. key: "horizontal",
  12261. axis: "X",
  12262. client: "clientX",
  12263. direction: "left"
  12264. }
  12265. };
  12266. var renderThumbStyle = ({
  12267. move,
  12268. size: size3,
  12269. bar
  12270. }) => ({
  12271. [bar.size]: size3,
  12272. transform: `translate${bar.axis}(${move}%)`
  12273. });
  12274. // node_modules/element-plus/es/components/scrollbar/src/thumb.mjs
  12275. var thumbProps = buildProps({
  12276. vertical: Boolean,
  12277. size: String,
  12278. move: Number,
  12279. ratio: {
  12280. type: Number,
  12281. required: true
  12282. },
  12283. always: Boolean
  12284. });
  12285. // node_modules/element-plus/es/components/scrollbar/src/thumb2.mjs
  12286. var COMPONENT_NAME2 = "Thumb";
  12287. var _sfc_main5 = defineComponent({
  12288. __name: "thumb",
  12289. props: thumbProps,
  12290. setup(__props) {
  12291. const props = __props;
  12292. const scrollbar = inject(scrollbarContextKey);
  12293. const ns2 = useNamespace("scrollbar");
  12294. if (!scrollbar)
  12295. throwError(COMPONENT_NAME2, "can not inject scrollbar context");
  12296. const instance = ref();
  12297. const thumb = ref();
  12298. const thumbState = ref({});
  12299. const visible = ref(false);
  12300. let cursorDown = false;
  12301. let cursorLeave = false;
  12302. let originalOnSelectStart = isClient ? document.onselectstart : null;
  12303. const bar = computed2(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
  12304. const thumbStyle = computed2(() => renderThumbStyle({
  12305. size: props.size,
  12306. move: props.move,
  12307. bar: bar.value
  12308. }));
  12309. const offsetRatio = computed2(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]);
  12310. const clickThumbHandler = (e) => {
  12311. var _a2;
  12312. e.stopPropagation();
  12313. if (e.ctrlKey || [1, 2].includes(e.button))
  12314. return;
  12315. (_a2 = window.getSelection()) == null ? void 0 : _a2.removeAllRanges();
  12316. startDrag(e);
  12317. const el = e.currentTarget;
  12318. if (!el)
  12319. return;
  12320. thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
  12321. };
  12322. const clickTrackHandler = (e) => {
  12323. if (!thumb.value || !instance.value || !scrollbar.wrapElement)
  12324. return;
  12325. const offset2 = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);
  12326. const thumbHalf = thumb.value[bar.value.offset] / 2;
  12327. const thumbPositionPercentage = (offset2 - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset];
  12328. scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
  12329. };
  12330. const startDrag = (e) => {
  12331. e.stopImmediatePropagation();
  12332. cursorDown = true;
  12333. document.addEventListener("mousemove", mouseMoveDocumentHandler);
  12334. document.addEventListener("mouseup", mouseUpDocumentHandler);
  12335. originalOnSelectStart = document.onselectstart;
  12336. document.onselectstart = () => false;
  12337. };
  12338. const mouseMoveDocumentHandler = (e) => {
  12339. if (!instance.value || !thumb.value)
  12340. return;
  12341. if (cursorDown === false)
  12342. return;
  12343. const prevPage = thumbState.value[bar.value.axis];
  12344. if (!prevPage)
  12345. return;
  12346. const offset2 = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
  12347. const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;
  12348. const thumbPositionPercentage = (offset2 - thumbClickPosition) * 100 * offsetRatio.value / instance.value[bar.value.offset];
  12349. scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
  12350. };
  12351. const mouseUpDocumentHandler = () => {
  12352. cursorDown = false;
  12353. thumbState.value[bar.value.axis] = 0;
  12354. document.removeEventListener("mousemove", mouseMoveDocumentHandler);
  12355. document.removeEventListener("mouseup", mouseUpDocumentHandler);
  12356. restoreOnselectstart();
  12357. if (cursorLeave)
  12358. visible.value = false;
  12359. };
  12360. const mouseMoveScrollbarHandler = () => {
  12361. cursorLeave = false;
  12362. visible.value = !!props.size;
  12363. };
  12364. const mouseLeaveScrollbarHandler = () => {
  12365. cursorLeave = true;
  12366. visible.value = cursorDown;
  12367. };
  12368. onBeforeUnmount(() => {
  12369. restoreOnselectstart();
  12370. document.removeEventListener("mouseup", mouseUpDocumentHandler);
  12371. });
  12372. const restoreOnselectstart = () => {
  12373. if (document.onselectstart !== originalOnSelectStart)
  12374. document.onselectstart = originalOnSelectStart;
  12375. };
  12376. useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
  12377. useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
  12378. return (_ctx, _cache) => {
  12379. return openBlock(), createBlock(Transition, {
  12380. name: unref(ns2).b("fade"),
  12381. persisted: ""
  12382. }, {
  12383. default: withCtx(() => [
  12384. withDirectives(createBaseVNode("div", {
  12385. ref_key: "instance",
  12386. ref: instance,
  12387. class: normalizeClass([unref(ns2).e("bar"), unref(ns2).is(unref(bar).key)]),
  12388. onMousedown: clickTrackHandler
  12389. }, [
  12390. createBaseVNode("div", {
  12391. ref_key: "thumb",
  12392. ref: thumb,
  12393. class: normalizeClass(unref(ns2).e("thumb")),
  12394. style: normalizeStyle(unref(thumbStyle)),
  12395. onMousedown: clickThumbHandler
  12396. }, null, 38)
  12397. ], 34), [
  12398. [vShow, _ctx.always || visible.value]
  12399. ])
  12400. ]),
  12401. _: 1
  12402. }, 8, ["name"]);
  12403. };
  12404. }
  12405. });
  12406. var Thumb = _export_sfc(_sfc_main5, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);
  12407. // node_modules/element-plus/es/components/scrollbar/src/bar.mjs
  12408. var barProps = buildProps({
  12409. always: {
  12410. type: Boolean,
  12411. default: true
  12412. },
  12413. width: String,
  12414. height: String,
  12415. ratioX: {
  12416. type: Number,
  12417. default: 1
  12418. },
  12419. ratioY: {
  12420. type: Number,
  12421. default: 1
  12422. }
  12423. });
  12424. // node_modules/element-plus/es/components/scrollbar/src/bar2.mjs
  12425. var _sfc_main6 = defineComponent({
  12426. __name: "bar",
  12427. props: barProps,
  12428. setup(__props, { expose }) {
  12429. const props = __props;
  12430. const moveX = ref(0);
  12431. const moveY = ref(0);
  12432. const handleScroll2 = (wrap2) => {
  12433. if (wrap2) {
  12434. const offsetHeight = wrap2.offsetHeight - GAP;
  12435. const offsetWidth = wrap2.offsetWidth - GAP;
  12436. moveY.value = wrap2.scrollTop * 100 / offsetHeight * props.ratioY;
  12437. moveX.value = wrap2.scrollLeft * 100 / offsetWidth * props.ratioX;
  12438. }
  12439. };
  12440. expose({
  12441. handleScroll: handleScroll2
  12442. });
  12443. return (_ctx, _cache) => {
  12444. return openBlock(), createElementBlock(Fragment, null, [
  12445. createVNode(Thumb, {
  12446. move: moveX.value,
  12447. ratio: _ctx.ratioX,
  12448. size: _ctx.width,
  12449. always: _ctx.always
  12450. }, null, 8, ["move", "ratio", "size", "always"]),
  12451. createVNode(Thumb, {
  12452. move: moveY.value,
  12453. ratio: _ctx.ratioY,
  12454. size: _ctx.height,
  12455. vertical: "",
  12456. always: _ctx.always
  12457. }, null, 8, ["move", "ratio", "size", "always"])
  12458. ], 64);
  12459. };
  12460. }
  12461. });
  12462. var Bar = _export_sfc(_sfc_main6, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);
  12463. // node_modules/element-plus/es/components/scrollbar/src/scrollbar.mjs
  12464. var scrollbarProps = buildProps({
  12465. height: {
  12466. type: [String, Number],
  12467. default: ""
  12468. },
  12469. maxHeight: {
  12470. type: [String, Number],
  12471. default: ""
  12472. },
  12473. native: {
  12474. type: Boolean,
  12475. default: false
  12476. },
  12477. wrapStyle: {
  12478. type: definePropType([String, Object, Array]),
  12479. default: ""
  12480. },
  12481. wrapClass: {
  12482. type: [String, Array],
  12483. default: ""
  12484. },
  12485. viewClass: {
  12486. type: [String, Array],
  12487. default: ""
  12488. },
  12489. viewStyle: {
  12490. type: [String, Array, Object],
  12491. default: ""
  12492. },
  12493. noresize: Boolean,
  12494. tag: {
  12495. type: String,
  12496. default: "div"
  12497. },
  12498. always: Boolean,
  12499. minSize: {
  12500. type: Number,
  12501. default: 20
  12502. }
  12503. });
  12504. var scrollbarEmits = {
  12505. scroll: ({
  12506. scrollTop,
  12507. scrollLeft
  12508. }) => [scrollTop, scrollLeft].every(isNumber2)
  12509. };
  12510. // node_modules/element-plus/es/components/scrollbar/src/scrollbar2.mjs
  12511. var COMPONENT_NAME3 = "ElScrollbar";
  12512. var __default__5 = defineComponent({
  12513. name: COMPONENT_NAME3
  12514. });
  12515. var _sfc_main7 = defineComponent({
  12516. ...__default__5,
  12517. props: scrollbarProps,
  12518. emits: scrollbarEmits,
  12519. setup(__props, { expose, emit }) {
  12520. const props = __props;
  12521. const ns2 = useNamespace("scrollbar");
  12522. let stopResizeObserver = void 0;
  12523. let stopResizeListener = void 0;
  12524. const scrollbarRef = ref();
  12525. const wrapRef = ref();
  12526. const resizeRef = ref();
  12527. const sizeWidth = ref("0");
  12528. const sizeHeight = ref("0");
  12529. const barRef = ref();
  12530. const ratioY = ref(1);
  12531. const ratioX = ref(1);
  12532. const style = computed2(() => {
  12533. const style2 = {};
  12534. if (props.height)
  12535. style2.height = addUnit(props.height);
  12536. if (props.maxHeight)
  12537. style2.maxHeight = addUnit(props.maxHeight);
  12538. return [props.wrapStyle, style2];
  12539. });
  12540. const wrapKls = computed2(() => {
  12541. return [
  12542. props.wrapClass,
  12543. ns2.e("wrap"),
  12544. { [ns2.em("wrap", "hidden-default")]: !props.native }
  12545. ];
  12546. });
  12547. const resizeKls = computed2(() => {
  12548. return [ns2.e("view"), props.viewClass];
  12549. });
  12550. const handleScroll2 = () => {
  12551. var _a2;
  12552. if (wrapRef.value) {
  12553. (_a2 = barRef.value) == null ? void 0 : _a2.handleScroll(wrapRef.value);
  12554. emit("scroll", {
  12555. scrollTop: wrapRef.value.scrollTop,
  12556. scrollLeft: wrapRef.value.scrollLeft
  12557. });
  12558. }
  12559. };
  12560. function scrollTo(arg1, arg2) {
  12561. if (isObject(arg1)) {
  12562. wrapRef.value.scrollTo(arg1);
  12563. } else if (isNumber2(arg1) && isNumber2(arg2)) {
  12564. wrapRef.value.scrollTo(arg1, arg2);
  12565. }
  12566. }
  12567. const setScrollTop = (value) => {
  12568. if (!isNumber2(value)) {
  12569. debugWarn(COMPONENT_NAME3, "value must be a number");
  12570. return;
  12571. }
  12572. wrapRef.value.scrollTop = value;
  12573. };
  12574. const setScrollLeft = (value) => {
  12575. if (!isNumber2(value)) {
  12576. debugWarn(COMPONENT_NAME3, "value must be a number");
  12577. return;
  12578. }
  12579. wrapRef.value.scrollLeft = value;
  12580. };
  12581. const update2 = () => {
  12582. if (!wrapRef.value)
  12583. return;
  12584. const offsetHeight = wrapRef.value.offsetHeight - GAP;
  12585. const offsetWidth = wrapRef.value.offsetWidth - GAP;
  12586. const originalHeight = offsetHeight ** 2 / wrapRef.value.scrollHeight;
  12587. const originalWidth = offsetWidth ** 2 / wrapRef.value.scrollWidth;
  12588. const height = Math.max(originalHeight, props.minSize);
  12589. const width = Math.max(originalWidth, props.minSize);
  12590. ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
  12591. ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
  12592. sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
  12593. sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
  12594. };
  12595. watch(() => props.noresize, (noresize) => {
  12596. if (noresize) {
  12597. stopResizeObserver == null ? void 0 : stopResizeObserver();
  12598. stopResizeListener == null ? void 0 : stopResizeListener();
  12599. } else {
  12600. ;
  12601. ({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update2));
  12602. stopResizeListener = useEventListener("resize", update2);
  12603. }
  12604. }, { immediate: true });
  12605. watch(() => [props.maxHeight, props.height], () => {
  12606. if (!props.native)
  12607. nextTick(() => {
  12608. var _a2;
  12609. update2();
  12610. if (wrapRef.value) {
  12611. (_a2 = barRef.value) == null ? void 0 : _a2.handleScroll(wrapRef.value);
  12612. }
  12613. });
  12614. });
  12615. provide(scrollbarContextKey, reactive({
  12616. scrollbarElement: scrollbarRef,
  12617. wrapElement: wrapRef
  12618. }));
  12619. onMounted(() => {
  12620. if (!props.native)
  12621. nextTick(() => {
  12622. update2();
  12623. });
  12624. });
  12625. onUpdated(() => update2());
  12626. expose({
  12627. wrapRef,
  12628. update: update2,
  12629. scrollTo,
  12630. setScrollTop,
  12631. setScrollLeft,
  12632. handleScroll: handleScroll2
  12633. });
  12634. return (_ctx, _cache) => {
  12635. return openBlock(), createElementBlock("div", {
  12636. ref_key: "scrollbarRef",
  12637. ref: scrollbarRef,
  12638. class: normalizeClass(unref(ns2).b())
  12639. }, [
  12640. createBaseVNode("div", {
  12641. ref_key: "wrapRef",
  12642. ref: wrapRef,
  12643. class: normalizeClass(unref(wrapKls)),
  12644. style: normalizeStyle(unref(style)),
  12645. onScroll: handleScroll2
  12646. }, [
  12647. (openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
  12648. ref_key: "resizeRef",
  12649. ref: resizeRef,
  12650. class: normalizeClass(unref(resizeKls)),
  12651. style: normalizeStyle(_ctx.viewStyle)
  12652. }, {
  12653. default: withCtx(() => [
  12654. renderSlot(_ctx.$slots, "default")
  12655. ]),
  12656. _: 3
  12657. }, 8, ["class", "style"]))
  12658. ], 38),
  12659. !_ctx.native ? (openBlock(), createBlock(Bar, {
  12660. key: 0,
  12661. ref_key: "barRef",
  12662. ref: barRef,
  12663. height: sizeHeight.value,
  12664. width: sizeWidth.value,
  12665. always: _ctx.always,
  12666. "ratio-x": ratioX.value,
  12667. "ratio-y": ratioY.value
  12668. }, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"])) : createCommentVNode("v-if", true)
  12669. ], 2);
  12670. };
  12671. }
  12672. });
  12673. var Scrollbar = _export_sfc(_sfc_main7, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);
  12674. // node_modules/element-plus/es/components/scrollbar/index.mjs
  12675. var ElScrollbar = withInstall(Scrollbar);
  12676. // node_modules/element-plus/es/components/popper/src/popper.mjs
  12677. var Effect = {
  12678. LIGHT: "light",
  12679. DARK: "dark"
  12680. };
  12681. var roleTypes = [
  12682. "dialog",
  12683. "grid",
  12684. "group",
  12685. "listbox",
  12686. "menu",
  12687. "navigation",
  12688. "tooltip",
  12689. "tree"
  12690. ];
  12691. var popperProps = buildProps({
  12692. role: {
  12693. type: String,
  12694. values: roleTypes,
  12695. default: "tooltip"
  12696. }
  12697. });
  12698. var usePopperProps = popperProps;
  12699. // node_modules/element-plus/es/components/popper/src/popper2.mjs
  12700. var __default__6 = defineComponent({
  12701. name: "ElPopperRoot",
  12702. inheritAttrs: false
  12703. });
  12704. var _sfc_main8 = defineComponent({
  12705. ...__default__6,
  12706. props: popperProps,
  12707. setup(__props, { expose }) {
  12708. const props = __props;
  12709. const triggerRef2 = ref();
  12710. const popperInstanceRef = ref();
  12711. const contentRef = ref();
  12712. const referenceRef = ref();
  12713. const role = computed2(() => props.role);
  12714. const popperProvides = {
  12715. triggerRef: triggerRef2,
  12716. popperInstanceRef,
  12717. contentRef,
  12718. referenceRef,
  12719. role
  12720. };
  12721. expose(popperProvides);
  12722. provide(POPPER_INJECTION_KEY, popperProvides);
  12723. return (_ctx, _cache) => {
  12724. return renderSlot(_ctx.$slots, "default");
  12725. };
  12726. }
  12727. });
  12728. var Popper = _export_sfc(_sfc_main8, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);
  12729. // node_modules/element-plus/es/components/popper/src/arrow.mjs
  12730. var popperArrowProps = buildProps({
  12731. arrowOffset: {
  12732. type: Number,
  12733. default: 5
  12734. }
  12735. });
  12736. var usePopperArrowProps = popperArrowProps;
  12737. // node_modules/element-plus/es/components/popper/src/arrow2.mjs
  12738. var __default__7 = defineComponent({
  12739. name: "ElPopperArrow",
  12740. inheritAttrs: false
  12741. });
  12742. var _sfc_main9 = defineComponent({
  12743. ...__default__7,
  12744. props: popperArrowProps,
  12745. setup(__props, { expose }) {
  12746. const props = __props;
  12747. const ns2 = useNamespace("popper");
  12748. const { arrowOffset, arrowRef } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
  12749. watch(() => props.arrowOffset, (val) => {
  12750. arrowOffset.value = val;
  12751. });
  12752. onBeforeUnmount(() => {
  12753. arrowRef.value = void 0;
  12754. });
  12755. expose({
  12756. arrowRef
  12757. });
  12758. return (_ctx, _cache) => {
  12759. return openBlock(), createElementBlock("span", {
  12760. ref_key: "arrowRef",
  12761. ref: arrowRef,
  12762. class: normalizeClass(unref(ns2).e("arrow")),
  12763. "data-popper-arrow": ""
  12764. }, null, 2);
  12765. };
  12766. }
  12767. });
  12768. var ElPopperArrow = _export_sfc(_sfc_main9, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);
  12769. // node_modules/element-plus/es/components/slot/src/only-child.mjs
  12770. var NAME = "ElOnlyChild";
  12771. var OnlyChild = defineComponent({
  12772. name: NAME,
  12773. setup(_2, {
  12774. slots,
  12775. attrs
  12776. }) {
  12777. var _a2;
  12778. const forwardRefInjection = inject(FORWARD_REF_INJECTION_KEY);
  12779. const forwardRefDirective = useForwardRefDirective((_a2 = forwardRefInjection == null ? void 0 : forwardRefInjection.setForwardRef) != null ? _a2 : NOOP);
  12780. return () => {
  12781. var _a22;
  12782. const defaultSlot = (_a22 = slots.default) == null ? void 0 : _a22.call(slots, attrs);
  12783. if (!defaultSlot)
  12784. return null;
  12785. if (defaultSlot.length > 1) {
  12786. debugWarn(NAME, "requires exact only one valid child.");
  12787. return null;
  12788. }
  12789. const firstLegitNode = findFirstLegitChild(defaultSlot);
  12790. if (!firstLegitNode) {
  12791. debugWarn(NAME, "no valid child node found");
  12792. return null;
  12793. }
  12794. return withDirectives(cloneVNode(firstLegitNode, attrs), [[forwardRefDirective]]);
  12795. };
  12796. }
  12797. });
  12798. function findFirstLegitChild(node) {
  12799. if (!node)
  12800. return null;
  12801. const children = node;
  12802. for (const child of children) {
  12803. if (isObject(child)) {
  12804. switch (child.type) {
  12805. case Comment:
  12806. continue;
  12807. case Text:
  12808. case "svg":
  12809. return wrapTextContent(child);
  12810. case Fragment:
  12811. return findFirstLegitChild(child.children);
  12812. default:
  12813. return child;
  12814. }
  12815. }
  12816. return wrapTextContent(child);
  12817. }
  12818. return null;
  12819. }
  12820. function wrapTextContent(s2) {
  12821. const ns2 = useNamespace("only-child");
  12822. return createVNode("span", {
  12823. "class": ns2.e("content")
  12824. }, [s2]);
  12825. }
  12826. // node_modules/element-plus/es/components/popper/src/trigger.mjs
  12827. var popperTriggerProps = buildProps({
  12828. virtualRef: {
  12829. type: definePropType(Object)
  12830. },
  12831. virtualTriggering: Boolean,
  12832. onMouseenter: {
  12833. type: definePropType(Function)
  12834. },
  12835. onMouseleave: {
  12836. type: definePropType(Function)
  12837. },
  12838. onClick: {
  12839. type: definePropType(Function)
  12840. },
  12841. onKeydown: {
  12842. type: definePropType(Function)
  12843. },
  12844. onFocus: {
  12845. type: definePropType(Function)
  12846. },
  12847. onBlur: {
  12848. type: definePropType(Function)
  12849. },
  12850. onContextmenu: {
  12851. type: definePropType(Function)
  12852. },
  12853. id: String,
  12854. open: Boolean
  12855. });
  12856. var usePopperTriggerProps = popperTriggerProps;
  12857. // node_modules/element-plus/es/components/popper/src/trigger2.mjs
  12858. var __default__8 = defineComponent({
  12859. name: "ElPopperTrigger",
  12860. inheritAttrs: false
  12861. });
  12862. var _sfc_main10 = defineComponent({
  12863. ...__default__8,
  12864. props: popperTriggerProps,
  12865. setup(__props, { expose }) {
  12866. const props = __props;
  12867. const { role, triggerRef: triggerRef2 } = inject(POPPER_INJECTION_KEY, void 0);
  12868. useForwardRef(triggerRef2);
  12869. const ariaControls = computed2(() => {
  12870. return ariaHaspopup.value ? props.id : void 0;
  12871. });
  12872. const ariaDescribedby = computed2(() => {
  12873. if (role && role.value === "tooltip") {
  12874. return props.open && props.id ? props.id : void 0;
  12875. }
  12876. return void 0;
  12877. });
  12878. const ariaHaspopup = computed2(() => {
  12879. if (role && role.value !== "tooltip") {
  12880. return role.value;
  12881. }
  12882. return void 0;
  12883. });
  12884. const ariaExpanded = computed2(() => {
  12885. return ariaHaspopup.value ? `${props.open}` : void 0;
  12886. });
  12887. let virtualTriggerAriaStopWatch = void 0;
  12888. onMounted(() => {
  12889. watch(() => props.virtualRef, (virtualEl) => {
  12890. if (virtualEl) {
  12891. triggerRef2.value = unrefElement(virtualEl);
  12892. }
  12893. }, {
  12894. immediate: true
  12895. });
  12896. watch(triggerRef2, (el, prevEl) => {
  12897. virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
  12898. virtualTriggerAriaStopWatch = void 0;
  12899. if (isElement2(el)) {
  12900. ;
  12901. [
  12902. "onMouseenter",
  12903. "onMouseleave",
  12904. "onClick",
  12905. "onKeydown",
  12906. "onFocus",
  12907. "onBlur",
  12908. "onContextmenu"
  12909. ].forEach((eventName) => {
  12910. var _a2;
  12911. const handler = props[eventName];
  12912. if (handler) {
  12913. ;
  12914. el.addEventListener(eventName.slice(2).toLowerCase(), handler);
  12915. (_a2 = prevEl == null ? void 0 : prevEl.removeEventListener) == null ? void 0 : _a2.call(prevEl, eventName.slice(2).toLowerCase(), handler);
  12916. }
  12917. });
  12918. virtualTriggerAriaStopWatch = watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => {
  12919. ;
  12920. [
  12921. "aria-controls",
  12922. "aria-describedby",
  12923. "aria-haspopup",
  12924. "aria-expanded"
  12925. ].forEach((key, idx) => {
  12926. isNil_default(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
  12927. });
  12928. }, { immediate: true });
  12929. }
  12930. if (isElement2(prevEl)) {
  12931. ;
  12932. [
  12933. "aria-controls",
  12934. "aria-describedby",
  12935. "aria-haspopup",
  12936. "aria-expanded"
  12937. ].forEach((key) => prevEl.removeAttribute(key));
  12938. }
  12939. }, {
  12940. immediate: true
  12941. });
  12942. });
  12943. onBeforeUnmount(() => {
  12944. virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
  12945. virtualTriggerAriaStopWatch = void 0;
  12946. });
  12947. expose({
  12948. triggerRef: triggerRef2
  12949. });
  12950. return (_ctx, _cache) => {
  12951. return !_ctx.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
  12952. "aria-controls": unref(ariaControls),
  12953. "aria-describedby": unref(ariaDescribedby),
  12954. "aria-expanded": unref(ariaExpanded),
  12955. "aria-haspopup": unref(ariaHaspopup)
  12956. }), {
  12957. default: withCtx(() => [
  12958. renderSlot(_ctx.$slots, "default")
  12959. ]),
  12960. _: 3
  12961. }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])) : createCommentVNode("v-if", true);
  12962. };
  12963. }
  12964. });
  12965. var ElPopperTrigger = _export_sfc(_sfc_main10, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);
  12966. // node_modules/element-plus/node_modules/@popperjs/core/dist/index.mjs
  12967. var E = "top";
  12968. var R = "bottom";
  12969. var W = "right";
  12970. var P = "left";
  12971. var me = "auto";
  12972. var G = [E, R, W, P];
  12973. var U = "start";
  12974. var J = "end";
  12975. var Xe = "clippingParents";
  12976. var je = "viewport";
  12977. var K = "popper";
  12978. var Ye = "reference";
  12979. var De = G.reduce(function(t, e) {
  12980. return t.concat([e + "-" + U, e + "-" + J]);
  12981. }, []);
  12982. var Ee = [].concat(G, [me]).reduce(function(t, e) {
  12983. return t.concat([e, e + "-" + U, e + "-" + J]);
  12984. }, []);
  12985. var Ge = "beforeRead";
  12986. var Je = "read";
  12987. var Ke = "afterRead";
  12988. var Qe = "beforeMain";
  12989. var Ze = "main";
  12990. var et = "afterMain";
  12991. var tt = "beforeWrite";
  12992. var nt = "write";
  12993. var rt = "afterWrite";
  12994. var ot = [Ge, Je, Ke, Qe, Ze, et, tt, nt, rt];
  12995. function C(t) {
  12996. return t ? (t.nodeName || "").toLowerCase() : null;
  12997. }
  12998. function H(t) {
  12999. if (t == null)
  13000. return window;
  13001. if (t.toString() !== "[object Window]") {
  13002. var e = t.ownerDocument;
  13003. return e && e.defaultView || window;
  13004. }
  13005. return t;
  13006. }
  13007. function Q(t) {
  13008. var e = H(t).Element;
  13009. return t instanceof e || t instanceof Element;
  13010. }
  13011. function B(t) {
  13012. var e = H(t).HTMLElement;
  13013. return t instanceof e || t instanceof HTMLElement;
  13014. }
  13015. function Pe(t) {
  13016. if (typeof ShadowRoot == "undefined")
  13017. return false;
  13018. var e = H(t).ShadowRoot;
  13019. return t instanceof e || t instanceof ShadowRoot;
  13020. }
  13021. function Mt(t) {
  13022. var e = t.state;
  13023. Object.keys(e.elements).forEach(function(n) {
  13024. var r = e.styles[n] || {}, o2 = e.attributes[n] || {}, i = e.elements[n];
  13025. !B(i) || !C(i) || (Object.assign(i.style, r), Object.keys(o2).forEach(function(a2) {
  13026. var s2 = o2[a2];
  13027. s2 === false ? i.removeAttribute(a2) : i.setAttribute(a2, s2 === true ? "" : s2);
  13028. }));
  13029. });
  13030. }
  13031. function Rt(t) {
  13032. var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  13033. return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
  13034. Object.keys(e.elements).forEach(function(r) {
  13035. var o2 = e.elements[r], i = e.attributes[r] || {}, a2 = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s2 = a2.reduce(function(f2, c2) {
  13036. return f2[c2] = "", f2;
  13037. }, {});
  13038. !B(o2) || !C(o2) || (Object.assign(o2.style, s2), Object.keys(i).forEach(function(f2) {
  13039. o2.removeAttribute(f2);
  13040. }));
  13041. });
  13042. };
  13043. }
  13044. var Ae = { name: "applyStyles", enabled: true, phase: "write", fn: Mt, effect: Rt, requires: ["computeStyles"] };
  13045. function q(t) {
  13046. return t.split("-")[0];
  13047. }
  13048. var X = Math.max;
  13049. var ve = Math.min;
  13050. var Z = Math.round;
  13051. function ee(t, e) {
  13052. e === void 0 && (e = false);
  13053. var n = t.getBoundingClientRect(), r = 1, o2 = 1;
  13054. if (B(t) && e) {
  13055. var i = t.offsetHeight, a2 = t.offsetWidth;
  13056. a2 > 0 && (r = Z(n.width) / a2 || 1), i > 0 && (o2 = Z(n.height) / i || 1);
  13057. }
  13058. return { width: n.width / r, height: n.height / o2, top: n.top / o2, right: n.right / r, bottom: n.bottom / o2, left: n.left / r, x: n.left / r, y: n.top / o2 };
  13059. }
  13060. function ke(t) {
  13061. var e = ee(t), n = t.offsetWidth, r = t.offsetHeight;
  13062. return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r };
  13063. }
  13064. function it(t, e) {
  13065. var n = e.getRootNode && e.getRootNode();
  13066. if (t.contains(e))
  13067. return true;
  13068. if (n && Pe(n)) {
  13069. var r = e;
  13070. do {
  13071. if (r && t.isSameNode(r))
  13072. return true;
  13073. r = r.parentNode || r.host;
  13074. } while (r);
  13075. }
  13076. return false;
  13077. }
  13078. function N(t) {
  13079. return H(t).getComputedStyle(t);
  13080. }
  13081. function Wt(t) {
  13082. return ["table", "td", "th"].indexOf(C(t)) >= 0;
  13083. }
  13084. function I(t) {
  13085. return ((Q(t) ? t.ownerDocument : t.document) || window.document).documentElement;
  13086. }
  13087. function ge(t) {
  13088. return C(t) === "html" ? t : t.assignedSlot || t.parentNode || (Pe(t) ? t.host : null) || I(t);
  13089. }
  13090. function at2(t) {
  13091. return !B(t) || N(t).position === "fixed" ? null : t.offsetParent;
  13092. }
  13093. function Bt(t) {
  13094. var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  13095. if (n && B(t)) {
  13096. var r = N(t);
  13097. if (r.position === "fixed")
  13098. return null;
  13099. }
  13100. var o2 = ge(t);
  13101. for (Pe(o2) && (o2 = o2.host); B(o2) && ["html", "body"].indexOf(C(o2)) < 0; ) {
  13102. var i = N(o2);
  13103. if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
  13104. return o2;
  13105. o2 = o2.parentNode;
  13106. }
  13107. return null;
  13108. }
  13109. function se(t) {
  13110. for (var e = H(t), n = at2(t); n && Wt(n) && N(n).position === "static"; )
  13111. n = at2(n);
  13112. return n && (C(n) === "html" || C(n) === "body" && N(n).position === "static") ? e : n || Bt(t) || e;
  13113. }
  13114. function Le(t) {
  13115. return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
  13116. }
  13117. function fe(t, e, n) {
  13118. return X(t, ve(e, n));
  13119. }
  13120. function St(t, e, n) {
  13121. var r = fe(t, e, n);
  13122. return r > n ? n : r;
  13123. }
  13124. function st() {
  13125. return { top: 0, right: 0, bottom: 0, left: 0 };
  13126. }
  13127. function ft(t) {
  13128. return Object.assign({}, st(), t);
  13129. }
  13130. function ct(t, e) {
  13131. return e.reduce(function(n, r) {
  13132. return n[r] = t, n;
  13133. }, {});
  13134. }
  13135. var Tt = function(t, e) {
  13136. return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, ft(typeof t != "number" ? t : ct(t, G));
  13137. };
  13138. function Ht(t) {
  13139. var e, n = t.state, r = t.name, o2 = t.options, i = n.elements.arrow, a2 = n.modifiersData.popperOffsets, s2 = q(n.placement), f2 = Le(s2), c2 = [P, W].indexOf(s2) >= 0, u2 = c2 ? "height" : "width";
  13140. if (!(!i || !a2)) {
  13141. var m2 = Tt(o2.padding, n), v2 = ke(i), l2 = f2 === "y" ? E : P, h3 = f2 === "y" ? R : W, p2 = n.rects.reference[u2] + n.rects.reference[f2] - a2[f2] - n.rects.popper[u2], g = a2[f2] - n.rects.reference[f2], x2 = se(i), y = x2 ? f2 === "y" ? x2.clientHeight || 0 : x2.clientWidth || 0 : 0, $ = p2 / 2 - g / 2, d2 = m2[l2], b2 = y - v2[u2] - m2[h3], w2 = y / 2 - v2[u2] / 2 + $, O2 = fe(d2, w2, b2), j = f2;
  13142. n.modifiersData[r] = (e = {}, e[j] = O2, e.centerOffset = O2 - w2, e);
  13143. }
  13144. }
  13145. function Ct(t) {
  13146. var e = t.state, n = t.options, r = n.element, o2 = r === void 0 ? "[data-popper-arrow]" : r;
  13147. o2 != null && (typeof o2 == "string" && (o2 = e.elements.popper.querySelector(o2), !o2) || !it(e.elements.popper, o2) || (e.elements.arrow = o2));
  13148. }
  13149. var pt = { name: "arrow", enabled: true, phase: "main", fn: Ht, effect: Ct, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
  13150. function te(t) {
  13151. return t.split("-")[1];
  13152. }
  13153. var qt = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
  13154. function Vt(t) {
  13155. var e = t.x, n = t.y, r = window, o2 = r.devicePixelRatio || 1;
  13156. return { x: Z(e * o2) / o2 || 0, y: Z(n * o2) / o2 || 0 };
  13157. }
  13158. function ut(t) {
  13159. var e, n = t.popper, r = t.popperRect, o2 = t.placement, i = t.variation, a2 = t.offsets, s2 = t.position, f2 = t.gpuAcceleration, c2 = t.adaptive, u2 = t.roundOffsets, m2 = t.isFixed, v2 = a2.x, l2 = v2 === void 0 ? 0 : v2, h3 = a2.y, p2 = h3 === void 0 ? 0 : h3, g = typeof u2 == "function" ? u2({ x: l2, y: p2 }) : { x: l2, y: p2 };
  13160. l2 = g.x, p2 = g.y;
  13161. var x2 = a2.hasOwnProperty("x"), y = a2.hasOwnProperty("y"), $ = P, d2 = E, b2 = window;
  13162. if (c2) {
  13163. var w2 = se(n), O2 = "clientHeight", j = "clientWidth";
  13164. if (w2 === H(n) && (w2 = I(n), N(w2).position !== "static" && s2 === "absolute" && (O2 = "scrollHeight", j = "scrollWidth")), w2 = w2, o2 === E || (o2 === P || o2 === W) && i === J) {
  13165. d2 = R;
  13166. var A2 = m2 && w2 === b2 && b2.visualViewport ? b2.visualViewport.height : w2[O2];
  13167. p2 -= A2 - r.height, p2 *= f2 ? 1 : -1;
  13168. }
  13169. if (o2 === P || (o2 === E || o2 === R) && i === J) {
  13170. $ = W;
  13171. var k = m2 && w2 === b2 && b2.visualViewport ? b2.visualViewport.width : w2[j];
  13172. l2 -= k - r.width, l2 *= f2 ? 1 : -1;
  13173. }
  13174. }
  13175. var D2 = Object.assign({ position: s2 }, c2 && qt), S2 = u2 === true ? Vt({ x: l2, y: p2 }) : { x: l2, y: p2 };
  13176. if (l2 = S2.x, p2 = S2.y, f2) {
  13177. var L;
  13178. return Object.assign({}, D2, (L = {}, L[d2] = y ? "0" : "", L[$] = x2 ? "0" : "", L.transform = (b2.devicePixelRatio || 1) <= 1 ? "translate(" + l2 + "px, " + p2 + "px)" : "translate3d(" + l2 + "px, " + p2 + "px, 0)", L));
  13179. }
  13180. return Object.assign({}, D2, (e = {}, e[d2] = y ? p2 + "px" : "", e[$] = x2 ? l2 + "px" : "", e.transform = "", e));
  13181. }
  13182. function Nt(t) {
  13183. var e = t.state, n = t.options, r = n.gpuAcceleration, o2 = r === void 0 ? true : r, i = n.adaptive, a2 = i === void 0 ? true : i, s2 = n.roundOffsets, f2 = s2 === void 0 ? true : s2, c2 = { placement: q(e.placement), variation: te(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: o2, isFixed: e.options.strategy === "fixed" };
  13184. e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, ut(Object.assign({}, c2, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: a2, roundOffsets: f2 })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, ut(Object.assign({}, c2, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: f2 })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
  13185. }
  13186. var Me = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: Nt, data: {} };
  13187. var ye = { passive: true };
  13188. function It(t) {
  13189. var e = t.state, n = t.instance, r = t.options, o2 = r.scroll, i = o2 === void 0 ? true : o2, a2 = r.resize, s2 = a2 === void 0 ? true : a2, f2 = H(e.elements.popper), c2 = [].concat(e.scrollParents.reference, e.scrollParents.popper);
  13190. return i && c2.forEach(function(u2) {
  13191. u2.addEventListener("scroll", n.update, ye);
  13192. }), s2 && f2.addEventListener("resize", n.update, ye), function() {
  13193. i && c2.forEach(function(u2) {
  13194. u2.removeEventListener("scroll", n.update, ye);
  13195. }), s2 && f2.removeEventListener("resize", n.update, ye);
  13196. };
  13197. }
  13198. var Re = { name: "eventListeners", enabled: true, phase: "write", fn: function() {
  13199. }, effect: It, data: {} };
  13200. var _t = { left: "right", right: "left", bottom: "top", top: "bottom" };
  13201. function be(t) {
  13202. return t.replace(/left|right|bottom|top/g, function(e) {
  13203. return _t[e];
  13204. });
  13205. }
  13206. var zt = { start: "end", end: "start" };
  13207. function lt2(t) {
  13208. return t.replace(/start|end/g, function(e) {
  13209. return zt[e];
  13210. });
  13211. }
  13212. function We(t) {
  13213. var e = H(t), n = e.pageXOffset, r = e.pageYOffset;
  13214. return { scrollLeft: n, scrollTop: r };
  13215. }
  13216. function Be(t) {
  13217. return ee(I(t)).left + We(t).scrollLeft;
  13218. }
  13219. function Ft(t) {
  13220. var e = H(t), n = I(t), r = e.visualViewport, o2 = n.clientWidth, i = n.clientHeight, a2 = 0, s2 = 0;
  13221. return r && (o2 = r.width, i = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a2 = r.offsetLeft, s2 = r.offsetTop)), { width: o2, height: i, x: a2 + Be(t), y: s2 };
  13222. }
  13223. function Ut(t) {
  13224. var e, n = I(t), r = We(t), o2 = (e = t.ownerDocument) == null ? void 0 : e.body, i = X(n.scrollWidth, n.clientWidth, o2 ? o2.scrollWidth : 0, o2 ? o2.clientWidth : 0), a2 = X(n.scrollHeight, n.clientHeight, o2 ? o2.scrollHeight : 0, o2 ? o2.clientHeight : 0), s2 = -r.scrollLeft + Be(t), f2 = -r.scrollTop;
  13225. return N(o2 || n).direction === "rtl" && (s2 += X(n.clientWidth, o2 ? o2.clientWidth : 0) - i), { width: i, height: a2, x: s2, y: f2 };
  13226. }
  13227. function Se(t) {
  13228. var e = N(t), n = e.overflow, r = e.overflowX, o2 = e.overflowY;
  13229. return /auto|scroll|overlay|hidden/.test(n + o2 + r);
  13230. }
  13231. function dt(t) {
  13232. return ["html", "body", "#document"].indexOf(C(t)) >= 0 ? t.ownerDocument.body : B(t) && Se(t) ? t : dt(ge(t));
  13233. }
  13234. function ce(t, e) {
  13235. var n;
  13236. e === void 0 && (e = []);
  13237. var r = dt(t), o2 = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = H(r), a2 = o2 ? [i].concat(i.visualViewport || [], Se(r) ? r : []) : r, s2 = e.concat(a2);
  13238. return o2 ? s2 : s2.concat(ce(ge(a2)));
  13239. }
  13240. function Te(t) {
  13241. return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
  13242. }
  13243. function Xt(t) {
  13244. var e = ee(t);
  13245. return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
  13246. }
  13247. function ht(t, e) {
  13248. return e === je ? Te(Ft(t)) : Q(e) ? Xt(e) : Te(Ut(I(t)));
  13249. }
  13250. function Yt(t) {
  13251. var e = ce(ge(t)), n = ["absolute", "fixed"].indexOf(N(t).position) >= 0, r = n && B(t) ? se(t) : t;
  13252. return Q(r) ? e.filter(function(o2) {
  13253. return Q(o2) && it(o2, r) && C(o2) !== "body";
  13254. }) : [];
  13255. }
  13256. function Gt(t, e, n) {
  13257. var r = e === "clippingParents" ? Yt(t) : [].concat(e), o2 = [].concat(r, [n]), i = o2[0], a2 = o2.reduce(function(s2, f2) {
  13258. var c2 = ht(t, f2);
  13259. return s2.top = X(c2.top, s2.top), s2.right = ve(c2.right, s2.right), s2.bottom = ve(c2.bottom, s2.bottom), s2.left = X(c2.left, s2.left), s2;
  13260. }, ht(t, i));
  13261. return a2.width = a2.right - a2.left, a2.height = a2.bottom - a2.top, a2.x = a2.left, a2.y = a2.top, a2;
  13262. }
  13263. function mt(t) {
  13264. var e = t.reference, n = t.element, r = t.placement, o2 = r ? q(r) : null, i = r ? te(r) : null, a2 = e.x + e.width / 2 - n.width / 2, s2 = e.y + e.height / 2 - n.height / 2, f2;
  13265. switch (o2) {
  13266. case E:
  13267. f2 = { x: a2, y: e.y - n.height };
  13268. break;
  13269. case R:
  13270. f2 = { x: a2, y: e.y + e.height };
  13271. break;
  13272. case W:
  13273. f2 = { x: e.x + e.width, y: s2 };
  13274. break;
  13275. case P:
  13276. f2 = { x: e.x - n.width, y: s2 };
  13277. break;
  13278. default:
  13279. f2 = { x: e.x, y: e.y };
  13280. }
  13281. var c2 = o2 ? Le(o2) : null;
  13282. if (c2 != null) {
  13283. var u2 = c2 === "y" ? "height" : "width";
  13284. switch (i) {
  13285. case U:
  13286. f2[c2] = f2[c2] - (e[u2] / 2 - n[u2] / 2);
  13287. break;
  13288. case J:
  13289. f2[c2] = f2[c2] + (e[u2] / 2 - n[u2] / 2);
  13290. break;
  13291. }
  13292. }
  13293. return f2;
  13294. }
  13295. function ne(t, e) {
  13296. e === void 0 && (e = {});
  13297. var n = e, r = n.placement, o2 = r === void 0 ? t.placement : r, i = n.boundary, a2 = i === void 0 ? Xe : i, s2 = n.rootBoundary, f2 = s2 === void 0 ? je : s2, c2 = n.elementContext, u2 = c2 === void 0 ? K : c2, m2 = n.altBoundary, v2 = m2 === void 0 ? false : m2, l2 = n.padding, h3 = l2 === void 0 ? 0 : l2, p2 = ft(typeof h3 != "number" ? h3 : ct(h3, G)), g = u2 === K ? Ye : K, x2 = t.rects.popper, y = t.elements[v2 ? g : u2], $ = Gt(Q(y) ? y : y.contextElement || I(t.elements.popper), a2, f2), d2 = ee(t.elements.reference), b2 = mt({ reference: d2, element: x2, strategy: "absolute", placement: o2 }), w2 = Te(Object.assign({}, x2, b2)), O2 = u2 === K ? w2 : d2, j = { top: $.top - O2.top + p2.top, bottom: O2.bottom - $.bottom + p2.bottom, left: $.left - O2.left + p2.left, right: O2.right - $.right + p2.right }, A2 = t.modifiersData.offset;
  13298. if (u2 === K && A2) {
  13299. var k = A2[o2];
  13300. Object.keys(j).forEach(function(D2) {
  13301. var S2 = [W, R].indexOf(D2) >= 0 ? 1 : -1, L = [E, R].indexOf(D2) >= 0 ? "y" : "x";
  13302. j[D2] += k[L] * S2;
  13303. });
  13304. }
  13305. return j;
  13306. }
  13307. function Jt(t, e) {
  13308. e === void 0 && (e = {});
  13309. var n = e, r = n.placement, o2 = n.boundary, i = n.rootBoundary, a2 = n.padding, s2 = n.flipVariations, f2 = n.allowedAutoPlacements, c2 = f2 === void 0 ? Ee : f2, u2 = te(r), m2 = u2 ? s2 ? De : De.filter(function(h3) {
  13310. return te(h3) === u2;
  13311. }) : G, v2 = m2.filter(function(h3) {
  13312. return c2.indexOf(h3) >= 0;
  13313. });
  13314. v2.length === 0 && (v2 = m2);
  13315. var l2 = v2.reduce(function(h3, p2) {
  13316. return h3[p2] = ne(t, { placement: p2, boundary: o2, rootBoundary: i, padding: a2 })[q(p2)], h3;
  13317. }, {});
  13318. return Object.keys(l2).sort(function(h3, p2) {
  13319. return l2[h3] - l2[p2];
  13320. });
  13321. }
  13322. function Kt(t) {
  13323. if (q(t) === me)
  13324. return [];
  13325. var e = be(t);
  13326. return [lt2(t), e, lt2(e)];
  13327. }
  13328. function Qt(t) {
  13329. var e = t.state, n = t.options, r = t.name;
  13330. if (!e.modifiersData[r]._skip) {
  13331. for (var o2 = n.mainAxis, i = o2 === void 0 ? true : o2, a2 = n.altAxis, s2 = a2 === void 0 ? true : a2, f2 = n.fallbackPlacements, c2 = n.padding, u2 = n.boundary, m2 = n.rootBoundary, v2 = n.altBoundary, l2 = n.flipVariations, h3 = l2 === void 0 ? true : l2, p2 = n.allowedAutoPlacements, g = e.options.placement, x2 = q(g), y = x2 === g, $ = f2 || (y || !h3 ? [be(g)] : Kt(g)), d2 = [g].concat($).reduce(function(z, V) {
  13332. return z.concat(q(V) === me ? Jt(e, { placement: V, boundary: u2, rootBoundary: m2, padding: c2, flipVariations: h3, allowedAutoPlacements: p2 }) : V);
  13333. }, []), b2 = e.rects.reference, w2 = e.rects.popper, O2 = /* @__PURE__ */ new Map(), j = true, A2 = d2[0], k = 0; k < d2.length; k++) {
  13334. var D2 = d2[k], S2 = q(D2), L = te(D2) === U, re = [E, R].indexOf(S2) >= 0, oe = re ? "width" : "height", M2 = ne(e, { placement: D2, boundary: u2, rootBoundary: m2, altBoundary: v2, padding: c2 }), T2 = re ? L ? W : P : L ? R : E;
  13335. b2[oe] > w2[oe] && (T2 = be(T2));
  13336. var pe = be(T2), _2 = [];
  13337. if (i && _2.push(M2[S2] <= 0), s2 && _2.push(M2[T2] <= 0, M2[pe] <= 0), _2.every(function(z) {
  13338. return z;
  13339. })) {
  13340. A2 = D2, j = false;
  13341. break;
  13342. }
  13343. O2.set(D2, _2);
  13344. }
  13345. if (j)
  13346. for (var ue = h3 ? 3 : 1, xe = function(z) {
  13347. var V = d2.find(function(de) {
  13348. var ae = O2.get(de);
  13349. if (ae)
  13350. return ae.slice(0, z).every(function(Y2) {
  13351. return Y2;
  13352. });
  13353. });
  13354. if (V)
  13355. return A2 = V, "break";
  13356. }, ie = ue; ie > 0; ie--) {
  13357. var le = xe(ie);
  13358. if (le === "break")
  13359. break;
  13360. }
  13361. e.placement !== A2 && (e.modifiersData[r]._skip = true, e.placement = A2, e.reset = true);
  13362. }
  13363. }
  13364. var vt = { name: "flip", enabled: true, phase: "main", fn: Qt, requiresIfExists: ["offset"], data: { _skip: false } };
  13365. function gt2(t, e, n) {
  13366. return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x };
  13367. }
  13368. function yt(t) {
  13369. return [E, W, R, P].some(function(e) {
  13370. return t[e] >= 0;
  13371. });
  13372. }
  13373. function Zt(t) {
  13374. var e = t.state, n = t.name, r = e.rects.reference, o2 = e.rects.popper, i = e.modifiersData.preventOverflow, a2 = ne(e, { elementContext: "reference" }), s2 = ne(e, { altBoundary: true }), f2 = gt2(a2, r), c2 = gt2(s2, o2, i), u2 = yt(f2), m2 = yt(c2);
  13375. e.modifiersData[n] = { referenceClippingOffsets: f2, popperEscapeOffsets: c2, isReferenceHidden: u2, hasPopperEscaped: m2 }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": u2, "data-popper-escaped": m2 });
  13376. }
  13377. var bt = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: Zt };
  13378. function en(t, e, n) {
  13379. var r = q(t), o2 = [P, E].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, a2 = i[0], s2 = i[1];
  13380. return a2 = a2 || 0, s2 = (s2 || 0) * o2, [P, W].indexOf(r) >= 0 ? { x: s2, y: a2 } : { x: a2, y: s2 };
  13381. }
  13382. function tn(t) {
  13383. var e = t.state, n = t.options, r = t.name, o2 = n.offset, i = o2 === void 0 ? [0, 0] : o2, a2 = Ee.reduce(function(u2, m2) {
  13384. return u2[m2] = en(m2, e.rects, i), u2;
  13385. }, {}), s2 = a2[e.placement], f2 = s2.x, c2 = s2.y;
  13386. e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += f2, e.modifiersData.popperOffsets.y += c2), e.modifiersData[r] = a2;
  13387. }
  13388. var wt = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: tn };
  13389. function nn(t) {
  13390. var e = t.state, n = t.name;
  13391. e.modifiersData[n] = mt({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
  13392. }
  13393. var He = { name: "popperOffsets", enabled: true, phase: "read", fn: nn, data: {} };
  13394. function rn(t) {
  13395. return t === "x" ? "y" : "x";
  13396. }
  13397. function on(t) {
  13398. var e = t.state, n = t.options, r = t.name, o2 = n.mainAxis, i = o2 === void 0 ? true : o2, a2 = n.altAxis, s2 = a2 === void 0 ? false : a2, f2 = n.boundary, c2 = n.rootBoundary, u2 = n.altBoundary, m2 = n.padding, v2 = n.tether, l2 = v2 === void 0 ? true : v2, h3 = n.tetherOffset, p2 = h3 === void 0 ? 0 : h3, g = ne(e, { boundary: f2, rootBoundary: c2, padding: m2, altBoundary: u2 }), x2 = q(e.placement), y = te(e.placement), $ = !y, d2 = Le(x2), b2 = rn(d2), w2 = e.modifiersData.popperOffsets, O2 = e.rects.reference, j = e.rects.popper, A2 = typeof p2 == "function" ? p2(Object.assign({}, e.rects, { placement: e.placement })) : p2, k = typeof A2 == "number" ? { mainAxis: A2, altAxis: A2 } : Object.assign({ mainAxis: 0, altAxis: 0 }, A2), D2 = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, S2 = { x: 0, y: 0 };
  13399. if (w2) {
  13400. if (i) {
  13401. var L, re = d2 === "y" ? E : P, oe = d2 === "y" ? R : W, M2 = d2 === "y" ? "height" : "width", T2 = w2[d2], pe = T2 + g[re], _2 = T2 - g[oe], ue = l2 ? -j[M2] / 2 : 0, xe = y === U ? O2[M2] : j[M2], ie = y === U ? -j[M2] : -O2[M2], le = e.elements.arrow, z = l2 && le ? ke(le) : { width: 0, height: 0 }, V = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : st(), de = V[re], ae = V[oe], Y2 = fe(0, O2[M2], z[M2]), jt = $ ? O2[M2] / 2 - ue - Y2 - de - k.mainAxis : xe - Y2 - de - k.mainAxis, Dt = $ ? -O2[M2] / 2 + ue + Y2 + ae + k.mainAxis : ie + Y2 + ae + k.mainAxis, Oe = e.elements.arrow && se(e.elements.arrow), Et = Oe ? d2 === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (L = D2 == null ? void 0 : D2[d2]) != null ? L : 0, Pt = T2 + jt - Ce - Et, At = T2 + Dt - Ce, qe = fe(l2 ? ve(pe, Pt) : pe, T2, l2 ? X(_2, At) : _2);
  13402. w2[d2] = qe, S2[d2] = qe - T2;
  13403. }
  13404. if (s2) {
  13405. var Ve, kt = d2 === "x" ? E : P, Lt = d2 === "x" ? R : W, F2 = w2[b2], he = b2 === "y" ? "height" : "width", Ne = F2 + g[kt], Ie = F2 - g[Lt], $e = [E, P].indexOf(x2) !== -1, _e = (Ve = D2 == null ? void 0 : D2[b2]) != null ? Ve : 0, ze = $e ? Ne : F2 - O2[he] - j[he] - _e + k.altAxis, Fe = $e ? F2 + O2[he] + j[he] - _e - k.altAxis : Ie, Ue = l2 && $e ? St(ze, F2, Fe) : fe(l2 ? ze : Ne, F2, l2 ? Fe : Ie);
  13406. w2[b2] = Ue, S2[b2] = Ue - F2;
  13407. }
  13408. e.modifiersData[r] = S2;
  13409. }
  13410. }
  13411. var xt = { name: "preventOverflow", enabled: true, phase: "main", fn: on, requiresIfExists: ["offset"] };
  13412. function an(t) {
  13413. return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
  13414. }
  13415. function sn(t) {
  13416. return t === H(t) || !B(t) ? We(t) : an(t);
  13417. }
  13418. function fn(t) {
  13419. var e = t.getBoundingClientRect(), n = Z(e.width) / t.offsetWidth || 1, r = Z(e.height) / t.offsetHeight || 1;
  13420. return n !== 1 || r !== 1;
  13421. }
  13422. function cn(t, e, n) {
  13423. n === void 0 && (n = false);
  13424. var r = B(e), o2 = B(e) && fn(e), i = I(e), a2 = ee(t, o2), s2 = { scrollLeft: 0, scrollTop: 0 }, f2 = { x: 0, y: 0 };
  13425. return (r || !r && !n) && ((C(e) !== "body" || Se(i)) && (s2 = sn(e)), B(e) ? (f2 = ee(e, true), f2.x += e.clientLeft, f2.y += e.clientTop) : i && (f2.x = Be(i))), { x: a2.left + s2.scrollLeft - f2.x, y: a2.top + s2.scrollTop - f2.y, width: a2.width, height: a2.height };
  13426. }
  13427. function pn(t) {
  13428. var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  13429. t.forEach(function(i) {
  13430. e.set(i.name, i);
  13431. });
  13432. function o2(i) {
  13433. n.add(i.name);
  13434. var a2 = [].concat(i.requires || [], i.requiresIfExists || []);
  13435. a2.forEach(function(s2) {
  13436. if (!n.has(s2)) {
  13437. var f2 = e.get(s2);
  13438. f2 && o2(f2);
  13439. }
  13440. }), r.push(i);
  13441. }
  13442. return t.forEach(function(i) {
  13443. n.has(i.name) || o2(i);
  13444. }), r;
  13445. }
  13446. function un(t) {
  13447. var e = pn(t);
  13448. return ot.reduce(function(n, r) {
  13449. return n.concat(e.filter(function(o2) {
  13450. return o2.phase === r;
  13451. }));
  13452. }, []);
  13453. }
  13454. function ln(t) {
  13455. var e;
  13456. return function() {
  13457. return e || (e = new Promise(function(n) {
  13458. Promise.resolve().then(function() {
  13459. e = void 0, n(t());
  13460. });
  13461. })), e;
  13462. };
  13463. }
  13464. function dn(t) {
  13465. var e = t.reduce(function(n, r) {
  13466. var o2 = n[r.name];
  13467. return n[r.name] = o2 ? Object.assign({}, o2, r, { options: Object.assign({}, o2.options, r.options), data: Object.assign({}, o2.data, r.data) }) : r, n;
  13468. }, {});
  13469. return Object.keys(e).map(function(n) {
  13470. return e[n];
  13471. });
  13472. }
  13473. var Ot = { placement: "bottom", modifiers: [], strategy: "absolute" };
  13474. function $t() {
  13475. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  13476. e[n] = arguments[n];
  13477. return !e.some(function(r) {
  13478. return !(r && typeof r.getBoundingClientRect == "function");
  13479. });
  13480. }
  13481. function we(t) {
  13482. t === void 0 && (t = {});
  13483. var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o2 = e.defaultOptions, i = o2 === void 0 ? Ot : o2;
  13484. return function(a2, s2, f2) {
  13485. f2 === void 0 && (f2 = i);
  13486. var c2 = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, Ot, i), modifiersData: {}, elements: { reference: a2, popper: s2 }, attributes: {}, styles: {} }, u2 = [], m2 = false, v2 = { state: c2, setOptions: function(p2) {
  13487. var g = typeof p2 == "function" ? p2(c2.options) : p2;
  13488. h3(), c2.options = Object.assign({}, i, c2.options, g), c2.scrollParents = { reference: Q(a2) ? ce(a2) : a2.contextElement ? ce(a2.contextElement) : [], popper: ce(s2) };
  13489. var x2 = un(dn([].concat(r, c2.options.modifiers)));
  13490. return c2.orderedModifiers = x2.filter(function(y) {
  13491. return y.enabled;
  13492. }), l2(), v2.update();
  13493. }, forceUpdate: function() {
  13494. if (!m2) {
  13495. var p2 = c2.elements, g = p2.reference, x2 = p2.popper;
  13496. if ($t(g, x2)) {
  13497. c2.rects = { reference: cn(g, se(x2), c2.options.strategy === "fixed"), popper: ke(x2) }, c2.reset = false, c2.placement = c2.options.placement, c2.orderedModifiers.forEach(function(j) {
  13498. return c2.modifiersData[j.name] = Object.assign({}, j.data);
  13499. });
  13500. for (var y = 0; y < c2.orderedModifiers.length; y++) {
  13501. if (c2.reset === true) {
  13502. c2.reset = false, y = -1;
  13503. continue;
  13504. }
  13505. var $ = c2.orderedModifiers[y], d2 = $.fn, b2 = $.options, w2 = b2 === void 0 ? {} : b2, O2 = $.name;
  13506. typeof d2 == "function" && (c2 = d2({ state: c2, options: w2, name: O2, instance: v2 }) || c2);
  13507. }
  13508. }
  13509. }
  13510. }, update: ln(function() {
  13511. return new Promise(function(p2) {
  13512. v2.forceUpdate(), p2(c2);
  13513. });
  13514. }), destroy: function() {
  13515. h3(), m2 = true;
  13516. } };
  13517. if (!$t(a2, s2))
  13518. return v2;
  13519. v2.setOptions(f2).then(function(p2) {
  13520. !m2 && f2.onFirstUpdate && f2.onFirstUpdate(p2);
  13521. });
  13522. function l2() {
  13523. c2.orderedModifiers.forEach(function(p2) {
  13524. var g = p2.name, x2 = p2.options, y = x2 === void 0 ? {} : x2, $ = p2.effect;
  13525. if (typeof $ == "function") {
  13526. var d2 = $({ state: c2, name: g, instance: v2, options: y }), b2 = function() {
  13527. };
  13528. u2.push(d2 || b2);
  13529. }
  13530. });
  13531. }
  13532. function h3() {
  13533. u2.forEach(function(p2) {
  13534. return p2();
  13535. }), u2 = [];
  13536. }
  13537. return v2;
  13538. };
  13539. }
  13540. var hn = we();
  13541. var mn = [Re, He, Me, Ae];
  13542. var vn = we({ defaultModifiers: mn });
  13543. var gn = [Re, He, Me, Ae, wt, vt, xt, pt, bt];
  13544. var yn = we({ defaultModifiers: gn });
  13545. // node_modules/element-plus/es/components/focus-trap/src/tokens.mjs
  13546. var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
  13547. var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
  13548. var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
  13549. var FOCUS_AFTER_TRAPPED_OPTS = {
  13550. cancelable: true,
  13551. bubbles: false
  13552. };
  13553. var FOCUSOUT_PREVENTED_OPTS = {
  13554. cancelable: true,
  13555. bubbles: false
  13556. };
  13557. var ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
  13558. var ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
  13559. var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
  13560. // node_modules/element-plus/es/components/focus-trap/src/utils.mjs
  13561. var focusReason = ref();
  13562. var lastUserFocusTimestamp = ref(0);
  13563. var lastAutomatedFocusTimestamp = ref(0);
  13564. var focusReasonUserCount = 0;
  13565. var obtainAllFocusableElements2 = (element) => {
  13566. const nodes = [];
  13567. const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {
  13568. acceptNode: (node) => {
  13569. const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
  13570. if (node.disabled || node.hidden || isHiddenInput)
  13571. return NodeFilter.FILTER_SKIP;
  13572. return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
  13573. }
  13574. });
  13575. while (walker.nextNode())
  13576. nodes.push(walker.currentNode);
  13577. return nodes;
  13578. };
  13579. var getVisibleElement = (elements, container) => {
  13580. for (const element of elements) {
  13581. if (!isHidden(element, container))
  13582. return element;
  13583. }
  13584. };
  13585. var isHidden = (element, container) => {
  13586. if (false)
  13587. return false;
  13588. if (getComputedStyle(element).visibility === "hidden")
  13589. return true;
  13590. while (element) {
  13591. if (container && element === container)
  13592. return false;
  13593. if (getComputedStyle(element).display === "none")
  13594. return true;
  13595. element = element.parentElement;
  13596. }
  13597. return false;
  13598. };
  13599. var getEdges = (container) => {
  13600. const focusable = obtainAllFocusableElements2(container);
  13601. const first = getVisibleElement(focusable, container);
  13602. const last2 = getVisibleElement(focusable.reverse(), container);
  13603. return [first, last2];
  13604. };
  13605. var isSelectable = (element) => {
  13606. return element instanceof HTMLInputElement && "select" in element;
  13607. };
  13608. var tryFocus = (element, shouldSelect) => {
  13609. if (element && element.focus) {
  13610. const prevFocusedElement = document.activeElement;
  13611. element.focus({ preventScroll: true });
  13612. lastAutomatedFocusTimestamp.value = window.performance.now();
  13613. if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
  13614. element.select();
  13615. }
  13616. }
  13617. };
  13618. function removeFromStack(list, item) {
  13619. const copy = [...list];
  13620. const idx = list.indexOf(item);
  13621. if (idx !== -1) {
  13622. copy.splice(idx, 1);
  13623. }
  13624. return copy;
  13625. }
  13626. var createFocusableStack = () => {
  13627. let stack = [];
  13628. const push = (layer) => {
  13629. const currentLayer = stack[0];
  13630. if (currentLayer && layer !== currentLayer) {
  13631. currentLayer.pause();
  13632. }
  13633. stack = removeFromStack(stack, layer);
  13634. stack.unshift(layer);
  13635. };
  13636. const remove2 = (layer) => {
  13637. var _a2, _b;
  13638. stack = removeFromStack(stack, layer);
  13639. (_b = (_a2 = stack[0]) == null ? void 0 : _a2.resume) == null ? void 0 : _b.call(_a2);
  13640. };
  13641. return {
  13642. push,
  13643. remove: remove2
  13644. };
  13645. };
  13646. var focusFirstDescendant = (elements, shouldSelect = false) => {
  13647. const prevFocusedElement = document.activeElement;
  13648. for (const element of elements) {
  13649. tryFocus(element, shouldSelect);
  13650. if (document.activeElement !== prevFocusedElement)
  13651. return;
  13652. }
  13653. };
  13654. var focusableStack = createFocusableStack();
  13655. var isFocusCausedByUserEvent = () => {
  13656. return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
  13657. };
  13658. var notifyFocusReasonPointer = () => {
  13659. focusReason.value = "pointer";
  13660. lastUserFocusTimestamp.value = window.performance.now();
  13661. };
  13662. var notifyFocusReasonKeydown = () => {
  13663. focusReason.value = "keyboard";
  13664. lastUserFocusTimestamp.value = window.performance.now();
  13665. };
  13666. var useFocusReason = () => {
  13667. onMounted(() => {
  13668. if (focusReasonUserCount === 0) {
  13669. document.addEventListener("mousedown", notifyFocusReasonPointer);
  13670. document.addEventListener("touchstart", notifyFocusReasonPointer);
  13671. document.addEventListener("keydown", notifyFocusReasonKeydown);
  13672. }
  13673. focusReasonUserCount++;
  13674. });
  13675. onBeforeUnmount(() => {
  13676. focusReasonUserCount--;
  13677. if (focusReasonUserCount <= 0) {
  13678. document.removeEventListener("mousedown", notifyFocusReasonPointer);
  13679. document.removeEventListener("touchstart", notifyFocusReasonPointer);
  13680. document.removeEventListener("keydown", notifyFocusReasonKeydown);
  13681. }
  13682. });
  13683. return {
  13684. focusReason,
  13685. lastUserFocusTimestamp,
  13686. lastAutomatedFocusTimestamp
  13687. };
  13688. };
  13689. var createFocusOutPreventedEvent = (detail) => {
  13690. return new CustomEvent(FOCUSOUT_PREVENTED, {
  13691. ...FOCUSOUT_PREVENTED_OPTS,
  13692. detail
  13693. });
  13694. };
  13695. // node_modules/element-plus/es/components/focus-trap/src/focus-trap.mjs
  13696. var _sfc_main11 = defineComponent({
  13697. name: "ElFocusTrap",
  13698. inheritAttrs: false,
  13699. props: {
  13700. loop: Boolean,
  13701. trapped: Boolean,
  13702. focusTrapEl: Object,
  13703. focusStartEl: {
  13704. type: [Object, String],
  13705. default: "first"
  13706. }
  13707. },
  13708. emits: [
  13709. ON_TRAP_FOCUS_EVT,
  13710. ON_RELEASE_FOCUS_EVT,
  13711. "focusin",
  13712. "focusout",
  13713. "focusout-prevented",
  13714. "release-requested"
  13715. ],
  13716. setup(props, { emit }) {
  13717. const forwardRef = ref();
  13718. let lastFocusBeforeTrapped;
  13719. let lastFocusAfterTrapped;
  13720. const { focusReason: focusReason2 } = useFocusReason();
  13721. useEscapeKeydown((event) => {
  13722. if (props.trapped && !focusLayer.paused) {
  13723. emit("release-requested", event);
  13724. }
  13725. });
  13726. const focusLayer = {
  13727. paused: false,
  13728. pause() {
  13729. this.paused = true;
  13730. },
  13731. resume() {
  13732. this.paused = false;
  13733. }
  13734. };
  13735. const onKeydown = (e) => {
  13736. if (!props.loop && !props.trapped)
  13737. return;
  13738. if (focusLayer.paused)
  13739. return;
  13740. const { key, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
  13741. const { loop } = props;
  13742. const isTabbing = key === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
  13743. const currentFocusingEl = document.activeElement;
  13744. if (isTabbing && currentFocusingEl) {
  13745. const container = currentTarget;
  13746. const [first, last2] = getEdges(container);
  13747. const isTabbable = first && last2;
  13748. if (!isTabbable) {
  13749. if (currentFocusingEl === container) {
  13750. const focusoutPreventedEvent = createFocusOutPreventedEvent({
  13751. focusReason: focusReason2.value
  13752. });
  13753. emit("focusout-prevented", focusoutPreventedEvent);
  13754. if (!focusoutPreventedEvent.defaultPrevented) {
  13755. e.preventDefault();
  13756. }
  13757. }
  13758. } else {
  13759. if (!shiftKey && currentFocusingEl === last2) {
  13760. const focusoutPreventedEvent = createFocusOutPreventedEvent({
  13761. focusReason: focusReason2.value
  13762. });
  13763. emit("focusout-prevented", focusoutPreventedEvent);
  13764. if (!focusoutPreventedEvent.defaultPrevented) {
  13765. e.preventDefault();
  13766. if (loop)
  13767. tryFocus(first, true);
  13768. }
  13769. } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
  13770. const focusoutPreventedEvent = createFocusOutPreventedEvent({
  13771. focusReason: focusReason2.value
  13772. });
  13773. emit("focusout-prevented", focusoutPreventedEvent);
  13774. if (!focusoutPreventedEvent.defaultPrevented) {
  13775. e.preventDefault();
  13776. if (loop)
  13777. tryFocus(last2, true);
  13778. }
  13779. }
  13780. }
  13781. }
  13782. };
  13783. provide(FOCUS_TRAP_INJECTION_KEY, {
  13784. focusTrapRef: forwardRef,
  13785. onKeydown
  13786. });
  13787. watch(() => props.focusTrapEl, (focusTrapEl) => {
  13788. if (focusTrapEl) {
  13789. forwardRef.value = focusTrapEl;
  13790. }
  13791. }, { immediate: true });
  13792. watch([forwardRef], ([forwardRef2], [oldForwardRef]) => {
  13793. if (forwardRef2) {
  13794. forwardRef2.addEventListener("keydown", onKeydown);
  13795. forwardRef2.addEventListener("focusin", onFocusIn);
  13796. forwardRef2.addEventListener("focusout", onFocusOut);
  13797. }
  13798. if (oldForwardRef) {
  13799. oldForwardRef.removeEventListener("keydown", onKeydown);
  13800. oldForwardRef.removeEventListener("focusin", onFocusIn);
  13801. oldForwardRef.removeEventListener("focusout", onFocusOut);
  13802. }
  13803. });
  13804. const trapOnFocus = (e) => {
  13805. emit(ON_TRAP_FOCUS_EVT, e);
  13806. };
  13807. const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
  13808. const onFocusIn = (e) => {
  13809. const trapContainer = unref(forwardRef);
  13810. if (!trapContainer)
  13811. return;
  13812. const target2 = e.target;
  13813. const relatedTarget = e.relatedTarget;
  13814. const isFocusedInTrap = target2 && trapContainer.contains(target2);
  13815. if (!props.trapped) {
  13816. const isPrevFocusedInTrap = relatedTarget && trapContainer.contains(relatedTarget);
  13817. if (!isPrevFocusedInTrap) {
  13818. lastFocusBeforeTrapped = relatedTarget;
  13819. }
  13820. }
  13821. if (isFocusedInTrap)
  13822. emit("focusin", e);
  13823. if (focusLayer.paused)
  13824. return;
  13825. if (props.trapped) {
  13826. if (isFocusedInTrap) {
  13827. lastFocusAfterTrapped = target2;
  13828. } else {
  13829. tryFocus(lastFocusAfterTrapped, true);
  13830. }
  13831. }
  13832. };
  13833. const onFocusOut = (e) => {
  13834. const trapContainer = unref(forwardRef);
  13835. if (focusLayer.paused || !trapContainer)
  13836. return;
  13837. if (props.trapped) {
  13838. const relatedTarget = e.relatedTarget;
  13839. if (!isNil_default(relatedTarget) && !trapContainer.contains(relatedTarget)) {
  13840. setTimeout(() => {
  13841. if (!focusLayer.paused && props.trapped) {
  13842. const focusoutPreventedEvent = createFocusOutPreventedEvent({
  13843. focusReason: focusReason2.value
  13844. });
  13845. emit("focusout-prevented", focusoutPreventedEvent);
  13846. if (!focusoutPreventedEvent.defaultPrevented) {
  13847. tryFocus(lastFocusAfterTrapped, true);
  13848. }
  13849. }
  13850. }, 0);
  13851. }
  13852. } else {
  13853. const target2 = e.target;
  13854. const isFocusedInTrap = target2 && trapContainer.contains(target2);
  13855. if (!isFocusedInTrap)
  13856. emit("focusout", e);
  13857. }
  13858. };
  13859. async function startTrap() {
  13860. await nextTick();
  13861. const trapContainer = unref(forwardRef);
  13862. if (trapContainer) {
  13863. focusableStack.push(focusLayer);
  13864. const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
  13865. lastFocusBeforeTrapped = prevFocusedElement;
  13866. const isPrevFocusContained = trapContainer.contains(prevFocusedElement);
  13867. if (!isPrevFocusContained) {
  13868. const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
  13869. trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
  13870. trapContainer.dispatchEvent(focusEvent);
  13871. if (!focusEvent.defaultPrevented) {
  13872. nextTick(() => {
  13873. let focusStartEl = props.focusStartEl;
  13874. if (!isString(focusStartEl)) {
  13875. tryFocus(focusStartEl);
  13876. if (document.activeElement !== focusStartEl) {
  13877. focusStartEl = "first";
  13878. }
  13879. }
  13880. if (focusStartEl === "first") {
  13881. focusFirstDescendant(obtainAllFocusableElements2(trapContainer), true);
  13882. }
  13883. if (document.activeElement === prevFocusedElement || focusStartEl === "container") {
  13884. tryFocus(trapContainer);
  13885. }
  13886. });
  13887. }
  13888. }
  13889. }
  13890. }
  13891. function stopTrap() {
  13892. const trapContainer = unref(forwardRef);
  13893. if (trapContainer) {
  13894. trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
  13895. const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
  13896. ...FOCUS_AFTER_TRAPPED_OPTS,
  13897. detail: {
  13898. focusReason: focusReason2.value
  13899. }
  13900. });
  13901. trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
  13902. trapContainer.dispatchEvent(releasedEvent);
  13903. if (!releasedEvent.defaultPrevented && (focusReason2.value == "keyboard" || !isFocusCausedByUserEvent())) {
  13904. tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body);
  13905. }
  13906. trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, trapOnFocus);
  13907. focusableStack.remove(focusLayer);
  13908. }
  13909. }
  13910. onMounted(() => {
  13911. if (props.trapped) {
  13912. startTrap();
  13913. }
  13914. watch(() => props.trapped, (trapped) => {
  13915. if (trapped) {
  13916. startTrap();
  13917. } else {
  13918. stopTrap();
  13919. }
  13920. });
  13921. });
  13922. onBeforeUnmount(() => {
  13923. if (props.trapped) {
  13924. stopTrap();
  13925. }
  13926. });
  13927. return {
  13928. onKeydown
  13929. };
  13930. }
  13931. });
  13932. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  13933. return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
  13934. }
  13935. var ElFocusTrap = _export_sfc(_sfc_main11, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
  13936. // node_modules/element-plus/es/components/popper/src/content.mjs
  13937. var POSITIONING_STRATEGIES = ["fixed", "absolute"];
  13938. var popperCoreConfigProps = buildProps({
  13939. boundariesPadding: {
  13940. type: Number,
  13941. default: 0
  13942. },
  13943. fallbackPlacements: {
  13944. type: definePropType(Array),
  13945. default: void 0
  13946. },
  13947. gpuAcceleration: {
  13948. type: Boolean,
  13949. default: true
  13950. },
  13951. offset: {
  13952. type: Number,
  13953. default: 12
  13954. },
  13955. placement: {
  13956. type: String,
  13957. values: Ee,
  13958. default: "bottom"
  13959. },
  13960. popperOptions: {
  13961. type: definePropType(Object),
  13962. default: () => ({})
  13963. },
  13964. strategy: {
  13965. type: String,
  13966. values: POSITIONING_STRATEGIES,
  13967. default: "absolute"
  13968. }
  13969. });
  13970. var popperContentProps = buildProps({
  13971. ...popperCoreConfigProps,
  13972. id: String,
  13973. style: {
  13974. type: definePropType([String, Array, Object])
  13975. },
  13976. className: {
  13977. type: definePropType([String, Array, Object])
  13978. },
  13979. effect: {
  13980. type: String,
  13981. default: "dark"
  13982. },
  13983. visible: Boolean,
  13984. enterable: {
  13985. type: Boolean,
  13986. default: true
  13987. },
  13988. pure: Boolean,
  13989. focusOnShow: {
  13990. type: Boolean,
  13991. default: false
  13992. },
  13993. trapping: {
  13994. type: Boolean,
  13995. default: false
  13996. },
  13997. popperClass: {
  13998. type: definePropType([String, Array, Object])
  13999. },
  14000. popperStyle: {
  14001. type: definePropType([String, Array, Object])
  14002. },
  14003. referenceEl: {
  14004. type: definePropType(Object)
  14005. },
  14006. triggerTargetEl: {
  14007. type: definePropType(Object)
  14008. },
  14009. stopPopperMouseEvent: {
  14010. type: Boolean,
  14011. default: true
  14012. },
  14013. ariaLabel: {
  14014. type: String,
  14015. default: void 0
  14016. },
  14017. virtualTriggering: Boolean,
  14018. zIndex: Number
  14019. });
  14020. var popperContentEmits = {
  14021. mouseenter: (evt) => evt instanceof MouseEvent,
  14022. mouseleave: (evt) => evt instanceof MouseEvent,
  14023. focus: () => true,
  14024. blur: () => true,
  14025. close: () => true
  14026. };
  14027. var usePopperCoreConfigProps = popperCoreConfigProps;
  14028. var usePopperContentProps = popperContentProps;
  14029. var usePopperContentEmits = popperContentEmits;
  14030. // node_modules/element-plus/es/components/popper/src/utils.mjs
  14031. var buildPopperOptions = (props, arrowProps) => {
  14032. const { placement, strategy, popperOptions: popperOptions2 } = props;
  14033. const options = {
  14034. placement,
  14035. strategy,
  14036. ...popperOptions2,
  14037. modifiers: genModifiers(props)
  14038. };
  14039. attachArrow(options, arrowProps);
  14040. deriveExtraModifiers(options, popperOptions2 == null ? void 0 : popperOptions2.modifiers);
  14041. return options;
  14042. };
  14043. var unwrapMeasurableEl = ($el) => {
  14044. if (!isClient)
  14045. return;
  14046. return unrefElement($el);
  14047. };
  14048. function genModifiers(options) {
  14049. const { offset: offset2, gpuAcceleration, fallbackPlacements } = options;
  14050. return [
  14051. {
  14052. name: "offset",
  14053. options: {
  14054. offset: [0, offset2 != null ? offset2 : 12]
  14055. }
  14056. },
  14057. {
  14058. name: "preventOverflow",
  14059. options: {
  14060. padding: {
  14061. top: 2,
  14062. bottom: 2,
  14063. left: 5,
  14064. right: 5
  14065. }
  14066. }
  14067. },
  14068. {
  14069. name: "flip",
  14070. options: {
  14071. padding: 5,
  14072. fallbackPlacements
  14073. }
  14074. },
  14075. {
  14076. name: "computeStyles",
  14077. options: {
  14078. gpuAcceleration
  14079. }
  14080. }
  14081. ];
  14082. }
  14083. function attachArrow(options, { arrowEl, arrowOffset }) {
  14084. options.modifiers.push({
  14085. name: "arrow",
  14086. options: {
  14087. element: arrowEl,
  14088. padding: arrowOffset != null ? arrowOffset : 5
  14089. }
  14090. });
  14091. }
  14092. function deriveExtraModifiers(options, modifiers) {
  14093. if (modifiers) {
  14094. options.modifiers = [...options.modifiers, ...modifiers != null ? modifiers : []];
  14095. }
  14096. }
  14097. // node_modules/element-plus/es/components/popper/src/content2.mjs
  14098. var __default__9 = defineComponent({
  14099. name: "ElPopperContent"
  14100. });
  14101. var _sfc_main12 = defineComponent({
  14102. ...__default__9,
  14103. props: popperContentProps,
  14104. emits: popperContentEmits,
  14105. setup(__props, { expose, emit }) {
  14106. const props = __props;
  14107. const { popperInstanceRef, contentRef, triggerRef: triggerRef2, role } = inject(POPPER_INJECTION_KEY, void 0);
  14108. const formItemContext = inject(formItemContextKey, void 0);
  14109. const { nextZIndex } = useZIndex();
  14110. const ns2 = useNamespace("popper");
  14111. const popperContentRef = ref();
  14112. const focusStartRef = ref("first");
  14113. const arrowRef = ref();
  14114. const arrowOffset = ref();
  14115. provide(POPPER_CONTENT_INJECTION_KEY, {
  14116. arrowRef,
  14117. arrowOffset
  14118. });
  14119. if (formItemContext && (formItemContext.addInputId || formItemContext.removeInputId)) {
  14120. provide(formItemContextKey, {
  14121. ...formItemContext,
  14122. addInputId: NOOP,
  14123. removeInputId: NOOP
  14124. });
  14125. }
  14126. const contentZIndex = ref(props.zIndex || nextZIndex());
  14127. const trapped = ref(false);
  14128. let triggerTargetAriaStopWatch = void 0;
  14129. const computedReference = computed2(() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef2));
  14130. const contentStyle = computed2(() => [{ zIndex: unref(contentZIndex) }, props.popperStyle]);
  14131. const contentClass = computed2(() => [
  14132. ns2.b(),
  14133. ns2.is("pure", props.pure),
  14134. ns2.is(props.effect),
  14135. props.popperClass
  14136. ]);
  14137. const ariaModal = computed2(() => {
  14138. return role && role.value === "dialog" ? "false" : void 0;
  14139. });
  14140. const createPopperInstance = ({
  14141. referenceEl,
  14142. popperContentEl,
  14143. arrowEl
  14144. }) => {
  14145. const options = buildPopperOptions(props, {
  14146. arrowEl,
  14147. arrowOffset: unref(arrowOffset)
  14148. });
  14149. return yn(referenceEl, popperContentEl, options);
  14150. };
  14151. const updatePopper = (shouldUpdateZIndex = true) => {
  14152. var _a2;
  14153. (_a2 = unref(popperInstanceRef)) == null ? void 0 : _a2.update();
  14154. shouldUpdateZIndex && (contentZIndex.value = props.zIndex || nextZIndex());
  14155. };
  14156. const togglePopperAlive = () => {
  14157. var _a2, _b;
  14158. const monitorable = { name: "eventListeners", enabled: props.visible };
  14159. (_b = (_a2 = unref(popperInstanceRef)) == null ? void 0 : _a2.setOptions) == null ? void 0 : _b.call(_a2, (options) => ({
  14160. ...options,
  14161. modifiers: [...options.modifiers || [], monitorable]
  14162. }));
  14163. updatePopper(false);
  14164. if (props.visible && props.focusOnShow) {
  14165. trapped.value = true;
  14166. } else if (props.visible === false) {
  14167. trapped.value = false;
  14168. }
  14169. };
  14170. const onFocusAfterTrapped = () => {
  14171. emit("focus");
  14172. };
  14173. const onFocusAfterReleased = (event) => {
  14174. var _a2;
  14175. if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) !== "pointer") {
  14176. focusStartRef.value = "first";
  14177. emit("blur");
  14178. }
  14179. };
  14180. const onFocusInTrap = (event) => {
  14181. if (props.visible && !trapped.value) {
  14182. if (event.target) {
  14183. focusStartRef.value = event.target;
  14184. }
  14185. trapped.value = true;
  14186. }
  14187. };
  14188. const onFocusoutPrevented = (event) => {
  14189. if (!props.trapping) {
  14190. if (event.detail.focusReason === "pointer") {
  14191. event.preventDefault();
  14192. }
  14193. trapped.value = false;
  14194. }
  14195. };
  14196. const onReleaseRequested = () => {
  14197. trapped.value = false;
  14198. emit("close");
  14199. };
  14200. onMounted(() => {
  14201. let updateHandle;
  14202. watch(computedReference, (referenceEl) => {
  14203. var _a2;
  14204. updateHandle == null ? void 0 : updateHandle();
  14205. const popperInstance = unref(popperInstanceRef);
  14206. (_a2 = popperInstance == null ? void 0 : popperInstance.destroy) == null ? void 0 : _a2.call(popperInstance);
  14207. if (referenceEl) {
  14208. const popperContentEl = unref(popperContentRef);
  14209. contentRef.value = popperContentEl;
  14210. popperInstanceRef.value = createPopperInstance({
  14211. referenceEl,
  14212. popperContentEl,
  14213. arrowEl: unref(arrowRef)
  14214. });
  14215. updateHandle = watch(() => referenceEl.getBoundingClientRect(), () => updatePopper(), {
  14216. immediate: true
  14217. });
  14218. } else {
  14219. popperInstanceRef.value = void 0;
  14220. }
  14221. }, {
  14222. immediate: true
  14223. });
  14224. watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
  14225. triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
  14226. triggerTargetAriaStopWatch = void 0;
  14227. const el = unref(triggerTargetEl || popperContentRef.value);
  14228. const prevEl = unref(prevTriggerTargetEl || popperContentRef.value);
  14229. if (isElement2(el)) {
  14230. triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
  14231. ;
  14232. ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
  14233. isNil_default(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
  14234. });
  14235. }, { immediate: true });
  14236. }
  14237. if (prevEl !== el && isElement2(prevEl)) {
  14238. ;
  14239. ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
  14240. prevEl.removeAttribute(key);
  14241. });
  14242. }
  14243. }, { immediate: true });
  14244. watch(() => props.visible, togglePopperAlive, { immediate: true });
  14245. watch(() => buildPopperOptions(props, {
  14246. arrowEl: unref(arrowRef),
  14247. arrowOffset: unref(arrowOffset)
  14248. }), (option) => {
  14249. var _a2;
  14250. return (_a2 = popperInstanceRef.value) == null ? void 0 : _a2.setOptions(option);
  14251. });
  14252. });
  14253. onBeforeUnmount(() => {
  14254. triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
  14255. triggerTargetAriaStopWatch = void 0;
  14256. });
  14257. expose({
  14258. popperContentRef,
  14259. popperInstanceRef,
  14260. updatePopper,
  14261. contentStyle
  14262. });
  14263. return (_ctx, _cache) => {
  14264. return openBlock(), createElementBlock("div", {
  14265. ref_key: "popperContentRef",
  14266. ref: popperContentRef,
  14267. style: normalizeStyle(unref(contentStyle)),
  14268. class: normalizeClass(unref(contentClass)),
  14269. tabindex: "-1",
  14270. onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
  14271. onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
  14272. }, [
  14273. createVNode(unref(ElFocusTrap), {
  14274. trapped: trapped.value,
  14275. "trap-on-focus-in": true,
  14276. "focus-trap-el": popperContentRef.value,
  14277. "focus-start-el": focusStartRef.value,
  14278. onFocusAfterTrapped,
  14279. onFocusAfterReleased,
  14280. onFocusin: onFocusInTrap,
  14281. onFocusoutPrevented,
  14282. onReleaseRequested
  14283. }, {
  14284. default: withCtx(() => [
  14285. renderSlot(_ctx.$slots, "default")
  14286. ]),
  14287. _: 3
  14288. }, 8, ["trapped", "focus-trap-el", "focus-start-el"])
  14289. ], 38);
  14290. };
  14291. }
  14292. });
  14293. var ElPopperContent = _export_sfc(_sfc_main12, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);
  14294. // node_modules/element-plus/es/components/popper/index.mjs
  14295. var ElPopper = withInstall(Popper);
  14296. // node_modules/element-plus/es/components/tooltip/src/content.mjs
  14297. var ns = useNamespace("tooltip");
  14298. var useTooltipContentProps = buildProps({
  14299. ...useDelayedToggleProps,
  14300. ...popperContentProps,
  14301. appendTo: {
  14302. type: definePropType([String, Object])
  14303. },
  14304. content: {
  14305. type: String,
  14306. default: ""
  14307. },
  14308. rawContent: {
  14309. type: Boolean,
  14310. default: false
  14311. },
  14312. persistent: Boolean,
  14313. ariaLabel: String,
  14314. visible: {
  14315. type: definePropType(Boolean),
  14316. default: null
  14317. },
  14318. transition: {
  14319. type: String,
  14320. default: `${ns.namespace.value}-fade-in-linear`
  14321. },
  14322. teleported: {
  14323. type: Boolean,
  14324. default: true
  14325. },
  14326. disabled: {
  14327. type: Boolean
  14328. }
  14329. });
  14330. // node_modules/element-plus/es/components/tooltip/src/trigger.mjs
  14331. var useTooltipTriggerProps = buildProps({
  14332. ...popperTriggerProps,
  14333. disabled: Boolean,
  14334. trigger: {
  14335. type: definePropType([String, Array]),
  14336. default: "hover"
  14337. },
  14338. triggerKeys: {
  14339. type: definePropType(Array),
  14340. default: () => [EVENT_CODE.enter, EVENT_CODE.space]
  14341. }
  14342. });
  14343. // node_modules/element-plus/es/components/tooltip/src/tooltip.mjs
  14344. var {
  14345. useModelToggleProps: useTooltipModelToggleProps,
  14346. useModelToggleEmits: useTooltipModelToggleEmits,
  14347. useModelToggle: useTooltipModelToggle
  14348. } = createModelToggleComposable("visible");
  14349. var useTooltipProps = buildProps({
  14350. ...popperProps,
  14351. ...useTooltipModelToggleProps,
  14352. ...useTooltipContentProps,
  14353. ...useTooltipTriggerProps,
  14354. ...popperArrowProps,
  14355. showArrow: {
  14356. type: Boolean,
  14357. default: true
  14358. }
  14359. });
  14360. var tooltipEmits = [
  14361. ...useTooltipModelToggleEmits,
  14362. "before-show",
  14363. "before-hide",
  14364. "show",
  14365. "hide",
  14366. "open",
  14367. "close"
  14368. ];
  14369. // node_modules/element-plus/es/components/tooltip/src/utils.mjs
  14370. var isTriggerType = (trigger, type4) => {
  14371. if (isArray(trigger)) {
  14372. return trigger.includes(type4);
  14373. }
  14374. return trigger === type4;
  14375. };
  14376. var whenTrigger = (trigger, type4, handler) => {
  14377. return (e) => {
  14378. isTriggerType(unref(trigger), type4) && handler(e);
  14379. };
  14380. };
  14381. // node_modules/element-plus/es/components/tooltip/src/trigger2.mjs
  14382. var __default__10 = defineComponent({
  14383. name: "ElTooltipTrigger"
  14384. });
  14385. var _sfc_main13 = defineComponent({
  14386. ...__default__10,
  14387. props: useTooltipTriggerProps,
  14388. setup(__props, { expose }) {
  14389. const props = __props;
  14390. const ns2 = useNamespace("tooltip");
  14391. const { controlled, id: id2, open, onOpen, onClose, onToggle } = inject(TOOLTIP_INJECTION_KEY, void 0);
  14392. const triggerRef2 = ref(null);
  14393. const stopWhenControlledOrDisabled = () => {
  14394. if (unref(controlled) || props.disabled) {
  14395. return true;
  14396. }
  14397. };
  14398. const trigger = toRef(props, "trigger");
  14399. const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onOpen));
  14400. const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
  14401. const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
  14402. if (e.button === 0) {
  14403. onToggle(e);
  14404. }
  14405. }));
  14406. const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
  14407. const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
  14408. const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
  14409. e.preventDefault();
  14410. onToggle(e);
  14411. }));
  14412. const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
  14413. const { code } = e;
  14414. if (props.triggerKeys.includes(code)) {
  14415. e.preventDefault();
  14416. onToggle(e);
  14417. }
  14418. });
  14419. expose({
  14420. triggerRef: triggerRef2
  14421. });
  14422. return (_ctx, _cache) => {
  14423. return openBlock(), createBlock(unref(ElPopperTrigger), {
  14424. id: unref(id2),
  14425. "virtual-ref": _ctx.virtualRef,
  14426. open: unref(open),
  14427. "virtual-triggering": _ctx.virtualTriggering,
  14428. class: normalizeClass(unref(ns2).e("trigger")),
  14429. onBlur: unref(onBlur),
  14430. onClick: unref(onClick),
  14431. onContextmenu: unref(onContextMenu),
  14432. onFocus: unref(onFocus),
  14433. onMouseenter: unref(onMouseenter),
  14434. onMouseleave: unref(onMouseleave),
  14435. onKeydown: unref(onKeydown)
  14436. }, {
  14437. default: withCtx(() => [
  14438. renderSlot(_ctx.$slots, "default")
  14439. ]),
  14440. _: 3
  14441. }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]);
  14442. };
  14443. }
  14444. });
  14445. var ElTooltipTrigger = _export_sfc(_sfc_main13, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);
  14446. // node_modules/element-plus/es/components/tooltip/src/content2.mjs
  14447. var __default__11 = defineComponent({
  14448. name: "ElTooltipContent",
  14449. inheritAttrs: false
  14450. });
  14451. var _sfc_main14 = defineComponent({
  14452. ...__default__11,
  14453. props: useTooltipContentProps,
  14454. setup(__props, { expose }) {
  14455. const props = __props;
  14456. const { selector } = usePopperContainerId();
  14457. const contentRef = ref(null);
  14458. const destroyed = ref(false);
  14459. const {
  14460. controlled,
  14461. id: id2,
  14462. open,
  14463. trigger,
  14464. onClose,
  14465. onOpen,
  14466. onShow,
  14467. onHide,
  14468. onBeforeShow,
  14469. onBeforeHide
  14470. } = inject(TOOLTIP_INJECTION_KEY, void 0);
  14471. const persistentRef = computed2(() => {
  14472. if (false) {
  14473. return true;
  14474. }
  14475. return props.persistent;
  14476. });
  14477. onBeforeUnmount(() => {
  14478. destroyed.value = true;
  14479. });
  14480. const shouldRender = computed2(() => {
  14481. return unref(persistentRef) ? true : unref(open);
  14482. });
  14483. const shouldShow = computed2(() => {
  14484. return props.disabled ? false : unref(open);
  14485. });
  14486. const appendTo = computed2(() => {
  14487. return props.appendTo || selector.value;
  14488. });
  14489. const contentStyle = computed2(() => {
  14490. var _a2;
  14491. return (_a2 = props.style) != null ? _a2 : {};
  14492. });
  14493. const ariaHidden = computed2(() => !unref(open));
  14494. const onTransitionLeave = () => {
  14495. onHide();
  14496. };
  14497. const stopWhenControlled = () => {
  14498. if (unref(controlled))
  14499. return true;
  14500. };
  14501. const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
  14502. if (props.enterable && unref(trigger) === "hover") {
  14503. onOpen();
  14504. }
  14505. });
  14506. const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
  14507. if (unref(trigger) === "hover") {
  14508. onClose();
  14509. }
  14510. });
  14511. const onBeforeEnter = () => {
  14512. var _a2, _b;
  14513. (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  14514. onBeforeShow == null ? void 0 : onBeforeShow();
  14515. };
  14516. const onBeforeLeave = () => {
  14517. onBeforeHide == null ? void 0 : onBeforeHide();
  14518. };
  14519. const onAfterShow = () => {
  14520. onShow();
  14521. stopHandle = onClickOutside(computed2(() => {
  14522. var _a2;
  14523. return (_a2 = contentRef.value) == null ? void 0 : _a2.popperContentRef;
  14524. }), () => {
  14525. if (unref(controlled))
  14526. return;
  14527. const $trigger = unref(trigger);
  14528. if ($trigger !== "hover") {
  14529. onClose();
  14530. }
  14531. });
  14532. };
  14533. const onBlur = () => {
  14534. if (!props.virtualTriggering) {
  14535. onClose();
  14536. }
  14537. };
  14538. let stopHandle;
  14539. watch(() => unref(open), (val) => {
  14540. if (!val) {
  14541. stopHandle == null ? void 0 : stopHandle();
  14542. }
  14543. }, {
  14544. flush: "post"
  14545. });
  14546. watch(() => props.content, () => {
  14547. var _a2, _b;
  14548. (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  14549. });
  14550. expose({
  14551. contentRef
  14552. });
  14553. return (_ctx, _cache) => {
  14554. return openBlock(), createBlock(Teleport, {
  14555. disabled: !_ctx.teleported,
  14556. to: unref(appendTo)
  14557. }, [
  14558. createVNode(Transition, {
  14559. name: _ctx.transition,
  14560. onAfterLeave: onTransitionLeave,
  14561. onBeforeEnter,
  14562. onAfterEnter: onAfterShow,
  14563. onBeforeLeave
  14564. }, {
  14565. default: withCtx(() => [
  14566. unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
  14567. key: 0,
  14568. id: unref(id2),
  14569. ref_key: "contentRef",
  14570. ref: contentRef
  14571. }, _ctx.$attrs, {
  14572. "aria-label": _ctx.ariaLabel,
  14573. "aria-hidden": unref(ariaHidden),
  14574. "boundaries-padding": _ctx.boundariesPadding,
  14575. "fallback-placements": _ctx.fallbackPlacements,
  14576. "gpu-acceleration": _ctx.gpuAcceleration,
  14577. offset: _ctx.offset,
  14578. placement: _ctx.placement,
  14579. "popper-options": _ctx.popperOptions,
  14580. strategy: _ctx.strategy,
  14581. effect: _ctx.effect,
  14582. enterable: _ctx.enterable,
  14583. pure: _ctx.pure,
  14584. "popper-class": _ctx.popperClass,
  14585. "popper-style": [_ctx.popperStyle, unref(contentStyle)],
  14586. "reference-el": _ctx.referenceEl,
  14587. "trigger-target-el": _ctx.triggerTargetEl,
  14588. visible: unref(shouldShow),
  14589. "z-index": _ctx.zIndex,
  14590. onMouseenter: unref(onContentEnter),
  14591. onMouseleave: unref(onContentLeave),
  14592. onBlur,
  14593. onClose: unref(onClose)
  14594. }), {
  14595. default: withCtx(() => [
  14596. !destroyed.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
  14597. ]),
  14598. _: 3
  14599. }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
  14600. [vShow, unref(shouldShow)]
  14601. ]) : createCommentVNode("v-if", true)
  14602. ]),
  14603. _: 3
  14604. }, 8, ["name"])
  14605. ], 8, ["disabled", "to"]);
  14606. };
  14607. }
  14608. });
  14609. var ElTooltipContent = _export_sfc(_sfc_main14, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
  14610. // node_modules/element-plus/es/components/tooltip/src/tooltip2.mjs
  14611. var _hoisted_12 = ["innerHTML"];
  14612. var _hoisted_22 = { key: 1 };
  14613. var __default__12 = defineComponent({
  14614. name: "ElTooltip"
  14615. });
  14616. var _sfc_main15 = defineComponent({
  14617. ...__default__12,
  14618. props: useTooltipProps,
  14619. emits: tooltipEmits,
  14620. setup(__props, { expose, emit }) {
  14621. const props = __props;
  14622. usePopperContainer();
  14623. const id2 = useId();
  14624. const popperRef = ref();
  14625. const contentRef = ref();
  14626. const updatePopper = () => {
  14627. var _a2;
  14628. const popperComponent = unref(popperRef);
  14629. if (popperComponent) {
  14630. (_a2 = popperComponent.popperInstanceRef) == null ? void 0 : _a2.update();
  14631. }
  14632. };
  14633. const open = ref(false);
  14634. const toggleReason = ref();
  14635. const { show, hide: hide2, hasUpdateHandler } = useTooltipModelToggle({
  14636. indicator: open,
  14637. toggleReason
  14638. });
  14639. const { onOpen, onClose } = useDelayedToggle({
  14640. showAfter: toRef(props, "showAfter"),
  14641. hideAfter: toRef(props, "hideAfter"),
  14642. open: show,
  14643. close: hide2
  14644. });
  14645. const controlled = computed2(() => isBoolean2(props.visible) && !hasUpdateHandler.value);
  14646. provide(TOOLTIP_INJECTION_KEY, {
  14647. controlled,
  14648. id: id2,
  14649. open: readonly(open),
  14650. trigger: toRef(props, "trigger"),
  14651. onOpen: (event) => {
  14652. onOpen(event);
  14653. },
  14654. onClose: (event) => {
  14655. onClose(event);
  14656. },
  14657. onToggle: (event) => {
  14658. if (unref(open)) {
  14659. onClose(event);
  14660. } else {
  14661. onOpen(event);
  14662. }
  14663. },
  14664. onShow: () => {
  14665. emit("show", toggleReason.value);
  14666. },
  14667. onHide: () => {
  14668. emit("hide", toggleReason.value);
  14669. },
  14670. onBeforeShow: () => {
  14671. emit("before-show", toggleReason.value);
  14672. },
  14673. onBeforeHide: () => {
  14674. emit("before-hide", toggleReason.value);
  14675. },
  14676. updatePopper
  14677. });
  14678. watch(() => props.disabled, (disabled) => {
  14679. if (disabled && open.value) {
  14680. open.value = false;
  14681. }
  14682. });
  14683. const isFocusInsideContent = () => {
  14684. var _a2, _b;
  14685. const popperContent = (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.contentRef) == null ? void 0 : _b.popperContentRef;
  14686. return popperContent && popperContent.contains(document.activeElement);
  14687. };
  14688. onDeactivated(() => open.value && hide2());
  14689. expose({
  14690. popperRef,
  14691. contentRef,
  14692. isFocusInsideContent,
  14693. updatePopper,
  14694. onOpen,
  14695. onClose,
  14696. hide: hide2
  14697. });
  14698. return (_ctx, _cache) => {
  14699. return openBlock(), createBlock(unref(ElPopper), {
  14700. ref_key: "popperRef",
  14701. ref: popperRef,
  14702. role: _ctx.role
  14703. }, {
  14704. default: withCtx(() => [
  14705. createVNode(ElTooltipTrigger, {
  14706. disabled: _ctx.disabled,
  14707. trigger: _ctx.trigger,
  14708. "trigger-keys": _ctx.triggerKeys,
  14709. "virtual-ref": _ctx.virtualRef,
  14710. "virtual-triggering": _ctx.virtualTriggering
  14711. }, {
  14712. default: withCtx(() => [
  14713. _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
  14714. ]),
  14715. _: 3
  14716. }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
  14717. createVNode(ElTooltipContent, {
  14718. ref_key: "contentRef",
  14719. ref: contentRef,
  14720. "aria-label": _ctx.ariaLabel,
  14721. "boundaries-padding": _ctx.boundariesPadding,
  14722. content: _ctx.content,
  14723. disabled: _ctx.disabled,
  14724. effect: _ctx.effect,
  14725. enterable: _ctx.enterable,
  14726. "fallback-placements": _ctx.fallbackPlacements,
  14727. "hide-after": _ctx.hideAfter,
  14728. "gpu-acceleration": _ctx.gpuAcceleration,
  14729. offset: _ctx.offset,
  14730. persistent: _ctx.persistent,
  14731. "popper-class": _ctx.popperClass,
  14732. "popper-style": _ctx.popperStyle,
  14733. placement: _ctx.placement,
  14734. "popper-options": _ctx.popperOptions,
  14735. pure: _ctx.pure,
  14736. "raw-content": _ctx.rawContent,
  14737. "reference-el": _ctx.referenceEl,
  14738. "trigger-target-el": _ctx.triggerTargetEl,
  14739. "show-after": _ctx.showAfter,
  14740. strategy: _ctx.strategy,
  14741. teleported: _ctx.teleported,
  14742. transition: _ctx.transition,
  14743. "virtual-triggering": _ctx.virtualTriggering,
  14744. "z-index": _ctx.zIndex,
  14745. "append-to": _ctx.appendTo
  14746. }, {
  14747. default: withCtx(() => [
  14748. renderSlot(_ctx.$slots, "content", {}, () => [
  14749. _ctx.rawContent ? (openBlock(), createElementBlock("span", {
  14750. key: 0,
  14751. innerHTML: _ctx.content
  14752. }, null, 8, _hoisted_12)) : (openBlock(), createElementBlock("span", _hoisted_22, toDisplayString(_ctx.content), 1))
  14753. ]),
  14754. _ctx.showArrow ? (openBlock(), createBlock(unref(ElPopperArrow), {
  14755. key: 0,
  14756. "arrow-offset": _ctx.arrowOffset
  14757. }, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true)
  14758. ]),
  14759. _: 3
  14760. }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
  14761. ]),
  14762. _: 3
  14763. }, 8, ["role"]);
  14764. };
  14765. }
  14766. });
  14767. var Tooltip = _export_sfc(_sfc_main15, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);
  14768. // node_modules/element-plus/es/components/tooltip/index.mjs
  14769. var ElTooltip = withInstall(Tooltip);
  14770. // node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs
  14771. var autocompleteProps = buildProps({
  14772. valueKey: {
  14773. type: String,
  14774. default: "value"
  14775. },
  14776. modelValue: {
  14777. type: [String, Number],
  14778. default: ""
  14779. },
  14780. debounce: {
  14781. type: Number,
  14782. default: 300
  14783. },
  14784. placement: {
  14785. type: definePropType(String),
  14786. values: [
  14787. "top",
  14788. "top-start",
  14789. "top-end",
  14790. "bottom",
  14791. "bottom-start",
  14792. "bottom-end"
  14793. ],
  14794. default: "bottom-start"
  14795. },
  14796. fetchSuggestions: {
  14797. type: definePropType([Function, Array]),
  14798. default: NOOP
  14799. },
  14800. popperClass: {
  14801. type: String,
  14802. default: ""
  14803. },
  14804. triggerOnFocus: {
  14805. type: Boolean,
  14806. default: true
  14807. },
  14808. selectWhenUnmatched: {
  14809. type: Boolean,
  14810. default: false
  14811. },
  14812. hideLoading: {
  14813. type: Boolean,
  14814. default: false
  14815. },
  14816. label: {
  14817. type: String
  14818. },
  14819. teleported: useTooltipContentProps.teleported,
  14820. highlightFirstItem: {
  14821. type: Boolean,
  14822. default: false
  14823. },
  14824. fitInputWidth: {
  14825. type: Boolean,
  14826. default: false
  14827. }
  14828. });
  14829. var autocompleteEmits = {
  14830. [UPDATE_MODEL_EVENT]: (value) => isString(value),
  14831. [INPUT_EVENT]: (value) => isString(value),
  14832. [CHANGE_EVENT]: (value) => isString(value),
  14833. focus: (evt) => evt instanceof FocusEvent,
  14834. blur: (evt) => evt instanceof FocusEvent,
  14835. clear: () => true,
  14836. select: (item) => isObject(item)
  14837. };
  14838. // node_modules/element-plus/es/components/autocomplete/src/autocomplete2.mjs
  14839. var _hoisted_13 = ["aria-expanded", "aria-owns"];
  14840. var _hoisted_23 = { key: 0 };
  14841. var _hoisted_32 = ["id", "aria-selected", "onClick"];
  14842. var COMPONENT_NAME4 = "ElAutocomplete";
  14843. var __default__13 = defineComponent({
  14844. name: COMPONENT_NAME4,
  14845. inheritAttrs: false
  14846. });
  14847. var _sfc_main16 = defineComponent({
  14848. ...__default__13,
  14849. props: autocompleteProps,
  14850. emits: autocompleteEmits,
  14851. setup(__props, { expose, emit }) {
  14852. const props = __props;
  14853. const attrs = useAttrs2();
  14854. const rawAttrs = useAttrs();
  14855. const disabled = useDisabled();
  14856. const ns2 = useNamespace("autocomplete");
  14857. const inputRef = ref();
  14858. const regionRef = ref();
  14859. const popperRef = ref();
  14860. const listboxRef = ref();
  14861. let readonly2 = false;
  14862. let ignoreFocusEvent = false;
  14863. const suggestions = ref([]);
  14864. const highlightedIndex = ref(-1);
  14865. const dropdownWidth = ref("");
  14866. const activated = ref(false);
  14867. const suggestionDisabled = ref(false);
  14868. const loading = ref(false);
  14869. const listboxId = computed2(() => ns2.b(String(generateId())));
  14870. const styles = computed2(() => rawAttrs.style);
  14871. const suggestionVisible = computed2(() => {
  14872. const isValidData = suggestions.value.length > 0;
  14873. return (isValidData || loading.value) && activated.value;
  14874. });
  14875. const suggestionLoading = computed2(() => !props.hideLoading && loading.value);
  14876. const refInput = computed2(() => {
  14877. if (inputRef.value) {
  14878. return Array.from(inputRef.value.$el.querySelectorAll("input"));
  14879. }
  14880. return [];
  14881. });
  14882. const onSuggestionShow = async () => {
  14883. await nextTick();
  14884. if (suggestionVisible.value) {
  14885. dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
  14886. }
  14887. };
  14888. const onShow = () => {
  14889. ignoreFocusEvent = true;
  14890. };
  14891. const onHide = () => {
  14892. ignoreFocusEvent = false;
  14893. highlightedIndex.value = -1;
  14894. };
  14895. const getData2 = async (queryString) => {
  14896. if (suggestionDisabled.value)
  14897. return;
  14898. const cb = (suggestionList) => {
  14899. loading.value = false;
  14900. if (suggestionDisabled.value)
  14901. return;
  14902. if (isArray(suggestionList)) {
  14903. suggestions.value = suggestionList;
  14904. highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
  14905. } else {
  14906. throwError(COMPONENT_NAME4, "autocomplete suggestions must be an array");
  14907. }
  14908. };
  14909. loading.value = true;
  14910. if (isArray(props.fetchSuggestions)) {
  14911. cb(props.fetchSuggestions);
  14912. } else {
  14913. const result2 = await props.fetchSuggestions(queryString, cb);
  14914. if (isArray(result2))
  14915. cb(result2);
  14916. }
  14917. };
  14918. const debouncedGetData = debounce_default(getData2, props.debounce);
  14919. const handleInput = (value) => {
  14920. const valuePresented = !!value;
  14921. emit(INPUT_EVENT, value);
  14922. emit(UPDATE_MODEL_EVENT, value);
  14923. suggestionDisabled.value = false;
  14924. activated.value || (activated.value = valuePresented);
  14925. if (!props.triggerOnFocus && !value) {
  14926. suggestionDisabled.value = true;
  14927. suggestions.value = [];
  14928. return;
  14929. }
  14930. debouncedGetData(value);
  14931. };
  14932. const handleMouseDown = (event) => {
  14933. var _a2;
  14934. if (disabled.value)
  14935. return;
  14936. if (((_a2 = event.target) == null ? void 0 : _a2.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
  14937. activated.value = true;
  14938. }
  14939. };
  14940. const handleChange = (value) => {
  14941. emit(CHANGE_EVENT, value);
  14942. };
  14943. const handleFocus = (evt) => {
  14944. if (ignoreFocusEvent)
  14945. return;
  14946. activated.value = true;
  14947. emit("focus", evt);
  14948. if (props.triggerOnFocus && !readonly2) {
  14949. debouncedGetData(String(props.modelValue));
  14950. }
  14951. };
  14952. const handleBlur = (evt) => {
  14953. if (ignoreFocusEvent)
  14954. return;
  14955. emit("blur", evt);
  14956. };
  14957. const handleClear = () => {
  14958. activated.value = false;
  14959. emit(UPDATE_MODEL_EVENT, "");
  14960. emit("clear");
  14961. };
  14962. const handleKeyEnter = async () => {
  14963. if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) {
  14964. handleSelect(suggestions.value[highlightedIndex.value]);
  14965. } else if (props.selectWhenUnmatched) {
  14966. emit("select", { value: props.modelValue });
  14967. suggestions.value = [];
  14968. highlightedIndex.value = -1;
  14969. }
  14970. };
  14971. const handleKeyEscape = (evt) => {
  14972. if (suggestionVisible.value) {
  14973. evt.preventDefault();
  14974. evt.stopPropagation();
  14975. close2();
  14976. }
  14977. };
  14978. const close2 = () => {
  14979. activated.value = false;
  14980. };
  14981. const focus = () => {
  14982. var _a2;
  14983. (_a2 = inputRef.value) == null ? void 0 : _a2.focus();
  14984. };
  14985. const blur = () => {
  14986. var _a2;
  14987. (_a2 = inputRef.value) == null ? void 0 : _a2.blur();
  14988. };
  14989. const handleSelect = async (item) => {
  14990. emit(INPUT_EVENT, item[props.valueKey]);
  14991. emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
  14992. emit("select", item);
  14993. suggestions.value = [];
  14994. highlightedIndex.value = -1;
  14995. };
  14996. const highlight = (index) => {
  14997. if (!suggestionVisible.value || loading.value)
  14998. return;
  14999. if (index < 0) {
  15000. highlightedIndex.value = -1;
  15001. return;
  15002. }
  15003. if (index >= suggestions.value.length) {
  15004. index = suggestions.value.length - 1;
  15005. }
  15006. const suggestion = regionRef.value.querySelector(`.${ns2.be("suggestion", "wrap")}`);
  15007. const suggestionList = suggestion.querySelectorAll(`.${ns2.be("suggestion", "list")} li`);
  15008. const highlightItem = suggestionList[index];
  15009. const scrollTop = suggestion.scrollTop;
  15010. const { offsetTop, scrollHeight } = highlightItem;
  15011. if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) {
  15012. suggestion.scrollTop += scrollHeight;
  15013. }
  15014. if (offsetTop < scrollTop) {
  15015. suggestion.scrollTop -= scrollHeight;
  15016. }
  15017. highlightedIndex.value = index;
  15018. inputRef.value.ref.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
  15019. };
  15020. onClickOutside(listboxRef, () => {
  15021. suggestionVisible.value && close2();
  15022. });
  15023. onMounted(() => {
  15024. ;
  15025. inputRef.value.ref.setAttribute("role", "textbox");
  15026. inputRef.value.ref.setAttribute("aria-autocomplete", "list");
  15027. inputRef.value.ref.setAttribute("aria-controls", "id");
  15028. inputRef.value.ref.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
  15029. readonly2 = inputRef.value.ref.hasAttribute("readonly");
  15030. });
  15031. expose({
  15032. highlightedIndex,
  15033. activated,
  15034. loading,
  15035. inputRef,
  15036. popperRef,
  15037. suggestions,
  15038. handleSelect,
  15039. handleKeyEnter,
  15040. focus,
  15041. blur,
  15042. close: close2,
  15043. highlight
  15044. });
  15045. return (_ctx, _cache) => {
  15046. return openBlock(), createBlock(unref(ElTooltip), {
  15047. ref_key: "popperRef",
  15048. ref: popperRef,
  15049. visible: unref(suggestionVisible),
  15050. placement: _ctx.placement,
  15051. "fallback-placements": ["bottom-start", "top-start"],
  15052. "popper-class": [unref(ns2).e("popper"), _ctx.popperClass],
  15053. teleported: _ctx.teleported,
  15054. "gpu-acceleration": false,
  15055. pure: "",
  15056. "manual-mode": "",
  15057. effect: "light",
  15058. trigger: "click",
  15059. transition: `${unref(ns2).namespace.value}-zoom-in-top`,
  15060. persistent: "",
  15061. onBeforeShow: onSuggestionShow,
  15062. onShow,
  15063. onHide
  15064. }, {
  15065. content: withCtx(() => [
  15066. createBaseVNode("div", {
  15067. ref_key: "regionRef",
  15068. ref: regionRef,
  15069. class: normalizeClass([unref(ns2).b("suggestion"), unref(ns2).is("loading", unref(suggestionLoading))]),
  15070. style: normalizeStyle({
  15071. [_ctx.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
  15072. outline: "none"
  15073. }),
  15074. role: "region"
  15075. }, [
  15076. createVNode(unref(ElScrollbar), {
  15077. id: unref(listboxId),
  15078. tag: "ul",
  15079. "wrap-class": unref(ns2).be("suggestion", "wrap"),
  15080. "view-class": unref(ns2).be("suggestion", "list"),
  15081. role: "listbox"
  15082. }, {
  15083. default: withCtx(() => [
  15084. unref(suggestionLoading) ? (openBlock(), createElementBlock("li", _hoisted_23, [
  15085. createVNode(unref(ElIcon), {
  15086. class: normalizeClass(unref(ns2).is("loading"))
  15087. }, {
  15088. default: withCtx(() => [
  15089. createVNode(unref(loading_default))
  15090. ]),
  15091. _: 1
  15092. }, 8, ["class"])
  15093. ])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
  15094. return openBlock(), createElementBlock("li", {
  15095. id: `${unref(listboxId)}-item-${index}`,
  15096. key: index,
  15097. class: normalizeClass({ highlighted: highlightedIndex.value === index }),
  15098. role: "option",
  15099. "aria-selected": highlightedIndex.value === index,
  15100. onClick: ($event) => handleSelect(item)
  15101. }, [
  15102. renderSlot(_ctx.$slots, "default", { item }, () => [
  15103. createTextVNode(toDisplayString(item[_ctx.valueKey]), 1)
  15104. ])
  15105. ], 10, _hoisted_32);
  15106. }), 128))
  15107. ]),
  15108. _: 3
  15109. }, 8, ["id", "wrap-class", "view-class"])
  15110. ], 6)
  15111. ]),
  15112. default: withCtx(() => [
  15113. createBaseVNode("div", {
  15114. ref_key: "listboxRef",
  15115. ref: listboxRef,
  15116. class: normalizeClass([unref(ns2).b(), _ctx.$attrs.class]),
  15117. style: normalizeStyle(unref(styles)),
  15118. role: "combobox",
  15119. "aria-haspopup": "listbox",
  15120. "aria-expanded": unref(suggestionVisible),
  15121. "aria-owns": unref(listboxId)
  15122. }, [
  15123. createVNode(unref(ElInput), mergeProps({
  15124. ref_key: "inputRef",
  15125. ref: inputRef
  15126. }, unref(attrs), {
  15127. "model-value": _ctx.modelValue,
  15128. onInput: handleInput,
  15129. onChange: handleChange,
  15130. onFocus: handleFocus,
  15131. onBlur: handleBlur,
  15132. onClear: handleClear,
  15133. onKeydown: [
  15134. _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => highlight(highlightedIndex.value - 1), ["prevent"]), ["up"])),
  15135. _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => highlight(highlightedIndex.value + 1), ["prevent"]), ["down"])),
  15136. withKeys(handleKeyEnter, ["enter"]),
  15137. withKeys(close2, ["tab"]),
  15138. withKeys(handleKeyEscape, ["esc"])
  15139. ],
  15140. onMousedown: handleMouseDown
  15141. }), createSlots({ _: 2 }, [
  15142. _ctx.$slots.prepend ? {
  15143. name: "prepend",
  15144. fn: withCtx(() => [
  15145. renderSlot(_ctx.$slots, "prepend")
  15146. ])
  15147. } : void 0,
  15148. _ctx.$slots.append ? {
  15149. name: "append",
  15150. fn: withCtx(() => [
  15151. renderSlot(_ctx.$slots, "append")
  15152. ])
  15153. } : void 0,
  15154. _ctx.$slots.prefix ? {
  15155. name: "prefix",
  15156. fn: withCtx(() => [
  15157. renderSlot(_ctx.$slots, "prefix")
  15158. ])
  15159. } : void 0,
  15160. _ctx.$slots.suffix ? {
  15161. name: "suffix",
  15162. fn: withCtx(() => [
  15163. renderSlot(_ctx.$slots, "suffix")
  15164. ])
  15165. } : void 0
  15166. ]), 1040, ["model-value", "onKeydown"])
  15167. ], 14, _hoisted_13)
  15168. ]),
  15169. _: 3
  15170. }, 8, ["visible", "placement", "popper-class", "teleported", "transition"]);
  15171. };
  15172. }
  15173. });
  15174. var Autocomplete = _export_sfc(_sfc_main16, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/autocomplete/src/autocomplete.vue"]]);
  15175. // node_modules/element-plus/es/components/autocomplete/index.mjs
  15176. var ElAutocomplete = withInstall(Autocomplete);
  15177. // node_modules/element-plus/es/components/avatar/src/avatar.mjs
  15178. var avatarProps = buildProps({
  15179. size: {
  15180. type: [Number, String],
  15181. values: componentSizes,
  15182. default: "",
  15183. validator: (val) => isNumber2(val)
  15184. },
  15185. shape: {
  15186. type: String,
  15187. values: ["circle", "square"],
  15188. default: "circle"
  15189. },
  15190. icon: {
  15191. type: iconPropType
  15192. },
  15193. src: {
  15194. type: String,
  15195. default: ""
  15196. },
  15197. alt: String,
  15198. srcSet: String,
  15199. fit: {
  15200. type: definePropType(String),
  15201. default: "cover"
  15202. }
  15203. });
  15204. var avatarEmits = {
  15205. error: (evt) => evt instanceof Event
  15206. };
  15207. // node_modules/element-plus/es/components/avatar/src/avatar2.mjs
  15208. var _hoisted_14 = ["src", "alt", "srcset"];
  15209. var __default__14 = defineComponent({
  15210. name: "ElAvatar"
  15211. });
  15212. var _sfc_main17 = defineComponent({
  15213. ...__default__14,
  15214. props: avatarProps,
  15215. emits: avatarEmits,
  15216. setup(__props, { emit }) {
  15217. const props = __props;
  15218. const ns2 = useNamespace("avatar");
  15219. const hasLoadError = ref(false);
  15220. const avatarClass = computed2(() => {
  15221. const { size: size3, icon, shape } = props;
  15222. const classList = [ns2.b()];
  15223. if (isString(size3))
  15224. classList.push(ns2.m(size3));
  15225. if (icon)
  15226. classList.push(ns2.m("icon"));
  15227. if (shape)
  15228. classList.push(ns2.m(shape));
  15229. return classList;
  15230. });
  15231. const sizeStyle = computed2(() => {
  15232. const { size: size3 } = props;
  15233. return isNumber2(size3) ? ns2.cssVarBlock({
  15234. size: addUnit(size3) || ""
  15235. }) : void 0;
  15236. });
  15237. const fitStyle = computed2(() => ({
  15238. objectFit: props.fit
  15239. }));
  15240. watch(() => props.src, () => hasLoadError.value = false);
  15241. function handleError(e) {
  15242. hasLoadError.value = true;
  15243. emit("error", e);
  15244. }
  15245. return (_ctx, _cache) => {
  15246. return openBlock(), createElementBlock("span", {
  15247. class: normalizeClass(unref(avatarClass)),
  15248. style: normalizeStyle(unref(sizeStyle))
  15249. }, [
  15250. (_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
  15251. key: 0,
  15252. src: _ctx.src,
  15253. alt: _ctx.alt,
  15254. srcset: _ctx.srcSet,
  15255. style: normalizeStyle(unref(fitStyle)),
  15256. onError: handleError
  15257. }, null, 44, _hoisted_14)) : _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  15258. default: withCtx(() => [
  15259. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  15260. ]),
  15261. _: 1
  15262. })) : renderSlot(_ctx.$slots, "default", { key: 2 })
  15263. ], 6);
  15264. };
  15265. }
  15266. });
  15267. var Avatar = _export_sfc(_sfc_main17, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]);
  15268. // node_modules/element-plus/es/components/avatar/index.mjs
  15269. var ElAvatar = withInstall(Avatar);
  15270. // node_modules/element-plus/es/components/backtop/src/backtop.mjs
  15271. var backtopProps = {
  15272. visibilityHeight: {
  15273. type: Number,
  15274. default: 200
  15275. },
  15276. target: {
  15277. type: String,
  15278. default: ""
  15279. },
  15280. right: {
  15281. type: Number,
  15282. default: 40
  15283. },
  15284. bottom: {
  15285. type: Number,
  15286. default: 40
  15287. }
  15288. };
  15289. var backtopEmits = {
  15290. click: (evt) => evt instanceof MouseEvent
  15291. };
  15292. // node_modules/element-plus/es/components/backtop/src/use-backtop.mjs
  15293. var useBackTop = (props, emit, componentName2) => {
  15294. const el = shallowRef();
  15295. const container = shallowRef();
  15296. const visible = ref(false);
  15297. const scrollToTop = () => {
  15298. if (!el.value)
  15299. return;
  15300. const beginTime = Date.now();
  15301. const beginValue = el.value.scrollTop;
  15302. const frameFunc = () => {
  15303. if (!el.value)
  15304. return;
  15305. const progress = (Date.now() - beginTime) / 500;
  15306. if (progress < 1) {
  15307. el.value.scrollTop = beginValue * (1 - easeInOutCubic(progress));
  15308. requestAnimationFrame(frameFunc);
  15309. } else {
  15310. el.value.scrollTop = 0;
  15311. }
  15312. };
  15313. requestAnimationFrame(frameFunc);
  15314. };
  15315. const handleScroll2 = () => {
  15316. if (el.value)
  15317. visible.value = el.value.scrollTop >= props.visibilityHeight;
  15318. };
  15319. const handleClick = (event) => {
  15320. scrollToTop();
  15321. emit("click", event);
  15322. };
  15323. const handleScrollThrottled = useThrottleFn(handleScroll2, 300, true);
  15324. useEventListener(container, "scroll", handleScrollThrottled);
  15325. onMounted(() => {
  15326. var _a2;
  15327. container.value = document;
  15328. el.value = document.documentElement;
  15329. if (props.target) {
  15330. el.value = (_a2 = document.querySelector(props.target)) != null ? _a2 : void 0;
  15331. if (!el.value) {
  15332. throwError(componentName2, `target does not exist: ${props.target}`);
  15333. }
  15334. container.value = el.value;
  15335. }
  15336. });
  15337. return {
  15338. visible,
  15339. handleClick
  15340. };
  15341. };
  15342. // node_modules/element-plus/es/components/backtop/src/backtop2.mjs
  15343. var COMPONENT_NAME5 = "ElBacktop";
  15344. var __default__15 = defineComponent({
  15345. name: COMPONENT_NAME5
  15346. });
  15347. var _sfc_main18 = defineComponent({
  15348. ...__default__15,
  15349. props: backtopProps,
  15350. emits: backtopEmits,
  15351. setup(__props, { emit }) {
  15352. const props = __props;
  15353. const ns2 = useNamespace("backtop");
  15354. const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME5);
  15355. const backTopStyle = computed2(() => ({
  15356. right: `${props.right}px`,
  15357. bottom: `${props.bottom}px`
  15358. }));
  15359. return (_ctx, _cache) => {
  15360. return openBlock(), createBlock(Transition, {
  15361. name: `${unref(ns2).namespace.value}-fade-in`
  15362. }, {
  15363. default: withCtx(() => [
  15364. unref(visible) ? (openBlock(), createElementBlock("div", {
  15365. key: 0,
  15366. style: normalizeStyle(unref(backTopStyle)),
  15367. class: normalizeClass(unref(ns2).b()),
  15368. onClick: _cache[0] || (_cache[0] = withModifiers((...args) => unref(handleClick) && unref(handleClick)(...args), ["stop"]))
  15369. }, [
  15370. renderSlot(_ctx.$slots, "default", {}, () => [
  15371. createVNode(unref(ElIcon), {
  15372. class: normalizeClass(unref(ns2).e("icon"))
  15373. }, {
  15374. default: withCtx(() => [
  15375. createVNode(unref(caret_top_default))
  15376. ]),
  15377. _: 1
  15378. }, 8, ["class"])
  15379. ])
  15380. ], 6)) : createCommentVNode("v-if", true)
  15381. ]),
  15382. _: 3
  15383. }, 8, ["name"]);
  15384. };
  15385. }
  15386. });
  15387. var Backtop = _export_sfc(_sfc_main18, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/backtop/src/backtop.vue"]]);
  15388. // node_modules/element-plus/es/components/backtop/index.mjs
  15389. var ElBacktop = withInstall(Backtop);
  15390. // node_modules/element-plus/es/components/badge/src/badge.mjs
  15391. var badgeProps = buildProps({
  15392. value: {
  15393. type: [String, Number],
  15394. default: ""
  15395. },
  15396. max: {
  15397. type: Number,
  15398. default: 99
  15399. },
  15400. isDot: Boolean,
  15401. hidden: Boolean,
  15402. type: {
  15403. type: String,
  15404. values: ["primary", "success", "warning", "info", "danger"],
  15405. default: "danger"
  15406. }
  15407. });
  15408. // node_modules/element-plus/es/components/badge/src/badge2.mjs
  15409. var _hoisted_15 = ["textContent"];
  15410. var __default__16 = defineComponent({
  15411. name: "ElBadge"
  15412. });
  15413. var _sfc_main19 = defineComponent({
  15414. ...__default__16,
  15415. props: badgeProps,
  15416. setup(__props, { expose }) {
  15417. const props = __props;
  15418. const ns2 = useNamespace("badge");
  15419. const content = computed2(() => {
  15420. if (props.isDot)
  15421. return "";
  15422. if (isNumber2(props.value) && isNumber2(props.max)) {
  15423. return props.max < props.value ? `${props.max}+` : `${props.value}`;
  15424. }
  15425. return `${props.value}`;
  15426. });
  15427. expose({
  15428. content
  15429. });
  15430. return (_ctx, _cache) => {
  15431. return openBlock(), createElementBlock("div", {
  15432. class: normalizeClass(unref(ns2).b())
  15433. }, [
  15434. renderSlot(_ctx.$slots, "default"),
  15435. createVNode(Transition, {
  15436. name: `${unref(ns2).namespace.value}-zoom-in-center`,
  15437. persisted: ""
  15438. }, {
  15439. default: withCtx(() => [
  15440. withDirectives(createBaseVNode("sup", {
  15441. class: normalizeClass([
  15442. unref(ns2).e("content"),
  15443. unref(ns2).em("content", _ctx.type),
  15444. unref(ns2).is("fixed", !!_ctx.$slots.default),
  15445. unref(ns2).is("dot", _ctx.isDot)
  15446. ]),
  15447. textContent: toDisplayString(unref(content))
  15448. }, null, 10, _hoisted_15), [
  15449. [vShow, !_ctx.hidden && (unref(content) || _ctx.isDot)]
  15450. ])
  15451. ]),
  15452. _: 1
  15453. }, 8, ["name"])
  15454. ], 2);
  15455. };
  15456. }
  15457. });
  15458. var Badge = _export_sfc(_sfc_main19, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
  15459. // node_modules/element-plus/es/components/badge/index.mjs
  15460. var ElBadge = withInstall(Badge);
  15461. // node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.mjs
  15462. var breadcrumbProps = buildProps({
  15463. separator: {
  15464. type: String,
  15465. default: "/"
  15466. },
  15467. separatorIcon: {
  15468. type: iconPropType
  15469. }
  15470. });
  15471. // node_modules/element-plus/es/components/breadcrumb/src/breadcrumb2.mjs
  15472. var __default__17 = defineComponent({
  15473. name: "ElBreadcrumb"
  15474. });
  15475. var _sfc_main20 = defineComponent({
  15476. ...__default__17,
  15477. props: breadcrumbProps,
  15478. setup(__props) {
  15479. const props = __props;
  15480. const ns2 = useNamespace("breadcrumb");
  15481. const breadcrumb = ref();
  15482. provide(breadcrumbKey, props);
  15483. onMounted(() => {
  15484. const items = breadcrumb.value.querySelectorAll(`.${ns2.e("item")}`);
  15485. if (items.length) {
  15486. items[items.length - 1].setAttribute("aria-current", "page");
  15487. }
  15488. });
  15489. return (_ctx, _cache) => {
  15490. return openBlock(), createElementBlock("div", {
  15491. ref_key: "breadcrumb",
  15492. ref: breadcrumb,
  15493. class: normalizeClass(unref(ns2).b()),
  15494. "aria-label": "Breadcrumb",
  15495. role: "navigation"
  15496. }, [
  15497. renderSlot(_ctx.$slots, "default")
  15498. ], 2);
  15499. };
  15500. }
  15501. });
  15502. var Breadcrumb = _export_sfc(_sfc_main20, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb.vue"]]);
  15503. // node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item.mjs
  15504. var breadcrumbItemProps = buildProps({
  15505. to: {
  15506. type: definePropType([String, Object]),
  15507. default: ""
  15508. },
  15509. replace: {
  15510. type: Boolean,
  15511. default: false
  15512. }
  15513. });
  15514. // node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item2.mjs
  15515. var __default__18 = defineComponent({
  15516. name: "ElBreadcrumbItem"
  15517. });
  15518. var _sfc_main21 = defineComponent({
  15519. ...__default__18,
  15520. props: breadcrumbItemProps,
  15521. setup(__props) {
  15522. const props = __props;
  15523. const instance = getCurrentInstance();
  15524. const breadcrumbContext = inject(breadcrumbKey, void 0);
  15525. const ns2 = useNamespace("breadcrumb");
  15526. const { separator, separatorIcon } = toRefs(breadcrumbContext);
  15527. const router = instance.appContext.config.globalProperties.$router;
  15528. const link = ref();
  15529. const onClick = () => {
  15530. if (!props.to || !router)
  15531. return;
  15532. props.replace ? router.replace(props.to) : router.push(props.to);
  15533. };
  15534. return (_ctx, _cache) => {
  15535. return openBlock(), createElementBlock("span", {
  15536. class: normalizeClass(unref(ns2).e("item"))
  15537. }, [
  15538. createBaseVNode("span", {
  15539. ref_key: "link",
  15540. ref: link,
  15541. class: normalizeClass([unref(ns2).e("inner"), unref(ns2).is("link", !!_ctx.to)]),
  15542. role: "link",
  15543. onClick
  15544. }, [
  15545. renderSlot(_ctx.$slots, "default")
  15546. ], 2),
  15547. unref(separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
  15548. key: 0,
  15549. class: normalizeClass(unref(ns2).e("separator"))
  15550. }, {
  15551. default: withCtx(() => [
  15552. (openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon))))
  15553. ]),
  15554. _: 1
  15555. }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
  15556. key: 1,
  15557. class: normalizeClass(unref(ns2).e("separator")),
  15558. role: "presentation"
  15559. }, toDisplayString(unref(separator)), 3))
  15560. ], 2);
  15561. };
  15562. }
  15563. });
  15564. var BreadcrumbItem = _export_sfc(_sfc_main21, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
  15565. // node_modules/element-plus/es/components/breadcrumb/index.mjs
  15566. var ElBreadcrumb = withInstall(Breadcrumb, {
  15567. BreadcrumbItem
  15568. });
  15569. var ElBreadcrumbItem = withNoopInstall(BreadcrumbItem);
  15570. // node_modules/element-plus/es/components/button/src/use-button.mjs
  15571. var useButton = (props, emit) => {
  15572. useDeprecated({
  15573. from: "type.text",
  15574. replacement: "link",
  15575. version: "3.0.0",
  15576. scope: "props",
  15577. ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  15578. }, computed2(() => props.type === "text"));
  15579. const buttonGroupContext = inject(buttonGroupContextKey, void 0);
  15580. const globalConfig2 = useGlobalConfig("button");
  15581. const { form } = useFormItem();
  15582. const _size = useSize(computed2(() => buttonGroupContext == null ? void 0 : buttonGroupContext.size));
  15583. const _disabled = useDisabled();
  15584. const _ref = ref();
  15585. const slots = useSlots();
  15586. const _type = computed2(() => props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || "");
  15587. const autoInsertSpace = computed2(() => {
  15588. var _a2, _b, _c;
  15589. return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.autoInsertSpace) != null ? _c : false;
  15590. });
  15591. const shouldAddSpace = computed2(() => {
  15592. var _a2;
  15593. const defaultSlot = (_a2 = slots.default) == null ? void 0 : _a2.call(slots);
  15594. if (autoInsertSpace.value && (defaultSlot == null ? void 0 : defaultSlot.length) === 1) {
  15595. const slot = defaultSlot[0];
  15596. if ((slot == null ? void 0 : slot.type) === Text) {
  15597. const text = slot.children;
  15598. return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
  15599. }
  15600. }
  15601. return false;
  15602. });
  15603. const handleClick = (evt) => {
  15604. if (props.nativeType === "reset") {
  15605. form == null ? void 0 : form.resetFields();
  15606. }
  15607. emit("click", evt);
  15608. };
  15609. return {
  15610. _disabled,
  15611. _size,
  15612. _type,
  15613. _ref,
  15614. shouldAddSpace,
  15615. handleClick
  15616. };
  15617. };
  15618. // node_modules/element-plus/es/components/button/src/button.mjs
  15619. var buttonTypes = [
  15620. "default",
  15621. "primary",
  15622. "success",
  15623. "warning",
  15624. "info",
  15625. "danger",
  15626. "text",
  15627. ""
  15628. ];
  15629. var buttonNativeTypes = ["button", "submit", "reset"];
  15630. var buttonProps = buildProps({
  15631. size: useSizeProp,
  15632. disabled: Boolean,
  15633. type: {
  15634. type: String,
  15635. values: buttonTypes,
  15636. default: ""
  15637. },
  15638. icon: {
  15639. type: iconPropType
  15640. },
  15641. nativeType: {
  15642. type: String,
  15643. values: buttonNativeTypes,
  15644. default: "button"
  15645. },
  15646. loading: Boolean,
  15647. loadingIcon: {
  15648. type: iconPropType,
  15649. default: () => loading_default
  15650. },
  15651. plain: Boolean,
  15652. text: Boolean,
  15653. link: Boolean,
  15654. bg: Boolean,
  15655. autofocus: Boolean,
  15656. round: Boolean,
  15657. circle: Boolean,
  15658. color: String,
  15659. dark: Boolean,
  15660. autoInsertSpace: {
  15661. type: Boolean,
  15662. default: void 0
  15663. }
  15664. });
  15665. var buttonEmits = {
  15666. click: (evt) => evt instanceof MouseEvent
  15667. };
  15668. // node_modules/@ctrl/tinycolor/dist/module/util.js
  15669. function bound01(n, max5) {
  15670. if (isOnePointZero(n)) {
  15671. n = "100%";
  15672. }
  15673. var isPercent = isPercentage(n);
  15674. n = max5 === 360 ? n : Math.min(max5, Math.max(0, parseFloat(n)));
  15675. if (isPercent) {
  15676. n = parseInt(String(n * max5), 10) / 100;
  15677. }
  15678. if (Math.abs(n - max5) < 1e-6) {
  15679. return 1;
  15680. }
  15681. if (max5 === 360) {
  15682. n = (n < 0 ? n % max5 + max5 : n % max5) / parseFloat(String(max5));
  15683. } else {
  15684. n = n % max5 / parseFloat(String(max5));
  15685. }
  15686. return n;
  15687. }
  15688. function clamp01(val) {
  15689. return Math.min(1, Math.max(0, val));
  15690. }
  15691. function isOnePointZero(n) {
  15692. return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
  15693. }
  15694. function isPercentage(n) {
  15695. return typeof n === "string" && n.indexOf("%") !== -1;
  15696. }
  15697. function boundAlpha(a2) {
  15698. a2 = parseFloat(a2);
  15699. if (isNaN(a2) || a2 < 0 || a2 > 1) {
  15700. a2 = 1;
  15701. }
  15702. return a2;
  15703. }
  15704. function convertToPercentage(n) {
  15705. if (n <= 1) {
  15706. return "".concat(Number(n) * 100, "%");
  15707. }
  15708. return n;
  15709. }
  15710. function pad2(c2) {
  15711. return c2.length === 1 ? "0" + c2 : String(c2);
  15712. }
  15713. // node_modules/@ctrl/tinycolor/dist/module/conversion.js
  15714. function rgbToRgb(r, g, b2) {
  15715. return {
  15716. r: bound01(r, 255) * 255,
  15717. g: bound01(g, 255) * 255,
  15718. b: bound01(b2, 255) * 255
  15719. };
  15720. }
  15721. function rgbToHsl(r, g, b2) {
  15722. r = bound01(r, 255);
  15723. g = bound01(g, 255);
  15724. b2 = bound01(b2, 255);
  15725. var max5 = Math.max(r, g, b2);
  15726. var min5 = Math.min(r, g, b2);
  15727. var h3 = 0;
  15728. var s2 = 0;
  15729. var l2 = (max5 + min5) / 2;
  15730. if (max5 === min5) {
  15731. s2 = 0;
  15732. h3 = 0;
  15733. } else {
  15734. var d2 = max5 - min5;
  15735. s2 = l2 > 0.5 ? d2 / (2 - max5 - min5) : d2 / (max5 + min5);
  15736. switch (max5) {
  15737. case r:
  15738. h3 = (g - b2) / d2 + (g < b2 ? 6 : 0);
  15739. break;
  15740. case g:
  15741. h3 = (b2 - r) / d2 + 2;
  15742. break;
  15743. case b2:
  15744. h3 = (r - g) / d2 + 4;
  15745. break;
  15746. default:
  15747. break;
  15748. }
  15749. h3 /= 6;
  15750. }
  15751. return { h: h3, s: s2, l: l2 };
  15752. }
  15753. function hue2rgb(p2, q2, t) {
  15754. if (t < 0) {
  15755. t += 1;
  15756. }
  15757. if (t > 1) {
  15758. t -= 1;
  15759. }
  15760. if (t < 1 / 6) {
  15761. return p2 + (q2 - p2) * (6 * t);
  15762. }
  15763. if (t < 1 / 2) {
  15764. return q2;
  15765. }
  15766. if (t < 2 / 3) {
  15767. return p2 + (q2 - p2) * (2 / 3 - t) * 6;
  15768. }
  15769. return p2;
  15770. }
  15771. function hslToRgb(h3, s2, l2) {
  15772. var r;
  15773. var g;
  15774. var b2;
  15775. h3 = bound01(h3, 360);
  15776. s2 = bound01(s2, 100);
  15777. l2 = bound01(l2, 100);
  15778. if (s2 === 0) {
  15779. g = l2;
  15780. b2 = l2;
  15781. r = l2;
  15782. } else {
  15783. var q2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2;
  15784. var p2 = 2 * l2 - q2;
  15785. r = hue2rgb(p2, q2, h3 + 1 / 3);
  15786. g = hue2rgb(p2, q2, h3);
  15787. b2 = hue2rgb(p2, q2, h3 - 1 / 3);
  15788. }
  15789. return { r: r * 255, g: g * 255, b: b2 * 255 };
  15790. }
  15791. function rgbToHsv(r, g, b2) {
  15792. r = bound01(r, 255);
  15793. g = bound01(g, 255);
  15794. b2 = bound01(b2, 255);
  15795. var max5 = Math.max(r, g, b2);
  15796. var min5 = Math.min(r, g, b2);
  15797. var h3 = 0;
  15798. var v2 = max5;
  15799. var d2 = max5 - min5;
  15800. var s2 = max5 === 0 ? 0 : d2 / max5;
  15801. if (max5 === min5) {
  15802. h3 = 0;
  15803. } else {
  15804. switch (max5) {
  15805. case r:
  15806. h3 = (g - b2) / d2 + (g < b2 ? 6 : 0);
  15807. break;
  15808. case g:
  15809. h3 = (b2 - r) / d2 + 2;
  15810. break;
  15811. case b2:
  15812. h3 = (r - g) / d2 + 4;
  15813. break;
  15814. default:
  15815. break;
  15816. }
  15817. h3 /= 6;
  15818. }
  15819. return { h: h3, s: s2, v: v2 };
  15820. }
  15821. function hsvToRgb(h3, s2, v2) {
  15822. h3 = bound01(h3, 360) * 6;
  15823. s2 = bound01(s2, 100);
  15824. v2 = bound01(v2, 100);
  15825. var i = Math.floor(h3);
  15826. var f2 = h3 - i;
  15827. var p2 = v2 * (1 - s2);
  15828. var q2 = v2 * (1 - f2 * s2);
  15829. var t = v2 * (1 - (1 - f2) * s2);
  15830. var mod = i % 6;
  15831. var r = [v2, q2, p2, p2, t, v2][mod];
  15832. var g = [t, v2, v2, q2, p2, p2][mod];
  15833. var b2 = [p2, p2, t, v2, v2, q2][mod];
  15834. return { r: r * 255, g: g * 255, b: b2 * 255 };
  15835. }
  15836. function rgbToHex(r, g, b2, allow3Char) {
  15837. var hex2 = [
  15838. pad2(Math.round(r).toString(16)),
  15839. pad2(Math.round(g).toString(16)),
  15840. pad2(Math.round(b2).toString(16))
  15841. ];
  15842. if (allow3Char && hex2[0].startsWith(hex2[0].charAt(1)) && hex2[1].startsWith(hex2[1].charAt(1)) && hex2[2].startsWith(hex2[2].charAt(1))) {
  15843. return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0);
  15844. }
  15845. return hex2.join("");
  15846. }
  15847. function rgbaToHex(r, g, b2, a2, allow4Char) {
  15848. var hex2 = [
  15849. pad2(Math.round(r).toString(16)),
  15850. pad2(Math.round(g).toString(16)),
  15851. pad2(Math.round(b2).toString(16)),
  15852. pad2(convertDecimalToHex(a2))
  15853. ];
  15854. if (allow4Char && hex2[0].startsWith(hex2[0].charAt(1)) && hex2[1].startsWith(hex2[1].charAt(1)) && hex2[2].startsWith(hex2[2].charAt(1)) && hex2[3].startsWith(hex2[3].charAt(1))) {
  15855. return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0) + hex2[3].charAt(0);
  15856. }
  15857. return hex2.join("");
  15858. }
  15859. function convertDecimalToHex(d2) {
  15860. return Math.round(parseFloat(d2) * 255).toString(16);
  15861. }
  15862. function convertHexToDecimal(h3) {
  15863. return parseIntFromHex(h3) / 255;
  15864. }
  15865. function parseIntFromHex(val) {
  15866. return parseInt(val, 16);
  15867. }
  15868. function numberInputToObject(color) {
  15869. return {
  15870. r: color >> 16,
  15871. g: (color & 65280) >> 8,
  15872. b: color & 255
  15873. };
  15874. }
  15875. // node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
  15876. var names = {
  15877. aliceblue: "#f0f8ff",
  15878. antiquewhite: "#faebd7",
  15879. aqua: "#00ffff",
  15880. aquamarine: "#7fffd4",
  15881. azure: "#f0ffff",
  15882. beige: "#f5f5dc",
  15883. bisque: "#ffe4c4",
  15884. black: "#000000",
  15885. blanchedalmond: "#ffebcd",
  15886. blue: "#0000ff",
  15887. blueviolet: "#8a2be2",
  15888. brown: "#a52a2a",
  15889. burlywood: "#deb887",
  15890. cadetblue: "#5f9ea0",
  15891. chartreuse: "#7fff00",
  15892. chocolate: "#d2691e",
  15893. coral: "#ff7f50",
  15894. cornflowerblue: "#6495ed",
  15895. cornsilk: "#fff8dc",
  15896. crimson: "#dc143c",
  15897. cyan: "#00ffff",
  15898. darkblue: "#00008b",
  15899. darkcyan: "#008b8b",
  15900. darkgoldenrod: "#b8860b",
  15901. darkgray: "#a9a9a9",
  15902. darkgreen: "#006400",
  15903. darkgrey: "#a9a9a9",
  15904. darkkhaki: "#bdb76b",
  15905. darkmagenta: "#8b008b",
  15906. darkolivegreen: "#556b2f",
  15907. darkorange: "#ff8c00",
  15908. darkorchid: "#9932cc",
  15909. darkred: "#8b0000",
  15910. darksalmon: "#e9967a",
  15911. darkseagreen: "#8fbc8f",
  15912. darkslateblue: "#483d8b",
  15913. darkslategray: "#2f4f4f",
  15914. darkslategrey: "#2f4f4f",
  15915. darkturquoise: "#00ced1",
  15916. darkviolet: "#9400d3",
  15917. deeppink: "#ff1493",
  15918. deepskyblue: "#00bfff",
  15919. dimgray: "#696969",
  15920. dimgrey: "#696969",
  15921. dodgerblue: "#1e90ff",
  15922. firebrick: "#b22222",
  15923. floralwhite: "#fffaf0",
  15924. forestgreen: "#228b22",
  15925. fuchsia: "#ff00ff",
  15926. gainsboro: "#dcdcdc",
  15927. ghostwhite: "#f8f8ff",
  15928. goldenrod: "#daa520",
  15929. gold: "#ffd700",
  15930. gray: "#808080",
  15931. green: "#008000",
  15932. greenyellow: "#adff2f",
  15933. grey: "#808080",
  15934. honeydew: "#f0fff0",
  15935. hotpink: "#ff69b4",
  15936. indianred: "#cd5c5c",
  15937. indigo: "#4b0082",
  15938. ivory: "#fffff0",
  15939. khaki: "#f0e68c",
  15940. lavenderblush: "#fff0f5",
  15941. lavender: "#e6e6fa",
  15942. lawngreen: "#7cfc00",
  15943. lemonchiffon: "#fffacd",
  15944. lightblue: "#add8e6",
  15945. lightcoral: "#f08080",
  15946. lightcyan: "#e0ffff",
  15947. lightgoldenrodyellow: "#fafad2",
  15948. lightgray: "#d3d3d3",
  15949. lightgreen: "#90ee90",
  15950. lightgrey: "#d3d3d3",
  15951. lightpink: "#ffb6c1",
  15952. lightsalmon: "#ffa07a",
  15953. lightseagreen: "#20b2aa",
  15954. lightskyblue: "#87cefa",
  15955. lightslategray: "#778899",
  15956. lightslategrey: "#778899",
  15957. lightsteelblue: "#b0c4de",
  15958. lightyellow: "#ffffe0",
  15959. lime: "#00ff00",
  15960. limegreen: "#32cd32",
  15961. linen: "#faf0e6",
  15962. magenta: "#ff00ff",
  15963. maroon: "#800000",
  15964. mediumaquamarine: "#66cdaa",
  15965. mediumblue: "#0000cd",
  15966. mediumorchid: "#ba55d3",
  15967. mediumpurple: "#9370db",
  15968. mediumseagreen: "#3cb371",
  15969. mediumslateblue: "#7b68ee",
  15970. mediumspringgreen: "#00fa9a",
  15971. mediumturquoise: "#48d1cc",
  15972. mediumvioletred: "#c71585",
  15973. midnightblue: "#191970",
  15974. mintcream: "#f5fffa",
  15975. mistyrose: "#ffe4e1",
  15976. moccasin: "#ffe4b5",
  15977. navajowhite: "#ffdead",
  15978. navy: "#000080",
  15979. oldlace: "#fdf5e6",
  15980. olive: "#808000",
  15981. olivedrab: "#6b8e23",
  15982. orange: "#ffa500",
  15983. orangered: "#ff4500",
  15984. orchid: "#da70d6",
  15985. palegoldenrod: "#eee8aa",
  15986. palegreen: "#98fb98",
  15987. paleturquoise: "#afeeee",
  15988. palevioletred: "#db7093",
  15989. papayawhip: "#ffefd5",
  15990. peachpuff: "#ffdab9",
  15991. peru: "#cd853f",
  15992. pink: "#ffc0cb",
  15993. plum: "#dda0dd",
  15994. powderblue: "#b0e0e6",
  15995. purple: "#800080",
  15996. rebeccapurple: "#663399",
  15997. red: "#ff0000",
  15998. rosybrown: "#bc8f8f",
  15999. royalblue: "#4169e1",
  16000. saddlebrown: "#8b4513",
  16001. salmon: "#fa8072",
  16002. sandybrown: "#f4a460",
  16003. seagreen: "#2e8b57",
  16004. seashell: "#fff5ee",
  16005. sienna: "#a0522d",
  16006. silver: "#c0c0c0",
  16007. skyblue: "#87ceeb",
  16008. slateblue: "#6a5acd",
  16009. slategray: "#708090",
  16010. slategrey: "#708090",
  16011. snow: "#fffafa",
  16012. springgreen: "#00ff7f",
  16013. steelblue: "#4682b4",
  16014. tan: "#d2b48c",
  16015. teal: "#008080",
  16016. thistle: "#d8bfd8",
  16017. tomato: "#ff6347",
  16018. turquoise: "#40e0d0",
  16019. violet: "#ee82ee",
  16020. wheat: "#f5deb3",
  16021. white: "#ffffff",
  16022. whitesmoke: "#f5f5f5",
  16023. yellow: "#ffff00",
  16024. yellowgreen: "#9acd32"
  16025. };
  16026. // node_modules/@ctrl/tinycolor/dist/module/format-input.js
  16027. function inputToRGB(color) {
  16028. var rgb = { r: 0, g: 0, b: 0 };
  16029. var a2 = 1;
  16030. var s2 = null;
  16031. var v2 = null;
  16032. var l2 = null;
  16033. var ok = false;
  16034. var format2 = false;
  16035. if (typeof color === "string") {
  16036. color = stringInputToObject(color);
  16037. }
  16038. if (typeof color === "object") {
  16039. if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
  16040. rgb = rgbToRgb(color.r, color.g, color.b);
  16041. ok = true;
  16042. format2 = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  16043. } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
  16044. s2 = convertToPercentage(color.s);
  16045. v2 = convertToPercentage(color.v);
  16046. rgb = hsvToRgb(color.h, s2, v2);
  16047. ok = true;
  16048. format2 = "hsv";
  16049. } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
  16050. s2 = convertToPercentage(color.s);
  16051. l2 = convertToPercentage(color.l);
  16052. rgb = hslToRgb(color.h, s2, l2);
  16053. ok = true;
  16054. format2 = "hsl";
  16055. }
  16056. if (Object.prototype.hasOwnProperty.call(color, "a")) {
  16057. a2 = color.a;
  16058. }
  16059. }
  16060. a2 = boundAlpha(a2);
  16061. return {
  16062. ok,
  16063. format: color.format || format2,
  16064. r: Math.min(255, Math.max(rgb.r, 0)),
  16065. g: Math.min(255, Math.max(rgb.g, 0)),
  16066. b: Math.min(255, Math.max(rgb.b, 0)),
  16067. a: a2
  16068. };
  16069. }
  16070. var CSS_INTEGER = "[-\\+]?\\d+%?";
  16071. var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
  16072. var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
  16073. var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
  16074. var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
  16075. var matchers = {
  16076. CSS_UNIT: new RegExp(CSS_UNIT),
  16077. rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
  16078. rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
  16079. hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
  16080. hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
  16081. hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
  16082. hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
  16083. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  16084. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  16085. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  16086. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  16087. };
  16088. function stringInputToObject(color) {
  16089. color = color.trim().toLowerCase();
  16090. if (color.length === 0) {
  16091. return false;
  16092. }
  16093. var named = false;
  16094. if (names[color]) {
  16095. color = names[color];
  16096. named = true;
  16097. } else if (color === "transparent") {
  16098. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  16099. }
  16100. var match = matchers.rgb.exec(color);
  16101. if (match) {
  16102. return { r: match[1], g: match[2], b: match[3] };
  16103. }
  16104. match = matchers.rgba.exec(color);
  16105. if (match) {
  16106. return { r: match[1], g: match[2], b: match[3], a: match[4] };
  16107. }
  16108. match = matchers.hsl.exec(color);
  16109. if (match) {
  16110. return { h: match[1], s: match[2], l: match[3] };
  16111. }
  16112. match = matchers.hsla.exec(color);
  16113. if (match) {
  16114. return { h: match[1], s: match[2], l: match[3], a: match[4] };
  16115. }
  16116. match = matchers.hsv.exec(color);
  16117. if (match) {
  16118. return { h: match[1], s: match[2], v: match[3] };
  16119. }
  16120. match = matchers.hsva.exec(color);
  16121. if (match) {
  16122. return { h: match[1], s: match[2], v: match[3], a: match[4] };
  16123. }
  16124. match = matchers.hex8.exec(color);
  16125. if (match) {
  16126. return {
  16127. r: parseIntFromHex(match[1]),
  16128. g: parseIntFromHex(match[2]),
  16129. b: parseIntFromHex(match[3]),
  16130. a: convertHexToDecimal(match[4]),
  16131. format: named ? "name" : "hex8"
  16132. };
  16133. }
  16134. match = matchers.hex6.exec(color);
  16135. if (match) {
  16136. return {
  16137. r: parseIntFromHex(match[1]),
  16138. g: parseIntFromHex(match[2]),
  16139. b: parseIntFromHex(match[3]),
  16140. format: named ? "name" : "hex"
  16141. };
  16142. }
  16143. match = matchers.hex4.exec(color);
  16144. if (match) {
  16145. return {
  16146. r: parseIntFromHex(match[1] + match[1]),
  16147. g: parseIntFromHex(match[2] + match[2]),
  16148. b: parseIntFromHex(match[3] + match[3]),
  16149. a: convertHexToDecimal(match[4] + match[4]),
  16150. format: named ? "name" : "hex8"
  16151. };
  16152. }
  16153. match = matchers.hex3.exec(color);
  16154. if (match) {
  16155. return {
  16156. r: parseIntFromHex(match[1] + match[1]),
  16157. g: parseIntFromHex(match[2] + match[2]),
  16158. b: parseIntFromHex(match[3] + match[3]),
  16159. format: named ? "name" : "hex"
  16160. };
  16161. }
  16162. return false;
  16163. }
  16164. function isValidCSSUnit(color) {
  16165. return Boolean(matchers.CSS_UNIT.exec(String(color)));
  16166. }
  16167. // node_modules/@ctrl/tinycolor/dist/module/index.js
  16168. var TinyColor = function() {
  16169. function TinyColor2(color, opts) {
  16170. if (color === void 0) {
  16171. color = "";
  16172. }
  16173. if (opts === void 0) {
  16174. opts = {};
  16175. }
  16176. var _a2;
  16177. if (color instanceof TinyColor2) {
  16178. return color;
  16179. }
  16180. if (typeof color === "number") {
  16181. color = numberInputToObject(color);
  16182. }
  16183. this.originalInput = color;
  16184. var rgb = inputToRGB(color);
  16185. this.originalInput = color;
  16186. this.r = rgb.r;
  16187. this.g = rgb.g;
  16188. this.b = rgb.b;
  16189. this.a = rgb.a;
  16190. this.roundA = Math.round(100 * this.a) / 100;
  16191. this.format = (_a2 = opts.format) !== null && _a2 !== void 0 ? _a2 : rgb.format;
  16192. this.gradientType = opts.gradientType;
  16193. if (this.r < 1) {
  16194. this.r = Math.round(this.r);
  16195. }
  16196. if (this.g < 1) {
  16197. this.g = Math.round(this.g);
  16198. }
  16199. if (this.b < 1) {
  16200. this.b = Math.round(this.b);
  16201. }
  16202. this.isValid = rgb.ok;
  16203. }
  16204. TinyColor2.prototype.isDark = function() {
  16205. return this.getBrightness() < 128;
  16206. };
  16207. TinyColor2.prototype.isLight = function() {
  16208. return !this.isDark();
  16209. };
  16210. TinyColor2.prototype.getBrightness = function() {
  16211. var rgb = this.toRgb();
  16212. return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
  16213. };
  16214. TinyColor2.prototype.getLuminance = function() {
  16215. var rgb = this.toRgb();
  16216. var R2;
  16217. var G2;
  16218. var B2;
  16219. var RsRGB = rgb.r / 255;
  16220. var GsRGB = rgb.g / 255;
  16221. var BsRGB = rgb.b / 255;
  16222. if (RsRGB <= 0.03928) {
  16223. R2 = RsRGB / 12.92;
  16224. } else {
  16225. R2 = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
  16226. }
  16227. if (GsRGB <= 0.03928) {
  16228. G2 = GsRGB / 12.92;
  16229. } else {
  16230. G2 = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
  16231. }
  16232. if (BsRGB <= 0.03928) {
  16233. B2 = BsRGB / 12.92;
  16234. } else {
  16235. B2 = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
  16236. }
  16237. return 0.2126 * R2 + 0.7152 * G2 + 0.0722 * B2;
  16238. };
  16239. TinyColor2.prototype.getAlpha = function() {
  16240. return this.a;
  16241. };
  16242. TinyColor2.prototype.setAlpha = function(alpha) {
  16243. this.a = boundAlpha(alpha);
  16244. this.roundA = Math.round(100 * this.a) / 100;
  16245. return this;
  16246. };
  16247. TinyColor2.prototype.isMonochrome = function() {
  16248. var s2 = this.toHsl().s;
  16249. return s2 === 0;
  16250. };
  16251. TinyColor2.prototype.toHsv = function() {
  16252. var hsv = rgbToHsv(this.r, this.g, this.b);
  16253. return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
  16254. };
  16255. TinyColor2.prototype.toHsvString = function() {
  16256. var hsv = rgbToHsv(this.r, this.g, this.b);
  16257. var h3 = Math.round(hsv.h * 360);
  16258. var s2 = Math.round(hsv.s * 100);
  16259. var v2 = Math.round(hsv.v * 100);
  16260. return this.a === 1 ? "hsv(".concat(h3, ", ").concat(s2, "%, ").concat(v2, "%)") : "hsva(".concat(h3, ", ").concat(s2, "%, ").concat(v2, "%, ").concat(this.roundA, ")");
  16261. };
  16262. TinyColor2.prototype.toHsl = function() {
  16263. var hsl = rgbToHsl(this.r, this.g, this.b);
  16264. return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };
  16265. };
  16266. TinyColor2.prototype.toHslString = function() {
  16267. var hsl = rgbToHsl(this.r, this.g, this.b);
  16268. var h3 = Math.round(hsl.h * 360);
  16269. var s2 = Math.round(hsl.s * 100);
  16270. var l2 = Math.round(hsl.l * 100);
  16271. return this.a === 1 ? "hsl(".concat(h3, ", ").concat(s2, "%, ").concat(l2, "%)") : "hsla(".concat(h3, ", ").concat(s2, "%, ").concat(l2, "%, ").concat(this.roundA, ")");
  16272. };
  16273. TinyColor2.prototype.toHex = function(allow3Char) {
  16274. if (allow3Char === void 0) {
  16275. allow3Char = false;
  16276. }
  16277. return rgbToHex(this.r, this.g, this.b, allow3Char);
  16278. };
  16279. TinyColor2.prototype.toHexString = function(allow3Char) {
  16280. if (allow3Char === void 0) {
  16281. allow3Char = false;
  16282. }
  16283. return "#" + this.toHex(allow3Char);
  16284. };
  16285. TinyColor2.prototype.toHex8 = function(allow4Char) {
  16286. if (allow4Char === void 0) {
  16287. allow4Char = false;
  16288. }
  16289. return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
  16290. };
  16291. TinyColor2.prototype.toHex8String = function(allow4Char) {
  16292. if (allow4Char === void 0) {
  16293. allow4Char = false;
  16294. }
  16295. return "#" + this.toHex8(allow4Char);
  16296. };
  16297. TinyColor2.prototype.toRgb = function() {
  16298. return {
  16299. r: Math.round(this.r),
  16300. g: Math.round(this.g),
  16301. b: Math.round(this.b),
  16302. a: this.a
  16303. };
  16304. };
  16305. TinyColor2.prototype.toRgbString = function() {
  16306. var r = Math.round(this.r);
  16307. var g = Math.round(this.g);
  16308. var b2 = Math.round(this.b);
  16309. return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b2, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b2, ", ").concat(this.roundA, ")");
  16310. };
  16311. TinyColor2.prototype.toPercentageRgb = function() {
  16312. var fmt = function(x2) {
  16313. return "".concat(Math.round(bound01(x2, 255) * 100), "%");
  16314. };
  16315. return {
  16316. r: fmt(this.r),
  16317. g: fmt(this.g),
  16318. b: fmt(this.b),
  16319. a: this.a
  16320. };
  16321. };
  16322. TinyColor2.prototype.toPercentageRgbString = function() {
  16323. var rnd = function(x2) {
  16324. return Math.round(bound01(x2, 255) * 100);
  16325. };
  16326. return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
  16327. };
  16328. TinyColor2.prototype.toName = function() {
  16329. if (this.a === 0) {
  16330. return "transparent";
  16331. }
  16332. if (this.a < 1) {
  16333. return false;
  16334. }
  16335. var hex2 = "#" + rgbToHex(this.r, this.g, this.b, false);
  16336. for (var _i = 0, _a2 = Object.entries(names); _i < _a2.length; _i++) {
  16337. var _b = _a2[_i], key = _b[0], value = _b[1];
  16338. if (hex2 === value) {
  16339. return key;
  16340. }
  16341. }
  16342. return false;
  16343. };
  16344. TinyColor2.prototype.toString = function(format2) {
  16345. var formatSet = Boolean(format2);
  16346. format2 = format2 !== null && format2 !== void 0 ? format2 : this.format;
  16347. var formattedString = false;
  16348. var hasAlpha = this.a < 1 && this.a >= 0;
  16349. var needsAlphaFormat = !formatSet && hasAlpha && (format2.startsWith("hex") || format2 === "name");
  16350. if (needsAlphaFormat) {
  16351. if (format2 === "name" && this.a === 0) {
  16352. return this.toName();
  16353. }
  16354. return this.toRgbString();
  16355. }
  16356. if (format2 === "rgb") {
  16357. formattedString = this.toRgbString();
  16358. }
  16359. if (format2 === "prgb") {
  16360. formattedString = this.toPercentageRgbString();
  16361. }
  16362. if (format2 === "hex" || format2 === "hex6") {
  16363. formattedString = this.toHexString();
  16364. }
  16365. if (format2 === "hex3") {
  16366. formattedString = this.toHexString(true);
  16367. }
  16368. if (format2 === "hex4") {
  16369. formattedString = this.toHex8String(true);
  16370. }
  16371. if (format2 === "hex8") {
  16372. formattedString = this.toHex8String();
  16373. }
  16374. if (format2 === "name") {
  16375. formattedString = this.toName();
  16376. }
  16377. if (format2 === "hsl") {
  16378. formattedString = this.toHslString();
  16379. }
  16380. if (format2 === "hsv") {
  16381. formattedString = this.toHsvString();
  16382. }
  16383. return formattedString || this.toHexString();
  16384. };
  16385. TinyColor2.prototype.toNumber = function() {
  16386. return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
  16387. };
  16388. TinyColor2.prototype.clone = function() {
  16389. return new TinyColor2(this.toString());
  16390. };
  16391. TinyColor2.prototype.lighten = function(amount) {
  16392. if (amount === void 0) {
  16393. amount = 10;
  16394. }
  16395. var hsl = this.toHsl();
  16396. hsl.l += amount / 100;
  16397. hsl.l = clamp01(hsl.l);
  16398. return new TinyColor2(hsl);
  16399. };
  16400. TinyColor2.prototype.brighten = function(amount) {
  16401. if (amount === void 0) {
  16402. amount = 10;
  16403. }
  16404. var rgb = this.toRgb();
  16405. rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
  16406. rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
  16407. rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
  16408. return new TinyColor2(rgb);
  16409. };
  16410. TinyColor2.prototype.darken = function(amount) {
  16411. if (amount === void 0) {
  16412. amount = 10;
  16413. }
  16414. var hsl = this.toHsl();
  16415. hsl.l -= amount / 100;
  16416. hsl.l = clamp01(hsl.l);
  16417. return new TinyColor2(hsl);
  16418. };
  16419. TinyColor2.prototype.tint = function(amount) {
  16420. if (amount === void 0) {
  16421. amount = 10;
  16422. }
  16423. return this.mix("white", amount);
  16424. };
  16425. TinyColor2.prototype.shade = function(amount) {
  16426. if (amount === void 0) {
  16427. amount = 10;
  16428. }
  16429. return this.mix("black", amount);
  16430. };
  16431. TinyColor2.prototype.desaturate = function(amount) {
  16432. if (amount === void 0) {
  16433. amount = 10;
  16434. }
  16435. var hsl = this.toHsl();
  16436. hsl.s -= amount / 100;
  16437. hsl.s = clamp01(hsl.s);
  16438. return new TinyColor2(hsl);
  16439. };
  16440. TinyColor2.prototype.saturate = function(amount) {
  16441. if (amount === void 0) {
  16442. amount = 10;
  16443. }
  16444. var hsl = this.toHsl();
  16445. hsl.s += amount / 100;
  16446. hsl.s = clamp01(hsl.s);
  16447. return new TinyColor2(hsl);
  16448. };
  16449. TinyColor2.prototype.greyscale = function() {
  16450. return this.desaturate(100);
  16451. };
  16452. TinyColor2.prototype.spin = function(amount) {
  16453. var hsl = this.toHsl();
  16454. var hue = (hsl.h + amount) % 360;
  16455. hsl.h = hue < 0 ? 360 + hue : hue;
  16456. return new TinyColor2(hsl);
  16457. };
  16458. TinyColor2.prototype.mix = function(color, amount) {
  16459. if (amount === void 0) {
  16460. amount = 50;
  16461. }
  16462. var rgb1 = this.toRgb();
  16463. var rgb2 = new TinyColor2(color).toRgb();
  16464. var p2 = amount / 100;
  16465. var rgba = {
  16466. r: (rgb2.r - rgb1.r) * p2 + rgb1.r,
  16467. g: (rgb2.g - rgb1.g) * p2 + rgb1.g,
  16468. b: (rgb2.b - rgb1.b) * p2 + rgb1.b,
  16469. a: (rgb2.a - rgb1.a) * p2 + rgb1.a
  16470. };
  16471. return new TinyColor2(rgba);
  16472. };
  16473. TinyColor2.prototype.analogous = function(results, slices) {
  16474. if (results === void 0) {
  16475. results = 6;
  16476. }
  16477. if (slices === void 0) {
  16478. slices = 30;
  16479. }
  16480. var hsl = this.toHsl();
  16481. var part = 360 / slices;
  16482. var ret = [this];
  16483. for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) {
  16484. hsl.h = (hsl.h + part) % 360;
  16485. ret.push(new TinyColor2(hsl));
  16486. }
  16487. return ret;
  16488. };
  16489. TinyColor2.prototype.complement = function() {
  16490. var hsl = this.toHsl();
  16491. hsl.h = (hsl.h + 180) % 360;
  16492. return new TinyColor2(hsl);
  16493. };
  16494. TinyColor2.prototype.monochromatic = function(results) {
  16495. if (results === void 0) {
  16496. results = 6;
  16497. }
  16498. var hsv = this.toHsv();
  16499. var h3 = hsv.h;
  16500. var s2 = hsv.s;
  16501. var v2 = hsv.v;
  16502. var res = [];
  16503. var modification = 1 / results;
  16504. while (results--) {
  16505. res.push(new TinyColor2({ h: h3, s: s2, v: v2 }));
  16506. v2 = (v2 + modification) % 1;
  16507. }
  16508. return res;
  16509. };
  16510. TinyColor2.prototype.splitcomplement = function() {
  16511. var hsl = this.toHsl();
  16512. var h3 = hsl.h;
  16513. return [
  16514. this,
  16515. new TinyColor2({ h: (h3 + 72) % 360, s: hsl.s, l: hsl.l }),
  16516. new TinyColor2({ h: (h3 + 216) % 360, s: hsl.s, l: hsl.l })
  16517. ];
  16518. };
  16519. TinyColor2.prototype.onBackground = function(background) {
  16520. var fg = this.toRgb();
  16521. var bg = new TinyColor2(background).toRgb();
  16522. return new TinyColor2({
  16523. r: bg.r + (fg.r - bg.r) * fg.a,
  16524. g: bg.g + (fg.g - bg.g) * fg.a,
  16525. b: bg.b + (fg.b - bg.b) * fg.a
  16526. });
  16527. };
  16528. TinyColor2.prototype.triad = function() {
  16529. return this.polyad(3);
  16530. };
  16531. TinyColor2.prototype.tetrad = function() {
  16532. return this.polyad(4);
  16533. };
  16534. TinyColor2.prototype.polyad = function(n) {
  16535. var hsl = this.toHsl();
  16536. var h3 = hsl.h;
  16537. var result2 = [this];
  16538. var increment = 360 / n;
  16539. for (var i = 1; i < n; i++) {
  16540. result2.push(new TinyColor2({ h: (h3 + i * increment) % 360, s: hsl.s, l: hsl.l }));
  16541. }
  16542. return result2;
  16543. };
  16544. TinyColor2.prototype.equals = function(color) {
  16545. return this.toRgbString() === new TinyColor2(color).toRgbString();
  16546. };
  16547. return TinyColor2;
  16548. }();
  16549. // node_modules/element-plus/es/components/button/src/button-custom.mjs
  16550. function darken(color, amount = 20) {
  16551. return color.mix("#141414", amount).toString();
  16552. }
  16553. function useButtonCustomStyle(props) {
  16554. const _disabled = useDisabled();
  16555. const ns2 = useNamespace("button");
  16556. return computed2(() => {
  16557. let styles = {};
  16558. const buttonColor = props.color;
  16559. if (buttonColor) {
  16560. const color = new TinyColor(buttonColor);
  16561. const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
  16562. if (props.plain) {
  16563. styles = ns2.cssVarBlock({
  16564. "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
  16565. "text-color": buttonColor,
  16566. "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
  16567. "hover-text-color": `var(${ns2.cssVarName("color-white")})`,
  16568. "hover-bg-color": buttonColor,
  16569. "hover-border-color": buttonColor,
  16570. "active-bg-color": activeBgColor,
  16571. "active-text-color": `var(${ns2.cssVarName("color-white")})`,
  16572. "active-border-color": activeBgColor
  16573. });
  16574. if (_disabled.value) {
  16575. styles[ns2.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
  16576. styles[ns2.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
  16577. styles[ns2.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
  16578. }
  16579. } else {
  16580. const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
  16581. const textColor = color.isDark() ? `var(${ns2.cssVarName("color-white")})` : `var(${ns2.cssVarName("color-black")})`;
  16582. styles = ns2.cssVarBlock({
  16583. "bg-color": buttonColor,
  16584. "text-color": textColor,
  16585. "border-color": buttonColor,
  16586. "hover-bg-color": hoverBgColor,
  16587. "hover-text-color": textColor,
  16588. "hover-border-color": hoverBgColor,
  16589. "active-bg-color": activeBgColor,
  16590. "active-border-color": activeBgColor
  16591. });
  16592. if (_disabled.value) {
  16593. const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
  16594. styles[ns2.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
  16595. styles[ns2.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns2.cssVarName("color-white")})`;
  16596. styles[ns2.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
  16597. }
  16598. }
  16599. }
  16600. return styles;
  16601. });
  16602. }
  16603. // node_modules/element-plus/es/components/button/src/button2.mjs
  16604. var _hoisted_16 = ["aria-disabled", "disabled", "autofocus", "type"];
  16605. var __default__19 = defineComponent({
  16606. name: "ElButton"
  16607. });
  16608. var _sfc_main22 = defineComponent({
  16609. ...__default__19,
  16610. props: buttonProps,
  16611. emits: buttonEmits,
  16612. setup(__props, { expose, emit }) {
  16613. const props = __props;
  16614. const buttonStyle = useButtonCustomStyle(props);
  16615. const ns2 = useNamespace("button");
  16616. const { _ref, _size, _type, _disabled, shouldAddSpace, handleClick } = useButton(props, emit);
  16617. expose({
  16618. ref: _ref,
  16619. size: _size,
  16620. type: _type,
  16621. disabled: _disabled,
  16622. shouldAddSpace
  16623. });
  16624. return (_ctx, _cache) => {
  16625. return openBlock(), createElementBlock("button", {
  16626. ref_key: "_ref",
  16627. ref: _ref,
  16628. class: normalizeClass([
  16629. unref(ns2).b(),
  16630. unref(ns2).m(unref(_type)),
  16631. unref(ns2).m(unref(_size)),
  16632. unref(ns2).is("disabled", unref(_disabled)),
  16633. unref(ns2).is("loading", _ctx.loading),
  16634. unref(ns2).is("plain", _ctx.plain),
  16635. unref(ns2).is("round", _ctx.round),
  16636. unref(ns2).is("circle", _ctx.circle),
  16637. unref(ns2).is("text", _ctx.text),
  16638. unref(ns2).is("link", _ctx.link),
  16639. unref(ns2).is("has-bg", _ctx.bg)
  16640. ]),
  16641. "aria-disabled": unref(_disabled) || _ctx.loading,
  16642. disabled: unref(_disabled) || _ctx.loading,
  16643. autofocus: _ctx.autofocus,
  16644. type: _ctx.nativeType,
  16645. style: normalizeStyle(unref(buttonStyle)),
  16646. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
  16647. }, [
  16648. _ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  16649. _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
  16650. key: 1,
  16651. class: normalizeClass(unref(ns2).is("loading"))
  16652. }, {
  16653. default: withCtx(() => [
  16654. (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
  16655. ]),
  16656. _: 1
  16657. }, 8, ["class"]))
  16658. ], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  16659. default: withCtx(() => [
  16660. _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
  16661. ]),
  16662. _: 3
  16663. })) : createCommentVNode("v-if", true),
  16664. _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
  16665. key: 2,
  16666. class: normalizeClass({ [unref(ns2).em("text", "expand")]: unref(shouldAddSpace) })
  16667. }, [
  16668. renderSlot(_ctx.$slots, "default")
  16669. ], 2)) : createCommentVNode("v-if", true)
  16670. ], 14, _hoisted_16);
  16671. };
  16672. }
  16673. });
  16674. var Button = _export_sfc(_sfc_main22, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
  16675. // node_modules/element-plus/es/components/button/src/button-group.mjs
  16676. var buttonGroupProps = {
  16677. size: buttonProps.size,
  16678. type: buttonProps.type
  16679. };
  16680. // node_modules/element-plus/es/components/button/src/button-group2.mjs
  16681. var __default__20 = defineComponent({
  16682. name: "ElButtonGroup"
  16683. });
  16684. var _sfc_main23 = defineComponent({
  16685. ...__default__20,
  16686. props: buttonGroupProps,
  16687. setup(__props) {
  16688. const props = __props;
  16689. provide(buttonGroupContextKey, reactive({
  16690. size: toRef(props, "size"),
  16691. type: toRef(props, "type")
  16692. }));
  16693. const ns2 = useNamespace("button");
  16694. return (_ctx, _cache) => {
  16695. return openBlock(), createElementBlock("div", {
  16696. class: normalizeClass(`${unref(ns2).b("group")}`)
  16697. }, [
  16698. renderSlot(_ctx.$slots, "default")
  16699. ], 2);
  16700. };
  16701. }
  16702. });
  16703. var ButtonGroup = _export_sfc(_sfc_main23, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
  16704. // node_modules/element-plus/es/components/button/index.mjs
  16705. var ElButton = withInstall(Button, {
  16706. ButtonGroup
  16707. });
  16708. var ElButtonGroup = withNoopInstall(ButtonGroup);
  16709. // node_modules/element-plus/es/components/time-picker/src/time-picker.mjs
  16710. var import_dayjs4 = __toESM(require_dayjs_min(), 1);
  16711. var import_customParseFormat = __toESM(require_customParseFormat(), 1);
  16712. // node_modules/element-plus/es/components/time-picker/src/constants.mjs
  16713. var timeUnits = ["hours", "minutes", "seconds"];
  16714. var DEFAULT_FORMATS_TIME = "HH:mm:ss";
  16715. var DEFAULT_FORMATS_DATE = "YYYY-MM-DD";
  16716. var DEFAULT_FORMATS_DATEPICKER = {
  16717. date: DEFAULT_FORMATS_DATE,
  16718. dates: DEFAULT_FORMATS_DATE,
  16719. week: "gggg[w]ww",
  16720. year: "YYYY",
  16721. month: "YYYY-MM",
  16722. datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,
  16723. monthrange: "YYYY-MM",
  16724. daterange: DEFAULT_FORMATS_DATE,
  16725. datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`
  16726. };
  16727. // node_modules/element-plus/es/components/time-picker/src/utils.mjs
  16728. var import_dayjs = __toESM(require_dayjs_min(), 1);
  16729. var buildTimeList = (value, bound) => {
  16730. return [
  16731. value > 0 ? value - 1 : void 0,
  16732. value,
  16733. value < bound ? value + 1 : void 0
  16734. ];
  16735. };
  16736. var rangeArr = (n) => Array.from(Array.from({ length: n }).keys());
  16737. var extractDateFormat = (format2) => {
  16738. return format2.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
  16739. };
  16740. var extractTimeFormat = (format2) => {
  16741. return format2.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim();
  16742. };
  16743. var dateEquals = function(a2, b2) {
  16744. const aIsDate = isDate(a2);
  16745. const bIsDate = isDate(b2);
  16746. if (aIsDate && bIsDate) {
  16747. return a2.getTime() === b2.getTime();
  16748. }
  16749. if (!aIsDate && !bIsDate) {
  16750. return a2 === b2;
  16751. }
  16752. return false;
  16753. };
  16754. var valueEquals = function(a2, b2) {
  16755. const aIsArray = isArray(a2);
  16756. const bIsArray = isArray(b2);
  16757. if (aIsArray && bIsArray) {
  16758. if (a2.length !== b2.length) {
  16759. return false;
  16760. }
  16761. return a2.every((item, index) => dateEquals(item, b2[index]));
  16762. }
  16763. if (!aIsArray && !bIsArray) {
  16764. return dateEquals(a2, b2);
  16765. }
  16766. return false;
  16767. };
  16768. var parseDate = function(date5, format2, lang) {
  16769. const day = isEmpty2(format2) || format2 === "x" ? (0, import_dayjs.default)(date5).locale(lang) : (0, import_dayjs.default)(date5, format2).locale(lang);
  16770. return day.isValid() ? day : void 0;
  16771. };
  16772. var formatter = function(date5, format2, lang) {
  16773. if (isEmpty2(format2))
  16774. return date5;
  16775. if (format2 === "x")
  16776. return +date5;
  16777. return (0, import_dayjs.default)(date5).locale(lang).format(format2);
  16778. };
  16779. var makeList = (total2, method5) => {
  16780. var _a2;
  16781. const arr = [];
  16782. const disabledArr = method5 == null ? void 0 : method5();
  16783. for (let i = 0; i < total2; i++) {
  16784. arr.push((_a2 = disabledArr == null ? void 0 : disabledArr.includes(i)) != null ? _a2 : false);
  16785. }
  16786. return arr;
  16787. };
  16788. // node_modules/element-plus/es/components/time-picker/src/props/shared.mjs
  16789. var disabledTimeListsProps = buildProps({
  16790. disabledHours: {
  16791. type: definePropType(Function)
  16792. },
  16793. disabledMinutes: {
  16794. type: definePropType(Function)
  16795. },
  16796. disabledSeconds: {
  16797. type: definePropType(Function)
  16798. }
  16799. });
  16800. var timePanelSharedProps = buildProps({
  16801. visible: Boolean,
  16802. actualVisible: {
  16803. type: Boolean,
  16804. default: void 0
  16805. },
  16806. format: {
  16807. type: String,
  16808. default: ""
  16809. }
  16810. });
  16811. // node_modules/element-plus/es/components/time-picker/src/common/props.mjs
  16812. var timePickerDefaultProps = buildProps({
  16813. id: {
  16814. type: definePropType([Array, String])
  16815. },
  16816. name: {
  16817. type: definePropType([Array, String]),
  16818. default: ""
  16819. },
  16820. popperClass: {
  16821. type: String,
  16822. default: ""
  16823. },
  16824. format: String,
  16825. valueFormat: String,
  16826. type: {
  16827. type: String,
  16828. default: ""
  16829. },
  16830. clearable: {
  16831. type: Boolean,
  16832. default: true
  16833. },
  16834. clearIcon: {
  16835. type: definePropType([String, Object]),
  16836. default: circle_close_default
  16837. },
  16838. editable: {
  16839. type: Boolean,
  16840. default: true
  16841. },
  16842. prefixIcon: {
  16843. type: definePropType([String, Object]),
  16844. default: ""
  16845. },
  16846. size: useSizeProp,
  16847. readonly: {
  16848. type: Boolean,
  16849. default: false
  16850. },
  16851. disabled: {
  16852. type: Boolean,
  16853. default: false
  16854. },
  16855. placeholder: {
  16856. type: String,
  16857. default: ""
  16858. },
  16859. popperOptions: {
  16860. type: definePropType(Object),
  16861. default: () => ({})
  16862. },
  16863. modelValue: {
  16864. type: definePropType([Date, Array, String, Number]),
  16865. default: ""
  16866. },
  16867. rangeSeparator: {
  16868. type: String,
  16869. default: "-"
  16870. },
  16871. startPlaceholder: String,
  16872. endPlaceholder: String,
  16873. defaultValue: {
  16874. type: definePropType([Date, Array])
  16875. },
  16876. defaultTime: {
  16877. type: definePropType([Date, Array])
  16878. },
  16879. isRange: {
  16880. type: Boolean,
  16881. default: false
  16882. },
  16883. ...disabledTimeListsProps,
  16884. disabledDate: {
  16885. type: Function
  16886. },
  16887. cellClassName: {
  16888. type: Function
  16889. },
  16890. shortcuts: {
  16891. type: Array,
  16892. default: () => []
  16893. },
  16894. arrowControl: {
  16895. type: Boolean,
  16896. default: false
  16897. },
  16898. label: {
  16899. type: String,
  16900. default: void 0
  16901. },
  16902. tabindex: {
  16903. type: definePropType([String, Number]),
  16904. default: 0
  16905. },
  16906. validateEvent: {
  16907. type: Boolean,
  16908. default: true
  16909. },
  16910. unlinkPanels: Boolean
  16911. });
  16912. // node_modules/element-plus/es/components/time-picker/src/common/picker.mjs
  16913. var _hoisted_17 = ["id", "name", "placeholder", "value", "disabled", "readonly"];
  16914. var _hoisted_24 = ["id", "name", "placeholder", "value", "disabled", "readonly"];
  16915. var __default__21 = defineComponent({
  16916. name: "Picker"
  16917. });
  16918. var _sfc_main24 = defineComponent({
  16919. ...__default__21,
  16920. props: timePickerDefaultProps,
  16921. emits: [
  16922. "update:modelValue",
  16923. "change",
  16924. "focus",
  16925. "blur",
  16926. "calendar-change",
  16927. "panel-change",
  16928. "visible-change",
  16929. "keydown"
  16930. ],
  16931. setup(__props, { expose, emit }) {
  16932. const props = __props;
  16933. const { lang } = useLocale();
  16934. const nsDate = useNamespace("date");
  16935. const nsInput = useNamespace("input");
  16936. const nsRange = useNamespace("range");
  16937. const { form, formItem } = useFormItem();
  16938. const elPopperOptions = inject("ElPopperOptions", {});
  16939. const refPopper = ref();
  16940. const inputRef = ref();
  16941. const pickerVisible = ref(false);
  16942. const pickerActualVisible = ref(false);
  16943. const valueOnOpen = ref(null);
  16944. let hasJustTabExitedInput = false;
  16945. let ignoreFocusEvent = false;
  16946. watch(pickerVisible, (val) => {
  16947. if (!val) {
  16948. userInput.value = null;
  16949. nextTick(() => {
  16950. emitChange(props.modelValue);
  16951. });
  16952. } else {
  16953. nextTick(() => {
  16954. if (val) {
  16955. valueOnOpen.value = props.modelValue;
  16956. }
  16957. });
  16958. }
  16959. });
  16960. const emitChange = (val, isClear) => {
  16961. if (isClear || !valueEquals(val, valueOnOpen.value)) {
  16962. emit("change", val);
  16963. props.validateEvent && (formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err)));
  16964. }
  16965. };
  16966. const emitInput = (input) => {
  16967. if (!valueEquals(props.modelValue, input)) {
  16968. let formatted;
  16969. if (isArray(input)) {
  16970. formatted = input.map((item) => formatter(item, props.valueFormat, lang.value));
  16971. } else if (input) {
  16972. formatted = formatter(input, props.valueFormat, lang.value);
  16973. }
  16974. emit("update:modelValue", input ? formatted : input, lang.value);
  16975. }
  16976. };
  16977. const emitKeydown = (e) => {
  16978. emit("keydown", e);
  16979. };
  16980. const refInput = computed2(() => {
  16981. if (inputRef.value) {
  16982. const _r = isRangeInput.value ? inputRef.value : inputRef.value.$el;
  16983. return Array.from(_r.querySelectorAll("input"));
  16984. }
  16985. return [];
  16986. });
  16987. const setSelectionRange = (start, end2, pos) => {
  16988. const _inputs = refInput.value;
  16989. if (!_inputs.length)
  16990. return;
  16991. if (!pos || pos === "min") {
  16992. _inputs[0].setSelectionRange(start, end2);
  16993. _inputs[0].focus();
  16994. } else if (pos === "max") {
  16995. _inputs[1].setSelectionRange(start, end2);
  16996. _inputs[1].focus();
  16997. }
  16998. };
  16999. const focusOnInputBox = () => {
  17000. focus(true, true);
  17001. nextTick(() => {
  17002. ignoreFocusEvent = false;
  17003. });
  17004. };
  17005. const onPick = (date5 = "", visible = false) => {
  17006. if (!visible) {
  17007. ignoreFocusEvent = true;
  17008. }
  17009. pickerVisible.value = visible;
  17010. let result2;
  17011. if (isArray(date5)) {
  17012. result2 = date5.map((_2) => _2.toDate());
  17013. } else {
  17014. result2 = date5 ? date5.toDate() : date5;
  17015. }
  17016. userInput.value = null;
  17017. emitInput(result2);
  17018. };
  17019. const onBeforeShow = () => {
  17020. pickerActualVisible.value = true;
  17021. };
  17022. const onShow = () => {
  17023. emit("visible-change", true);
  17024. };
  17025. const onKeydownPopperContent = (event) => {
  17026. if ((event == null ? void 0 : event.key) === EVENT_CODE.esc) {
  17027. focus(true, true);
  17028. }
  17029. };
  17030. const onHide = () => {
  17031. pickerActualVisible.value = false;
  17032. pickerVisible.value = false;
  17033. ignoreFocusEvent = false;
  17034. emit("visible-change", false);
  17035. };
  17036. const handleOpen = () => {
  17037. pickerVisible.value = true;
  17038. };
  17039. const handleClose = () => {
  17040. pickerVisible.value = false;
  17041. };
  17042. const focus = (focusStartInput = true, isIgnoreFocusEvent = false) => {
  17043. ignoreFocusEvent = isIgnoreFocusEvent;
  17044. const [leftInput, rightInput] = unref(refInput);
  17045. let input = leftInput;
  17046. if (!focusStartInput && isRangeInput.value) {
  17047. input = rightInput;
  17048. }
  17049. if (input) {
  17050. input.focus();
  17051. }
  17052. };
  17053. const handleFocusInput = (e) => {
  17054. if (props.readonly || pickerDisabled.value || pickerVisible.value || ignoreFocusEvent) {
  17055. return;
  17056. }
  17057. pickerVisible.value = true;
  17058. emit("focus", e);
  17059. };
  17060. let currentHandleBlurDeferCallback = void 0;
  17061. const handleBlurInput = (e) => {
  17062. const handleBlurDefer = async () => {
  17063. setTimeout(() => {
  17064. var _a2;
  17065. if (currentHandleBlurDeferCallback === handleBlurDefer) {
  17066. if (!(((_a2 = refPopper.value) == null ? void 0 : _a2.isFocusInsideContent()) && !hasJustTabExitedInput) && refInput.value.filter((input) => {
  17067. return input.contains(document.activeElement);
  17068. }).length === 0) {
  17069. handleChange();
  17070. pickerVisible.value = false;
  17071. emit("blur", e);
  17072. props.validateEvent && (formItem == null ? void 0 : formItem.validate("blur").catch((err) => debugWarn(err)));
  17073. }
  17074. hasJustTabExitedInput = false;
  17075. }
  17076. }, 0);
  17077. };
  17078. currentHandleBlurDeferCallback = handleBlurDefer;
  17079. handleBlurDefer();
  17080. };
  17081. const pickerDisabled = computed2(() => {
  17082. return props.disabled || (form == null ? void 0 : form.disabled);
  17083. });
  17084. const parsedValue2 = computed2(() => {
  17085. let dayOrDays;
  17086. if (valueIsEmpty.value) {
  17087. if (pickerOptions.value.getDefaultValue) {
  17088. dayOrDays = pickerOptions.value.getDefaultValue();
  17089. }
  17090. } else {
  17091. if (isArray(props.modelValue)) {
  17092. dayOrDays = props.modelValue.map((d2) => parseDate(d2, props.valueFormat, lang.value));
  17093. } else {
  17094. dayOrDays = parseDate(props.modelValue, props.valueFormat, lang.value);
  17095. }
  17096. }
  17097. if (pickerOptions.value.getRangeAvailableTime) {
  17098. const availableResult = pickerOptions.value.getRangeAvailableTime(dayOrDays);
  17099. if (!isEqual_default(availableResult, dayOrDays)) {
  17100. dayOrDays = availableResult;
  17101. emitInput(isArray(dayOrDays) ? dayOrDays.map((_2) => _2.toDate()) : dayOrDays.toDate());
  17102. }
  17103. }
  17104. if (isArray(dayOrDays) && dayOrDays.some((day) => !day)) {
  17105. dayOrDays = [];
  17106. }
  17107. return dayOrDays;
  17108. });
  17109. const displayValue = computed2(() => {
  17110. if (!pickerOptions.value.panelReady)
  17111. return "";
  17112. const formattedValue = formatDayjsToString(parsedValue2.value);
  17113. if (isArray(userInput.value)) {
  17114. return [
  17115. userInput.value[0] || formattedValue && formattedValue[0] || "",
  17116. userInput.value[1] || formattedValue && formattedValue[1] || ""
  17117. ];
  17118. } else if (userInput.value !== null) {
  17119. return userInput.value;
  17120. }
  17121. if (!isTimePicker.value && valueIsEmpty.value)
  17122. return "";
  17123. if (!pickerVisible.value && valueIsEmpty.value)
  17124. return "";
  17125. if (formattedValue) {
  17126. return isDatesPicker.value ? formattedValue.join(", ") : formattedValue;
  17127. }
  17128. return "";
  17129. });
  17130. const isTimeLikePicker = computed2(() => props.type.includes("time"));
  17131. const isTimePicker = computed2(() => props.type.startsWith("time"));
  17132. const isDatesPicker = computed2(() => props.type === "dates");
  17133. const triggerIcon = computed2(() => props.prefixIcon || (isTimeLikePicker.value ? clock_default : calendar_default));
  17134. const showClose = ref(false);
  17135. const onClearIconClick = (event) => {
  17136. if (props.readonly || pickerDisabled.value)
  17137. return;
  17138. if (showClose.value) {
  17139. event.stopPropagation();
  17140. focusOnInputBox();
  17141. emitInput(null);
  17142. emitChange(null, true);
  17143. showClose.value = false;
  17144. pickerVisible.value = false;
  17145. pickerOptions.value.handleClear && pickerOptions.value.handleClear();
  17146. }
  17147. };
  17148. const valueIsEmpty = computed2(() => {
  17149. const { modelValue } = props;
  17150. return !modelValue || isArray(modelValue) && !modelValue.filter(Boolean).length;
  17151. });
  17152. const onMouseDownInput = async (event) => {
  17153. var _a2;
  17154. if (props.readonly || pickerDisabled.value)
  17155. return;
  17156. if (((_a2 = event.target) == null ? void 0 : _a2.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
  17157. pickerVisible.value = true;
  17158. }
  17159. };
  17160. const onMouseEnter = () => {
  17161. if (props.readonly || pickerDisabled.value)
  17162. return;
  17163. if (!valueIsEmpty.value && props.clearable) {
  17164. showClose.value = true;
  17165. }
  17166. };
  17167. const onMouseLeave = () => {
  17168. showClose.value = false;
  17169. };
  17170. const onTouchStartInput = (event) => {
  17171. var _a2;
  17172. if (props.readonly || pickerDisabled.value)
  17173. return;
  17174. if (((_a2 = event.touches[0].target) == null ? void 0 : _a2.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
  17175. pickerVisible.value = true;
  17176. }
  17177. };
  17178. const isRangeInput = computed2(() => {
  17179. return props.type.includes("range");
  17180. });
  17181. const pickerSize = useSize();
  17182. const popperEl = computed2(() => {
  17183. var _a2, _b;
  17184. return (_b = (_a2 = unref(refPopper)) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef;
  17185. });
  17186. const actualInputRef = computed2(() => {
  17187. var _a2;
  17188. if (unref(isRangeInput)) {
  17189. return unref(inputRef);
  17190. }
  17191. return (_a2 = unref(inputRef)) == null ? void 0 : _a2.$el;
  17192. });
  17193. onClickOutside(actualInputRef, (e) => {
  17194. const unrefedPopperEl = unref(popperEl);
  17195. const inputEl = unref(actualInputRef);
  17196. if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || e.composedPath().includes(inputEl))
  17197. return;
  17198. pickerVisible.value = false;
  17199. });
  17200. const userInput = ref(null);
  17201. const handleChange = () => {
  17202. if (userInput.value) {
  17203. const value = parseUserInputToDayjs(displayValue.value);
  17204. if (value) {
  17205. if (isValidValue3(value)) {
  17206. emitInput(isArray(value) ? value.map((_2) => _2.toDate()) : value.toDate());
  17207. userInput.value = null;
  17208. }
  17209. }
  17210. }
  17211. if (userInput.value === "") {
  17212. emitInput(null);
  17213. emitChange(null);
  17214. userInput.value = null;
  17215. }
  17216. };
  17217. const parseUserInputToDayjs = (value) => {
  17218. if (!value)
  17219. return null;
  17220. return pickerOptions.value.parseUserInput(value);
  17221. };
  17222. const formatDayjsToString = (value) => {
  17223. if (!value)
  17224. return null;
  17225. return pickerOptions.value.formatToString(value);
  17226. };
  17227. const isValidValue3 = (value) => {
  17228. return pickerOptions.value.isValidValue(value);
  17229. };
  17230. const handleKeydownInput = async (event) => {
  17231. if (props.readonly || pickerDisabled.value)
  17232. return;
  17233. const { code } = event;
  17234. emitKeydown(event);
  17235. if (code === EVENT_CODE.esc) {
  17236. if (pickerVisible.value === true) {
  17237. pickerVisible.value = false;
  17238. event.preventDefault();
  17239. event.stopPropagation();
  17240. }
  17241. return;
  17242. }
  17243. if (code === EVENT_CODE.down) {
  17244. if (pickerOptions.value.handleFocusPicker) {
  17245. event.preventDefault();
  17246. event.stopPropagation();
  17247. }
  17248. if (pickerVisible.value === false) {
  17249. pickerVisible.value = true;
  17250. await nextTick();
  17251. }
  17252. if (pickerOptions.value.handleFocusPicker) {
  17253. pickerOptions.value.handleFocusPicker();
  17254. return;
  17255. }
  17256. }
  17257. if (code === EVENT_CODE.tab) {
  17258. hasJustTabExitedInput = true;
  17259. return;
  17260. }
  17261. if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {
  17262. if (userInput.value === null || userInput.value === "" || isValidValue3(parseUserInputToDayjs(displayValue.value))) {
  17263. handleChange();
  17264. pickerVisible.value = false;
  17265. }
  17266. event.stopPropagation();
  17267. return;
  17268. }
  17269. if (userInput.value) {
  17270. event.stopPropagation();
  17271. return;
  17272. }
  17273. if (pickerOptions.value.handleKeydownInput) {
  17274. pickerOptions.value.handleKeydownInput(event);
  17275. }
  17276. };
  17277. const onUserInput = (e) => {
  17278. userInput.value = e;
  17279. if (!pickerVisible.value) {
  17280. pickerVisible.value = true;
  17281. }
  17282. };
  17283. const handleStartInput = (event) => {
  17284. const target2 = event.target;
  17285. if (userInput.value) {
  17286. userInput.value = [target2.value, userInput.value[1]];
  17287. } else {
  17288. userInput.value = [target2.value, null];
  17289. }
  17290. };
  17291. const handleEndInput = (event) => {
  17292. const target2 = event.target;
  17293. if (userInput.value) {
  17294. userInput.value = [userInput.value[0], target2.value];
  17295. } else {
  17296. userInput.value = [null, target2.value];
  17297. }
  17298. };
  17299. const handleStartChange = () => {
  17300. var _a2;
  17301. const values2 = userInput.value;
  17302. const value = parseUserInputToDayjs(values2 && values2[0]);
  17303. const parsedVal = unref(parsedValue2);
  17304. if (value && value.isValid()) {
  17305. userInput.value = [
  17306. formatDayjsToString(value),
  17307. ((_a2 = displayValue.value) == null ? void 0 : _a2[1]) || null
  17308. ];
  17309. const newValue = [value, parsedVal && (parsedVal[1] || null)];
  17310. if (isValidValue3(newValue)) {
  17311. emitInput(newValue);
  17312. userInput.value = null;
  17313. }
  17314. }
  17315. };
  17316. const handleEndChange = () => {
  17317. var _a2;
  17318. const values2 = unref(userInput);
  17319. const value = parseUserInputToDayjs(values2 && values2[1]);
  17320. const parsedVal = unref(parsedValue2);
  17321. if (value && value.isValid()) {
  17322. userInput.value = [
  17323. ((_a2 = unref(displayValue)) == null ? void 0 : _a2[0]) || null,
  17324. formatDayjsToString(value)
  17325. ];
  17326. const newValue = [parsedVal && parsedVal[0], value];
  17327. if (isValidValue3(newValue)) {
  17328. emitInput(newValue);
  17329. userInput.value = null;
  17330. }
  17331. }
  17332. };
  17333. const pickerOptions = ref({});
  17334. const onSetPickerOption = (e) => {
  17335. pickerOptions.value[e[0]] = e[1];
  17336. pickerOptions.value.panelReady = true;
  17337. };
  17338. const onCalendarChange = (e) => {
  17339. emit("calendar-change", e);
  17340. };
  17341. const onPanelChange = (value, mode, view) => {
  17342. emit("panel-change", value, mode, view);
  17343. };
  17344. provide("EP_PICKER_BASE", {
  17345. props
  17346. });
  17347. expose({
  17348. focus,
  17349. handleFocusInput,
  17350. handleBlurInput,
  17351. handleOpen,
  17352. handleClose,
  17353. onPick
  17354. });
  17355. return (_ctx, _cache) => {
  17356. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  17357. ref_key: "refPopper",
  17358. ref: refPopper,
  17359. visible: pickerVisible.value,
  17360. effect: "light",
  17361. pure: "",
  17362. trigger: "click"
  17363. }, _ctx.$attrs, {
  17364. role: "dialog",
  17365. teleported: "",
  17366. transition: `${unref(nsDate).namespace.value}-zoom-in-top`,
  17367. "popper-class": [`${unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass],
  17368. "popper-options": unref(elPopperOptions),
  17369. "fallback-placements": ["bottom", "top", "right", "left"],
  17370. "gpu-acceleration": false,
  17371. "stop-popper-mouse-event": false,
  17372. "hide-after": 0,
  17373. persistent: "",
  17374. onBeforeShow,
  17375. onShow,
  17376. onHide
  17377. }), {
  17378. default: withCtx(() => [
  17379. !unref(isRangeInput) ? (openBlock(), createBlock(unref(ElInput), {
  17380. key: 0,
  17381. id: _ctx.id,
  17382. ref_key: "inputRef",
  17383. ref: inputRef,
  17384. "container-role": "combobox",
  17385. "model-value": unref(displayValue),
  17386. name: _ctx.name,
  17387. size: unref(pickerSize),
  17388. disabled: unref(pickerDisabled),
  17389. placeholder: _ctx.placeholder,
  17390. class: normalizeClass([unref(nsDate).b("editor"), unref(nsDate).bm("editor", _ctx.type), _ctx.$attrs.class]),
  17391. style: normalizeStyle(_ctx.$attrs.style),
  17392. readonly: !_ctx.editable || _ctx.readonly || unref(isDatesPicker) || _ctx.type === "week",
  17393. label: _ctx.label,
  17394. tabindex: _ctx.tabindex,
  17395. "validate-event": false,
  17396. onInput: onUserInput,
  17397. onFocus: handleFocusInput,
  17398. onBlur: handleBlurInput,
  17399. onKeydown: handleKeydownInput,
  17400. onChange: handleChange,
  17401. onMousedown: onMouseDownInput,
  17402. onMouseenter: onMouseEnter,
  17403. onMouseleave: onMouseLeave,
  17404. onTouchstart: onTouchStartInput,
  17405. onClick: _cache[0] || (_cache[0] = withModifiers(() => {
  17406. }, ["stop"]))
  17407. }, {
  17408. prefix: withCtx(() => [
  17409. unref(triggerIcon) ? (openBlock(), createBlock(unref(ElIcon), {
  17410. key: 0,
  17411. class: normalizeClass(unref(nsInput).e("icon")),
  17412. onMousedown: withModifiers(onMouseDownInput, ["prevent"]),
  17413. onTouchstart: onTouchStartInput
  17414. }, {
  17415. default: withCtx(() => [
  17416. (openBlock(), createBlock(resolveDynamicComponent(unref(triggerIcon))))
  17417. ]),
  17418. _: 1
  17419. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)
  17420. ]),
  17421. suffix: withCtx(() => [
  17422. showClose.value && _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  17423. key: 0,
  17424. class: normalizeClass(`${unref(nsInput).e("icon")} clear-icon`),
  17425. onClick: withModifiers(onClearIconClick, ["stop"])
  17426. }, {
  17427. default: withCtx(() => [
  17428. (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
  17429. ]),
  17430. _: 1
  17431. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
  17432. ]),
  17433. _: 1
  17434. }, 8, ["id", "model-value", "name", "size", "disabled", "placeholder", "class", "style", "readonly", "label", "tabindex", "onKeydown"])) : (openBlock(), createElementBlock("div", {
  17435. key: 1,
  17436. ref_key: "inputRef",
  17437. ref: inputRef,
  17438. class: normalizeClass([
  17439. unref(nsDate).b("editor"),
  17440. unref(nsDate).bm("editor", _ctx.type),
  17441. unref(nsInput).e("wrapper"),
  17442. unref(nsDate).is("disabled", unref(pickerDisabled)),
  17443. unref(nsDate).is("active", pickerVisible.value),
  17444. unref(nsRange).b("editor"),
  17445. unref(pickerSize) ? unref(nsRange).bm("editor", unref(pickerSize)) : "",
  17446. _ctx.$attrs.class
  17447. ]),
  17448. style: normalizeStyle(_ctx.$attrs.style),
  17449. onClick: handleFocusInput,
  17450. onMouseenter: onMouseEnter,
  17451. onMouseleave: onMouseLeave,
  17452. onTouchstart: onTouchStartInput,
  17453. onKeydown: handleKeydownInput
  17454. }, [
  17455. unref(triggerIcon) ? (openBlock(), createBlock(unref(ElIcon), {
  17456. key: 0,
  17457. class: normalizeClass([unref(nsInput).e("icon"), unref(nsRange).e("icon")]),
  17458. onMousedown: withModifiers(onMouseDownInput, ["prevent"]),
  17459. onTouchstart: onTouchStartInput
  17460. }, {
  17461. default: withCtx(() => [
  17462. (openBlock(), createBlock(resolveDynamicComponent(unref(triggerIcon))))
  17463. ]),
  17464. _: 1
  17465. }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
  17466. createBaseVNode("input", {
  17467. id: _ctx.id && _ctx.id[0],
  17468. autocomplete: "off",
  17469. name: _ctx.name && _ctx.name[0],
  17470. placeholder: _ctx.startPlaceholder,
  17471. value: unref(displayValue) && unref(displayValue)[0],
  17472. disabled: unref(pickerDisabled),
  17473. readonly: !_ctx.editable || _ctx.readonly,
  17474. class: normalizeClass(unref(nsRange).b("input")),
  17475. onMousedown: onMouseDownInput,
  17476. onInput: handleStartInput,
  17477. onChange: handleStartChange,
  17478. onFocus: handleFocusInput,
  17479. onBlur: handleBlurInput
  17480. }, null, 42, _hoisted_17),
  17481. renderSlot(_ctx.$slots, "range-separator", {}, () => [
  17482. createBaseVNode("span", {
  17483. class: normalizeClass(unref(nsRange).b("separator"))
  17484. }, toDisplayString(_ctx.rangeSeparator), 3)
  17485. ]),
  17486. createBaseVNode("input", {
  17487. id: _ctx.id && _ctx.id[1],
  17488. autocomplete: "off",
  17489. name: _ctx.name && _ctx.name[1],
  17490. placeholder: _ctx.endPlaceholder,
  17491. value: unref(displayValue) && unref(displayValue)[1],
  17492. disabled: unref(pickerDisabled),
  17493. readonly: !_ctx.editable || _ctx.readonly,
  17494. class: normalizeClass(unref(nsRange).b("input")),
  17495. onMousedown: onMouseDownInput,
  17496. onFocus: handleFocusInput,
  17497. onBlur: handleBlurInput,
  17498. onInput: handleEndInput,
  17499. onChange: handleEndChange
  17500. }, null, 42, _hoisted_24),
  17501. _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
  17502. key: 1,
  17503. class: normalizeClass([
  17504. unref(nsInput).e("icon"),
  17505. unref(nsRange).e("close-icon"),
  17506. {
  17507. [unref(nsRange).e("close-icon--hidden")]: !showClose.value
  17508. }
  17509. ]),
  17510. onClick: onClearIconClick
  17511. }, {
  17512. default: withCtx(() => [
  17513. (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
  17514. ]),
  17515. _: 1
  17516. }, 8, ["class"])) : createCommentVNode("v-if", true)
  17517. ], 38))
  17518. ]),
  17519. content: withCtx(() => [
  17520. renderSlot(_ctx.$slots, "default", {
  17521. visible: pickerVisible.value,
  17522. actualVisible: pickerActualVisible.value,
  17523. parsedValue: unref(parsedValue2),
  17524. format: _ctx.format,
  17525. unlinkPanels: _ctx.unlinkPanels,
  17526. type: _ctx.type,
  17527. defaultValue: _ctx.defaultValue,
  17528. onPick,
  17529. onSelectRange: setSelectionRange,
  17530. onSetPickerOption,
  17531. onCalendarChange,
  17532. onPanelChange,
  17533. onKeydown: onKeydownPopperContent,
  17534. onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
  17535. }, ["stop"]))
  17536. })
  17537. ]),
  17538. _: 3
  17539. }, 16, ["visible", "transition", "popper-class", "popper-options"]);
  17540. };
  17541. }
  17542. });
  17543. var CommonPicker = _export_sfc(_sfc_main24, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/common/picker.vue"]]);
  17544. // node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs
  17545. var import_dayjs2 = __toESM(require_dayjs_min(), 1);
  17546. // node_modules/element-plus/es/components/time-picker/src/props/panel-time-picker.mjs
  17547. var panelTimePickerProps = buildProps({
  17548. ...timePanelSharedProps,
  17549. datetimeRole: String,
  17550. parsedValue: {
  17551. type: definePropType(Object)
  17552. }
  17553. });
  17554. // node_modules/element-plus/es/components/time-picker/src/composables/use-time-panel.mjs
  17555. var useTimePanel = ({
  17556. getAvailableHours,
  17557. getAvailableMinutes,
  17558. getAvailableSeconds
  17559. }) => {
  17560. const getAvailableTime = (date5, role, first, compareDate) => {
  17561. const availableTimeGetters = {
  17562. hour: getAvailableHours,
  17563. minute: getAvailableMinutes,
  17564. second: getAvailableSeconds
  17565. };
  17566. let result2 = date5;
  17567. ["hour", "minute", "second"].forEach((type4) => {
  17568. if (availableTimeGetters[type4]) {
  17569. let availableTimeSlots;
  17570. const method5 = availableTimeGetters[type4];
  17571. switch (type4) {
  17572. case "minute": {
  17573. availableTimeSlots = method5(result2.hour(), role, compareDate);
  17574. break;
  17575. }
  17576. case "second": {
  17577. availableTimeSlots = method5(result2.hour(), result2.minute(), role, compareDate);
  17578. break;
  17579. }
  17580. default: {
  17581. availableTimeSlots = method5(role, compareDate);
  17582. break;
  17583. }
  17584. }
  17585. if ((availableTimeSlots == null ? void 0 : availableTimeSlots.length) && !availableTimeSlots.includes(result2[type4]())) {
  17586. const pos = first ? 0 : availableTimeSlots.length - 1;
  17587. result2 = result2[type4](availableTimeSlots[pos]);
  17588. }
  17589. }
  17590. });
  17591. return result2;
  17592. };
  17593. const timePickerOptions = {};
  17594. const onSetOption = ([key, val]) => {
  17595. timePickerOptions[key] = val;
  17596. };
  17597. return {
  17598. timePickerOptions,
  17599. getAvailableTime,
  17600. onSetOption
  17601. };
  17602. };
  17603. // node_modules/element-plus/es/components/time-picker/src/composables/use-time-picker.mjs
  17604. var makeAvailableArr = (disabledList) => {
  17605. const trueOrNumber = (isDisabled, index) => isDisabled || index;
  17606. const getNumber = (predicate) => predicate !== true;
  17607. return disabledList.map(trueOrNumber).filter(getNumber);
  17608. };
  17609. var getTimeLists = (disabledHours, disabledMinutes, disabledSeconds) => {
  17610. const getHoursList = (role, compare) => {
  17611. return makeList(24, disabledHours && (() => disabledHours == null ? void 0 : disabledHours(role, compare)));
  17612. };
  17613. const getMinutesList = (hour, role, compare) => {
  17614. return makeList(60, disabledMinutes && (() => disabledMinutes == null ? void 0 : disabledMinutes(hour, role, compare)));
  17615. };
  17616. const getSecondsList = (hour, minute, role, compare) => {
  17617. return makeList(60, disabledSeconds && (() => disabledSeconds == null ? void 0 : disabledSeconds(hour, minute, role, compare)));
  17618. };
  17619. return {
  17620. getHoursList,
  17621. getMinutesList,
  17622. getSecondsList
  17623. };
  17624. };
  17625. var buildAvailableTimeSlotGetter = (disabledHours, disabledMinutes, disabledSeconds) => {
  17626. const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(disabledHours, disabledMinutes, disabledSeconds);
  17627. const getAvailableHours = (role, compare) => {
  17628. return makeAvailableArr(getHoursList(role, compare));
  17629. };
  17630. const getAvailableMinutes = (hour, role, compare) => {
  17631. return makeAvailableArr(getMinutesList(hour, role, compare));
  17632. };
  17633. const getAvailableSeconds = (hour, minute, role, compare) => {
  17634. return makeAvailableArr(getSecondsList(hour, minute, role, compare));
  17635. };
  17636. return {
  17637. getAvailableHours,
  17638. getAvailableMinutes,
  17639. getAvailableSeconds
  17640. };
  17641. };
  17642. var useOldValue = (props) => {
  17643. const oldValue = ref(props.parsedValue);
  17644. watch(() => props.visible, (val) => {
  17645. if (!val) {
  17646. oldValue.value = props.parsedValue;
  17647. }
  17648. });
  17649. return oldValue;
  17650. };
  17651. // node_modules/element-plus/es/directives/click-outside/index.mjs
  17652. var nodeList = /* @__PURE__ */ new Map();
  17653. var startClick;
  17654. if (isClient) {
  17655. document.addEventListener("mousedown", (e) => startClick = e);
  17656. document.addEventListener("mouseup", (e) => {
  17657. for (const handlers2 of nodeList.values()) {
  17658. for (const { documentHandler } of handlers2) {
  17659. documentHandler(e, startClick);
  17660. }
  17661. }
  17662. });
  17663. }
  17664. function createDocumentHandler(el, binding) {
  17665. let excludes = [];
  17666. if (Array.isArray(binding.arg)) {
  17667. excludes = binding.arg;
  17668. } else if (isElement2(binding.arg)) {
  17669. excludes.push(binding.arg);
  17670. }
  17671. return function(mouseup, mousedown) {
  17672. const popperRef = binding.instance.popperRef;
  17673. const mouseUpTarget = mouseup.target;
  17674. const mouseDownTarget = mousedown == null ? void 0 : mousedown.target;
  17675. const isBound = !binding || !binding.instance;
  17676. const isTargetExists = !mouseUpTarget || !mouseDownTarget;
  17677. const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
  17678. const isSelf = el === mouseUpTarget;
  17679. const isTargetExcluded = excludes.length && excludes.some((item) => item == null ? void 0 : item.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget);
  17680. const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
  17681. if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
  17682. return;
  17683. }
  17684. binding.value(mouseup, mousedown);
  17685. };
  17686. }
  17687. var ClickOutside = {
  17688. beforeMount(el, binding) {
  17689. if (!nodeList.has(el)) {
  17690. nodeList.set(el, []);
  17691. }
  17692. nodeList.get(el).push({
  17693. documentHandler: createDocumentHandler(el, binding),
  17694. bindingFn: binding.value
  17695. });
  17696. },
  17697. updated(el, binding) {
  17698. if (!nodeList.has(el)) {
  17699. nodeList.set(el, []);
  17700. }
  17701. const handlers2 = nodeList.get(el);
  17702. const oldHandlerIndex = handlers2.findIndex((item) => item.bindingFn === binding.oldValue);
  17703. const newHandler = {
  17704. documentHandler: createDocumentHandler(el, binding),
  17705. bindingFn: binding.value
  17706. };
  17707. if (oldHandlerIndex >= 0) {
  17708. handlers2.splice(oldHandlerIndex, 1, newHandler);
  17709. } else {
  17710. handlers2.push(newHandler);
  17711. }
  17712. },
  17713. unmounted(el) {
  17714. nodeList.delete(el);
  17715. }
  17716. };
  17717. // node_modules/element-plus/es/directives/repeat-click/index.mjs
  17718. var REPEAT_INTERVAL = 100;
  17719. var REPEAT_DELAY = 600;
  17720. var vRepeatClick = {
  17721. beforeMount(el, binding) {
  17722. const value = binding.value;
  17723. const { interval = REPEAT_INTERVAL, delay: delay2 = REPEAT_DELAY } = isFunction(value) ? {} : value;
  17724. let intervalId;
  17725. let delayId;
  17726. const handler = () => isFunction(value) ? value() : value.handler();
  17727. const clear = () => {
  17728. if (delayId) {
  17729. clearTimeout(delayId);
  17730. delayId = void 0;
  17731. }
  17732. if (intervalId) {
  17733. clearInterval(intervalId);
  17734. intervalId = void 0;
  17735. }
  17736. };
  17737. el.addEventListener("mousedown", (evt) => {
  17738. if (evt.button !== 0)
  17739. return;
  17740. clear();
  17741. handler();
  17742. document.addEventListener("mouseup", () => clear(), {
  17743. once: true
  17744. });
  17745. delayId = setTimeout(() => {
  17746. intervalId = setInterval(() => {
  17747. handler();
  17748. }, interval);
  17749. }, delay2);
  17750. });
  17751. }
  17752. };
  17753. // node_modules/element-plus/es/directives/trap-focus/index.mjs
  17754. var FOCUSABLE_CHILDREN = "_trap-focus-children";
  17755. var FOCUS_STACK = [];
  17756. var FOCUS_HANDLER = (e) => {
  17757. var _a2;
  17758. if (FOCUS_STACK.length === 0)
  17759. return;
  17760. const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];
  17761. if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {
  17762. if (focusableElement.length === 1) {
  17763. e.preventDefault();
  17764. if (document.activeElement !== focusableElement[0]) {
  17765. focusableElement[0].focus();
  17766. }
  17767. return;
  17768. }
  17769. const goingBackward = e.shiftKey;
  17770. const isFirst = e.target === focusableElement[0];
  17771. const isLast = e.target === focusableElement[focusableElement.length - 1];
  17772. if (isFirst && goingBackward) {
  17773. e.preventDefault();
  17774. focusableElement[focusableElement.length - 1].focus();
  17775. }
  17776. if (isLast && !goingBackward) {
  17777. e.preventDefault();
  17778. focusableElement[0].focus();
  17779. }
  17780. if (false) {
  17781. const index = focusableElement.indexOf(e.target);
  17782. if (index !== -1) {
  17783. (_a2 = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a2.focus();
  17784. }
  17785. }
  17786. }
  17787. };
  17788. var TrapFocus = {
  17789. beforeMount(el) {
  17790. el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);
  17791. FOCUS_STACK.push(el);
  17792. if (FOCUS_STACK.length <= 1) {
  17793. document.addEventListener("keydown", FOCUS_HANDLER);
  17794. }
  17795. },
  17796. updated(el) {
  17797. nextTick(() => {
  17798. el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);
  17799. });
  17800. },
  17801. unmounted() {
  17802. FOCUS_STACK.shift();
  17803. if (FOCUS_STACK.length === 0) {
  17804. document.removeEventListener("keydown", FOCUS_HANDLER);
  17805. }
  17806. }
  17807. };
  17808. // node_modules/normalize-wheel-es/dist/index.mjs
  17809. var v = false;
  17810. var o;
  17811. var f;
  17812. var s;
  17813. var u;
  17814. var d;
  17815. var N2;
  17816. var l;
  17817. var p;
  17818. var m;
  17819. var w;
  17820. var D;
  17821. var x;
  17822. var E2;
  17823. var M;
  17824. var F;
  17825. function a() {
  17826. if (!v) {
  17827. v = true;
  17828. 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);
  17829. if (x = /\b(iPhone|iP[ao]d)/.exec(e), E2 = /\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) {
  17830. o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode);
  17831. var r = /(?:Trident\/(\d+.\d+))/.exec(e);
  17832. N2 = 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;
  17833. } else
  17834. o = f = s = d = u = NaN;
  17835. if (i) {
  17836. if (i[1]) {
  17837. var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
  17838. l = t ? parseFloat(t[1].replace("_", ".")) : true;
  17839. } else
  17840. l = false;
  17841. p = !!i[2], m = !!i[3];
  17842. } else
  17843. l = p = m = false;
  17844. }
  17845. }
  17846. var _ = { ie: function() {
  17847. return a() || o;
  17848. }, ieCompatibilityMode: function() {
  17849. return a() || N2 > o;
  17850. }, ie64: function() {
  17851. return _.ie() && D;
  17852. }, firefox: function() {
  17853. return a() || f;
  17854. }, opera: function() {
  17855. return a() || s;
  17856. }, webkit: function() {
  17857. return a() || u;
  17858. }, safari: function() {
  17859. return _.webkit();
  17860. }, chrome: function() {
  17861. return a() || d;
  17862. }, windows: function() {
  17863. return a() || p;
  17864. }, osx: function() {
  17865. return a() || l;
  17866. }, linux: function() {
  17867. return a() || m;
  17868. }, iphone: function() {
  17869. return a() || x;
  17870. }, mobile: function() {
  17871. return a() || x || E2 || w || F;
  17872. }, nativeApp: function() {
  17873. return a() || M;
  17874. }, android: function() {
  17875. return a() || w;
  17876. }, ipad: function() {
  17877. return a() || E2;
  17878. } };
  17879. var A = _;
  17880. var c = !!(typeof window < "u" && window.document && window.document.createElement);
  17881. var U2 = { canUseDOM: c, canUseWorkers: typeof Worker < "u", canUseEventListeners: c && !!(window.addEventListener || window.attachEvent), canUseViewport: c && !!window.screen, isInWorker: !c };
  17882. var h2 = U2;
  17883. var X2;
  17884. h2.canUseDOM && (X2 = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== true);
  17885. function S(e, n) {
  17886. if (!h2.canUseDOM || n && !("addEventListener" in document))
  17887. return false;
  17888. var i = "on" + e, r = i in document;
  17889. if (!r) {
  17890. var t = document.createElement("div");
  17891. t.setAttribute(i, "return;"), r = typeof t[i] == "function";
  17892. }
  17893. return !r && X2 && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r;
  17894. }
  17895. var b = S;
  17896. var O = 10;
  17897. var I2 = 40;
  17898. var P2 = 800;
  17899. function T(e) {
  17900. var n = 0, i = 0, r = 0, t = 0;
  17901. 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 *= I2, t *= I2) : (r *= P2, t *= P2)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), { spinX: n, spinY: i, pixelX: r, pixelY: t };
  17902. }
  17903. T.getEventType = function() {
  17904. return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel";
  17905. };
  17906. var Y = T;
  17907. // node_modules/element-plus/es/directives/mousewheel/index.mjs
  17908. var mousewheel = function(element, callback) {
  17909. if (element && element.addEventListener) {
  17910. const fn2 = function(event) {
  17911. const normalized = Y(event);
  17912. callback && Reflect.apply(callback, this, [event, normalized]);
  17913. };
  17914. element.addEventListener("wheel", fn2, { passive: true });
  17915. }
  17916. };
  17917. var Mousewheel = {
  17918. beforeMount(el, binding) {
  17919. mousewheel(el, binding.value);
  17920. }
  17921. };
  17922. // node_modules/element-plus/es/components/time-picker/src/props/basic-time-spinner.mjs
  17923. var basicTimeSpinnerProps = buildProps({
  17924. role: {
  17925. type: String,
  17926. required: true
  17927. },
  17928. spinnerDate: {
  17929. type: definePropType(Object),
  17930. required: true
  17931. },
  17932. showSeconds: {
  17933. type: Boolean,
  17934. default: true
  17935. },
  17936. arrowControl: Boolean,
  17937. amPmMode: {
  17938. type: definePropType(String),
  17939. default: ""
  17940. },
  17941. ...disabledTimeListsProps
  17942. });
  17943. // node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs
  17944. var _hoisted_18 = ["onClick"];
  17945. var _hoisted_25 = ["onMouseenter"];
  17946. var _sfc_main25 = defineComponent({
  17947. __name: "basic-time-spinner",
  17948. props: basicTimeSpinnerProps,
  17949. emits: ["change", "select-range", "set-option"],
  17950. setup(__props, { emit }) {
  17951. const props = __props;
  17952. const ns2 = useNamespace("time");
  17953. const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(props.disabledHours, props.disabledMinutes, props.disabledSeconds);
  17954. let isScrolling = false;
  17955. const currentScrollbar = ref();
  17956. const listHoursRef = ref();
  17957. const listMinutesRef = ref();
  17958. const listSecondsRef = ref();
  17959. const listRefsMap = {
  17960. hours: listHoursRef,
  17961. minutes: listMinutesRef,
  17962. seconds: listSecondsRef
  17963. };
  17964. const spinnerItems = computed2(() => {
  17965. return props.showSeconds ? timeUnits : timeUnits.slice(0, 2);
  17966. });
  17967. const timePartials = computed2(() => {
  17968. const { spinnerDate } = props;
  17969. const hours = spinnerDate.hour();
  17970. const minutes = spinnerDate.minute();
  17971. const seconds = spinnerDate.second();
  17972. return { hours, minutes, seconds };
  17973. });
  17974. const timeList = computed2(() => {
  17975. const { hours, minutes } = unref(timePartials);
  17976. return {
  17977. hours: getHoursList(props.role),
  17978. minutes: getMinutesList(hours, props.role),
  17979. seconds: getSecondsList(hours, minutes, props.role)
  17980. };
  17981. });
  17982. const arrowControlTimeList = computed2(() => {
  17983. const { hours, minutes, seconds } = unref(timePartials);
  17984. return {
  17985. hours: buildTimeList(hours, 23),
  17986. minutes: buildTimeList(minutes, 59),
  17987. seconds: buildTimeList(seconds, 59)
  17988. };
  17989. });
  17990. const debouncedResetScroll = debounce_default((type4) => {
  17991. isScrolling = false;
  17992. adjustCurrentSpinner(type4);
  17993. }, 200);
  17994. const getAmPmFlag = (hour) => {
  17995. const shouldShowAmPm = !!props.amPmMode;
  17996. if (!shouldShowAmPm)
  17997. return "";
  17998. const isCapital = props.amPmMode === "A";
  17999. let content = hour < 12 ? " am" : " pm";
  18000. if (isCapital)
  18001. content = content.toUpperCase();
  18002. return content;
  18003. };
  18004. const emitSelectRange = (type4) => {
  18005. let range4;
  18006. switch (type4) {
  18007. case "hours":
  18008. range4 = [0, 2];
  18009. break;
  18010. case "minutes":
  18011. range4 = [3, 5];
  18012. break;
  18013. case "seconds":
  18014. range4 = [6, 8];
  18015. break;
  18016. }
  18017. const [left2, right2] = range4;
  18018. emit("select-range", left2, right2);
  18019. currentScrollbar.value = type4;
  18020. };
  18021. const adjustCurrentSpinner = (type4) => {
  18022. adjustSpinner(type4, unref(timePartials)[type4]);
  18023. };
  18024. const adjustSpinners = () => {
  18025. adjustCurrentSpinner("hours");
  18026. adjustCurrentSpinner("minutes");
  18027. adjustCurrentSpinner("seconds");
  18028. };
  18029. const getScrollbarElement = (el) => el.querySelector(`.${ns2.namespace.value}-scrollbar__wrap`);
  18030. const adjustSpinner = (type4, value) => {
  18031. if (props.arrowControl)
  18032. return;
  18033. const scrollbar = unref(listRefsMap[type4]);
  18034. if (scrollbar && scrollbar.$el) {
  18035. getScrollbarElement(scrollbar.$el).scrollTop = Math.max(0, value * typeItemHeight(type4));
  18036. }
  18037. };
  18038. const typeItemHeight = (type4) => {
  18039. const scrollbar = unref(listRefsMap[type4]);
  18040. return (scrollbar == null ? void 0 : scrollbar.$el.querySelector("li").offsetHeight) || 0;
  18041. };
  18042. const onIncrement = () => {
  18043. scrollDown(1);
  18044. };
  18045. const onDecrement = () => {
  18046. scrollDown(-1);
  18047. };
  18048. const scrollDown = (step) => {
  18049. if (!currentScrollbar.value) {
  18050. emitSelectRange("hours");
  18051. }
  18052. const label = currentScrollbar.value;
  18053. const now2 = unref(timePartials)[label];
  18054. const total2 = currentScrollbar.value === "hours" ? 24 : 60;
  18055. const next = findNextUnDisabled(label, now2, step, total2);
  18056. modifyDateField(label, next);
  18057. adjustSpinner(label, next);
  18058. nextTick(() => emitSelectRange(label));
  18059. };
  18060. const findNextUnDisabled = (type4, now2, step, total2) => {
  18061. let next = (now2 + step + total2) % total2;
  18062. const list = unref(timeList)[type4];
  18063. while (list[next] && next !== now2) {
  18064. next = (next + step + total2) % total2;
  18065. }
  18066. return next;
  18067. };
  18068. const modifyDateField = (type4, value) => {
  18069. const list = unref(timeList)[type4];
  18070. const isDisabled = list[value];
  18071. if (isDisabled)
  18072. return;
  18073. const { hours, minutes, seconds } = unref(timePartials);
  18074. let changeTo;
  18075. switch (type4) {
  18076. case "hours":
  18077. changeTo = props.spinnerDate.hour(value).minute(minutes).second(seconds);
  18078. break;
  18079. case "minutes":
  18080. changeTo = props.spinnerDate.hour(hours).minute(value).second(seconds);
  18081. break;
  18082. case "seconds":
  18083. changeTo = props.spinnerDate.hour(hours).minute(minutes).second(value);
  18084. break;
  18085. }
  18086. emit("change", changeTo);
  18087. };
  18088. const handleClick = (type4, { value, disabled }) => {
  18089. if (!disabled) {
  18090. modifyDateField(type4, value);
  18091. emitSelectRange(type4);
  18092. adjustSpinner(type4, value);
  18093. }
  18094. };
  18095. const handleScroll2 = (type4) => {
  18096. isScrolling = true;
  18097. debouncedResetScroll(type4);
  18098. const value = Math.min(Math.round((getScrollbarElement(unref(listRefsMap[type4]).$el).scrollTop - (scrollBarHeight(type4) * 0.5 - 10) / typeItemHeight(type4) + 3) / typeItemHeight(type4)), type4 === "hours" ? 23 : 59);
  18099. modifyDateField(type4, value);
  18100. };
  18101. const scrollBarHeight = (type4) => {
  18102. return unref(listRefsMap[type4]).$el.offsetHeight;
  18103. };
  18104. const bindScrollEvent = () => {
  18105. const bindFunction = (type4) => {
  18106. const scrollbar = unref(listRefsMap[type4]);
  18107. if (scrollbar && scrollbar.$el) {
  18108. getScrollbarElement(scrollbar.$el).onscroll = () => {
  18109. handleScroll2(type4);
  18110. };
  18111. }
  18112. };
  18113. bindFunction("hours");
  18114. bindFunction("minutes");
  18115. bindFunction("seconds");
  18116. };
  18117. onMounted(() => {
  18118. nextTick(() => {
  18119. !props.arrowControl && bindScrollEvent();
  18120. adjustSpinners();
  18121. if (props.role === "start")
  18122. emitSelectRange("hours");
  18123. });
  18124. });
  18125. const setRef = (scrollbar, type4) => {
  18126. listRefsMap[type4].value = scrollbar;
  18127. };
  18128. emit("set-option", [`${props.role}_scrollDown`, scrollDown]);
  18129. emit("set-option", [`${props.role}_emitSelectRange`, emitSelectRange]);
  18130. watch(() => props.spinnerDate, () => {
  18131. if (isScrolling)
  18132. return;
  18133. adjustSpinners();
  18134. });
  18135. return (_ctx, _cache) => {
  18136. return openBlock(), createElementBlock("div", {
  18137. class: normalizeClass([unref(ns2).b("spinner"), { "has-seconds": _ctx.showSeconds }])
  18138. }, [
  18139. !_ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(spinnerItems), (item) => {
  18140. return openBlock(), createBlock(unref(ElScrollbar), {
  18141. key: item,
  18142. ref_for: true,
  18143. ref: (scrollbar) => setRef(scrollbar, item),
  18144. class: normalizeClass(unref(ns2).be("spinner", "wrapper")),
  18145. "wrap-style": "max-height: inherit;",
  18146. "view-class": unref(ns2).be("spinner", "list"),
  18147. noresize: "",
  18148. tag: "ul",
  18149. onMouseenter: ($event) => emitSelectRange(item),
  18150. onMousemove: ($event) => adjustCurrentSpinner(item)
  18151. }, {
  18152. default: withCtx(() => [
  18153. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(timeList)[item], (disabled, key) => {
  18154. return openBlock(), createElementBlock("li", {
  18155. key,
  18156. class: normalizeClass([
  18157. unref(ns2).be("spinner", "item"),
  18158. unref(ns2).is("active", key === unref(timePartials)[item]),
  18159. unref(ns2).is("disabled", disabled)
  18160. ]),
  18161. onClick: ($event) => handleClick(item, { value: key, disabled })
  18162. }, [
  18163. item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  18164. createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? key % 12 || 12 : key)).slice(-2)) + toDisplayString(getAmPmFlag(key)), 1)
  18165. ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  18166. createTextVNode(toDisplayString(("0" + key).slice(-2)), 1)
  18167. ], 64))
  18168. ], 10, _hoisted_18);
  18169. }), 128))
  18170. ]),
  18171. _: 2
  18172. }, 1032, ["class", "view-class", "onMouseenter", "onMousemove"]);
  18173. }), 128)) : createCommentVNode("v-if", true),
  18174. _ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(spinnerItems), (item) => {
  18175. return openBlock(), createElementBlock("div", {
  18176. key: item,
  18177. class: normalizeClass([unref(ns2).be("spinner", "wrapper"), unref(ns2).is("arrow")]),
  18178. onMouseenter: ($event) => emitSelectRange(item)
  18179. }, [
  18180. withDirectives((openBlock(), createBlock(unref(ElIcon), {
  18181. class: normalizeClass(["arrow-up", unref(ns2).be("spinner", "arrow")])
  18182. }, {
  18183. default: withCtx(() => [
  18184. createVNode(unref(arrow_up_default))
  18185. ]),
  18186. _: 1
  18187. }, 8, ["class"])), [
  18188. [unref(vRepeatClick), onDecrement]
  18189. ]),
  18190. withDirectives((openBlock(), createBlock(unref(ElIcon), {
  18191. class: normalizeClass(["arrow-down", unref(ns2).be("spinner", "arrow")])
  18192. }, {
  18193. default: withCtx(() => [
  18194. createVNode(unref(arrow_down_default))
  18195. ]),
  18196. _: 1
  18197. }, 8, ["class"])), [
  18198. [unref(vRepeatClick), onIncrement]
  18199. ]),
  18200. createBaseVNode("ul", {
  18201. class: normalizeClass(unref(ns2).be("spinner", "list"))
  18202. }, [
  18203. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(arrowControlTimeList)[item], (time, key) => {
  18204. return openBlock(), createElementBlock("li", {
  18205. key,
  18206. class: normalizeClass([
  18207. unref(ns2).be("spinner", "item"),
  18208. unref(ns2).is("active", time === unref(timePartials)[item]),
  18209. unref(ns2).is("disabled", unref(timeList)[item][time])
  18210. ])
  18211. }, [
  18212. typeof time === "number" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  18213. item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  18214. createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? time % 12 || 12 : time)).slice(-2)) + toDisplayString(getAmPmFlag(time)), 1)
  18215. ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  18216. createTextVNode(toDisplayString(("0" + time).slice(-2)), 1)
  18217. ], 64))
  18218. ], 64)) : createCommentVNode("v-if", true)
  18219. ], 2);
  18220. }), 128))
  18221. ], 2)
  18222. ], 42, _hoisted_25);
  18223. }), 128)) : createCommentVNode("v-if", true)
  18224. ], 2);
  18225. };
  18226. }
  18227. });
  18228. var TimeSpinner = _export_sfc(_sfc_main25, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue"]]);
  18229. // node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs
  18230. var _sfc_main26 = defineComponent({
  18231. __name: "panel-time-pick",
  18232. props: panelTimePickerProps,
  18233. emits: ["pick", "select-range", "set-picker-option"],
  18234. setup(__props, { emit }) {
  18235. const props = __props;
  18236. const pickerBase = inject("EP_PICKER_BASE");
  18237. const {
  18238. arrowControl,
  18239. disabledHours,
  18240. disabledMinutes,
  18241. disabledSeconds,
  18242. defaultValue
  18243. } = pickerBase.props;
  18244. const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours, disabledMinutes, disabledSeconds);
  18245. const ns2 = useNamespace("time");
  18246. const { t, lang } = useLocale();
  18247. const selectionRange = ref([0, 2]);
  18248. const oldValue = useOldValue(props);
  18249. const transitionName = computed2(() => {
  18250. return isUndefined2(props.actualVisible) ? `${ns2.namespace.value}-zoom-in-top` : "";
  18251. });
  18252. const showSeconds = computed2(() => {
  18253. return props.format.includes("ss");
  18254. });
  18255. const amPmMode = computed2(() => {
  18256. if (props.format.includes("A"))
  18257. return "A";
  18258. if (props.format.includes("a"))
  18259. return "a";
  18260. return "";
  18261. });
  18262. const isValidValue3 = (_date) => {
  18263. const parsedDate = (0, import_dayjs2.default)(_date).locale(lang.value);
  18264. const result2 = getRangeAvailableTime(parsedDate);
  18265. return parsedDate.isSame(result2);
  18266. };
  18267. const handleCancel = () => {
  18268. emit("pick", oldValue.value, false);
  18269. };
  18270. const handleConfirm = (visible = false, first = false) => {
  18271. if (first)
  18272. return;
  18273. emit("pick", props.parsedValue, visible);
  18274. };
  18275. const handleChange = (_date) => {
  18276. if (!props.visible) {
  18277. return;
  18278. }
  18279. const result2 = getRangeAvailableTime(_date).millisecond(0);
  18280. emit("pick", result2, true);
  18281. };
  18282. const setSelectionRange = (start, end2) => {
  18283. emit("select-range", start, end2);
  18284. selectionRange.value = [start, end2];
  18285. };
  18286. const changeSelectionRange = (step) => {
  18287. const list = [0, 3].concat(showSeconds.value ? [6] : []);
  18288. const mapping = ["hours", "minutes"].concat(showSeconds.value ? ["seconds"] : []);
  18289. const index = list.indexOf(selectionRange.value[0]);
  18290. const next = (index + step + list.length) % list.length;
  18291. timePickerOptions["start_emitSelectRange"](mapping[next]);
  18292. };
  18293. const handleKeydown = (event) => {
  18294. const code = event.code;
  18295. const { left: left2, right: right2, up: up2, down: down2 } = EVENT_CODE;
  18296. if ([left2, right2].includes(code)) {
  18297. const step = code === left2 ? -1 : 1;
  18298. changeSelectionRange(step);
  18299. event.preventDefault();
  18300. return;
  18301. }
  18302. if ([up2, down2].includes(code)) {
  18303. const step = code === up2 ? -1 : 1;
  18304. timePickerOptions["start_scrollDown"](step);
  18305. event.preventDefault();
  18306. return;
  18307. }
  18308. };
  18309. const { timePickerOptions, onSetOption, getAvailableTime } = useTimePanel({
  18310. getAvailableHours,
  18311. getAvailableMinutes,
  18312. getAvailableSeconds
  18313. });
  18314. const getRangeAvailableTime = (date5) => {
  18315. return getAvailableTime(date5, props.datetimeRole || "", true);
  18316. };
  18317. const parseUserInput = (value) => {
  18318. if (!value)
  18319. return null;
  18320. return (0, import_dayjs2.default)(value, props.format).locale(lang.value);
  18321. };
  18322. const formatToString = (value) => {
  18323. if (!value)
  18324. return null;
  18325. return value.format(props.format);
  18326. };
  18327. const getDefaultValue2 = () => {
  18328. return (0, import_dayjs2.default)(defaultValue).locale(lang.value);
  18329. };
  18330. emit("set-picker-option", ["isValidValue", isValidValue3]);
  18331. emit("set-picker-option", ["formatToString", formatToString]);
  18332. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  18333. emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
  18334. emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
  18335. emit("set-picker-option", ["getDefaultValue", getDefaultValue2]);
  18336. return (_ctx, _cache) => {
  18337. return openBlock(), createBlock(Transition, { name: unref(transitionName) }, {
  18338. default: withCtx(() => [
  18339. _ctx.actualVisible || _ctx.visible ? (openBlock(), createElementBlock("div", {
  18340. key: 0,
  18341. class: normalizeClass(unref(ns2).b("panel"))
  18342. }, [
  18343. createBaseVNode("div", {
  18344. class: normalizeClass([unref(ns2).be("panel", "content"), { "has-seconds": unref(showSeconds) }])
  18345. }, [
  18346. createVNode(TimeSpinner, {
  18347. ref: "spinner",
  18348. role: _ctx.datetimeRole || "start",
  18349. "arrow-control": unref(arrowControl),
  18350. "show-seconds": unref(showSeconds),
  18351. "am-pm-mode": unref(amPmMode),
  18352. "spinner-date": _ctx.parsedValue,
  18353. "disabled-hours": unref(disabledHours),
  18354. "disabled-minutes": unref(disabledMinutes),
  18355. "disabled-seconds": unref(disabledSeconds),
  18356. onChange: handleChange,
  18357. onSetOption: unref(onSetOption),
  18358. onSelectRange: setSelectionRange
  18359. }, null, 8, ["role", "arrow-control", "show-seconds", "am-pm-mode", "spinner-date", "disabled-hours", "disabled-minutes", "disabled-seconds", "onSetOption"])
  18360. ], 2),
  18361. createBaseVNode("div", {
  18362. class: normalizeClass(unref(ns2).be("panel", "footer"))
  18363. }, [
  18364. createBaseVNode("button", {
  18365. type: "button",
  18366. class: normalizeClass([unref(ns2).be("panel", "btn"), "cancel"]),
  18367. onClick: handleCancel
  18368. }, toDisplayString(unref(t)("el.datepicker.cancel")), 3),
  18369. createBaseVNode("button", {
  18370. type: "button",
  18371. class: normalizeClass([unref(ns2).be("panel", "btn"), "confirm"]),
  18372. onClick: _cache[0] || (_cache[0] = ($event) => handleConfirm())
  18373. }, toDisplayString(unref(t)("el.datepicker.confirm")), 3)
  18374. ], 2)
  18375. ], 2)) : createCommentVNode("v-if", true)
  18376. ]),
  18377. _: 1
  18378. }, 8, ["name"]);
  18379. };
  18380. }
  18381. });
  18382. var TimePickPanel = _export_sfc(_sfc_main26, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-pick.vue"]]);
  18383. // node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs
  18384. var import_dayjs3 = __toESM(require_dayjs_min(), 1);
  18385. // node_modules/element-plus/es/components/time-picker/src/props/panel-time-range.mjs
  18386. var panelTimeRangeProps = buildProps({
  18387. ...timePanelSharedProps,
  18388. parsedValue: {
  18389. type: definePropType(Array)
  18390. }
  18391. });
  18392. // node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs
  18393. var _hoisted_19 = ["disabled"];
  18394. var _sfc_main27 = defineComponent({
  18395. __name: "panel-time-range",
  18396. props: panelTimeRangeProps,
  18397. emits: ["pick", "select-range", "set-picker-option"],
  18398. setup(__props, { emit }) {
  18399. const props = __props;
  18400. const makeSelectRange = (start, end2) => {
  18401. const result2 = [];
  18402. for (let i = start; i <= end2; i++) {
  18403. result2.push(i);
  18404. }
  18405. return result2;
  18406. };
  18407. const { t, lang } = useLocale();
  18408. const nsTime = useNamespace("time");
  18409. const nsPicker = useNamespace("picker");
  18410. const pickerBase = inject("EP_PICKER_BASE");
  18411. const {
  18412. arrowControl,
  18413. disabledHours,
  18414. disabledMinutes,
  18415. disabledSeconds,
  18416. defaultValue
  18417. } = pickerBase.props;
  18418. const startTime = computed2(() => props.parsedValue[0]);
  18419. const endTime = computed2(() => props.parsedValue[1]);
  18420. const oldValue = useOldValue(props);
  18421. const handleCancel = () => {
  18422. emit("pick", oldValue.value, false);
  18423. };
  18424. const showSeconds = computed2(() => {
  18425. return props.format.includes("ss");
  18426. });
  18427. const amPmMode = computed2(() => {
  18428. if (props.format.includes("A"))
  18429. return "A";
  18430. if (props.format.includes("a"))
  18431. return "a";
  18432. return "";
  18433. });
  18434. const handleConfirm = (visible = false) => {
  18435. emit("pick", [startTime.value, endTime.value], visible);
  18436. };
  18437. const handleMinChange = (date5) => {
  18438. handleChange(date5.millisecond(0), endTime.value);
  18439. };
  18440. const handleMaxChange = (date5) => {
  18441. handleChange(startTime.value, date5.millisecond(0));
  18442. };
  18443. const isValidValue3 = (_date) => {
  18444. const parsedDate = _date.map((_2) => (0, import_dayjs3.default)(_2).locale(lang.value));
  18445. const result2 = getRangeAvailableTime(parsedDate);
  18446. return parsedDate[0].isSame(result2[0]) && parsedDate[1].isSame(result2[1]);
  18447. };
  18448. const handleChange = (start, end2) => {
  18449. emit("pick", [start, end2], true);
  18450. };
  18451. const btnConfirmDisabled = computed2(() => {
  18452. return startTime.value > endTime.value;
  18453. });
  18454. const selectionRange = ref([0, 2]);
  18455. const setMinSelectionRange = (start, end2) => {
  18456. emit("select-range", start, end2, "min");
  18457. selectionRange.value = [start, end2];
  18458. };
  18459. const offset2 = computed2(() => showSeconds.value ? 11 : 8);
  18460. const setMaxSelectionRange = (start, end2) => {
  18461. emit("select-range", start, end2, "max");
  18462. const _offset = unref(offset2);
  18463. selectionRange.value = [start + _offset, end2 + _offset];
  18464. };
  18465. const changeSelectionRange = (step) => {
  18466. const list = showSeconds.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11];
  18467. const mapping = ["hours", "minutes"].concat(showSeconds.value ? ["seconds"] : []);
  18468. const index = list.indexOf(selectionRange.value[0]);
  18469. const next = (index + step + list.length) % list.length;
  18470. const half = list.length / 2;
  18471. if (next < half) {
  18472. timePickerOptions["start_emitSelectRange"](mapping[next]);
  18473. } else {
  18474. timePickerOptions["end_emitSelectRange"](mapping[next - half]);
  18475. }
  18476. };
  18477. const handleKeydown = (event) => {
  18478. const code = event.code;
  18479. const { left: left2, right: right2, up: up2, down: down2 } = EVENT_CODE;
  18480. if ([left2, right2].includes(code)) {
  18481. const step = code === left2 ? -1 : 1;
  18482. changeSelectionRange(step);
  18483. event.preventDefault();
  18484. return;
  18485. }
  18486. if ([up2, down2].includes(code)) {
  18487. const step = code === up2 ? -1 : 1;
  18488. const role = selectionRange.value[0] < offset2.value ? "start" : "end";
  18489. timePickerOptions[`${role}_scrollDown`](step);
  18490. event.preventDefault();
  18491. return;
  18492. }
  18493. };
  18494. const disabledHours_ = (role, compare) => {
  18495. const defaultDisable = disabledHours ? disabledHours(role) : [];
  18496. const isStart = role === "start";
  18497. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  18498. const compareHour = compareDate.hour();
  18499. const nextDisable = isStart ? makeSelectRange(compareHour + 1, 23) : makeSelectRange(0, compareHour - 1);
  18500. return union_default(defaultDisable, nextDisable);
  18501. };
  18502. const disabledMinutes_ = (hour, role, compare) => {
  18503. const defaultDisable = disabledMinutes ? disabledMinutes(hour, role) : [];
  18504. const isStart = role === "start";
  18505. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  18506. const compareHour = compareDate.hour();
  18507. if (hour !== compareHour) {
  18508. return defaultDisable;
  18509. }
  18510. const compareMinute = compareDate.minute();
  18511. const nextDisable = isStart ? makeSelectRange(compareMinute + 1, 59) : makeSelectRange(0, compareMinute - 1);
  18512. return union_default(defaultDisable, nextDisable);
  18513. };
  18514. const disabledSeconds_ = (hour, minute, role, compare) => {
  18515. const defaultDisable = disabledSeconds ? disabledSeconds(hour, minute, role) : [];
  18516. const isStart = role === "start";
  18517. const compareDate = compare || (isStart ? endTime.value : startTime.value);
  18518. const compareHour = compareDate.hour();
  18519. const compareMinute = compareDate.minute();
  18520. if (hour !== compareHour || minute !== compareMinute) {
  18521. return defaultDisable;
  18522. }
  18523. const compareSecond = compareDate.second();
  18524. const nextDisable = isStart ? makeSelectRange(compareSecond + 1, 59) : makeSelectRange(0, compareSecond - 1);
  18525. return union_default(defaultDisable, nextDisable);
  18526. };
  18527. const getRangeAvailableTime = ([start, end2]) => {
  18528. return [
  18529. getAvailableTime(start, "start", true, end2),
  18530. getAvailableTime(end2, "end", false, start)
  18531. ];
  18532. };
  18533. const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours_, disabledMinutes_, disabledSeconds_);
  18534. const {
  18535. timePickerOptions,
  18536. getAvailableTime,
  18537. onSetOption
  18538. } = useTimePanel({
  18539. getAvailableHours,
  18540. getAvailableMinutes,
  18541. getAvailableSeconds
  18542. });
  18543. const parseUserInput = (days) => {
  18544. if (!days)
  18545. return null;
  18546. if (isArray(days)) {
  18547. return days.map((d2) => (0, import_dayjs3.default)(d2, props.format).locale(lang.value));
  18548. }
  18549. return (0, import_dayjs3.default)(days, props.format).locale(lang.value);
  18550. };
  18551. const formatToString = (days) => {
  18552. if (!days)
  18553. return null;
  18554. if (isArray(days)) {
  18555. return days.map((d2) => d2.format(props.format));
  18556. }
  18557. return days.format(props.format);
  18558. };
  18559. const getDefaultValue2 = () => {
  18560. if (isArray(defaultValue)) {
  18561. return defaultValue.map((d2) => (0, import_dayjs3.default)(d2).locale(lang.value));
  18562. }
  18563. const defaultDay = (0, import_dayjs3.default)(defaultValue).locale(lang.value);
  18564. return [defaultDay, defaultDay.add(60, "m")];
  18565. };
  18566. emit("set-picker-option", ["formatToString", formatToString]);
  18567. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  18568. emit("set-picker-option", ["isValidValue", isValidValue3]);
  18569. emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
  18570. emit("set-picker-option", ["getDefaultValue", getDefaultValue2]);
  18571. emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
  18572. return (_ctx, _cache) => {
  18573. return _ctx.actualVisible ? (openBlock(), createElementBlock("div", {
  18574. key: 0,
  18575. class: normalizeClass([unref(nsTime).b("range-picker"), unref(nsPicker).b("panel")])
  18576. }, [
  18577. createBaseVNode("div", {
  18578. class: normalizeClass(unref(nsTime).be("range-picker", "content"))
  18579. }, [
  18580. createBaseVNode("div", {
  18581. class: normalizeClass(unref(nsTime).be("range-picker", "cell"))
  18582. }, [
  18583. createBaseVNode("div", {
  18584. class: normalizeClass(unref(nsTime).be("range-picker", "header"))
  18585. }, toDisplayString(unref(t)("el.datepicker.startTime")), 3),
  18586. createBaseVNode("div", {
  18587. class: normalizeClass([
  18588. unref(nsTime).be("range-picker", "body"),
  18589. unref(nsTime).be("panel", "content"),
  18590. unref(nsTime).is("arrow", unref(arrowControl)),
  18591. { "has-seconds": unref(showSeconds) }
  18592. ])
  18593. }, [
  18594. createVNode(TimeSpinner, {
  18595. ref: "minSpinner",
  18596. role: "start",
  18597. "show-seconds": unref(showSeconds),
  18598. "am-pm-mode": unref(amPmMode),
  18599. "arrow-control": unref(arrowControl),
  18600. "spinner-date": unref(startTime),
  18601. "disabled-hours": disabledHours_,
  18602. "disabled-minutes": disabledMinutes_,
  18603. "disabled-seconds": disabledSeconds_,
  18604. onChange: handleMinChange,
  18605. onSetOption: unref(onSetOption),
  18606. onSelectRange: setMinSelectionRange
  18607. }, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
  18608. ], 2)
  18609. ], 2),
  18610. createBaseVNode("div", {
  18611. class: normalizeClass(unref(nsTime).be("range-picker", "cell"))
  18612. }, [
  18613. createBaseVNode("div", {
  18614. class: normalizeClass(unref(nsTime).be("range-picker", "header"))
  18615. }, toDisplayString(unref(t)("el.datepicker.endTime")), 3),
  18616. createBaseVNode("div", {
  18617. class: normalizeClass([
  18618. unref(nsTime).be("range-picker", "body"),
  18619. unref(nsTime).be("panel", "content"),
  18620. unref(nsTime).is("arrow", unref(arrowControl)),
  18621. { "has-seconds": unref(showSeconds) }
  18622. ])
  18623. }, [
  18624. createVNode(TimeSpinner, {
  18625. ref: "maxSpinner",
  18626. role: "end",
  18627. "show-seconds": unref(showSeconds),
  18628. "am-pm-mode": unref(amPmMode),
  18629. "arrow-control": unref(arrowControl),
  18630. "spinner-date": unref(endTime),
  18631. "disabled-hours": disabledHours_,
  18632. "disabled-minutes": disabledMinutes_,
  18633. "disabled-seconds": disabledSeconds_,
  18634. onChange: handleMaxChange,
  18635. onSetOption: unref(onSetOption),
  18636. onSelectRange: setMaxSelectionRange
  18637. }, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
  18638. ], 2)
  18639. ], 2)
  18640. ], 2),
  18641. createBaseVNode("div", {
  18642. class: normalizeClass(unref(nsTime).be("panel", "footer"))
  18643. }, [
  18644. createBaseVNode("button", {
  18645. type: "button",
  18646. class: normalizeClass([unref(nsTime).be("panel", "btn"), "cancel"]),
  18647. onClick: _cache[0] || (_cache[0] = ($event) => handleCancel())
  18648. }, toDisplayString(unref(t)("el.datepicker.cancel")), 3),
  18649. createBaseVNode("button", {
  18650. type: "button",
  18651. class: normalizeClass([unref(nsTime).be("panel", "btn"), "confirm"]),
  18652. disabled: unref(btnConfirmDisabled),
  18653. onClick: _cache[1] || (_cache[1] = ($event) => handleConfirm())
  18654. }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_19)
  18655. ], 2)
  18656. ], 2)) : createCommentVNode("v-if", true);
  18657. };
  18658. }
  18659. });
  18660. var TimeRangePanel = _export_sfc(_sfc_main27, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-range.vue"]]);
  18661. // node_modules/element-plus/es/components/time-picker/src/time-picker.mjs
  18662. import_dayjs4.default.extend(import_customParseFormat.default);
  18663. var TimePicker = defineComponent({
  18664. name: "ElTimePicker",
  18665. install: null,
  18666. props: {
  18667. ...timePickerDefaultProps,
  18668. isRange: {
  18669. type: Boolean,
  18670. default: false
  18671. }
  18672. },
  18673. emits: ["update:modelValue"],
  18674. setup(props, ctx) {
  18675. const commonPicker = ref();
  18676. const [type4, Panel] = props.isRange ? ["timerange", TimeRangePanel] : ["time", TimePickPanel];
  18677. const modelUpdater = (value) => ctx.emit("update:modelValue", value);
  18678. provide("ElPopperOptions", props.popperOptions);
  18679. ctx.expose({
  18680. focus: (e) => {
  18681. var _a2;
  18682. (_a2 = commonPicker.value) == null ? void 0 : _a2.handleFocusInput(e);
  18683. },
  18684. blur: (e) => {
  18685. var _a2;
  18686. (_a2 = commonPicker.value) == null ? void 0 : _a2.handleBlurInput(e);
  18687. },
  18688. handleOpen: () => {
  18689. var _a2;
  18690. (_a2 = commonPicker.value) == null ? void 0 : _a2.handleOpen();
  18691. },
  18692. handleClose: () => {
  18693. var _a2;
  18694. (_a2 = commonPicker.value) == null ? void 0 : _a2.handleClose();
  18695. }
  18696. });
  18697. return () => {
  18698. var _a2;
  18699. const format2 = (_a2 = props.format) != null ? _a2 : DEFAULT_FORMATS_TIME;
  18700. return createVNode(CommonPicker, mergeProps(props, {
  18701. "ref": commonPicker,
  18702. "type": type4,
  18703. "format": format2,
  18704. "onUpdate:modelValue": modelUpdater
  18705. }), {
  18706. default: (props2) => createVNode(Panel, props2, null)
  18707. });
  18708. };
  18709. }
  18710. });
  18711. // node_modules/element-plus/es/components/time-picker/index.mjs
  18712. var _TimePicker = TimePicker;
  18713. _TimePicker.install = (app) => {
  18714. app.component(_TimePicker.name, _TimePicker);
  18715. };
  18716. var ElTimePicker = _TimePicker;
  18717. // node_modules/element-plus/es/components/calendar/src/date-table.mjs
  18718. var getPrevMonthLastDays = (date5, count) => {
  18719. const lastDay = date5.subtract(1, "month").endOf("month").date();
  18720. return rangeArr(count).map((_2, index) => lastDay - (count - index - 1));
  18721. };
  18722. var getMonthDays = (date5) => {
  18723. const days = date5.daysInMonth();
  18724. return rangeArr(days).map((_2, index) => index + 1);
  18725. };
  18726. var toNestedArr = (days) => rangeArr(days.length / 7).map((index) => {
  18727. const start = index * 7;
  18728. return days.slice(start, start + 7);
  18729. });
  18730. var dateTableProps = buildProps({
  18731. selectedDay: {
  18732. type: definePropType(Object)
  18733. },
  18734. range: {
  18735. type: definePropType(Array)
  18736. },
  18737. date: {
  18738. type: definePropType(Object),
  18739. required: true
  18740. },
  18741. hideHeader: {
  18742. type: Boolean
  18743. }
  18744. });
  18745. var dateTableEmits = {
  18746. pick: (value) => isObject(value)
  18747. };
  18748. // node_modules/element-plus/es/components/calendar/src/use-date-table.mjs
  18749. var import_dayjs5 = __toESM(require_dayjs_min(), 1);
  18750. var import_localeData = __toESM(require_localeData(), 1);
  18751. var useDateTable = (props, emit) => {
  18752. import_dayjs5.default.extend(import_localeData.default);
  18753. const firstDayOfWeek = import_dayjs5.default.localeData().firstDayOfWeek();
  18754. const { t, lang } = useLocale();
  18755. const now2 = (0, import_dayjs5.default)().locale(lang.value);
  18756. const isInRange = computed2(() => !!props.range && !!props.range.length);
  18757. const rows = computed2(() => {
  18758. let days = [];
  18759. if (isInRange.value) {
  18760. const [start, end2] = props.range;
  18761. const currentMonthRange = rangeArr(end2.date() - start.date() + 1).map((index) => ({
  18762. text: start.date() + index,
  18763. type: "current"
  18764. }));
  18765. let remaining = currentMonthRange.length % 7;
  18766. remaining = remaining === 0 ? 0 : 7 - remaining;
  18767. const nextMonthRange = rangeArr(remaining).map((_2, index) => ({
  18768. text: index + 1,
  18769. type: "next"
  18770. }));
  18771. days = currentMonthRange.concat(nextMonthRange);
  18772. } else {
  18773. const firstDay = props.date.startOf("month").day();
  18774. const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
  18775. text: day,
  18776. type: "prev"
  18777. }));
  18778. const currentMonthDays = getMonthDays(props.date).map((day) => ({
  18779. text: day,
  18780. type: "current"
  18781. }));
  18782. days = [...prevMonthDays, ...currentMonthDays];
  18783. const remaining = 7 - (days.length % 7 || 7);
  18784. const nextMonthDays = rangeArr(remaining).map((_2, index) => ({
  18785. text: index + 1,
  18786. type: "next"
  18787. }));
  18788. days = days.concat(nextMonthDays);
  18789. }
  18790. return toNestedArr(days);
  18791. });
  18792. const weekDays = computed2(() => {
  18793. const start = firstDayOfWeek;
  18794. if (start === 0) {
  18795. return WEEK_DAYS.map((_2) => t(`el.datepicker.weeks.${_2}`));
  18796. } else {
  18797. return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_2) => t(`el.datepicker.weeks.${_2}`));
  18798. }
  18799. });
  18800. const getFormattedDate = (day, type4) => {
  18801. switch (type4) {
  18802. case "prev":
  18803. return props.date.startOf("month").subtract(1, "month").date(day);
  18804. case "next":
  18805. return props.date.startOf("month").add(1, "month").date(day);
  18806. case "current":
  18807. return props.date.date(day);
  18808. }
  18809. };
  18810. const handlePickDay = ({ text, type: type4 }) => {
  18811. const date5 = getFormattedDate(text, type4);
  18812. emit("pick", date5);
  18813. };
  18814. const getSlotData = ({ text, type: type4 }) => {
  18815. const day = getFormattedDate(text, type4);
  18816. return {
  18817. isSelected: day.isSame(props.selectedDay),
  18818. type: `${type4}-month`,
  18819. day: day.format("YYYY-MM-DD"),
  18820. date: day.toDate()
  18821. };
  18822. };
  18823. return {
  18824. now: now2,
  18825. isInRange,
  18826. rows,
  18827. weekDays,
  18828. getFormattedDate,
  18829. handlePickDay,
  18830. getSlotData
  18831. };
  18832. };
  18833. // node_modules/element-plus/es/components/calendar/src/date-table2.mjs
  18834. var _hoisted_110 = { key: 0 };
  18835. var _hoisted_26 = ["onClick"];
  18836. var __default__22 = defineComponent({
  18837. name: "DateTable"
  18838. });
  18839. var _sfc_main28 = defineComponent({
  18840. ...__default__22,
  18841. props: dateTableProps,
  18842. emits: dateTableEmits,
  18843. setup(__props, { expose, emit }) {
  18844. const props = __props;
  18845. const {
  18846. isInRange,
  18847. now: now2,
  18848. rows,
  18849. weekDays,
  18850. getFormattedDate,
  18851. handlePickDay,
  18852. getSlotData
  18853. } = useDateTable(props, emit);
  18854. const nsTable = useNamespace("calendar-table");
  18855. const nsDay = useNamespace("calendar-day");
  18856. const getCellClass = ({ text, type: type4 }) => {
  18857. const classes = [type4];
  18858. if (type4 === "current") {
  18859. const date5 = getFormattedDate(text, type4);
  18860. if (date5.isSame(props.selectedDay, "day")) {
  18861. classes.push(nsDay.is("selected"));
  18862. }
  18863. if (date5.isSame(now2, "day")) {
  18864. classes.push(nsDay.is("today"));
  18865. }
  18866. }
  18867. return classes;
  18868. };
  18869. expose({
  18870. getFormattedDate
  18871. });
  18872. return (_ctx, _cache) => {
  18873. return openBlock(), createElementBlock("table", {
  18874. class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]),
  18875. cellspacing: "0",
  18876. cellpadding: "0"
  18877. }, [
  18878. !_ctx.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_110, [
  18879. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
  18880. return openBlock(), createElementBlock("th", { key: day }, toDisplayString(day), 1);
  18881. }), 128))
  18882. ])) : createCommentVNode("v-if", true),
  18883. createBaseVNode("tbody", null, [
  18884. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, index) => {
  18885. return openBlock(), createElementBlock("tr", {
  18886. key: index,
  18887. class: normalizeClass({
  18888. [unref(nsTable).e("row")]: true,
  18889. [unref(nsTable).em("row", "hide-border")]: index === 0 && _ctx.hideHeader
  18890. })
  18891. }, [
  18892. (openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key) => {
  18893. return openBlock(), createElementBlock("td", {
  18894. key,
  18895. class: normalizeClass(getCellClass(cell)),
  18896. onClick: ($event) => unref(handlePickDay)(cell)
  18897. }, [
  18898. createBaseVNode("div", {
  18899. class: normalizeClass(unref(nsDay).b())
  18900. }, [
  18901. renderSlot(_ctx.$slots, "date-cell", {
  18902. data: unref(getSlotData)(cell)
  18903. }, () => [
  18904. createBaseVNode("span", null, toDisplayString(cell.text), 1)
  18905. ])
  18906. ], 2)
  18907. ], 10, _hoisted_26);
  18908. }), 128))
  18909. ], 2);
  18910. }), 128))
  18911. ])
  18912. ], 2);
  18913. };
  18914. }
  18915. });
  18916. var DateTable = _export_sfc(_sfc_main28, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/calendar/src/date-table.vue"]]);
  18917. // node_modules/element-plus/es/components/calendar/src/use-calendar.mjs
  18918. var import_dayjs6 = __toESM(require_dayjs_min(), 1);
  18919. var adjacentMonth = (start, end2) => {
  18920. const firstMonthLastDay = start.endOf("month");
  18921. const lastMonthFirstDay = end2.startOf("month");
  18922. const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
  18923. const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
  18924. return [
  18925. [start, firstMonthLastDay],
  18926. [lastMonthStartDay.startOf("week"), end2]
  18927. ];
  18928. };
  18929. var threeConsecutiveMonth = (start, end2) => {
  18930. const firstMonthLastDay = start.endOf("month");
  18931. const secondMonthFirstDay = start.add(1, "month").startOf("month");
  18932. const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
  18933. const secondMonthLastDay = secondMonthStartDay.endOf("month");
  18934. const lastMonthFirstDay = end2.startOf("month");
  18935. const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
  18936. return [
  18937. [start, firstMonthLastDay],
  18938. [secondMonthStartDay.startOf("week"), secondMonthLastDay],
  18939. [lastMonthStartDay.startOf("week"), end2]
  18940. ];
  18941. };
  18942. var useCalendar = (props, emit, componentName2) => {
  18943. const slots = useSlots();
  18944. const { lang } = useLocale();
  18945. const selectedDay = ref();
  18946. const now2 = (0, import_dayjs6.default)().locale(lang.value);
  18947. const realSelectedDay = computed2({
  18948. get() {
  18949. if (!props.modelValue)
  18950. return selectedDay.value;
  18951. return date5.value;
  18952. },
  18953. set(val) {
  18954. if (!val)
  18955. return;
  18956. selectedDay.value = val;
  18957. const result2 = val.toDate();
  18958. emit(INPUT_EVENT, result2);
  18959. emit(UPDATE_MODEL_EVENT, result2);
  18960. }
  18961. });
  18962. const validatedRange = computed2(() => {
  18963. if (!props.range)
  18964. return [];
  18965. const rangeArrDayjs = props.range.map((_2) => (0, import_dayjs6.default)(_2).locale(lang.value));
  18966. const [startDayjs, endDayjs] = rangeArrDayjs;
  18967. if (startDayjs.isAfter(endDayjs)) {
  18968. debugWarn(componentName2, "end time should be greater than start time");
  18969. return [];
  18970. }
  18971. if (startDayjs.isSame(endDayjs, "month")) {
  18972. return calculateValidatedDateRange(startDayjs, endDayjs);
  18973. } else {
  18974. if (startDayjs.add(1, "month").month() !== endDayjs.month()) {
  18975. debugWarn(componentName2, "start time and end time interval must not exceed two months");
  18976. return [];
  18977. }
  18978. return calculateValidatedDateRange(startDayjs, endDayjs);
  18979. }
  18980. });
  18981. const date5 = computed2(() => {
  18982. if (!props.modelValue) {
  18983. return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now2);
  18984. } else {
  18985. return (0, import_dayjs6.default)(props.modelValue).locale(lang.value);
  18986. }
  18987. });
  18988. const prevMonthDayjs = computed2(() => date5.value.subtract(1, "month").date(1));
  18989. const nextMonthDayjs = computed2(() => date5.value.add(1, "month").date(1));
  18990. const prevYearDayjs = computed2(() => date5.value.subtract(1, "year").date(1));
  18991. const nextYearDayjs = computed2(() => date5.value.add(1, "year").date(1));
  18992. const calculateValidatedDateRange = (startDayjs, endDayjs) => {
  18993. const firstDay = startDayjs.startOf("week");
  18994. const lastDay = endDayjs.endOf("week");
  18995. const firstMonth = firstDay.get("month");
  18996. const lastMonth = lastDay.get("month");
  18997. if (firstMonth === lastMonth) {
  18998. return [[firstDay, lastDay]];
  18999. } else if ((firstMonth + 1) % 12 === lastMonth) {
  19000. return adjacentMonth(firstDay, lastDay);
  19001. } else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) {
  19002. return threeConsecutiveMonth(firstDay, lastDay);
  19003. } else {
  19004. debugWarn(componentName2, "start time and end time interval must not exceed two months");
  19005. return [];
  19006. }
  19007. };
  19008. const pickDay = (day) => {
  19009. realSelectedDay.value = day;
  19010. };
  19011. const selectDate = (type4) => {
  19012. const dateMap = {
  19013. "prev-month": prevMonthDayjs.value,
  19014. "next-month": nextMonthDayjs.value,
  19015. "prev-year": prevYearDayjs.value,
  19016. "next-year": nextYearDayjs.value,
  19017. today: now2
  19018. };
  19019. const day = dateMap[type4];
  19020. if (!day.isSame(date5.value, "day")) {
  19021. pickDay(day);
  19022. }
  19023. };
  19024. useDeprecated({
  19025. from: '"dateCell"',
  19026. replacement: '"date-cell"',
  19027. scope: "ElCalendar",
  19028. version: "2.3.0",
  19029. ref: "https://element-plus.org/en-US/component/calendar.html#slots",
  19030. type: "Slot"
  19031. }, computed2(() => !!slots.dateCell));
  19032. return {
  19033. calculateValidatedDateRange,
  19034. date: date5,
  19035. realSelectedDay,
  19036. pickDay,
  19037. selectDate,
  19038. validatedRange
  19039. };
  19040. };
  19041. // node_modules/element-plus/es/components/calendar/src/calendar.mjs
  19042. var isValidRange = (range4) => isArray(range4) && range4.length === 2 && range4.every((item) => isDate(item));
  19043. var calendarProps = buildProps({
  19044. modelValue: {
  19045. type: Date
  19046. },
  19047. range: {
  19048. type: definePropType(Array),
  19049. validator: isValidRange
  19050. }
  19051. });
  19052. var calendarEmits = {
  19053. [UPDATE_MODEL_EVENT]: (value) => isDate(value),
  19054. [INPUT_EVENT]: (value) => isDate(value)
  19055. };
  19056. // node_modules/element-plus/es/components/calendar/src/calendar2.mjs
  19057. var COMPONENT_NAME6 = "ElCalendar";
  19058. var __default__23 = defineComponent({
  19059. name: COMPONENT_NAME6
  19060. });
  19061. var _sfc_main29 = defineComponent({
  19062. ...__default__23,
  19063. props: calendarProps,
  19064. emits: calendarEmits,
  19065. setup(__props, { expose, emit }) {
  19066. const props = __props;
  19067. const ns2 = useNamespace("calendar");
  19068. const {
  19069. calculateValidatedDateRange,
  19070. date: date5,
  19071. pickDay,
  19072. realSelectedDay,
  19073. selectDate,
  19074. validatedRange
  19075. } = useCalendar(props, emit, COMPONENT_NAME6);
  19076. const { t } = useLocale();
  19077. const i18nDate = computed2(() => {
  19078. const pickedMonth = `el.datepicker.month${date5.value.format("M")}`;
  19079. return `${date5.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
  19080. });
  19081. expose({
  19082. selectedDay: realSelectedDay,
  19083. pickDay,
  19084. selectDate,
  19085. calculateValidatedDateRange
  19086. });
  19087. return (_ctx, _cache) => {
  19088. return openBlock(), createElementBlock("div", {
  19089. class: normalizeClass(unref(ns2).b())
  19090. }, [
  19091. createBaseVNode("div", {
  19092. class: normalizeClass(unref(ns2).e("header"))
  19093. }, [
  19094. renderSlot(_ctx.$slots, "header", { date: unref(i18nDate) }, () => [
  19095. createBaseVNode("div", {
  19096. class: normalizeClass(unref(ns2).e("title"))
  19097. }, toDisplayString(unref(i18nDate)), 3),
  19098. unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
  19099. key: 0,
  19100. class: normalizeClass(unref(ns2).e("button-group"))
  19101. }, [
  19102. createVNode(unref(ElButtonGroup), null, {
  19103. default: withCtx(() => [
  19104. createVNode(unref(ElButton), {
  19105. size: "small",
  19106. onClick: _cache[0] || (_cache[0] = ($event) => unref(selectDate)("prev-month"))
  19107. }, {
  19108. default: withCtx(() => [
  19109. createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)
  19110. ]),
  19111. _: 1
  19112. }),
  19113. createVNode(unref(ElButton), {
  19114. size: "small",
  19115. onClick: _cache[1] || (_cache[1] = ($event) => unref(selectDate)("today"))
  19116. }, {
  19117. default: withCtx(() => [
  19118. createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)
  19119. ]),
  19120. _: 1
  19121. }),
  19122. createVNode(unref(ElButton), {
  19123. size: "small",
  19124. onClick: _cache[2] || (_cache[2] = ($event) => unref(selectDate)("next-month"))
  19125. }, {
  19126. default: withCtx(() => [
  19127. createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)
  19128. ]),
  19129. _: 1
  19130. })
  19131. ]),
  19132. _: 1
  19133. })
  19134. ], 2)) : createCommentVNode("v-if", true)
  19135. ])
  19136. ], 2),
  19137. unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
  19138. key: 0,
  19139. class: normalizeClass(unref(ns2).e("body"))
  19140. }, [
  19141. createVNode(DateTable, {
  19142. date: unref(date5),
  19143. "selected-day": unref(realSelectedDay),
  19144. onPick: unref(pickDay)
  19145. }, createSlots({ _: 2 }, [
  19146. _ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
  19147. name: "date-cell",
  19148. fn: withCtx((data) => [
  19149. _ctx.$slots["date-cell"] ? renderSlot(_ctx.$slots, "date-cell", normalizeProps(mergeProps({ key: 0 }, data))) : renderSlot(_ctx.$slots, "dateCell", normalizeProps(mergeProps({ key: 1 }, data)))
  19150. ])
  19151. } : void 0
  19152. ]), 1032, ["date", "selected-day", "onPick"])
  19153. ], 2)) : (openBlock(), createElementBlock("div", {
  19154. key: 1,
  19155. class: normalizeClass(unref(ns2).e("body"))
  19156. }, [
  19157. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
  19158. return openBlock(), createBlock(DateTable, {
  19159. key: index,
  19160. date: range_[0],
  19161. "selected-day": unref(realSelectedDay),
  19162. range: range_,
  19163. "hide-header": index !== 0,
  19164. onPick: unref(pickDay)
  19165. }, createSlots({ _: 2 }, [
  19166. _ctx.$slots["date-cell"] || _ctx.$slots.dateCell ? {
  19167. name: "date-cell",
  19168. fn: withCtx((data) => [
  19169. _ctx.$slots["date-cell"] ? renderSlot(_ctx.$slots, "date-cell", normalizeProps(mergeProps({ key: 0 }, data))) : renderSlot(_ctx.$slots, "dateCell", normalizeProps(mergeProps({ key: 1 }, data)))
  19170. ])
  19171. } : void 0
  19172. ]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
  19173. }), 128))
  19174. ], 2))
  19175. ], 2);
  19176. };
  19177. }
  19178. });
  19179. var Calendar = _export_sfc(_sfc_main29, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/calendar/src/calendar.vue"]]);
  19180. // node_modules/element-plus/es/components/calendar/index.mjs
  19181. var ElCalendar = withInstall(Calendar);
  19182. // node_modules/element-plus/es/components/card/src/card.mjs
  19183. var cardProps = buildProps({
  19184. header: {
  19185. type: String,
  19186. default: ""
  19187. },
  19188. bodyStyle: {
  19189. type: definePropType([String, Object, Array]),
  19190. default: ""
  19191. },
  19192. shadow: {
  19193. type: String,
  19194. values: ["always", "hover", "never"],
  19195. default: "always"
  19196. }
  19197. });
  19198. // node_modules/element-plus/es/components/card/src/card2.mjs
  19199. var __default__24 = defineComponent({
  19200. name: "ElCard"
  19201. });
  19202. var _sfc_main30 = defineComponent({
  19203. ...__default__24,
  19204. props: cardProps,
  19205. setup(__props) {
  19206. const ns2 = useNamespace("card");
  19207. return (_ctx, _cache) => {
  19208. return openBlock(), createElementBlock("div", {
  19209. class: normalizeClass([unref(ns2).b(), unref(ns2).is(`${_ctx.shadow}-shadow`)])
  19210. }, [
  19211. _ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock("div", {
  19212. key: 0,
  19213. class: normalizeClass(unref(ns2).e("header"))
  19214. }, [
  19215. renderSlot(_ctx.$slots, "header", {}, () => [
  19216. createTextVNode(toDisplayString(_ctx.header), 1)
  19217. ])
  19218. ], 2)) : createCommentVNode("v-if", true),
  19219. createBaseVNode("div", {
  19220. class: normalizeClass(unref(ns2).e("body")),
  19221. style: normalizeStyle(_ctx.bodyStyle)
  19222. }, [
  19223. renderSlot(_ctx.$slots, "default")
  19224. ], 6)
  19225. ], 2);
  19226. };
  19227. }
  19228. });
  19229. var Card = _export_sfc(_sfc_main30, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/card/src/card.vue"]]);
  19230. // node_modules/element-plus/es/components/card/index.mjs
  19231. var ElCard = withInstall(Card);
  19232. // node_modules/element-plus/es/components/carousel/src/carousel.mjs
  19233. var carouselProps = buildProps({
  19234. initialIndex: {
  19235. type: Number,
  19236. default: 0
  19237. },
  19238. height: {
  19239. type: String,
  19240. default: ""
  19241. },
  19242. trigger: {
  19243. type: String,
  19244. values: ["hover", "click"],
  19245. default: "hover"
  19246. },
  19247. autoplay: {
  19248. type: Boolean,
  19249. default: true
  19250. },
  19251. interval: {
  19252. type: Number,
  19253. default: 3e3
  19254. },
  19255. indicatorPosition: {
  19256. type: String,
  19257. values: ["", "none", "outside"],
  19258. default: ""
  19259. },
  19260. indicator: {
  19261. type: Boolean,
  19262. default: true
  19263. },
  19264. arrow: {
  19265. type: String,
  19266. values: ["always", "hover", "never"],
  19267. default: "hover"
  19268. },
  19269. type: {
  19270. type: String,
  19271. values: ["", "card"],
  19272. default: ""
  19273. },
  19274. loop: {
  19275. type: Boolean,
  19276. default: true
  19277. },
  19278. direction: {
  19279. type: String,
  19280. values: ["horizontal", "vertical"],
  19281. default: "horizontal"
  19282. },
  19283. pauseOnHover: {
  19284. type: Boolean,
  19285. default: true
  19286. }
  19287. });
  19288. var carouselEmits = {
  19289. change: (current, prev) => [current, prev].every(isNumber2)
  19290. };
  19291. // node_modules/element-plus/es/components/carousel/src/use-carousel.mjs
  19292. var THROTTLE_TIME = 300;
  19293. var useCarousel = (props, emit, componentName2) => {
  19294. const {
  19295. children: items,
  19296. addChild: addItem,
  19297. removeChild: removeItem
  19298. } = useOrderedChildren(getCurrentInstance(), "ElCarouselItem");
  19299. const activeIndex = ref(-1);
  19300. const timer = ref(null);
  19301. const hover = ref(false);
  19302. const root2 = ref();
  19303. const arrowDisplay = computed2(() => props.arrow !== "never" && !unref(isVertical));
  19304. const hasLabel = computed2(() => {
  19305. return items.value.some((item) => item.props.label.toString().length > 0);
  19306. });
  19307. const isCardType = computed2(() => props.type === "card");
  19308. const isVertical = computed2(() => props.direction === "vertical");
  19309. const throttledArrowClick = throttle_default((index) => {
  19310. setActiveItem(index);
  19311. }, THROTTLE_TIME, { trailing: true });
  19312. const throttledIndicatorHover = throttle_default((index) => {
  19313. handleIndicatorHover(index);
  19314. }, THROTTLE_TIME);
  19315. function pauseTimer() {
  19316. if (timer.value) {
  19317. clearInterval(timer.value);
  19318. timer.value = null;
  19319. }
  19320. }
  19321. function startTimer() {
  19322. if (props.interval <= 0 || !props.autoplay || timer.value)
  19323. return;
  19324. timer.value = setInterval(() => playSlides(), props.interval);
  19325. }
  19326. const playSlides = () => {
  19327. if (activeIndex.value < items.value.length - 1) {
  19328. activeIndex.value = activeIndex.value + 1;
  19329. } else if (props.loop) {
  19330. activeIndex.value = 0;
  19331. }
  19332. };
  19333. function setActiveItem(index) {
  19334. if (isString(index)) {
  19335. const filteredItems = items.value.filter((item) => item.props.name === index);
  19336. if (filteredItems.length > 0) {
  19337. index = items.value.indexOf(filteredItems[0]);
  19338. }
  19339. }
  19340. index = Number(index);
  19341. if (Number.isNaN(index) || index !== Math.floor(index)) {
  19342. debugWarn(componentName2, "index must be integer.");
  19343. return;
  19344. }
  19345. const itemCount = items.value.length;
  19346. const oldIndex = activeIndex.value;
  19347. if (index < 0) {
  19348. activeIndex.value = props.loop ? itemCount - 1 : 0;
  19349. } else if (index >= itemCount) {
  19350. activeIndex.value = props.loop ? 0 : itemCount - 1;
  19351. } else {
  19352. activeIndex.value = index;
  19353. }
  19354. if (oldIndex === activeIndex.value) {
  19355. resetItemPosition(oldIndex);
  19356. }
  19357. resetTimer();
  19358. }
  19359. function resetItemPosition(oldIndex) {
  19360. items.value.forEach((item, index) => {
  19361. item.translateItem(index, activeIndex.value, oldIndex);
  19362. });
  19363. }
  19364. function itemInStage(item, index) {
  19365. var _a2, _b, _c, _d;
  19366. const _items = unref(items);
  19367. const itemCount = _items.length;
  19368. if (itemCount === 0 || !item.states.inStage)
  19369. return false;
  19370. const nextItemIndex = index + 1;
  19371. const prevItemIndex = index - 1;
  19372. const lastItemIndex = itemCount - 1;
  19373. const isLastItemActive = _items[lastItemIndex].states.active;
  19374. const isFirstItemActive = _items[0].states.active;
  19375. const isNextItemActive = (_b = (_a2 = _items[nextItemIndex]) == null ? void 0 : _a2.states) == null ? void 0 : _b.active;
  19376. const isPrevItemActive = (_d = (_c = _items[prevItemIndex]) == null ? void 0 : _c.states) == null ? void 0 : _d.active;
  19377. if (index === lastItemIndex && isFirstItemActive || isNextItemActive) {
  19378. return "left";
  19379. } else if (index === 0 && isLastItemActive || isPrevItemActive) {
  19380. return "right";
  19381. }
  19382. return false;
  19383. }
  19384. function handleMouseEnter() {
  19385. hover.value = true;
  19386. if (props.pauseOnHover) {
  19387. pauseTimer();
  19388. }
  19389. }
  19390. function handleMouseLeave() {
  19391. hover.value = false;
  19392. startTimer();
  19393. }
  19394. function handleButtonEnter(arrow2) {
  19395. if (unref(isVertical))
  19396. return;
  19397. items.value.forEach((item, index) => {
  19398. if (arrow2 === itemInStage(item, index)) {
  19399. item.states.hover = true;
  19400. }
  19401. });
  19402. }
  19403. function handleButtonLeave() {
  19404. if (unref(isVertical))
  19405. return;
  19406. items.value.forEach((item) => {
  19407. item.states.hover = false;
  19408. });
  19409. }
  19410. function handleIndicatorClick(index) {
  19411. activeIndex.value = index;
  19412. }
  19413. function handleIndicatorHover(index) {
  19414. if (props.trigger === "hover" && index !== activeIndex.value) {
  19415. activeIndex.value = index;
  19416. }
  19417. }
  19418. function prev() {
  19419. setActiveItem(activeIndex.value - 1);
  19420. }
  19421. function next() {
  19422. setActiveItem(activeIndex.value + 1);
  19423. }
  19424. function resetTimer() {
  19425. pauseTimer();
  19426. startTimer();
  19427. }
  19428. watch(() => activeIndex.value, (current, prev2) => {
  19429. resetItemPosition(prev2);
  19430. if (prev2 > -1) {
  19431. emit("change", current, prev2);
  19432. }
  19433. });
  19434. watch(() => props.autoplay, (autoplay) => {
  19435. autoplay ? startTimer() : pauseTimer();
  19436. });
  19437. watch(() => props.loop, () => {
  19438. setActiveItem(activeIndex.value);
  19439. });
  19440. watch(() => props.interval, () => {
  19441. resetTimer();
  19442. });
  19443. watch(() => items.value, () => {
  19444. if (items.value.length > 0)
  19445. setActiveItem(props.initialIndex);
  19446. });
  19447. const resizeObserver = shallowRef();
  19448. onMounted(() => {
  19449. resizeObserver.value = useResizeObserver(root2.value, () => {
  19450. resetItemPosition();
  19451. });
  19452. startTimer();
  19453. });
  19454. onBeforeUnmount(() => {
  19455. pauseTimer();
  19456. if (root2.value && resizeObserver.value)
  19457. resizeObserver.value.stop();
  19458. });
  19459. provide(carouselContextKey, {
  19460. root: root2,
  19461. isCardType,
  19462. isVertical,
  19463. items,
  19464. loop: props.loop,
  19465. addItem,
  19466. removeItem,
  19467. setActiveItem
  19468. });
  19469. return {
  19470. root: root2,
  19471. activeIndex,
  19472. arrowDisplay,
  19473. hasLabel,
  19474. hover,
  19475. isCardType,
  19476. items,
  19477. handleButtonEnter,
  19478. handleButtonLeave,
  19479. handleIndicatorClick,
  19480. handleMouseEnter,
  19481. handleMouseLeave,
  19482. setActiveItem,
  19483. prev,
  19484. next,
  19485. throttledArrowClick,
  19486. throttledIndicatorHover
  19487. };
  19488. };
  19489. // node_modules/element-plus/es/components/carousel/src/carousel2.mjs
  19490. var _hoisted_111 = ["onMouseenter", "onClick"];
  19491. var _hoisted_27 = { key: 0 };
  19492. var COMPONENT_NAME7 = "ElCarousel";
  19493. var __default__25 = defineComponent({
  19494. name: COMPONENT_NAME7
  19495. });
  19496. var _sfc_main31 = defineComponent({
  19497. ...__default__25,
  19498. props: carouselProps,
  19499. emits: carouselEmits,
  19500. setup(__props, { expose, emit }) {
  19501. const props = __props;
  19502. const {
  19503. root: root2,
  19504. activeIndex,
  19505. arrowDisplay,
  19506. hasLabel,
  19507. hover,
  19508. isCardType,
  19509. items,
  19510. handleButtonEnter,
  19511. handleButtonLeave,
  19512. handleIndicatorClick,
  19513. handleMouseEnter,
  19514. handleMouseLeave,
  19515. setActiveItem,
  19516. prev,
  19517. next,
  19518. throttledArrowClick,
  19519. throttledIndicatorHover
  19520. } = useCarousel(props, emit, COMPONENT_NAME7);
  19521. const ns2 = useNamespace("carousel");
  19522. const carouselClasses = computed2(() => {
  19523. const classes = [ns2.b(), ns2.m(props.direction)];
  19524. if (unref(isCardType)) {
  19525. classes.push(ns2.m("card"));
  19526. }
  19527. return classes;
  19528. });
  19529. const indicatorsClasses = computed2(() => {
  19530. const classes = [ns2.e("indicators"), ns2.em("indicators", props.direction)];
  19531. if (unref(hasLabel)) {
  19532. classes.push(ns2.em("indicators", "labels"));
  19533. }
  19534. if (props.indicatorPosition === "outside" || unref(isCardType)) {
  19535. classes.push(ns2.em("indicators", "outside"));
  19536. }
  19537. return classes;
  19538. });
  19539. expose({
  19540. setActiveItem,
  19541. prev,
  19542. next
  19543. });
  19544. return (_ctx, _cache) => {
  19545. return openBlock(), createElementBlock("div", {
  19546. ref_key: "root",
  19547. ref: root2,
  19548. class: normalizeClass(unref(carouselClasses)),
  19549. onMouseenter: _cache[6] || (_cache[6] = withModifiers((...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args), ["stop"])),
  19550. onMouseleave: _cache[7] || (_cache[7] = withModifiers((...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args), ["stop"]))
  19551. }, [
  19552. createBaseVNode("div", {
  19553. class: normalizeClass(unref(ns2).e("container")),
  19554. style: normalizeStyle({ height: _ctx.height })
  19555. }, [
  19556. unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
  19557. key: 0,
  19558. name: "carousel-arrow-left",
  19559. persisted: ""
  19560. }, {
  19561. default: withCtx(() => [
  19562. withDirectives(createBaseVNode("button", {
  19563. type: "button",
  19564. class: normalizeClass([unref(ns2).e("arrow"), unref(ns2).em("arrow", "left")]),
  19565. onMouseenter: _cache[0] || (_cache[0] = ($event) => unref(handleButtonEnter)("left")),
  19566. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
  19567. onClick: _cache[2] || (_cache[2] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"]))
  19568. }, [
  19569. createVNode(unref(ElIcon), null, {
  19570. default: withCtx(() => [
  19571. createVNode(unref(arrow_left_default))
  19572. ]),
  19573. _: 1
  19574. })
  19575. ], 34), [
  19576. [
  19577. vShow,
  19578. (_ctx.arrow === "always" || unref(hover)) && (props.loop || unref(activeIndex) > 0)
  19579. ]
  19580. ])
  19581. ]),
  19582. _: 1
  19583. })) : createCommentVNode("v-if", true),
  19584. unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
  19585. key: 1,
  19586. name: "carousel-arrow-right",
  19587. persisted: ""
  19588. }, {
  19589. default: withCtx(() => [
  19590. withDirectives(createBaseVNode("button", {
  19591. type: "button",
  19592. class: normalizeClass([unref(ns2).e("arrow"), unref(ns2).em("arrow", "right")]),
  19593. onMouseenter: _cache[3] || (_cache[3] = ($event) => unref(handleButtonEnter)("right")),
  19594. onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
  19595. onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"]))
  19596. }, [
  19597. createVNode(unref(ElIcon), null, {
  19598. default: withCtx(() => [
  19599. createVNode(unref(arrow_right_default))
  19600. ]),
  19601. _: 1
  19602. })
  19603. ], 34), [
  19604. [
  19605. vShow,
  19606. (_ctx.arrow === "always" || unref(hover)) && (props.loop || unref(activeIndex) < unref(items).length - 1)
  19607. ]
  19608. ])
  19609. ]),
  19610. _: 1
  19611. })) : createCommentVNode("v-if", true),
  19612. renderSlot(_ctx.$slots, "default")
  19613. ], 6),
  19614. _ctx.indicatorPosition !== "none" ? (openBlock(), createElementBlock("ul", {
  19615. key: 0,
  19616. class: normalizeClass(unref(indicatorsClasses))
  19617. }, [
  19618. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
  19619. return openBlock(), createElementBlock("li", {
  19620. key: index,
  19621. class: normalizeClass([
  19622. unref(ns2).e("indicator"),
  19623. unref(ns2).em("indicator", _ctx.direction),
  19624. unref(ns2).is("active", index === unref(activeIndex))
  19625. ]),
  19626. onMouseenter: ($event) => unref(throttledIndicatorHover)(index),
  19627. onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"])
  19628. }, [
  19629. createBaseVNode("button", {
  19630. class: normalizeClass(unref(ns2).e("button"))
  19631. }, [
  19632. unref(hasLabel) ? (openBlock(), createElementBlock("span", _hoisted_27, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true)
  19633. ], 2)
  19634. ], 42, _hoisted_111);
  19635. }), 128))
  19636. ], 2)) : createCommentVNode("v-if", true)
  19637. ], 34);
  19638. };
  19639. }
  19640. });
  19641. var Carousel = _export_sfc(_sfc_main31, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/carousel/src/carousel.vue"]]);
  19642. // node_modules/element-plus/es/components/carousel/src/carousel-item.mjs
  19643. var carouselItemProps = buildProps({
  19644. name: { type: String, default: "" },
  19645. label: {
  19646. type: [String, Number],
  19647. default: ""
  19648. }
  19649. });
  19650. // node_modules/element-plus/es/components/carousel/src/use-carousel-item.mjs
  19651. var useCarouselItem = (props, componentName2) => {
  19652. const carouselContext = inject(carouselContextKey);
  19653. const instance = getCurrentInstance();
  19654. if (!carouselContext) {
  19655. debugWarn(componentName2, "usage: <el-carousel></el-carousel-item></el-carousel>");
  19656. }
  19657. if (!instance) {
  19658. debugWarn(componentName2, "compositional hook can only be invoked inside setups");
  19659. }
  19660. const CARD_SCALE = 0.83;
  19661. const hover = ref(false);
  19662. const translate2 = ref(0);
  19663. const scale = ref(1);
  19664. const active = ref(false);
  19665. const ready = ref(false);
  19666. const inStage = ref(false);
  19667. const animating = ref(false);
  19668. const { isCardType, isVertical } = carouselContext;
  19669. function processIndex(index, activeIndex, length) {
  19670. const lastItemIndex = length - 1;
  19671. const prevItemIndex = activeIndex - 1;
  19672. const nextItemIndex = activeIndex + 1;
  19673. const halfItemIndex = length / 2;
  19674. if (activeIndex === 0 && index === lastItemIndex) {
  19675. return -1;
  19676. } else if (activeIndex === lastItemIndex && index === 0) {
  19677. return length;
  19678. } else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) {
  19679. return length + 1;
  19680. } else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) {
  19681. return -2;
  19682. }
  19683. return index;
  19684. }
  19685. function calcCardTranslate(index, activeIndex) {
  19686. var _a2;
  19687. const parentWidth = ((_a2 = carouselContext.root.value) == null ? void 0 : _a2.offsetWidth) || 0;
  19688. if (inStage.value) {
  19689. return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
  19690. } else if (index < activeIndex) {
  19691. return -(1 + CARD_SCALE) * parentWidth / 4;
  19692. } else {
  19693. return (3 + CARD_SCALE) * parentWidth / 4;
  19694. }
  19695. }
  19696. function calcTranslate(index, activeIndex, isVertical2) {
  19697. const rootEl = carouselContext.root.value;
  19698. if (!rootEl)
  19699. return 0;
  19700. const distance = (isVertical2 ? rootEl.offsetHeight : rootEl.offsetWidth) || 0;
  19701. return distance * (index - activeIndex);
  19702. }
  19703. const translateItem = (index, activeIndex, oldIndex) => {
  19704. var _a2;
  19705. const _isCardType = unref(isCardType);
  19706. const carouselItemLength = (_a2 = carouselContext.items.value.length) != null ? _a2 : Number.NaN;
  19707. const isActive = index === activeIndex;
  19708. if (!_isCardType && !isUndefined2(oldIndex)) {
  19709. animating.value = isActive || index === oldIndex;
  19710. }
  19711. if (!isActive && carouselItemLength > 2 && carouselContext.loop) {
  19712. index = processIndex(index, activeIndex, carouselItemLength);
  19713. }
  19714. const _isVertical = unref(isVertical);
  19715. active.value = isActive;
  19716. if (_isCardType) {
  19717. if (_isVertical) {
  19718. debugWarn("Carousel", "vertical direction is not supported for card mode");
  19719. }
  19720. inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
  19721. translate2.value = calcCardTranslate(index, activeIndex);
  19722. scale.value = unref(active) ? 1 : CARD_SCALE;
  19723. } else {
  19724. translate2.value = calcTranslate(index, activeIndex, _isVertical);
  19725. }
  19726. ready.value = true;
  19727. };
  19728. function handleItemClick() {
  19729. if (carouselContext && unref(isCardType)) {
  19730. const index = carouselContext.items.value.findIndex(({ uid: uid2 }) => uid2 === instance.uid);
  19731. carouselContext.setActiveItem(index);
  19732. }
  19733. }
  19734. onMounted(() => {
  19735. carouselContext.addItem({
  19736. props,
  19737. states: reactive({
  19738. hover,
  19739. translate: translate2,
  19740. scale,
  19741. active,
  19742. ready,
  19743. inStage,
  19744. animating
  19745. }),
  19746. uid: instance.uid,
  19747. translateItem
  19748. });
  19749. });
  19750. onUnmounted(() => {
  19751. carouselContext.removeItem(instance.uid);
  19752. });
  19753. return {
  19754. active,
  19755. animating,
  19756. hover,
  19757. inStage,
  19758. isVertical,
  19759. translate: translate2,
  19760. isCardType,
  19761. scale,
  19762. ready,
  19763. handleItemClick
  19764. };
  19765. };
  19766. // node_modules/element-plus/es/components/carousel/src/carousel-item2.mjs
  19767. var COMPONENT_NAME8 = "ElCarouselItem";
  19768. var __default__26 = defineComponent({
  19769. name: "ElCarouselItem"
  19770. });
  19771. var _sfc_main32 = defineComponent({
  19772. ...__default__26,
  19773. props: carouselItemProps,
  19774. setup(__props) {
  19775. const props = __props;
  19776. const ns2 = useNamespace("carousel");
  19777. const {
  19778. active,
  19779. animating,
  19780. hover,
  19781. inStage,
  19782. isVertical,
  19783. translate: translate2,
  19784. isCardType,
  19785. scale,
  19786. ready,
  19787. handleItemClick
  19788. } = useCarouselItem(props, COMPONENT_NAME8);
  19789. const itemStyle = computed2(() => {
  19790. const translateType = `translate${unref(isVertical) ? "Y" : "X"}`;
  19791. const _translate = `${translateType}(${unref(translate2)}px)`;
  19792. const _scale = `scale(${unref(scale)})`;
  19793. const transform2 = [_translate, _scale].join(" ");
  19794. return {
  19795. transform: transform2
  19796. };
  19797. });
  19798. return (_ctx, _cache) => {
  19799. return withDirectives((openBlock(), createElementBlock("div", {
  19800. class: normalizeClass([
  19801. unref(ns2).e("item"),
  19802. unref(ns2).is("active", unref(active)),
  19803. unref(ns2).is("in-stage", unref(inStage)),
  19804. unref(ns2).is("hover", unref(hover)),
  19805. unref(ns2).is("animating", unref(animating)),
  19806. { [unref(ns2).em("item", "card")]: unref(isCardType) }
  19807. ]),
  19808. style: normalizeStyle(unref(itemStyle)),
  19809. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args))
  19810. }, [
  19811. unref(isCardType) ? withDirectives((openBlock(), createElementBlock("div", {
  19812. key: 0,
  19813. class: normalizeClass(unref(ns2).e("mask"))
  19814. }, null, 2)), [
  19815. [vShow, !unref(active)]
  19816. ]) : createCommentVNode("v-if", true),
  19817. renderSlot(_ctx.$slots, "default")
  19818. ], 6)), [
  19819. [vShow, unref(ready)]
  19820. ]);
  19821. };
  19822. }
  19823. });
  19824. var CarouselItem = _export_sfc(_sfc_main32, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/carousel/src/carousel-item.vue"]]);
  19825. // node_modules/element-plus/es/components/carousel/index.mjs
  19826. var ElCarousel = withInstall(Carousel, {
  19827. CarouselItem
  19828. });
  19829. var ElCarouselItem = withNoopInstall(CarouselItem);
  19830. // node_modules/element-plus/es/components/checkbox/src/checkbox.mjs
  19831. var checkboxProps = {
  19832. modelValue: {
  19833. type: [Number, String, Boolean],
  19834. default: void 0
  19835. },
  19836. label: {
  19837. type: [String, Boolean, Number, Object]
  19838. },
  19839. indeterminate: Boolean,
  19840. disabled: Boolean,
  19841. checked: Boolean,
  19842. name: {
  19843. type: String,
  19844. default: void 0
  19845. },
  19846. trueLabel: {
  19847. type: [String, Number],
  19848. default: void 0
  19849. },
  19850. falseLabel: {
  19851. type: [String, Number],
  19852. default: void 0
  19853. },
  19854. id: {
  19855. type: String,
  19856. default: void 0
  19857. },
  19858. controls: {
  19859. type: String,
  19860. default: void 0
  19861. },
  19862. border: Boolean,
  19863. size: useSizeProp,
  19864. tabindex: [String, Number],
  19865. validateEvent: {
  19866. type: Boolean,
  19867. default: true
  19868. }
  19869. };
  19870. var checkboxEmits = {
  19871. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val),
  19872. change: (val) => isString(val) || isNumber2(val) || isBoolean2(val)
  19873. };
  19874. // node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-disabled.mjs
  19875. var useCheckboxDisabled = ({
  19876. model,
  19877. isChecked
  19878. }) => {
  19879. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  19880. const isLimitDisabled = computed2(() => {
  19881. var _a2, _b;
  19882. const max5 = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value;
  19883. const min5 = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value;
  19884. return !isUndefined2(max5) && model.value.length >= max5 && !isChecked.value || !isUndefined2(min5) && model.value.length <= min5 && isChecked.value;
  19885. });
  19886. const isDisabled = useDisabled(computed2(() => (checkboxGroup == null ? void 0 : checkboxGroup.disabled.value) || isLimitDisabled.value));
  19887. return {
  19888. isDisabled,
  19889. isLimitDisabled
  19890. };
  19891. };
  19892. // node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-event.mjs
  19893. var useCheckboxEvent = (props, {
  19894. model,
  19895. isLimitExceeded,
  19896. hasOwnLabel,
  19897. isDisabled,
  19898. isLabeledByFormItem
  19899. }) => {
  19900. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  19901. const { formItem } = useFormItem();
  19902. const { emit } = getCurrentInstance();
  19903. function getLabeledValue(value) {
  19904. var _a2, _b;
  19905. return value === props.trueLabel || value === true ? (_a2 = props.trueLabel) != null ? _a2 : true : (_b = props.falseLabel) != null ? _b : false;
  19906. }
  19907. function emitChangeEvent(checked, e) {
  19908. emit("change", getLabeledValue(checked), e);
  19909. }
  19910. function handleChange(e) {
  19911. if (isLimitExceeded.value)
  19912. return;
  19913. const target2 = e.target;
  19914. emit("change", getLabeledValue(target2.checked), e);
  19915. }
  19916. async function onClickRoot(e) {
  19917. if (isLimitExceeded.value)
  19918. return;
  19919. if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
  19920. const eventTargets = e.composedPath();
  19921. const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
  19922. if (!hasLabel) {
  19923. model.value = getLabeledValue([false, props.falseLabel].includes(model.value));
  19924. await nextTick();
  19925. emitChangeEvent(model.value, e);
  19926. }
  19927. }
  19928. }
  19929. const validateEvent = computed2(() => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent);
  19930. watch(() => props.modelValue, () => {
  19931. if (validateEvent.value) {
  19932. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  19933. }
  19934. });
  19935. return {
  19936. handleChange,
  19937. onClickRoot
  19938. };
  19939. };
  19940. // node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-model.mjs
  19941. var useCheckboxModel = (props) => {
  19942. const selfModel = ref(false);
  19943. const { emit } = getCurrentInstance();
  19944. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  19945. const isGroup = computed2(() => isUndefined2(checkboxGroup) === false);
  19946. const isLimitExceeded = ref(false);
  19947. const model = computed2({
  19948. get() {
  19949. var _a2, _b;
  19950. return isGroup.value ? (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.modelValue) == null ? void 0 : _a2.value : (_b = props.modelValue) != null ? _b : selfModel.value;
  19951. },
  19952. set(val) {
  19953. var _a2, _b;
  19954. if (isGroup.value && isArray(val)) {
  19955. isLimitExceeded.value = ((_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value) !== void 0 && val.length > (checkboxGroup == null ? void 0 : checkboxGroup.max.value);
  19956. isLimitExceeded.value === false && ((_b = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _b.call(checkboxGroup, val));
  19957. } else {
  19958. emit(UPDATE_MODEL_EVENT, val);
  19959. selfModel.value = val;
  19960. }
  19961. }
  19962. });
  19963. return {
  19964. model,
  19965. isGroup,
  19966. isLimitExceeded
  19967. };
  19968. };
  19969. // node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-status.mjs
  19970. var useCheckboxStatus = (props, slots, { model }) => {
  19971. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  19972. const isFocused = ref(false);
  19973. const isChecked = computed2(() => {
  19974. const value = model.value;
  19975. if (isBoolean2(value)) {
  19976. return value;
  19977. } else if (isArray(value)) {
  19978. if (isObject(props.label)) {
  19979. return value.map(toRaw).some((o2) => isEqual_default(o2, props.label));
  19980. } else {
  19981. return value.map(toRaw).includes(props.label);
  19982. }
  19983. } else if (value !== null && value !== void 0) {
  19984. return value === props.trueLabel;
  19985. } else {
  19986. return !!value;
  19987. }
  19988. });
  19989. const checkboxButtonSize = useSize(computed2(() => {
  19990. var _a2;
  19991. return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
  19992. }), {
  19993. prop: true
  19994. });
  19995. const checkboxSize = useSize(computed2(() => {
  19996. var _a2;
  19997. return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
  19998. }));
  19999. const hasOwnLabel = computed2(() => {
  20000. return !!(slots.default || props.label);
  20001. });
  20002. return {
  20003. checkboxButtonSize,
  20004. isChecked,
  20005. isFocused,
  20006. checkboxSize,
  20007. hasOwnLabel
  20008. };
  20009. };
  20010. // node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox.mjs
  20011. var setStoreValue = (props, { model }) => {
  20012. function addToStore() {
  20013. if (isArray(model.value) && !model.value.includes(props.label)) {
  20014. model.value.push(props.label);
  20015. } else {
  20016. model.value = props.trueLabel || true;
  20017. }
  20018. }
  20019. props.checked && addToStore();
  20020. };
  20021. var useCheckbox = (props, slots) => {
  20022. const { formItem: elFormItem } = useFormItem();
  20023. const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
  20024. const {
  20025. isFocused,
  20026. isChecked,
  20027. checkboxButtonSize,
  20028. checkboxSize,
  20029. hasOwnLabel
  20030. } = useCheckboxStatus(props, slots, { model });
  20031. const { isDisabled } = useCheckboxDisabled({ model, isChecked });
  20032. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
  20033. formItemContext: elFormItem,
  20034. disableIdGeneration: hasOwnLabel,
  20035. disableIdManagement: isGroup
  20036. });
  20037. const { handleChange, onClickRoot } = useCheckboxEvent(props, {
  20038. model,
  20039. isLimitExceeded,
  20040. hasOwnLabel,
  20041. isDisabled,
  20042. isLabeledByFormItem
  20043. });
  20044. setStoreValue(props, { model });
  20045. return {
  20046. inputId,
  20047. isLabeledByFormItem,
  20048. isChecked,
  20049. isDisabled,
  20050. isFocused,
  20051. checkboxButtonSize,
  20052. checkboxSize,
  20053. hasOwnLabel,
  20054. model,
  20055. handleChange,
  20056. onClickRoot
  20057. };
  20058. };
  20059. // node_modules/element-plus/es/components/checkbox/src/checkbox2.mjs
  20060. var _hoisted_112 = ["tabindex", "role", "aria-checked"];
  20061. var _hoisted_28 = ["id", "aria-hidden", "name", "tabindex", "disabled", "true-value", "false-value"];
  20062. var _hoisted_33 = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"];
  20063. var __default__27 = defineComponent({
  20064. name: "ElCheckbox"
  20065. });
  20066. var _sfc_main33 = defineComponent({
  20067. ...__default__27,
  20068. props: checkboxProps,
  20069. emits: checkboxEmits,
  20070. setup(__props) {
  20071. const props = __props;
  20072. const slots = useSlots();
  20073. const {
  20074. inputId,
  20075. isLabeledByFormItem,
  20076. isChecked,
  20077. isDisabled,
  20078. isFocused,
  20079. checkboxSize,
  20080. hasOwnLabel,
  20081. model,
  20082. handleChange,
  20083. onClickRoot
  20084. } = useCheckbox(props, slots);
  20085. const ns2 = useNamespace("checkbox");
  20086. const compKls = computed2(() => {
  20087. return [
  20088. ns2.b(),
  20089. ns2.m(checkboxSize.value),
  20090. ns2.is("disabled", isDisabled.value),
  20091. ns2.is("bordered", props.border),
  20092. ns2.is("checked", isChecked.value)
  20093. ];
  20094. });
  20095. const spanKls = computed2(() => {
  20096. return [
  20097. ns2.e("input"),
  20098. ns2.is("disabled", isDisabled.value),
  20099. ns2.is("checked", isChecked.value),
  20100. ns2.is("indeterminate", props.indeterminate),
  20101. ns2.is("focus", isFocused.value)
  20102. ];
  20103. });
  20104. return (_ctx, _cache) => {
  20105. return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
  20106. class: normalizeClass(unref(compKls)),
  20107. "aria-controls": _ctx.indeterminate ? _ctx.controls : null,
  20108. onClick: unref(onClickRoot)
  20109. }, {
  20110. default: withCtx(() => [
  20111. createBaseVNode("span", {
  20112. class: normalizeClass(unref(spanKls)),
  20113. tabindex: _ctx.indeterminate ? 0 : void 0,
  20114. role: _ctx.indeterminate ? "checkbox" : void 0,
  20115. "aria-checked": _ctx.indeterminate ? "mixed" : void 0
  20116. }, [
  20117. _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
  20118. key: 0,
  20119. id: unref(inputId),
  20120. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
  20121. class: normalizeClass(unref(ns2).e("original")),
  20122. type: "checkbox",
  20123. "aria-hidden": _ctx.indeterminate ? "true" : "false",
  20124. name: _ctx.name,
  20125. tabindex: _ctx.tabindex,
  20126. disabled: unref(isDisabled),
  20127. "true-value": _ctx.trueLabel,
  20128. "false-value": _ctx.falseLabel,
  20129. onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  20130. onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
  20131. onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false)
  20132. }, null, 42, _hoisted_28)), [
  20133. [vModelCheckbox, unref(model)]
  20134. ]) : withDirectives((openBlock(), createElementBlock("input", {
  20135. key: 1,
  20136. id: unref(inputId),
  20137. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(model) ? model.value = $event : null),
  20138. class: normalizeClass(unref(ns2).e("original")),
  20139. type: "checkbox",
  20140. "aria-hidden": _ctx.indeterminate ? "true" : "false",
  20141. disabled: unref(isDisabled),
  20142. value: _ctx.label,
  20143. name: _ctx.name,
  20144. tabindex: _ctx.tabindex,
  20145. onChange: _cache[5] || (_cache[5] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  20146. onFocus: _cache[6] || (_cache[6] = ($event) => isFocused.value = true),
  20147. onBlur: _cache[7] || (_cache[7] = ($event) => isFocused.value = false)
  20148. }, null, 42, _hoisted_33)), [
  20149. [vModelCheckbox, unref(model)]
  20150. ]),
  20151. createBaseVNode("span", {
  20152. class: normalizeClass(unref(ns2).e("inner"))
  20153. }, null, 2)
  20154. ], 10, _hoisted_112),
  20155. unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
  20156. key: 0,
  20157. class: normalizeClass(unref(ns2).e("label"))
  20158. }, [
  20159. renderSlot(_ctx.$slots, "default"),
  20160. !_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  20161. createTextVNode(toDisplayString(_ctx.label), 1)
  20162. ], 64)) : createCommentVNode("v-if", true)
  20163. ], 2)) : createCommentVNode("v-if", true)
  20164. ]),
  20165. _: 3
  20166. }, 8, ["class", "aria-controls", "onClick"]);
  20167. };
  20168. }
  20169. });
  20170. var Checkbox = _export_sfc(_sfc_main33, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);
  20171. // node_modules/element-plus/es/components/checkbox/src/checkbox-button.mjs
  20172. var _hoisted_113 = ["name", "tabindex", "disabled", "true-value", "false-value"];
  20173. var _hoisted_29 = ["name", "tabindex", "disabled", "value"];
  20174. var __default__28 = defineComponent({
  20175. name: "ElCheckboxButton"
  20176. });
  20177. var _sfc_main34 = defineComponent({
  20178. ...__default__28,
  20179. props: checkboxProps,
  20180. emits: checkboxEmits,
  20181. setup(__props) {
  20182. const props = __props;
  20183. const slots = useSlots();
  20184. const {
  20185. isFocused,
  20186. isChecked,
  20187. isDisabled,
  20188. checkboxButtonSize,
  20189. model,
  20190. handleChange
  20191. } = useCheckbox(props, slots);
  20192. const checkboxGroup = inject(checkboxGroupContextKey, void 0);
  20193. const ns2 = useNamespace("checkbox");
  20194. const activeStyle = computed2(() => {
  20195. var _a2, _b, _c, _d;
  20196. const fillValue = (_b = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a2.value) != null ? _b : "";
  20197. return {
  20198. backgroundColor: fillValue,
  20199. borderColor: fillValue,
  20200. color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : "",
  20201. boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
  20202. };
  20203. });
  20204. const lableKls = computed2(() => {
  20205. return [
  20206. ns2.b("button"),
  20207. ns2.bm("button", checkboxButtonSize.value),
  20208. ns2.is("disabled", isDisabled.value),
  20209. ns2.is("checked", isChecked.value),
  20210. ns2.is("focus", isFocused.value)
  20211. ];
  20212. });
  20213. return (_ctx, _cache) => {
  20214. return openBlock(), createElementBlock("label", {
  20215. class: normalizeClass(unref(lableKls))
  20216. }, [
  20217. _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
  20218. key: 0,
  20219. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
  20220. class: normalizeClass(unref(ns2).be("button", "original")),
  20221. type: "checkbox",
  20222. name: _ctx.name,
  20223. tabindex: _ctx.tabindex,
  20224. disabled: unref(isDisabled),
  20225. "true-value": _ctx.trueLabel,
  20226. "false-value": _ctx.falseLabel,
  20227. onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  20228. onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
  20229. onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false)
  20230. }, null, 42, _hoisted_113)), [
  20231. [vModelCheckbox, unref(model)]
  20232. ]) : withDirectives((openBlock(), createElementBlock("input", {
  20233. key: 1,
  20234. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(model) ? model.value = $event : null),
  20235. class: normalizeClass(unref(ns2).be("button", "original")),
  20236. type: "checkbox",
  20237. name: _ctx.name,
  20238. tabindex: _ctx.tabindex,
  20239. disabled: unref(isDisabled),
  20240. value: _ctx.label,
  20241. onChange: _cache[5] || (_cache[5] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
  20242. onFocus: _cache[6] || (_cache[6] = ($event) => isFocused.value = true),
  20243. onBlur: _cache[7] || (_cache[7] = ($event) => isFocused.value = false)
  20244. }, null, 42, _hoisted_29)), [
  20245. [vModelCheckbox, unref(model)]
  20246. ]),
  20247. _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock("span", {
  20248. key: 2,
  20249. class: normalizeClass(unref(ns2).be("button", "inner")),
  20250. style: normalizeStyle(unref(isChecked) ? unref(activeStyle) : void 0)
  20251. }, [
  20252. renderSlot(_ctx.$slots, "default", {}, () => [
  20253. createTextVNode(toDisplayString(_ctx.label), 1)
  20254. ])
  20255. ], 6)) : createCommentVNode("v-if", true)
  20256. ], 2);
  20257. };
  20258. }
  20259. });
  20260. var CheckboxButton = _export_sfc(_sfc_main34, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);
  20261. // node_modules/element-plus/es/components/checkbox/src/checkbox-group.mjs
  20262. var checkboxGroupProps = buildProps({
  20263. modelValue: {
  20264. type: definePropType(Array),
  20265. default: () => []
  20266. },
  20267. disabled: Boolean,
  20268. min: Number,
  20269. max: Number,
  20270. size: useSizeProp,
  20271. label: String,
  20272. fill: String,
  20273. textColor: String,
  20274. tag: {
  20275. type: String,
  20276. default: "div"
  20277. },
  20278. validateEvent: {
  20279. type: Boolean,
  20280. default: true
  20281. }
  20282. });
  20283. var checkboxGroupEmits = {
  20284. [UPDATE_MODEL_EVENT]: (val) => isArray(val),
  20285. change: (val) => isArray(val)
  20286. };
  20287. // node_modules/element-plus/es/components/checkbox/src/checkbox-group2.mjs
  20288. var __default__29 = defineComponent({
  20289. name: "ElCheckboxGroup"
  20290. });
  20291. var _sfc_main35 = defineComponent({
  20292. ...__default__29,
  20293. props: checkboxGroupProps,
  20294. emits: checkboxGroupEmits,
  20295. setup(__props, { emit }) {
  20296. const props = __props;
  20297. const ns2 = useNamespace("checkbox");
  20298. const { formItem } = useFormItem();
  20299. const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
  20300. formItemContext: formItem
  20301. });
  20302. const changeEvent = async (value) => {
  20303. emit(UPDATE_MODEL_EVENT, value);
  20304. await nextTick();
  20305. emit("change", value);
  20306. };
  20307. const modelValue = computed2({
  20308. get() {
  20309. return props.modelValue;
  20310. },
  20311. set(val) {
  20312. changeEvent(val);
  20313. }
  20314. });
  20315. provide(checkboxGroupContextKey, {
  20316. ...pick_default(toRefs(props), [
  20317. "size",
  20318. "min",
  20319. "max",
  20320. "disabled",
  20321. "validateEvent",
  20322. "fill",
  20323. "textColor"
  20324. ]),
  20325. modelValue,
  20326. changeEvent
  20327. });
  20328. watch(() => props.modelValue, () => {
  20329. if (props.validateEvent) {
  20330. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  20331. }
  20332. });
  20333. return (_ctx, _cache) => {
  20334. var _a2;
  20335. return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
  20336. id: unref(groupId),
  20337. class: normalizeClass(unref(ns2).b("group")),
  20338. role: "group",
  20339. "aria-label": !unref(isLabeledByFormItem) ? _ctx.label || "checkbox-group" : void 0,
  20340. "aria-labelledby": unref(isLabeledByFormItem) ? (_a2 = unref(formItem)) == null ? void 0 : _a2.labelId : void 0
  20341. }, {
  20342. default: withCtx(() => [
  20343. renderSlot(_ctx.$slots, "default")
  20344. ]),
  20345. _: 3
  20346. }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
  20347. };
  20348. }
  20349. });
  20350. var CheckboxGroup = _export_sfc(_sfc_main35, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);
  20351. // node_modules/element-plus/es/components/checkbox/index.mjs
  20352. var ElCheckbox = withInstall(Checkbox, {
  20353. CheckboxButton,
  20354. CheckboxGroup
  20355. });
  20356. var ElCheckboxButton = withNoopInstall(CheckboxButton);
  20357. var ElCheckboxGroup = withNoopInstall(CheckboxGroup);
  20358. // node_modules/element-plus/es/components/radio/src/radio.mjs
  20359. var radioPropsBase = buildProps({
  20360. size: useSizeProp,
  20361. disabled: Boolean,
  20362. label: {
  20363. type: [String, Number, Boolean],
  20364. default: ""
  20365. }
  20366. });
  20367. var radioProps = buildProps({
  20368. ...radioPropsBase,
  20369. modelValue: {
  20370. type: [String, Number, Boolean],
  20371. default: ""
  20372. },
  20373. name: {
  20374. type: String,
  20375. default: ""
  20376. },
  20377. border: Boolean
  20378. });
  20379. var radioEmits = {
  20380. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val),
  20381. [CHANGE_EVENT]: (val) => isString(val) || isNumber2(val) || isBoolean2(val)
  20382. };
  20383. // node_modules/element-plus/es/components/radio/src/use-radio.mjs
  20384. var useRadio = (props, emit) => {
  20385. const radioRef = ref();
  20386. const radioGroup = inject(radioGroupKey, void 0);
  20387. const isGroup = computed2(() => !!radioGroup);
  20388. const modelValue = computed2({
  20389. get() {
  20390. return isGroup.value ? radioGroup.modelValue : props.modelValue;
  20391. },
  20392. set(val) {
  20393. if (isGroup.value) {
  20394. radioGroup.changeEvent(val);
  20395. } else {
  20396. emit && emit(UPDATE_MODEL_EVENT, val);
  20397. }
  20398. radioRef.value.checked = props.modelValue === props.label;
  20399. }
  20400. });
  20401. const size3 = useSize(computed2(() => radioGroup == null ? void 0 : radioGroup.size));
  20402. const disabled = useDisabled(computed2(() => radioGroup == null ? void 0 : radioGroup.disabled));
  20403. const focus = ref(false);
  20404. const tabIndex = computed2(() => {
  20405. return disabled.value || isGroup.value && modelValue.value !== props.label ? -1 : 0;
  20406. });
  20407. return {
  20408. radioRef,
  20409. isGroup,
  20410. radioGroup,
  20411. focus,
  20412. size: size3,
  20413. disabled,
  20414. tabIndex,
  20415. modelValue
  20416. };
  20417. };
  20418. // node_modules/element-plus/es/components/radio/src/radio2.mjs
  20419. var _hoisted_114 = ["value", "name", "disabled"];
  20420. var __default__30 = defineComponent({
  20421. name: "ElRadio"
  20422. });
  20423. var _sfc_main36 = defineComponent({
  20424. ...__default__30,
  20425. props: radioProps,
  20426. emits: radioEmits,
  20427. setup(__props, { emit }) {
  20428. const props = __props;
  20429. const ns2 = useNamespace("radio");
  20430. const { radioRef, radioGroup, focus, size: size3, disabled, modelValue } = useRadio(props, emit);
  20431. function handleChange() {
  20432. nextTick(() => emit("change", modelValue.value));
  20433. }
  20434. return (_ctx, _cache) => {
  20435. var _a2;
  20436. return openBlock(), createElementBlock("label", {
  20437. class: normalizeClass([
  20438. unref(ns2).b(),
  20439. unref(ns2).is("disabled", unref(disabled)),
  20440. unref(ns2).is("focus", unref(focus)),
  20441. unref(ns2).is("bordered", _ctx.border),
  20442. unref(ns2).is("checked", unref(modelValue) === _ctx.label),
  20443. unref(ns2).m(unref(size3))
  20444. ])
  20445. }, [
  20446. createBaseVNode("span", {
  20447. class: normalizeClass([
  20448. unref(ns2).e("input"),
  20449. unref(ns2).is("disabled", unref(disabled)),
  20450. unref(ns2).is("checked", unref(modelValue) === _ctx.label)
  20451. ])
  20452. }, [
  20453. withDirectives(createBaseVNode("input", {
  20454. ref_key: "radioRef",
  20455. ref: radioRef,
  20456. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
  20457. class: normalizeClass(unref(ns2).e("original")),
  20458. value: _ctx.label,
  20459. name: _ctx.name || ((_a2 = unref(radioGroup)) == null ? void 0 : _a2.name),
  20460. disabled: unref(disabled),
  20461. type: "radio",
  20462. onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
  20463. onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
  20464. onChange: handleChange
  20465. }, null, 42, _hoisted_114), [
  20466. [vModelRadio, unref(modelValue)]
  20467. ]),
  20468. createBaseVNode("span", {
  20469. class: normalizeClass(unref(ns2).e("inner"))
  20470. }, null, 2)
  20471. ], 2),
  20472. createBaseVNode("span", {
  20473. class: normalizeClass(unref(ns2).e("label")),
  20474. onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
  20475. }, ["stop"]))
  20476. }, [
  20477. renderSlot(_ctx.$slots, "default", {}, () => [
  20478. createTextVNode(toDisplayString(_ctx.label), 1)
  20479. ])
  20480. ], 34)
  20481. ], 2);
  20482. };
  20483. }
  20484. });
  20485. var Radio = _export_sfc(_sfc_main36, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
  20486. // node_modules/element-plus/es/components/radio/src/radio-button.mjs
  20487. var radioButtonProps = buildProps({
  20488. ...radioPropsBase,
  20489. name: {
  20490. type: String,
  20491. default: ""
  20492. }
  20493. });
  20494. // node_modules/element-plus/es/components/radio/src/radio-button2.mjs
  20495. var _hoisted_115 = ["value", "name", "disabled"];
  20496. var __default__31 = defineComponent({
  20497. name: "ElRadioButton"
  20498. });
  20499. var _sfc_main37 = defineComponent({
  20500. ...__default__31,
  20501. props: radioButtonProps,
  20502. setup(__props) {
  20503. const props = __props;
  20504. const ns2 = useNamespace("radio");
  20505. const { radioRef, focus, size: size3, disabled, modelValue, radioGroup } = useRadio(props);
  20506. const activeStyle = computed2(() => {
  20507. return {
  20508. backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
  20509. borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
  20510. boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
  20511. color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
  20512. };
  20513. });
  20514. return (_ctx, _cache) => {
  20515. var _a2;
  20516. return openBlock(), createElementBlock("label", {
  20517. class: normalizeClass([
  20518. unref(ns2).b("button"),
  20519. unref(ns2).is("active", unref(modelValue) === _ctx.label),
  20520. unref(ns2).is("disabled", unref(disabled)),
  20521. unref(ns2).is("focus", unref(focus)),
  20522. unref(ns2).bm("button", unref(size3))
  20523. ])
  20524. }, [
  20525. withDirectives(createBaseVNode("input", {
  20526. ref_key: "radioRef",
  20527. ref: radioRef,
  20528. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
  20529. class: normalizeClass(unref(ns2).be("button", "original-radio")),
  20530. value: _ctx.label,
  20531. type: "radio",
  20532. name: _ctx.name || ((_a2 = unref(radioGroup)) == null ? void 0 : _a2.name),
  20533. disabled: unref(disabled),
  20534. onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
  20535. onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false)
  20536. }, null, 42, _hoisted_115), [
  20537. [vModelRadio, unref(modelValue)]
  20538. ]),
  20539. createBaseVNode("span", {
  20540. class: normalizeClass(unref(ns2).be("button", "inner")),
  20541. style: normalizeStyle(unref(modelValue) === _ctx.label ? unref(activeStyle) : {}),
  20542. onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
  20543. }, ["stop"]))
  20544. }, [
  20545. renderSlot(_ctx.$slots, "default", {}, () => [
  20546. createTextVNode(toDisplayString(_ctx.label), 1)
  20547. ])
  20548. ], 38)
  20549. ], 2);
  20550. };
  20551. }
  20552. });
  20553. var RadioButton = _export_sfc(_sfc_main37, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
  20554. // node_modules/element-plus/es/components/radio/src/radio-group.mjs
  20555. var radioGroupProps = buildProps({
  20556. id: {
  20557. type: String,
  20558. default: void 0
  20559. },
  20560. size: useSizeProp,
  20561. disabled: Boolean,
  20562. modelValue: {
  20563. type: [String, Number, Boolean],
  20564. default: ""
  20565. },
  20566. fill: {
  20567. type: String,
  20568. default: ""
  20569. },
  20570. label: {
  20571. type: String,
  20572. default: void 0
  20573. },
  20574. textColor: {
  20575. type: String,
  20576. default: ""
  20577. },
  20578. name: {
  20579. type: String,
  20580. default: void 0
  20581. },
  20582. validateEvent: {
  20583. type: Boolean,
  20584. default: true
  20585. }
  20586. });
  20587. var radioGroupEmits = radioEmits;
  20588. // node_modules/element-plus/es/components/radio/src/radio-group2.mjs
  20589. var _hoisted_116 = ["id", "aria-label", "aria-labelledby"];
  20590. var __default__32 = defineComponent({
  20591. name: "ElRadioGroup"
  20592. });
  20593. var _sfc_main38 = defineComponent({
  20594. ...__default__32,
  20595. props: radioGroupProps,
  20596. emits: radioGroupEmits,
  20597. setup(__props, { emit }) {
  20598. const props = __props;
  20599. const ns2 = useNamespace("radio");
  20600. const radioId = useId();
  20601. const radioGroupRef = ref();
  20602. const { formItem } = useFormItem();
  20603. const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
  20604. formItemContext: formItem
  20605. });
  20606. const changeEvent = (value) => {
  20607. emit(UPDATE_MODEL_EVENT, value);
  20608. nextTick(() => emit("change", value));
  20609. };
  20610. onMounted(() => {
  20611. const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
  20612. const firstLabel = radios[0];
  20613. if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
  20614. firstLabel.tabIndex = 0;
  20615. }
  20616. });
  20617. const name = computed2(() => {
  20618. return props.name || radioId.value;
  20619. });
  20620. provide(radioGroupKey, reactive({
  20621. ...toRefs(props),
  20622. changeEvent,
  20623. name
  20624. }));
  20625. watch(() => props.modelValue, () => {
  20626. if (props.validateEvent) {
  20627. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  20628. }
  20629. });
  20630. return (_ctx, _cache) => {
  20631. return openBlock(), createElementBlock("div", {
  20632. id: unref(groupId),
  20633. ref_key: "radioGroupRef",
  20634. ref: radioGroupRef,
  20635. class: normalizeClass(unref(ns2).b("group")),
  20636. role: "radiogroup",
  20637. "aria-label": !unref(isLabeledByFormItem) ? _ctx.label || "radio-group" : void 0,
  20638. "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
  20639. }, [
  20640. renderSlot(_ctx.$slots, "default")
  20641. ], 10, _hoisted_116);
  20642. };
  20643. }
  20644. });
  20645. var RadioGroup = _export_sfc(_sfc_main38, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
  20646. // node_modules/element-plus/es/components/radio/index.mjs
  20647. var ElRadio = withInstall(Radio, {
  20648. RadioButton,
  20649. RadioGroup
  20650. });
  20651. var ElRadioGroup = withNoopInstall(RadioGroup);
  20652. var ElRadioButton = withNoopInstall(RadioButton);
  20653. // node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
  20654. var NodeContent = defineComponent({
  20655. name: "NodeContent",
  20656. setup() {
  20657. const ns2 = useNamespace("cascader-node");
  20658. return {
  20659. ns: ns2
  20660. };
  20661. },
  20662. render() {
  20663. const { ns: ns2 } = this;
  20664. const { node, panel } = this.$parent;
  20665. const { data, label } = node;
  20666. const { renderLabelFn } = panel;
  20667. return h("span", { class: ns2.e("label") }, renderLabelFn ? renderLabelFn({ node, data }) : label);
  20668. }
  20669. });
  20670. // node_modules/element-plus/es/components/cascader-panel/src/types.mjs
  20671. var CASCADER_PANEL_INJECTION_KEY = Symbol();
  20672. // node_modules/element-plus/es/components/cascader-panel/src/node2.mjs
  20673. var _sfc_main39 = defineComponent({
  20674. name: "ElCascaderNode",
  20675. components: {
  20676. ElCheckbox,
  20677. ElRadio,
  20678. NodeContent,
  20679. ElIcon,
  20680. Check: check_default,
  20681. Loading: loading_default,
  20682. ArrowRight: arrow_right_default
  20683. },
  20684. props: {
  20685. node: {
  20686. type: Object,
  20687. required: true
  20688. },
  20689. menuId: String
  20690. },
  20691. emits: ["expand"],
  20692. setup(props, { emit }) {
  20693. const panel = inject(CASCADER_PANEL_INJECTION_KEY);
  20694. const ns2 = useNamespace("cascader-node");
  20695. const isHoverMenu = computed2(() => panel.isHoverMenu);
  20696. const multiple = computed2(() => panel.config.multiple);
  20697. const checkStrictly = computed2(() => panel.config.checkStrictly);
  20698. const checkedNodeId = computed2(() => {
  20699. var _a2;
  20700. return (_a2 = panel.checkedNodes[0]) == null ? void 0 : _a2.uid;
  20701. });
  20702. const isDisabled = computed2(() => props.node.isDisabled);
  20703. const isLeaf2 = computed2(() => props.node.isLeaf);
  20704. const expandable = computed2(() => checkStrictly.value && !isLeaf2.value || !isDisabled.value);
  20705. const inExpandingPath = computed2(() => isInPath(panel.expandingNode));
  20706. const inCheckedPath = computed2(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
  20707. const isInPath = (node) => {
  20708. var _a2;
  20709. const { level, uid: uid2 } = props.node;
  20710. return ((_a2 = node == null ? void 0 : node.pathNodes[level - 1]) == null ? void 0 : _a2.uid) === uid2;
  20711. };
  20712. const doExpand = () => {
  20713. if (inExpandingPath.value)
  20714. return;
  20715. panel.expandNode(props.node);
  20716. };
  20717. const doCheck = (checked) => {
  20718. const { node } = props;
  20719. if (checked === node.checked)
  20720. return;
  20721. panel.handleCheckChange(node, checked);
  20722. };
  20723. const doLoad = () => {
  20724. panel.lazyLoad(props.node, () => {
  20725. if (!isLeaf2.value)
  20726. doExpand();
  20727. });
  20728. };
  20729. const handleHoverExpand = (e) => {
  20730. if (!isHoverMenu.value)
  20731. return;
  20732. handleExpand();
  20733. !isLeaf2.value && emit("expand", e);
  20734. };
  20735. const handleExpand = () => {
  20736. const { node } = props;
  20737. if (!expandable.value || node.loading)
  20738. return;
  20739. node.loaded ? doExpand() : doLoad();
  20740. };
  20741. const handleClick = () => {
  20742. if (isHoverMenu.value && !isLeaf2.value)
  20743. return;
  20744. if (isLeaf2.value && !isDisabled.value && !checkStrictly.value && !multiple.value) {
  20745. handleCheck(true);
  20746. } else {
  20747. handleExpand();
  20748. }
  20749. };
  20750. const handleSelectCheck = (checked) => {
  20751. if (checkStrictly.value) {
  20752. doCheck(checked);
  20753. if (props.node.loaded) {
  20754. doExpand();
  20755. }
  20756. } else {
  20757. handleCheck(checked);
  20758. }
  20759. };
  20760. const handleCheck = (checked) => {
  20761. if (!props.node.loaded) {
  20762. doLoad();
  20763. } else {
  20764. doCheck(checked);
  20765. !checkStrictly.value && doExpand();
  20766. }
  20767. };
  20768. return {
  20769. panel,
  20770. isHoverMenu,
  20771. multiple,
  20772. checkStrictly,
  20773. checkedNodeId,
  20774. isDisabled,
  20775. isLeaf: isLeaf2,
  20776. expandable,
  20777. inExpandingPath,
  20778. inCheckedPath,
  20779. ns: ns2,
  20780. handleHoverExpand,
  20781. handleExpand,
  20782. handleClick,
  20783. handleCheck,
  20784. handleSelectCheck
  20785. };
  20786. }
  20787. });
  20788. var _hoisted_117 = ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"];
  20789. var _hoisted_210 = createBaseVNode("span", null, null, -1);
  20790. function _sfc_render2(_ctx, _cache, $props, $setup, $data, $options) {
  20791. const _component_el_checkbox = resolveComponent("el-checkbox");
  20792. const _component_el_radio = resolveComponent("el-radio");
  20793. const _component_check = resolveComponent("check");
  20794. const _component_el_icon = resolveComponent("el-icon");
  20795. const _component_node_content = resolveComponent("node-content");
  20796. const _component_loading = resolveComponent("loading");
  20797. const _component_arrow_right = resolveComponent("arrow-right");
  20798. return openBlock(), createElementBlock("li", {
  20799. id: `${_ctx.menuId}-${_ctx.node.uid}`,
  20800. role: "menuitem",
  20801. "aria-haspopup": !_ctx.isLeaf,
  20802. "aria-owns": _ctx.isLeaf ? null : _ctx.menuId,
  20803. "aria-expanded": _ctx.inExpandingPath,
  20804. tabindex: _ctx.expandable ? -1 : void 0,
  20805. class: normalizeClass([
  20806. _ctx.ns.b(),
  20807. _ctx.ns.is("selectable", _ctx.checkStrictly),
  20808. _ctx.ns.is("active", _ctx.node.checked),
  20809. _ctx.ns.is("disabled", !_ctx.expandable),
  20810. _ctx.inExpandingPath && "in-active-path",
  20811. _ctx.inCheckedPath && "in-checked-path"
  20812. ]),
  20813. onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.handleHoverExpand && _ctx.handleHoverExpand(...args)),
  20814. onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.handleHoverExpand && _ctx.handleHoverExpand(...args)),
  20815. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
  20816. }, [
  20817. createCommentVNode(" prefix "),
  20818. _ctx.multiple ? (openBlock(), createBlock(_component_el_checkbox, {
  20819. key: 0,
  20820. "model-value": _ctx.node.checked,
  20821. indeterminate: _ctx.node.indeterminate,
  20822. disabled: _ctx.isDisabled,
  20823. onClick: _cache[0] || (_cache[0] = withModifiers(() => {
  20824. }, ["stop"])),
  20825. "onUpdate:modelValue": _ctx.handleSelectCheck
  20826. }, null, 8, ["model-value", "indeterminate", "disabled", "onUpdate:modelValue"])) : _ctx.checkStrictly ? (openBlock(), createBlock(_component_el_radio, {
  20827. key: 1,
  20828. "model-value": _ctx.checkedNodeId,
  20829. label: _ctx.node.uid,
  20830. disabled: _ctx.isDisabled,
  20831. "onUpdate:modelValue": _ctx.handleSelectCheck,
  20832. onClick: _cache[1] || (_cache[1] = withModifiers(() => {
  20833. }, ["stop"]))
  20834. }, {
  20835. default: withCtx(() => [
  20836. 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 "),
  20837. _hoisted_210
  20838. ]),
  20839. _: 1
  20840. }, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])) : _ctx.isLeaf && _ctx.node.checked ? (openBlock(), createBlock(_component_el_icon, {
  20841. key: 2,
  20842. class: normalizeClass(_ctx.ns.e("prefix"))
  20843. }, {
  20844. default: withCtx(() => [
  20845. createVNode(_component_check)
  20846. ]),
  20847. _: 1
  20848. }, 8, ["class"])) : createCommentVNode("v-if", true),
  20849. createCommentVNode(" content "),
  20850. createVNode(_component_node_content),
  20851. createCommentVNode(" postfix "),
  20852. !_ctx.isLeaf ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
  20853. _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
  20854. key: 0,
  20855. class: normalizeClass([_ctx.ns.is("loading"), _ctx.ns.e("postfix")])
  20856. }, {
  20857. default: withCtx(() => [
  20858. createVNode(_component_loading)
  20859. ]),
  20860. _: 1
  20861. }, 8, ["class"])) : (openBlock(), createBlock(_component_el_icon, {
  20862. key: 1,
  20863. class: normalizeClass(["arrow-right", _ctx.ns.e("postfix")])
  20864. }, {
  20865. default: withCtx(() => [
  20866. createVNode(_component_arrow_right)
  20867. ]),
  20868. _: 1
  20869. }, 8, ["class"]))
  20870. ], 64)) : createCommentVNode("v-if", true)
  20871. ], 42, _hoisted_117);
  20872. }
  20873. var ElCascaderNode = _export_sfc(_sfc_main39, [["render", _sfc_render2], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]);
  20874. // node_modules/element-plus/es/components/cascader-panel/src/menu.mjs
  20875. var _sfc_main40 = defineComponent({
  20876. name: "ElCascaderMenu",
  20877. components: {
  20878. Loading: loading_default,
  20879. ElIcon,
  20880. ElScrollbar,
  20881. ElCascaderNode
  20882. },
  20883. props: {
  20884. nodes: {
  20885. type: Array,
  20886. required: true
  20887. },
  20888. index: {
  20889. type: Number,
  20890. required: true
  20891. }
  20892. },
  20893. setup(props) {
  20894. const instance = getCurrentInstance();
  20895. const ns2 = useNamespace("cascader-menu");
  20896. const { t } = useLocale();
  20897. const id2 = generateId();
  20898. let activeNode = null;
  20899. let hoverTimer = null;
  20900. const panel = inject(CASCADER_PANEL_INJECTION_KEY);
  20901. const hoverZone = ref(null);
  20902. const isEmpty3 = computed2(() => !props.nodes.length);
  20903. const isLoading = computed2(() => !panel.initialLoaded);
  20904. const menuId = computed2(() => `cascader-menu-${id2}-${props.index}`);
  20905. const handleExpand = (e) => {
  20906. activeNode = e.target;
  20907. };
  20908. const handleMouseMove = (e) => {
  20909. if (!panel.isHoverMenu || !activeNode || !hoverZone.value)
  20910. return;
  20911. if (activeNode.contains(e.target)) {
  20912. clearHoverTimer();
  20913. const el = instance.vnode.el;
  20914. const { left: left2 } = el.getBoundingClientRect();
  20915. const { offsetWidth, offsetHeight } = el;
  20916. const startX = e.clientX - left2;
  20917. const top = activeNode.offsetTop;
  20918. const bottom = top + activeNode.offsetHeight;
  20919. hoverZone.value.innerHTML = `
  20920. <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${top} L${offsetWidth} 0 V${top} Z" />
  20921. <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${bottom} L${offsetWidth} ${offsetHeight} V${bottom} Z" />
  20922. `;
  20923. } else if (!hoverTimer) {
  20924. hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);
  20925. }
  20926. };
  20927. const clearHoverTimer = () => {
  20928. if (!hoverTimer)
  20929. return;
  20930. clearTimeout(hoverTimer);
  20931. hoverTimer = null;
  20932. };
  20933. const clearHoverZone = () => {
  20934. if (!hoverZone.value)
  20935. return;
  20936. hoverZone.value.innerHTML = "";
  20937. clearHoverTimer();
  20938. };
  20939. return {
  20940. ns: ns2,
  20941. panel,
  20942. hoverZone,
  20943. isEmpty: isEmpty3,
  20944. isLoading,
  20945. menuId,
  20946. t,
  20947. handleExpand,
  20948. handleMouseMove,
  20949. clearHoverZone
  20950. };
  20951. }
  20952. });
  20953. function _sfc_render3(_ctx, _cache, $props, $setup, $data, $options) {
  20954. const _component_el_cascader_node = resolveComponent("el-cascader-node");
  20955. const _component_loading = resolveComponent("loading");
  20956. const _component_el_icon = resolveComponent("el-icon");
  20957. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  20958. return openBlock(), createBlock(_component_el_scrollbar, {
  20959. key: _ctx.menuId,
  20960. tag: "ul",
  20961. role: "menu",
  20962. class: normalizeClass(_ctx.ns.b()),
  20963. "wrap-class": _ctx.ns.e("wrap"),
  20964. "view-class": [_ctx.ns.e("list"), _ctx.ns.is("empty", _ctx.isEmpty)],
  20965. onMousemove: _ctx.handleMouseMove,
  20966. onMouseleave: _ctx.clearHoverZone
  20967. }, {
  20968. default: withCtx(() => {
  20969. var _a2;
  20970. return [
  20971. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.nodes, (node) => {
  20972. return openBlock(), createBlock(_component_el_cascader_node, {
  20973. key: node.uid,
  20974. node,
  20975. "menu-id": _ctx.menuId,
  20976. onExpand: _ctx.handleExpand
  20977. }, null, 8, ["node", "menu-id", "onExpand"]);
  20978. }), 128)),
  20979. _ctx.isLoading ? (openBlock(), createElementBlock("div", {
  20980. key: 0,
  20981. class: normalizeClass(_ctx.ns.e("empty-text"))
  20982. }, [
  20983. createVNode(_component_el_icon, {
  20984. size: "14",
  20985. class: normalizeClass(_ctx.ns.is("loading"))
  20986. }, {
  20987. default: withCtx(() => [
  20988. createVNode(_component_loading)
  20989. ]),
  20990. _: 1
  20991. }, 8, ["class"]),
  20992. createTextVNode(" " + toDisplayString(_ctx.t("el.cascader.loading")), 1)
  20993. ], 2)) : _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
  20994. key: 1,
  20995. class: normalizeClass(_ctx.ns.e("empty-text"))
  20996. }, toDisplayString(_ctx.t("el.cascader.noData")), 3)) : ((_a2 = _ctx.panel) == null ? void 0 : _a2.isHoverMenu) ? (openBlock(), createElementBlock("svg", {
  20997. key: 2,
  20998. ref: "hoverZone",
  20999. class: normalizeClass(_ctx.ns.e("hover-zone"))
  21000. }, null, 2)) : createCommentVNode("v-if", true)
  21001. ];
  21002. }),
  21003. _: 1
  21004. }, 8, ["class", "wrap-class", "view-class", "onMousemove", "onMouseleave"]);
  21005. }
  21006. var ElCascaderMenu = _export_sfc(_sfc_main40, [["render", _sfc_render3], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]);
  21007. // node_modules/element-plus/es/components/cascader-panel/src/node.mjs
  21008. var uid = 0;
  21009. var calculatePathNodes = (node) => {
  21010. const nodes = [node];
  21011. let { parent: parent2 } = node;
  21012. while (parent2) {
  21013. nodes.unshift(parent2);
  21014. parent2 = parent2.parent;
  21015. }
  21016. return nodes;
  21017. };
  21018. var Node = class {
  21019. constructor(data, config, parent2, root2 = false) {
  21020. this.data = data;
  21021. this.config = config;
  21022. this.parent = parent2;
  21023. this.root = root2;
  21024. this.uid = uid++;
  21025. this.checked = false;
  21026. this.indeterminate = false;
  21027. this.loading = false;
  21028. const { value: valueKey, label: labelKey, children: childrenKey } = config;
  21029. const childrenData = data[childrenKey];
  21030. const pathNodes = calculatePathNodes(this);
  21031. this.level = root2 ? 0 : parent2 ? parent2.level + 1 : 1;
  21032. this.value = data[valueKey];
  21033. this.label = data[labelKey];
  21034. this.pathNodes = pathNodes;
  21035. this.pathValues = pathNodes.map((node) => node.value);
  21036. this.pathLabels = pathNodes.map((node) => node.label);
  21037. this.childrenData = childrenData;
  21038. this.children = (childrenData || []).map((child) => new Node(child, config, this));
  21039. this.loaded = !config.lazy || this.isLeaf || !isEmpty2(childrenData);
  21040. }
  21041. get isDisabled() {
  21042. const { data, parent: parent2, config } = this;
  21043. const { disabled, checkStrictly } = config;
  21044. const isDisabled = isFunction(disabled) ? disabled(data, this) : !!data[disabled];
  21045. return isDisabled || !checkStrictly && (parent2 == null ? void 0 : parent2.isDisabled);
  21046. }
  21047. get isLeaf() {
  21048. const { data, config, childrenData, loaded } = this;
  21049. const { lazy, leaf } = config;
  21050. const isLeaf2 = isFunction(leaf) ? leaf(data, this) : data[leaf];
  21051. return isUndefined2(isLeaf2) ? lazy && !loaded ? false : !(Array.isArray(childrenData) && childrenData.length) : !!isLeaf2;
  21052. }
  21053. get valueByOption() {
  21054. return this.config.emitPath ? this.pathValues : this.value;
  21055. }
  21056. appendChild(childData) {
  21057. const { childrenData, children } = this;
  21058. const node = new Node(childData, this.config, this);
  21059. if (Array.isArray(childrenData)) {
  21060. childrenData.push(childData);
  21061. } else {
  21062. this.childrenData = [childData];
  21063. }
  21064. children.push(node);
  21065. return node;
  21066. }
  21067. calcText(allLevels, separator) {
  21068. const text = allLevels ? this.pathLabels.join(separator) : this.label;
  21069. this.text = text;
  21070. return text;
  21071. }
  21072. broadcast(event, ...args) {
  21073. const handlerName = `onParent${capitalize3(event)}`;
  21074. this.children.forEach((child) => {
  21075. if (child) {
  21076. child.broadcast(event, ...args);
  21077. child[handlerName] && child[handlerName](...args);
  21078. }
  21079. });
  21080. }
  21081. emit(event, ...args) {
  21082. const { parent: parent2 } = this;
  21083. const handlerName = `onChild${capitalize3(event)}`;
  21084. if (parent2) {
  21085. parent2[handlerName] && parent2[handlerName](...args);
  21086. parent2.emit(event, ...args);
  21087. }
  21088. }
  21089. onParentCheck(checked) {
  21090. if (!this.isDisabled) {
  21091. this.setCheckState(checked);
  21092. }
  21093. }
  21094. onChildCheck() {
  21095. const { children } = this;
  21096. const validChildren = children.filter((child) => !child.isDisabled);
  21097. const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
  21098. this.setCheckState(checked);
  21099. }
  21100. setCheckState(checked) {
  21101. const totalNum = this.children.length;
  21102. const checkedNum = this.children.reduce((c2, p2) => {
  21103. const num = p2.checked ? 1 : p2.indeterminate ? 0.5 : 0;
  21104. return c2 + num;
  21105. }, 0);
  21106. this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
  21107. this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
  21108. }
  21109. doCheck(checked) {
  21110. if (this.checked === checked)
  21111. return;
  21112. const { checkStrictly, multiple } = this.config;
  21113. if (checkStrictly || !multiple) {
  21114. this.checked = checked;
  21115. } else {
  21116. this.broadcast("check", checked);
  21117. this.setCheckState(checked);
  21118. this.emit("check");
  21119. }
  21120. }
  21121. };
  21122. // node_modules/element-plus/es/components/cascader-panel/src/store.mjs
  21123. var flatNodes = (nodes, leafOnly) => {
  21124. return nodes.reduce((res, node) => {
  21125. if (node.isLeaf) {
  21126. res.push(node);
  21127. } else {
  21128. !leafOnly && res.push(node);
  21129. res = res.concat(flatNodes(node.children, leafOnly));
  21130. }
  21131. return res;
  21132. }, []);
  21133. };
  21134. var Store = class {
  21135. constructor(data, config) {
  21136. this.config = config;
  21137. const nodes = (data || []).map((nodeData) => new Node(nodeData, this.config));
  21138. this.nodes = nodes;
  21139. this.allNodes = flatNodes(nodes, false);
  21140. this.leafNodes = flatNodes(nodes, true);
  21141. }
  21142. getNodes() {
  21143. return this.nodes;
  21144. }
  21145. getFlattedNodes(leafOnly) {
  21146. return leafOnly ? this.leafNodes : this.allNodes;
  21147. }
  21148. appendNode(nodeData, parentNode) {
  21149. const node = parentNode ? parentNode.appendChild(nodeData) : new Node(nodeData, this.config);
  21150. if (!parentNode)
  21151. this.nodes.push(node);
  21152. this.allNodes.push(node);
  21153. node.isLeaf && this.leafNodes.push(node);
  21154. }
  21155. appendNodes(nodeDataList, parentNode) {
  21156. nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));
  21157. }
  21158. getNodeByValue(value, leafOnly = false) {
  21159. if (!value && value !== 0)
  21160. return null;
  21161. const node = this.getFlattedNodes(leafOnly).find((node2) => isEqual_default(node2.value, value) || isEqual_default(node2.pathValues, value));
  21162. return node || null;
  21163. }
  21164. getSameNode(node) {
  21165. if (!node)
  21166. return null;
  21167. const node_ = this.getFlattedNodes(false).find(({ value, level }) => isEqual_default(node.value, value) && node.level === level);
  21168. return node_ || null;
  21169. }
  21170. };
  21171. // node_modules/element-plus/es/components/cascader-panel/src/config.mjs
  21172. var CommonProps = {
  21173. modelValue: [Number, String, Array],
  21174. options: {
  21175. type: Array,
  21176. default: () => []
  21177. },
  21178. props: {
  21179. type: Object,
  21180. default: () => ({})
  21181. }
  21182. };
  21183. var DefaultProps = {
  21184. expandTrigger: "click",
  21185. multiple: false,
  21186. checkStrictly: false,
  21187. emitPath: true,
  21188. lazy: false,
  21189. lazyLoad: NOOP,
  21190. value: "value",
  21191. label: "label",
  21192. children: "children",
  21193. leaf: "leaf",
  21194. disabled: "disabled",
  21195. hoverThreshold: 500
  21196. };
  21197. var useCascaderConfig = (props) => {
  21198. return computed2(() => ({
  21199. ...DefaultProps,
  21200. ...props.props
  21201. }));
  21202. };
  21203. // node_modules/element-plus/es/components/cascader-panel/src/utils.mjs
  21204. var getMenuIndex = (el) => {
  21205. if (!el)
  21206. return 0;
  21207. const pieces = el.id.split("-");
  21208. return Number(pieces[pieces.length - 2]);
  21209. };
  21210. var checkNode = (el) => {
  21211. if (!el)
  21212. return;
  21213. const input = el.querySelector("input");
  21214. if (input) {
  21215. input.click();
  21216. } else if (isLeaf(el)) {
  21217. el.click();
  21218. }
  21219. };
  21220. var sortByOriginalOrder = (oldNodes, newNodes) => {
  21221. const newNodesCopy = newNodes.slice(0);
  21222. const newIds = newNodesCopy.map((node) => node.uid);
  21223. const res = oldNodes.reduce((acc, item) => {
  21224. const index = newIds.indexOf(item.uid);
  21225. if (index > -1) {
  21226. acc.push(item);
  21227. newNodesCopy.splice(index, 1);
  21228. newIds.splice(index, 1);
  21229. }
  21230. return acc;
  21231. }, []);
  21232. res.push(...newNodesCopy);
  21233. return res;
  21234. };
  21235. // node_modules/element-plus/es/components/cascader-panel/src/index.mjs
  21236. var _sfc_main41 = defineComponent({
  21237. name: "ElCascaderPanel",
  21238. components: {
  21239. ElCascaderMenu
  21240. },
  21241. props: {
  21242. ...CommonProps,
  21243. border: {
  21244. type: Boolean,
  21245. default: true
  21246. },
  21247. renderLabel: Function
  21248. },
  21249. emits: [UPDATE_MODEL_EVENT, CHANGE_EVENT, "close", "expand-change"],
  21250. setup(props, { emit, slots }) {
  21251. let manualChecked = false;
  21252. const ns2 = useNamespace("cascader");
  21253. const config = useCascaderConfig(props);
  21254. let store = null;
  21255. const initialLoaded = ref(true);
  21256. const menuList = ref([]);
  21257. const checkedValue = ref(null);
  21258. const menus = ref([]);
  21259. const expandingNode = ref(null);
  21260. const checkedNodes = ref([]);
  21261. const isHoverMenu = computed2(() => config.value.expandTrigger === "hover");
  21262. const renderLabelFn = computed2(() => props.renderLabel || slots.default);
  21263. const initStore = () => {
  21264. const { options } = props;
  21265. const cfg = config.value;
  21266. manualChecked = false;
  21267. store = new Store(options, cfg);
  21268. menus.value = [store.getNodes()];
  21269. if (cfg.lazy && isEmpty2(props.options)) {
  21270. initialLoaded.value = false;
  21271. lazyLoad(void 0, (list) => {
  21272. if (list) {
  21273. store = new Store(list, cfg);
  21274. menus.value = [store.getNodes()];
  21275. }
  21276. initialLoaded.value = true;
  21277. syncCheckedValue(false, true);
  21278. });
  21279. } else {
  21280. syncCheckedValue(false, true);
  21281. }
  21282. };
  21283. const lazyLoad = (node, cb) => {
  21284. const cfg = config.value;
  21285. node = node || new Node({}, cfg, void 0, true);
  21286. node.loading = true;
  21287. const resolve = (dataList) => {
  21288. const _node = node;
  21289. const parent2 = _node.root ? null : _node;
  21290. dataList && (store == null ? void 0 : store.appendNodes(dataList, parent2));
  21291. _node.loading = false;
  21292. _node.loaded = true;
  21293. _node.childrenData = _node.childrenData || [];
  21294. cb && cb(dataList);
  21295. };
  21296. cfg.lazyLoad(node, resolve);
  21297. };
  21298. const expandNode = (node, silent) => {
  21299. var _a2;
  21300. const { level } = node;
  21301. const newMenus = menus.value.slice(0, level);
  21302. let newExpandingNode;
  21303. if (node.isLeaf) {
  21304. newExpandingNode = node.pathNodes[level - 2];
  21305. } else {
  21306. newExpandingNode = node;
  21307. newMenus.push(node.children);
  21308. }
  21309. if (((_a2 = expandingNode.value) == null ? void 0 : _a2.uid) !== (newExpandingNode == null ? void 0 : newExpandingNode.uid)) {
  21310. expandingNode.value = node;
  21311. menus.value = newMenus;
  21312. !silent && emit("expand-change", (node == null ? void 0 : node.pathValues) || []);
  21313. }
  21314. };
  21315. const handleCheckChange = (node, checked, emitClose = true) => {
  21316. const { checkStrictly, multiple } = config.value;
  21317. const oldNode = checkedNodes.value[0];
  21318. manualChecked = true;
  21319. !multiple && (oldNode == null ? void 0 : oldNode.doCheck(false));
  21320. node.doCheck(checked);
  21321. calculateCheckedValue();
  21322. emitClose && !multiple && !checkStrictly && emit("close");
  21323. !emitClose && !multiple && !checkStrictly && expandParentNode(node);
  21324. };
  21325. const expandParentNode = (node) => {
  21326. if (!node)
  21327. return;
  21328. node = node.parent;
  21329. expandParentNode(node);
  21330. node && expandNode(node);
  21331. };
  21332. const getFlattedNodes = (leafOnly) => {
  21333. return store == null ? void 0 : store.getFlattedNodes(leafOnly);
  21334. };
  21335. const getCheckedNodes = (leafOnly) => {
  21336. var _a2;
  21337. return (_a2 = getFlattedNodes(leafOnly)) == null ? void 0 : _a2.filter((node) => node.checked !== false);
  21338. };
  21339. const clearCheckedNodes = () => {
  21340. checkedNodes.value.forEach((node) => node.doCheck(false));
  21341. calculateCheckedValue();
  21342. };
  21343. const calculateCheckedValue = () => {
  21344. var _a2;
  21345. const { checkStrictly, multiple } = config.value;
  21346. const oldNodes = checkedNodes.value;
  21347. const newNodes = getCheckedNodes(!checkStrictly);
  21348. const nodes = sortByOriginalOrder(oldNodes, newNodes);
  21349. const values2 = nodes.map((node) => node.valueByOption);
  21350. checkedNodes.value = nodes;
  21351. checkedValue.value = multiple ? values2 : (_a2 = values2[0]) != null ? _a2 : null;
  21352. };
  21353. const syncCheckedValue = (loaded = false, forced = false) => {
  21354. const { modelValue } = props;
  21355. const { lazy, multiple, checkStrictly } = config.value;
  21356. const leafOnly = !checkStrictly;
  21357. if (!initialLoaded.value || manualChecked || !forced && isEqual_default(modelValue, checkedValue.value))
  21358. return;
  21359. if (lazy && !loaded) {
  21360. const values2 = unique(flattenDeep_default(castArray2(modelValue)));
  21361. const nodes = values2.map((val) => store == null ? void 0 : store.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);
  21362. if (nodes.length) {
  21363. nodes.forEach((node) => {
  21364. lazyLoad(node, () => syncCheckedValue(false, forced));
  21365. });
  21366. } else {
  21367. syncCheckedValue(true, forced);
  21368. }
  21369. } else {
  21370. const values2 = multiple ? castArray2(modelValue) : [modelValue];
  21371. const nodes = unique(values2.map((val) => store == null ? void 0 : store.getNodeByValue(val, leafOnly)));
  21372. syncMenuState(nodes, forced);
  21373. checkedValue.value = cloneDeep_default(modelValue);
  21374. }
  21375. };
  21376. const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {
  21377. const { checkStrictly } = config.value;
  21378. const oldNodes = checkedNodes.value;
  21379. const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));
  21380. const oldExpandingNode = store == null ? void 0 : store.getSameNode(expandingNode.value);
  21381. const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];
  21382. if (newExpandingNode) {
  21383. newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));
  21384. } else {
  21385. expandingNode.value = null;
  21386. }
  21387. oldNodes.forEach((node) => node.doCheck(false));
  21388. newNodes.forEach((node) => node.doCheck(true));
  21389. checkedNodes.value = newNodes;
  21390. nextTick(scrollToExpandingNode);
  21391. };
  21392. const scrollToExpandingNode = () => {
  21393. if (!isClient)
  21394. return;
  21395. menuList.value.forEach((menu) => {
  21396. const menuElement = menu == null ? void 0 : menu.$el;
  21397. if (menuElement) {
  21398. const container = menuElement.querySelector(`.${ns2.namespace.value}-scrollbar__wrap`);
  21399. const activeNode = menuElement.querySelector(`.${ns2.b("node")}.${ns2.is("active")}`) || menuElement.querySelector(`.${ns2.b("node")}.in-active-path`);
  21400. scrollIntoView(container, activeNode);
  21401. }
  21402. });
  21403. };
  21404. const handleKeyDown = (e) => {
  21405. const target2 = e.target;
  21406. const { code } = e;
  21407. switch (code) {
  21408. case EVENT_CODE.up:
  21409. case EVENT_CODE.down: {
  21410. e.preventDefault();
  21411. const distance = code === EVENT_CODE.up ? -1 : 1;
  21412. focusNode(getSibling(target2, distance, `.${ns2.b("node")}[tabindex="-1"]`));
  21413. break;
  21414. }
  21415. case EVENT_CODE.left: {
  21416. e.preventDefault();
  21417. const preMenu = menuList.value[getMenuIndex(target2) - 1];
  21418. const expandedNode = preMenu == null ? void 0 : preMenu.$el.querySelector(`.${ns2.b("node")}[aria-expanded="true"]`);
  21419. focusNode(expandedNode);
  21420. break;
  21421. }
  21422. case EVENT_CODE.right: {
  21423. e.preventDefault();
  21424. const nextMenu = menuList.value[getMenuIndex(target2) + 1];
  21425. const firstNode = nextMenu == null ? void 0 : nextMenu.$el.querySelector(`.${ns2.b("node")}[tabindex="-1"]`);
  21426. focusNode(firstNode);
  21427. break;
  21428. }
  21429. case EVENT_CODE.enter:
  21430. checkNode(target2);
  21431. break;
  21432. }
  21433. };
  21434. provide(CASCADER_PANEL_INJECTION_KEY, reactive({
  21435. config,
  21436. expandingNode,
  21437. checkedNodes,
  21438. isHoverMenu,
  21439. initialLoaded,
  21440. renderLabelFn,
  21441. lazyLoad,
  21442. expandNode,
  21443. handleCheckChange
  21444. }));
  21445. watch([config, () => props.options], initStore, {
  21446. deep: true,
  21447. immediate: true
  21448. });
  21449. watch(() => props.modelValue, () => {
  21450. manualChecked = false;
  21451. syncCheckedValue();
  21452. }, {
  21453. deep: true
  21454. });
  21455. watch(() => checkedValue.value, (val) => {
  21456. if (!isEqual_default(val, props.modelValue)) {
  21457. emit(UPDATE_MODEL_EVENT, val);
  21458. emit(CHANGE_EVENT, val);
  21459. }
  21460. });
  21461. onBeforeUpdate(() => menuList.value = []);
  21462. onMounted(() => !isEmpty2(props.modelValue) && syncCheckedValue());
  21463. return {
  21464. ns: ns2,
  21465. menuList,
  21466. menus,
  21467. checkedNodes,
  21468. handleKeyDown,
  21469. handleCheckChange,
  21470. getFlattedNodes,
  21471. getCheckedNodes,
  21472. clearCheckedNodes,
  21473. calculateCheckedValue,
  21474. scrollToExpandingNode
  21475. };
  21476. }
  21477. });
  21478. function _sfc_render4(_ctx, _cache, $props, $setup, $data, $options) {
  21479. const _component_el_cascader_menu = resolveComponent("el-cascader-menu");
  21480. return openBlock(), createElementBlock("div", {
  21481. class: normalizeClass([_ctx.ns.b("panel"), _ctx.ns.is("bordered", _ctx.border)]),
  21482. onKeydown: _cache[0] || (_cache[0] = (...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args))
  21483. }, [
  21484. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu, index) => {
  21485. return openBlock(), createBlock(_component_el_cascader_menu, {
  21486. key: index,
  21487. ref_for: true,
  21488. ref: (item) => _ctx.menuList[index] = item,
  21489. index,
  21490. nodes: [...menu]
  21491. }, null, 8, ["index", "nodes"]);
  21492. }), 128))
  21493. ], 34);
  21494. }
  21495. var CascaderPanel = _export_sfc(_sfc_main41, [["render", _sfc_render4], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/index.vue"]]);
  21496. // node_modules/element-plus/es/components/cascader-panel/index.mjs
  21497. CascaderPanel.install = (app) => {
  21498. app.component(CascaderPanel.name, CascaderPanel);
  21499. };
  21500. var _CascaderPanel = CascaderPanel;
  21501. var ElCascaderPanel = _CascaderPanel;
  21502. // node_modules/element-plus/es/components/tag/src/tag.mjs
  21503. var tagProps = buildProps({
  21504. closable: Boolean,
  21505. type: {
  21506. type: String,
  21507. values: ["success", "info", "warning", "danger", ""],
  21508. default: ""
  21509. },
  21510. hit: Boolean,
  21511. disableTransitions: Boolean,
  21512. color: {
  21513. type: String,
  21514. default: ""
  21515. },
  21516. size: {
  21517. type: String,
  21518. values: componentSizes,
  21519. default: ""
  21520. },
  21521. effect: {
  21522. type: String,
  21523. values: ["dark", "light", "plain"],
  21524. default: "light"
  21525. },
  21526. round: Boolean
  21527. });
  21528. var tagEmits = {
  21529. close: (evt) => evt instanceof MouseEvent,
  21530. click: (evt) => evt instanceof MouseEvent
  21531. };
  21532. // node_modules/element-plus/es/components/tag/src/tag2.mjs
  21533. var __default__33 = defineComponent({
  21534. name: "ElTag"
  21535. });
  21536. var _sfc_main42 = defineComponent({
  21537. ...__default__33,
  21538. props: tagProps,
  21539. emits: tagEmits,
  21540. setup(__props, { emit }) {
  21541. const props = __props;
  21542. const tagSize = useSize();
  21543. const ns2 = useNamespace("tag");
  21544. const classes = computed2(() => {
  21545. const { type: type4, hit, effect, closable, round: round3 } = props;
  21546. return [
  21547. ns2.b(),
  21548. ns2.is("closable", closable),
  21549. ns2.m(type4),
  21550. ns2.m(tagSize.value),
  21551. ns2.m(effect),
  21552. ns2.is("hit", hit),
  21553. ns2.is("round", round3)
  21554. ];
  21555. });
  21556. const handleClose = (event) => {
  21557. emit("close", event);
  21558. };
  21559. const handleClick = (event) => {
  21560. emit("click", event);
  21561. };
  21562. return (_ctx, _cache) => {
  21563. return _ctx.disableTransitions ? (openBlock(), createElementBlock("span", {
  21564. key: 0,
  21565. class: normalizeClass(unref(classes)),
  21566. style: normalizeStyle({ backgroundColor: _ctx.color }),
  21567. onClick: handleClick
  21568. }, [
  21569. createBaseVNode("span", {
  21570. class: normalizeClass(unref(ns2).e("content"))
  21571. }, [
  21572. renderSlot(_ctx.$slots, "default")
  21573. ], 2),
  21574. _ctx.closable ? (openBlock(), createBlock(unref(ElIcon), {
  21575. key: 0,
  21576. class: normalizeClass(unref(ns2).e("close")),
  21577. onClick: withModifiers(handleClose, ["stop"])
  21578. }, {
  21579. default: withCtx(() => [
  21580. createVNode(unref(close_default))
  21581. ]),
  21582. _: 1
  21583. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
  21584. ], 6)) : (openBlock(), createBlock(Transition, {
  21585. key: 1,
  21586. name: `${unref(ns2).namespace.value}-zoom-in-center`,
  21587. appear: ""
  21588. }, {
  21589. default: withCtx(() => [
  21590. createBaseVNode("span", {
  21591. class: normalizeClass(unref(classes)),
  21592. style: normalizeStyle({ backgroundColor: _ctx.color }),
  21593. onClick: handleClick
  21594. }, [
  21595. createBaseVNode("span", {
  21596. class: normalizeClass(unref(ns2).e("content"))
  21597. }, [
  21598. renderSlot(_ctx.$slots, "default")
  21599. ], 2),
  21600. _ctx.closable ? (openBlock(), createBlock(unref(ElIcon), {
  21601. key: 0,
  21602. class: normalizeClass(unref(ns2).e("close")),
  21603. onClick: withModifiers(handleClose, ["stop"])
  21604. }, {
  21605. default: withCtx(() => [
  21606. createVNode(unref(close_default))
  21607. ]),
  21608. _: 1
  21609. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
  21610. ], 6)
  21611. ]),
  21612. _: 3
  21613. }, 8, ["name"]));
  21614. };
  21615. }
  21616. });
  21617. var Tag = _export_sfc(_sfc_main42, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);
  21618. // node_modules/element-plus/es/components/tag/index.mjs
  21619. var ElTag = withInstall(Tag);
  21620. // node_modules/element-plus/es/components/cascader/src/index.mjs
  21621. var popperOptions = {
  21622. modifiers: [
  21623. {
  21624. name: "arrowPosition",
  21625. enabled: true,
  21626. phase: "main",
  21627. fn: ({ state }) => {
  21628. const { modifiersData, placement } = state;
  21629. if (["right", "left", "bottom", "top"].includes(placement))
  21630. return;
  21631. modifiersData.arrow.x = 35;
  21632. },
  21633. requires: ["arrow"]
  21634. }
  21635. ]
  21636. };
  21637. var COMPONENT_NAME9 = "ElCascader";
  21638. var _sfc_main43 = defineComponent({
  21639. name: COMPONENT_NAME9,
  21640. components: {
  21641. ElCascaderPanel: _CascaderPanel,
  21642. ElInput,
  21643. ElTooltip,
  21644. ElScrollbar,
  21645. ElTag,
  21646. ElIcon,
  21647. CircleClose: circle_close_default,
  21648. Check: check_default,
  21649. ArrowDown: arrow_down_default
  21650. },
  21651. directives: {
  21652. Clickoutside: ClickOutside
  21653. },
  21654. props: {
  21655. ...CommonProps,
  21656. size: {
  21657. type: String,
  21658. validator: isValidComponentSize
  21659. },
  21660. placeholder: {
  21661. type: String
  21662. },
  21663. disabled: Boolean,
  21664. clearable: Boolean,
  21665. filterable: Boolean,
  21666. filterMethod: {
  21667. type: Function,
  21668. default: (node, keyword) => node.text.includes(keyword)
  21669. },
  21670. separator: {
  21671. type: String,
  21672. default: " / "
  21673. },
  21674. showAllLevels: {
  21675. type: Boolean,
  21676. default: true
  21677. },
  21678. collapseTags: Boolean,
  21679. collapseTagsTooltip: {
  21680. type: Boolean,
  21681. default: false
  21682. },
  21683. debounce: {
  21684. type: Number,
  21685. default: 300
  21686. },
  21687. beforeFilter: {
  21688. type: Function,
  21689. default: () => true
  21690. },
  21691. popperClass: {
  21692. type: String,
  21693. default: ""
  21694. },
  21695. teleported: useTooltipContentProps.teleported,
  21696. tagType: { ...tagProps.type, default: "info" },
  21697. validateEvent: {
  21698. type: Boolean,
  21699. default: true
  21700. }
  21701. },
  21702. emits: [
  21703. UPDATE_MODEL_EVENT,
  21704. CHANGE_EVENT,
  21705. "focus",
  21706. "blur",
  21707. "visible-change",
  21708. "expand-change",
  21709. "remove-tag"
  21710. ],
  21711. setup(props, { emit }) {
  21712. let inputInitialHeight = 0;
  21713. let pressDeleteCount = 0;
  21714. const nsCascader = useNamespace("cascader");
  21715. const nsInput = useNamespace("input");
  21716. const { t } = useLocale();
  21717. const { form, formItem } = useFormItem();
  21718. const tooltipRef = ref(null);
  21719. const input = ref(null);
  21720. const tagWrapper = ref(null);
  21721. const panel = ref(null);
  21722. const suggestionPanel = ref(null);
  21723. const popperVisible = ref(false);
  21724. const inputHover = ref(false);
  21725. const filtering = ref(false);
  21726. const inputValue = ref("");
  21727. const searchInputValue = ref("");
  21728. const presentTags = ref([]);
  21729. const allPresentTags = ref([]);
  21730. const suggestions = ref([]);
  21731. const isOnComposition = ref(false);
  21732. const isDisabled = computed2(() => props.disabled || (form == null ? void 0 : form.disabled));
  21733. const inputPlaceholder = computed2(() => props.placeholder || t("el.cascader.placeholder"));
  21734. const currentPlaceholder = computed2(() => searchInputValue.value || presentTags.value.length > 0 ? "" : inputPlaceholder.value);
  21735. const realSize = useSize();
  21736. const tagSize = computed2(() => ["small"].includes(realSize.value) ? "small" : "default");
  21737. const multiple = computed2(() => !!props.props.multiple);
  21738. const readonly2 = computed2(() => !props.filterable || multiple.value);
  21739. const searchKeyword = computed2(() => multiple.value ? searchInputValue.value : inputValue.value);
  21740. const checkedNodes = computed2(() => {
  21741. var _a2;
  21742. return ((_a2 = panel.value) == null ? void 0 : _a2.checkedNodes) || [];
  21743. });
  21744. const clearBtnVisible = computed2(() => {
  21745. if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value)
  21746. return false;
  21747. return !!checkedNodes.value.length;
  21748. });
  21749. const presentText = computed2(() => {
  21750. const { showAllLevels, separator } = props;
  21751. const nodes = checkedNodes.value;
  21752. return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
  21753. });
  21754. const checkedValue = computed2({
  21755. get() {
  21756. return cloneDeep_default(props.modelValue);
  21757. },
  21758. set(val) {
  21759. emit(UPDATE_MODEL_EVENT, val);
  21760. emit(CHANGE_EVENT, val);
  21761. if (props.validateEvent) {
  21762. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  21763. }
  21764. }
  21765. });
  21766. const popperPaneRef = computed2(() => {
  21767. var _a2, _b;
  21768. return (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef;
  21769. });
  21770. const togglePopperVisible = (visible) => {
  21771. var _a2, _b, _c;
  21772. if (isDisabled.value)
  21773. return;
  21774. visible = visible != null ? visible : !popperVisible.value;
  21775. if (visible !== popperVisible.value) {
  21776. popperVisible.value = visible;
  21777. (_b = (_a2 = input.value) == null ? void 0 : _a2.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
  21778. if (visible) {
  21779. updatePopperPosition();
  21780. nextTick((_c = panel.value) == null ? void 0 : _c.scrollToExpandingNode);
  21781. } else if (props.filterable) {
  21782. syncPresentTextValue();
  21783. }
  21784. emit("visible-change", visible);
  21785. }
  21786. };
  21787. const updatePopperPosition = () => {
  21788. nextTick(() => {
  21789. var _a2;
  21790. (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper();
  21791. });
  21792. };
  21793. const hideSuggestionPanel = () => {
  21794. filtering.value = false;
  21795. };
  21796. const genTag3 = (node) => {
  21797. const { showAllLevels, separator } = props;
  21798. return {
  21799. node,
  21800. key: node.uid,
  21801. text: node.calcText(showAllLevels, separator),
  21802. hitState: false,
  21803. closable: !isDisabled.value && !node.isDisabled,
  21804. isCollapseTag: false
  21805. };
  21806. };
  21807. const deleteTag = (tag) => {
  21808. var _a2;
  21809. const node = tag.node;
  21810. node.doCheck(false);
  21811. (_a2 = panel.value) == null ? void 0 : _a2.calculateCheckedValue();
  21812. emit("remove-tag", node.valueByOption);
  21813. };
  21814. const calculatePresentTags = () => {
  21815. if (!multiple.value)
  21816. return;
  21817. const nodes = checkedNodes.value;
  21818. const tags = [];
  21819. const allTags = [];
  21820. nodes.forEach((node) => allTags.push(genTag3(node)));
  21821. allPresentTags.value = allTags;
  21822. if (nodes.length) {
  21823. const [first, ...rest2] = nodes;
  21824. const restCount = rest2.length;
  21825. tags.push(genTag3(first));
  21826. if (restCount) {
  21827. if (props.collapseTags) {
  21828. tags.push({
  21829. key: -1,
  21830. text: `+ ${restCount}`,
  21831. closable: false,
  21832. isCollapseTag: true
  21833. });
  21834. } else {
  21835. rest2.forEach((node) => tags.push(genTag3(node)));
  21836. }
  21837. }
  21838. }
  21839. presentTags.value = tags;
  21840. };
  21841. const calculateSuggestions = () => {
  21842. var _a2, _b;
  21843. const { filterMethod, showAllLevels, separator } = props;
  21844. const res = (_b = (_a2 = panel.value) == null ? void 0 : _a2.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
  21845. if (node.isDisabled)
  21846. return false;
  21847. node.calcText(showAllLevels, separator);
  21848. return filterMethod(node, searchKeyword.value);
  21849. });
  21850. if (multiple.value) {
  21851. presentTags.value.forEach((tag) => {
  21852. tag.hitState = false;
  21853. });
  21854. allPresentTags.value.forEach((tag) => {
  21855. tag.hitState = false;
  21856. });
  21857. }
  21858. filtering.value = true;
  21859. suggestions.value = res;
  21860. updatePopperPosition();
  21861. };
  21862. const focusFirstNode = () => {
  21863. var _a2;
  21864. let firstNode;
  21865. if (filtering.value && suggestionPanel.value) {
  21866. firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
  21867. } else {
  21868. firstNode = (_a2 = panel.value) == null ? void 0 : _a2.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
  21869. }
  21870. if (firstNode) {
  21871. firstNode.focus();
  21872. !filtering.value && firstNode.click();
  21873. }
  21874. };
  21875. const updateStyle = () => {
  21876. var _a2, _b;
  21877. const inputInner = (_a2 = input.value) == null ? void 0 : _a2.input;
  21878. const tagWrapperEl = tagWrapper.value;
  21879. const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
  21880. if (!isClient || !inputInner)
  21881. return;
  21882. if (suggestionPanelEl) {
  21883. const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
  21884. suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
  21885. }
  21886. if (tagWrapperEl) {
  21887. const { offsetHeight } = tagWrapperEl;
  21888. const height = presentTags.value.length > 0 ? `${Math.max(offsetHeight + 6, inputInitialHeight)}px` : `${inputInitialHeight}px`;
  21889. inputInner.style.height = height;
  21890. updatePopperPosition();
  21891. }
  21892. };
  21893. const getCheckedNodes = (leafOnly) => {
  21894. var _a2;
  21895. return (_a2 = panel.value) == null ? void 0 : _a2.getCheckedNodes(leafOnly);
  21896. };
  21897. const handleExpandChange = (value) => {
  21898. updatePopperPosition();
  21899. emit("expand-change", value);
  21900. };
  21901. const handleComposition = (event) => {
  21902. var _a2;
  21903. const text = (_a2 = event.target) == null ? void 0 : _a2.value;
  21904. if (event.type === "compositionend") {
  21905. isOnComposition.value = false;
  21906. nextTick(() => handleInput(text));
  21907. } else {
  21908. const lastCharacter = text[text.length - 1] || "";
  21909. isOnComposition.value = !isKorean(lastCharacter);
  21910. }
  21911. };
  21912. const handleKeyDown = (e) => {
  21913. if (isOnComposition.value)
  21914. return;
  21915. switch (e.code) {
  21916. case EVENT_CODE.enter:
  21917. togglePopperVisible();
  21918. break;
  21919. case EVENT_CODE.down:
  21920. togglePopperVisible(true);
  21921. nextTick(focusFirstNode);
  21922. e.preventDefault();
  21923. break;
  21924. case EVENT_CODE.esc:
  21925. if (popperVisible.value === true) {
  21926. e.preventDefault();
  21927. e.stopPropagation();
  21928. togglePopperVisible(false);
  21929. }
  21930. break;
  21931. case EVENT_CODE.tab:
  21932. togglePopperVisible(false);
  21933. break;
  21934. }
  21935. };
  21936. const handleClear = () => {
  21937. var _a2;
  21938. (_a2 = panel.value) == null ? void 0 : _a2.clearCheckedNodes();
  21939. if (!popperVisible.value && props.filterable) {
  21940. syncPresentTextValue();
  21941. }
  21942. togglePopperVisible(false);
  21943. };
  21944. const syncPresentTextValue = () => {
  21945. const { value } = presentText;
  21946. inputValue.value = value;
  21947. searchInputValue.value = value;
  21948. };
  21949. const handleSuggestionClick = (node) => {
  21950. var _a2, _b;
  21951. const { checked } = node;
  21952. if (multiple.value) {
  21953. (_a2 = panel.value) == null ? void 0 : _a2.handleCheckChange(node, !checked, false);
  21954. } else {
  21955. !checked && ((_b = panel.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
  21956. togglePopperVisible(false);
  21957. }
  21958. };
  21959. const handleSuggestionKeyDown = (e) => {
  21960. const target2 = e.target;
  21961. const { code } = e;
  21962. switch (code) {
  21963. case EVENT_CODE.up:
  21964. case EVENT_CODE.down: {
  21965. const distance = code === EVENT_CODE.up ? -1 : 1;
  21966. focusNode(getSibling(target2, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
  21967. break;
  21968. }
  21969. case EVENT_CODE.enter:
  21970. target2.click();
  21971. break;
  21972. }
  21973. };
  21974. const handleDelete = () => {
  21975. const tags = presentTags.value;
  21976. const lastTag = tags[tags.length - 1];
  21977. pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
  21978. if (!lastTag || !pressDeleteCount || props.collapseTags && tags.length > 1)
  21979. return;
  21980. if (lastTag.hitState) {
  21981. deleteTag(lastTag);
  21982. } else {
  21983. lastTag.hitState = true;
  21984. }
  21985. };
  21986. const handleFilter = debounce_default(() => {
  21987. const { value } = searchKeyword;
  21988. if (!value)
  21989. return;
  21990. const passed = props.beforeFilter(value);
  21991. if (isPromise(passed)) {
  21992. passed.then(calculateSuggestions).catch(() => {
  21993. });
  21994. } else if (passed !== false) {
  21995. calculateSuggestions();
  21996. } else {
  21997. hideSuggestionPanel();
  21998. }
  21999. }, props.debounce);
  22000. const handleInput = (val, e) => {
  22001. !popperVisible.value && togglePopperVisible(true);
  22002. if (e == null ? void 0 : e.isComposing)
  22003. return;
  22004. val ? handleFilter() : hideSuggestionPanel();
  22005. };
  22006. watch(filtering, updatePopperPosition);
  22007. watch([checkedNodes, isDisabled], calculatePresentTags);
  22008. watch(presentTags, () => {
  22009. nextTick(() => updateStyle());
  22010. });
  22011. watch(presentText, syncPresentTextValue, { immediate: true });
  22012. onMounted(() => {
  22013. const inputInner = input.value.input;
  22014. const inputInnerHeight = Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
  22015. inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
  22016. useResizeObserver(inputInner, updateStyle);
  22017. });
  22018. return {
  22019. popperOptions,
  22020. tooltipRef,
  22021. popperPaneRef,
  22022. input,
  22023. tagWrapper,
  22024. panel,
  22025. suggestionPanel,
  22026. popperVisible,
  22027. inputHover,
  22028. inputPlaceholder,
  22029. currentPlaceholder,
  22030. filtering,
  22031. presentText,
  22032. checkedValue,
  22033. inputValue,
  22034. searchInputValue,
  22035. presentTags,
  22036. allPresentTags,
  22037. suggestions,
  22038. isDisabled,
  22039. isOnComposition,
  22040. realSize,
  22041. tagSize,
  22042. multiple,
  22043. readonly: readonly2,
  22044. clearBtnVisible,
  22045. nsCascader,
  22046. nsInput,
  22047. t,
  22048. togglePopperVisible,
  22049. hideSuggestionPanel,
  22050. deleteTag,
  22051. focusFirstNode,
  22052. getCheckedNodes,
  22053. handleExpandChange,
  22054. handleKeyDown,
  22055. handleComposition,
  22056. handleClear,
  22057. handleSuggestionClick,
  22058. handleSuggestionKeyDown,
  22059. handleDelete,
  22060. handleInput
  22061. };
  22062. }
  22063. });
  22064. var _hoisted_118 = { key: 0 };
  22065. var _hoisted_211 = ["placeholder"];
  22066. var _hoisted_34 = ["onClick"];
  22067. function _sfc_render5(_ctx, _cache, $props, $setup, $data, $options) {
  22068. const _component_circle_close = resolveComponent("circle-close");
  22069. const _component_el_icon = resolveComponent("el-icon");
  22070. const _component_arrow_down = resolveComponent("arrow-down");
  22071. const _component_el_input = resolveComponent("el-input");
  22072. const _component_el_tag = resolveComponent("el-tag");
  22073. const _component_el_tooltip = resolveComponent("el-tooltip");
  22074. const _component_el_cascader_panel = resolveComponent("el-cascader-panel");
  22075. const _component_check = resolveComponent("check");
  22076. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  22077. const _directive_clickoutside = resolveDirective("clickoutside");
  22078. return openBlock(), createBlock(_component_el_tooltip, {
  22079. ref: "tooltipRef",
  22080. visible: _ctx.popperVisible,
  22081. teleported: _ctx.teleported,
  22082. "popper-class": [_ctx.nsCascader.e("dropdown"), _ctx.popperClass],
  22083. "popper-options": _ctx.popperOptions,
  22084. "fallback-placements": [
  22085. "bottom-start",
  22086. "bottom",
  22087. "top-start",
  22088. "top",
  22089. "right",
  22090. "left"
  22091. ],
  22092. "stop-popper-mouse-event": false,
  22093. "gpu-acceleration": false,
  22094. placement: "bottom-start",
  22095. transition: `${_ctx.nsCascader.namespace.value}-zoom-in-top`,
  22096. effect: "light",
  22097. pure: "",
  22098. persistent: "",
  22099. onHide: _ctx.hideSuggestionPanel
  22100. }, {
  22101. default: withCtx(() => [
  22102. withDirectives((openBlock(), createElementBlock("div", {
  22103. class: normalizeClass([
  22104. _ctx.nsCascader.b(),
  22105. _ctx.nsCascader.m(_ctx.realSize),
  22106. _ctx.nsCascader.is("disabled", _ctx.isDisabled),
  22107. _ctx.$attrs.class
  22108. ]),
  22109. style: normalizeStyle(_ctx.$attrs.style),
  22110. onClick: _cache[11] || (_cache[11] = () => _ctx.togglePopperVisible(_ctx.readonly ? void 0 : true)),
  22111. onKeydown: _cache[12] || (_cache[12] = (...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args)),
  22112. onMouseenter: _cache[13] || (_cache[13] = ($event) => _ctx.inputHover = true),
  22113. onMouseleave: _cache[14] || (_cache[14] = ($event) => _ctx.inputHover = false)
  22114. }, [
  22115. createVNode(_component_el_input, {
  22116. ref: "input",
  22117. modelValue: _ctx.inputValue,
  22118. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputValue = $event),
  22119. placeholder: _ctx.currentPlaceholder,
  22120. readonly: _ctx.readonly,
  22121. disabled: _ctx.isDisabled,
  22122. "validate-event": false,
  22123. size: _ctx.realSize,
  22124. class: normalizeClass(_ctx.nsCascader.is("focus", _ctx.popperVisible)),
  22125. onCompositionstart: _ctx.handleComposition,
  22126. onCompositionupdate: _ctx.handleComposition,
  22127. onCompositionend: _ctx.handleComposition,
  22128. onFocus: _cache[2] || (_cache[2] = (e) => _ctx.$emit("focus", e)),
  22129. onBlur: _cache[3] || (_cache[3] = (e) => _ctx.$emit("blur", e)),
  22130. onInput: _ctx.handleInput
  22131. }, {
  22132. suffix: withCtx(() => [
  22133. _ctx.clearBtnVisible ? (openBlock(), createBlock(_component_el_icon, {
  22134. key: "clear",
  22135. class: normalizeClass([_ctx.nsInput.e("icon"), "icon-circle-close"]),
  22136. onClick: withModifiers(_ctx.handleClear, ["stop"])
  22137. }, {
  22138. default: withCtx(() => [
  22139. createVNode(_component_circle_close)
  22140. ]),
  22141. _: 1
  22142. }, 8, ["class", "onClick"])) : (openBlock(), createBlock(_component_el_icon, {
  22143. key: "arrow-down",
  22144. class: normalizeClass([
  22145. _ctx.nsInput.e("icon"),
  22146. "icon-arrow-down",
  22147. _ctx.nsCascader.is("reverse", _ctx.popperVisible)
  22148. ]),
  22149. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.togglePopperVisible(), ["stop"]))
  22150. }, {
  22151. default: withCtx(() => [
  22152. createVNode(_component_arrow_down)
  22153. ]),
  22154. _: 1
  22155. }, 8, ["class"]))
  22156. ]),
  22157. _: 1
  22158. }, 8, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput"]),
  22159. _ctx.multiple ? (openBlock(), createElementBlock("div", {
  22160. key: 0,
  22161. ref: "tagWrapper",
  22162. class: normalizeClass(_ctx.nsCascader.e("tags"))
  22163. }, [
  22164. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.presentTags, (tag) => {
  22165. return openBlock(), createBlock(_component_el_tag, {
  22166. key: tag.key,
  22167. type: _ctx.tagType,
  22168. size: _ctx.tagSize,
  22169. hit: tag.hitState,
  22170. closable: tag.closable,
  22171. "disable-transitions": "",
  22172. onClose: ($event) => _ctx.deleteTag(tag)
  22173. }, {
  22174. default: withCtx(() => [
  22175. tag.isCollapseTag === false ? (openBlock(), createElementBlock("span", _hoisted_118, toDisplayString(tag.text), 1)) : (openBlock(), createBlock(_component_el_tooltip, {
  22176. key: 1,
  22177. disabled: _ctx.popperVisible || !_ctx.collapseTagsTooltip,
  22178. "fallback-placements": ["bottom", "top", "right", "left"],
  22179. placement: "bottom",
  22180. effect: "light"
  22181. }, {
  22182. default: withCtx(() => [
  22183. createBaseVNode("span", null, toDisplayString(tag.text), 1)
  22184. ]),
  22185. content: withCtx(() => [
  22186. createBaseVNode("div", {
  22187. class: normalizeClass(_ctx.nsCascader.e("collapse-tags"))
  22188. }, [
  22189. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.allPresentTags.slice(1), (tag2, idx) => {
  22190. return openBlock(), createElementBlock("div", {
  22191. key: idx,
  22192. class: normalizeClass(_ctx.nsCascader.e("collapse-tag"))
  22193. }, [
  22194. (openBlock(), createBlock(_component_el_tag, {
  22195. key: tag2.key,
  22196. class: "in-tooltip",
  22197. type: _ctx.tagType,
  22198. size: _ctx.tagSize,
  22199. hit: tag2.hitState,
  22200. closable: tag2.closable,
  22201. "disable-transitions": "",
  22202. onClose: ($event) => _ctx.deleteTag(tag2)
  22203. }, {
  22204. default: withCtx(() => [
  22205. createBaseVNode("span", null, toDisplayString(tag2.text), 1)
  22206. ]),
  22207. _: 2
  22208. }, 1032, ["type", "size", "hit", "closable", "onClose"]))
  22209. ], 2);
  22210. }), 128))
  22211. ], 2)
  22212. ]),
  22213. _: 2
  22214. }, 1032, ["disabled"]))
  22215. ]),
  22216. _: 2
  22217. }, 1032, ["type", "size", "hit", "closable", "onClose"]);
  22218. }), 128)),
  22219. _ctx.filterable && !_ctx.isDisabled ? withDirectives((openBlock(), createElementBlock("input", {
  22220. key: 0,
  22221. "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.searchInputValue = $event),
  22222. type: "text",
  22223. class: normalizeClass(_ctx.nsCascader.e("search-input")),
  22224. placeholder: _ctx.presentText ? "" : _ctx.inputPlaceholder,
  22225. onInput: _cache[5] || (_cache[5] = (e) => _ctx.handleInput(_ctx.searchInputValue, e)),
  22226. onClick: _cache[6] || (_cache[6] = withModifiers(($event) => _ctx.togglePopperVisible(true), ["stop"])),
  22227. onKeydown: _cache[7] || (_cache[7] = withKeys((...args) => _ctx.handleDelete && _ctx.handleDelete(...args), ["delete"])),
  22228. onCompositionstart: _cache[8] || (_cache[8] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
  22229. onCompositionupdate: _cache[9] || (_cache[9] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
  22230. onCompositionend: _cache[10] || (_cache[10] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args))
  22231. }, null, 42, _hoisted_211)), [
  22232. [vModelText, _ctx.searchInputValue]
  22233. ]) : createCommentVNode("v-if", true)
  22234. ], 2)) : createCommentVNode("v-if", true)
  22235. ], 38)), [
  22236. [_directive_clickoutside, () => _ctx.togglePopperVisible(false), _ctx.popperPaneRef]
  22237. ])
  22238. ]),
  22239. content: withCtx(() => [
  22240. withDirectives(createVNode(_component_el_cascader_panel, {
  22241. ref: "panel",
  22242. modelValue: _ctx.checkedValue,
  22243. "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.checkedValue = $event),
  22244. options: _ctx.options,
  22245. props: _ctx.props,
  22246. border: false,
  22247. "render-label": _ctx.$slots.default,
  22248. onExpandChange: _ctx.handleExpandChange,
  22249. onClose: _cache[16] || (_cache[16] = ($event) => _ctx.$nextTick(() => _ctx.togglePopperVisible(false)))
  22250. }, null, 8, ["modelValue", "options", "props", "render-label", "onExpandChange"]), [
  22251. [vShow, !_ctx.filtering]
  22252. ]),
  22253. _ctx.filterable ? withDirectives((openBlock(), createBlock(_component_el_scrollbar, {
  22254. key: 0,
  22255. ref: "suggestionPanel",
  22256. tag: "ul",
  22257. class: normalizeClass(_ctx.nsCascader.e("suggestion-panel")),
  22258. "view-class": _ctx.nsCascader.e("suggestion-list"),
  22259. onKeydown: _ctx.handleSuggestionKeyDown
  22260. }, {
  22261. default: withCtx(() => [
  22262. _ctx.suggestions.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.suggestions, (item) => {
  22263. return openBlock(), createElementBlock("li", {
  22264. key: item.uid,
  22265. class: normalizeClass([
  22266. _ctx.nsCascader.e("suggestion-item"),
  22267. _ctx.nsCascader.is("checked", item.checked)
  22268. ]),
  22269. tabindex: -1,
  22270. onClick: ($event) => _ctx.handleSuggestionClick(item)
  22271. }, [
  22272. createBaseVNode("span", null, toDisplayString(item.text), 1),
  22273. item.checked ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
  22274. default: withCtx(() => [
  22275. createVNode(_component_check)
  22276. ]),
  22277. _: 1
  22278. })) : createCommentVNode("v-if", true)
  22279. ], 10, _hoisted_34);
  22280. }), 128)) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
  22281. createBaseVNode("li", {
  22282. class: normalizeClass(_ctx.nsCascader.e("empty-text"))
  22283. }, toDisplayString(_ctx.t("el.cascader.noMatch")), 3)
  22284. ])
  22285. ]),
  22286. _: 3
  22287. }, 8, ["class", "view-class", "onKeydown"])), [
  22288. [vShow, _ctx.filtering]
  22289. ]) : createCommentVNode("v-if", true)
  22290. ]),
  22291. _: 3
  22292. }, 8, ["visible", "teleported", "popper-class", "popper-options", "transition", "onHide"]);
  22293. }
  22294. var Cascader = _export_sfc(_sfc_main43, [["render", _sfc_render5], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader/src/index.vue"]]);
  22295. // node_modules/element-plus/es/components/cascader/index.mjs
  22296. Cascader.install = (app) => {
  22297. app.component(Cascader.name, Cascader);
  22298. };
  22299. var _Cascader = Cascader;
  22300. var ElCascader = _Cascader;
  22301. // node_modules/element-plus/es/components/check-tag/src/check-tag.mjs
  22302. var checkTagProps = buildProps({
  22303. checked: {
  22304. type: Boolean,
  22305. default: false
  22306. }
  22307. });
  22308. var checkTagEmits = {
  22309. "update:checked": (value) => isBoolean2(value),
  22310. [CHANGE_EVENT]: (value) => isBoolean2(value)
  22311. };
  22312. // node_modules/element-plus/es/components/check-tag/src/check-tag2.mjs
  22313. var __default__34 = defineComponent({
  22314. name: "ElCheckTag"
  22315. });
  22316. var _sfc_main44 = defineComponent({
  22317. ...__default__34,
  22318. props: checkTagProps,
  22319. emits: checkTagEmits,
  22320. setup(__props, { emit }) {
  22321. const props = __props;
  22322. const ns2 = useNamespace("check-tag");
  22323. const handleChange = () => {
  22324. const checked = !props.checked;
  22325. emit(CHANGE_EVENT, checked);
  22326. emit("update:checked", checked);
  22327. };
  22328. return (_ctx, _cache) => {
  22329. return openBlock(), createElementBlock("span", {
  22330. class: normalizeClass([unref(ns2).b(), unref(ns2).is("checked", _ctx.checked)]),
  22331. onClick: handleChange
  22332. }, [
  22333. renderSlot(_ctx.$slots, "default")
  22334. ], 2);
  22335. };
  22336. }
  22337. });
  22338. var CheckTag = _export_sfc(_sfc_main44, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/check-tag/src/check-tag.vue"]]);
  22339. // node_modules/element-plus/es/components/check-tag/index.mjs
  22340. var ElCheckTag = withInstall(CheckTag);
  22341. // node_modules/element-plus/es/components/col/src/col.mjs
  22342. var colProps = buildProps({
  22343. tag: {
  22344. type: String,
  22345. default: "div"
  22346. },
  22347. span: {
  22348. type: Number,
  22349. default: 24
  22350. },
  22351. offset: {
  22352. type: Number,
  22353. default: 0
  22354. },
  22355. pull: {
  22356. type: Number,
  22357. default: 0
  22358. },
  22359. push: {
  22360. type: Number,
  22361. default: 0
  22362. },
  22363. xs: {
  22364. type: definePropType([Number, Object]),
  22365. default: () => mutable({})
  22366. },
  22367. sm: {
  22368. type: definePropType([Number, Object]),
  22369. default: () => mutable({})
  22370. },
  22371. md: {
  22372. type: definePropType([Number, Object]),
  22373. default: () => mutable({})
  22374. },
  22375. lg: {
  22376. type: definePropType([Number, Object]),
  22377. default: () => mutable({})
  22378. },
  22379. xl: {
  22380. type: definePropType([Number, Object]),
  22381. default: () => mutable({})
  22382. }
  22383. });
  22384. // node_modules/element-plus/es/components/col/src/col2.mjs
  22385. var __default__35 = defineComponent({
  22386. name: "ElCol"
  22387. });
  22388. var _sfc_main45 = defineComponent({
  22389. ...__default__35,
  22390. props: colProps,
  22391. setup(__props) {
  22392. const props = __props;
  22393. const { gutter } = inject(rowContextKey, { gutter: computed2(() => 0) });
  22394. const ns2 = useNamespace("col");
  22395. const style = computed2(() => {
  22396. const styles = {};
  22397. if (gutter.value) {
  22398. styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
  22399. }
  22400. return styles;
  22401. });
  22402. const colKls = computed2(() => {
  22403. const classes = [];
  22404. const pos = ["span", "offset", "pull", "push"];
  22405. pos.forEach((prop) => {
  22406. const size3 = props[prop];
  22407. if (isNumber2(size3)) {
  22408. if (prop === "span")
  22409. classes.push(ns2.b(`${props[prop]}`));
  22410. else if (size3 > 0)
  22411. classes.push(ns2.b(`${prop}-${props[prop]}`));
  22412. }
  22413. });
  22414. const sizes = ["xs", "sm", "md", "lg", "xl"];
  22415. sizes.forEach((size3) => {
  22416. if (isNumber2(props[size3])) {
  22417. classes.push(ns2.b(`${size3}-${props[size3]}`));
  22418. } else if (isObject(props[size3])) {
  22419. Object.entries(props[size3]).forEach(([prop, sizeProp]) => {
  22420. classes.push(prop !== "span" ? ns2.b(`${size3}-${prop}-${sizeProp}`) : ns2.b(`${size3}-${sizeProp}`));
  22421. });
  22422. }
  22423. });
  22424. if (gutter.value) {
  22425. classes.push(ns2.is("guttered"));
  22426. }
  22427. return [ns2.b(), classes];
  22428. });
  22429. return (_ctx, _cache) => {
  22430. return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
  22431. class: normalizeClass(unref(colKls)),
  22432. style: normalizeStyle(unref(style))
  22433. }, {
  22434. default: withCtx(() => [
  22435. renderSlot(_ctx.$slots, "default")
  22436. ]),
  22437. _: 3
  22438. }, 8, ["class", "style"]);
  22439. };
  22440. }
  22441. });
  22442. var Col = _export_sfc(_sfc_main45, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);
  22443. // node_modules/element-plus/es/components/col/index.mjs
  22444. var ElCol = withInstall(Col);
  22445. // node_modules/element-plus/es/components/collapse/src/collapse.mjs
  22446. var emitChangeFn = (value) => typeof isNumber2(value);
  22447. var collapseProps = buildProps({
  22448. accordion: Boolean,
  22449. modelValue: {
  22450. type: definePropType([Array, String, Number]),
  22451. default: () => mutable([])
  22452. }
  22453. });
  22454. var collapseEmits = {
  22455. [UPDATE_MODEL_EVENT]: emitChangeFn,
  22456. [CHANGE_EVENT]: emitChangeFn
  22457. };
  22458. // node_modules/element-plus/es/components/collapse/src/use-collapse.mjs
  22459. var useCollapse = (props, emit) => {
  22460. const activeNames = ref(castArray_default(props.modelValue));
  22461. const setActiveNames = (_activeNames) => {
  22462. activeNames.value = _activeNames;
  22463. const value = props.accordion ? activeNames.value[0] : activeNames.value;
  22464. emit(UPDATE_MODEL_EVENT, value);
  22465. emit(CHANGE_EVENT, value);
  22466. };
  22467. const handleItemClick = (name) => {
  22468. if (props.accordion) {
  22469. setActiveNames([activeNames.value[0] === name ? "" : name]);
  22470. } else {
  22471. const _activeNames = [...activeNames.value];
  22472. const index = _activeNames.indexOf(name);
  22473. if (index > -1) {
  22474. _activeNames.splice(index, 1);
  22475. } else {
  22476. _activeNames.push(name);
  22477. }
  22478. setActiveNames(_activeNames);
  22479. }
  22480. };
  22481. watch(() => props.modelValue, () => activeNames.value = castArray_default(props.modelValue), { deep: true });
  22482. provide(collapseContextKey, {
  22483. activeNames,
  22484. handleItemClick
  22485. });
  22486. return {
  22487. activeNames,
  22488. setActiveNames
  22489. };
  22490. };
  22491. var useCollapseDOM = () => {
  22492. const ns2 = useNamespace("collapse");
  22493. const rootKls = computed2(() => ns2.b());
  22494. return {
  22495. rootKls
  22496. };
  22497. };
  22498. // node_modules/element-plus/es/components/collapse/src/collapse2.mjs
  22499. var __default__36 = defineComponent({
  22500. name: "ElCollapse"
  22501. });
  22502. var _sfc_main46 = defineComponent({
  22503. ...__default__36,
  22504. props: collapseProps,
  22505. emits: collapseEmits,
  22506. setup(__props, { expose, emit }) {
  22507. const props = __props;
  22508. const { activeNames, setActiveNames } = useCollapse(props, emit);
  22509. const { rootKls } = useCollapseDOM();
  22510. expose({
  22511. activeNames,
  22512. setActiveNames
  22513. });
  22514. return (_ctx, _cache) => {
  22515. return openBlock(), createElementBlock("div", {
  22516. class: normalizeClass(unref(rootKls)),
  22517. role: "tablist",
  22518. "aria-multiselectable": "true"
  22519. }, [
  22520. renderSlot(_ctx.$slots, "default")
  22521. ], 2);
  22522. };
  22523. }
  22524. });
  22525. var Collapse = _export_sfc(_sfc_main46, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse.vue"]]);
  22526. // node_modules/element-plus/es/components/collapse-transition/src/collapse-transition.mjs
  22527. var __default__37 = defineComponent({
  22528. name: "ElCollapseTransition"
  22529. });
  22530. var _sfc_main47 = defineComponent({
  22531. ...__default__37,
  22532. setup(__props) {
  22533. const ns2 = useNamespace("collapse-transition");
  22534. const on2 = {
  22535. beforeEnter(el) {
  22536. if (!el.dataset)
  22537. el.dataset = {};
  22538. el.dataset.oldPaddingTop = el.style.paddingTop;
  22539. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  22540. el.style.maxHeight = 0;
  22541. el.style.paddingTop = 0;
  22542. el.style.paddingBottom = 0;
  22543. },
  22544. enter(el) {
  22545. el.dataset.oldOverflow = el.style.overflow;
  22546. if (el.scrollHeight !== 0) {
  22547. el.style.maxHeight = `${el.scrollHeight}px`;
  22548. el.style.paddingTop = el.dataset.oldPaddingTop;
  22549. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  22550. } else {
  22551. el.style.maxHeight = 0;
  22552. el.style.paddingTop = el.dataset.oldPaddingTop;
  22553. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  22554. }
  22555. el.style.overflow = "hidden";
  22556. },
  22557. afterEnter(el) {
  22558. el.style.maxHeight = "";
  22559. el.style.overflow = el.dataset.oldOverflow;
  22560. },
  22561. beforeLeave(el) {
  22562. if (!el.dataset)
  22563. el.dataset = {};
  22564. el.dataset.oldPaddingTop = el.style.paddingTop;
  22565. el.dataset.oldPaddingBottom = el.style.paddingBottom;
  22566. el.dataset.oldOverflow = el.style.overflow;
  22567. el.style.maxHeight = `${el.scrollHeight}px`;
  22568. el.style.overflow = "hidden";
  22569. },
  22570. leave(el) {
  22571. if (el.scrollHeight !== 0) {
  22572. el.style.maxHeight = 0;
  22573. el.style.paddingTop = 0;
  22574. el.style.paddingBottom = 0;
  22575. }
  22576. },
  22577. afterLeave(el) {
  22578. el.style.maxHeight = "";
  22579. el.style.overflow = el.dataset.oldOverflow;
  22580. el.style.paddingTop = el.dataset.oldPaddingTop;
  22581. el.style.paddingBottom = el.dataset.oldPaddingBottom;
  22582. }
  22583. };
  22584. return (_ctx, _cache) => {
  22585. return openBlock(), createBlock(Transition, mergeProps({
  22586. name: unref(ns2).b()
  22587. }, toHandlers(on2)), {
  22588. default: withCtx(() => [
  22589. renderSlot(_ctx.$slots, "default")
  22590. ]),
  22591. _: 3
  22592. }, 16, ["name"]);
  22593. };
  22594. }
  22595. });
  22596. var CollapseTransition = _export_sfc(_sfc_main47, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);
  22597. // node_modules/element-plus/es/components/collapse-transition/index.mjs
  22598. CollapseTransition.install = (app) => {
  22599. app.component(CollapseTransition.name, CollapseTransition);
  22600. };
  22601. var _CollapseTransition = CollapseTransition;
  22602. var ElCollapseTransition = _CollapseTransition;
  22603. // node_modules/element-plus/es/components/collapse/src/collapse-item.mjs
  22604. var collapseItemProps = buildProps({
  22605. title: {
  22606. type: String,
  22607. default: ""
  22608. },
  22609. name: {
  22610. type: definePropType([String, Number]),
  22611. default: () => generateId()
  22612. },
  22613. disabled: Boolean
  22614. });
  22615. // node_modules/element-plus/es/components/collapse/src/use-collapse-item.mjs
  22616. var useCollapseItem = (props) => {
  22617. const collapse = inject(collapseContextKey);
  22618. const focusing = ref(false);
  22619. const isClick = ref(false);
  22620. const id2 = ref(generateId());
  22621. const isActive = computed2(() => collapse == null ? void 0 : collapse.activeNames.value.includes(props.name));
  22622. const handleFocus = () => {
  22623. setTimeout(() => {
  22624. if (!isClick.value) {
  22625. focusing.value = true;
  22626. } else {
  22627. isClick.value = false;
  22628. }
  22629. }, 50);
  22630. };
  22631. const handleHeaderClick = () => {
  22632. if (props.disabled)
  22633. return;
  22634. collapse == null ? void 0 : collapse.handleItemClick(props.name);
  22635. focusing.value = false;
  22636. isClick.value = true;
  22637. };
  22638. const handleEnterClick = () => {
  22639. collapse == null ? void 0 : collapse.handleItemClick(props.name);
  22640. };
  22641. return {
  22642. focusing,
  22643. id: id2,
  22644. isActive,
  22645. handleFocus,
  22646. handleHeaderClick,
  22647. handleEnterClick
  22648. };
  22649. };
  22650. var useCollapseItemDOM = (props, { focusing, isActive, id: id2 }) => {
  22651. const ns2 = useNamespace("collapse");
  22652. const rootKls = computed2(() => [
  22653. ns2.b("item"),
  22654. ns2.is("active", unref(isActive)),
  22655. ns2.is("disabled", props.disabled)
  22656. ]);
  22657. const headKls = computed2(() => [
  22658. ns2.be("item", "header"),
  22659. ns2.is("active", unref(isActive)),
  22660. { focusing: unref(focusing) && !props.disabled }
  22661. ]);
  22662. const arrowKls = computed2(() => [
  22663. ns2.be("item", "arrow"),
  22664. ns2.is("active", unref(isActive))
  22665. ]);
  22666. const itemWrapperKls = computed2(() => ns2.be("item", "wrap"));
  22667. const itemContentKls = computed2(() => ns2.be("item", "content"));
  22668. const scopedContentId = computed2(() => ns2.b(`content-${unref(id2)}`));
  22669. const scopedHeadId = computed2(() => ns2.b(`head-${unref(id2)}`));
  22670. return {
  22671. arrowKls,
  22672. headKls,
  22673. rootKls,
  22674. itemWrapperKls,
  22675. itemContentKls,
  22676. scopedContentId,
  22677. scopedHeadId
  22678. };
  22679. };
  22680. // node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs
  22681. var _hoisted_119 = ["aria-expanded", "aria-controls", "aria-describedby"];
  22682. var _hoisted_212 = ["id", "tabindex"];
  22683. var _hoisted_35 = ["id", "aria-hidden", "aria-labelledby"];
  22684. var __default__38 = defineComponent({
  22685. name: "ElCollapseItem"
  22686. });
  22687. var _sfc_main48 = defineComponent({
  22688. ...__default__38,
  22689. props: collapseItemProps,
  22690. setup(__props, { expose }) {
  22691. const props = __props;
  22692. const {
  22693. focusing,
  22694. id: id2,
  22695. isActive,
  22696. handleFocus,
  22697. handleHeaderClick,
  22698. handleEnterClick
  22699. } = useCollapseItem(props);
  22700. const {
  22701. arrowKls,
  22702. headKls,
  22703. rootKls,
  22704. itemWrapperKls,
  22705. itemContentKls,
  22706. scopedContentId,
  22707. scopedHeadId
  22708. } = useCollapseItemDOM(props, { focusing, isActive, id: id2 });
  22709. expose({
  22710. isActive
  22711. });
  22712. return (_ctx, _cache) => {
  22713. return openBlock(), createElementBlock("div", {
  22714. class: normalizeClass(unref(rootKls))
  22715. }, [
  22716. createBaseVNode("div", {
  22717. role: "tab",
  22718. "aria-expanded": unref(isActive),
  22719. "aria-controls": unref(scopedContentId),
  22720. "aria-describedby": unref(scopedContentId)
  22721. }, [
  22722. createBaseVNode("div", {
  22723. id: unref(scopedHeadId),
  22724. class: normalizeClass(unref(headKls)),
  22725. role: "button",
  22726. tabindex: _ctx.disabled ? -1 : 0,
  22727. onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)),
  22728. onKeypress: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop", "prevent"]), ["space", "enter"])),
  22729. onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
  22730. onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false)
  22731. }, [
  22732. renderSlot(_ctx.$slots, "title", {}, () => [
  22733. createTextVNode(toDisplayString(_ctx.title), 1)
  22734. ]),
  22735. createVNode(unref(ElIcon), {
  22736. class: normalizeClass(unref(arrowKls))
  22737. }, {
  22738. default: withCtx(() => [
  22739. createVNode(unref(arrow_right_default))
  22740. ]),
  22741. _: 1
  22742. }, 8, ["class"])
  22743. ], 42, _hoisted_212)
  22744. ], 8, _hoisted_119),
  22745. createVNode(unref(_CollapseTransition), null, {
  22746. default: withCtx(() => [
  22747. withDirectives(createBaseVNode("div", {
  22748. id: unref(scopedContentId),
  22749. class: normalizeClass(unref(itemWrapperKls)),
  22750. role: "tabpanel",
  22751. "aria-hidden": !unref(isActive),
  22752. "aria-labelledby": unref(scopedHeadId)
  22753. }, [
  22754. createBaseVNode("div", {
  22755. class: normalizeClass(unref(itemContentKls))
  22756. }, [
  22757. renderSlot(_ctx.$slots, "default")
  22758. ], 2)
  22759. ], 10, _hoisted_35), [
  22760. [vShow, unref(isActive)]
  22761. ])
  22762. ]),
  22763. _: 3
  22764. })
  22765. ], 2);
  22766. };
  22767. }
  22768. });
  22769. var CollapseItem = _export_sfc(_sfc_main48, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse-item.vue"]]);
  22770. // node_modules/element-plus/es/components/collapse/index.mjs
  22771. var ElCollapse = withInstall(Collapse, {
  22772. CollapseItem
  22773. });
  22774. var ElCollapseItem = withNoopInstall(CollapseItem);
  22775. // node_modules/element-plus/es/components/color-picker/src/utils/draggable.mjs
  22776. var isDragging = false;
  22777. function draggable(element, options) {
  22778. if (!isClient)
  22779. return;
  22780. const moveFn = function(event) {
  22781. var _a2;
  22782. (_a2 = options.drag) == null ? void 0 : _a2.call(options, event);
  22783. };
  22784. const upFn = function(event) {
  22785. var _a2;
  22786. document.removeEventListener("mousemove", moveFn);
  22787. document.removeEventListener("mouseup", upFn);
  22788. document.removeEventListener("touchmove", moveFn);
  22789. document.removeEventListener("touchend", upFn);
  22790. document.onselectstart = null;
  22791. document.ondragstart = null;
  22792. isDragging = false;
  22793. (_a2 = options.end) == null ? void 0 : _a2.call(options, event);
  22794. };
  22795. const downFn = function(event) {
  22796. var _a2;
  22797. if (isDragging)
  22798. return;
  22799. event.preventDefault();
  22800. document.onselectstart = () => false;
  22801. document.ondragstart = () => false;
  22802. document.addEventListener("mousemove", moveFn);
  22803. document.addEventListener("mouseup", upFn);
  22804. document.addEventListener("touchmove", moveFn);
  22805. document.addEventListener("touchend", upFn);
  22806. isDragging = true;
  22807. (_a2 = options.start) == null ? void 0 : _a2.call(options, event);
  22808. };
  22809. element.addEventListener("mousedown", downFn);
  22810. element.addEventListener("touchstart", downFn);
  22811. }
  22812. // node_modules/element-plus/es/components/color-picker/src/components/alpha-slider.mjs
  22813. var _sfc_main49 = defineComponent({
  22814. name: "ElColorAlphaSlider",
  22815. props: {
  22816. color: {
  22817. type: Object,
  22818. required: true
  22819. },
  22820. vertical: {
  22821. type: Boolean,
  22822. default: false
  22823. }
  22824. },
  22825. setup(props) {
  22826. const ns2 = useNamespace("color-alpha-slider");
  22827. const instance = getCurrentInstance();
  22828. const thumb = shallowRef();
  22829. const bar = shallowRef();
  22830. const thumbLeft = ref(0);
  22831. const thumbTop = ref(0);
  22832. const background = ref();
  22833. watch(() => props.color.get("alpha"), () => {
  22834. update2();
  22835. });
  22836. watch(() => props.color.value, () => {
  22837. update2();
  22838. });
  22839. function getThumbLeft() {
  22840. if (!thumb.value)
  22841. return 0;
  22842. if (props.vertical)
  22843. return 0;
  22844. const el = instance.vnode.el;
  22845. const alpha = props.color.get("alpha");
  22846. if (!el)
  22847. return 0;
  22848. return Math.round(alpha * (el.offsetWidth - thumb.value.offsetWidth / 2) / 100);
  22849. }
  22850. function getThumbTop() {
  22851. if (!thumb.value)
  22852. return 0;
  22853. const el = instance.vnode.el;
  22854. if (!props.vertical)
  22855. return 0;
  22856. const alpha = props.color.get("alpha");
  22857. if (!el)
  22858. return 0;
  22859. return Math.round(alpha * (el.offsetHeight - thumb.value.offsetHeight / 2) / 100);
  22860. }
  22861. function getBackground() {
  22862. if (props.color && props.color.value) {
  22863. const { r, g, b: b2 } = props.color.toRgb();
  22864. return `linear-gradient(to right, rgba(${r}, ${g}, ${b2}, 0) 0%, rgba(${r}, ${g}, ${b2}, 1) 100%)`;
  22865. }
  22866. return "";
  22867. }
  22868. function handleClick(event) {
  22869. const target2 = event.target;
  22870. if (target2 !== thumb.value) {
  22871. handleDrag(event);
  22872. }
  22873. }
  22874. function handleDrag(event) {
  22875. if (!bar.value || !thumb.value)
  22876. return;
  22877. const el = instance.vnode.el;
  22878. const rect = el.getBoundingClientRect();
  22879. const { clientX, clientY } = getClientXY(event);
  22880. if (!props.vertical) {
  22881. let left2 = clientX - rect.left;
  22882. left2 = Math.max(thumb.value.offsetWidth / 2, left2);
  22883. left2 = Math.min(left2, rect.width - thumb.value.offsetWidth / 2);
  22884. props.color.set("alpha", Math.round((left2 - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 100));
  22885. } else {
  22886. let top = clientY - rect.top;
  22887. top = Math.max(thumb.value.offsetHeight / 2, top);
  22888. top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
  22889. props.color.set("alpha", Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 100));
  22890. }
  22891. }
  22892. function update2() {
  22893. thumbLeft.value = getThumbLeft();
  22894. thumbTop.value = getThumbTop();
  22895. background.value = getBackground();
  22896. }
  22897. onMounted(() => {
  22898. if (!bar.value || !thumb.value)
  22899. return;
  22900. const dragConfig = {
  22901. drag: (event) => {
  22902. handleDrag(event);
  22903. },
  22904. end: (event) => {
  22905. handleDrag(event);
  22906. }
  22907. };
  22908. draggable(bar.value, dragConfig);
  22909. draggable(thumb.value, dragConfig);
  22910. update2();
  22911. });
  22912. return {
  22913. thumb,
  22914. bar,
  22915. thumbLeft,
  22916. thumbTop,
  22917. background,
  22918. handleClick,
  22919. update: update2,
  22920. ns: ns2
  22921. };
  22922. }
  22923. });
  22924. function _sfc_render6(_ctx, _cache, $props, $setup, $data, $options) {
  22925. return openBlock(), createElementBlock("div", {
  22926. class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("vertical", _ctx.vertical)])
  22927. }, [
  22928. createBaseVNode("div", {
  22929. ref: "bar",
  22930. class: normalizeClass(_ctx.ns.e("bar")),
  22931. style: normalizeStyle({
  22932. background: _ctx.background
  22933. }),
  22934. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
  22935. }, null, 6),
  22936. createBaseVNode("div", {
  22937. ref: "thumb",
  22938. class: normalizeClass(_ctx.ns.e("thumb")),
  22939. style: normalizeStyle({
  22940. left: _ctx.thumbLeft + "px",
  22941. top: _ctx.thumbTop + "px"
  22942. })
  22943. }, null, 6)
  22944. ], 2);
  22945. }
  22946. var AlphaSlider = _export_sfc(_sfc_main49, [["render", _sfc_render6], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/alpha-slider.vue"]]);
  22947. // node_modules/element-plus/es/components/color-picker/src/components/hue-slider.mjs
  22948. var _sfc_main50 = defineComponent({
  22949. name: "ElColorHueSlider",
  22950. props: {
  22951. color: {
  22952. type: Object,
  22953. required: true
  22954. },
  22955. vertical: Boolean
  22956. },
  22957. setup(props) {
  22958. const ns2 = useNamespace("color-hue-slider");
  22959. const instance = getCurrentInstance();
  22960. const thumb = ref();
  22961. const bar = ref();
  22962. const thumbLeft = ref(0);
  22963. const thumbTop = ref(0);
  22964. const hueValue = computed2(() => {
  22965. return props.color.get("hue");
  22966. });
  22967. watch(() => hueValue.value, () => {
  22968. update2();
  22969. });
  22970. function handleClick(event) {
  22971. const target2 = event.target;
  22972. if (target2 !== thumb.value) {
  22973. handleDrag(event);
  22974. }
  22975. }
  22976. function handleDrag(event) {
  22977. if (!bar.value || !thumb.value)
  22978. return;
  22979. const el = instance.vnode.el;
  22980. const rect = el.getBoundingClientRect();
  22981. const { clientX, clientY } = getClientXY(event);
  22982. let hue;
  22983. if (!props.vertical) {
  22984. let left2 = clientX - rect.left;
  22985. left2 = Math.min(left2, rect.width - thumb.value.offsetWidth / 2);
  22986. left2 = Math.max(thumb.value.offsetWidth / 2, left2);
  22987. hue = Math.round((left2 - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * 360);
  22988. } else {
  22989. let top = clientY - rect.top;
  22990. top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
  22991. top = Math.max(thumb.value.offsetHeight / 2, top);
  22992. hue = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * 360);
  22993. }
  22994. props.color.set("hue", hue);
  22995. }
  22996. function getThumbLeft() {
  22997. if (!thumb.value)
  22998. return 0;
  22999. const el = instance.vnode.el;
  23000. if (props.vertical)
  23001. return 0;
  23002. const hue = props.color.get("hue");
  23003. if (!el)
  23004. return 0;
  23005. return Math.round(hue * (el.offsetWidth - thumb.value.offsetWidth / 2) / 360);
  23006. }
  23007. function getThumbTop() {
  23008. if (!thumb.value)
  23009. return 0;
  23010. const el = instance.vnode.el;
  23011. if (!props.vertical)
  23012. return 0;
  23013. const hue = props.color.get("hue");
  23014. if (!el)
  23015. return 0;
  23016. return Math.round(hue * (el.offsetHeight - thumb.value.offsetHeight / 2) / 360);
  23017. }
  23018. function update2() {
  23019. thumbLeft.value = getThumbLeft();
  23020. thumbTop.value = getThumbTop();
  23021. }
  23022. onMounted(() => {
  23023. if (!bar.value || !thumb.value)
  23024. return;
  23025. const dragConfig = {
  23026. drag: (event) => {
  23027. handleDrag(event);
  23028. },
  23029. end: (event) => {
  23030. handleDrag(event);
  23031. }
  23032. };
  23033. draggable(bar.value, dragConfig);
  23034. draggable(thumb.value, dragConfig);
  23035. update2();
  23036. });
  23037. return {
  23038. bar,
  23039. thumb,
  23040. thumbLeft,
  23041. thumbTop,
  23042. hueValue,
  23043. handleClick,
  23044. update: update2,
  23045. ns: ns2
  23046. };
  23047. }
  23048. });
  23049. function _sfc_render7(_ctx, _cache, $props, $setup, $data, $options) {
  23050. return openBlock(), createElementBlock("div", {
  23051. class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("vertical", _ctx.vertical)])
  23052. }, [
  23053. createBaseVNode("div", {
  23054. ref: "bar",
  23055. class: normalizeClass(_ctx.ns.e("bar")),
  23056. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
  23057. }, null, 2),
  23058. createBaseVNode("div", {
  23059. ref: "thumb",
  23060. class: normalizeClass(_ctx.ns.e("thumb")),
  23061. style: normalizeStyle({
  23062. left: _ctx.thumbLeft + "px",
  23063. top: _ctx.thumbTop + "px"
  23064. })
  23065. }, null, 6)
  23066. ], 2);
  23067. }
  23068. var HueSlider = _export_sfc(_sfc_main50, [["render", _sfc_render7], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/hue-slider.vue"]]);
  23069. // node_modules/element-plus/es/components/color-picker/src/color-picker.mjs
  23070. var colorPickerProps = buildProps({
  23071. modelValue: String,
  23072. id: String,
  23073. showAlpha: Boolean,
  23074. colorFormat: String,
  23075. disabled: Boolean,
  23076. size: useSizeProp,
  23077. popperClass: {
  23078. type: String,
  23079. default: ""
  23080. },
  23081. label: {
  23082. type: String,
  23083. default: void 0
  23084. },
  23085. tabindex: {
  23086. type: [String, Number],
  23087. default: 0
  23088. },
  23089. predefine: {
  23090. type: definePropType(Array)
  23091. },
  23092. validateEvent: {
  23093. type: Boolean,
  23094. default: true
  23095. }
  23096. });
  23097. var colorPickerEmits = {
  23098. [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil_default(val),
  23099. [CHANGE_EVENT]: (val) => isString(val) || isNil_default(val),
  23100. activeChange: (val) => isString(val) || isNil_default(val)
  23101. };
  23102. var colorPickerContextKey = Symbol("colorPickerContextKey");
  23103. // node_modules/element-plus/es/components/color-picker/src/utils/color.mjs
  23104. var hsv2hsl = function(hue, sat, val) {
  23105. return [
  23106. hue,
  23107. sat * val / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0,
  23108. hue / 2
  23109. ];
  23110. };
  23111. var isOnePointZero2 = function(n) {
  23112. return typeof n === "string" && n.includes(".") && Number.parseFloat(n) === 1;
  23113. };
  23114. var isPercentage2 = function(n) {
  23115. return typeof n === "string" && n.includes("%");
  23116. };
  23117. var bound012 = function(value, max5) {
  23118. if (isOnePointZero2(value))
  23119. value = "100%";
  23120. const processPercent = isPercentage2(value);
  23121. value = Math.min(max5, Math.max(0, Number.parseFloat(`${value}`)));
  23122. if (processPercent) {
  23123. value = Number.parseInt(`${value * max5}`, 10) / 100;
  23124. }
  23125. if (Math.abs(value - max5) < 1e-6) {
  23126. return 1;
  23127. }
  23128. return value % max5 / Number.parseFloat(max5);
  23129. };
  23130. var INT_HEX_MAP = {
  23131. 10: "A",
  23132. 11: "B",
  23133. 12: "C",
  23134. 13: "D",
  23135. 14: "E",
  23136. 15: "F"
  23137. };
  23138. var hexOne = (value) => {
  23139. value = Math.min(Math.round(value), 255);
  23140. const high = Math.floor(value / 16);
  23141. const low = value % 16;
  23142. return `${INT_HEX_MAP[high] || high}${INT_HEX_MAP[low] || low}`;
  23143. };
  23144. var toHex = function({ r, g, b: b2 }) {
  23145. if (Number.isNaN(+r) || Number.isNaN(+g) || Number.isNaN(+b2))
  23146. return "";
  23147. return `#${hexOne(r)}${hexOne(g)}${hexOne(b2)}`;
  23148. };
  23149. var HEX_INT_MAP = {
  23150. A: 10,
  23151. B: 11,
  23152. C: 12,
  23153. D: 13,
  23154. E: 14,
  23155. F: 15
  23156. };
  23157. var parseHexChannel = function(hex2) {
  23158. if (hex2.length === 2) {
  23159. return (HEX_INT_MAP[hex2[0].toUpperCase()] || +hex2[0]) * 16 + (HEX_INT_MAP[hex2[1].toUpperCase()] || +hex2[1]);
  23160. }
  23161. return HEX_INT_MAP[hex2[1].toUpperCase()] || +hex2[1];
  23162. };
  23163. var hsl2hsv = function(hue, sat, light) {
  23164. sat = sat / 100;
  23165. light = light / 100;
  23166. let smin = sat;
  23167. const lmin = Math.max(light, 0.01);
  23168. light *= 2;
  23169. sat *= light <= 1 ? light : 2 - light;
  23170. smin *= lmin <= 1 ? lmin : 2 - lmin;
  23171. const v2 = (light + sat) / 2;
  23172. const sv = light === 0 ? 2 * smin / (lmin + smin) : 2 * sat / (light + sat);
  23173. return {
  23174. h: hue,
  23175. s: sv * 100,
  23176. v: v2 * 100
  23177. };
  23178. };
  23179. var rgb2hsv = (r, g, b2) => {
  23180. r = bound012(r, 255);
  23181. g = bound012(g, 255);
  23182. b2 = bound012(b2, 255);
  23183. const max5 = Math.max(r, g, b2);
  23184. const min5 = Math.min(r, g, b2);
  23185. let h3;
  23186. const v2 = max5;
  23187. const d2 = max5 - min5;
  23188. const s2 = max5 === 0 ? 0 : d2 / max5;
  23189. if (max5 === min5) {
  23190. h3 = 0;
  23191. } else {
  23192. switch (max5) {
  23193. case r: {
  23194. h3 = (g - b2) / d2 + (g < b2 ? 6 : 0);
  23195. break;
  23196. }
  23197. case g: {
  23198. h3 = (b2 - r) / d2 + 2;
  23199. break;
  23200. }
  23201. case b2: {
  23202. h3 = (r - g) / d2 + 4;
  23203. break;
  23204. }
  23205. }
  23206. h3 /= 6;
  23207. }
  23208. return { h: h3 * 360, s: s2 * 100, v: v2 * 100 };
  23209. };
  23210. var hsv2rgb = function(h3, s2, v2) {
  23211. h3 = bound012(h3, 360) * 6;
  23212. s2 = bound012(s2, 100);
  23213. v2 = bound012(v2, 100);
  23214. const i = Math.floor(h3);
  23215. const f2 = h3 - i;
  23216. const p2 = v2 * (1 - s2);
  23217. const q2 = v2 * (1 - f2 * s2);
  23218. const t = v2 * (1 - (1 - f2) * s2);
  23219. const mod = i % 6;
  23220. const r = [v2, q2, p2, p2, t, v2][mod];
  23221. const g = [t, v2, v2, q2, p2, p2][mod];
  23222. const b2 = [p2, p2, t, v2, v2, q2][mod];
  23223. return {
  23224. r: Math.round(r * 255),
  23225. g: Math.round(g * 255),
  23226. b: Math.round(b2 * 255)
  23227. };
  23228. };
  23229. var Color = class {
  23230. constructor(options = {}) {
  23231. this._hue = 0;
  23232. this._saturation = 100;
  23233. this._value = 100;
  23234. this._alpha = 100;
  23235. this.enableAlpha = false;
  23236. this.format = "hex";
  23237. this.value = "";
  23238. for (const option in options) {
  23239. if (hasOwn(options, option)) {
  23240. this[option] = options[option];
  23241. }
  23242. }
  23243. if (options.value) {
  23244. this.fromString(options.value);
  23245. } else {
  23246. this.doOnChange();
  23247. }
  23248. }
  23249. set(prop, value) {
  23250. if (arguments.length === 1 && typeof prop === "object") {
  23251. for (const p2 in prop) {
  23252. if (hasOwn(prop, p2)) {
  23253. this.set(p2, prop[p2]);
  23254. }
  23255. }
  23256. return;
  23257. }
  23258. ;
  23259. this[`_${prop}`] = value;
  23260. this.doOnChange();
  23261. }
  23262. get(prop) {
  23263. if (prop === "alpha") {
  23264. return Math.floor(this[`_${prop}`]);
  23265. }
  23266. return this[`_${prop}`];
  23267. }
  23268. toRgb() {
  23269. return hsv2rgb(this._hue, this._saturation, this._value);
  23270. }
  23271. fromString(value) {
  23272. if (!value) {
  23273. this._hue = 0;
  23274. this._saturation = 100;
  23275. this._value = 100;
  23276. this.doOnChange();
  23277. return;
  23278. }
  23279. const fromHSV = (h3, s2, v2) => {
  23280. this._hue = Math.max(0, Math.min(360, h3));
  23281. this._saturation = Math.max(0, Math.min(100, s2));
  23282. this._value = Math.max(0, Math.min(100, v2));
  23283. this.doOnChange();
  23284. };
  23285. if (value.includes("hsl")) {
  23286. const parts = value.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((val) => val !== "").map((val, index) => index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10));
  23287. if (parts.length === 4) {
  23288. this._alpha = Number.parseFloat(parts[3]) * 100;
  23289. } else if (parts.length === 3) {
  23290. this._alpha = 100;
  23291. }
  23292. if (parts.length >= 3) {
  23293. const { h: h3, s: s2, v: v2 } = hsl2hsv(parts[0], parts[1], parts[2]);
  23294. fromHSV(h3, s2, v2);
  23295. }
  23296. } else if (value.includes("hsv")) {
  23297. const parts = value.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((val) => val !== "").map((val, index) => index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10));
  23298. if (parts.length === 4) {
  23299. this._alpha = Number.parseFloat(parts[3]) * 100;
  23300. } else if (parts.length === 3) {
  23301. this._alpha = 100;
  23302. }
  23303. if (parts.length >= 3) {
  23304. fromHSV(parts[0], parts[1], parts[2]);
  23305. }
  23306. } else if (value.includes("rgb")) {
  23307. const parts = value.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((val) => val !== "").map((val, index) => index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10));
  23308. if (parts.length === 4) {
  23309. this._alpha = Number.parseFloat(parts[3]) * 100;
  23310. } else if (parts.length === 3) {
  23311. this._alpha = 100;
  23312. }
  23313. if (parts.length >= 3) {
  23314. const { h: h3, s: s2, v: v2 } = rgb2hsv(parts[0], parts[1], parts[2]);
  23315. fromHSV(h3, s2, v2);
  23316. }
  23317. } else if (value.includes("#")) {
  23318. const hex2 = value.replace("#", "").trim();
  23319. if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex2))
  23320. return;
  23321. let r, g, b2;
  23322. if (hex2.length === 3) {
  23323. r = parseHexChannel(hex2[0] + hex2[0]);
  23324. g = parseHexChannel(hex2[1] + hex2[1]);
  23325. b2 = parseHexChannel(hex2[2] + hex2[2]);
  23326. } else if (hex2.length === 6 || hex2.length === 8) {
  23327. r = parseHexChannel(hex2.slice(0, 2));
  23328. g = parseHexChannel(hex2.slice(2, 4));
  23329. b2 = parseHexChannel(hex2.slice(4, 6));
  23330. }
  23331. if (hex2.length === 8) {
  23332. this._alpha = parseHexChannel(hex2.slice(6)) / 255 * 100;
  23333. } else if (hex2.length === 3 || hex2.length === 6) {
  23334. this._alpha = 100;
  23335. }
  23336. const { h: h3, s: s2, v: v2 } = rgb2hsv(r, g, b2);
  23337. fromHSV(h3, s2, v2);
  23338. }
  23339. }
  23340. compare(color) {
  23341. return Math.abs(color._hue - this._hue) < 2 && Math.abs(color._saturation - this._saturation) < 1 && Math.abs(color._value - this._value) < 1 && Math.abs(color._alpha - this._alpha) < 1;
  23342. }
  23343. doOnChange() {
  23344. const { _hue, _saturation, _value, _alpha, format: format2 } = this;
  23345. if (this.enableAlpha) {
  23346. switch (format2) {
  23347. case "hsl": {
  23348. const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
  23349. this.value = `hsla(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(hsl[2] * 100)}%, ${this.get("alpha") / 100})`;
  23350. break;
  23351. }
  23352. case "hsv": {
  23353. this.value = `hsva(${_hue}, ${Math.round(_saturation)}%, ${Math.round(_value)}%, ${this.get("alpha") / 100})`;
  23354. break;
  23355. }
  23356. case "hex": {
  23357. this.value = `${toHex(hsv2rgb(_hue, _saturation, _value))}${hexOne(_alpha * 255 / 100)}`;
  23358. break;
  23359. }
  23360. default: {
  23361. const { r, g, b: b2 } = hsv2rgb(_hue, _saturation, _value);
  23362. this.value = `rgba(${r}, ${g}, ${b2}, ${this.get("alpha") / 100})`;
  23363. }
  23364. }
  23365. } else {
  23366. switch (format2) {
  23367. case "hsl": {
  23368. const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
  23369. this.value = `hsl(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(hsl[2] * 100)}%)`;
  23370. break;
  23371. }
  23372. case "hsv": {
  23373. this.value = `hsv(${_hue}, ${Math.round(_saturation)}%, ${Math.round(_value)}%)`;
  23374. break;
  23375. }
  23376. case "rgb": {
  23377. const { r, g, b: b2 } = hsv2rgb(_hue, _saturation, _value);
  23378. this.value = `rgb(${r}, ${g}, ${b2})`;
  23379. break;
  23380. }
  23381. default: {
  23382. this.value = toHex(hsv2rgb(_hue, _saturation, _value));
  23383. }
  23384. }
  23385. }
  23386. }
  23387. };
  23388. // node_modules/element-plus/es/components/color-picker/src/components/predefine.mjs
  23389. var _sfc_main51 = defineComponent({
  23390. props: {
  23391. colors: {
  23392. type: Array,
  23393. required: true
  23394. },
  23395. color: {
  23396. type: Object,
  23397. required: true
  23398. }
  23399. },
  23400. setup(props) {
  23401. const ns2 = useNamespace("color-predefine");
  23402. const { currentColor } = inject(colorPickerContextKey);
  23403. const rgbaColors = ref(parseColors(props.colors, props.color));
  23404. watch(() => currentColor.value, (val) => {
  23405. const color = new Color();
  23406. color.fromString(val);
  23407. rgbaColors.value.forEach((item) => {
  23408. item.selected = color.compare(item);
  23409. });
  23410. });
  23411. watchEffect(() => {
  23412. rgbaColors.value = parseColors(props.colors, props.color);
  23413. });
  23414. function handleSelect(index) {
  23415. props.color.fromString(props.colors[index]);
  23416. }
  23417. function parseColors(colors, color) {
  23418. return colors.map((value) => {
  23419. const c2 = new Color();
  23420. c2.enableAlpha = true;
  23421. c2.format = "rgba";
  23422. c2.fromString(value);
  23423. c2.selected = c2.value === color.value;
  23424. return c2;
  23425. });
  23426. }
  23427. return {
  23428. rgbaColors,
  23429. handleSelect,
  23430. ns: ns2
  23431. };
  23432. }
  23433. });
  23434. var _hoisted_120 = ["onClick"];
  23435. function _sfc_render8(_ctx, _cache, $props, $setup, $data, $options) {
  23436. return openBlock(), createElementBlock("div", {
  23437. class: normalizeClass(_ctx.ns.b())
  23438. }, [
  23439. createBaseVNode("div", {
  23440. class: normalizeClass(_ctx.ns.e("colors"))
  23441. }, [
  23442. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rgbaColors, (item, index) => {
  23443. return openBlock(), createElementBlock("div", {
  23444. key: _ctx.colors[index],
  23445. class: normalizeClass([
  23446. _ctx.ns.e("color-selector"),
  23447. _ctx.ns.is("alpha", item._alpha < 100),
  23448. { selected: item.selected }
  23449. ]),
  23450. onClick: ($event) => _ctx.handleSelect(index)
  23451. }, [
  23452. createBaseVNode("div", {
  23453. style: normalizeStyle({ backgroundColor: item.value })
  23454. }, null, 4)
  23455. ], 10, _hoisted_120);
  23456. }), 128))
  23457. ], 2)
  23458. ], 2);
  23459. }
  23460. var Predefine = _export_sfc(_sfc_main51, [["render", _sfc_render8], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/predefine.vue"]]);
  23461. // node_modules/element-plus/es/components/color-picker/src/components/sv-panel.mjs
  23462. var _sfc_main52 = defineComponent({
  23463. name: "ElSlPanel",
  23464. props: {
  23465. color: {
  23466. type: Object,
  23467. required: true
  23468. }
  23469. },
  23470. setup(props) {
  23471. const ns2 = useNamespace("color-svpanel");
  23472. const instance = getCurrentInstance();
  23473. const cursorTop = ref(0);
  23474. const cursorLeft = ref(0);
  23475. const background = ref("hsl(0, 100%, 50%)");
  23476. const colorValue = computed2(() => {
  23477. const hue = props.color.get("hue");
  23478. const value = props.color.get("value");
  23479. return { hue, value };
  23480. });
  23481. function update2() {
  23482. const saturation = props.color.get("saturation");
  23483. const value = props.color.get("value");
  23484. const el = instance.vnode.el;
  23485. const { clientWidth: width, clientHeight: height } = el;
  23486. cursorLeft.value = saturation * width / 100;
  23487. cursorTop.value = (100 - value) * height / 100;
  23488. background.value = `hsl(${props.color.get("hue")}, 100%, 50%)`;
  23489. }
  23490. function handleDrag(event) {
  23491. const el = instance.vnode.el;
  23492. const rect = el.getBoundingClientRect();
  23493. const { clientX, clientY } = getClientXY(event);
  23494. let left2 = clientX - rect.left;
  23495. let top = clientY - rect.top;
  23496. left2 = Math.max(0, left2);
  23497. left2 = Math.min(left2, rect.width);
  23498. top = Math.max(0, top);
  23499. top = Math.min(top, rect.height);
  23500. cursorLeft.value = left2;
  23501. cursorTop.value = top;
  23502. props.color.set({
  23503. saturation: left2 / rect.width * 100,
  23504. value: 100 - top / rect.height * 100
  23505. });
  23506. }
  23507. watch(() => colorValue.value, () => {
  23508. update2();
  23509. });
  23510. onMounted(() => {
  23511. draggable(instance.vnode.el, {
  23512. drag: (event) => {
  23513. handleDrag(event);
  23514. },
  23515. end: (event) => {
  23516. handleDrag(event);
  23517. }
  23518. });
  23519. update2();
  23520. });
  23521. return {
  23522. cursorTop,
  23523. cursorLeft,
  23524. background,
  23525. colorValue,
  23526. handleDrag,
  23527. update: update2,
  23528. ns: ns2
  23529. };
  23530. }
  23531. });
  23532. var _hoisted_121 = createBaseVNode("div", null, null, -1);
  23533. var _hoisted_213 = [
  23534. _hoisted_121
  23535. ];
  23536. function _sfc_render9(_ctx, _cache, $props, $setup, $data, $options) {
  23537. return openBlock(), createElementBlock("div", {
  23538. class: normalizeClass(_ctx.ns.b()),
  23539. style: normalizeStyle({
  23540. backgroundColor: _ctx.background
  23541. })
  23542. }, [
  23543. createBaseVNode("div", {
  23544. class: normalizeClass(_ctx.ns.e("white"))
  23545. }, null, 2),
  23546. createBaseVNode("div", {
  23547. class: normalizeClass(_ctx.ns.e("black"))
  23548. }, null, 2),
  23549. createBaseVNode("div", {
  23550. class: normalizeClass(_ctx.ns.e("cursor")),
  23551. style: normalizeStyle({
  23552. top: _ctx.cursorTop + "px",
  23553. left: _ctx.cursorLeft + "px"
  23554. })
  23555. }, _hoisted_213, 6)
  23556. ], 6);
  23557. }
  23558. var SvPanel = _export_sfc(_sfc_main52, [["render", _sfc_render9], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/components/sv-panel.vue"]]);
  23559. // node_modules/element-plus/es/components/color-picker/src/color-picker2.mjs
  23560. var _hoisted_122 = ["id", "aria-label", "aria-labelledby", "aria-description", "tabindex", "onKeydown"];
  23561. var __default__39 = defineComponent({
  23562. name: "ElColorPicker"
  23563. });
  23564. var _sfc_main53 = defineComponent({
  23565. ...__default__39,
  23566. props: colorPickerProps,
  23567. emits: colorPickerEmits,
  23568. setup(__props, { expose, emit }) {
  23569. const props = __props;
  23570. const { t } = useLocale();
  23571. const ns2 = useNamespace("color");
  23572. const { formItem } = useFormItem();
  23573. const colorSize = useSize();
  23574. const colorDisabled = useDisabled();
  23575. const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {
  23576. formItemContext: formItem
  23577. });
  23578. const hue = ref();
  23579. const sv = ref();
  23580. const alpha = ref();
  23581. const popper = ref();
  23582. let shouldActiveChange = true;
  23583. const color = reactive(new Color({
  23584. enableAlpha: props.showAlpha,
  23585. format: props.colorFormat || "",
  23586. value: props.modelValue
  23587. }));
  23588. const showPicker = ref(false);
  23589. const showPanelColor = ref(false);
  23590. const customInput = ref("");
  23591. const displayedColor = computed2(() => {
  23592. if (!props.modelValue && !showPanelColor.value) {
  23593. return "transparent";
  23594. }
  23595. return displayedRgb(color, props.showAlpha);
  23596. });
  23597. const currentColor = computed2(() => {
  23598. return !props.modelValue && !showPanelColor.value ? "" : color.value;
  23599. });
  23600. const buttonAriaLabel = computed2(() => {
  23601. return !isLabeledByFormItem.value ? props.label || t("el.colorpicker.defaultLabel") : void 0;
  23602. });
  23603. const buttonAriaLabelledby = computed2(() => {
  23604. return isLabeledByFormItem.value ? formItem == null ? void 0 : formItem.labelId : void 0;
  23605. });
  23606. const btnKls = computed2(() => {
  23607. return [
  23608. ns2.b("picker"),
  23609. ns2.is("disabled", colorDisabled.value),
  23610. ns2.bm("picker", colorSize.value)
  23611. ];
  23612. });
  23613. function displayedRgb(color2, showAlpha) {
  23614. if (!(color2 instanceof Color)) {
  23615. throw new TypeError("color should be instance of _color Class");
  23616. }
  23617. const { r, g, b: b2 } = color2.toRgb();
  23618. return showAlpha ? `rgba(${r}, ${g}, ${b2}, ${color2.get("alpha") / 100})` : `rgb(${r}, ${g}, ${b2})`;
  23619. }
  23620. function setShowPicker(value) {
  23621. showPicker.value = value;
  23622. }
  23623. const debounceSetShowPicker = debounce_default(setShowPicker, 100);
  23624. function hide2() {
  23625. debounceSetShowPicker(false);
  23626. resetColor();
  23627. }
  23628. function resetColor() {
  23629. nextTick(() => {
  23630. if (props.modelValue) {
  23631. color.fromString(props.modelValue);
  23632. } else {
  23633. color.value = "";
  23634. nextTick(() => {
  23635. showPanelColor.value = false;
  23636. });
  23637. }
  23638. });
  23639. }
  23640. function handleTrigger() {
  23641. if (colorDisabled.value)
  23642. return;
  23643. debounceSetShowPicker(!showPicker.value);
  23644. }
  23645. function handleConfirm() {
  23646. color.fromString(customInput.value);
  23647. }
  23648. function confirmValue() {
  23649. const value = color.value;
  23650. emit(UPDATE_MODEL_EVENT, value);
  23651. emit("change", value);
  23652. if (props.validateEvent) {
  23653. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  23654. }
  23655. debounceSetShowPicker(false);
  23656. nextTick(() => {
  23657. const newColor = new Color({
  23658. enableAlpha: props.showAlpha,
  23659. format: props.colorFormat || "",
  23660. value: props.modelValue
  23661. });
  23662. if (!color.compare(newColor)) {
  23663. resetColor();
  23664. }
  23665. });
  23666. }
  23667. function clear() {
  23668. debounceSetShowPicker(false);
  23669. emit(UPDATE_MODEL_EVENT, null);
  23670. emit("change", null);
  23671. if (props.modelValue !== null && props.validateEvent) {
  23672. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  23673. }
  23674. resetColor();
  23675. }
  23676. onMounted(() => {
  23677. if (props.modelValue) {
  23678. customInput.value = currentColor.value;
  23679. }
  23680. });
  23681. watch(() => props.modelValue, (newVal) => {
  23682. if (!newVal) {
  23683. showPanelColor.value = false;
  23684. } else if (newVal && newVal !== color.value) {
  23685. shouldActiveChange = false;
  23686. color.fromString(newVal);
  23687. }
  23688. });
  23689. watch(() => currentColor.value, (val) => {
  23690. customInput.value = val;
  23691. shouldActiveChange && emit("activeChange", val);
  23692. shouldActiveChange = true;
  23693. });
  23694. watch(() => color.value, () => {
  23695. if (!props.modelValue && !showPanelColor.value) {
  23696. showPanelColor.value = true;
  23697. }
  23698. });
  23699. watch(() => showPicker.value, () => {
  23700. nextTick(() => {
  23701. var _a2, _b, _c;
  23702. (_a2 = hue.value) == null ? void 0 : _a2.update();
  23703. (_b = sv.value) == null ? void 0 : _b.update();
  23704. (_c = alpha.value) == null ? void 0 : _c.update();
  23705. });
  23706. });
  23707. provide(colorPickerContextKey, {
  23708. currentColor
  23709. });
  23710. expose({
  23711. color
  23712. });
  23713. return (_ctx, _cache) => {
  23714. return openBlock(), createBlock(unref(ElTooltip), {
  23715. ref_key: "popper",
  23716. ref: popper,
  23717. visible: showPicker.value,
  23718. "show-arrow": false,
  23719. "fallback-placements": ["bottom", "top", "right", "left"],
  23720. offset: 0,
  23721. "gpu-acceleration": false,
  23722. "popper-class": [unref(ns2).be("picker", "panel"), unref(ns2).b("dropdown"), _ctx.popperClass],
  23723. "stop-popper-mouse-event": false,
  23724. effect: "light",
  23725. trigger: "click",
  23726. transition: `${unref(ns2).namespace.value}-zoom-in-top`,
  23727. persistent: ""
  23728. }, {
  23729. content: withCtx(() => [
  23730. withDirectives((openBlock(), createElementBlock("div", null, [
  23731. createBaseVNode("div", {
  23732. class: normalizeClass(unref(ns2).be("dropdown", "main-wrapper"))
  23733. }, [
  23734. createVNode(HueSlider, {
  23735. ref_key: "hue",
  23736. ref: hue,
  23737. class: "hue-slider",
  23738. color: unref(color),
  23739. vertical: ""
  23740. }, null, 8, ["color"]),
  23741. createVNode(SvPanel, {
  23742. ref: "svPanel",
  23743. color: unref(color)
  23744. }, null, 8, ["color"])
  23745. ], 2),
  23746. _ctx.showAlpha ? (openBlock(), createBlock(AlphaSlider, {
  23747. key: 0,
  23748. ref_key: "alpha",
  23749. ref: alpha,
  23750. color: unref(color)
  23751. }, null, 8, ["color"])) : createCommentVNode("v-if", true),
  23752. _ctx.predefine ? (openBlock(), createBlock(Predefine, {
  23753. key: 1,
  23754. ref: "predefine",
  23755. color: unref(color),
  23756. colors: _ctx.predefine
  23757. }, null, 8, ["color", "colors"])) : createCommentVNode("v-if", true),
  23758. createBaseVNode("div", {
  23759. class: normalizeClass(unref(ns2).be("dropdown", "btns"))
  23760. }, [
  23761. createBaseVNode("span", {
  23762. class: normalizeClass(unref(ns2).be("dropdown", "value"))
  23763. }, [
  23764. createVNode(unref(ElInput), {
  23765. modelValue: customInput.value,
  23766. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
  23767. "validate-event": false,
  23768. size: "small",
  23769. onKeyup: withKeys(handleConfirm, ["enter"]),
  23770. onBlur: handleConfirm
  23771. }, null, 8, ["modelValue", "onKeyup"])
  23772. ], 2),
  23773. createVNode(unref(ElButton), {
  23774. class: normalizeClass(unref(ns2).be("dropdown", "link-btn")),
  23775. text: "",
  23776. size: "small",
  23777. onClick: clear
  23778. }, {
  23779. default: withCtx(() => [
  23780. createTextVNode(toDisplayString(unref(t)("el.colorpicker.clear")), 1)
  23781. ]),
  23782. _: 1
  23783. }, 8, ["class"]),
  23784. createVNode(unref(ElButton), {
  23785. plain: "",
  23786. size: "small",
  23787. class: normalizeClass(unref(ns2).be("dropdown", "btn")),
  23788. onClick: confirmValue
  23789. }, {
  23790. default: withCtx(() => [
  23791. createTextVNode(toDisplayString(unref(t)("el.colorpicker.confirm")), 1)
  23792. ]),
  23793. _: 1
  23794. }, 8, ["class"])
  23795. ], 2)
  23796. ])), [
  23797. [unref(ClickOutside), hide2]
  23798. ])
  23799. ]),
  23800. default: withCtx(() => [
  23801. createBaseVNode("div", {
  23802. id: unref(buttonId),
  23803. class: normalizeClass(unref(btnKls)),
  23804. role: "button",
  23805. "aria-label": unref(buttonAriaLabel),
  23806. "aria-labelledby": unref(buttonAriaLabelledby),
  23807. "aria-description": unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }),
  23808. tabindex: _ctx.tabindex,
  23809. onKeydown: withKeys(handleTrigger, ["enter"])
  23810. }, [
  23811. unref(colorDisabled) ? (openBlock(), createElementBlock("div", {
  23812. key: 0,
  23813. class: normalizeClass(unref(ns2).be("picker", "mask"))
  23814. }, null, 2)) : createCommentVNode("v-if", true),
  23815. createBaseVNode("div", {
  23816. class: normalizeClass(unref(ns2).be("picker", "trigger")),
  23817. onClick: handleTrigger
  23818. }, [
  23819. createBaseVNode("span", {
  23820. class: normalizeClass([unref(ns2).be("picker", "color"), unref(ns2).is("alpha", _ctx.showAlpha)])
  23821. }, [
  23822. createBaseVNode("span", {
  23823. class: normalizeClass(unref(ns2).be("picker", "color-inner")),
  23824. style: normalizeStyle({
  23825. backgroundColor: unref(displayedColor)
  23826. })
  23827. }, [
  23828. withDirectives(createVNode(unref(ElIcon), {
  23829. class: normalizeClass([unref(ns2).be("picker", "icon"), unref(ns2).is("icon-arrow-down")])
  23830. }, {
  23831. default: withCtx(() => [
  23832. createVNode(unref(arrow_down_default))
  23833. ]),
  23834. _: 1
  23835. }, 8, ["class"]), [
  23836. [vShow, _ctx.modelValue || showPanelColor.value]
  23837. ]),
  23838. !_ctx.modelValue && !showPanelColor.value ? (openBlock(), createBlock(unref(ElIcon), {
  23839. key: 0,
  23840. class: normalizeClass([unref(ns2).be("picker", "empty"), unref(ns2).is("icon-close")])
  23841. }, {
  23842. default: withCtx(() => [
  23843. createVNode(unref(close_default))
  23844. ]),
  23845. _: 1
  23846. }, 8, ["class"])) : createCommentVNode("v-if", true)
  23847. ], 6)
  23848. ], 2)
  23849. ], 2)
  23850. ], 42, _hoisted_122)
  23851. ]),
  23852. _: 1
  23853. }, 8, ["visible", "popper-class", "transition"]);
  23854. };
  23855. }
  23856. });
  23857. var ColorPicker = _export_sfc(_sfc_main53, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/color-picker.vue"]]);
  23858. // node_modules/element-plus/es/components/color-picker/index.mjs
  23859. var ElColorPicker = withInstall(ColorPicker);
  23860. // node_modules/element-plus/es/components/config-provider/src/config-provider.mjs
  23861. var messageConfig = {};
  23862. var configProviderProps = buildProps({
  23863. a11y: {
  23864. type: Boolean,
  23865. default: true
  23866. },
  23867. locale: {
  23868. type: definePropType(Object)
  23869. },
  23870. size: useSizeProp,
  23871. button: {
  23872. type: definePropType(Object)
  23873. },
  23874. experimentalFeatures: {
  23875. type: definePropType(Object)
  23876. },
  23877. keyboardNavigation: {
  23878. type: Boolean,
  23879. default: true
  23880. },
  23881. message: {
  23882. type: definePropType(Object)
  23883. },
  23884. zIndex: Number,
  23885. namespace: {
  23886. type: String,
  23887. default: "el"
  23888. }
  23889. });
  23890. var ConfigProvider = defineComponent({
  23891. name: "ElConfigProvider",
  23892. props: configProviderProps,
  23893. setup(props, { slots }) {
  23894. watch(() => props.message, (val) => {
  23895. Object.assign(messageConfig, val != null ? val : {});
  23896. }, { immediate: true, deep: true });
  23897. const config = provideGlobalConfig(props);
  23898. return () => renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
  23899. }
  23900. });
  23901. // node_modules/element-plus/es/components/config-provider/index.mjs
  23902. var ElConfigProvider = withInstall(ConfigProvider);
  23903. // node_modules/element-plus/es/components/container/src/container.mjs
  23904. var __default__40 = defineComponent({
  23905. name: "ElContainer"
  23906. });
  23907. var _sfc_main54 = defineComponent({
  23908. ...__default__40,
  23909. props: {
  23910. direction: {
  23911. type: String
  23912. }
  23913. },
  23914. setup(__props) {
  23915. const props = __props;
  23916. const slots = useSlots();
  23917. const ns2 = useNamespace("container");
  23918. const isVertical = computed2(() => {
  23919. if (props.direction === "vertical") {
  23920. return true;
  23921. } else if (props.direction === "horizontal") {
  23922. return false;
  23923. }
  23924. if (slots && slots.default) {
  23925. const vNodes = slots.default();
  23926. return vNodes.some((vNode) => {
  23927. const tag = vNode.type.name;
  23928. return tag === "ElHeader" || tag === "ElFooter";
  23929. });
  23930. } else {
  23931. return false;
  23932. }
  23933. });
  23934. return (_ctx, _cache) => {
  23935. return openBlock(), createElementBlock("section", {
  23936. class: normalizeClass([unref(ns2).b(), unref(ns2).is("vertical", unref(isVertical))])
  23937. }, [
  23938. renderSlot(_ctx.$slots, "default")
  23939. ], 2);
  23940. };
  23941. }
  23942. });
  23943. var Container = _export_sfc(_sfc_main54, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/container.vue"]]);
  23944. // node_modules/element-plus/es/components/container/src/aside.mjs
  23945. var __default__41 = defineComponent({
  23946. name: "ElAside"
  23947. });
  23948. var _sfc_main55 = defineComponent({
  23949. ...__default__41,
  23950. props: {
  23951. width: {
  23952. type: String,
  23953. default: null
  23954. }
  23955. },
  23956. setup(__props) {
  23957. const props = __props;
  23958. const ns2 = useNamespace("aside");
  23959. const style = computed2(() => props.width ? ns2.cssVarBlock({ width: props.width }) : {});
  23960. return (_ctx, _cache) => {
  23961. return openBlock(), createElementBlock("aside", {
  23962. class: normalizeClass(unref(ns2).b()),
  23963. style: normalizeStyle(unref(style))
  23964. }, [
  23965. renderSlot(_ctx.$slots, "default")
  23966. ], 6);
  23967. };
  23968. }
  23969. });
  23970. var Aside = _export_sfc(_sfc_main55, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/aside.vue"]]);
  23971. // node_modules/element-plus/es/components/container/src/footer.mjs
  23972. var __default__42 = defineComponent({
  23973. name: "ElFooter"
  23974. });
  23975. var _sfc_main56 = defineComponent({
  23976. ...__default__42,
  23977. props: {
  23978. height: {
  23979. type: String,
  23980. default: null
  23981. }
  23982. },
  23983. setup(__props) {
  23984. const props = __props;
  23985. const ns2 = useNamespace("footer");
  23986. const style = computed2(() => props.height ? ns2.cssVarBlock({ height: props.height }) : {});
  23987. return (_ctx, _cache) => {
  23988. return openBlock(), createElementBlock("footer", {
  23989. class: normalizeClass(unref(ns2).b()),
  23990. style: normalizeStyle(unref(style))
  23991. }, [
  23992. renderSlot(_ctx.$slots, "default")
  23993. ], 6);
  23994. };
  23995. }
  23996. });
  23997. var Footer = _export_sfc(_sfc_main56, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/footer.vue"]]);
  23998. // node_modules/element-plus/es/components/container/src/header.mjs
  23999. var __default__43 = defineComponent({
  24000. name: "ElHeader"
  24001. });
  24002. var _sfc_main57 = defineComponent({
  24003. ...__default__43,
  24004. props: {
  24005. height: {
  24006. type: String,
  24007. default: null
  24008. }
  24009. },
  24010. setup(__props) {
  24011. const props = __props;
  24012. const ns2 = useNamespace("header");
  24013. const style = computed2(() => {
  24014. return props.height ? ns2.cssVarBlock({
  24015. height: props.height
  24016. }) : {};
  24017. });
  24018. return (_ctx, _cache) => {
  24019. return openBlock(), createElementBlock("header", {
  24020. class: normalizeClass(unref(ns2).b()),
  24021. style: normalizeStyle(unref(style))
  24022. }, [
  24023. renderSlot(_ctx.$slots, "default")
  24024. ], 6);
  24025. };
  24026. }
  24027. });
  24028. var Header = _export_sfc(_sfc_main57, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/header.vue"]]);
  24029. // node_modules/element-plus/es/components/container/src/main.mjs
  24030. var __default__44 = defineComponent({
  24031. name: "ElMain"
  24032. });
  24033. var _sfc_main58 = defineComponent({
  24034. ...__default__44,
  24035. setup(__props) {
  24036. const ns2 = useNamespace("main");
  24037. return (_ctx, _cache) => {
  24038. return openBlock(), createElementBlock("main", {
  24039. class: normalizeClass(unref(ns2).b())
  24040. }, [
  24041. renderSlot(_ctx.$slots, "default")
  24042. ], 2);
  24043. };
  24044. }
  24045. });
  24046. var Main = _export_sfc(_sfc_main58, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/container/src/main.vue"]]);
  24047. // node_modules/element-plus/es/components/container/index.mjs
  24048. var ElContainer = withInstall(Container, {
  24049. Aside,
  24050. Footer,
  24051. Header,
  24052. Main
  24053. });
  24054. var ElAside = withNoopInstall(Aside);
  24055. var ElFooter = withNoopInstall(Footer);
  24056. var ElHeader = withNoopInstall(Header);
  24057. var ElMain = withNoopInstall(Main);
  24058. // node_modules/element-plus/es/components/date-picker/src/date-picker.mjs
  24059. var import_dayjs15 = __toESM(require_dayjs_min(), 1);
  24060. var import_customParseFormat2 = __toESM(require_customParseFormat(), 1);
  24061. var import_advancedFormat = __toESM(require_advancedFormat(), 1);
  24062. var import_localeData2 = __toESM(require_localeData(), 1);
  24063. var import_weekOfYear = __toESM(require_weekOfYear(), 1);
  24064. var import_weekYear = __toESM(require_weekYear(), 1);
  24065. var import_dayOfYear = __toESM(require_dayOfYear(), 1);
  24066. var import_isSameOrAfter = __toESM(require_isSameOrAfter(), 1);
  24067. var import_isSameOrBefore = __toESM(require_isSameOrBefore(), 1);
  24068. // node_modules/element-plus/es/components/date-picker/src/props/date-picker.mjs
  24069. var datePickerProps = buildProps({
  24070. type: {
  24071. type: definePropType(String),
  24072. default: "date"
  24073. }
  24074. });
  24075. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs
  24076. var import_dayjs11 = __toESM(require_dayjs_min(), 1);
  24077. // node_modules/element-plus/es/components/date-picker/src/props/shared.mjs
  24078. var selectionModes = ["date", "dates", "year", "month", "week", "range"];
  24079. var datePickerSharedProps = buildProps({
  24080. disabledDate: {
  24081. type: definePropType(Function)
  24082. },
  24083. date: {
  24084. type: definePropType(Object),
  24085. required: true
  24086. },
  24087. minDate: {
  24088. type: definePropType(Object)
  24089. },
  24090. maxDate: {
  24091. type: definePropType(Object)
  24092. },
  24093. parsedValue: {
  24094. type: definePropType([Object, Array])
  24095. },
  24096. rangeState: {
  24097. type: definePropType(Object),
  24098. default: () => ({
  24099. endDate: null,
  24100. selecting: false
  24101. })
  24102. }
  24103. });
  24104. var panelSharedProps = buildProps({
  24105. type: {
  24106. type: definePropType(String),
  24107. required: true,
  24108. values: datePickTypes
  24109. }
  24110. });
  24111. var panelRangeSharedProps = buildProps({
  24112. unlinkPanels: Boolean,
  24113. parsedValue: {
  24114. type: definePropType(Array)
  24115. }
  24116. });
  24117. var selectionModeWithDefault = (mode) => {
  24118. return {
  24119. type: String,
  24120. values: selectionModes,
  24121. default: mode
  24122. };
  24123. };
  24124. // node_modules/element-plus/es/components/date-picker/src/props/panel-date-pick.mjs
  24125. var panelDatePickProps = buildProps({
  24126. ...panelSharedProps,
  24127. parsedValue: {
  24128. type: definePropType([Object, Array])
  24129. },
  24130. visible: {
  24131. type: Boolean
  24132. },
  24133. format: {
  24134. type: String,
  24135. default: ""
  24136. }
  24137. });
  24138. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-date-table.mjs
  24139. var import_dayjs8 = __toESM(require_dayjs_min(), 1);
  24140. // node_modules/element-plus/es/components/date-picker/src/props/basic-date-table.mjs
  24141. var basicDateTableProps = buildProps({
  24142. ...datePickerSharedProps,
  24143. cellClassName: {
  24144. type: definePropType(Function)
  24145. },
  24146. showWeekNumber: Boolean,
  24147. selectionMode: selectionModeWithDefault("date")
  24148. });
  24149. // node_modules/element-plus/es/components/date-picker/src/utils.mjs
  24150. var import_dayjs7 = __toESM(require_dayjs_min(), 1);
  24151. var isValidRange2 = (range4) => {
  24152. if (!isArray(range4))
  24153. return false;
  24154. const [left2, right2] = range4;
  24155. return import_dayjs7.default.isDayjs(left2) && import_dayjs7.default.isDayjs(right2) && left2.isSameOrBefore(right2);
  24156. };
  24157. var getDefaultValue = (defaultValue, { lang, unit: unit3, unlinkPanels }) => {
  24158. let start;
  24159. if (isArray(defaultValue)) {
  24160. let [left2, right2] = defaultValue.map((d2) => (0, import_dayjs7.default)(d2).locale(lang));
  24161. if (!unlinkPanels) {
  24162. right2 = left2.add(1, unit3);
  24163. }
  24164. return [left2, right2];
  24165. } else if (defaultValue) {
  24166. start = (0, import_dayjs7.default)(defaultValue);
  24167. } else {
  24168. start = (0, import_dayjs7.default)();
  24169. }
  24170. start = start.locale(lang);
  24171. return [start, start.add(1, unit3)];
  24172. };
  24173. var buildPickerTable = (dimension, rows, {
  24174. columnIndexOffset,
  24175. startDate,
  24176. nextEndDate,
  24177. now: now2,
  24178. unit: unit3,
  24179. relativeDateGetter,
  24180. setCellMetadata,
  24181. setRowMetadata
  24182. }) => {
  24183. for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {
  24184. const row = rows[rowIndex];
  24185. for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {
  24186. let cell = row[columnIndex + columnIndexOffset];
  24187. if (!cell) {
  24188. cell = {
  24189. row: rowIndex,
  24190. column: columnIndex,
  24191. type: "normal",
  24192. inRange: false,
  24193. start: false,
  24194. end: false
  24195. };
  24196. }
  24197. const index = rowIndex * dimension.column + columnIndex;
  24198. const nextStartDate = relativeDateGetter(index);
  24199. cell.dayjs = nextStartDate;
  24200. cell.date = nextStartDate.toDate();
  24201. cell.timestamp = nextStartDate.valueOf();
  24202. cell.type = "normal";
  24203. cell.inRange = !!(startDate && nextStartDate.isSameOrAfter(startDate, unit3) && nextEndDate && nextStartDate.isSameOrBefore(nextEndDate, unit3)) || !!(startDate && nextStartDate.isSameOrBefore(startDate, unit3) && nextEndDate && nextStartDate.isSameOrAfter(nextEndDate, unit3));
  24204. if (startDate == null ? void 0 : startDate.isSameOrAfter(nextEndDate)) {
  24205. cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit3);
  24206. cell.end = startDate && nextStartDate.isSame(startDate, unit3);
  24207. } else {
  24208. cell.start = !!startDate && nextStartDate.isSame(startDate, unit3);
  24209. cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit3);
  24210. }
  24211. const isToday = nextStartDate.isSame(now2, unit3);
  24212. if (isToday) {
  24213. cell.type = "today";
  24214. }
  24215. setCellMetadata == null ? void 0 : setCellMetadata(cell, { rowIndex, columnIndex });
  24216. row[columnIndex + columnIndexOffset] = cell;
  24217. }
  24218. setRowMetadata == null ? void 0 : setRowMetadata(row);
  24219. }
  24220. };
  24221. // node_modules/element-plus/es/components/date-picker/src/props/basic-cell.mjs
  24222. var basicCellProps = buildProps({
  24223. cell: {
  24224. type: definePropType(Object)
  24225. }
  24226. });
  24227. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs
  24228. var ElDatePickerCell = defineComponent({
  24229. name: "ElDatePickerCell",
  24230. props: basicCellProps,
  24231. setup(props) {
  24232. const ns2 = useNamespace("date-table-cell");
  24233. const {
  24234. slots
  24235. } = inject(ROOT_PICKER_INJECTION_KEY);
  24236. return () => {
  24237. const {
  24238. cell
  24239. } = props;
  24240. if (slots.default) {
  24241. const list = slots.default(cell).filter((item) => {
  24242. return item.patchFlag !== -2 && item.type.toString() !== "Symbol(Comment)";
  24243. });
  24244. if (list.length) {
  24245. return list;
  24246. }
  24247. }
  24248. return createVNode("div", {
  24249. "class": ns2.b()
  24250. }, [createVNode("span", {
  24251. "class": ns2.e("text")
  24252. }, [cell == null ? void 0 : cell.text])]);
  24253. };
  24254. }
  24255. });
  24256. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-date-table.mjs
  24257. var _hoisted_123 = ["aria-label", "onMousedown"];
  24258. var _hoisted_214 = {
  24259. key: 0,
  24260. scope: "col"
  24261. };
  24262. var _hoisted_36 = ["aria-label"];
  24263. var _hoisted_4 = ["aria-current", "aria-selected", "tabindex"];
  24264. var _sfc_main59 = defineComponent({
  24265. __name: "basic-date-table",
  24266. props: basicDateTableProps,
  24267. emits: ["changerange", "pick", "select"],
  24268. setup(__props, { expose, emit }) {
  24269. const props = __props;
  24270. const ns2 = useNamespace("date-table");
  24271. const { t, lang } = useLocale();
  24272. const tbodyRef = ref();
  24273. const currentCellRef = ref();
  24274. const lastRow = ref();
  24275. const lastColumn = ref();
  24276. const tableRows = ref([[], [], [], [], [], []]);
  24277. let focusWithClick = false;
  24278. const firstDayOfWeek = props.date.$locale().weekStart || 7;
  24279. const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_2) => _2.toLowerCase());
  24280. const offsetDay = computed2(() => {
  24281. return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek;
  24282. });
  24283. const startDate = computed2(() => {
  24284. const startDayOfMonth = props.date.startOf("month");
  24285. return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day");
  24286. });
  24287. const WEEKS = computed2(() => {
  24288. return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7);
  24289. });
  24290. const hasCurrent = computed2(() => {
  24291. return flatten_default(rows.value).some((row) => {
  24292. return row.isCurrent;
  24293. });
  24294. });
  24295. const days = computed2(() => {
  24296. const startOfMonth = props.date.startOf("month");
  24297. const startOfMonthDay = startOfMonth.day() || 7;
  24298. const dateCountOfMonth = startOfMonth.daysInMonth();
  24299. const dateCountOfLastMonth = startOfMonth.subtract(1, "month").daysInMonth();
  24300. return {
  24301. startOfMonthDay,
  24302. dateCountOfMonth,
  24303. dateCountOfLastMonth
  24304. };
  24305. });
  24306. const selectedDate = computed2(() => {
  24307. return props.selectionMode === "dates" ? castArray2(props.parsedValue) : [];
  24308. });
  24309. const setDateText = (cell, {
  24310. count,
  24311. rowIndex,
  24312. columnIndex
  24313. }) => {
  24314. const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days);
  24315. const offset2 = unref(offsetDay);
  24316. if (rowIndex >= 0 && rowIndex <= 1) {
  24317. const numberOfDaysFromPreviousMonth = startOfMonthDay + offset2 < 0 ? 7 + startOfMonthDay + offset2 : startOfMonthDay + offset2;
  24318. if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {
  24319. cell.text = count;
  24320. return true;
  24321. } else {
  24322. cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7;
  24323. cell.type = "prev-month";
  24324. }
  24325. } else {
  24326. if (count <= dateCountOfMonth) {
  24327. cell.text = count;
  24328. } else {
  24329. cell.text = count - dateCountOfMonth;
  24330. cell.type = "next-month";
  24331. }
  24332. return true;
  24333. }
  24334. return false;
  24335. };
  24336. const setCellMetadata = (cell, {
  24337. columnIndex,
  24338. rowIndex
  24339. }, count) => {
  24340. const { disabledDate: disabledDate2, cellClassName } = props;
  24341. const _selectedDate = unref(selectedDate);
  24342. const shouldIncrement = setDateText(cell, { count, rowIndex, columnIndex });
  24343. const cellDate = cell.dayjs.toDate();
  24344. cell.selected = _selectedDate.find((d2) => d2.valueOf() === cell.dayjs.valueOf());
  24345. cell.isSelected = !!cell.selected;
  24346. cell.isCurrent = isCurrent(cell);
  24347. cell.disabled = disabledDate2 == null ? void 0 : disabledDate2(cellDate);
  24348. cell.customClass = cellClassName == null ? void 0 : cellClassName(cellDate);
  24349. return shouldIncrement;
  24350. };
  24351. const setRowMetadata = (row) => {
  24352. if (props.selectionMode === "week") {
  24353. const [start, end2] = props.showWeekNumber ? [1, 7] : [0, 6];
  24354. const isActive = isWeekActive(row[start + 1]);
  24355. row[start].inRange = isActive;
  24356. row[start].start = isActive;
  24357. row[end2].inRange = isActive;
  24358. row[end2].end = isActive;
  24359. }
  24360. };
  24361. const rows = computed2(() => {
  24362. const { minDate, maxDate, rangeState, showWeekNumber } = props;
  24363. const offset2 = offsetDay.value;
  24364. const rows_ = tableRows.value;
  24365. const dateUnit = "day";
  24366. let count = 1;
  24367. if (showWeekNumber) {
  24368. for (let rowIndex = 0; rowIndex < 6; rowIndex++) {
  24369. if (!rows_[rowIndex][0]) {
  24370. rows_[rowIndex][0] = {
  24371. type: "week",
  24372. text: startDate.value.add(rowIndex * 7 + 1, dateUnit).week()
  24373. };
  24374. }
  24375. }
  24376. }
  24377. buildPickerTable({ row: 6, column: 7 }, rows_, {
  24378. startDate: minDate,
  24379. columnIndexOffset: showWeekNumber ? 1 : 0,
  24380. nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null,
  24381. now: (0, import_dayjs8.default)().locale(unref(lang)).startOf(dateUnit),
  24382. unit: dateUnit,
  24383. relativeDateGetter: (idx) => startDate.value.add(idx - offset2, dateUnit),
  24384. setCellMetadata: (...args) => {
  24385. if (setCellMetadata(...args, count)) {
  24386. count += 1;
  24387. }
  24388. },
  24389. setRowMetadata
  24390. });
  24391. return rows_;
  24392. });
  24393. watch(() => props.date, async () => {
  24394. var _a2, _b;
  24395. if ((_a2 = tbodyRef.value) == null ? void 0 : _a2.contains(document.activeElement)) {
  24396. await nextTick();
  24397. (_b = currentCellRef.value) == null ? void 0 : _b.focus();
  24398. }
  24399. });
  24400. const focus = async () => {
  24401. var _a2;
  24402. (_a2 = currentCellRef.value) == null ? void 0 : _a2.focus();
  24403. };
  24404. const isNormalDay = (type4 = "") => {
  24405. return ["normal", "today"].includes(type4);
  24406. };
  24407. const isCurrent = (cell) => {
  24408. return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue);
  24409. };
  24410. const cellMatchesDate = (cell, date5) => {
  24411. if (!date5)
  24412. return false;
  24413. return (0, import_dayjs8.default)(date5).locale(lang.value).isSame(props.date.date(Number(cell.text)), "day");
  24414. };
  24415. const getCellClasses = (cell) => {
  24416. const classes = [];
  24417. if (isNormalDay(cell.type) && !cell.disabled) {
  24418. classes.push("available");
  24419. if (cell.type === "today") {
  24420. classes.push("today");
  24421. }
  24422. } else {
  24423. classes.push(cell.type);
  24424. }
  24425. if (isCurrent(cell)) {
  24426. classes.push("current");
  24427. }
  24428. if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) {
  24429. classes.push("in-range");
  24430. if (cell.start) {
  24431. classes.push("start-date");
  24432. }
  24433. if (cell.end) {
  24434. classes.push("end-date");
  24435. }
  24436. }
  24437. if (cell.disabled) {
  24438. classes.push("disabled");
  24439. }
  24440. if (cell.selected) {
  24441. classes.push("selected");
  24442. }
  24443. if (cell.customClass) {
  24444. classes.push(cell.customClass);
  24445. }
  24446. return classes.join(" ");
  24447. };
  24448. const getDateOfCell = (row, column2) => {
  24449. const offsetFromStart = row * 7 + (column2 - (props.showWeekNumber ? 1 : 0)) - offsetDay.value;
  24450. return startDate.value.add(offsetFromStart, "day");
  24451. };
  24452. const handleMouseMove = (event) => {
  24453. var _a2;
  24454. if (!props.rangeState.selecting)
  24455. return;
  24456. let target2 = event.target;
  24457. if (target2.tagName === "SPAN") {
  24458. target2 = (_a2 = target2.parentNode) == null ? void 0 : _a2.parentNode;
  24459. }
  24460. if (target2.tagName === "DIV") {
  24461. target2 = target2.parentNode;
  24462. }
  24463. if (target2.tagName !== "TD")
  24464. return;
  24465. const row = target2.parentNode.rowIndex - 1;
  24466. const column2 = target2.cellIndex;
  24467. if (rows.value[row][column2].disabled)
  24468. return;
  24469. if (row !== lastRow.value || column2 !== lastColumn.value) {
  24470. lastRow.value = row;
  24471. lastColumn.value = column2;
  24472. emit("changerange", {
  24473. selecting: true,
  24474. endDate: getDateOfCell(row, column2)
  24475. });
  24476. }
  24477. };
  24478. const isSelectedCell = (cell) => {
  24479. return !hasCurrent.value && (cell == null ? void 0 : cell.text) === 1 && cell.type === "normal" || cell.isCurrent;
  24480. };
  24481. const handleFocus = (event) => {
  24482. if (focusWithClick || hasCurrent.value || props.selectionMode !== "date")
  24483. return;
  24484. handlePickDate(event, true);
  24485. };
  24486. const handleMouseDown = (event) => {
  24487. const target2 = event.target.closest("td");
  24488. if (!target2)
  24489. return;
  24490. focusWithClick = true;
  24491. };
  24492. const handleMouseUp = (event) => {
  24493. const target2 = event.target.closest("td");
  24494. if (!target2)
  24495. return;
  24496. focusWithClick = false;
  24497. };
  24498. const handlePickDate = (event, isKeyboardMovement = false) => {
  24499. const target2 = event.target.closest("td");
  24500. if (!target2)
  24501. return;
  24502. const row = target2.parentNode.rowIndex - 1;
  24503. const column2 = target2.cellIndex;
  24504. const cell = rows.value[row][column2];
  24505. if (cell.disabled || cell.type === "week")
  24506. return;
  24507. const newDate = getDateOfCell(row, column2);
  24508. if (props.selectionMode === "range") {
  24509. if (!props.rangeState.selecting || !props.minDate) {
  24510. emit("pick", { minDate: newDate, maxDate: null });
  24511. emit("select", true);
  24512. } else {
  24513. if (newDate >= props.minDate) {
  24514. emit("pick", { minDate: props.minDate, maxDate: newDate });
  24515. } else {
  24516. emit("pick", { minDate: newDate, maxDate: props.minDate });
  24517. }
  24518. emit("select", false);
  24519. }
  24520. } else if (props.selectionMode === "date") {
  24521. emit("pick", newDate, isKeyboardMovement);
  24522. } else if (props.selectionMode === "week") {
  24523. const weekNumber = newDate.week();
  24524. const value = `${newDate.year()}w${weekNumber}`;
  24525. emit("pick", {
  24526. year: newDate.year(),
  24527. week: weekNumber,
  24528. value,
  24529. date: newDate.startOf("week")
  24530. });
  24531. } else if (props.selectionMode === "dates") {
  24532. const newValue = cell.selected ? castArray2(props.parsedValue).filter((d2) => (d2 == null ? void 0 : d2.valueOf()) !== newDate.valueOf()) : castArray2(props.parsedValue).concat([newDate]);
  24533. emit("pick", newValue);
  24534. }
  24535. };
  24536. const isWeekActive = (cell) => {
  24537. if (props.selectionMode !== "week")
  24538. return false;
  24539. let newDate = props.date.startOf("day");
  24540. if (cell.type === "prev-month") {
  24541. newDate = newDate.subtract(1, "month");
  24542. }
  24543. if (cell.type === "next-month") {
  24544. newDate = newDate.add(1, "month");
  24545. }
  24546. newDate = newDate.date(Number.parseInt(cell.text, 10));
  24547. if (props.parsedValue && !Array.isArray(props.parsedValue)) {
  24548. const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1;
  24549. const weekDate = props.parsedValue.subtract(dayOffset, "day");
  24550. return weekDate.isSame(newDate, "day");
  24551. }
  24552. return false;
  24553. };
  24554. expose({
  24555. focus
  24556. });
  24557. return (_ctx, _cache) => {
  24558. return openBlock(), createElementBlock("table", {
  24559. role: "grid",
  24560. "aria-label": unref(t)("el.datepicker.dateTablePrompt"),
  24561. cellspacing: "0",
  24562. cellpadding: "0",
  24563. class: normalizeClass([unref(ns2).b(), { "is-week-mode": _ctx.selectionMode === "week" }]),
  24564. onClick: handlePickDate,
  24565. onMousemove: handleMouseMove,
  24566. onMousedown: withModifiers(handleMouseDown, ["prevent"]),
  24567. onMouseup: handleMouseUp
  24568. }, [
  24569. createBaseVNode("tbody", {
  24570. ref_key: "tbodyRef",
  24571. ref: tbodyRef
  24572. }, [
  24573. createBaseVNode("tr", null, [
  24574. _ctx.showWeekNumber ? (openBlock(), createElementBlock("th", _hoisted_214, toDisplayString(unref(t)("el.datepicker.week")), 1)) : createCommentVNode("v-if", true),
  24575. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEKS), (week, key) => {
  24576. return openBlock(), createElementBlock("th", {
  24577. key,
  24578. scope: "col",
  24579. "aria-label": unref(t)("el.datepicker.weeksFull." + week)
  24580. }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_36);
  24581. }), 128))
  24582. ]),
  24583. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, rowKey2) => {
  24584. return openBlock(), createElementBlock("tr", {
  24585. key: rowKey2,
  24586. class: normalizeClass([unref(ns2).e("row"), { current: isWeekActive(row[1]) }])
  24587. }, [
  24588. (openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, columnKey) => {
  24589. return openBlock(), createElementBlock("td", {
  24590. key: `${rowKey2}.${columnKey}`,
  24591. ref_for: true,
  24592. ref: (el) => isSelectedCell(cell) && (currentCellRef.value = el),
  24593. class: normalizeClass(getCellClasses(cell)),
  24594. "aria-current": cell.isCurrent ? "date" : void 0,
  24595. "aria-selected": cell.isCurrent,
  24596. tabindex: isSelectedCell(cell) ? 0 : -1,
  24597. onFocus: handleFocus
  24598. }, [
  24599. createVNode(unref(ElDatePickerCell), { cell }, null, 8, ["cell"])
  24600. ], 42, _hoisted_4);
  24601. }), 128))
  24602. ], 2);
  24603. }), 128))
  24604. ], 512)
  24605. ], 42, _hoisted_123);
  24606. };
  24607. }
  24608. });
  24609. var DateTable2 = _export_sfc(_sfc_main59, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/basic-date-table.vue"]]);
  24610. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-month-table.mjs
  24611. var import_dayjs9 = __toESM(require_dayjs_min(), 1);
  24612. // node_modules/element-plus/es/components/date-picker/src/props/basic-month-table.mjs
  24613. var basicMonthTableProps = buildProps({
  24614. ...datePickerSharedProps,
  24615. selectionMode: selectionModeWithDefault("month")
  24616. });
  24617. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-month-table.mjs
  24618. var _hoisted_124 = ["aria-label"];
  24619. var _hoisted_215 = ["aria-selected", "aria-label", "tabindex", "onKeydown"];
  24620. var _hoisted_37 = { class: "cell" };
  24621. var _sfc_main60 = defineComponent({
  24622. __name: "basic-month-table",
  24623. props: basicMonthTableProps,
  24624. emits: ["changerange", "pick", "select"],
  24625. setup(__props, { expose, emit }) {
  24626. const props = __props;
  24627. const datesInMonth = (year, month, lang2) => {
  24628. const firstDay = (0, import_dayjs9.default)().locale(lang2).startOf("month").month(month).year(year);
  24629. const numOfDays = firstDay.daysInMonth();
  24630. return rangeArr(numOfDays).map((n) => firstDay.add(n, "day").toDate());
  24631. };
  24632. const ns2 = useNamespace("month-table");
  24633. const { t, lang } = useLocale();
  24634. const tbodyRef = ref();
  24635. const currentCellRef = ref();
  24636. const months = ref(props.date.locale("en").localeData().monthsShort().map((_2) => _2.toLowerCase()));
  24637. const tableRows = ref([
  24638. [],
  24639. [],
  24640. []
  24641. ]);
  24642. const lastRow = ref();
  24643. const lastColumn = ref();
  24644. const rows = computed2(() => {
  24645. var _a2, _b;
  24646. const rows2 = tableRows.value;
  24647. const now2 = (0, import_dayjs9.default)().locale(lang.value).startOf("month");
  24648. for (let i = 0; i < 3; i++) {
  24649. const row = rows2[i];
  24650. for (let j = 0; j < 4; j++) {
  24651. const cell = row[j] || (row[j] = {
  24652. row: i,
  24653. column: j,
  24654. type: "normal",
  24655. inRange: false,
  24656. start: false,
  24657. end: false,
  24658. text: -1,
  24659. disabled: false
  24660. });
  24661. cell.type = "normal";
  24662. const index = i * 4 + j;
  24663. const calTime = props.date.startOf("year").month(index);
  24664. const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
  24665. 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"));
  24666. if ((_a2 = props.minDate) == null ? void 0 : _a2.isSameOrAfter(calEndDate)) {
  24667. cell.start = !!(calEndDate && calTime.isSame(calEndDate, "month"));
  24668. cell.end = props.minDate && calTime.isSame(props.minDate, "month");
  24669. } else {
  24670. cell.start = !!(props.minDate && calTime.isSame(props.minDate, "month"));
  24671. cell.end = !!(calEndDate && calTime.isSame(calEndDate, "month"));
  24672. }
  24673. const isToday = now2.isSame(calTime);
  24674. if (isToday) {
  24675. cell.type = "today";
  24676. }
  24677. cell.text = index;
  24678. cell.disabled = ((_b = props.disabledDate) == null ? void 0 : _b.call(props, calTime.toDate())) || false;
  24679. }
  24680. }
  24681. return rows2;
  24682. });
  24683. const focus = () => {
  24684. var _a2;
  24685. (_a2 = currentCellRef.value) == null ? void 0 : _a2.focus();
  24686. };
  24687. const getCellStyle = (cell) => {
  24688. const style = {};
  24689. const year = props.date.year();
  24690. const today = new Date();
  24691. const month = cell.text;
  24692. style.disabled = props.disabledDate ? datesInMonth(year, month, lang.value).every(props.disabledDate) : false;
  24693. style.current = castArray2(props.parsedValue).findIndex((date5) => import_dayjs9.default.isDayjs(date5) && date5.year() === year && date5.month() === month) >= 0;
  24694. style.today = today.getFullYear() === year && today.getMonth() === month;
  24695. if (cell.inRange) {
  24696. style["in-range"] = true;
  24697. if (cell.start) {
  24698. style["start-date"] = true;
  24699. }
  24700. if (cell.end) {
  24701. style["end-date"] = true;
  24702. }
  24703. }
  24704. return style;
  24705. };
  24706. const isSelectedCell = (cell) => {
  24707. const year = props.date.year();
  24708. const month = cell.text;
  24709. return castArray2(props.date).findIndex((date5) => date5.year() === year && date5.month() === month) >= 0;
  24710. };
  24711. const handleMouseMove = (event) => {
  24712. var _a2;
  24713. if (!props.rangeState.selecting)
  24714. return;
  24715. let target2 = event.target;
  24716. if (target2.tagName === "A") {
  24717. target2 = (_a2 = target2.parentNode) == null ? void 0 : _a2.parentNode;
  24718. }
  24719. if (target2.tagName === "DIV") {
  24720. target2 = target2.parentNode;
  24721. }
  24722. if (target2.tagName !== "TD")
  24723. return;
  24724. const row = target2.parentNode.rowIndex;
  24725. const column2 = target2.cellIndex;
  24726. if (rows.value[row][column2].disabled)
  24727. return;
  24728. if (row !== lastRow.value || column2 !== lastColumn.value) {
  24729. lastRow.value = row;
  24730. lastColumn.value = column2;
  24731. emit("changerange", {
  24732. selecting: true,
  24733. endDate: props.date.startOf("year").month(row * 4 + column2)
  24734. });
  24735. }
  24736. };
  24737. const handleMonthTableClick = (event) => {
  24738. var _a2;
  24739. const target2 = (_a2 = event.target) == null ? void 0 : _a2.closest("td");
  24740. if ((target2 == null ? void 0 : target2.tagName) !== "TD")
  24741. return;
  24742. if (hasClass(target2, "disabled"))
  24743. return;
  24744. const column2 = target2.cellIndex;
  24745. const row = target2.parentNode.rowIndex;
  24746. const month = row * 4 + column2;
  24747. const newDate = props.date.startOf("year").month(month);
  24748. if (props.selectionMode === "range") {
  24749. if (!props.rangeState.selecting) {
  24750. emit("pick", { minDate: newDate, maxDate: null });
  24751. emit("select", true);
  24752. } else {
  24753. if (props.minDate && newDate >= props.minDate) {
  24754. emit("pick", { minDate: props.minDate, maxDate: newDate });
  24755. } else {
  24756. emit("pick", { minDate: newDate, maxDate: props.minDate });
  24757. }
  24758. emit("select", false);
  24759. }
  24760. } else {
  24761. emit("pick", month);
  24762. }
  24763. };
  24764. watch(() => props.date, async () => {
  24765. var _a2, _b;
  24766. if ((_a2 = tbodyRef.value) == null ? void 0 : _a2.contains(document.activeElement)) {
  24767. await nextTick();
  24768. (_b = currentCellRef.value) == null ? void 0 : _b.focus();
  24769. }
  24770. });
  24771. expose({
  24772. focus
  24773. });
  24774. return (_ctx, _cache) => {
  24775. return openBlock(), createElementBlock("table", {
  24776. role: "grid",
  24777. "aria-label": unref(t)("el.datepicker.monthTablePrompt"),
  24778. class: normalizeClass(unref(ns2).b()),
  24779. onClick: handleMonthTableClick,
  24780. onMousemove: handleMouseMove
  24781. }, [
  24782. createBaseVNode("tbody", {
  24783. ref_key: "tbodyRef",
  24784. ref: tbodyRef
  24785. }, [
  24786. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, key) => {
  24787. return openBlock(), createElementBlock("tr", { key }, [
  24788. (openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key_) => {
  24789. return openBlock(), createElementBlock("td", {
  24790. key: key_,
  24791. ref_for: true,
  24792. ref: (el) => isSelectedCell(cell) && (currentCellRef.value = el),
  24793. class: normalizeClass(getCellStyle(cell)),
  24794. "aria-selected": `${isSelectedCell(cell)}`,
  24795. "aria-label": unref(t)(`el.datepicker.month${+cell.text + 1}`),
  24796. tabindex: isSelectedCell(cell) ? 0 : -1,
  24797. onKeydown: [
  24798. withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["space"]),
  24799. withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["enter"])
  24800. ]
  24801. }, [
  24802. createBaseVNode("div", null, [
  24803. createBaseVNode("span", _hoisted_37, toDisplayString(unref(t)("el.datepicker.months." + months.value[cell.text])), 1)
  24804. ])
  24805. ], 42, _hoisted_215);
  24806. }), 128))
  24807. ]);
  24808. }), 128))
  24809. ], 512)
  24810. ], 42, _hoisted_124);
  24811. };
  24812. }
  24813. });
  24814. var MonthTable = _export_sfc(_sfc_main60, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/basic-month-table.vue"]]);
  24815. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-year-table.mjs
  24816. var import_dayjs10 = __toESM(require_dayjs_min(), 1);
  24817. // node_modules/element-plus/es/components/date-picker/src/props/basic-year-table.mjs
  24818. var { date, disabledDate, parsedValue } = datePickerSharedProps;
  24819. var basicYearTableProps = buildProps({
  24820. date,
  24821. disabledDate,
  24822. parsedValue
  24823. });
  24824. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/basic-year-table.mjs
  24825. var _hoisted_125 = ["aria-label"];
  24826. var _hoisted_216 = ["aria-selected", "tabindex", "onKeydown"];
  24827. var _hoisted_38 = { class: "cell" };
  24828. var _hoisted_42 = { key: 1 };
  24829. var _sfc_main61 = defineComponent({
  24830. __name: "basic-year-table",
  24831. props: basicYearTableProps,
  24832. emits: ["pick"],
  24833. setup(__props, { expose, emit }) {
  24834. const props = __props;
  24835. const datesInYear = (year, lang2) => {
  24836. const firstDay = (0, import_dayjs10.default)(String(year)).locale(lang2).startOf("year");
  24837. const lastDay = firstDay.endOf("year");
  24838. const numOfDays = lastDay.dayOfYear();
  24839. return rangeArr(numOfDays).map((n) => firstDay.add(n, "day").toDate());
  24840. };
  24841. const ns2 = useNamespace("year-table");
  24842. const { t, lang } = useLocale();
  24843. const tbodyRef = ref();
  24844. const currentCellRef = ref();
  24845. const startYear = computed2(() => {
  24846. return Math.floor(props.date.year() / 10) * 10;
  24847. });
  24848. const focus = () => {
  24849. var _a2;
  24850. (_a2 = currentCellRef.value) == null ? void 0 : _a2.focus();
  24851. };
  24852. const getCellKls = (year) => {
  24853. const kls = {};
  24854. const today = (0, import_dayjs10.default)().locale(lang.value);
  24855. kls.disabled = props.disabledDate ? datesInYear(year, lang.value).every(props.disabledDate) : false;
  24856. kls.current = castArray2(props.parsedValue).findIndex((d2) => d2.year() === year) >= 0;
  24857. kls.today = today.year() === year;
  24858. return kls;
  24859. };
  24860. const isSelectedCell = (year) => {
  24861. return year === startYear.value && props.date.year() < startYear.value && props.date.year() > startYear.value + 9 || castArray2(props.date).findIndex((date5) => date5.year() === year) >= 0;
  24862. };
  24863. const handleYearTableClick = (event) => {
  24864. const clickTarget = event.target;
  24865. const target2 = clickTarget.closest("td");
  24866. if (target2 && target2.textContent) {
  24867. if (hasClass(target2, "disabled"))
  24868. return;
  24869. const year = target2.textContent || target2.innerText;
  24870. emit("pick", Number(year));
  24871. }
  24872. };
  24873. watch(() => props.date, async () => {
  24874. var _a2, _b;
  24875. if ((_a2 = tbodyRef.value) == null ? void 0 : _a2.contains(document.activeElement)) {
  24876. await nextTick();
  24877. (_b = currentCellRef.value) == null ? void 0 : _b.focus();
  24878. }
  24879. });
  24880. expose({
  24881. focus
  24882. });
  24883. return (_ctx, _cache) => {
  24884. return openBlock(), createElementBlock("table", {
  24885. role: "grid",
  24886. "aria-label": unref(t)("el.datepicker.yearTablePrompt"),
  24887. class: normalizeClass(unref(ns2).b()),
  24888. onClick: handleYearTableClick
  24889. }, [
  24890. createBaseVNode("tbody", {
  24891. ref_key: "tbodyRef",
  24892. ref: tbodyRef
  24893. }, [
  24894. (openBlock(), createElementBlock(Fragment, null, renderList(3, (_2, i) => {
  24895. return createBaseVNode("tr", { key: i }, [
  24896. (openBlock(), createElementBlock(Fragment, null, renderList(4, (__, j) => {
  24897. return openBlock(), createElementBlock(Fragment, {
  24898. key: i + "_" + j
  24899. }, [
  24900. i * 4 + j < 10 ? (openBlock(), createElementBlock("td", {
  24901. key: 0,
  24902. ref_for: true,
  24903. ref: (el) => isSelectedCell(unref(startYear) + i * 4 + j) && (currentCellRef.value = el),
  24904. class: normalizeClass(["available", getCellKls(unref(startYear) + i * 4 + j)]),
  24905. "aria-selected": `${isSelectedCell(unref(startYear) + i * 4 + j)}`,
  24906. tabindex: isSelectedCell(unref(startYear) + i * 4 + j) ? 0 : -1,
  24907. onKeydown: [
  24908. withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["space"]),
  24909. withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["enter"])
  24910. ]
  24911. }, [
  24912. createBaseVNode("span", _hoisted_38, toDisplayString(unref(startYear) + i * 4 + j), 1)
  24913. ], 42, _hoisted_216)) : (openBlock(), createElementBlock("td", _hoisted_42))
  24914. ], 64);
  24915. }), 64))
  24916. ]);
  24917. }), 64))
  24918. ], 512)
  24919. ], 10, _hoisted_125);
  24920. };
  24921. }
  24922. });
  24923. var YearTable = _export_sfc(_sfc_main61, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/basic-year-table.vue"]]);
  24924. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs
  24925. var _hoisted_126 = ["onClick"];
  24926. var _hoisted_217 = ["aria-label"];
  24927. var _hoisted_39 = ["aria-label"];
  24928. var _hoisted_43 = ["aria-label"];
  24929. var _hoisted_5 = ["aria-label"];
  24930. var _sfc_main62 = defineComponent({
  24931. __name: "panel-date-pick",
  24932. props: panelDatePickProps,
  24933. emits: ["pick", "set-picker-option", "panel-change"],
  24934. setup(__props, { emit: contextEmit }) {
  24935. const props = __props;
  24936. const timeWithinRange = (_2, __, ___) => true;
  24937. const ppNs = useNamespace("picker-panel");
  24938. const dpNs = useNamespace("date-picker");
  24939. const attrs = useAttrs();
  24940. const slots = useSlots();
  24941. const { t, lang } = useLocale();
  24942. const pickerBase = inject("EP_PICKER_BASE");
  24943. const popper = inject(TOOLTIP_INJECTION_KEY);
  24944. const { shortcuts, disabledDate: disabledDate2, cellClassName, defaultTime, arrowControl } = pickerBase.props;
  24945. const defaultValue = toRef(pickerBase.props, "defaultValue");
  24946. const currentViewRef = ref();
  24947. const innerDate = ref((0, import_dayjs11.default)().locale(lang.value));
  24948. const isChangeToNow = ref(false);
  24949. const defaultTimeD = computed2(() => {
  24950. return (0, import_dayjs11.default)(defaultTime).locale(lang.value);
  24951. });
  24952. const month = computed2(() => {
  24953. return innerDate.value.month();
  24954. });
  24955. const year = computed2(() => {
  24956. return innerDate.value.year();
  24957. });
  24958. const selectableRange = ref([]);
  24959. const userInputDate = ref(null);
  24960. const userInputTime = ref(null);
  24961. const checkDateWithinRange = (date5) => {
  24962. return selectableRange.value.length > 0 ? timeWithinRange(date5, selectableRange.value, props.format || "HH:mm:ss") : true;
  24963. };
  24964. const formatEmit = (emitDayjs) => {
  24965. if (defaultTime && !visibleTime.value && !isChangeToNow.value) {
  24966. return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
  24967. }
  24968. if (showTime.value)
  24969. return emitDayjs.millisecond(0);
  24970. return emitDayjs.startOf("day");
  24971. };
  24972. const emit = (value, ...args) => {
  24973. if (!value) {
  24974. contextEmit("pick", value, ...args);
  24975. } else if (isArray(value)) {
  24976. const dates = value.map(formatEmit);
  24977. contextEmit("pick", dates, ...args);
  24978. } else {
  24979. contextEmit("pick", formatEmit(value), ...args);
  24980. }
  24981. userInputDate.value = null;
  24982. userInputTime.value = null;
  24983. isChangeToNow.value = false;
  24984. };
  24985. const handleDatePick = (value, keepOpen) => {
  24986. if (selectionMode.value === "date") {
  24987. value = value;
  24988. let newDate = props.parsedValue ? props.parsedValue.year(value.year()).month(value.month()).date(value.date()) : value;
  24989. if (!checkDateWithinRange(newDate)) {
  24990. newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());
  24991. }
  24992. innerDate.value = newDate;
  24993. emit(newDate, showTime.value || keepOpen);
  24994. } else if (selectionMode.value === "week") {
  24995. emit(value.date);
  24996. } else if (selectionMode.value === "dates") {
  24997. emit(value, true);
  24998. }
  24999. };
  25000. const moveByMonth = (forward) => {
  25001. const action = forward ? "add" : "subtract";
  25002. innerDate.value = innerDate.value[action](1, "month");
  25003. handlePanelChange("month");
  25004. };
  25005. const moveByYear = (forward) => {
  25006. const currentDate = innerDate.value;
  25007. const action = forward ? "add" : "subtract";
  25008. innerDate.value = currentView.value === "year" ? currentDate[action](10, "year") : currentDate[action](1, "year");
  25009. handlePanelChange("year");
  25010. };
  25011. const currentView = ref("date");
  25012. const yearLabel = computed2(() => {
  25013. const yearTranslation = t("el.datepicker.year");
  25014. if (currentView.value === "year") {
  25015. const startYear = Math.floor(year.value / 10) * 10;
  25016. if (yearTranslation) {
  25017. return `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}`;
  25018. }
  25019. return `${startYear} - ${startYear + 9}`;
  25020. }
  25021. return `${year.value} ${yearTranslation}`;
  25022. });
  25023. const handleShortcutClick = (shortcut) => {
  25024. const shortcutValue = isFunction(shortcut.value) ? shortcut.value() : shortcut.value;
  25025. if (shortcutValue) {
  25026. emit((0, import_dayjs11.default)(shortcutValue).locale(lang.value));
  25027. return;
  25028. }
  25029. if (shortcut.onClick) {
  25030. shortcut.onClick({
  25031. attrs,
  25032. slots,
  25033. emit: contextEmit
  25034. });
  25035. }
  25036. };
  25037. const selectionMode = computed2(() => {
  25038. const { type: type4 } = props;
  25039. if (["week", "month", "year", "dates"].includes(type4))
  25040. return type4;
  25041. return "date";
  25042. });
  25043. const keyboardMode = computed2(() => {
  25044. return selectionMode.value === "date" ? currentView.value : selectionMode.value;
  25045. });
  25046. const hasShortcuts = computed2(() => !!shortcuts.length);
  25047. const handleMonthPick = async (month2) => {
  25048. innerDate.value = innerDate.value.startOf("month").month(month2);
  25049. if (selectionMode.value === "month") {
  25050. emit(innerDate.value, false);
  25051. } else {
  25052. currentView.value = "date";
  25053. if (["month", "year", "date", "week"].includes(selectionMode.value)) {
  25054. emit(innerDate.value, true);
  25055. await nextTick();
  25056. handleFocusPicker();
  25057. }
  25058. }
  25059. handlePanelChange("month");
  25060. };
  25061. const handleYearPick = async (year2) => {
  25062. if (selectionMode.value === "year") {
  25063. innerDate.value = innerDate.value.startOf("year").year(year2);
  25064. emit(innerDate.value, false);
  25065. } else {
  25066. innerDate.value = innerDate.value.year(year2);
  25067. currentView.value = "month";
  25068. if (["month", "year", "date", "week"].includes(selectionMode.value)) {
  25069. emit(innerDate.value, true);
  25070. await nextTick();
  25071. handleFocusPicker();
  25072. }
  25073. }
  25074. handlePanelChange("year");
  25075. };
  25076. const showPicker = async (view) => {
  25077. currentView.value = view;
  25078. await nextTick();
  25079. handleFocusPicker();
  25080. };
  25081. const showTime = computed2(() => props.type === "datetime" || props.type === "datetimerange");
  25082. const footerVisible = computed2(() => {
  25083. return showTime.value || selectionMode.value === "dates";
  25084. });
  25085. const onConfirm = () => {
  25086. if (selectionMode.value === "dates") {
  25087. emit(props.parsedValue);
  25088. } else {
  25089. let result2 = props.parsedValue;
  25090. if (!result2) {
  25091. const defaultTimeD2 = (0, import_dayjs11.default)(defaultTime).locale(lang.value);
  25092. const defaultValueD = getDefaultValue2();
  25093. result2 = defaultTimeD2.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date());
  25094. }
  25095. innerDate.value = result2;
  25096. emit(result2);
  25097. }
  25098. };
  25099. const changeToNow = () => {
  25100. const now2 = (0, import_dayjs11.default)().locale(lang.value);
  25101. const nowDate = now2.toDate();
  25102. isChangeToNow.value = true;
  25103. if ((!disabledDate2 || !disabledDate2(nowDate)) && checkDateWithinRange(nowDate)) {
  25104. innerDate.value = (0, import_dayjs11.default)().locale(lang.value);
  25105. emit(innerDate.value);
  25106. }
  25107. };
  25108. const timeFormat = computed2(() => {
  25109. return extractTimeFormat(props.format);
  25110. });
  25111. const dateFormat = computed2(() => {
  25112. return extractDateFormat(props.format);
  25113. });
  25114. const visibleTime = computed2(() => {
  25115. if (userInputTime.value)
  25116. return userInputTime.value;
  25117. if (!props.parsedValue && !defaultValue.value)
  25118. return;
  25119. return (props.parsedValue || innerDate.value).format(timeFormat.value);
  25120. });
  25121. const visibleDate = computed2(() => {
  25122. if (userInputDate.value)
  25123. return userInputDate.value;
  25124. if (!props.parsedValue && !defaultValue.value)
  25125. return;
  25126. return (props.parsedValue || innerDate.value).format(dateFormat.value);
  25127. });
  25128. const timePickerVisible = ref(false);
  25129. const onTimePickerInputFocus = () => {
  25130. timePickerVisible.value = true;
  25131. };
  25132. const handleTimePickClose = () => {
  25133. timePickerVisible.value = false;
  25134. };
  25135. const getUnits = (date5) => {
  25136. return {
  25137. hour: date5.hour(),
  25138. minute: date5.minute(),
  25139. second: date5.second(),
  25140. year: date5.year(),
  25141. month: date5.month(),
  25142. date: date5.date()
  25143. };
  25144. };
  25145. const handleTimePick = (value, visible, first) => {
  25146. const { hour, minute, second } = getUnits(value);
  25147. const newDate = props.parsedValue ? props.parsedValue.hour(hour).minute(minute).second(second) : value;
  25148. innerDate.value = newDate;
  25149. emit(innerDate.value, true);
  25150. if (!first) {
  25151. timePickerVisible.value = visible;
  25152. }
  25153. };
  25154. const handleVisibleTimeChange = (value) => {
  25155. const newDate = (0, import_dayjs11.default)(value, timeFormat.value).locale(lang.value);
  25156. if (newDate.isValid() && checkDateWithinRange(newDate)) {
  25157. const { year: year2, month: month2, date: date5 } = getUnits(innerDate.value);
  25158. innerDate.value = newDate.year(year2).month(month2).date(date5);
  25159. userInputTime.value = null;
  25160. timePickerVisible.value = false;
  25161. emit(innerDate.value, true);
  25162. }
  25163. };
  25164. const handleVisibleDateChange = (value) => {
  25165. const newDate = (0, import_dayjs11.default)(value, dateFormat.value).locale(lang.value);
  25166. if (newDate.isValid()) {
  25167. if (disabledDate2 && disabledDate2(newDate.toDate())) {
  25168. return;
  25169. }
  25170. const { hour, minute, second } = getUnits(innerDate.value);
  25171. innerDate.value = newDate.hour(hour).minute(minute).second(second);
  25172. userInputDate.value = null;
  25173. emit(innerDate.value, true);
  25174. }
  25175. };
  25176. const isValidValue3 = (date5) => {
  25177. return import_dayjs11.default.isDayjs(date5) && date5.isValid() && (disabledDate2 ? !disabledDate2(date5.toDate()) : true);
  25178. };
  25179. const formatToString = (value) => {
  25180. if (selectionMode.value === "dates") {
  25181. return value.map((_2) => _2.format(props.format));
  25182. }
  25183. return value.format(props.format);
  25184. };
  25185. const parseUserInput = (value) => {
  25186. return (0, import_dayjs11.default)(value, props.format).locale(lang.value);
  25187. };
  25188. const getDefaultValue2 = () => {
  25189. const parseDate2 = (0, import_dayjs11.default)(defaultValue.value).locale(lang.value);
  25190. if (!defaultValue.value) {
  25191. const defaultTimeDValue = defaultTimeD.value;
  25192. return (0, import_dayjs11.default)().hour(defaultTimeDValue.hour()).minute(defaultTimeDValue.minute()).second(defaultTimeDValue.second()).locale(lang.value);
  25193. }
  25194. return parseDate2;
  25195. };
  25196. const handleFocusPicker = async () => {
  25197. var _a2;
  25198. if (["week", "month", "year", "date"].includes(selectionMode.value)) {
  25199. (_a2 = currentViewRef.value) == null ? void 0 : _a2.focus();
  25200. if (selectionMode.value === "week") {
  25201. handleKeyControl(EVENT_CODE.down);
  25202. }
  25203. }
  25204. };
  25205. const handleKeydownTable = (event) => {
  25206. const { code } = event;
  25207. const validCode = [
  25208. EVENT_CODE.up,
  25209. EVENT_CODE.down,
  25210. EVENT_CODE.left,
  25211. EVENT_CODE.right,
  25212. EVENT_CODE.home,
  25213. EVENT_CODE.end,
  25214. EVENT_CODE.pageUp,
  25215. EVENT_CODE.pageDown
  25216. ];
  25217. if (validCode.includes(code)) {
  25218. handleKeyControl(code);
  25219. event.stopPropagation();
  25220. event.preventDefault();
  25221. }
  25222. if ([EVENT_CODE.enter, EVENT_CODE.space].includes(code) && userInputDate.value === null && userInputTime.value === null) {
  25223. event.preventDefault();
  25224. emit(innerDate.value, false);
  25225. }
  25226. };
  25227. const handleKeyControl = (code) => {
  25228. var _a2;
  25229. const { up: up2, down: down2, left: left2, right: right2, home: home2, end: end2, pageUp: pageUp2, pageDown: pageDown2 } = EVENT_CODE;
  25230. const mapping = {
  25231. year: {
  25232. [up2]: -4,
  25233. [down2]: 4,
  25234. [left2]: -1,
  25235. [right2]: 1,
  25236. offset: (date5, step) => date5.setFullYear(date5.getFullYear() + step)
  25237. },
  25238. month: {
  25239. [up2]: -4,
  25240. [down2]: 4,
  25241. [left2]: -1,
  25242. [right2]: 1,
  25243. offset: (date5, step) => date5.setMonth(date5.getMonth() + step)
  25244. },
  25245. week: {
  25246. [up2]: -1,
  25247. [down2]: 1,
  25248. [left2]: -1,
  25249. [right2]: 1,
  25250. offset: (date5, step) => date5.setDate(date5.getDate() + step * 7)
  25251. },
  25252. date: {
  25253. [up2]: -7,
  25254. [down2]: 7,
  25255. [left2]: -1,
  25256. [right2]: 1,
  25257. [home2]: (date5) => -date5.getDay(),
  25258. [end2]: (date5) => -date5.getDay() + 6,
  25259. [pageUp2]: (date5) => -new Date(date5.getFullYear(), date5.getMonth(), 0).getDate(),
  25260. [pageDown2]: (date5) => new Date(date5.getFullYear(), date5.getMonth() + 1, 0).getDate(),
  25261. offset: (date5, step) => date5.setDate(date5.getDate() + step)
  25262. }
  25263. };
  25264. const newDate = innerDate.value.toDate();
  25265. while (Math.abs(innerDate.value.diff(newDate, "year", true)) < 1) {
  25266. const map2 = mapping[keyboardMode.value];
  25267. if (!map2)
  25268. return;
  25269. map2.offset(newDate, isFunction(map2[code]) ? map2[code](newDate) : (_a2 = map2[code]) != null ? _a2 : 0);
  25270. if (disabledDate2 && disabledDate2(newDate)) {
  25271. break;
  25272. }
  25273. const result2 = (0, import_dayjs11.default)(newDate).locale(lang.value);
  25274. innerDate.value = result2;
  25275. contextEmit("pick", result2, true);
  25276. break;
  25277. }
  25278. };
  25279. const handlePanelChange = (mode) => {
  25280. contextEmit("panel-change", innerDate.value.toDate(), mode, currentView.value);
  25281. };
  25282. watch(() => selectionMode.value, (val) => {
  25283. if (["month", "year"].includes(val)) {
  25284. currentView.value = val;
  25285. return;
  25286. }
  25287. currentView.value = "date";
  25288. }, { immediate: true });
  25289. watch(() => currentView.value, () => {
  25290. popper == null ? void 0 : popper.updatePopper();
  25291. });
  25292. watch(() => defaultValue.value, (val) => {
  25293. if (val) {
  25294. innerDate.value = getDefaultValue2();
  25295. }
  25296. }, { immediate: true });
  25297. watch(() => props.parsedValue, (val) => {
  25298. if (val) {
  25299. if (selectionMode.value === "dates")
  25300. return;
  25301. if (Array.isArray(val))
  25302. return;
  25303. innerDate.value = val;
  25304. } else {
  25305. innerDate.value = getDefaultValue2();
  25306. }
  25307. }, { immediate: true });
  25308. contextEmit("set-picker-option", ["isValidValue", isValidValue3]);
  25309. contextEmit("set-picker-option", ["formatToString", formatToString]);
  25310. contextEmit("set-picker-option", ["parseUserInput", parseUserInput]);
  25311. contextEmit("set-picker-option", ["handleFocusPicker", handleFocusPicker]);
  25312. return (_ctx, _cache) => {
  25313. return openBlock(), createElementBlock("div", {
  25314. class: normalizeClass([
  25315. unref(ppNs).b(),
  25316. unref(dpNs).b(),
  25317. {
  25318. "has-sidebar": _ctx.$slots.sidebar || unref(hasShortcuts),
  25319. "has-time": unref(showTime)
  25320. }
  25321. ])
  25322. }, [
  25323. createBaseVNode("div", {
  25324. class: normalizeClass(unref(ppNs).e("body-wrapper"))
  25325. }, [
  25326. renderSlot(_ctx.$slots, "sidebar", {
  25327. class: normalizeClass(unref(ppNs).e("sidebar"))
  25328. }),
  25329. unref(hasShortcuts) ? (openBlock(), createElementBlock("div", {
  25330. key: 0,
  25331. class: normalizeClass(unref(ppNs).e("sidebar"))
  25332. }, [
  25333. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  25334. return openBlock(), createElementBlock("button", {
  25335. key,
  25336. type: "button",
  25337. class: normalizeClass(unref(ppNs).e("shortcut")),
  25338. onClick: ($event) => handleShortcutClick(shortcut)
  25339. }, toDisplayString(shortcut.text), 11, _hoisted_126);
  25340. }), 128))
  25341. ], 2)) : createCommentVNode("v-if", true),
  25342. createBaseVNode("div", {
  25343. class: normalizeClass(unref(ppNs).e("body"))
  25344. }, [
  25345. unref(showTime) ? (openBlock(), createElementBlock("div", {
  25346. key: 0,
  25347. class: normalizeClass(unref(dpNs).e("time-header"))
  25348. }, [
  25349. createBaseVNode("span", {
  25350. class: normalizeClass(unref(dpNs).e("editor-wrap"))
  25351. }, [
  25352. createVNode(unref(ElInput), {
  25353. placeholder: unref(t)("el.datepicker.selectDate"),
  25354. "model-value": unref(visibleDate),
  25355. size: "small",
  25356. "validate-event": false,
  25357. onInput: _cache[0] || (_cache[0] = (val) => userInputDate.value = val),
  25358. onChange: handleVisibleDateChange
  25359. }, null, 8, ["placeholder", "model-value"])
  25360. ], 2),
  25361. withDirectives((openBlock(), createElementBlock("span", {
  25362. class: normalizeClass(unref(dpNs).e("editor-wrap"))
  25363. }, [
  25364. createVNode(unref(ElInput), {
  25365. placeholder: unref(t)("el.datepicker.selectTime"),
  25366. "model-value": unref(visibleTime),
  25367. size: "small",
  25368. "validate-event": false,
  25369. onFocus: onTimePickerInputFocus,
  25370. onInput: _cache[1] || (_cache[1] = (val) => userInputTime.value = val),
  25371. onChange: handleVisibleTimeChange
  25372. }, null, 8, ["placeholder", "model-value"]),
  25373. createVNode(unref(TimePickPanel), {
  25374. visible: timePickerVisible.value,
  25375. format: unref(timeFormat),
  25376. "time-arrow-control": unref(arrowControl),
  25377. "parsed-value": innerDate.value,
  25378. onPick: handleTimePick
  25379. }, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"])
  25380. ], 2)), [
  25381. [unref(ClickOutside), handleTimePickClose]
  25382. ])
  25383. ], 2)) : createCommentVNode("v-if", true),
  25384. withDirectives(createBaseVNode("div", {
  25385. class: normalizeClass([
  25386. unref(dpNs).e("header"),
  25387. (currentView.value === "year" || currentView.value === "month") && unref(dpNs).e("header--bordered")
  25388. ])
  25389. }, [
  25390. createBaseVNode("span", {
  25391. class: normalizeClass(unref(dpNs).e("prev-btn"))
  25392. }, [
  25393. createBaseVNode("button", {
  25394. type: "button",
  25395. "aria-label": unref(t)(`el.datepicker.prevYear`),
  25396. class: normalizeClass(["d-arrow-left", unref(ppNs).e("icon-btn")]),
  25397. onClick: _cache[2] || (_cache[2] = ($event) => moveByYear(false))
  25398. }, [
  25399. createVNode(unref(ElIcon), null, {
  25400. default: withCtx(() => [
  25401. createVNode(unref(d_arrow_left_default))
  25402. ]),
  25403. _: 1
  25404. })
  25405. ], 10, _hoisted_217),
  25406. withDirectives(createBaseVNode("button", {
  25407. type: "button",
  25408. "aria-label": unref(t)(`el.datepicker.prevMonth`),
  25409. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
  25410. onClick: _cache[3] || (_cache[3] = ($event) => moveByMonth(false))
  25411. }, [
  25412. createVNode(unref(ElIcon), null, {
  25413. default: withCtx(() => [
  25414. createVNode(unref(arrow_left_default))
  25415. ]),
  25416. _: 1
  25417. })
  25418. ], 10, _hoisted_39), [
  25419. [vShow, currentView.value === "date"]
  25420. ])
  25421. ], 2),
  25422. createBaseVNode("span", {
  25423. role: "button",
  25424. class: normalizeClass(unref(dpNs).e("header-label")),
  25425. "aria-live": "polite",
  25426. tabindex: "0",
  25427. onKeydown: _cache[4] || (_cache[4] = withKeys(($event) => showPicker("year"), ["enter"])),
  25428. onClick: _cache[5] || (_cache[5] = ($event) => showPicker("year"))
  25429. }, toDisplayString(unref(yearLabel)), 35),
  25430. withDirectives(createBaseVNode("span", {
  25431. role: "button",
  25432. "aria-live": "polite",
  25433. tabindex: "0",
  25434. class: normalizeClass([
  25435. unref(dpNs).e("header-label"),
  25436. { active: currentView.value === "month" }
  25437. ]),
  25438. onKeydown: _cache[6] || (_cache[6] = withKeys(($event) => showPicker("month"), ["enter"])),
  25439. onClick: _cache[7] || (_cache[7] = ($event) => showPicker("month"))
  25440. }, toDisplayString(unref(t)(`el.datepicker.month${unref(month) + 1}`)), 35), [
  25441. [vShow, currentView.value === "date"]
  25442. ]),
  25443. createBaseVNode("span", {
  25444. class: normalizeClass(unref(dpNs).e("next-btn"))
  25445. }, [
  25446. withDirectives(createBaseVNode("button", {
  25447. type: "button",
  25448. "aria-label": unref(t)(`el.datepicker.nextMonth`),
  25449. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
  25450. onClick: _cache[8] || (_cache[8] = ($event) => moveByMonth(true))
  25451. }, [
  25452. createVNode(unref(ElIcon), null, {
  25453. default: withCtx(() => [
  25454. createVNode(unref(arrow_right_default))
  25455. ]),
  25456. _: 1
  25457. })
  25458. ], 10, _hoisted_43), [
  25459. [vShow, currentView.value === "date"]
  25460. ]),
  25461. createBaseVNode("button", {
  25462. type: "button",
  25463. "aria-label": unref(t)(`el.datepicker.nextYear`),
  25464. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  25465. onClick: _cache[9] || (_cache[9] = ($event) => moveByYear(true))
  25466. }, [
  25467. createVNode(unref(ElIcon), null, {
  25468. default: withCtx(() => [
  25469. createVNode(unref(d_arrow_right_default))
  25470. ]),
  25471. _: 1
  25472. })
  25473. ], 10, _hoisted_5)
  25474. ], 2)
  25475. ], 2), [
  25476. [vShow, currentView.value !== "time"]
  25477. ]),
  25478. createBaseVNode("div", {
  25479. class: normalizeClass(unref(ppNs).e("content")),
  25480. onKeydown: handleKeydownTable
  25481. }, [
  25482. currentView.value === "date" ? (openBlock(), createBlock(DateTable2, {
  25483. key: 0,
  25484. ref_key: "currentViewRef",
  25485. ref: currentViewRef,
  25486. "selection-mode": unref(selectionMode),
  25487. date: innerDate.value,
  25488. "parsed-value": _ctx.parsedValue,
  25489. "disabled-date": unref(disabledDate2),
  25490. "cell-class-name": unref(cellClassName),
  25491. onPick: handleDatePick
  25492. }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "cell-class-name"])) : createCommentVNode("v-if", true),
  25493. currentView.value === "year" ? (openBlock(), createBlock(YearTable, {
  25494. key: 1,
  25495. ref_key: "currentViewRef",
  25496. ref: currentViewRef,
  25497. date: innerDate.value,
  25498. "disabled-date": unref(disabledDate2),
  25499. "parsed-value": _ctx.parsedValue,
  25500. onPick: handleYearPick
  25501. }, null, 8, ["date", "disabled-date", "parsed-value"])) : createCommentVNode("v-if", true),
  25502. currentView.value === "month" ? (openBlock(), createBlock(MonthTable, {
  25503. key: 2,
  25504. ref_key: "currentViewRef",
  25505. ref: currentViewRef,
  25506. date: innerDate.value,
  25507. "parsed-value": _ctx.parsedValue,
  25508. "disabled-date": unref(disabledDate2),
  25509. onPick: handleMonthPick
  25510. }, null, 8, ["date", "parsed-value", "disabled-date"])) : createCommentVNode("v-if", true)
  25511. ], 34)
  25512. ], 2)
  25513. ], 2),
  25514. withDirectives(createBaseVNode("div", {
  25515. class: normalizeClass(unref(ppNs).e("footer"))
  25516. }, [
  25517. withDirectives(createVNode(unref(ElButton), {
  25518. text: "",
  25519. size: "small",
  25520. class: normalizeClass(unref(ppNs).e("link-btn")),
  25521. onClick: changeToNow
  25522. }, {
  25523. default: withCtx(() => [
  25524. createTextVNode(toDisplayString(unref(t)("el.datepicker.now")), 1)
  25525. ]),
  25526. _: 1
  25527. }, 8, ["class"]), [
  25528. [vShow, unref(selectionMode) !== "dates"]
  25529. ]),
  25530. createVNode(unref(ElButton), {
  25531. plain: "",
  25532. size: "small",
  25533. class: normalizeClass(unref(ppNs).e("link-btn")),
  25534. onClick: onConfirm
  25535. }, {
  25536. default: withCtx(() => [
  25537. createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)
  25538. ]),
  25539. _: 1
  25540. }, 8, ["class"])
  25541. ], 2), [
  25542. [vShow, unref(footerVisible) && currentView.value === "date"]
  25543. ])
  25544. ], 2);
  25545. };
  25546. }
  25547. });
  25548. var DatePickPanel = _export_sfc(_sfc_main62, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/panel-date-pick.vue"]]);
  25549. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-date-range.mjs
  25550. var import_dayjs13 = __toESM(require_dayjs_min(), 1);
  25551. // node_modules/element-plus/es/components/date-picker/src/props/panel-date-range.mjs
  25552. var panelDateRangeProps = buildProps({
  25553. ...panelSharedProps,
  25554. ...panelRangeSharedProps
  25555. });
  25556. // node_modules/element-plus/es/components/date-picker/src/composables/use-shortcut.mjs
  25557. var import_dayjs12 = __toESM(require_dayjs_min(), 1);
  25558. var useShortcut = (lang) => {
  25559. const { emit } = getCurrentInstance();
  25560. const attrs = useAttrs();
  25561. const slots = useSlots();
  25562. const handleShortcutClick = (shortcut) => {
  25563. const shortcutValues = isFunction(shortcut.value) ? shortcut.value() : shortcut.value;
  25564. if (shortcutValues) {
  25565. emit("pick", [
  25566. (0, import_dayjs12.default)(shortcutValues[0]).locale(lang.value),
  25567. (0, import_dayjs12.default)(shortcutValues[1]).locale(lang.value)
  25568. ]);
  25569. return;
  25570. }
  25571. if (shortcut.onClick) {
  25572. shortcut.onClick({
  25573. attrs,
  25574. slots,
  25575. emit
  25576. });
  25577. }
  25578. };
  25579. return handleShortcutClick;
  25580. };
  25581. // node_modules/element-plus/es/components/date-picker/src/composables/use-range-picker.mjs
  25582. var useRangePicker = (props, {
  25583. defaultValue,
  25584. leftDate,
  25585. rightDate,
  25586. unit: unit3,
  25587. onParsedValueChanged
  25588. }) => {
  25589. const { emit } = getCurrentInstance();
  25590. const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY);
  25591. const drpNs = useNamespace("date-range-picker");
  25592. const { t, lang } = useLocale();
  25593. const handleShortcutClick = useShortcut(lang);
  25594. const minDate = ref();
  25595. const maxDate = ref();
  25596. const rangeState = ref({
  25597. endDate: null,
  25598. selecting: false
  25599. });
  25600. const handleChangeRange = (val) => {
  25601. rangeState.value = val;
  25602. };
  25603. const handleRangeConfirm = (visible = false) => {
  25604. const _minDate = unref(minDate);
  25605. const _maxDate = unref(maxDate);
  25606. if (isValidRange2([_minDate, _maxDate])) {
  25607. emit("pick", [_minDate, _maxDate], visible);
  25608. }
  25609. };
  25610. const onSelect = (selecting) => {
  25611. rangeState.value.selecting = selecting;
  25612. if (!selecting) {
  25613. rangeState.value.endDate = null;
  25614. }
  25615. };
  25616. const restoreDefault = () => {
  25617. const [start, end2] = getDefaultValue(unref(defaultValue), {
  25618. lang: unref(lang),
  25619. unit: unit3,
  25620. unlinkPanels: props.unlinkPanels
  25621. });
  25622. minDate.value = void 0;
  25623. maxDate.value = void 0;
  25624. leftDate.value = start;
  25625. rightDate.value = end2;
  25626. };
  25627. watch(defaultValue, (val) => {
  25628. if (val) {
  25629. restoreDefault();
  25630. }
  25631. }, { immediate: true });
  25632. watch(() => props.parsedValue, (parsedValue2) => {
  25633. if (isArray(parsedValue2) && parsedValue2.length === 2) {
  25634. const [start, end2] = parsedValue2;
  25635. minDate.value = start;
  25636. leftDate.value = start;
  25637. maxDate.value = end2;
  25638. onParsedValueChanged(unref(minDate), unref(maxDate));
  25639. } else {
  25640. restoreDefault();
  25641. }
  25642. }, { immediate: true });
  25643. return {
  25644. minDate,
  25645. maxDate,
  25646. rangeState,
  25647. lang,
  25648. ppNs: pickerNs,
  25649. drpNs,
  25650. handleChangeRange,
  25651. handleRangeConfirm,
  25652. handleShortcutClick,
  25653. onSelect,
  25654. t
  25655. };
  25656. };
  25657. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-date-range.mjs
  25658. var _hoisted_127 = ["onClick"];
  25659. var _hoisted_218 = ["disabled"];
  25660. var _hoisted_310 = ["disabled"];
  25661. var _hoisted_44 = ["disabled"];
  25662. var _hoisted_52 = ["disabled"];
  25663. var unit = "month";
  25664. var _sfc_main63 = defineComponent({
  25665. __name: "panel-date-range",
  25666. props: panelDateRangeProps,
  25667. emits: [
  25668. "pick",
  25669. "set-picker-option",
  25670. "calendar-change",
  25671. "panel-change"
  25672. ],
  25673. setup(__props, { emit }) {
  25674. const props = __props;
  25675. const pickerBase = inject("EP_PICKER_BASE");
  25676. const {
  25677. disabledDate: disabledDate2,
  25678. cellClassName,
  25679. format: format2,
  25680. defaultTime,
  25681. arrowControl,
  25682. clearable
  25683. } = pickerBase.props;
  25684. const shortcuts = toRef(pickerBase.props, "shortcuts");
  25685. const defaultValue = toRef(pickerBase.props, "defaultValue");
  25686. const { lang } = useLocale();
  25687. const leftDate = ref((0, import_dayjs13.default)().locale(lang.value));
  25688. const rightDate = ref((0, import_dayjs13.default)().locale(lang.value).add(1, unit));
  25689. const {
  25690. minDate,
  25691. maxDate,
  25692. rangeState,
  25693. ppNs,
  25694. drpNs,
  25695. handleChangeRange,
  25696. handleRangeConfirm,
  25697. handleShortcutClick,
  25698. onSelect,
  25699. t
  25700. } = useRangePicker(props, {
  25701. defaultValue,
  25702. leftDate,
  25703. rightDate,
  25704. unit,
  25705. onParsedValueChanged
  25706. });
  25707. const dateUserInput = ref({
  25708. min: null,
  25709. max: null
  25710. });
  25711. const timeUserInput = ref({
  25712. min: null,
  25713. max: null
  25714. });
  25715. const leftLabel = computed2(() => {
  25716. return `${leftDate.value.year()} ${t("el.datepicker.year")} ${t(`el.datepicker.month${leftDate.value.month() + 1}`)}`;
  25717. });
  25718. const rightLabel = computed2(() => {
  25719. return `${rightDate.value.year()} ${t("el.datepicker.year")} ${t(`el.datepicker.month${rightDate.value.month() + 1}`)}`;
  25720. });
  25721. const leftYear = computed2(() => {
  25722. return leftDate.value.year();
  25723. });
  25724. const leftMonth = computed2(() => {
  25725. return leftDate.value.month();
  25726. });
  25727. const rightYear = computed2(() => {
  25728. return rightDate.value.year();
  25729. });
  25730. const rightMonth = computed2(() => {
  25731. return rightDate.value.month();
  25732. });
  25733. const hasShortcuts = computed2(() => !!shortcuts.value.length);
  25734. const minVisibleDate = computed2(() => {
  25735. if (dateUserInput.value.min !== null)
  25736. return dateUserInput.value.min;
  25737. if (minDate.value)
  25738. return minDate.value.format(dateFormat.value);
  25739. return "";
  25740. });
  25741. const maxVisibleDate = computed2(() => {
  25742. if (dateUserInput.value.max !== null)
  25743. return dateUserInput.value.max;
  25744. if (maxDate.value || minDate.value)
  25745. return (maxDate.value || minDate.value).format(dateFormat.value);
  25746. return "";
  25747. });
  25748. const minVisibleTime = computed2(() => {
  25749. if (timeUserInput.value.min !== null)
  25750. return timeUserInput.value.min;
  25751. if (minDate.value)
  25752. return minDate.value.format(timeFormat.value);
  25753. return "";
  25754. });
  25755. const maxVisibleTime = computed2(() => {
  25756. if (timeUserInput.value.max !== null)
  25757. return timeUserInput.value.max;
  25758. if (maxDate.value || minDate.value)
  25759. return (maxDate.value || minDate.value).format(timeFormat.value);
  25760. return "";
  25761. });
  25762. const timeFormat = computed2(() => {
  25763. return extractTimeFormat(format2);
  25764. });
  25765. const dateFormat = computed2(() => {
  25766. return extractDateFormat(format2);
  25767. });
  25768. const leftPrevYear = () => {
  25769. leftDate.value = leftDate.value.subtract(1, "year");
  25770. if (!props.unlinkPanels) {
  25771. rightDate.value = leftDate.value.add(1, "month");
  25772. }
  25773. handlePanelChange("year");
  25774. };
  25775. const leftPrevMonth = () => {
  25776. leftDate.value = leftDate.value.subtract(1, "month");
  25777. if (!props.unlinkPanels) {
  25778. rightDate.value = leftDate.value.add(1, "month");
  25779. }
  25780. handlePanelChange("month");
  25781. };
  25782. const rightNextYear = () => {
  25783. if (!props.unlinkPanels) {
  25784. leftDate.value = leftDate.value.add(1, "year");
  25785. rightDate.value = leftDate.value.add(1, "month");
  25786. } else {
  25787. rightDate.value = rightDate.value.add(1, "year");
  25788. }
  25789. handlePanelChange("year");
  25790. };
  25791. const rightNextMonth = () => {
  25792. if (!props.unlinkPanels) {
  25793. leftDate.value = leftDate.value.add(1, "month");
  25794. rightDate.value = leftDate.value.add(1, "month");
  25795. } else {
  25796. rightDate.value = rightDate.value.add(1, "month");
  25797. }
  25798. handlePanelChange("month");
  25799. };
  25800. const leftNextYear = () => {
  25801. leftDate.value = leftDate.value.add(1, "year");
  25802. handlePanelChange("year");
  25803. };
  25804. const leftNextMonth = () => {
  25805. leftDate.value = leftDate.value.add(1, "month");
  25806. handlePanelChange("month");
  25807. };
  25808. const rightPrevYear = () => {
  25809. rightDate.value = rightDate.value.subtract(1, "year");
  25810. handlePanelChange("year");
  25811. };
  25812. const rightPrevMonth = () => {
  25813. rightDate.value = rightDate.value.subtract(1, "month");
  25814. handlePanelChange("month");
  25815. };
  25816. const handlePanelChange = (mode) => {
  25817. emit("panel-change", [leftDate.value.toDate(), rightDate.value.toDate()], mode);
  25818. };
  25819. const enableMonthArrow = computed2(() => {
  25820. const nextMonth = (leftMonth.value + 1) % 12;
  25821. const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0;
  25822. return props.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value);
  25823. });
  25824. const enableYearArrow = computed2(() => {
  25825. return props.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12;
  25826. });
  25827. const btnDisabled = computed2(() => {
  25828. return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidRange2([minDate.value, maxDate.value]));
  25829. });
  25830. const showTime = computed2(() => props.type === "datetime" || props.type === "datetimerange");
  25831. const formatEmit = (emitDayjs, index) => {
  25832. if (!emitDayjs)
  25833. return;
  25834. if (defaultTime) {
  25835. const defaultTimeD = (0, import_dayjs13.default)(defaultTime[index] || defaultTime).locale(lang.value);
  25836. return defaultTimeD.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
  25837. }
  25838. return emitDayjs;
  25839. };
  25840. const handleRangePick = (val, close2 = true) => {
  25841. const min_ = val.minDate;
  25842. const max_ = val.maxDate;
  25843. const minDate_ = formatEmit(min_, 0);
  25844. const maxDate_ = formatEmit(max_, 1);
  25845. if (maxDate.value === maxDate_ && minDate.value === minDate_) {
  25846. return;
  25847. }
  25848. emit("calendar-change", [min_.toDate(), max_ && max_.toDate()]);
  25849. maxDate.value = maxDate_;
  25850. minDate.value = minDate_;
  25851. if (!close2 || showTime.value)
  25852. return;
  25853. handleRangeConfirm();
  25854. };
  25855. const minTimePickerVisible = ref(false);
  25856. const maxTimePickerVisible = ref(false);
  25857. const handleMinTimeClose = () => {
  25858. minTimePickerVisible.value = false;
  25859. };
  25860. const handleMaxTimeClose = () => {
  25861. maxTimePickerVisible.value = false;
  25862. };
  25863. const handleDateInput = (value, type4) => {
  25864. dateUserInput.value[type4] = value;
  25865. const parsedValueD = (0, import_dayjs13.default)(value, dateFormat.value).locale(lang.value);
  25866. if (parsedValueD.isValid()) {
  25867. if (disabledDate2 && disabledDate2(parsedValueD.toDate())) {
  25868. return;
  25869. }
  25870. if (type4 === "min") {
  25871. leftDate.value = parsedValueD;
  25872. minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
  25873. if (!props.unlinkPanels) {
  25874. rightDate.value = parsedValueD.add(1, "month");
  25875. maxDate.value = minDate.value.add(1, "month");
  25876. }
  25877. } else {
  25878. rightDate.value = parsedValueD;
  25879. maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
  25880. if (!props.unlinkPanels) {
  25881. leftDate.value = parsedValueD.subtract(1, "month");
  25882. minDate.value = maxDate.value.subtract(1, "month");
  25883. }
  25884. }
  25885. }
  25886. };
  25887. const handleDateChange = (_2, type4) => {
  25888. dateUserInput.value[type4] = null;
  25889. };
  25890. const handleTimeInput = (value, type4) => {
  25891. timeUserInput.value[type4] = value;
  25892. const parsedValueD = (0, import_dayjs13.default)(value, timeFormat.value).locale(lang.value);
  25893. if (parsedValueD.isValid()) {
  25894. if (type4 === "min") {
  25895. minTimePickerVisible.value = true;
  25896. minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
  25897. if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {
  25898. maxDate.value = minDate.value;
  25899. }
  25900. } else {
  25901. maxTimePickerVisible.value = true;
  25902. maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
  25903. rightDate.value = maxDate.value;
  25904. if (maxDate.value && maxDate.value.isBefore(minDate.value)) {
  25905. minDate.value = maxDate.value;
  25906. }
  25907. }
  25908. }
  25909. };
  25910. const handleTimeChange = (value, type4) => {
  25911. timeUserInput.value[type4] = null;
  25912. if (type4 === "min") {
  25913. leftDate.value = minDate.value;
  25914. minTimePickerVisible.value = false;
  25915. } else {
  25916. rightDate.value = maxDate.value;
  25917. maxTimePickerVisible.value = false;
  25918. }
  25919. };
  25920. const handleMinTimePick = (value, visible, first) => {
  25921. if (timeUserInput.value.min)
  25922. return;
  25923. if (value) {
  25924. leftDate.value = value;
  25925. minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
  25926. }
  25927. if (!first) {
  25928. minTimePickerVisible.value = visible;
  25929. }
  25930. if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {
  25931. maxDate.value = minDate.value;
  25932. rightDate.value = value;
  25933. }
  25934. };
  25935. const handleMaxTimePick = (value, visible, first) => {
  25936. if (timeUserInput.value.max)
  25937. return;
  25938. if (value) {
  25939. rightDate.value = value;
  25940. maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
  25941. }
  25942. if (!first) {
  25943. maxTimePickerVisible.value = visible;
  25944. }
  25945. if (maxDate.value && maxDate.value.isBefore(minDate.value)) {
  25946. minDate.value = maxDate.value;
  25947. }
  25948. };
  25949. const handleClear = () => {
  25950. leftDate.value = getDefaultValue(unref(defaultValue), {
  25951. lang: unref(lang),
  25952. unit: "month",
  25953. unlinkPanels: props.unlinkPanels
  25954. })[0];
  25955. rightDate.value = leftDate.value.add(1, "month");
  25956. emit("pick", null);
  25957. };
  25958. const formatToString = (value) => {
  25959. return isArray(value) ? value.map((_2) => _2.format(format2)) : value.format(format2);
  25960. };
  25961. const parseUserInput = (value) => {
  25962. return isArray(value) ? value.map((_2) => (0, import_dayjs13.default)(_2, format2).locale(lang.value)) : (0, import_dayjs13.default)(value, format2).locale(lang.value);
  25963. };
  25964. function onParsedValueChanged(minDate2, maxDate2) {
  25965. if (props.unlinkPanels && maxDate2) {
  25966. const minDateYear = (minDate2 == null ? void 0 : minDate2.year()) || 0;
  25967. const minDateMonth = (minDate2 == null ? void 0 : minDate2.month()) || 0;
  25968. const maxDateYear = maxDate2.year();
  25969. const maxDateMonth = maxDate2.month();
  25970. rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate2.add(1, unit) : maxDate2;
  25971. } else {
  25972. rightDate.value = leftDate.value.add(1, unit);
  25973. if (maxDate2) {
  25974. rightDate.value = rightDate.value.hour(maxDate2.hour()).minute(maxDate2.minute()).second(maxDate2.second());
  25975. }
  25976. }
  25977. }
  25978. emit("set-picker-option", ["isValidValue", isValidRange2]);
  25979. emit("set-picker-option", ["parseUserInput", parseUserInput]);
  25980. emit("set-picker-option", ["formatToString", formatToString]);
  25981. emit("set-picker-option", ["handleClear", handleClear]);
  25982. return (_ctx, _cache) => {
  25983. return openBlock(), createElementBlock("div", {
  25984. class: normalizeClass([
  25985. unref(ppNs).b(),
  25986. unref(drpNs).b(),
  25987. {
  25988. "has-sidebar": _ctx.$slots.sidebar || unref(hasShortcuts),
  25989. "has-time": unref(showTime)
  25990. }
  25991. ])
  25992. }, [
  25993. createBaseVNode("div", {
  25994. class: normalizeClass(unref(ppNs).e("body-wrapper"))
  25995. }, [
  25996. renderSlot(_ctx.$slots, "sidebar", {
  25997. class: normalizeClass(unref(ppNs).e("sidebar"))
  25998. }),
  25999. unref(hasShortcuts) ? (openBlock(), createElementBlock("div", {
  26000. key: 0,
  26001. class: normalizeClass(unref(ppNs).e("sidebar"))
  26002. }, [
  26003. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  26004. return openBlock(), createElementBlock("button", {
  26005. key,
  26006. type: "button",
  26007. class: normalizeClass(unref(ppNs).e("shortcut")),
  26008. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  26009. }, toDisplayString(shortcut.text), 11, _hoisted_127);
  26010. }), 128))
  26011. ], 2)) : createCommentVNode("v-if", true),
  26012. createBaseVNode("div", {
  26013. class: normalizeClass(unref(ppNs).e("body"))
  26014. }, [
  26015. unref(showTime) ? (openBlock(), createElementBlock("div", {
  26016. key: 0,
  26017. class: normalizeClass(unref(drpNs).e("time-header"))
  26018. }, [
  26019. createBaseVNode("span", {
  26020. class: normalizeClass(unref(drpNs).e("editors-wrap"))
  26021. }, [
  26022. createBaseVNode("span", {
  26023. class: normalizeClass(unref(drpNs).e("time-picker-wrap"))
  26024. }, [
  26025. createVNode(unref(ElInput), {
  26026. size: "small",
  26027. disabled: unref(rangeState).selecting,
  26028. placeholder: unref(t)("el.datepicker.startDate"),
  26029. class: normalizeClass(unref(drpNs).e("editor")),
  26030. "model-value": unref(minVisibleDate),
  26031. "validate-event": false,
  26032. onInput: _cache[0] || (_cache[0] = (val) => handleDateInput(val, "min")),
  26033. onChange: _cache[1] || (_cache[1] = (val) => handleDateChange(val, "min"))
  26034. }, null, 8, ["disabled", "placeholder", "class", "model-value"])
  26035. ], 2),
  26036. withDirectives((openBlock(), createElementBlock("span", {
  26037. class: normalizeClass(unref(drpNs).e("time-picker-wrap"))
  26038. }, [
  26039. createVNode(unref(ElInput), {
  26040. size: "small",
  26041. class: normalizeClass(unref(drpNs).e("editor")),
  26042. disabled: unref(rangeState).selecting,
  26043. placeholder: unref(t)("el.datepicker.startTime"),
  26044. "model-value": unref(minVisibleTime),
  26045. "validate-event": false,
  26046. onFocus: _cache[2] || (_cache[2] = ($event) => minTimePickerVisible.value = true),
  26047. onInput: _cache[3] || (_cache[3] = (val) => handleTimeInput(val, "min")),
  26048. onChange: _cache[4] || (_cache[4] = (val) => handleTimeChange(val, "min"))
  26049. }, null, 8, ["class", "disabled", "placeholder", "model-value"]),
  26050. createVNode(unref(TimePickPanel), {
  26051. visible: minTimePickerVisible.value,
  26052. format: unref(timeFormat),
  26053. "datetime-role": "start",
  26054. "time-arrow-control": unref(arrowControl),
  26055. "parsed-value": leftDate.value,
  26056. onPick: handleMinTimePick
  26057. }, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"])
  26058. ], 2)), [
  26059. [unref(ClickOutside), handleMinTimeClose]
  26060. ])
  26061. ], 2),
  26062. createBaseVNode("span", null, [
  26063. createVNode(unref(ElIcon), null, {
  26064. default: withCtx(() => [
  26065. createVNode(unref(arrow_right_default))
  26066. ]),
  26067. _: 1
  26068. })
  26069. ]),
  26070. createBaseVNode("span", {
  26071. class: normalizeClass([unref(drpNs).e("editors-wrap"), "is-right"])
  26072. }, [
  26073. createBaseVNode("span", {
  26074. class: normalizeClass(unref(drpNs).e("time-picker-wrap"))
  26075. }, [
  26076. createVNode(unref(ElInput), {
  26077. size: "small",
  26078. class: normalizeClass(unref(drpNs).e("editor")),
  26079. disabled: unref(rangeState).selecting,
  26080. placeholder: unref(t)("el.datepicker.endDate"),
  26081. "model-value": unref(maxVisibleDate),
  26082. readonly: !unref(minDate),
  26083. "validate-event": false,
  26084. onInput: _cache[5] || (_cache[5] = (val) => handleDateInput(val, "max")),
  26085. onChange: _cache[6] || (_cache[6] = (val) => handleDateChange(val, "max"))
  26086. }, null, 8, ["class", "disabled", "placeholder", "model-value", "readonly"])
  26087. ], 2),
  26088. withDirectives((openBlock(), createElementBlock("span", {
  26089. class: normalizeClass(unref(drpNs).e("time-picker-wrap"))
  26090. }, [
  26091. createVNode(unref(ElInput), {
  26092. size: "small",
  26093. class: normalizeClass(unref(drpNs).e("editor")),
  26094. disabled: unref(rangeState).selecting,
  26095. placeholder: unref(t)("el.datepicker.endTime"),
  26096. "model-value": unref(maxVisibleTime),
  26097. readonly: !unref(minDate),
  26098. "validate-event": false,
  26099. onFocus: _cache[7] || (_cache[7] = ($event) => unref(minDate) && (maxTimePickerVisible.value = true)),
  26100. onInput: _cache[8] || (_cache[8] = (val) => handleTimeInput(val, "max")),
  26101. onChange: _cache[9] || (_cache[9] = (val) => handleTimeChange(val, "max"))
  26102. }, null, 8, ["class", "disabled", "placeholder", "model-value", "readonly"]),
  26103. createVNode(unref(TimePickPanel), {
  26104. "datetime-role": "end",
  26105. visible: maxTimePickerVisible.value,
  26106. format: unref(timeFormat),
  26107. "time-arrow-control": unref(arrowControl),
  26108. "parsed-value": rightDate.value,
  26109. onPick: handleMaxTimePick
  26110. }, null, 8, ["visible", "format", "time-arrow-control", "parsed-value"])
  26111. ], 2)), [
  26112. [unref(ClickOutside), handleMaxTimeClose]
  26113. ])
  26114. ], 2)
  26115. ], 2)) : createCommentVNode("v-if", true),
  26116. createBaseVNode("div", {
  26117. class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"])
  26118. }, [
  26119. createBaseVNode("div", {
  26120. class: normalizeClass(unref(drpNs).e("header"))
  26121. }, [
  26122. createBaseVNode("button", {
  26123. type: "button",
  26124. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
  26125. onClick: leftPrevYear
  26126. }, [
  26127. createVNode(unref(ElIcon), null, {
  26128. default: withCtx(() => [
  26129. createVNode(unref(d_arrow_left_default))
  26130. ]),
  26131. _: 1
  26132. })
  26133. ], 2),
  26134. createBaseVNode("button", {
  26135. type: "button",
  26136. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
  26137. onClick: leftPrevMonth
  26138. }, [
  26139. createVNode(unref(ElIcon), null, {
  26140. default: withCtx(() => [
  26141. createVNode(unref(arrow_left_default))
  26142. ]),
  26143. _: 1
  26144. })
  26145. ], 2),
  26146. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  26147. key: 0,
  26148. type: "button",
  26149. disabled: !unref(enableYearArrow),
  26150. class: normalizeClass([[unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableYearArrow) }], "d-arrow-right"]),
  26151. onClick: leftNextYear
  26152. }, [
  26153. createVNode(unref(ElIcon), null, {
  26154. default: withCtx(() => [
  26155. createVNode(unref(d_arrow_right_default))
  26156. ]),
  26157. _: 1
  26158. })
  26159. ], 10, _hoisted_218)) : createCommentVNode("v-if", true),
  26160. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  26161. key: 1,
  26162. type: "button",
  26163. disabled: !unref(enableMonthArrow),
  26164. class: normalizeClass([[
  26165. unref(ppNs).e("icon-btn"),
  26166. { "is-disabled": !unref(enableMonthArrow) }
  26167. ], "arrow-right"]),
  26168. onClick: leftNextMonth
  26169. }, [
  26170. createVNode(unref(ElIcon), null, {
  26171. default: withCtx(() => [
  26172. createVNode(unref(arrow_right_default))
  26173. ]),
  26174. _: 1
  26175. })
  26176. ], 10, _hoisted_310)) : createCommentVNode("v-if", true),
  26177. createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
  26178. ], 2),
  26179. createVNode(DateTable2, {
  26180. "selection-mode": "range",
  26181. date: leftDate.value,
  26182. "min-date": unref(minDate),
  26183. "max-date": unref(maxDate),
  26184. "range-state": unref(rangeState),
  26185. "disabled-date": unref(disabledDate2),
  26186. "cell-class-name": unref(cellClassName),
  26187. onChangerange: unref(handleChangeRange),
  26188. onPick: handleRangePick,
  26189. onSelect: unref(onSelect)
  26190. }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "cell-class-name", "onChangerange", "onSelect"])
  26191. ], 2),
  26192. createBaseVNode("div", {
  26193. class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"])
  26194. }, [
  26195. createBaseVNode("div", {
  26196. class: normalizeClass(unref(drpNs).e("header"))
  26197. }, [
  26198. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  26199. key: 0,
  26200. type: "button",
  26201. disabled: !unref(enableYearArrow),
  26202. class: normalizeClass([[unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableYearArrow) }], "d-arrow-left"]),
  26203. onClick: rightPrevYear
  26204. }, [
  26205. createVNode(unref(ElIcon), null, {
  26206. default: withCtx(() => [
  26207. createVNode(unref(d_arrow_left_default))
  26208. ]),
  26209. _: 1
  26210. })
  26211. ], 10, _hoisted_44)) : createCommentVNode("v-if", true),
  26212. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  26213. key: 1,
  26214. type: "button",
  26215. disabled: !unref(enableMonthArrow),
  26216. class: normalizeClass([[
  26217. unref(ppNs).e("icon-btn"),
  26218. { "is-disabled": !unref(enableMonthArrow) }
  26219. ], "arrow-left"]),
  26220. onClick: rightPrevMonth
  26221. }, [
  26222. createVNode(unref(ElIcon), null, {
  26223. default: withCtx(() => [
  26224. createVNode(unref(arrow_left_default))
  26225. ]),
  26226. _: 1
  26227. })
  26228. ], 10, _hoisted_52)) : createCommentVNode("v-if", true),
  26229. createBaseVNode("button", {
  26230. type: "button",
  26231. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  26232. onClick: rightNextYear
  26233. }, [
  26234. createVNode(unref(ElIcon), null, {
  26235. default: withCtx(() => [
  26236. createVNode(unref(d_arrow_right_default))
  26237. ]),
  26238. _: 1
  26239. })
  26240. ], 2),
  26241. createBaseVNode("button", {
  26242. type: "button",
  26243. class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
  26244. onClick: rightNextMonth
  26245. }, [
  26246. createVNode(unref(ElIcon), null, {
  26247. default: withCtx(() => [
  26248. createVNode(unref(arrow_right_default))
  26249. ]),
  26250. _: 1
  26251. })
  26252. ], 2),
  26253. createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
  26254. ], 2),
  26255. createVNode(DateTable2, {
  26256. "selection-mode": "range",
  26257. date: rightDate.value,
  26258. "min-date": unref(minDate),
  26259. "max-date": unref(maxDate),
  26260. "range-state": unref(rangeState),
  26261. "disabled-date": unref(disabledDate2),
  26262. "cell-class-name": unref(cellClassName),
  26263. onChangerange: unref(handleChangeRange),
  26264. onPick: handleRangePick,
  26265. onSelect: unref(onSelect)
  26266. }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "cell-class-name", "onChangerange", "onSelect"])
  26267. ], 2)
  26268. ], 2)
  26269. ], 2),
  26270. unref(showTime) ? (openBlock(), createElementBlock("div", {
  26271. key: 0,
  26272. class: normalizeClass(unref(ppNs).e("footer"))
  26273. }, [
  26274. unref(clearable) ? (openBlock(), createBlock(unref(ElButton), {
  26275. key: 0,
  26276. text: "",
  26277. size: "small",
  26278. class: normalizeClass(unref(ppNs).e("link-btn")),
  26279. onClick: handleClear
  26280. }, {
  26281. default: withCtx(() => [
  26282. createTextVNode(toDisplayString(unref(t)("el.datepicker.clear")), 1)
  26283. ]),
  26284. _: 1
  26285. }, 8, ["class"])) : createCommentVNode("v-if", true),
  26286. createVNode(unref(ElButton), {
  26287. plain: "",
  26288. size: "small",
  26289. class: normalizeClass(unref(ppNs).e("link-btn")),
  26290. disabled: unref(btnDisabled),
  26291. onClick: _cache[10] || (_cache[10] = ($event) => unref(handleRangeConfirm)(false))
  26292. }, {
  26293. default: withCtx(() => [
  26294. createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)
  26295. ]),
  26296. _: 1
  26297. }, 8, ["class", "disabled"])
  26298. ], 2)) : createCommentVNode("v-if", true)
  26299. ], 2);
  26300. };
  26301. }
  26302. });
  26303. var DateRangePickPanel = _export_sfc(_sfc_main63, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/panel-date-range.vue"]]);
  26304. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-month-range.mjs
  26305. var import_dayjs14 = __toESM(require_dayjs_min(), 1);
  26306. // node_modules/element-plus/es/components/date-picker/src/props/panel-month-range.mjs
  26307. var panelMonthRangeProps = buildProps({
  26308. ...panelRangeSharedProps
  26309. });
  26310. var panelMonthRangeEmits = ["pick", "set-picker-option"];
  26311. // node_modules/element-plus/es/components/date-picker/src/composables/use-month-range-header.mjs
  26312. var useMonthRangeHeader = ({
  26313. unlinkPanels,
  26314. leftDate,
  26315. rightDate
  26316. }) => {
  26317. const { t } = useLocale();
  26318. const leftPrevYear = () => {
  26319. leftDate.value = leftDate.value.subtract(1, "year");
  26320. if (!unlinkPanels.value) {
  26321. rightDate.value = rightDate.value.subtract(1, "year");
  26322. }
  26323. };
  26324. const rightNextYear = () => {
  26325. if (!unlinkPanels.value) {
  26326. leftDate.value = leftDate.value.add(1, "year");
  26327. }
  26328. rightDate.value = rightDate.value.add(1, "year");
  26329. };
  26330. const leftNextYear = () => {
  26331. leftDate.value = leftDate.value.add(1, "year");
  26332. };
  26333. const rightPrevYear = () => {
  26334. rightDate.value = rightDate.value.subtract(1, "year");
  26335. };
  26336. const leftLabel = computed2(() => {
  26337. return `${leftDate.value.year()} ${t("el.datepicker.year")}`;
  26338. });
  26339. const rightLabel = computed2(() => {
  26340. return `${rightDate.value.year()} ${t("el.datepicker.year")}`;
  26341. });
  26342. const leftYear = computed2(() => {
  26343. return leftDate.value.year();
  26344. });
  26345. const rightYear = computed2(() => {
  26346. return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year();
  26347. });
  26348. return {
  26349. leftPrevYear,
  26350. rightNextYear,
  26351. leftNextYear,
  26352. rightPrevYear,
  26353. leftLabel,
  26354. rightLabel,
  26355. leftYear,
  26356. rightYear
  26357. };
  26358. };
  26359. // node_modules/element-plus/es/components/date-picker/src/date-picker-com/panel-month-range.mjs
  26360. var _hoisted_128 = ["onClick"];
  26361. var _hoisted_219 = ["disabled"];
  26362. var _hoisted_311 = ["disabled"];
  26363. var unit2 = "year";
  26364. var __default__45 = defineComponent({
  26365. name: "DatePickerMonthRange"
  26366. });
  26367. var _sfc_main64 = defineComponent({
  26368. ...__default__45,
  26369. props: panelMonthRangeProps,
  26370. emits: panelMonthRangeEmits,
  26371. setup(__props, { emit }) {
  26372. const props = __props;
  26373. const { lang } = useLocale();
  26374. const pickerBase = inject("EP_PICKER_BASE");
  26375. const { shortcuts, disabledDate: disabledDate2, format: format2 } = pickerBase.props;
  26376. const defaultValue = toRef(pickerBase.props, "defaultValue");
  26377. const leftDate = ref((0, import_dayjs14.default)().locale(lang.value));
  26378. const rightDate = ref((0, import_dayjs14.default)().locale(lang.value).add(1, unit2));
  26379. const {
  26380. minDate,
  26381. maxDate,
  26382. rangeState,
  26383. ppNs,
  26384. drpNs,
  26385. handleChangeRange,
  26386. handleRangeConfirm,
  26387. handleShortcutClick,
  26388. onSelect
  26389. } = useRangePicker(props, {
  26390. defaultValue,
  26391. leftDate,
  26392. rightDate,
  26393. unit: unit2,
  26394. onParsedValueChanged
  26395. });
  26396. const hasShortcuts = computed2(() => !!shortcuts.length);
  26397. const {
  26398. leftPrevYear,
  26399. rightNextYear,
  26400. leftNextYear,
  26401. rightPrevYear,
  26402. leftLabel,
  26403. rightLabel,
  26404. leftYear,
  26405. rightYear
  26406. } = useMonthRangeHeader({
  26407. unlinkPanels: toRef(props, "unlinkPanels"),
  26408. leftDate,
  26409. rightDate
  26410. });
  26411. const enableYearArrow = computed2(() => {
  26412. return props.unlinkPanels && rightYear.value > leftYear.value + 1;
  26413. });
  26414. const handleRangePick = (val, close2 = true) => {
  26415. const minDate_ = val.minDate;
  26416. const maxDate_ = val.maxDate;
  26417. if (maxDate.value === maxDate_ && minDate.value === minDate_) {
  26418. return;
  26419. }
  26420. maxDate.value = maxDate_;
  26421. minDate.value = minDate_;
  26422. if (!close2)
  26423. return;
  26424. handleRangeConfirm();
  26425. };
  26426. const formatToString = (days) => {
  26427. return days.map((day) => day.format(format2));
  26428. };
  26429. function onParsedValueChanged(minDate2, maxDate2) {
  26430. if (props.unlinkPanels && maxDate2) {
  26431. const minDateYear = (minDate2 == null ? void 0 : minDate2.year()) || 0;
  26432. const maxDateYear = maxDate2.year();
  26433. rightDate.value = minDateYear === maxDateYear ? maxDate2.add(1, unit2) : maxDate2;
  26434. } else {
  26435. rightDate.value = leftDate.value.add(1, unit2);
  26436. }
  26437. }
  26438. emit("set-picker-option", ["formatToString", formatToString]);
  26439. return (_ctx, _cache) => {
  26440. return openBlock(), createElementBlock("div", {
  26441. class: normalizeClass([
  26442. unref(ppNs).b(),
  26443. unref(drpNs).b(),
  26444. {
  26445. "has-sidebar": Boolean(_ctx.$slots.sidebar) || unref(hasShortcuts)
  26446. }
  26447. ])
  26448. }, [
  26449. createBaseVNode("div", {
  26450. class: normalizeClass(unref(ppNs).e("body-wrapper"))
  26451. }, [
  26452. renderSlot(_ctx.$slots, "sidebar", {
  26453. class: normalizeClass(unref(ppNs).e("sidebar"))
  26454. }),
  26455. unref(hasShortcuts) ? (openBlock(), createElementBlock("div", {
  26456. key: 0,
  26457. class: normalizeClass(unref(ppNs).e("sidebar"))
  26458. }, [
  26459. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
  26460. return openBlock(), createElementBlock("button", {
  26461. key,
  26462. type: "button",
  26463. class: normalizeClass(unref(ppNs).e("shortcut")),
  26464. onClick: ($event) => unref(handleShortcutClick)(shortcut)
  26465. }, toDisplayString(shortcut.text), 11, _hoisted_128);
  26466. }), 128))
  26467. ], 2)) : createCommentVNode("v-if", true),
  26468. createBaseVNode("div", {
  26469. class: normalizeClass(unref(ppNs).e("body"))
  26470. }, [
  26471. createBaseVNode("div", {
  26472. class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"])
  26473. }, [
  26474. createBaseVNode("div", {
  26475. class: normalizeClass(unref(drpNs).e("header"))
  26476. }, [
  26477. createBaseVNode("button", {
  26478. type: "button",
  26479. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
  26480. onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
  26481. }, [
  26482. createVNode(unref(ElIcon), null, {
  26483. default: withCtx(() => [
  26484. createVNode(unref(d_arrow_left_default))
  26485. ]),
  26486. _: 1
  26487. })
  26488. ], 2),
  26489. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  26490. key: 0,
  26491. type: "button",
  26492. disabled: !unref(enableYearArrow),
  26493. class: normalizeClass([[
  26494. unref(ppNs).e("icon-btn"),
  26495. { [unref(ppNs).is("disabled")]: !unref(enableYearArrow) }
  26496. ], "d-arrow-right"]),
  26497. onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
  26498. }, [
  26499. createVNode(unref(ElIcon), null, {
  26500. default: withCtx(() => [
  26501. createVNode(unref(d_arrow_right_default))
  26502. ]),
  26503. _: 1
  26504. })
  26505. ], 10, _hoisted_219)) : createCommentVNode("v-if", true),
  26506. createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
  26507. ], 2),
  26508. createVNode(MonthTable, {
  26509. "selection-mode": "range",
  26510. date: leftDate.value,
  26511. "min-date": unref(minDate),
  26512. "max-date": unref(maxDate),
  26513. "range-state": unref(rangeState),
  26514. "disabled-date": unref(disabledDate2),
  26515. onChangerange: unref(handleChangeRange),
  26516. onPick: handleRangePick,
  26517. onSelect: unref(onSelect)
  26518. }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "onChangerange", "onSelect"])
  26519. ], 2),
  26520. createBaseVNode("div", {
  26521. class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"])
  26522. }, [
  26523. createBaseVNode("div", {
  26524. class: normalizeClass(unref(drpNs).e("header"))
  26525. }, [
  26526. _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
  26527. key: 0,
  26528. type: "button",
  26529. disabled: !unref(enableYearArrow),
  26530. class: normalizeClass([[unref(ppNs).e("icon-btn"), { "is-disabled": !unref(enableYearArrow) }], "d-arrow-left"]),
  26531. onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
  26532. }, [
  26533. createVNode(unref(ElIcon), null, {
  26534. default: withCtx(() => [
  26535. createVNode(unref(d_arrow_left_default))
  26536. ]),
  26537. _: 1
  26538. })
  26539. ], 10, _hoisted_311)) : createCommentVNode("v-if", true),
  26540. createBaseVNode("button", {
  26541. type: "button",
  26542. class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
  26543. onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
  26544. }, [
  26545. createVNode(unref(ElIcon), null, {
  26546. default: withCtx(() => [
  26547. createVNode(unref(d_arrow_right_default))
  26548. ]),
  26549. _: 1
  26550. })
  26551. ], 2),
  26552. createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
  26553. ], 2),
  26554. createVNode(MonthTable, {
  26555. "selection-mode": "range",
  26556. date: rightDate.value,
  26557. "min-date": unref(minDate),
  26558. "max-date": unref(maxDate),
  26559. "range-state": unref(rangeState),
  26560. "disabled-date": unref(disabledDate2),
  26561. onChangerange: unref(handleChangeRange),
  26562. onPick: handleRangePick,
  26563. onSelect: unref(onSelect)
  26564. }, null, 8, ["date", "min-date", "max-date", "range-state", "disabled-date", "onChangerange", "onSelect"])
  26565. ], 2)
  26566. ], 2)
  26567. ], 2)
  26568. ], 2);
  26569. };
  26570. }
  26571. });
  26572. var MonthRangePickPanel = _export_sfc(_sfc_main64, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/date-picker/src/date-picker-com/panel-month-range.vue"]]);
  26573. // node_modules/element-plus/es/components/date-picker/src/panel-utils.mjs
  26574. var getPanel = function(type4) {
  26575. switch (type4) {
  26576. case "daterange":
  26577. case "datetimerange": {
  26578. return DateRangePickPanel;
  26579. }
  26580. case "monthrange": {
  26581. return MonthRangePickPanel;
  26582. }
  26583. default: {
  26584. return DatePickPanel;
  26585. }
  26586. }
  26587. };
  26588. // node_modules/element-plus/es/components/date-picker/src/date-picker.mjs
  26589. import_dayjs15.default.extend(import_localeData2.default);
  26590. import_dayjs15.default.extend(import_advancedFormat.default);
  26591. import_dayjs15.default.extend(import_customParseFormat2.default);
  26592. import_dayjs15.default.extend(import_weekOfYear.default);
  26593. import_dayjs15.default.extend(import_weekYear.default);
  26594. import_dayjs15.default.extend(import_dayOfYear.default);
  26595. import_dayjs15.default.extend(import_isSameOrAfter.default);
  26596. import_dayjs15.default.extend(import_isSameOrBefore.default);
  26597. var DatePicker = defineComponent({
  26598. name: "ElDatePicker",
  26599. install: null,
  26600. props: {
  26601. ...timePickerDefaultProps,
  26602. ...datePickerProps
  26603. },
  26604. emits: ["update:modelValue"],
  26605. setup(props, {
  26606. expose,
  26607. emit,
  26608. slots
  26609. }) {
  26610. const ns2 = useNamespace("picker-panel");
  26611. provide("ElPopperOptions", reactive(toRef(props, "popperOptions")));
  26612. provide(ROOT_PICKER_INJECTION_KEY, {
  26613. slots,
  26614. pickerNs: ns2
  26615. });
  26616. const commonPicker = ref();
  26617. const refProps = {
  26618. focus: (focusStartInput = true) => {
  26619. var _a2;
  26620. (_a2 = commonPicker.value) == null ? void 0 : _a2.focus(focusStartInput);
  26621. },
  26622. handleOpen: () => {
  26623. var _a2;
  26624. (_a2 = commonPicker.value) == null ? void 0 : _a2.handleOpen();
  26625. },
  26626. handleClose: () => {
  26627. var _a2;
  26628. (_a2 = commonPicker.value) == null ? void 0 : _a2.handleClose();
  26629. }
  26630. };
  26631. expose(refProps);
  26632. const onModelValueUpdated = (val) => {
  26633. emit("update:modelValue", val);
  26634. };
  26635. return () => {
  26636. var _a2;
  26637. const format2 = (_a2 = props.format) != null ? _a2 : DEFAULT_FORMATS_DATEPICKER[props.type] || DEFAULT_FORMATS_DATE;
  26638. const Component = getPanel(props.type);
  26639. return createVNode(CommonPicker, mergeProps(props, {
  26640. "format": format2,
  26641. "type": props.type,
  26642. "ref": commonPicker,
  26643. "onUpdate:modelValue": onModelValueUpdated
  26644. }), {
  26645. default: (scopedProps) => createVNode(Component, scopedProps, null),
  26646. "range-separator": slots["range-separator"]
  26647. });
  26648. };
  26649. }
  26650. });
  26651. // node_modules/element-plus/es/components/date-picker/index.mjs
  26652. var _DatePicker = DatePicker;
  26653. _DatePicker.install = (app) => {
  26654. app.component(_DatePicker.name, _DatePicker);
  26655. };
  26656. var ElDatePicker = _DatePicker;
  26657. // node_modules/element-plus/es/components/descriptions/src/token.mjs
  26658. var descriptionsKey = "elDescriptions";
  26659. // node_modules/element-plus/es/components/descriptions/src/descriptions-cell.mjs
  26660. var ElDescriptionsCell = defineComponent({
  26661. name: "ElDescriptionsCell",
  26662. props: {
  26663. cell: {
  26664. type: Object
  26665. },
  26666. tag: {
  26667. type: String
  26668. },
  26669. type: {
  26670. type: String
  26671. }
  26672. },
  26673. setup() {
  26674. const descriptions = inject(descriptionsKey, {});
  26675. return {
  26676. descriptions
  26677. };
  26678. },
  26679. render() {
  26680. var _a2, _b, _c, _d, _e, _f;
  26681. const item = getNormalizedProps(this.cell);
  26682. const { border, direction: direction2 } = this.descriptions;
  26683. const isVertical = direction2 === "vertical";
  26684. const label = ((_c = (_b = (_a2 = this.cell) == null ? void 0 : _a2.children) == null ? void 0 : _b.label) == null ? void 0 : _c.call(_b)) || item.label;
  26685. const content = (_f = (_e = (_d = this.cell) == null ? void 0 : _d.children) == null ? void 0 : _e.default) == null ? void 0 : _f.call(_e);
  26686. const span = item.span;
  26687. const align = item.align ? `is-${item.align}` : "";
  26688. const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align;
  26689. const className = item.className;
  26690. const labelClassName = item.labelClassName;
  26691. const style = {
  26692. width: addUnit(item.width),
  26693. minWidth: addUnit(item.minWidth)
  26694. };
  26695. const ns2 = useNamespace("descriptions");
  26696. switch (this.type) {
  26697. case "label":
  26698. return h(this.tag, {
  26699. style,
  26700. class: [
  26701. ns2.e("cell"),
  26702. ns2.e("label"),
  26703. ns2.is("bordered-label", border),
  26704. ns2.is("vertical-label", isVertical),
  26705. labelAlign,
  26706. labelClassName
  26707. ],
  26708. colSpan: isVertical ? span : 1
  26709. }, label);
  26710. case "content":
  26711. return h(this.tag, {
  26712. style,
  26713. class: [
  26714. ns2.e("cell"),
  26715. ns2.e("content"),
  26716. ns2.is("bordered-content", border),
  26717. ns2.is("vertical-content", isVertical),
  26718. align,
  26719. className
  26720. ],
  26721. colSpan: isVertical ? span : span * 2 - 1
  26722. }, content);
  26723. default:
  26724. return h("td", {
  26725. style,
  26726. class: [ns2.e("cell"), align],
  26727. colSpan: span
  26728. }, [
  26729. h("span", {
  26730. class: [ns2.e("label"), labelClassName]
  26731. }, label),
  26732. h("span", {
  26733. class: [ns2.e("content"), className]
  26734. }, content)
  26735. ]);
  26736. }
  26737. }
  26738. });
  26739. // node_modules/element-plus/es/components/descriptions/src/descriptions-row.mjs
  26740. var descriptionsRowProps = buildProps({
  26741. row: {
  26742. type: Array,
  26743. default: () => []
  26744. }
  26745. });
  26746. // node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs
  26747. var _hoisted_129 = { key: 1 };
  26748. var __default__46 = defineComponent({
  26749. name: "ElDescriptionsRow"
  26750. });
  26751. var _sfc_main65 = defineComponent({
  26752. ...__default__46,
  26753. props: descriptionsRowProps,
  26754. setup(__props) {
  26755. const descriptions = inject(descriptionsKey, {});
  26756. return (_ctx, _cache) => {
  26757. return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  26758. createBaseVNode("tr", null, [
  26759. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {
  26760. return openBlock(), createBlock(unref(ElDescriptionsCell), {
  26761. key: `tr1-${index}`,
  26762. cell,
  26763. tag: "th",
  26764. type: "label"
  26765. }, null, 8, ["cell"]);
  26766. }), 128))
  26767. ]),
  26768. createBaseVNode("tr", null, [
  26769. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {
  26770. return openBlock(), createBlock(unref(ElDescriptionsCell), {
  26771. key: `tr2-${index}`,
  26772. cell,
  26773. tag: "td",
  26774. type: "content"
  26775. }, null, 8, ["cell"]);
  26776. }), 128))
  26777. ])
  26778. ], 64)) : (openBlock(), createElementBlock("tr", _hoisted_129, [
  26779. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {
  26780. return openBlock(), createElementBlock(Fragment, {
  26781. key: `tr3-${index}`
  26782. }, [
  26783. unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  26784. createVNode(unref(ElDescriptionsCell), {
  26785. cell,
  26786. tag: "td",
  26787. type: "label"
  26788. }, null, 8, ["cell"]),
  26789. createVNode(unref(ElDescriptionsCell), {
  26790. cell,
  26791. tag: "td",
  26792. type: "content"
  26793. }, null, 8, ["cell"])
  26794. ], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
  26795. key: 1,
  26796. cell,
  26797. tag: "td",
  26798. type: "both"
  26799. }, null, 8, ["cell"]))
  26800. ], 64);
  26801. }), 128))
  26802. ]));
  26803. };
  26804. }
  26805. });
  26806. var ElDescriptionsRow = _export_sfc(_sfc_main65, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]);
  26807. // node_modules/element-plus/es/components/descriptions/src/description.mjs
  26808. var descriptionProps = buildProps({
  26809. border: {
  26810. type: Boolean,
  26811. default: false
  26812. },
  26813. column: {
  26814. type: Number,
  26815. default: 3
  26816. },
  26817. direction: {
  26818. type: String,
  26819. values: ["horizontal", "vertical"],
  26820. default: "horizontal"
  26821. },
  26822. size: useSizeProp,
  26823. title: {
  26824. type: String,
  26825. default: ""
  26826. },
  26827. extra: {
  26828. type: String,
  26829. default: ""
  26830. }
  26831. });
  26832. // node_modules/element-plus/es/components/descriptions/src/description2.mjs
  26833. var __default__47 = defineComponent({
  26834. name: "ElDescriptions"
  26835. });
  26836. var _sfc_main66 = defineComponent({
  26837. ...__default__47,
  26838. props: descriptionProps,
  26839. setup(__props) {
  26840. const props = __props;
  26841. const ns2 = useNamespace("descriptions");
  26842. const descriptionsSize = useSize();
  26843. const slots = useSlots();
  26844. provide(descriptionsKey, props);
  26845. const descriptionKls = computed2(() => [ns2.b(), ns2.m(descriptionsSize.value)]);
  26846. const filledNode = (node, span, count, isLast = false) => {
  26847. if (!node.props) {
  26848. node.props = {};
  26849. }
  26850. if (span > count) {
  26851. node.props.span = count;
  26852. }
  26853. if (isLast) {
  26854. node.props.span = span;
  26855. }
  26856. return node;
  26857. };
  26858. const getRows = () => {
  26859. var _a2;
  26860. const children = flattedChildren((_a2 = slots.default) == null ? void 0 : _a2.call(slots)).filter((node) => {
  26861. var _a22;
  26862. return ((_a22 = node == null ? void 0 : node.type) == null ? void 0 : _a22.name) === "ElDescriptionsItem";
  26863. });
  26864. const rows = [];
  26865. let temp = [];
  26866. let count = props.column;
  26867. let totalSpan = 0;
  26868. children.forEach((node, index) => {
  26869. var _a22;
  26870. const span = ((_a22 = node.props) == null ? void 0 : _a22.span) || 1;
  26871. if (index < children.length - 1) {
  26872. totalSpan += span > count ? count : span;
  26873. }
  26874. if (index === children.length - 1) {
  26875. const lastSpan = props.column - totalSpan % props.column;
  26876. temp.push(filledNode(node, lastSpan, count, true));
  26877. rows.push(temp);
  26878. return;
  26879. }
  26880. if (span < count) {
  26881. count -= span;
  26882. temp.push(node);
  26883. } else {
  26884. temp.push(filledNode(node, span, count));
  26885. rows.push(temp);
  26886. count = props.column;
  26887. temp = [];
  26888. }
  26889. });
  26890. return rows;
  26891. };
  26892. return (_ctx, _cache) => {
  26893. return openBlock(), createElementBlock("div", {
  26894. class: normalizeClass(unref(descriptionKls))
  26895. }, [
  26896. _ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  26897. key: 0,
  26898. class: normalizeClass(unref(ns2).e("header"))
  26899. }, [
  26900. createBaseVNode("div", {
  26901. class: normalizeClass(unref(ns2).e("title"))
  26902. }, [
  26903. renderSlot(_ctx.$slots, "title", {}, () => [
  26904. createTextVNode(toDisplayString(_ctx.title), 1)
  26905. ])
  26906. ], 2),
  26907. createBaseVNode("div", {
  26908. class: normalizeClass(unref(ns2).e("extra"))
  26909. }, [
  26910. renderSlot(_ctx.$slots, "extra", {}, () => [
  26911. createTextVNode(toDisplayString(_ctx.extra), 1)
  26912. ])
  26913. ], 2)
  26914. ], 2)) : createCommentVNode("v-if", true),
  26915. createBaseVNode("div", {
  26916. class: normalizeClass(unref(ns2).e("body"))
  26917. }, [
  26918. createBaseVNode("table", {
  26919. class: normalizeClass([unref(ns2).e("table"), unref(ns2).is("bordered", _ctx.border)])
  26920. }, [
  26921. createBaseVNode("tbody", null, [
  26922. (openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, index) => {
  26923. return openBlock(), createBlock(ElDescriptionsRow, {
  26924. key: index,
  26925. row
  26926. }, null, 8, ["row"]);
  26927. }), 128))
  26928. ])
  26929. ], 2)
  26930. ], 2)
  26931. ], 2);
  26932. };
  26933. }
  26934. });
  26935. var Descriptions = _export_sfc(_sfc_main66, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/description.vue"]]);
  26936. // node_modules/element-plus/es/components/descriptions/src/description-item.mjs
  26937. var DescriptionsItem = defineComponent({
  26938. name: "ElDescriptionsItem",
  26939. props: {
  26940. label: {
  26941. type: String,
  26942. default: ""
  26943. },
  26944. span: {
  26945. type: Number,
  26946. default: 1
  26947. },
  26948. width: {
  26949. type: [String, Number],
  26950. default: ""
  26951. },
  26952. minWidth: {
  26953. type: [String, Number],
  26954. default: ""
  26955. },
  26956. align: {
  26957. type: String,
  26958. default: "left"
  26959. },
  26960. labelAlign: {
  26961. type: String,
  26962. default: ""
  26963. },
  26964. className: {
  26965. type: String,
  26966. default: ""
  26967. },
  26968. labelClassName: {
  26969. type: String,
  26970. default: ""
  26971. }
  26972. }
  26973. });
  26974. // node_modules/element-plus/es/components/descriptions/index.mjs
  26975. var ElDescriptions = withInstall(Descriptions, {
  26976. DescriptionsItem
  26977. });
  26978. var ElDescriptionsItem = withNoopInstall(DescriptionsItem);
  26979. // node_modules/element-plus/es/components/overlay/src/overlay.mjs
  26980. var overlayProps = buildProps({
  26981. mask: {
  26982. type: Boolean,
  26983. default: true
  26984. },
  26985. customMaskEvent: {
  26986. type: Boolean,
  26987. default: false
  26988. },
  26989. overlayClass: {
  26990. type: definePropType([
  26991. String,
  26992. Array,
  26993. Object
  26994. ])
  26995. },
  26996. zIndex: {
  26997. type: definePropType([String, Number])
  26998. }
  26999. });
  27000. var overlayEmits = {
  27001. click: (evt) => evt instanceof MouseEvent
  27002. };
  27003. var Overlay = defineComponent({
  27004. name: "ElOverlay",
  27005. props: overlayProps,
  27006. emits: overlayEmits,
  27007. setup(props, { slots, emit }) {
  27008. const ns2 = useNamespace("overlay");
  27009. const onMaskClick = (e) => {
  27010. emit("click", e);
  27011. };
  27012. const { onClick, onMousedown, onMouseup } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
  27013. return () => {
  27014. return props.mask ? createVNode("div", {
  27015. class: [ns2.b(), props.overlayClass],
  27016. style: {
  27017. zIndex: props.zIndex
  27018. },
  27019. onClick,
  27020. onMousedown,
  27021. onMouseup
  27022. }, [renderSlot(slots, "default")], PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, ["onClick", "onMouseup", "onMousedown"]) : h("div", {
  27023. class: props.overlayClass,
  27024. style: {
  27025. zIndex: props.zIndex,
  27026. position: "fixed",
  27027. top: "0px",
  27028. right: "0px",
  27029. bottom: "0px",
  27030. left: "0px"
  27031. }
  27032. }, [renderSlot(slots, "default")]);
  27033. };
  27034. }
  27035. });
  27036. // node_modules/element-plus/es/components/overlay/index.mjs
  27037. var ElOverlay = Overlay;
  27038. // node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
  27039. var dialogContentProps = buildProps({
  27040. center: {
  27041. type: Boolean,
  27042. default: false
  27043. },
  27044. alignCenter: {
  27045. type: Boolean,
  27046. default: false
  27047. },
  27048. closeIcon: {
  27049. type: iconPropType
  27050. },
  27051. customClass: {
  27052. type: String,
  27053. default: ""
  27054. },
  27055. draggable: {
  27056. type: Boolean,
  27057. default: false
  27058. },
  27059. fullscreen: {
  27060. type: Boolean,
  27061. default: false
  27062. },
  27063. showClose: {
  27064. type: Boolean,
  27065. default: true
  27066. },
  27067. title: {
  27068. type: String,
  27069. default: ""
  27070. }
  27071. });
  27072. var dialogContentEmits = {
  27073. close: () => true
  27074. };
  27075. // node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
  27076. var _hoisted_130 = ["aria-label"];
  27077. var _hoisted_220 = ["id"];
  27078. var __default__48 = defineComponent({ name: "ElDialogContent" });
  27079. var _sfc_main67 = defineComponent({
  27080. ...__default__48,
  27081. props: dialogContentProps,
  27082. emits: dialogContentEmits,
  27083. setup(__props) {
  27084. const props = __props;
  27085. const { t } = useLocale();
  27086. const { Close } = CloseComponents;
  27087. const { dialogRef, headerRef, bodyId, ns: ns2, style } = inject(dialogInjectionKey);
  27088. const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
  27089. const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
  27090. const draggable2 = computed2(() => props.draggable);
  27091. useDraggable(dialogRef, headerRef, draggable2);
  27092. return (_ctx, _cache) => {
  27093. return openBlock(), createElementBlock("div", {
  27094. ref: unref(composedDialogRef),
  27095. class: normalizeClass([
  27096. unref(ns2).b(),
  27097. unref(ns2).is("fullscreen", _ctx.fullscreen),
  27098. unref(ns2).is("draggable", unref(draggable2)),
  27099. unref(ns2).is("align-center", _ctx.alignCenter),
  27100. { [unref(ns2).m("center")]: _ctx.center },
  27101. _ctx.customClass
  27102. ]),
  27103. style: normalizeStyle(unref(style)),
  27104. tabindex: "-1"
  27105. }, [
  27106. createBaseVNode("header", {
  27107. ref_key: "headerRef",
  27108. ref: headerRef,
  27109. class: normalizeClass(unref(ns2).e("header"))
  27110. }, [
  27111. renderSlot(_ctx.$slots, "header", {}, () => [
  27112. createBaseVNode("span", {
  27113. role: "heading",
  27114. class: normalizeClass(unref(ns2).e("title"))
  27115. }, toDisplayString(_ctx.title), 3)
  27116. ]),
  27117. _ctx.showClose ? (openBlock(), createElementBlock("button", {
  27118. key: 0,
  27119. "aria-label": unref(t)("el.dialog.close"),
  27120. class: normalizeClass(unref(ns2).e("headerbtn")),
  27121. type: "button",
  27122. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
  27123. }, [
  27124. createVNode(unref(ElIcon), {
  27125. class: normalizeClass(unref(ns2).e("close"))
  27126. }, {
  27127. default: withCtx(() => [
  27128. (openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || unref(Close))))
  27129. ]),
  27130. _: 1
  27131. }, 8, ["class"])
  27132. ], 10, _hoisted_130)) : createCommentVNode("v-if", true)
  27133. ], 2),
  27134. createBaseVNode("div", {
  27135. id: unref(bodyId),
  27136. class: normalizeClass(unref(ns2).e("body"))
  27137. }, [
  27138. renderSlot(_ctx.$slots, "default")
  27139. ], 10, _hoisted_220),
  27140. _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
  27141. key: 0,
  27142. class: normalizeClass(unref(ns2).e("footer"))
  27143. }, [
  27144. renderSlot(_ctx.$slots, "footer")
  27145. ], 2)) : createCommentVNode("v-if", true)
  27146. ], 6);
  27147. };
  27148. }
  27149. });
  27150. var ElDialogContent = _export_sfc(_sfc_main67, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);
  27151. // node_modules/element-plus/es/components/dialog/src/dialog.mjs
  27152. var dialogProps = buildProps({
  27153. ...dialogContentProps,
  27154. appendToBody: {
  27155. type: Boolean,
  27156. default: false
  27157. },
  27158. beforeClose: {
  27159. type: definePropType(Function)
  27160. },
  27161. destroyOnClose: {
  27162. type: Boolean,
  27163. default: false
  27164. },
  27165. closeOnClickModal: {
  27166. type: Boolean,
  27167. default: true
  27168. },
  27169. closeOnPressEscape: {
  27170. type: Boolean,
  27171. default: true
  27172. },
  27173. lockScroll: {
  27174. type: Boolean,
  27175. default: true
  27176. },
  27177. modal: {
  27178. type: Boolean,
  27179. default: true
  27180. },
  27181. openDelay: {
  27182. type: Number,
  27183. default: 0
  27184. },
  27185. closeDelay: {
  27186. type: Number,
  27187. default: 0
  27188. },
  27189. top: {
  27190. type: String
  27191. },
  27192. modelValue: {
  27193. type: Boolean,
  27194. default: false
  27195. },
  27196. modalClass: String,
  27197. width: {
  27198. type: [String, Number]
  27199. },
  27200. zIndex: {
  27201. type: Number
  27202. },
  27203. trapFocus: {
  27204. type: Boolean,
  27205. default: false
  27206. }
  27207. });
  27208. var dialogEmits = {
  27209. open: () => true,
  27210. opened: () => true,
  27211. close: () => true,
  27212. closed: () => true,
  27213. [UPDATE_MODEL_EVENT]: (value) => isBoolean2(value),
  27214. openAutoFocus: () => true,
  27215. closeAutoFocus: () => true
  27216. };
  27217. // node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
  27218. var useDialog = (props, targetRef) => {
  27219. const instance = getCurrentInstance();
  27220. const emit = instance.emit;
  27221. const { nextZIndex } = useZIndex();
  27222. let lastPosition = "";
  27223. const titleId = useId();
  27224. const bodyId = useId();
  27225. const visible = ref(false);
  27226. const closed = ref(false);
  27227. const rendered = ref(false);
  27228. const zIndex2 = ref(props.zIndex || nextZIndex());
  27229. let openTimer = void 0;
  27230. let closeTimer = void 0;
  27231. const namespace = useGlobalConfig("namespace", defaultNamespace);
  27232. const style = computed2(() => {
  27233. const style2 = {};
  27234. const varPrefix = `--${namespace.value}-dialog`;
  27235. if (!props.fullscreen) {
  27236. if (props.top) {
  27237. style2[`${varPrefix}-margin-top`] = props.top;
  27238. }
  27239. if (props.width) {
  27240. style2[`${varPrefix}-width`] = addUnit(props.width);
  27241. }
  27242. }
  27243. return style2;
  27244. });
  27245. const overlayDialogStyle = computed2(() => {
  27246. if (props.alignCenter) {
  27247. return { display: "flex" };
  27248. }
  27249. return {};
  27250. });
  27251. function afterEnter() {
  27252. emit("opened");
  27253. }
  27254. function afterLeave() {
  27255. emit("closed");
  27256. emit(UPDATE_MODEL_EVENT, false);
  27257. if (props.destroyOnClose) {
  27258. rendered.value = false;
  27259. }
  27260. }
  27261. function beforeLeave() {
  27262. emit("close");
  27263. }
  27264. function open() {
  27265. closeTimer == null ? void 0 : closeTimer();
  27266. openTimer == null ? void 0 : openTimer();
  27267. if (props.openDelay && props.openDelay > 0) {
  27268. ;
  27269. ({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay));
  27270. } else {
  27271. doOpen();
  27272. }
  27273. }
  27274. function close2() {
  27275. openTimer == null ? void 0 : openTimer();
  27276. closeTimer == null ? void 0 : closeTimer();
  27277. if (props.closeDelay && props.closeDelay > 0) {
  27278. ;
  27279. ({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay));
  27280. } else {
  27281. doClose();
  27282. }
  27283. }
  27284. function handleClose() {
  27285. function hide2(shouldCancel) {
  27286. if (shouldCancel)
  27287. return;
  27288. closed.value = true;
  27289. visible.value = false;
  27290. }
  27291. if (props.beforeClose) {
  27292. props.beforeClose(hide2);
  27293. } else {
  27294. close2();
  27295. }
  27296. }
  27297. function onModalClick() {
  27298. if (props.closeOnClickModal) {
  27299. handleClose();
  27300. }
  27301. }
  27302. function doOpen() {
  27303. if (!isClient)
  27304. return;
  27305. visible.value = true;
  27306. }
  27307. function doClose() {
  27308. visible.value = false;
  27309. }
  27310. function onOpenAutoFocus() {
  27311. emit("openAutoFocus");
  27312. }
  27313. function onCloseAutoFocus() {
  27314. emit("closeAutoFocus");
  27315. }
  27316. function onFocusoutPrevented(event) {
  27317. var _a2;
  27318. if (((_a2 = event.detail) == null ? void 0 : _a2.focusReason) === "pointer") {
  27319. event.preventDefault();
  27320. }
  27321. }
  27322. if (props.lockScroll) {
  27323. useLockscreen(visible);
  27324. }
  27325. function onCloseRequested() {
  27326. if (props.closeOnPressEscape) {
  27327. handleClose();
  27328. }
  27329. }
  27330. watch(() => props.modelValue, (val) => {
  27331. if (val) {
  27332. closed.value = false;
  27333. open();
  27334. rendered.value = true;
  27335. zIndex2.value = props.zIndex ? zIndex2.value++ : nextZIndex();
  27336. nextTick(() => {
  27337. emit("open");
  27338. if (targetRef.value) {
  27339. targetRef.value.scrollTop = 0;
  27340. }
  27341. });
  27342. } else {
  27343. if (visible.value) {
  27344. close2();
  27345. }
  27346. }
  27347. });
  27348. watch(() => props.fullscreen, (val) => {
  27349. if (!targetRef.value)
  27350. return;
  27351. if (val) {
  27352. lastPosition = targetRef.value.style.transform;
  27353. targetRef.value.style.transform = "";
  27354. } else {
  27355. targetRef.value.style.transform = lastPosition;
  27356. }
  27357. });
  27358. onMounted(() => {
  27359. if (props.modelValue) {
  27360. visible.value = true;
  27361. rendered.value = true;
  27362. open();
  27363. }
  27364. });
  27365. return {
  27366. afterEnter,
  27367. afterLeave,
  27368. beforeLeave,
  27369. handleClose,
  27370. onModalClick,
  27371. close: close2,
  27372. doClose,
  27373. onOpenAutoFocus,
  27374. onCloseAutoFocus,
  27375. onCloseRequested,
  27376. onFocusoutPrevented,
  27377. titleId,
  27378. bodyId,
  27379. closed,
  27380. style,
  27381. overlayDialogStyle,
  27382. rendered,
  27383. visible,
  27384. zIndex: zIndex2
  27385. };
  27386. };
  27387. // node_modules/element-plus/es/components/dialog/src/dialog2.mjs
  27388. var _hoisted_131 = ["aria-label", "aria-labelledby", "aria-describedby"];
  27389. var __default__49 = defineComponent({
  27390. name: "ElDialog",
  27391. inheritAttrs: false
  27392. });
  27393. var _sfc_main68 = defineComponent({
  27394. ...__default__49,
  27395. props: dialogProps,
  27396. emits: dialogEmits,
  27397. setup(__props, { expose }) {
  27398. const props = __props;
  27399. const slots = useSlots();
  27400. useDeprecated({
  27401. scope: "el-dialog",
  27402. from: "the title slot",
  27403. replacement: "the header slot",
  27404. version: "3.0.0",
  27405. ref: "https://element-plus.org/en-US/component/dialog.html#slots"
  27406. }, computed2(() => !!slots.title));
  27407. useDeprecated({
  27408. scope: "el-dialog",
  27409. from: "custom-class",
  27410. replacement: "class",
  27411. version: "2.3.0",
  27412. ref: "https://element-plus.org/en-US/component/dialog.html#attributes",
  27413. type: "Attribute"
  27414. }, computed2(() => !!props.customClass));
  27415. const ns2 = useNamespace("dialog");
  27416. const dialogRef = ref();
  27417. const headerRef = ref();
  27418. const dialogContentRef = ref();
  27419. const {
  27420. visible,
  27421. titleId,
  27422. bodyId,
  27423. style,
  27424. overlayDialogStyle,
  27425. rendered,
  27426. zIndex: zIndex2,
  27427. afterEnter,
  27428. afterLeave,
  27429. beforeLeave,
  27430. handleClose,
  27431. onModalClick,
  27432. onOpenAutoFocus,
  27433. onCloseAutoFocus,
  27434. onCloseRequested,
  27435. onFocusoutPrevented
  27436. } = useDialog(props, dialogRef);
  27437. provide(dialogInjectionKey, {
  27438. dialogRef,
  27439. headerRef,
  27440. bodyId,
  27441. ns: ns2,
  27442. rendered,
  27443. style
  27444. });
  27445. const overlayEvent = useSameTarget(onModalClick);
  27446. const draggable2 = computed2(() => props.draggable && !props.fullscreen);
  27447. expose({
  27448. visible,
  27449. dialogContentRef
  27450. });
  27451. return (_ctx, _cache) => {
  27452. return openBlock(), createBlock(Teleport, {
  27453. to: "body",
  27454. disabled: !_ctx.appendToBody
  27455. }, [
  27456. createVNode(Transition, {
  27457. name: "dialog-fade",
  27458. onAfterEnter: unref(afterEnter),
  27459. onAfterLeave: unref(afterLeave),
  27460. onBeforeLeave: unref(beforeLeave),
  27461. persisted: ""
  27462. }, {
  27463. default: withCtx(() => [
  27464. withDirectives(createVNode(unref(ElOverlay), {
  27465. "custom-mask-event": "",
  27466. mask: _ctx.modal,
  27467. "overlay-class": _ctx.modalClass,
  27468. "z-index": unref(zIndex2)
  27469. }, {
  27470. default: withCtx(() => [
  27471. createBaseVNode("div", {
  27472. role: "dialog",
  27473. "aria-modal": "true",
  27474. "aria-label": _ctx.title || void 0,
  27475. "aria-labelledby": !_ctx.title ? unref(titleId) : void 0,
  27476. "aria-describedby": unref(bodyId),
  27477. class: normalizeClass(`${unref(ns2).namespace.value}-overlay-dialog`),
  27478. style: normalizeStyle(unref(overlayDialogStyle)),
  27479. onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
  27480. onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
  27481. onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
  27482. }, [
  27483. createVNode(unref(ElFocusTrap), {
  27484. loop: "",
  27485. trapped: unref(visible),
  27486. "focus-start-el": "container",
  27487. onFocusAfterTrapped: unref(onOpenAutoFocus),
  27488. onFocusAfterReleased: unref(onCloseAutoFocus),
  27489. onFocusoutPrevented: unref(onFocusoutPrevented),
  27490. onReleaseRequested: unref(onCloseRequested)
  27491. }, {
  27492. default: withCtx(() => [
  27493. unref(rendered) ? (openBlock(), createBlock(ElDialogContent, mergeProps({
  27494. key: 0,
  27495. ref_key: "dialogContentRef",
  27496. ref: dialogContentRef
  27497. }, _ctx.$attrs, {
  27498. "custom-class": _ctx.customClass,
  27499. center: _ctx.center,
  27500. "align-center": _ctx.alignCenter,
  27501. "close-icon": _ctx.closeIcon,
  27502. draggable: unref(draggable2),
  27503. fullscreen: _ctx.fullscreen,
  27504. "show-close": _ctx.showClose,
  27505. title: _ctx.title,
  27506. onClose: unref(handleClose)
  27507. }), createSlots({
  27508. header: withCtx(() => [
  27509. !_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
  27510. key: 0,
  27511. close: unref(handleClose),
  27512. titleId: unref(titleId),
  27513. titleClass: unref(ns2).e("title")
  27514. }) : renderSlot(_ctx.$slots, "title", { key: 1 })
  27515. ]),
  27516. default: withCtx(() => [
  27517. renderSlot(_ctx.$slots, "default")
  27518. ]),
  27519. _: 2
  27520. }, [
  27521. _ctx.$slots.footer ? {
  27522. name: "footer",
  27523. fn: withCtx(() => [
  27524. renderSlot(_ctx.$slots, "footer")
  27525. ])
  27526. } : void 0
  27527. ]), 1040, ["custom-class", "center", "align-center", "close-icon", "draggable", "fullscreen", "show-close", "title", "onClose"])) : createCommentVNode("v-if", true)
  27528. ]),
  27529. _: 3
  27530. }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
  27531. ], 46, _hoisted_131)
  27532. ]),
  27533. _: 3
  27534. }, 8, ["mask", "overlay-class", "z-index"]), [
  27535. [vShow, unref(visible)]
  27536. ])
  27537. ]),
  27538. _: 3
  27539. }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
  27540. ], 8, ["disabled"]);
  27541. };
  27542. }
  27543. });
  27544. var Dialog = _export_sfc(_sfc_main68, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);
  27545. // node_modules/element-plus/es/components/dialog/index.mjs
  27546. var ElDialog = withInstall(Dialog);
  27547. // node_modules/element-plus/es/components/divider/src/divider.mjs
  27548. var dividerProps = buildProps({
  27549. direction: {
  27550. type: String,
  27551. values: ["horizontal", "vertical"],
  27552. default: "horizontal"
  27553. },
  27554. contentPosition: {
  27555. type: String,
  27556. values: ["left", "center", "right"],
  27557. default: "center"
  27558. },
  27559. borderStyle: {
  27560. type: definePropType(String),
  27561. default: "solid"
  27562. }
  27563. });
  27564. // node_modules/element-plus/es/components/divider/src/divider2.mjs
  27565. var __default__50 = defineComponent({
  27566. name: "ElDivider"
  27567. });
  27568. var _sfc_main69 = defineComponent({
  27569. ...__default__50,
  27570. props: dividerProps,
  27571. setup(__props) {
  27572. const props = __props;
  27573. const ns2 = useNamespace("divider");
  27574. const dividerStyle = computed2(() => {
  27575. return ns2.cssVar({
  27576. "border-style": props.borderStyle
  27577. });
  27578. });
  27579. return (_ctx, _cache) => {
  27580. return openBlock(), createElementBlock("div", {
  27581. class: normalizeClass([unref(ns2).b(), unref(ns2).m(_ctx.direction)]),
  27582. style: normalizeStyle(unref(dividerStyle)),
  27583. role: "separator"
  27584. }, [
  27585. _ctx.$slots.default && _ctx.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
  27586. key: 0,
  27587. class: normalizeClass([unref(ns2).e("text"), unref(ns2).is(_ctx.contentPosition)])
  27588. }, [
  27589. renderSlot(_ctx.$slots, "default")
  27590. ], 2)) : createCommentVNode("v-if", true)
  27591. ], 6);
  27592. };
  27593. }
  27594. });
  27595. var Divider = _export_sfc(_sfc_main69, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);
  27596. // node_modules/element-plus/es/components/divider/index.mjs
  27597. var ElDivider = withInstall(Divider);
  27598. // node_modules/element-plus/es/components/drawer/src/drawer.mjs
  27599. var drawerProps = buildProps({
  27600. ...dialogProps,
  27601. direction: {
  27602. type: String,
  27603. default: "rtl",
  27604. values: ["ltr", "rtl", "ttb", "btt"]
  27605. },
  27606. size: {
  27607. type: [String, Number],
  27608. default: "30%"
  27609. },
  27610. withHeader: {
  27611. type: Boolean,
  27612. default: true
  27613. },
  27614. modalFade: {
  27615. type: Boolean,
  27616. default: true
  27617. }
  27618. });
  27619. var drawerEmits = dialogEmits;
  27620. // node_modules/element-plus/es/components/drawer/src/drawer2.mjs
  27621. var _sfc_main70 = defineComponent({
  27622. name: "ElDrawer",
  27623. components: {
  27624. ElOverlay,
  27625. ElFocusTrap,
  27626. ElIcon,
  27627. Close: close_default
  27628. },
  27629. inheritAttrs: false,
  27630. props: drawerProps,
  27631. emits: drawerEmits,
  27632. setup(props, { slots }) {
  27633. useDeprecated({
  27634. scope: "el-drawer",
  27635. from: "the title slot",
  27636. replacement: "the header slot",
  27637. version: "3.0.0",
  27638. ref: "https://element-plus.org/en-US/component/drawer.html#slots"
  27639. }, computed2(() => !!slots.title));
  27640. useDeprecated({
  27641. scope: "el-drawer",
  27642. from: "custom-class",
  27643. replacement: "class",
  27644. version: "2.3.0",
  27645. ref: "https://element-plus.org/en-US/component/drawer.html#attributes",
  27646. type: "Attribute"
  27647. }, computed2(() => !!props.customClass));
  27648. const drawerRef = ref();
  27649. const focusStartRef = ref();
  27650. const ns2 = useNamespace("drawer");
  27651. const { t } = useLocale();
  27652. const isHorizontal2 = computed2(() => props.direction === "rtl" || props.direction === "ltr");
  27653. const drawerSize = computed2(() => addUnit(props.size));
  27654. return {
  27655. ...useDialog(props, drawerRef),
  27656. drawerRef,
  27657. focusStartRef,
  27658. isHorizontal: isHorizontal2,
  27659. drawerSize,
  27660. ns: ns2,
  27661. t
  27662. };
  27663. }
  27664. });
  27665. var _hoisted_132 = ["aria-label", "aria-labelledby", "aria-describedby"];
  27666. var _hoisted_221 = ["id"];
  27667. var _hoisted_312 = ["aria-label"];
  27668. var _hoisted_45 = ["id"];
  27669. function _sfc_render10(_ctx, _cache, $props, $setup, $data, $options) {
  27670. const _component_close = resolveComponent("close");
  27671. const _component_el_icon = resolveComponent("el-icon");
  27672. const _component_el_focus_trap = resolveComponent("el-focus-trap");
  27673. const _component_el_overlay = resolveComponent("el-overlay");
  27674. return openBlock(), createBlock(Teleport, {
  27675. to: "body",
  27676. disabled: !_ctx.appendToBody
  27677. }, [
  27678. createVNode(Transition, {
  27679. name: _ctx.ns.b("fade"),
  27680. onAfterEnter: _ctx.afterEnter,
  27681. onAfterLeave: _ctx.afterLeave,
  27682. onBeforeLeave: _ctx.beforeLeave,
  27683. persisted: ""
  27684. }, {
  27685. default: withCtx(() => [
  27686. withDirectives(createVNode(_component_el_overlay, {
  27687. mask: _ctx.modal,
  27688. "overlay-class": _ctx.modalClass,
  27689. "z-index": _ctx.zIndex,
  27690. onClick: _ctx.onModalClick
  27691. }, {
  27692. default: withCtx(() => [
  27693. createVNode(_component_el_focus_trap, {
  27694. loop: "",
  27695. trapped: _ctx.visible,
  27696. "focus-trap-el": _ctx.drawerRef,
  27697. "focus-start-el": _ctx.focusStartRef,
  27698. onReleaseRequested: _ctx.onCloseRequested
  27699. }, {
  27700. default: withCtx(() => [
  27701. createBaseVNode("div", mergeProps({
  27702. ref: "drawerRef",
  27703. "aria-modal": "true",
  27704. "aria-label": _ctx.title || void 0,
  27705. "aria-labelledby": !_ctx.title ? _ctx.titleId : void 0,
  27706. "aria-describedby": _ctx.bodyId
  27707. }, _ctx.$attrs, {
  27708. class: [_ctx.ns.b(), _ctx.direction, _ctx.visible && "open", _ctx.customClass],
  27709. style: _ctx.isHorizontal ? "width: " + _ctx.drawerSize : "height: " + _ctx.drawerSize,
  27710. role: "dialog",
  27711. onClick: _cache[1] || (_cache[1] = withModifiers(() => {
  27712. }, ["stop"]))
  27713. }), [
  27714. createBaseVNode("span", {
  27715. ref: "focusStartRef",
  27716. class: normalizeClass(_ctx.ns.e("sr-focus")),
  27717. tabindex: "-1"
  27718. }, null, 2),
  27719. _ctx.withHeader ? (openBlock(), createElementBlock("header", {
  27720. key: 0,
  27721. class: normalizeClass(_ctx.ns.e("header"))
  27722. }, [
  27723. !_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
  27724. key: 0,
  27725. close: _ctx.handleClose,
  27726. titleId: _ctx.titleId,
  27727. titleClass: _ctx.ns.e("title")
  27728. }, () => [
  27729. !_ctx.$slots.title ? (openBlock(), createElementBlock("span", {
  27730. key: 0,
  27731. id: _ctx.titleId,
  27732. role: "heading",
  27733. class: normalizeClass(_ctx.ns.e("title"))
  27734. }, toDisplayString(_ctx.title), 11, _hoisted_221)) : createCommentVNode("v-if", true)
  27735. ]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
  27736. createCommentVNode(" DEPRECATED SLOT ")
  27737. ]),
  27738. _ctx.showClose ? (openBlock(), createElementBlock("button", {
  27739. key: 2,
  27740. "aria-label": _ctx.t("el.drawer.close"),
  27741. class: normalizeClass(_ctx.ns.e("close-btn")),
  27742. type: "button",
  27743. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))
  27744. }, [
  27745. createVNode(_component_el_icon, {
  27746. class: normalizeClass(_ctx.ns.e("close"))
  27747. }, {
  27748. default: withCtx(() => [
  27749. createVNode(_component_close)
  27750. ]),
  27751. _: 1
  27752. }, 8, ["class"])
  27753. ], 10, _hoisted_312)) : createCommentVNode("v-if", true)
  27754. ], 2)) : createCommentVNode("v-if", true),
  27755. _ctx.rendered ? (openBlock(), createElementBlock("div", {
  27756. key: 1,
  27757. id: _ctx.bodyId,
  27758. class: normalizeClass(_ctx.ns.e("body"))
  27759. }, [
  27760. renderSlot(_ctx.$slots, "default")
  27761. ], 10, _hoisted_45)) : createCommentVNode("v-if", true),
  27762. _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
  27763. key: 2,
  27764. class: normalizeClass(_ctx.ns.e("footer"))
  27765. }, [
  27766. renderSlot(_ctx.$slots, "footer")
  27767. ], 2)) : createCommentVNode("v-if", true)
  27768. ], 16, _hoisted_132)
  27769. ]),
  27770. _: 3
  27771. }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
  27772. ]),
  27773. _: 3
  27774. }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
  27775. [vShow, _ctx.visible]
  27776. ])
  27777. ]),
  27778. _: 3
  27779. }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
  27780. ], 8, ["disabled"]);
  27781. }
  27782. var Drawer = _export_sfc(_sfc_main70, [["render", _sfc_render10], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/drawer/src/drawer.vue"]]);
  27783. // node_modules/element-plus/es/components/drawer/index.mjs
  27784. var ElDrawer = withInstall(Drawer);
  27785. // node_modules/element-plus/es/components/collection/src/collection2.mjs
  27786. var _sfc_main71 = defineComponent({
  27787. inheritAttrs: false
  27788. });
  27789. function _sfc_render11(_ctx, _cache, $props, $setup, $data, $options) {
  27790. return renderSlot(_ctx.$slots, "default");
  27791. }
  27792. var Collection = _export_sfc(_sfc_main71, [["render", _sfc_render11], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);
  27793. // node_modules/element-plus/es/components/collection/src/collection-item.mjs
  27794. var _sfc_main72 = defineComponent({
  27795. name: "ElCollectionItem",
  27796. inheritAttrs: false
  27797. });
  27798. function _sfc_render12(_ctx, _cache, $props, $setup, $data, $options) {
  27799. return renderSlot(_ctx.$slots, "default");
  27800. }
  27801. var CollectionItem = _export_sfc(_sfc_main72, [["render", _sfc_render12], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);
  27802. // node_modules/element-plus/es/components/collection/src/collection.mjs
  27803. var COLLECTION_ITEM_SIGN = `data-el-collection-item`;
  27804. var createCollectionWithScope = (name) => {
  27805. const COLLECTION_NAME = `El${name}Collection`;
  27806. const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
  27807. const COLLECTION_INJECTION_KEY3 = Symbol(COLLECTION_NAME);
  27808. const COLLECTION_ITEM_INJECTION_KEY3 = Symbol(COLLECTION_ITEM_NAME);
  27809. const ElCollection3 = {
  27810. ...Collection,
  27811. name: COLLECTION_NAME,
  27812. setup() {
  27813. const collectionRef = ref(null);
  27814. const itemMap = /* @__PURE__ */ new Map();
  27815. const getItems = () => {
  27816. const collectionEl = unref(collectionRef);
  27817. if (!collectionEl)
  27818. return [];
  27819. const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
  27820. const items = [...itemMap.values()];
  27821. return items.sort((a2, b2) => orderedNodes.indexOf(a2.ref) - orderedNodes.indexOf(b2.ref));
  27822. };
  27823. provide(COLLECTION_INJECTION_KEY3, {
  27824. itemMap,
  27825. getItems,
  27826. collectionRef
  27827. });
  27828. }
  27829. };
  27830. const ElCollectionItem3 = {
  27831. ...CollectionItem,
  27832. name: COLLECTION_ITEM_NAME,
  27833. setup(_2, { attrs }) {
  27834. const collectionItemRef = ref(null);
  27835. const collectionInjection = inject(COLLECTION_INJECTION_KEY3, void 0);
  27836. provide(COLLECTION_ITEM_INJECTION_KEY3, {
  27837. collectionItemRef
  27838. });
  27839. onMounted(() => {
  27840. const collectionItemEl = unref(collectionItemRef);
  27841. if (collectionItemEl) {
  27842. collectionInjection.itemMap.set(collectionItemEl, {
  27843. ref: collectionItemEl,
  27844. ...attrs
  27845. });
  27846. }
  27847. });
  27848. onBeforeUnmount(() => {
  27849. const collectionItemEl = unref(collectionItemRef);
  27850. collectionInjection.itemMap.delete(collectionItemEl);
  27851. });
  27852. }
  27853. };
  27854. return {
  27855. COLLECTION_INJECTION_KEY: COLLECTION_INJECTION_KEY3,
  27856. COLLECTION_ITEM_INJECTION_KEY: COLLECTION_ITEM_INJECTION_KEY3,
  27857. ElCollection: ElCollection3,
  27858. ElCollectionItem: ElCollectionItem3
  27859. };
  27860. };
  27861. // node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
  27862. var rovingFocusGroupProps = buildProps({
  27863. style: { type: definePropType([String, Array, Object]) },
  27864. currentTabId: {
  27865. type: definePropType(String)
  27866. },
  27867. defaultCurrentTabId: String,
  27868. loop: Boolean,
  27869. dir: {
  27870. type: String,
  27871. values: ["ltr", "rtl"],
  27872. default: "ltr"
  27873. },
  27874. orientation: {
  27875. type: definePropType(String)
  27876. },
  27877. onBlur: Function,
  27878. onFocus: Function,
  27879. onMousedown: Function
  27880. });
  27881. var {
  27882. ElCollection,
  27883. ElCollectionItem,
  27884. COLLECTION_INJECTION_KEY,
  27885. COLLECTION_ITEM_INJECTION_KEY
  27886. } = createCollectionWithScope("RovingFocusGroup");
  27887. // node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
  27888. var ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
  27889. var ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
  27890. // node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
  27891. var MAP_KEY_TO_FOCUS_INTENT = {
  27892. ArrowLeft: "prev",
  27893. ArrowUp: "prev",
  27894. ArrowRight: "next",
  27895. ArrowDown: "next",
  27896. PageUp: "first",
  27897. Home: "first",
  27898. PageDown: "last",
  27899. End: "last"
  27900. };
  27901. var getDirectionAwareKey = (key, dir) => {
  27902. if (dir !== "rtl")
  27903. return key;
  27904. switch (key) {
  27905. case EVENT_CODE.right:
  27906. return EVENT_CODE.left;
  27907. case EVENT_CODE.left:
  27908. return EVENT_CODE.right;
  27909. default:
  27910. return key;
  27911. }
  27912. };
  27913. var getFocusIntent = (event, orientation, dir) => {
  27914. const key = getDirectionAwareKey(event.key, dir);
  27915. if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key))
  27916. return void 0;
  27917. if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key))
  27918. return void 0;
  27919. return MAP_KEY_TO_FOCUS_INTENT[key];
  27920. };
  27921. var reorderArray = (array4, atIdx) => {
  27922. return array4.map((_2, idx) => array4[(idx + atIdx) % array4.length]);
  27923. };
  27924. var focusFirst = (elements) => {
  27925. const { activeElement: prevActive } = document;
  27926. for (const element of elements) {
  27927. if (element === prevActive)
  27928. return;
  27929. element.focus();
  27930. if (prevActive !== document.activeElement)
  27931. return;
  27932. }
  27933. };
  27934. // node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
  27935. var CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
  27936. var ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
  27937. var EVT_OPTS = { bubbles: false, cancelable: true };
  27938. var _sfc_main73 = defineComponent({
  27939. name: "ElRovingFocusGroupImpl",
  27940. inheritAttrs: false,
  27941. props: rovingFocusGroupProps,
  27942. emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
  27943. setup(props, { emit }) {
  27944. var _a2;
  27945. const currentTabbedId = ref((_a2 = props.currentTabId || props.defaultCurrentTabId) != null ? _a2 : null);
  27946. const isBackingOut = ref(false);
  27947. const isClickFocus = ref(false);
  27948. const rovingFocusGroupRef = ref(null);
  27949. const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
  27950. const rovingFocusGroupRootStyle = computed2(() => {
  27951. return [
  27952. {
  27953. outline: "none"
  27954. },
  27955. props.style
  27956. ];
  27957. });
  27958. const onItemFocus = (tabbedId) => {
  27959. emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId);
  27960. };
  27961. const onItemShiftTab = () => {
  27962. isBackingOut.value = true;
  27963. };
  27964. const onMousedown = composeEventHandlers((e) => {
  27965. var _a22;
  27966. (_a22 = props.onMousedown) == null ? void 0 : _a22.call(props, e);
  27967. }, () => {
  27968. isClickFocus.value = true;
  27969. });
  27970. const onFocus = composeEventHandlers((e) => {
  27971. var _a22;
  27972. (_a22 = props.onFocus) == null ? void 0 : _a22.call(props, e);
  27973. }, (e) => {
  27974. const isKeyboardFocus = !unref(isClickFocus);
  27975. const { target: target2, currentTarget } = e;
  27976. if (target2 === currentTarget && isKeyboardFocus && !unref(isBackingOut)) {
  27977. const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS);
  27978. currentTarget == null ? void 0 : currentTarget.dispatchEvent(entryFocusEvt);
  27979. if (!entryFocusEvt.defaultPrevented) {
  27980. const items = getItems().filter((item) => item.focusable);
  27981. const activeItem = items.find((item) => item.active);
  27982. const currentItem = items.find((item) => item.id === unref(currentTabbedId));
  27983. const candidates = [activeItem, currentItem, ...items].filter(Boolean);
  27984. const candidateNodes = candidates.map((item) => item.ref);
  27985. focusFirst(candidateNodes);
  27986. }
  27987. }
  27988. isClickFocus.value = false;
  27989. });
  27990. const onBlur = composeEventHandlers((e) => {
  27991. var _a22;
  27992. (_a22 = props.onBlur) == null ? void 0 : _a22.call(props, e);
  27993. }, () => {
  27994. isBackingOut.value = false;
  27995. });
  27996. const handleEntryFocus = (...args) => {
  27997. emit("entryFocus", ...args);
  27998. };
  27999. provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {
  28000. currentTabbedId: readonly(currentTabbedId),
  28001. loop: toRef(props, "loop"),
  28002. tabIndex: computed2(() => {
  28003. return unref(isBackingOut) ? -1 : 0;
  28004. }),
  28005. rovingFocusGroupRef,
  28006. rovingFocusGroupRootStyle,
  28007. orientation: toRef(props, "orientation"),
  28008. dir: toRef(props, "dir"),
  28009. onItemFocus,
  28010. onItemShiftTab,
  28011. onBlur,
  28012. onFocus,
  28013. onMousedown
  28014. });
  28015. watch(() => props.currentTabId, (val) => {
  28016. currentTabbedId.value = val != null ? val : null;
  28017. });
  28018. useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
  28019. }
  28020. });
  28021. function _sfc_render13(_ctx, _cache, $props, $setup, $data, $options) {
  28022. return renderSlot(_ctx.$slots, "default");
  28023. }
  28024. var ElRovingFocusGroupImpl = _export_sfc(_sfc_main73, [["render", _sfc_render13], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group-impl.vue"]]);
  28025. // node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
  28026. var _sfc_main74 = defineComponent({
  28027. name: "ElRovingFocusGroup",
  28028. components: {
  28029. ElFocusGroupCollection: ElCollection,
  28030. ElRovingFocusGroupImpl
  28031. }
  28032. });
  28033. function _sfc_render14(_ctx, _cache, $props, $setup, $data, $options) {
  28034. const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
  28035. const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
  28036. return openBlock(), createBlock(_component_el_focus_group_collection, null, {
  28037. default: withCtx(() => [
  28038. createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
  28039. default: withCtx(() => [
  28040. renderSlot(_ctx.$slots, "default")
  28041. ]),
  28042. _: 3
  28043. }, 16)
  28044. ]),
  28045. _: 3
  28046. });
  28047. }
  28048. var ElRovingFocusGroup = _export_sfc(_sfc_main74, [["render", _sfc_render14], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group.vue"]]);
  28049. // node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
  28050. var _sfc_main75 = defineComponent({
  28051. components: {
  28052. ElRovingFocusCollectionItem: ElCollectionItem
  28053. },
  28054. props: {
  28055. focusable: {
  28056. type: Boolean,
  28057. default: true
  28058. },
  28059. active: {
  28060. type: Boolean,
  28061. default: false
  28062. }
  28063. },
  28064. emits: ["mousedown", "focus", "keydown"],
  28065. setup(props, { emit }) {
  28066. const { currentTabbedId, loop, onItemFocus, onItemShiftTab } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
  28067. const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
  28068. const id2 = useId();
  28069. const rovingFocusGroupItemRef = ref(null);
  28070. const handleMousedown = composeEventHandlers((e) => {
  28071. emit("mousedown", e);
  28072. }, (e) => {
  28073. if (!props.focusable) {
  28074. e.preventDefault();
  28075. } else {
  28076. onItemFocus(unref(id2));
  28077. }
  28078. });
  28079. const handleFocus = composeEventHandlers((e) => {
  28080. emit("focus", e);
  28081. }, () => {
  28082. onItemFocus(unref(id2));
  28083. });
  28084. const handleKeydown = composeEventHandlers((e) => {
  28085. emit("keydown", e);
  28086. }, (e) => {
  28087. const { key, shiftKey, target: target2, currentTarget } = e;
  28088. if (key === EVENT_CODE.tab && shiftKey) {
  28089. onItemShiftTab();
  28090. return;
  28091. }
  28092. if (target2 !== currentTarget)
  28093. return;
  28094. const focusIntent = getFocusIntent(e);
  28095. if (focusIntent) {
  28096. e.preventDefault();
  28097. const items = getItems().filter((item) => item.focusable);
  28098. let elements = items.map((item) => item.ref);
  28099. switch (focusIntent) {
  28100. case "last": {
  28101. elements.reverse();
  28102. break;
  28103. }
  28104. case "prev":
  28105. case "next": {
  28106. if (focusIntent === "prev") {
  28107. elements.reverse();
  28108. }
  28109. const currentIdx = elements.indexOf(currentTarget);
  28110. elements = loop.value ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1);
  28111. break;
  28112. }
  28113. default: {
  28114. break;
  28115. }
  28116. }
  28117. nextTick(() => {
  28118. focusFirst(elements);
  28119. });
  28120. }
  28121. });
  28122. const isCurrentTab = computed2(() => currentTabbedId.value === unref(id2));
  28123. provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {
  28124. rovingFocusGroupItemRef,
  28125. tabIndex: computed2(() => unref(isCurrentTab) ? 0 : -1),
  28126. handleMousedown,
  28127. handleFocus,
  28128. handleKeydown
  28129. });
  28130. return {
  28131. id: id2,
  28132. handleKeydown,
  28133. handleFocus,
  28134. handleMousedown
  28135. };
  28136. }
  28137. });
  28138. function _sfc_render15(_ctx, _cache, $props, $setup, $data, $options) {
  28139. const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item");
  28140. return openBlock(), createBlock(_component_el_roving_focus_collection_item, {
  28141. id: _ctx.id,
  28142. focusable: _ctx.focusable,
  28143. active: _ctx.active
  28144. }, {
  28145. default: withCtx(() => [
  28146. renderSlot(_ctx.$slots, "default")
  28147. ]),
  28148. _: 3
  28149. }, 8, ["id", "focusable", "active"]);
  28150. }
  28151. var ElRovingFocusItem = _export_sfc(_sfc_main75, [["render", _sfc_render15], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-item.vue"]]);
  28152. // node_modules/element-plus/es/components/dropdown/src/dropdown.mjs
  28153. var dropdownProps = buildProps({
  28154. trigger: useTooltipTriggerProps.trigger,
  28155. effect: {
  28156. ...useTooltipContentProps.effect,
  28157. default: "light"
  28158. },
  28159. type: {
  28160. type: definePropType(String)
  28161. },
  28162. placement: {
  28163. type: definePropType(String),
  28164. default: "bottom"
  28165. },
  28166. popperOptions: {
  28167. type: definePropType(Object),
  28168. default: () => ({})
  28169. },
  28170. id: String,
  28171. size: {
  28172. type: String,
  28173. default: ""
  28174. },
  28175. splitButton: Boolean,
  28176. hideOnClick: {
  28177. type: Boolean,
  28178. default: true
  28179. },
  28180. loop: {
  28181. type: Boolean,
  28182. default: true
  28183. },
  28184. showTimeout: {
  28185. type: Number,
  28186. default: 150
  28187. },
  28188. hideTimeout: {
  28189. type: Number,
  28190. default: 150
  28191. },
  28192. tabindex: {
  28193. type: definePropType([Number, String]),
  28194. default: 0
  28195. },
  28196. maxHeight: {
  28197. type: definePropType([Number, String]),
  28198. default: ""
  28199. },
  28200. popperClass: {
  28201. type: String,
  28202. default: ""
  28203. },
  28204. disabled: {
  28205. type: Boolean,
  28206. default: false
  28207. },
  28208. role: {
  28209. type: String,
  28210. default: "menu"
  28211. },
  28212. buttonProps: {
  28213. type: definePropType(Object)
  28214. },
  28215. teleported: useTooltipContentProps.teleported
  28216. });
  28217. var dropdownItemProps = buildProps({
  28218. command: {
  28219. type: [Object, String, Number],
  28220. default: () => ({})
  28221. },
  28222. disabled: Boolean,
  28223. divided: Boolean,
  28224. textValue: String,
  28225. icon: {
  28226. type: iconPropType
  28227. }
  28228. });
  28229. var dropdownMenuProps = buildProps({
  28230. onKeydown: { type: definePropType(Function) }
  28231. });
  28232. var FIRST_KEYS = [
  28233. EVENT_CODE.down,
  28234. EVENT_CODE.pageDown,
  28235. EVENT_CODE.home
  28236. ];
  28237. var LAST_KEYS = [EVENT_CODE.up, EVENT_CODE.pageUp, EVENT_CODE.end];
  28238. var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
  28239. var {
  28240. ElCollection: ElCollection2,
  28241. ElCollectionItem: ElCollectionItem2,
  28242. COLLECTION_INJECTION_KEY: COLLECTION_INJECTION_KEY2,
  28243. COLLECTION_ITEM_INJECTION_KEY: COLLECTION_ITEM_INJECTION_KEY2
  28244. } = createCollectionWithScope("Dropdown");
  28245. // node_modules/element-plus/es/components/dropdown/src/tokens.mjs
  28246. var DROPDOWN_INJECTION_KEY = Symbol("elDropdown");
  28247. // node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs
  28248. var { ButtonGroup: ElButtonGroup2 } = ElButton;
  28249. var _sfc_main76 = defineComponent({
  28250. name: "ElDropdown",
  28251. components: {
  28252. ElButton,
  28253. ElButtonGroup: ElButtonGroup2,
  28254. ElScrollbar,
  28255. ElDropdownCollection: ElCollection2,
  28256. ElTooltip,
  28257. ElRovingFocusGroup,
  28258. ElOnlyChild: OnlyChild,
  28259. ElIcon,
  28260. ArrowDown: arrow_down_default
  28261. },
  28262. props: dropdownProps,
  28263. emits: ["visible-change", "click", "command"],
  28264. setup(props, { emit }) {
  28265. const _instance = getCurrentInstance();
  28266. const ns2 = useNamespace("dropdown");
  28267. const { t } = useLocale();
  28268. const triggeringElementRef = ref();
  28269. const referenceElementRef = ref();
  28270. const popperRef = ref(null);
  28271. const contentRef = ref(null);
  28272. const scrollbar = ref(null);
  28273. const currentTabId = ref(null);
  28274. const isUsingKeyboard = ref(false);
  28275. const triggerKeys = [EVENT_CODE.enter, EVENT_CODE.space, EVENT_CODE.down];
  28276. const wrapStyle = computed2(() => ({
  28277. maxHeight: addUnit(props.maxHeight)
  28278. }));
  28279. const dropdownTriggerKls = computed2(() => [ns2.m(dropdownSize.value)]);
  28280. const defaultTriggerId = useId().value;
  28281. const triggerId = computed2(() => {
  28282. return props.id || defaultTriggerId;
  28283. });
  28284. function handleClick() {
  28285. handleClose();
  28286. }
  28287. function handleClose() {
  28288. var _a2;
  28289. (_a2 = popperRef.value) == null ? void 0 : _a2.onClose();
  28290. }
  28291. function handleOpen() {
  28292. var _a2;
  28293. (_a2 = popperRef.value) == null ? void 0 : _a2.onOpen();
  28294. }
  28295. const dropdownSize = useSize();
  28296. function commandHandler(...args) {
  28297. emit("command", ...args);
  28298. }
  28299. function onItemEnter() {
  28300. }
  28301. function onItemLeave() {
  28302. const contentEl = unref(contentRef);
  28303. contentEl == null ? void 0 : contentEl.focus();
  28304. currentTabId.value = null;
  28305. }
  28306. function handleCurrentTabIdChange(id2) {
  28307. currentTabId.value = id2;
  28308. }
  28309. function handleEntryFocus(e) {
  28310. if (!isUsingKeyboard.value) {
  28311. e.preventDefault();
  28312. e.stopImmediatePropagation();
  28313. }
  28314. }
  28315. function handleBeforeShowTooltip() {
  28316. emit("visible-change", true);
  28317. }
  28318. function handleShowTooltip(event) {
  28319. if ((event == null ? void 0 : event.type) === "keydown") {
  28320. contentRef.value.focus();
  28321. }
  28322. }
  28323. function handleBeforeHideTooltip() {
  28324. emit("visible-change", false);
  28325. }
  28326. provide(DROPDOWN_INJECTION_KEY, {
  28327. contentRef,
  28328. role: computed2(() => props.role),
  28329. triggerId,
  28330. isUsingKeyboard,
  28331. onItemEnter,
  28332. onItemLeave
  28333. });
  28334. provide("elDropdown", {
  28335. instance: _instance,
  28336. dropdownSize,
  28337. handleClick,
  28338. commandHandler,
  28339. trigger: toRef(props, "trigger"),
  28340. hideOnClick: toRef(props, "hideOnClick")
  28341. });
  28342. const onFocusAfterTrapped = (e) => {
  28343. var _a2, _b;
  28344. e.preventDefault();
  28345. (_b = (_a2 = contentRef.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2, {
  28346. preventScroll: true
  28347. });
  28348. };
  28349. const handlerMainButtonClick = (event) => {
  28350. emit("click", event);
  28351. };
  28352. return {
  28353. t,
  28354. ns: ns2,
  28355. scrollbar,
  28356. wrapStyle,
  28357. dropdownTriggerKls,
  28358. dropdownSize,
  28359. triggerId,
  28360. triggerKeys,
  28361. currentTabId,
  28362. handleCurrentTabIdChange,
  28363. handlerMainButtonClick,
  28364. handleEntryFocus,
  28365. handleClose,
  28366. handleOpen,
  28367. handleBeforeShowTooltip,
  28368. handleShowTooltip,
  28369. handleBeforeHideTooltip,
  28370. onFocusAfterTrapped,
  28371. popperRef,
  28372. contentRef,
  28373. triggeringElementRef,
  28374. referenceElementRef
  28375. };
  28376. }
  28377. });
  28378. function _sfc_render16(_ctx, _cache, $props, $setup, $data, $options) {
  28379. var _a2;
  28380. const _component_el_dropdown_collection = resolveComponent("el-dropdown-collection");
  28381. const _component_el_roving_focus_group = resolveComponent("el-roving-focus-group");
  28382. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  28383. const _component_el_only_child = resolveComponent("el-only-child");
  28384. const _component_el_tooltip = resolveComponent("el-tooltip");
  28385. const _component_el_button = resolveComponent("el-button");
  28386. const _component_arrow_down = resolveComponent("arrow-down");
  28387. const _component_el_icon = resolveComponent("el-icon");
  28388. const _component_el_button_group = resolveComponent("el-button-group");
  28389. return openBlock(), createElementBlock("div", {
  28390. class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("disabled", _ctx.disabled)])
  28391. }, [
  28392. createVNode(_component_el_tooltip, {
  28393. ref: "popperRef",
  28394. role: _ctx.role,
  28395. effect: _ctx.effect,
  28396. "fallback-placements": ["bottom", "top"],
  28397. "popper-options": _ctx.popperOptions,
  28398. "gpu-acceleration": false,
  28399. "hide-after": _ctx.trigger === "hover" ? _ctx.hideTimeout : 0,
  28400. "manual-mode": true,
  28401. placement: _ctx.placement,
  28402. "popper-class": [_ctx.ns.e("popper"), _ctx.popperClass],
  28403. "reference-element": (_a2 = _ctx.referenceElementRef) == null ? void 0 : _a2.$el,
  28404. trigger: _ctx.trigger,
  28405. "trigger-keys": _ctx.triggerKeys,
  28406. "trigger-target-el": _ctx.contentRef,
  28407. "show-after": _ctx.trigger === "hover" ? _ctx.showTimeout : 0,
  28408. "stop-popper-mouse-event": false,
  28409. "virtual-ref": _ctx.triggeringElementRef,
  28410. "virtual-triggering": _ctx.splitButton,
  28411. disabled: _ctx.disabled,
  28412. transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
  28413. teleported: _ctx.teleported,
  28414. pure: "",
  28415. persistent: "",
  28416. onBeforeShow: _ctx.handleBeforeShowTooltip,
  28417. onShow: _ctx.handleShowTooltip,
  28418. onBeforeHide: _ctx.handleBeforeHideTooltip
  28419. }, createSlots({
  28420. content: withCtx(() => [
  28421. createVNode(_component_el_scrollbar, {
  28422. ref: "scrollbar",
  28423. "wrap-style": _ctx.wrapStyle,
  28424. tag: "div",
  28425. "view-class": _ctx.ns.e("list")
  28426. }, {
  28427. default: withCtx(() => [
  28428. createVNode(_component_el_roving_focus_group, {
  28429. loop: _ctx.loop,
  28430. "current-tab-id": _ctx.currentTabId,
  28431. orientation: "horizontal",
  28432. onCurrentTabIdChange: _ctx.handleCurrentTabIdChange,
  28433. onEntryFocus: _ctx.handleEntryFocus
  28434. }, {
  28435. default: withCtx(() => [
  28436. createVNode(_component_el_dropdown_collection, null, {
  28437. default: withCtx(() => [
  28438. renderSlot(_ctx.$slots, "dropdown")
  28439. ]),
  28440. _: 3
  28441. })
  28442. ]),
  28443. _: 3
  28444. }, 8, ["loop", "current-tab-id", "onCurrentTabIdChange", "onEntryFocus"])
  28445. ]),
  28446. _: 3
  28447. }, 8, ["wrap-style", "view-class"])
  28448. ]),
  28449. _: 2
  28450. }, [
  28451. !_ctx.splitButton ? {
  28452. name: "default",
  28453. fn: withCtx(() => [
  28454. createVNode(_component_el_only_child, {
  28455. id: _ctx.triggerId,
  28456. role: "button",
  28457. tabindex: _ctx.tabindex
  28458. }, {
  28459. default: withCtx(() => [
  28460. renderSlot(_ctx.$slots, "default")
  28461. ]),
  28462. _: 3
  28463. }, 8, ["id", "tabindex"])
  28464. ])
  28465. } : void 0
  28466. ]), 1032, ["role", "effect", "popper-options", "hide-after", "placement", "popper-class", "reference-element", "trigger", "trigger-keys", "trigger-target-el", "show-after", "virtual-ref", "virtual-triggering", "disabled", "transition", "teleported", "onBeforeShow", "onShow", "onBeforeHide"]),
  28467. _ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, {
  28468. default: withCtx(() => [
  28469. createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
  28470. size: _ctx.dropdownSize,
  28471. type: _ctx.type,
  28472. disabled: _ctx.disabled,
  28473. tabindex: _ctx.tabindex,
  28474. onClick: _ctx.handlerMainButtonClick
  28475. }), {
  28476. default: withCtx(() => [
  28477. renderSlot(_ctx.$slots, "default")
  28478. ]),
  28479. _: 3
  28480. }, 16, ["size", "type", "disabled", "tabindex", "onClick"]),
  28481. createVNode(_component_el_button, mergeProps({
  28482. id: _ctx.triggerId,
  28483. ref: "triggeringElementRef"
  28484. }, _ctx.buttonProps, {
  28485. role: "button",
  28486. size: _ctx.dropdownSize,
  28487. type: _ctx.type,
  28488. class: _ctx.ns.e("caret-button"),
  28489. disabled: _ctx.disabled,
  28490. tabindex: _ctx.tabindex,
  28491. "aria-label": _ctx.t("el.dropdown.toggleDropdown")
  28492. }), {
  28493. default: withCtx(() => [
  28494. createVNode(_component_el_icon, {
  28495. class: normalizeClass(_ctx.ns.e("icon"))
  28496. }, {
  28497. default: withCtx(() => [
  28498. createVNode(_component_arrow_down)
  28499. ]),
  28500. _: 1
  28501. }, 8, ["class"])
  28502. ]),
  28503. _: 1
  28504. }, 16, ["id", "size", "type", "class", "disabled", "tabindex", "aria-label"])
  28505. ]),
  28506. _: 3
  28507. })) : createCommentVNode("v-if", true)
  28508. ], 2);
  28509. }
  28510. var Dropdown = _export_sfc(_sfc_main76, [["render", _sfc_render16], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown.vue"]]);
  28511. // node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.mjs
  28512. var _sfc_main77 = defineComponent({
  28513. name: "DropdownItemImpl",
  28514. components: {
  28515. ElIcon
  28516. },
  28517. props: dropdownItemProps,
  28518. emits: ["pointermove", "pointerleave", "click", "clickimpl"],
  28519. setup(_2, { emit }) {
  28520. const ns2 = useNamespace("dropdown");
  28521. const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, void 0);
  28522. const { collectionItemRef: dropdownCollectionItemRef } = inject(COLLECTION_ITEM_INJECTION_KEY2, void 0);
  28523. const { collectionItemRef: rovingFocusCollectionItemRef } = inject(COLLECTION_ITEM_INJECTION_KEY, void 0);
  28524. const {
  28525. rovingFocusGroupItemRef,
  28526. tabIndex,
  28527. handleFocus,
  28528. handleKeydown: handleItemKeydown,
  28529. handleMousedown
  28530. } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, void 0);
  28531. const itemRef = composeRefs(dropdownCollectionItemRef, rovingFocusCollectionItemRef, rovingFocusGroupItemRef);
  28532. const role = computed2(() => {
  28533. if (menuRole.value === "menu") {
  28534. return "menuitem";
  28535. } else if (menuRole.value === "navigation") {
  28536. return "link";
  28537. }
  28538. return "button";
  28539. });
  28540. const handleKeydown = composeEventHandlers((e) => {
  28541. const { code } = e;
  28542. if (code === EVENT_CODE.enter || code === EVENT_CODE.space) {
  28543. e.preventDefault();
  28544. e.stopImmediatePropagation();
  28545. emit("clickimpl", e);
  28546. return true;
  28547. }
  28548. }, handleItemKeydown);
  28549. return {
  28550. ns: ns2,
  28551. itemRef,
  28552. dataset: {
  28553. [COLLECTION_ITEM_SIGN]: ""
  28554. },
  28555. role,
  28556. tabIndex,
  28557. handleFocus,
  28558. handleKeydown,
  28559. handleMousedown
  28560. };
  28561. }
  28562. });
  28563. var _hoisted_133 = ["aria-disabled", "tabindex", "role"];
  28564. function _sfc_render17(_ctx, _cache, $props, $setup, $data, $options) {
  28565. const _component_el_icon = resolveComponent("el-icon");
  28566. return openBlock(), createElementBlock(Fragment, null, [
  28567. _ctx.divided ? (openBlock(), createElementBlock("li", mergeProps({
  28568. key: 0,
  28569. role: "separator",
  28570. class: _ctx.ns.bem("menu", "item", "divided")
  28571. }, _ctx.$attrs), null, 16)) : createCommentVNode("v-if", true),
  28572. createBaseVNode("li", mergeProps({ ref: _ctx.itemRef }, { ..._ctx.dataset, ..._ctx.$attrs }, {
  28573. "aria-disabled": _ctx.disabled,
  28574. class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)],
  28575. tabindex: _ctx.tabIndex,
  28576. role: _ctx.role,
  28577. onClick: _cache[0] || (_cache[0] = (e) => _ctx.$emit("clickimpl", e)),
  28578. onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  28579. onKeydown: _cache[2] || (_cache[2] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
  28580. onMousedown: _cache[3] || (_cache[3] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
  28581. onPointermove: _cache[4] || (_cache[4] = (e) => _ctx.$emit("pointermove", e)),
  28582. onPointerleave: _cache[5] || (_cache[5] = (e) => _ctx.$emit("pointerleave", e))
  28583. }), [
  28584. _ctx.icon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
  28585. default: withCtx(() => [
  28586. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  28587. ]),
  28588. _: 1
  28589. })) : createCommentVNode("v-if", true),
  28590. renderSlot(_ctx.$slots, "default")
  28591. ], 16, _hoisted_133)
  28592. ], 64);
  28593. }
  28594. var ElDropdownItemImpl = _export_sfc(_sfc_main77, [["render", _sfc_render17], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item-impl.vue"]]);
  28595. // node_modules/element-plus/es/components/dropdown/src/useDropdown.mjs
  28596. var useDropdown = () => {
  28597. const elDropdown = inject("elDropdown", {});
  28598. const _elDropdownSize = computed2(() => elDropdown == null ? void 0 : elDropdown.dropdownSize);
  28599. return {
  28600. elDropdown,
  28601. _elDropdownSize
  28602. };
  28603. };
  28604. // node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs
  28605. var _sfc_main78 = defineComponent({
  28606. name: "ElDropdownItem",
  28607. components: {
  28608. ElDropdownCollectionItem: ElCollectionItem2,
  28609. ElRovingFocusItem,
  28610. ElDropdownItemImpl
  28611. },
  28612. inheritAttrs: false,
  28613. props: dropdownItemProps,
  28614. emits: ["pointermove", "pointerleave", "click"],
  28615. setup(props, { emit, attrs }) {
  28616. const { elDropdown } = useDropdown();
  28617. const _instance = getCurrentInstance();
  28618. const itemRef = ref(null);
  28619. const textContent = computed2(() => {
  28620. var _a2, _b;
  28621. return (_b = (_a2 = unref(itemRef)) == null ? void 0 : _a2.textContent) != null ? _b : "";
  28622. });
  28623. const { onItemEnter, onItemLeave } = inject(DROPDOWN_INJECTION_KEY, void 0);
  28624. const handlePointerMove = composeEventHandlers((e) => {
  28625. emit("pointermove", e);
  28626. return e.defaultPrevented;
  28627. }, whenMouse((e) => {
  28628. var _a2;
  28629. if (props.disabled) {
  28630. onItemLeave(e);
  28631. } else {
  28632. onItemEnter(e);
  28633. if (!e.defaultPrevented) {
  28634. ;
  28635. (_a2 = e.currentTarget) == null ? void 0 : _a2.focus();
  28636. }
  28637. }
  28638. }));
  28639. const handlePointerLeave = composeEventHandlers((e) => {
  28640. emit("pointerleave", e);
  28641. return e.defaultPrevented;
  28642. }, whenMouse((e) => {
  28643. onItemLeave(e);
  28644. }));
  28645. const handleClick = composeEventHandlers((e) => {
  28646. if (props.disabled) {
  28647. return;
  28648. }
  28649. emit("click", e);
  28650. return e.type !== "keydown" && e.defaultPrevented;
  28651. }, (e) => {
  28652. var _a2, _b, _c;
  28653. if (props.disabled) {
  28654. e.stopImmediatePropagation();
  28655. return;
  28656. }
  28657. if ((_a2 = elDropdown == null ? void 0 : elDropdown.hideOnClick) == null ? void 0 : _a2.value) {
  28658. (_b = elDropdown.handleClick) == null ? void 0 : _b.call(elDropdown);
  28659. }
  28660. (_c = elDropdown.commandHandler) == null ? void 0 : _c.call(elDropdown, props.command, _instance, e);
  28661. });
  28662. const propsAndAttrs = computed2(() => {
  28663. return { ...props, ...attrs };
  28664. });
  28665. return {
  28666. handleClick,
  28667. handlePointerMove,
  28668. handlePointerLeave,
  28669. textContent,
  28670. propsAndAttrs
  28671. };
  28672. }
  28673. });
  28674. function _sfc_render18(_ctx, _cache, $props, $setup, $data, $options) {
  28675. var _a2;
  28676. const _component_el_dropdown_item_impl = resolveComponent("el-dropdown-item-impl");
  28677. const _component_el_roving_focus_item = resolveComponent("el-roving-focus-item");
  28678. const _component_el_dropdown_collection_item = resolveComponent("el-dropdown-collection-item");
  28679. return openBlock(), createBlock(_component_el_dropdown_collection_item, {
  28680. disabled: _ctx.disabled,
  28681. "text-value": (_a2 = _ctx.textValue) != null ? _a2 : _ctx.textContent
  28682. }, {
  28683. default: withCtx(() => [
  28684. createVNode(_component_el_roving_focus_item, {
  28685. focusable: !_ctx.disabled
  28686. }, {
  28687. default: withCtx(() => [
  28688. createVNode(_component_el_dropdown_item_impl, mergeProps(_ctx.propsAndAttrs, {
  28689. onPointerleave: _ctx.handlePointerLeave,
  28690. onPointermove: _ctx.handlePointerMove,
  28691. onClickimpl: _ctx.handleClick
  28692. }), {
  28693. default: withCtx(() => [
  28694. renderSlot(_ctx.$slots, "default")
  28695. ]),
  28696. _: 3
  28697. }, 16, ["onPointerleave", "onPointermove", "onClickimpl"])
  28698. ]),
  28699. _: 3
  28700. }, 8, ["focusable"])
  28701. ]),
  28702. _: 3
  28703. }, 8, ["disabled", "text-value"]);
  28704. }
  28705. var DropdownItem = _export_sfc(_sfc_main78, [["render", _sfc_render18], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item.vue"]]);
  28706. // node_modules/element-plus/es/components/dropdown/src/dropdown-menu.mjs
  28707. var _sfc_main79 = defineComponent({
  28708. name: "ElDropdownMenu",
  28709. props: dropdownMenuProps,
  28710. setup(props) {
  28711. const ns2 = useNamespace("dropdown");
  28712. const { _elDropdownSize } = useDropdown();
  28713. const size3 = _elDropdownSize.value;
  28714. const { focusTrapRef, onKeydown } = inject(FOCUS_TRAP_INJECTION_KEY, void 0);
  28715. const { contentRef, role, triggerId } = inject(DROPDOWN_INJECTION_KEY, void 0);
  28716. const { collectionRef: dropdownCollectionRef, getItems } = inject(COLLECTION_INJECTION_KEY2, void 0);
  28717. const {
  28718. rovingFocusGroupRef,
  28719. rovingFocusGroupRootStyle,
  28720. tabIndex,
  28721. onBlur,
  28722. onFocus,
  28723. onMousedown
  28724. } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
  28725. const { collectionRef: rovingFocusGroupCollectionRef } = inject(COLLECTION_INJECTION_KEY, void 0);
  28726. const dropdownKls = computed2(() => {
  28727. return [ns2.b("menu"), ns2.bm("menu", size3 == null ? void 0 : size3.value)];
  28728. });
  28729. const dropdownListWrapperRef = composeRefs(contentRef, dropdownCollectionRef, focusTrapRef, rovingFocusGroupRef, rovingFocusGroupCollectionRef);
  28730. const composedKeydown = composeEventHandlers((e) => {
  28731. var _a2;
  28732. (_a2 = props.onKeydown) == null ? void 0 : _a2.call(props, e);
  28733. }, (e) => {
  28734. const { currentTarget, code, target: target2 } = e;
  28735. const isKeydownContained = currentTarget.contains(target2);
  28736. if (isKeydownContained) {
  28737. }
  28738. if (EVENT_CODE.tab === code) {
  28739. e.stopImmediatePropagation();
  28740. }
  28741. e.preventDefault();
  28742. if (target2 !== unref(contentRef))
  28743. return;
  28744. if (!FIRST_LAST_KEYS.includes(code))
  28745. return;
  28746. const items = getItems().filter((item) => !item.disabled);
  28747. const targets = items.map((item) => item.ref);
  28748. if (LAST_KEYS.includes(code)) {
  28749. targets.reverse();
  28750. }
  28751. focusFirst(targets);
  28752. });
  28753. const handleKeydown = (e) => {
  28754. composedKeydown(e);
  28755. onKeydown(e);
  28756. };
  28757. return {
  28758. size: size3,
  28759. rovingFocusGroupRootStyle,
  28760. tabIndex,
  28761. dropdownKls,
  28762. role,
  28763. triggerId,
  28764. dropdownListWrapperRef,
  28765. handleKeydown,
  28766. onBlur,
  28767. onFocus,
  28768. onMousedown
  28769. };
  28770. }
  28771. });
  28772. var _hoisted_134 = ["role", "aria-labelledby"];
  28773. function _sfc_render19(_ctx, _cache, $props, $setup, $data, $options) {
  28774. return openBlock(), createElementBlock("ul", {
  28775. ref: _ctx.dropdownListWrapperRef,
  28776. class: normalizeClass(_ctx.dropdownKls),
  28777. style: normalizeStyle(_ctx.rovingFocusGroupRootStyle),
  28778. tabindex: -1,
  28779. role: _ctx.role,
  28780. "aria-labelledby": _ctx.triggerId,
  28781. onBlur: _cache[0] || (_cache[0] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
  28782. onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
  28783. onKeydown: _cache[2] || (_cache[2] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
  28784. onMousedown: _cache[3] || (_cache[3] = (...args) => _ctx.onMousedown && _ctx.onMousedown(...args))
  28785. }, [
  28786. renderSlot(_ctx.$slots, "default")
  28787. ], 46, _hoisted_134);
  28788. }
  28789. var DropdownMenu = _export_sfc(_sfc_main79, [["render", _sfc_render19], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-menu.vue"]]);
  28790. // node_modules/element-plus/es/components/dropdown/index.mjs
  28791. var ElDropdown = withInstall(Dropdown, {
  28792. DropdownItem,
  28793. DropdownMenu
  28794. });
  28795. var ElDropdownItem = withNoopInstall(DropdownItem);
  28796. var ElDropdownMenu = withNoopInstall(DropdownMenu);
  28797. // node_modules/element-plus/es/components/empty/src/img-empty.mjs
  28798. var id = 0;
  28799. var _sfc_main80 = defineComponent({
  28800. name: "ImgEmpty",
  28801. setup() {
  28802. const ns2 = useNamespace("empty");
  28803. return {
  28804. ns: ns2,
  28805. id: ++id
  28806. };
  28807. }
  28808. });
  28809. var _hoisted_135 = {
  28810. viewBox: "0 0 79 86",
  28811. version: "1.1",
  28812. xmlns: "http://www.w3.org/2000/svg",
  28813. "xmlns:xlink": "http://www.w3.org/1999/xlink"
  28814. };
  28815. var _hoisted_222 = ["id"];
  28816. var _hoisted_313 = ["stop-color"];
  28817. var _hoisted_46 = ["stop-color"];
  28818. var _hoisted_53 = ["id"];
  28819. var _hoisted_6 = ["stop-color"];
  28820. var _hoisted_7 = ["stop-color"];
  28821. var _hoisted_8 = ["id"];
  28822. var _hoisted_9 = {
  28823. id: "Illustrations",
  28824. stroke: "none",
  28825. "stroke-width": "1",
  28826. fill: "none",
  28827. "fill-rule": "evenodd"
  28828. };
  28829. var _hoisted_10 = {
  28830. id: "B-type",
  28831. transform: "translate(-1268.000000, -535.000000)"
  28832. };
  28833. var _hoisted_11 = {
  28834. id: "Group-2",
  28835. transform: "translate(1268.000000, 535.000000)"
  28836. };
  28837. var _hoisted_1210 = ["fill"];
  28838. var _hoisted_136 = ["fill"];
  28839. var _hoisted_142 = {
  28840. id: "Group-Copy",
  28841. transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"
  28842. };
  28843. var _hoisted_152 = ["fill"];
  28844. var _hoisted_162 = ["fill"];
  28845. var _hoisted_172 = ["fill"];
  28846. var _hoisted_182 = ["fill"];
  28847. var _hoisted_192 = ["fill"];
  28848. var _hoisted_20 = {
  28849. id: "Rectangle-Copy-17",
  28850. transform: "translate(53.000000, 45.000000)"
  28851. };
  28852. var _hoisted_21 = ["fill", "xlink:href"];
  28853. var _hoisted_223 = ["fill", "mask"];
  28854. var _hoisted_232 = ["fill"];
  28855. function _sfc_render20(_ctx, _cache, $props, $setup, $data, $options) {
  28856. return openBlock(), createElementBlock("svg", _hoisted_135, [
  28857. createBaseVNode("defs", null, [
  28858. createBaseVNode("linearGradient", {
  28859. id: `linearGradient-1-${_ctx.id}`,
  28860. x1: "38.8503086%",
  28861. y1: "0%",
  28862. x2: "61.1496914%",
  28863. y2: "100%"
  28864. }, [
  28865. createBaseVNode("stop", {
  28866. "stop-color": `var(${_ctx.ns.cssVarBlockName("fill-color-1")})`,
  28867. offset: "0%"
  28868. }, null, 8, _hoisted_313),
  28869. createBaseVNode("stop", {
  28870. "stop-color": `var(${_ctx.ns.cssVarBlockName("fill-color-4")})`,
  28871. offset: "100%"
  28872. }, null, 8, _hoisted_46)
  28873. ], 8, _hoisted_222),
  28874. createBaseVNode("linearGradient", {
  28875. id: `linearGradient-2-${_ctx.id}`,
  28876. x1: "0%",
  28877. y1: "9.5%",
  28878. x2: "100%",
  28879. y2: "90.5%"
  28880. }, [
  28881. createBaseVNode("stop", {
  28882. "stop-color": `var(${_ctx.ns.cssVarBlockName("fill-color-1")})`,
  28883. offset: "0%"
  28884. }, null, 8, _hoisted_6),
  28885. createBaseVNode("stop", {
  28886. "stop-color": `var(${_ctx.ns.cssVarBlockName("fill-color-6")})`,
  28887. offset: "100%"
  28888. }, null, 8, _hoisted_7)
  28889. ], 8, _hoisted_53),
  28890. createBaseVNode("rect", {
  28891. id: `path-3-${_ctx.id}`,
  28892. x: "0",
  28893. y: "0",
  28894. width: "17",
  28895. height: "36"
  28896. }, null, 8, _hoisted_8)
  28897. ]),
  28898. createBaseVNode("g", _hoisted_9, [
  28899. createBaseVNode("g", _hoisted_10, [
  28900. createBaseVNode("g", _hoisted_11, [
  28901. createBaseVNode("path", {
  28902. id: "Oval-Copy-2",
  28903. 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",
  28904. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-3")})`
  28905. }, null, 8, _hoisted_1210),
  28906. createBaseVNode("polygon", {
  28907. id: "Rectangle-Copy-14",
  28908. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-7")})`,
  28909. transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
  28910. points: "13 58 53 58 42 45 2 45"
  28911. }, null, 8, _hoisted_136),
  28912. createBaseVNode("g", _hoisted_142, [
  28913. createBaseVNode("polygon", {
  28914. id: "Rectangle-Copy-10",
  28915. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-7")})`,
  28916. transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
  28917. points: "2.84078316e-14 3 18 3 23 7 5 7"
  28918. }, null, 8, _hoisted_152),
  28919. createBaseVNode("polygon", {
  28920. id: "Rectangle-Copy-11",
  28921. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-5")})`,
  28922. points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
  28923. }, null, 8, _hoisted_162),
  28924. createBaseVNode("rect", {
  28925. id: "Rectangle-Copy-12",
  28926. fill: `url(#linearGradient-1-${_ctx.id})`,
  28927. transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
  28928. x: "38",
  28929. y: "7",
  28930. width: "17",
  28931. height: "36"
  28932. }, null, 8, _hoisted_172),
  28933. createBaseVNode("polygon", {
  28934. id: "Rectangle-Copy-13",
  28935. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-2")})`,
  28936. transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
  28937. points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
  28938. }, null, 8, _hoisted_182)
  28939. ]),
  28940. createBaseVNode("rect", {
  28941. id: "Rectangle-Copy-15",
  28942. fill: `url(#linearGradient-2-${_ctx.id})`,
  28943. x: "13",
  28944. y: "45",
  28945. width: "40",
  28946. height: "36"
  28947. }, null, 8, _hoisted_192),
  28948. createBaseVNode("g", _hoisted_20, [
  28949. createBaseVNode("use", {
  28950. id: "Mask",
  28951. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-8")})`,
  28952. transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
  28953. "xlink:href": `#path-3-${_ctx.id}`
  28954. }, null, 8, _hoisted_21),
  28955. createBaseVNode("polygon", {
  28956. id: "Rectangle-Copy",
  28957. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-9")})`,
  28958. mask: `url(#mask-4-${_ctx.id})`,
  28959. transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
  28960. points: "7 0 24 0 20 18 7 16.5"
  28961. }, null, 8, _hoisted_223)
  28962. ]),
  28963. createBaseVNode("polygon", {
  28964. id: "Rectangle-Copy-18",
  28965. fill: `var(${_ctx.ns.cssVarBlockName("fill-color-2")})`,
  28966. transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
  28967. points: "62 45 79 45 70 58 53 58"
  28968. }, null, 8, _hoisted_232)
  28969. ])
  28970. ])
  28971. ])
  28972. ]);
  28973. }
  28974. var ImgEmpty = _export_sfc(_sfc_main80, [["render", _sfc_render20], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/empty/src/img-empty.vue"]]);
  28975. // node_modules/element-plus/es/components/empty/src/empty.mjs
  28976. var emptyProps = {
  28977. image: {
  28978. type: String,
  28979. default: ""
  28980. },
  28981. imageSize: Number,
  28982. description: {
  28983. type: String,
  28984. default: ""
  28985. }
  28986. };
  28987. // node_modules/element-plus/es/components/empty/src/empty2.mjs
  28988. var _hoisted_137 = ["src"];
  28989. var _hoisted_224 = { key: 1 };
  28990. var __default__51 = defineComponent({
  28991. name: "ElEmpty"
  28992. });
  28993. var _sfc_main81 = defineComponent({
  28994. ...__default__51,
  28995. props: emptyProps,
  28996. setup(__props) {
  28997. const props = __props;
  28998. const { t } = useLocale();
  28999. const ns2 = useNamespace("empty");
  29000. const emptyDescription = computed2(() => props.description || t("el.table.emptyText"));
  29001. const imageStyle = computed2(() => ({
  29002. width: props.imageSize ? `${props.imageSize}px` : ""
  29003. }));
  29004. return (_ctx, _cache) => {
  29005. return openBlock(), createElementBlock("div", {
  29006. class: normalizeClass(unref(ns2).b())
  29007. }, [
  29008. createBaseVNode("div", {
  29009. class: normalizeClass(unref(ns2).e("image")),
  29010. style: normalizeStyle(unref(imageStyle))
  29011. }, [
  29012. _ctx.image ? (openBlock(), createElementBlock("img", {
  29013. key: 0,
  29014. src: _ctx.image,
  29015. ondragstart: "return false"
  29016. }, null, 8, _hoisted_137)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
  29017. createVNode(ImgEmpty)
  29018. ])
  29019. ], 6),
  29020. createBaseVNode("div", {
  29021. class: normalizeClass(unref(ns2).e("description"))
  29022. }, [
  29023. _ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", _hoisted_224, toDisplayString(unref(emptyDescription)), 1))
  29024. ], 2),
  29025. _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
  29026. key: 0,
  29027. class: normalizeClass(unref(ns2).e("bottom"))
  29028. }, [
  29029. renderSlot(_ctx.$slots, "default")
  29030. ], 2)) : createCommentVNode("v-if", true)
  29031. ], 2);
  29032. };
  29033. }
  29034. });
  29035. var Empty = _export_sfc(_sfc_main81, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/empty/src/empty.vue"]]);
  29036. // node_modules/element-plus/es/components/empty/index.mjs
  29037. var ElEmpty = withInstall(Empty);
  29038. // node_modules/element-plus/es/components/form/src/form.mjs
  29039. var formProps = buildProps({
  29040. model: Object,
  29041. rules: {
  29042. type: definePropType(Object)
  29043. },
  29044. labelPosition: {
  29045. type: String,
  29046. values: ["left", "right", "top"],
  29047. default: "right"
  29048. },
  29049. requireAsteriskPosition: {
  29050. type: String,
  29051. values: ["left", "right"],
  29052. default: "left"
  29053. },
  29054. labelWidth: {
  29055. type: [String, Number],
  29056. default: ""
  29057. },
  29058. labelSuffix: {
  29059. type: String,
  29060. default: ""
  29061. },
  29062. inline: Boolean,
  29063. inlineMessage: Boolean,
  29064. statusIcon: Boolean,
  29065. showMessage: {
  29066. type: Boolean,
  29067. default: true
  29068. },
  29069. size: {
  29070. type: String,
  29071. values: componentSizes
  29072. },
  29073. disabled: Boolean,
  29074. validateOnRuleChange: {
  29075. type: Boolean,
  29076. default: true
  29077. },
  29078. hideRequiredAsterisk: {
  29079. type: Boolean,
  29080. default: false
  29081. },
  29082. scrollToError: Boolean
  29083. });
  29084. var formEmits = {
  29085. validate: (prop, isValid, message2) => (isArray(prop) || isString(prop)) && isBoolean2(isValid) && isString(message2)
  29086. };
  29087. // node_modules/element-plus/es/components/form/src/utils.mjs
  29088. var SCOPE3 = "ElForm";
  29089. function useFormLabelWidth() {
  29090. const potentialLabelWidthArr = ref([]);
  29091. const autoLabelWidth = computed2(() => {
  29092. if (!potentialLabelWidthArr.value.length)
  29093. return "0";
  29094. const max5 = Math.max(...potentialLabelWidthArr.value);
  29095. return max5 ? `${max5}px` : "";
  29096. });
  29097. function getLabelWidthIndex(width) {
  29098. const index = potentialLabelWidthArr.value.indexOf(width);
  29099. if (index === -1 && autoLabelWidth.value === "0") {
  29100. debugWarn(SCOPE3, `unexpected width ${width}`);
  29101. }
  29102. return index;
  29103. }
  29104. function registerLabelWidth(val, oldVal) {
  29105. if (val && oldVal) {
  29106. const index = getLabelWidthIndex(oldVal);
  29107. potentialLabelWidthArr.value.splice(index, 1, val);
  29108. } else if (val) {
  29109. potentialLabelWidthArr.value.push(val);
  29110. }
  29111. }
  29112. function deregisterLabelWidth(val) {
  29113. const index = getLabelWidthIndex(val);
  29114. if (index > -1) {
  29115. potentialLabelWidthArr.value.splice(index, 1);
  29116. }
  29117. }
  29118. return {
  29119. autoLabelWidth,
  29120. registerLabelWidth,
  29121. deregisterLabelWidth
  29122. };
  29123. }
  29124. var filterFields = (fields, props) => {
  29125. const normalized = castArray_default(props);
  29126. return normalized.length > 0 ? fields.filter((field) => field.prop && normalized.includes(field.prop)) : fields;
  29127. };
  29128. // node_modules/element-plus/es/components/form/src/form2.mjs
  29129. var COMPONENT_NAME10 = "ElForm";
  29130. var __default__52 = defineComponent({
  29131. name: COMPONENT_NAME10
  29132. });
  29133. var _sfc_main82 = defineComponent({
  29134. ...__default__52,
  29135. props: formProps,
  29136. emits: formEmits,
  29137. setup(__props, { expose, emit }) {
  29138. const props = __props;
  29139. const fields = [];
  29140. const formSize = useSize();
  29141. const ns2 = useNamespace("form");
  29142. const formClasses = computed2(() => {
  29143. const { labelPosition, inline: inline2 } = props;
  29144. return [
  29145. ns2.b(),
  29146. ns2.m(formSize.value || "default"),
  29147. {
  29148. [ns2.m(`label-${labelPosition}`)]: labelPosition,
  29149. [ns2.m("inline")]: inline2
  29150. }
  29151. ];
  29152. });
  29153. const addField = (field) => {
  29154. fields.push(field);
  29155. };
  29156. const removeField = (field) => {
  29157. if (field.prop) {
  29158. fields.splice(fields.indexOf(field), 1);
  29159. }
  29160. };
  29161. const resetFields = (properties = []) => {
  29162. if (!props.model) {
  29163. debugWarn(COMPONENT_NAME10, "model is required for resetFields to work.");
  29164. return;
  29165. }
  29166. filterFields(fields, properties).forEach((field) => field.resetField());
  29167. };
  29168. const clearValidate = (props2 = []) => {
  29169. filterFields(fields, props2).forEach((field) => field.clearValidate());
  29170. };
  29171. const isValidatable = computed2(() => {
  29172. const hasModel = !!props.model;
  29173. if (!hasModel) {
  29174. debugWarn(COMPONENT_NAME10, "model is required for validate to work.");
  29175. }
  29176. return hasModel;
  29177. });
  29178. const obtainValidateFields = (props2) => {
  29179. if (fields.length === 0)
  29180. return [];
  29181. const filteredFields = filterFields(fields, props2);
  29182. if (!filteredFields.length) {
  29183. debugWarn(COMPONENT_NAME10, "please pass correct props!");
  29184. return [];
  29185. }
  29186. return filteredFields;
  29187. };
  29188. const validate = async (callback) => validateField(void 0, callback);
  29189. const doValidateField = async (props2 = []) => {
  29190. if (!isValidatable.value)
  29191. return false;
  29192. const fields2 = obtainValidateFields(props2);
  29193. if (fields2.length === 0)
  29194. return true;
  29195. let validationErrors = {};
  29196. for (const field of fields2) {
  29197. try {
  29198. await field.validate("");
  29199. } catch (fields3) {
  29200. validationErrors = {
  29201. ...validationErrors,
  29202. ...fields3
  29203. };
  29204. }
  29205. }
  29206. if (Object.keys(validationErrors).length === 0)
  29207. return true;
  29208. return Promise.reject(validationErrors);
  29209. };
  29210. const validateField = async (modelProps = [], callback) => {
  29211. const shouldThrow = !isFunction(callback);
  29212. try {
  29213. const result2 = await doValidateField(modelProps);
  29214. if (result2 === true) {
  29215. callback == null ? void 0 : callback(result2);
  29216. }
  29217. return result2;
  29218. } catch (e) {
  29219. if (e instanceof Error)
  29220. throw e;
  29221. const invalidFields = e;
  29222. if (props.scrollToError) {
  29223. scrollToField(Object.keys(invalidFields)[0]);
  29224. }
  29225. callback == null ? void 0 : callback(false, invalidFields);
  29226. return shouldThrow && Promise.reject(invalidFields);
  29227. }
  29228. };
  29229. const scrollToField = (prop) => {
  29230. var _a2;
  29231. const field = filterFields(fields, prop)[0];
  29232. if (field) {
  29233. (_a2 = field.$el) == null ? void 0 : _a2.scrollIntoView();
  29234. }
  29235. };
  29236. watch(() => props.rules, () => {
  29237. if (props.validateOnRuleChange) {
  29238. validate().catch((err) => debugWarn(err));
  29239. }
  29240. }, { deep: true });
  29241. provide(formContextKey, reactive({
  29242. ...toRefs(props),
  29243. emit,
  29244. resetFields,
  29245. clearValidate,
  29246. validateField,
  29247. addField,
  29248. removeField,
  29249. ...useFormLabelWidth()
  29250. }));
  29251. expose({
  29252. validate,
  29253. validateField,
  29254. resetFields,
  29255. clearValidate,
  29256. scrollToField
  29257. });
  29258. return (_ctx, _cache) => {
  29259. return openBlock(), createElementBlock("form", {
  29260. class: normalizeClass(unref(formClasses))
  29261. }, [
  29262. renderSlot(_ctx.$slots, "default")
  29263. ], 2);
  29264. };
  29265. }
  29266. });
  29267. var Form = _export_sfc(_sfc_main82, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);
  29268. // node_modules/async-validator/dist-web/index.js
  29269. function _extends() {
  29270. _extends = Object.assign ? Object.assign.bind() : function(target2) {
  29271. for (var i = 1; i < arguments.length; i++) {
  29272. var source = arguments[i];
  29273. for (var key in source) {
  29274. if (Object.prototype.hasOwnProperty.call(source, key)) {
  29275. target2[key] = source[key];
  29276. }
  29277. }
  29278. }
  29279. return target2;
  29280. };
  29281. return _extends.apply(this, arguments);
  29282. }
  29283. function _inheritsLoose(subClass, superClass) {
  29284. subClass.prototype = Object.create(superClass.prototype);
  29285. subClass.prototype.constructor = subClass;
  29286. _setPrototypeOf(subClass, superClass);
  29287. }
  29288. function _getPrototypeOf(o2) {
  29289. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o3) {
  29290. return o3.__proto__ || Object.getPrototypeOf(o3);
  29291. };
  29292. return _getPrototypeOf(o2);
  29293. }
  29294. function _setPrototypeOf(o2, p2) {
  29295. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
  29296. o3.__proto__ = p3;
  29297. return o3;
  29298. };
  29299. return _setPrototypeOf(o2, p2);
  29300. }
  29301. function _isNativeReflectConstruct() {
  29302. if (typeof Reflect === "undefined" || !Reflect.construct)
  29303. return false;
  29304. if (Reflect.construct.sham)
  29305. return false;
  29306. if (typeof Proxy === "function")
  29307. return true;
  29308. try {
  29309. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  29310. }));
  29311. return true;
  29312. } catch (e) {
  29313. return false;
  29314. }
  29315. }
  29316. function _construct(Parent, args, Class) {
  29317. if (_isNativeReflectConstruct()) {
  29318. _construct = Reflect.construct.bind();
  29319. } else {
  29320. _construct = function _construct2(Parent2, args2, Class2) {
  29321. var a2 = [null];
  29322. a2.push.apply(a2, args2);
  29323. var Constructor = Function.bind.apply(Parent2, a2);
  29324. var instance = new Constructor();
  29325. if (Class2)
  29326. _setPrototypeOf(instance, Class2.prototype);
  29327. return instance;
  29328. };
  29329. }
  29330. return _construct.apply(null, arguments);
  29331. }
  29332. function _isNativeFunction(fn2) {
  29333. return Function.toString.call(fn2).indexOf("[native code]") !== -1;
  29334. }
  29335. function _wrapNativeSuper(Class) {
  29336. var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
  29337. _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
  29338. if (Class2 === null || !_isNativeFunction(Class2))
  29339. return Class2;
  29340. if (typeof Class2 !== "function") {
  29341. throw new TypeError("Super expression must either be null or a function");
  29342. }
  29343. if (typeof _cache !== "undefined") {
  29344. if (_cache.has(Class2))
  29345. return _cache.get(Class2);
  29346. _cache.set(Class2, Wrapper);
  29347. }
  29348. function Wrapper() {
  29349. return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
  29350. }
  29351. Wrapper.prototype = Object.create(Class2.prototype, {
  29352. constructor: {
  29353. value: Wrapper,
  29354. enumerable: false,
  29355. writable: true,
  29356. configurable: true
  29357. }
  29358. });
  29359. return _setPrototypeOf(Wrapper, Class2);
  29360. };
  29361. return _wrapNativeSuper(Class);
  29362. }
  29363. var formatRegExp = /%[sdj%]/g;
  29364. var warning = function warning2() {
  29365. };
  29366. if (typeof process !== "undefined" && process.env && true && typeof window !== "undefined" && typeof document !== "undefined") {
  29367. warning = function warning3(type4, errors) {
  29368. if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
  29369. if (errors.every(function(e) {
  29370. return typeof e === "string";
  29371. })) {
  29372. console.warn(type4, errors);
  29373. }
  29374. }
  29375. };
  29376. }
  29377. function convertFieldsError(errors) {
  29378. if (!errors || !errors.length)
  29379. return null;
  29380. var fields = {};
  29381. errors.forEach(function(error) {
  29382. var field = error.field;
  29383. fields[field] = fields[field] || [];
  29384. fields[field].push(error);
  29385. });
  29386. return fields;
  29387. }
  29388. function format(template2) {
  29389. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  29390. args[_key - 1] = arguments[_key];
  29391. }
  29392. var i = 0;
  29393. var len = args.length;
  29394. if (typeof template2 === "function") {
  29395. return template2.apply(null, args);
  29396. }
  29397. if (typeof template2 === "string") {
  29398. var str = template2.replace(formatRegExp, function(x2) {
  29399. if (x2 === "%%") {
  29400. return "%";
  29401. }
  29402. if (i >= len) {
  29403. return x2;
  29404. }
  29405. switch (x2) {
  29406. case "%s":
  29407. return String(args[i++]);
  29408. case "%d":
  29409. return Number(args[i++]);
  29410. case "%j":
  29411. try {
  29412. return JSON.stringify(args[i++]);
  29413. } catch (_2) {
  29414. return "[Circular]";
  29415. }
  29416. break;
  29417. default:
  29418. return x2;
  29419. }
  29420. });
  29421. return str;
  29422. }
  29423. return template2;
  29424. }
  29425. function isNativeStringType(type4) {
  29426. return type4 === "string" || type4 === "url" || type4 === "hex" || type4 === "email" || type4 === "date" || type4 === "pattern";
  29427. }
  29428. function isEmptyValue(value, type4) {
  29429. if (value === void 0 || value === null) {
  29430. return true;
  29431. }
  29432. if (type4 === "array" && Array.isArray(value) && !value.length) {
  29433. return true;
  29434. }
  29435. if (isNativeStringType(type4) && typeof value === "string" && !value) {
  29436. return true;
  29437. }
  29438. return false;
  29439. }
  29440. function asyncParallelArray(arr, func, callback) {
  29441. var results = [];
  29442. var total2 = 0;
  29443. var arrLength = arr.length;
  29444. function count(errors) {
  29445. results.push.apply(results, errors || []);
  29446. total2++;
  29447. if (total2 === arrLength) {
  29448. callback(results);
  29449. }
  29450. }
  29451. arr.forEach(function(a2) {
  29452. func(a2, count);
  29453. });
  29454. }
  29455. function asyncSerialArray(arr, func, callback) {
  29456. var index = 0;
  29457. var arrLength = arr.length;
  29458. function next(errors) {
  29459. if (errors && errors.length) {
  29460. callback(errors);
  29461. return;
  29462. }
  29463. var original = index;
  29464. index = index + 1;
  29465. if (original < arrLength) {
  29466. func(arr[original], next);
  29467. } else {
  29468. callback([]);
  29469. }
  29470. }
  29471. next([]);
  29472. }
  29473. function flattenObjArr(objArr) {
  29474. var ret = [];
  29475. Object.keys(objArr).forEach(function(k) {
  29476. ret.push.apply(ret, objArr[k] || []);
  29477. });
  29478. return ret;
  29479. }
  29480. var AsyncValidationError = function(_Error) {
  29481. _inheritsLoose(AsyncValidationError2, _Error);
  29482. function AsyncValidationError2(errors, fields) {
  29483. var _this;
  29484. _this = _Error.call(this, "Async Validation Error") || this;
  29485. _this.errors = errors;
  29486. _this.fields = fields;
  29487. return _this;
  29488. }
  29489. return AsyncValidationError2;
  29490. }(_wrapNativeSuper(Error));
  29491. function asyncMap(objArr, option, func, callback, source) {
  29492. if (option.first) {
  29493. var _pending = new Promise(function(resolve, reject2) {
  29494. var next = function next2(errors) {
  29495. callback(errors);
  29496. return errors.length ? reject2(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
  29497. };
  29498. var flattenArr = flattenObjArr(objArr);
  29499. asyncSerialArray(flattenArr, func, next);
  29500. });
  29501. _pending["catch"](function(e) {
  29502. return e;
  29503. });
  29504. return _pending;
  29505. }
  29506. var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
  29507. var objArrKeys = Object.keys(objArr);
  29508. var objArrLength = objArrKeys.length;
  29509. var total2 = 0;
  29510. var results = [];
  29511. var pending = new Promise(function(resolve, reject2) {
  29512. var next = function next2(errors) {
  29513. results.push.apply(results, errors);
  29514. total2++;
  29515. if (total2 === objArrLength) {
  29516. callback(results);
  29517. return results.length ? reject2(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
  29518. }
  29519. };
  29520. if (!objArrKeys.length) {
  29521. callback(results);
  29522. resolve(source);
  29523. }
  29524. objArrKeys.forEach(function(key) {
  29525. var arr = objArr[key];
  29526. if (firstFields.indexOf(key) !== -1) {
  29527. asyncSerialArray(arr, func, next);
  29528. } else {
  29529. asyncParallelArray(arr, func, next);
  29530. }
  29531. });
  29532. });
  29533. pending["catch"](function(e) {
  29534. return e;
  29535. });
  29536. return pending;
  29537. }
  29538. function isErrorObj(obj) {
  29539. return !!(obj && obj.message !== void 0);
  29540. }
  29541. function getValue2(value, path) {
  29542. var v2 = value;
  29543. for (var i = 0; i < path.length; i++) {
  29544. if (v2 == void 0) {
  29545. return v2;
  29546. }
  29547. v2 = v2[path[i]];
  29548. }
  29549. return v2;
  29550. }
  29551. function complementError(rule, source) {
  29552. return function(oe) {
  29553. var fieldValue;
  29554. if (rule.fullFields) {
  29555. fieldValue = getValue2(source, rule.fullFields);
  29556. } else {
  29557. fieldValue = source[oe.field || rule.fullField];
  29558. }
  29559. if (isErrorObj(oe)) {
  29560. oe.field = oe.field || rule.fullField;
  29561. oe.fieldValue = fieldValue;
  29562. return oe;
  29563. }
  29564. return {
  29565. message: typeof oe === "function" ? oe() : oe,
  29566. fieldValue,
  29567. field: oe.field || rule.fullField
  29568. };
  29569. };
  29570. }
  29571. function deepMerge(target2, source) {
  29572. if (source) {
  29573. for (var s2 in source) {
  29574. if (source.hasOwnProperty(s2)) {
  29575. var value = source[s2];
  29576. if (typeof value === "object" && typeof target2[s2] === "object") {
  29577. target2[s2] = _extends({}, target2[s2], value);
  29578. } else {
  29579. target2[s2] = value;
  29580. }
  29581. }
  29582. }
  29583. }
  29584. return target2;
  29585. }
  29586. var required$1 = function required(rule, value, source, errors, options, type4) {
  29587. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type4 || rule.type))) {
  29588. errors.push(format(options.messages.required, rule.fullField));
  29589. }
  29590. };
  29591. var whitespace = function whitespace2(rule, value, source, errors, options) {
  29592. if (/^\s+$/.test(value) || value === "") {
  29593. errors.push(format(options.messages.whitespace, rule.fullField));
  29594. }
  29595. };
  29596. var urlReg;
  29597. var getUrlRegex = function() {
  29598. if (urlReg) {
  29599. return urlReg;
  29600. }
  29601. var word = "[a-fA-F\\d:]";
  29602. var b2 = function b3(options) {
  29603. return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
  29604. };
  29605. 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}";
  29606. var v6seg = "[a-fA-F\\d]{1,4}";
  29607. 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();
  29608. var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
  29609. var v4exact = new RegExp("^" + v4 + "$");
  29610. var v6exact = new RegExp("^" + v6 + "$");
  29611. var ip = function ip2(options) {
  29612. return options && options.exact ? v46Exact : new RegExp("(?:" + b2(options) + v4 + b2(options) + ")|(?:" + b2(options) + v6 + b2(options) + ")", "g");
  29613. };
  29614. ip.v4 = function(options) {
  29615. return options && options.exact ? v4exact : new RegExp("" + b2(options) + v4 + b2(options), "g");
  29616. };
  29617. ip.v6 = function(options) {
  29618. return options && options.exact ? v6exact : new RegExp("" + b2(options) + v6 + b2(options), "g");
  29619. };
  29620. var protocol = "(?:(?:[a-z]+:)?//)";
  29621. var auth = "(?:\\S+(?::\\S*)?@)?";
  29622. var ipv4 = ip.v4().source;
  29623. var ipv6 = ip.v6().source;
  29624. var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
  29625. var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
  29626. var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
  29627. var port = "(?::\\d{2,5})?";
  29628. var path = '(?:[/?#][^\\s"]*)?';
  29629. var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
  29630. urlReg = new RegExp("(?:^" + regex + "$)", "i");
  29631. return urlReg;
  29632. };
  29633. var pattern$2 = {
  29634. 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,}))$/,
  29635. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  29636. };
  29637. var types = {
  29638. integer: function integer(value) {
  29639. return types.number(value) && parseInt(value, 10) === value;
  29640. },
  29641. "float": function float(value) {
  29642. return types.number(value) && !types.integer(value);
  29643. },
  29644. array: function array(value) {
  29645. return Array.isArray(value);
  29646. },
  29647. regexp: function regexp(value) {
  29648. if (value instanceof RegExp) {
  29649. return true;
  29650. }
  29651. try {
  29652. return !!new RegExp(value);
  29653. } catch (e) {
  29654. return false;
  29655. }
  29656. },
  29657. date: function date2(value) {
  29658. return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
  29659. },
  29660. number: function number(value) {
  29661. if (isNaN(value)) {
  29662. return false;
  29663. }
  29664. return typeof value === "number";
  29665. },
  29666. object: function object(value) {
  29667. return typeof value === "object" && !types.array(value);
  29668. },
  29669. method: function method2(value) {
  29670. return typeof value === "function";
  29671. },
  29672. email: function email(value) {
  29673. return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
  29674. },
  29675. url: function url(value) {
  29676. return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
  29677. },
  29678. hex: function hex(value) {
  29679. return typeof value === "string" && !!value.match(pattern$2.hex);
  29680. }
  29681. };
  29682. var type$1 = function type(rule, value, source, errors, options) {
  29683. if (rule.required && value === void 0) {
  29684. required$1(rule, value, source, errors, options);
  29685. return;
  29686. }
  29687. var custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  29688. var ruleType = rule.type;
  29689. if (custom.indexOf(ruleType) > -1) {
  29690. if (!types[ruleType](value)) {
  29691. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  29692. }
  29693. } else if (ruleType && typeof value !== rule.type) {
  29694. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  29695. }
  29696. };
  29697. var range2 = function range3(rule, value, source, errors, options) {
  29698. var len = typeof rule.len === "number";
  29699. var min5 = typeof rule.min === "number";
  29700. var max5 = typeof rule.max === "number";
  29701. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  29702. var val = value;
  29703. var key = null;
  29704. var num = typeof value === "number";
  29705. var str = typeof value === "string";
  29706. var arr = Array.isArray(value);
  29707. if (num) {
  29708. key = "number";
  29709. } else if (str) {
  29710. key = "string";
  29711. } else if (arr) {
  29712. key = "array";
  29713. }
  29714. if (!key) {
  29715. return false;
  29716. }
  29717. if (arr) {
  29718. val = value.length;
  29719. }
  29720. if (str) {
  29721. val = value.replace(spRegexp, "_").length;
  29722. }
  29723. if (len) {
  29724. if (val !== rule.len) {
  29725. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  29726. }
  29727. } else if (min5 && !max5 && val < rule.min) {
  29728. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  29729. } else if (max5 && !min5 && val > rule.max) {
  29730. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  29731. } else if (min5 && max5 && (val < rule.min || val > rule.max)) {
  29732. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  29733. }
  29734. };
  29735. var ENUM$1 = "enum";
  29736. var enumerable$1 = function enumerable(rule, value, source, errors, options) {
  29737. rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
  29738. if (rule[ENUM$1].indexOf(value) === -1) {
  29739. errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
  29740. }
  29741. };
  29742. var pattern$1 = function pattern(rule, value, source, errors, options) {
  29743. if (rule.pattern) {
  29744. if (rule.pattern instanceof RegExp) {
  29745. rule.pattern.lastIndex = 0;
  29746. if (!rule.pattern.test(value)) {
  29747. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  29748. }
  29749. } else if (typeof rule.pattern === "string") {
  29750. var _pattern = new RegExp(rule.pattern);
  29751. if (!_pattern.test(value)) {
  29752. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  29753. }
  29754. }
  29755. }
  29756. };
  29757. var rules = {
  29758. required: required$1,
  29759. whitespace,
  29760. type: type$1,
  29761. range: range2,
  29762. "enum": enumerable$1,
  29763. pattern: pattern$1
  29764. };
  29765. var string = function string2(rule, value, callback, source, options) {
  29766. var errors = [];
  29767. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29768. if (validate) {
  29769. if (isEmptyValue(value, "string") && !rule.required) {
  29770. return callback();
  29771. }
  29772. rules.required(rule, value, source, errors, options, "string");
  29773. if (!isEmptyValue(value, "string")) {
  29774. rules.type(rule, value, source, errors, options);
  29775. rules.range(rule, value, source, errors, options);
  29776. rules.pattern(rule, value, source, errors, options);
  29777. if (rule.whitespace === true) {
  29778. rules.whitespace(rule, value, source, errors, options);
  29779. }
  29780. }
  29781. }
  29782. callback(errors);
  29783. };
  29784. var method3 = function method4(rule, value, callback, source, options) {
  29785. var errors = [];
  29786. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29787. if (validate) {
  29788. if (isEmptyValue(value) && !rule.required) {
  29789. return callback();
  29790. }
  29791. rules.required(rule, value, source, errors, options);
  29792. if (value !== void 0) {
  29793. rules.type(rule, value, source, errors, options);
  29794. }
  29795. }
  29796. callback(errors);
  29797. };
  29798. var number2 = function number3(rule, value, callback, source, options) {
  29799. var errors = [];
  29800. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29801. if (validate) {
  29802. if (value === "") {
  29803. value = void 0;
  29804. }
  29805. if (isEmptyValue(value) && !rule.required) {
  29806. return callback();
  29807. }
  29808. rules.required(rule, value, source, errors, options);
  29809. if (value !== void 0) {
  29810. rules.type(rule, value, source, errors, options);
  29811. rules.range(rule, value, source, errors, options);
  29812. }
  29813. }
  29814. callback(errors);
  29815. };
  29816. var _boolean = function _boolean2(rule, value, callback, source, options) {
  29817. var errors = [];
  29818. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29819. if (validate) {
  29820. if (isEmptyValue(value) && !rule.required) {
  29821. return callback();
  29822. }
  29823. rules.required(rule, value, source, errors, options);
  29824. if (value !== void 0) {
  29825. rules.type(rule, value, source, errors, options);
  29826. }
  29827. }
  29828. callback(errors);
  29829. };
  29830. var regexp2 = function regexp3(rule, value, callback, source, options) {
  29831. var errors = [];
  29832. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29833. if (validate) {
  29834. if (isEmptyValue(value) && !rule.required) {
  29835. return callback();
  29836. }
  29837. rules.required(rule, value, source, errors, options);
  29838. if (!isEmptyValue(value)) {
  29839. rules.type(rule, value, source, errors, options);
  29840. }
  29841. }
  29842. callback(errors);
  29843. };
  29844. var integer2 = function integer3(rule, value, callback, source, options) {
  29845. var errors = [];
  29846. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29847. if (validate) {
  29848. if (isEmptyValue(value) && !rule.required) {
  29849. return callback();
  29850. }
  29851. rules.required(rule, value, source, errors, options);
  29852. if (value !== void 0) {
  29853. rules.type(rule, value, source, errors, options);
  29854. rules.range(rule, value, source, errors, options);
  29855. }
  29856. }
  29857. callback(errors);
  29858. };
  29859. var floatFn = function floatFn2(rule, value, callback, source, options) {
  29860. var errors = [];
  29861. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29862. if (validate) {
  29863. if (isEmptyValue(value) && !rule.required) {
  29864. return callback();
  29865. }
  29866. rules.required(rule, value, source, errors, options);
  29867. if (value !== void 0) {
  29868. rules.type(rule, value, source, errors, options);
  29869. rules.range(rule, value, source, errors, options);
  29870. }
  29871. }
  29872. callback(errors);
  29873. };
  29874. var array2 = function array3(rule, value, callback, source, options) {
  29875. var errors = [];
  29876. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29877. if (validate) {
  29878. if ((value === void 0 || value === null) && !rule.required) {
  29879. return callback();
  29880. }
  29881. rules.required(rule, value, source, errors, options, "array");
  29882. if (value !== void 0 && value !== null) {
  29883. rules.type(rule, value, source, errors, options);
  29884. rules.range(rule, value, source, errors, options);
  29885. }
  29886. }
  29887. callback(errors);
  29888. };
  29889. var object2 = function object3(rule, value, callback, source, options) {
  29890. var errors = [];
  29891. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29892. if (validate) {
  29893. if (isEmptyValue(value) && !rule.required) {
  29894. return callback();
  29895. }
  29896. rules.required(rule, value, source, errors, options);
  29897. if (value !== void 0) {
  29898. rules.type(rule, value, source, errors, options);
  29899. }
  29900. }
  29901. callback(errors);
  29902. };
  29903. var ENUM = "enum";
  29904. var enumerable2 = function enumerable3(rule, value, callback, source, options) {
  29905. var errors = [];
  29906. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29907. if (validate) {
  29908. if (isEmptyValue(value) && !rule.required) {
  29909. return callback();
  29910. }
  29911. rules.required(rule, value, source, errors, options);
  29912. if (value !== void 0) {
  29913. rules[ENUM](rule, value, source, errors, options);
  29914. }
  29915. }
  29916. callback(errors);
  29917. };
  29918. var pattern2 = function pattern3(rule, value, callback, source, options) {
  29919. var errors = [];
  29920. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29921. if (validate) {
  29922. if (isEmptyValue(value, "string") && !rule.required) {
  29923. return callback();
  29924. }
  29925. rules.required(rule, value, source, errors, options);
  29926. if (!isEmptyValue(value, "string")) {
  29927. rules.pattern(rule, value, source, errors, options);
  29928. }
  29929. }
  29930. callback(errors);
  29931. };
  29932. var date3 = function date4(rule, value, callback, source, options) {
  29933. var errors = [];
  29934. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29935. if (validate) {
  29936. if (isEmptyValue(value, "date") && !rule.required) {
  29937. return callback();
  29938. }
  29939. rules.required(rule, value, source, errors, options);
  29940. if (!isEmptyValue(value, "date")) {
  29941. var dateObject;
  29942. if (value instanceof Date) {
  29943. dateObject = value;
  29944. } else {
  29945. dateObject = new Date(value);
  29946. }
  29947. rules.type(rule, dateObject, source, errors, options);
  29948. if (dateObject) {
  29949. rules.range(rule, dateObject.getTime(), source, errors, options);
  29950. }
  29951. }
  29952. }
  29953. callback(errors);
  29954. };
  29955. var required2 = function required3(rule, value, callback, source, options) {
  29956. var errors = [];
  29957. var type4 = Array.isArray(value) ? "array" : typeof value;
  29958. rules.required(rule, value, source, errors, options, type4);
  29959. callback(errors);
  29960. };
  29961. var type2 = function type3(rule, value, callback, source, options) {
  29962. var ruleType = rule.type;
  29963. var errors = [];
  29964. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29965. if (validate) {
  29966. if (isEmptyValue(value, ruleType) && !rule.required) {
  29967. return callback();
  29968. }
  29969. rules.required(rule, value, source, errors, options, ruleType);
  29970. if (!isEmptyValue(value, ruleType)) {
  29971. rules.type(rule, value, source, errors, options);
  29972. }
  29973. }
  29974. callback(errors);
  29975. };
  29976. var any = function any2(rule, value, callback, source, options) {
  29977. var errors = [];
  29978. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  29979. if (validate) {
  29980. if (isEmptyValue(value) && !rule.required) {
  29981. return callback();
  29982. }
  29983. rules.required(rule, value, source, errors, options);
  29984. }
  29985. callback(errors);
  29986. };
  29987. var validators = {
  29988. string,
  29989. method: method3,
  29990. number: number2,
  29991. "boolean": _boolean,
  29992. regexp: regexp2,
  29993. integer: integer2,
  29994. "float": floatFn,
  29995. array: array2,
  29996. object: object2,
  29997. "enum": enumerable2,
  29998. pattern: pattern2,
  29999. date: date3,
  30000. url: type2,
  30001. hex: type2,
  30002. email: type2,
  30003. required: required2,
  30004. any
  30005. };
  30006. function newMessages() {
  30007. return {
  30008. "default": "Validation error on field %s",
  30009. required: "%s is required",
  30010. "enum": "%s must be one of %s",
  30011. whitespace: "%s cannot be empty",
  30012. date: {
  30013. format: "%s date %s is invalid for format %s",
  30014. parse: "%s date could not be parsed, %s is invalid ",
  30015. invalid: "%s date %s is invalid"
  30016. },
  30017. types: {
  30018. string: "%s is not a %s",
  30019. method: "%s is not a %s (function)",
  30020. array: "%s is not an %s",
  30021. object: "%s is not an %s",
  30022. number: "%s is not a %s",
  30023. date: "%s is not a %s",
  30024. "boolean": "%s is not a %s",
  30025. integer: "%s is not an %s",
  30026. "float": "%s is not a %s",
  30027. regexp: "%s is not a valid %s",
  30028. email: "%s is not a valid %s",
  30029. url: "%s is not a valid %s",
  30030. hex: "%s is not a valid %s"
  30031. },
  30032. string: {
  30033. len: "%s must be exactly %s characters",
  30034. min: "%s must be at least %s characters",
  30035. max: "%s cannot be longer than %s characters",
  30036. range: "%s must be between %s and %s characters"
  30037. },
  30038. number: {
  30039. len: "%s must equal %s",
  30040. min: "%s cannot be less than %s",
  30041. max: "%s cannot be greater than %s",
  30042. range: "%s must be between %s and %s"
  30043. },
  30044. array: {
  30045. len: "%s must be exactly %s in length",
  30046. min: "%s cannot be less than %s in length",
  30047. max: "%s cannot be greater than %s in length",
  30048. range: "%s must be between %s and %s in length"
  30049. },
  30050. pattern: {
  30051. mismatch: "%s value %s does not match pattern %s"
  30052. },
  30053. clone: function clone2() {
  30054. var cloned = JSON.parse(JSON.stringify(this));
  30055. cloned.clone = this.clone;
  30056. return cloned;
  30057. }
  30058. };
  30059. }
  30060. var messages = newMessages();
  30061. var Schema = function() {
  30062. function Schema2(descriptor) {
  30063. this.rules = null;
  30064. this._messages = messages;
  30065. this.define(descriptor);
  30066. }
  30067. var _proto = Schema2.prototype;
  30068. _proto.define = function define2(rules2) {
  30069. var _this = this;
  30070. if (!rules2) {
  30071. throw new Error("Cannot configure a schema with no rules");
  30072. }
  30073. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  30074. throw new Error("Rules must be an object");
  30075. }
  30076. this.rules = {};
  30077. Object.keys(rules2).forEach(function(name) {
  30078. var item = rules2[name];
  30079. _this.rules[name] = Array.isArray(item) ? item : [item];
  30080. });
  30081. };
  30082. _proto.messages = function messages2(_messages) {
  30083. if (_messages) {
  30084. this._messages = deepMerge(newMessages(), _messages);
  30085. }
  30086. return this._messages;
  30087. };
  30088. _proto.validate = function validate(source_, o2, oc) {
  30089. var _this2 = this;
  30090. if (o2 === void 0) {
  30091. o2 = {};
  30092. }
  30093. if (oc === void 0) {
  30094. oc = function oc2() {
  30095. };
  30096. }
  30097. var source = source_;
  30098. var options = o2;
  30099. var callback = oc;
  30100. if (typeof options === "function") {
  30101. callback = options;
  30102. options = {};
  30103. }
  30104. if (!this.rules || Object.keys(this.rules).length === 0) {
  30105. if (callback) {
  30106. callback(null, source);
  30107. }
  30108. return Promise.resolve(source);
  30109. }
  30110. function complete(results) {
  30111. var errors = [];
  30112. var fields = {};
  30113. function add2(e) {
  30114. if (Array.isArray(e)) {
  30115. var _errors;
  30116. errors = (_errors = errors).concat.apply(_errors, e);
  30117. } else {
  30118. errors.push(e);
  30119. }
  30120. }
  30121. for (var i = 0; i < results.length; i++) {
  30122. add2(results[i]);
  30123. }
  30124. if (!errors.length) {
  30125. callback(null, source);
  30126. } else {
  30127. fields = convertFieldsError(errors);
  30128. callback(errors, fields);
  30129. }
  30130. }
  30131. if (options.messages) {
  30132. var messages$1 = this.messages();
  30133. if (messages$1 === messages) {
  30134. messages$1 = newMessages();
  30135. }
  30136. deepMerge(messages$1, options.messages);
  30137. options.messages = messages$1;
  30138. } else {
  30139. options.messages = this.messages();
  30140. }
  30141. var series = {};
  30142. var keys3 = options.keys || Object.keys(this.rules);
  30143. keys3.forEach(function(z) {
  30144. var arr = _this2.rules[z];
  30145. var value = source[z];
  30146. arr.forEach(function(r) {
  30147. var rule = r;
  30148. if (typeof rule.transform === "function") {
  30149. if (source === source_) {
  30150. source = _extends({}, source);
  30151. }
  30152. value = source[z] = rule.transform(value);
  30153. }
  30154. if (typeof rule === "function") {
  30155. rule = {
  30156. validator: rule
  30157. };
  30158. } else {
  30159. rule = _extends({}, rule);
  30160. }
  30161. rule.validator = _this2.getValidationMethod(rule);
  30162. if (!rule.validator) {
  30163. return;
  30164. }
  30165. rule.field = z;
  30166. rule.fullField = rule.fullField || z;
  30167. rule.type = _this2.getType(rule);
  30168. series[z] = series[z] || [];
  30169. series[z].push({
  30170. rule,
  30171. value,
  30172. source,
  30173. field: z
  30174. });
  30175. });
  30176. });
  30177. var errorFields = {};
  30178. return asyncMap(series, options, function(data, doIt) {
  30179. var rule = data.rule;
  30180. var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  30181. deep = deep && (rule.required || !rule.required && data.value);
  30182. rule.field = data.field;
  30183. function addFullField(key, schema) {
  30184. return _extends({}, schema, {
  30185. fullField: rule.fullField + "." + key,
  30186. fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
  30187. });
  30188. }
  30189. function cb(e) {
  30190. if (e === void 0) {
  30191. e = [];
  30192. }
  30193. var errorList = Array.isArray(e) ? e : [e];
  30194. if (!options.suppressWarning && errorList.length) {
  30195. Schema2.warning("async-validator:", errorList);
  30196. }
  30197. if (errorList.length && rule.message !== void 0) {
  30198. errorList = [].concat(rule.message);
  30199. }
  30200. var filledErrors = errorList.map(complementError(rule, source));
  30201. if (options.first && filledErrors.length) {
  30202. errorFields[rule.field] = 1;
  30203. return doIt(filledErrors);
  30204. }
  30205. if (!deep) {
  30206. doIt(filledErrors);
  30207. } else {
  30208. if (rule.required && !data.value) {
  30209. if (rule.message !== void 0) {
  30210. filledErrors = [].concat(rule.message).map(complementError(rule, source));
  30211. } else if (options.error) {
  30212. filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
  30213. }
  30214. return doIt(filledErrors);
  30215. }
  30216. var fieldsSchema = {};
  30217. if (rule.defaultField) {
  30218. Object.keys(data.value).map(function(key) {
  30219. fieldsSchema[key] = rule.defaultField;
  30220. });
  30221. }
  30222. fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
  30223. var paredFieldsSchema = {};
  30224. Object.keys(fieldsSchema).forEach(function(field) {
  30225. var fieldSchema = fieldsSchema[field];
  30226. var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];
  30227. paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));
  30228. });
  30229. var schema = new Schema2(paredFieldsSchema);
  30230. schema.messages(options.messages);
  30231. if (data.rule.options) {
  30232. data.rule.options.messages = options.messages;
  30233. data.rule.options.error = options.error;
  30234. }
  30235. schema.validate(data.value, data.rule.options || options, function(errs) {
  30236. var finalErrors = [];
  30237. if (filledErrors && filledErrors.length) {
  30238. finalErrors.push.apply(finalErrors, filledErrors);
  30239. }
  30240. if (errs && errs.length) {
  30241. finalErrors.push.apply(finalErrors, errs);
  30242. }
  30243. doIt(finalErrors.length ? finalErrors : null);
  30244. });
  30245. }
  30246. }
  30247. var res;
  30248. if (rule.asyncValidator) {
  30249. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  30250. } else if (rule.validator) {
  30251. try {
  30252. res = rule.validator(rule, data.value, cb, data.source, options);
  30253. } catch (error) {
  30254. console.error == null ? void 0 : console.error(error);
  30255. if (!options.suppressValidatorError) {
  30256. setTimeout(function() {
  30257. throw error;
  30258. }, 0);
  30259. }
  30260. cb(error.message);
  30261. }
  30262. if (res === true) {
  30263. cb();
  30264. } else if (res === false) {
  30265. cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
  30266. } else if (res instanceof Array) {
  30267. cb(res);
  30268. } else if (res instanceof Error) {
  30269. cb(res.message);
  30270. }
  30271. }
  30272. if (res && res.then) {
  30273. res.then(function() {
  30274. return cb();
  30275. }, function(e) {
  30276. return cb(e);
  30277. });
  30278. }
  30279. }, function(results) {
  30280. complete(results);
  30281. }, source);
  30282. };
  30283. _proto.getType = function getType(rule) {
  30284. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  30285. rule.type = "pattern";
  30286. }
  30287. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  30288. throw new Error(format("Unknown rule type %s", rule.type));
  30289. }
  30290. return rule.type || "string";
  30291. };
  30292. _proto.getValidationMethod = function getValidationMethod(rule) {
  30293. if (typeof rule.validator === "function") {
  30294. return rule.validator;
  30295. }
  30296. var keys3 = Object.keys(rule);
  30297. var messageIndex = keys3.indexOf("message");
  30298. if (messageIndex !== -1) {
  30299. keys3.splice(messageIndex, 1);
  30300. }
  30301. if (keys3.length === 1 && keys3[0] === "required") {
  30302. return validators.required;
  30303. }
  30304. return validators[this.getType(rule)] || void 0;
  30305. };
  30306. return Schema2;
  30307. }();
  30308. Schema.register = function register(type4, validator) {
  30309. if (typeof validator !== "function") {
  30310. throw new Error("Cannot register a validator by type, validator is not a function");
  30311. }
  30312. validators[type4] = validator;
  30313. };
  30314. Schema.warning = warning;
  30315. Schema.messages = messages;
  30316. Schema.validators = validators;
  30317. // node_modules/element-plus/es/components/form/src/form-item.mjs
  30318. var formItemValidateStates = [
  30319. "",
  30320. "error",
  30321. "validating",
  30322. "success"
  30323. ];
  30324. var formItemProps = buildProps({
  30325. label: String,
  30326. labelWidth: {
  30327. type: [String, Number],
  30328. default: ""
  30329. },
  30330. prop: {
  30331. type: definePropType([String, Array])
  30332. },
  30333. required: {
  30334. type: Boolean,
  30335. default: void 0
  30336. },
  30337. rules: {
  30338. type: definePropType([Object, Array])
  30339. },
  30340. error: String,
  30341. validateStatus: {
  30342. type: String,
  30343. values: formItemValidateStates
  30344. },
  30345. for: String,
  30346. inlineMessage: {
  30347. type: [String, Boolean],
  30348. default: ""
  30349. },
  30350. showMessage: {
  30351. type: Boolean,
  30352. default: true
  30353. },
  30354. size: {
  30355. type: String,
  30356. values: componentSizes
  30357. }
  30358. });
  30359. // node_modules/element-plus/es/components/form/src/form-label-wrap.mjs
  30360. var COMPONENT_NAME11 = "ElLabelWrap";
  30361. var FormLabelWrap = defineComponent({
  30362. name: COMPONENT_NAME11,
  30363. props: {
  30364. isAutoWidth: Boolean,
  30365. updateAll: Boolean
  30366. },
  30367. setup(props, {
  30368. slots
  30369. }) {
  30370. const formContext = inject(formContextKey, void 0);
  30371. const formItemContext = inject(formItemContextKey);
  30372. if (!formItemContext)
  30373. throwError(COMPONENT_NAME11, "usage: <el-form-item><label-wrap /></el-form-item>");
  30374. const ns2 = useNamespace("form");
  30375. const el = ref();
  30376. const computedWidth = ref(0);
  30377. const getLabelWidth = () => {
  30378. var _a2;
  30379. if ((_a2 = el.value) == null ? void 0 : _a2.firstElementChild) {
  30380. const width = window.getComputedStyle(el.value.firstElementChild).width;
  30381. return Math.ceil(Number.parseFloat(width));
  30382. } else {
  30383. return 0;
  30384. }
  30385. };
  30386. const updateLabelWidth = (action = "update") => {
  30387. nextTick(() => {
  30388. if (slots.default && props.isAutoWidth) {
  30389. if (action === "update") {
  30390. computedWidth.value = getLabelWidth();
  30391. } else if (action === "remove") {
  30392. formContext == null ? void 0 : formContext.deregisterLabelWidth(computedWidth.value);
  30393. }
  30394. }
  30395. });
  30396. };
  30397. const updateLabelWidthFn = () => updateLabelWidth("update");
  30398. onMounted(() => {
  30399. updateLabelWidthFn();
  30400. });
  30401. onBeforeUnmount(() => {
  30402. updateLabelWidth("remove");
  30403. });
  30404. onUpdated(() => updateLabelWidthFn());
  30405. watch(computedWidth, (val, oldVal) => {
  30406. if (props.updateAll) {
  30407. formContext == null ? void 0 : formContext.registerLabelWidth(val, oldVal);
  30408. }
  30409. });
  30410. useResizeObserver(computed2(() => {
  30411. var _a2, _b;
  30412. return (_b = (_a2 = el.value) == null ? void 0 : _a2.firstElementChild) != null ? _b : null;
  30413. }), updateLabelWidthFn);
  30414. return () => {
  30415. var _a2, _b;
  30416. if (!slots)
  30417. return null;
  30418. const {
  30419. isAutoWidth
  30420. } = props;
  30421. if (isAutoWidth) {
  30422. const autoLabelWidth = formContext == null ? void 0 : formContext.autoLabelWidth;
  30423. const hasLabel = formItemContext == null ? void 0 : formItemContext.hasLabel;
  30424. const style = {};
  30425. if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") {
  30426. const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value);
  30427. const marginPosition = formContext.labelPosition === "left" ? "marginRight" : "marginLeft";
  30428. if (marginWidth) {
  30429. style[marginPosition] = `${marginWidth}px`;
  30430. }
  30431. }
  30432. return createVNode("div", {
  30433. "ref": el,
  30434. "class": [ns2.be("item", "label-wrap")],
  30435. "style": style
  30436. }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]);
  30437. } else {
  30438. return createVNode(Fragment, {
  30439. "ref": el
  30440. }, [(_b = slots.default) == null ? void 0 : _b.call(slots)]);
  30441. }
  30442. };
  30443. }
  30444. });
  30445. // node_modules/element-plus/es/components/form/src/form-item2.mjs
  30446. var _hoisted_138 = ["role", "aria-labelledby"];
  30447. var __default__53 = defineComponent({
  30448. name: "ElFormItem"
  30449. });
  30450. var _sfc_main83 = defineComponent({
  30451. ...__default__53,
  30452. props: formItemProps,
  30453. setup(__props, { expose }) {
  30454. const props = __props;
  30455. const slots = useSlots();
  30456. const formContext = inject(formContextKey, void 0);
  30457. const parentFormItemContext = inject(formItemContextKey, void 0);
  30458. const _size = useSize(void 0, { formItem: false });
  30459. const ns2 = useNamespace("form-item");
  30460. const labelId = useId().value;
  30461. const inputIds = ref([]);
  30462. const validateState = ref("");
  30463. const validateStateDebounced = refDebounced(validateState, 100);
  30464. const validateMessage = ref("");
  30465. const formItemRef = ref();
  30466. let initialValue = void 0;
  30467. let isResettingField = false;
  30468. const labelStyle = computed2(() => {
  30469. if ((formContext == null ? void 0 : formContext.labelPosition) === "top") {
  30470. return {};
  30471. }
  30472. const labelWidth = addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
  30473. if (labelWidth)
  30474. return { width: labelWidth };
  30475. return {};
  30476. });
  30477. const contentStyle = computed2(() => {
  30478. if ((formContext == null ? void 0 : formContext.labelPosition) === "top" || (formContext == null ? void 0 : formContext.inline)) {
  30479. return {};
  30480. }
  30481. if (!props.label && !props.labelWidth && isNested) {
  30482. return {};
  30483. }
  30484. const labelWidth = addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
  30485. if (!props.label && !slots.label) {
  30486. return { marginLeft: labelWidth };
  30487. }
  30488. return {};
  30489. });
  30490. const formItemClasses = computed2(() => [
  30491. ns2.b(),
  30492. ns2.m(_size.value),
  30493. ns2.is("error", validateState.value === "error"),
  30494. ns2.is("validating", validateState.value === "validating"),
  30495. ns2.is("success", validateState.value === "success"),
  30496. ns2.is("required", isRequired.value || props.required),
  30497. ns2.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
  30498. (formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
  30499. { [ns2.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon }
  30500. ]);
  30501. const _inlineMessage = computed2(() => isBoolean2(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
  30502. const validateClasses = computed2(() => [
  30503. ns2.e("error"),
  30504. { [ns2.em("error", "inline")]: _inlineMessage.value }
  30505. ]);
  30506. const propString = computed2(() => {
  30507. if (!props.prop)
  30508. return "";
  30509. return isString(props.prop) ? props.prop : props.prop.join(".");
  30510. });
  30511. const hasLabel = computed2(() => {
  30512. return !!(props.label || slots.label);
  30513. });
  30514. const labelFor = computed2(() => {
  30515. return props.for || inputIds.value.length === 1 ? inputIds.value[0] : void 0;
  30516. });
  30517. const isGroup = computed2(() => {
  30518. return !labelFor.value && hasLabel.value;
  30519. });
  30520. const isNested = !!parentFormItemContext;
  30521. const fieldValue = computed2(() => {
  30522. const model = formContext == null ? void 0 : formContext.model;
  30523. if (!model || !props.prop) {
  30524. return;
  30525. }
  30526. return getProp(model, props.prop).value;
  30527. });
  30528. const normalizedRules = computed2(() => {
  30529. const { required: required4 } = props;
  30530. const rules2 = [];
  30531. if (props.rules) {
  30532. rules2.push(...castArray_default(props.rules));
  30533. }
  30534. const formRules = formContext == null ? void 0 : formContext.rules;
  30535. if (formRules && props.prop) {
  30536. const _rules = getProp(formRules, props.prop).value;
  30537. if (_rules) {
  30538. rules2.push(...castArray_default(_rules));
  30539. }
  30540. }
  30541. if (required4 !== void 0) {
  30542. const requiredRules = rules2.map((rule, i) => [rule, i]).filter(([rule]) => Object.keys(rule).includes("required"));
  30543. if (requiredRules.length > 0) {
  30544. for (const [rule, i] of requiredRules) {
  30545. if (rule.required === required4)
  30546. continue;
  30547. rules2[i] = { ...rule, required: required4 };
  30548. }
  30549. } else {
  30550. rules2.push({ required: required4 });
  30551. }
  30552. }
  30553. return rules2;
  30554. });
  30555. const validateEnabled = computed2(() => normalizedRules.value.length > 0);
  30556. const getFilteredRule = (trigger) => {
  30557. const rules2 = normalizedRules.value;
  30558. return rules2.filter((rule) => {
  30559. if (!rule.trigger || !trigger)
  30560. return true;
  30561. if (Array.isArray(rule.trigger)) {
  30562. return rule.trigger.includes(trigger);
  30563. } else {
  30564. return rule.trigger === trigger;
  30565. }
  30566. }).map(({ trigger: trigger2, ...rule }) => rule);
  30567. };
  30568. const isRequired = computed2(() => normalizedRules.value.some((rule) => rule.required));
  30569. const shouldShowError = computed2(() => {
  30570. var _a2;
  30571. return validateStateDebounced.value === "error" && props.showMessage && ((_a2 = formContext == null ? void 0 : formContext.showMessage) != null ? _a2 : true);
  30572. });
  30573. const currentLabel = computed2(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
  30574. const setValidationState = (state) => {
  30575. validateState.value = state;
  30576. };
  30577. const onValidationFailed = (error) => {
  30578. var _a2, _b;
  30579. const { errors, fields } = error;
  30580. if (!errors || !fields) {
  30581. console.error(error);
  30582. }
  30583. setValidationState("error");
  30584. validateMessage.value = errors ? (_b = (_a2 = errors == null ? void 0 : errors[0]) == null ? void 0 : _a2.message) != null ? _b : `${props.prop} is required` : "";
  30585. formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
  30586. };
  30587. const onValidationSucceeded = () => {
  30588. setValidationState("success");
  30589. formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
  30590. };
  30591. const doValidate = async (rules2) => {
  30592. const modelName = propString.value;
  30593. const validator = new Schema({
  30594. [modelName]: rules2
  30595. });
  30596. return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
  30597. onValidationSucceeded();
  30598. return true;
  30599. }).catch((err) => {
  30600. onValidationFailed(err);
  30601. return Promise.reject(err);
  30602. });
  30603. };
  30604. const validate = async (trigger, callback) => {
  30605. if (isResettingField || !props.prop) {
  30606. return false;
  30607. }
  30608. const hasCallback = isFunction(callback);
  30609. if (!validateEnabled.value) {
  30610. callback == null ? void 0 : callback(false);
  30611. return false;
  30612. }
  30613. const rules2 = getFilteredRule(trigger);
  30614. if (rules2.length === 0) {
  30615. callback == null ? void 0 : callback(true);
  30616. return true;
  30617. }
  30618. setValidationState("validating");
  30619. return doValidate(rules2).then(() => {
  30620. callback == null ? void 0 : callback(true);
  30621. return true;
  30622. }).catch((err) => {
  30623. const { fields } = err;
  30624. callback == null ? void 0 : callback(false, fields);
  30625. return hasCallback ? false : Promise.reject(fields);
  30626. });
  30627. };
  30628. const clearValidate = () => {
  30629. setValidationState("");
  30630. validateMessage.value = "";
  30631. isResettingField = false;
  30632. };
  30633. const resetField = async () => {
  30634. const model = formContext == null ? void 0 : formContext.model;
  30635. if (!model || !props.prop)
  30636. return;
  30637. const computedValue = getProp(model, props.prop);
  30638. isResettingField = true;
  30639. computedValue.value = clone_default(initialValue);
  30640. await nextTick();
  30641. clearValidate();
  30642. isResettingField = false;
  30643. };
  30644. const addInputId = (id2) => {
  30645. if (!inputIds.value.includes(id2)) {
  30646. inputIds.value.push(id2);
  30647. }
  30648. };
  30649. const removeInputId = (id2) => {
  30650. inputIds.value = inputIds.value.filter((listId) => listId !== id2);
  30651. };
  30652. watch(() => props.error, (val) => {
  30653. validateMessage.value = val || "";
  30654. setValidationState(val ? "error" : "");
  30655. }, { immediate: true });
  30656. watch(() => props.validateStatus, (val) => setValidationState(val || ""));
  30657. const context = reactive({
  30658. ...toRefs(props),
  30659. $el: formItemRef,
  30660. size: _size,
  30661. validateState,
  30662. labelId,
  30663. inputIds,
  30664. isGroup,
  30665. hasLabel,
  30666. addInputId,
  30667. removeInputId,
  30668. resetField,
  30669. clearValidate,
  30670. validate
  30671. });
  30672. provide(formItemContextKey, context);
  30673. onMounted(() => {
  30674. if (props.prop) {
  30675. formContext == null ? void 0 : formContext.addField(context);
  30676. initialValue = clone_default(fieldValue.value);
  30677. }
  30678. });
  30679. onBeforeUnmount(() => {
  30680. formContext == null ? void 0 : formContext.removeField(context);
  30681. });
  30682. expose({
  30683. size: _size,
  30684. validateMessage,
  30685. validateState,
  30686. validate,
  30687. clearValidate,
  30688. resetField
  30689. });
  30690. return (_ctx, _cache) => {
  30691. var _a2;
  30692. return openBlock(), createElementBlock("div", {
  30693. ref_key: "formItemRef",
  30694. ref: formItemRef,
  30695. class: normalizeClass(unref(formItemClasses)),
  30696. role: unref(isGroup) ? "group" : void 0,
  30697. "aria-labelledby": unref(isGroup) ? unref(labelId) : void 0
  30698. }, [
  30699. createVNode(unref(FormLabelWrap), {
  30700. "is-auto-width": unref(labelStyle).width === "auto",
  30701. "update-all": ((_a2 = unref(formContext)) == null ? void 0 : _a2.labelWidth) === "auto"
  30702. }, {
  30703. default: withCtx(() => [
  30704. unref(hasLabel) ? (openBlock(), createBlock(resolveDynamicComponent(unref(labelFor) ? "label" : "div"), {
  30705. key: 0,
  30706. id: unref(labelId),
  30707. for: unref(labelFor),
  30708. class: normalizeClass(unref(ns2).e("label")),
  30709. style: normalizeStyle(unref(labelStyle))
  30710. }, {
  30711. default: withCtx(() => [
  30712. renderSlot(_ctx.$slots, "label", { label: unref(currentLabel) }, () => [
  30713. createTextVNode(toDisplayString(unref(currentLabel)), 1)
  30714. ])
  30715. ]),
  30716. _: 3
  30717. }, 8, ["id", "for", "class", "style"])) : createCommentVNode("v-if", true)
  30718. ]),
  30719. _: 3
  30720. }, 8, ["is-auto-width", "update-all"]),
  30721. createBaseVNode("div", {
  30722. class: normalizeClass(unref(ns2).e("content")),
  30723. style: normalizeStyle(unref(contentStyle))
  30724. }, [
  30725. renderSlot(_ctx.$slots, "default"),
  30726. createVNode(Transition, {
  30727. name: `${unref(ns2).namespace.value}-zoom-in-top`
  30728. }, {
  30729. default: withCtx(() => [
  30730. unref(shouldShowError) ? renderSlot(_ctx.$slots, "error", {
  30731. key: 0,
  30732. error: validateMessage.value
  30733. }, () => [
  30734. createBaseVNode("div", {
  30735. class: normalizeClass(unref(validateClasses))
  30736. }, toDisplayString(validateMessage.value), 3)
  30737. ]) : createCommentVNode("v-if", true)
  30738. ]),
  30739. _: 3
  30740. }, 8, ["name"])
  30741. ], 6)
  30742. ], 10, _hoisted_138);
  30743. };
  30744. }
  30745. });
  30746. var FormItem = _export_sfc(_sfc_main83, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);
  30747. // node_modules/element-plus/es/components/form/index.mjs
  30748. var ElForm = withInstall(Form, {
  30749. FormItem
  30750. });
  30751. var ElFormItem = withNoopInstall(FormItem);
  30752. // node_modules/element-plus/es/components/image-viewer/src/image-viewer.mjs
  30753. var imageViewerProps = buildProps({
  30754. urlList: {
  30755. type: definePropType(Array),
  30756. default: () => mutable([])
  30757. },
  30758. zIndex: {
  30759. type: Number
  30760. },
  30761. initialIndex: {
  30762. type: Number,
  30763. default: 0
  30764. },
  30765. infinite: {
  30766. type: Boolean,
  30767. default: true
  30768. },
  30769. hideOnClickModal: {
  30770. type: Boolean,
  30771. default: false
  30772. },
  30773. teleported: {
  30774. type: Boolean,
  30775. default: false
  30776. },
  30777. closeOnPressEscape: {
  30778. type: Boolean,
  30779. default: true
  30780. },
  30781. zoomRate: {
  30782. type: Number,
  30783. default: 1.2
  30784. }
  30785. });
  30786. var imageViewerEmits = {
  30787. close: () => true,
  30788. switch: (index) => isNumber2(index)
  30789. };
  30790. // node_modules/element-plus/es/components/image-viewer/src/image-viewer2.mjs
  30791. var _hoisted_139 = ["src"];
  30792. var __default__54 = defineComponent({
  30793. name: "ElImageViewer"
  30794. });
  30795. var _sfc_main84 = defineComponent({
  30796. ...__default__54,
  30797. props: imageViewerProps,
  30798. emits: imageViewerEmits,
  30799. setup(__props, { expose, emit }) {
  30800. const props = __props;
  30801. const modes = {
  30802. CONTAIN: {
  30803. name: "contain",
  30804. icon: markRaw(full_screen_default)
  30805. },
  30806. ORIGINAL: {
  30807. name: "original",
  30808. icon: markRaw(scale_to_original_default)
  30809. }
  30810. };
  30811. const mousewheelEventName = isFirefox() ? "DOMMouseScroll" : "mousewheel";
  30812. const { t } = useLocale();
  30813. const ns2 = useNamespace("image-viewer");
  30814. const { nextZIndex } = useZIndex();
  30815. const wrapper = ref();
  30816. const imgRefs = ref([]);
  30817. const scopeEventListener = effectScope();
  30818. const loading = ref(true);
  30819. const activeIndex = ref(props.initialIndex);
  30820. const mode = shallowRef(modes.CONTAIN);
  30821. const transform2 = ref({
  30822. scale: 1,
  30823. deg: 0,
  30824. offsetX: 0,
  30825. offsetY: 0,
  30826. enableTransition: false
  30827. });
  30828. const isSingle = computed2(() => {
  30829. const { urlList } = props;
  30830. return urlList.length <= 1;
  30831. });
  30832. const isFirst = computed2(() => {
  30833. return activeIndex.value === 0;
  30834. });
  30835. const isLast = computed2(() => {
  30836. return activeIndex.value === props.urlList.length - 1;
  30837. });
  30838. const currentImg = computed2(() => {
  30839. return props.urlList[activeIndex.value];
  30840. });
  30841. const imgStyle = computed2(() => {
  30842. const { scale, deg, offsetX, offsetY, enableTransition } = transform2.value;
  30843. let translateX = offsetX / scale;
  30844. let translateY = offsetY / scale;
  30845. switch (deg % 360) {
  30846. case 90:
  30847. case -270:
  30848. ;
  30849. [translateX, translateY] = [translateY, -translateX];
  30850. break;
  30851. case 180:
  30852. case -180:
  30853. ;
  30854. [translateX, translateY] = [-translateX, -translateY];
  30855. break;
  30856. case 270:
  30857. case -90:
  30858. ;
  30859. [translateX, translateY] = [-translateY, translateX];
  30860. break;
  30861. }
  30862. const style = {
  30863. transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
  30864. transition: enableTransition ? "transform .3s" : ""
  30865. };
  30866. if (mode.value.name === modes.CONTAIN.name) {
  30867. style.maxWidth = style.maxHeight = "100%";
  30868. }
  30869. return style;
  30870. });
  30871. const computedZIndex = computed2(() => {
  30872. return isNumber2(props.zIndex) ? props.zIndex : nextZIndex();
  30873. });
  30874. function hide2() {
  30875. unregisterEventListener();
  30876. emit("close");
  30877. }
  30878. function registerEventListener() {
  30879. const keydownHandler = throttle_default((e) => {
  30880. switch (e.code) {
  30881. case EVENT_CODE.esc:
  30882. props.closeOnPressEscape && hide2();
  30883. break;
  30884. case EVENT_CODE.space:
  30885. toggleMode();
  30886. break;
  30887. case EVENT_CODE.left:
  30888. prev();
  30889. break;
  30890. case EVENT_CODE.up:
  30891. handleActions("zoomIn");
  30892. break;
  30893. case EVENT_CODE.right:
  30894. next();
  30895. break;
  30896. case EVENT_CODE.down:
  30897. handleActions("zoomOut");
  30898. break;
  30899. }
  30900. });
  30901. const mousewheelHandler = throttle_default((e) => {
  30902. const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
  30903. if (delta > 0) {
  30904. handleActions("zoomIn", {
  30905. zoomRate: props.zoomRate,
  30906. enableTransition: false
  30907. });
  30908. } else {
  30909. handleActions("zoomOut", {
  30910. zoomRate: props.zoomRate,
  30911. enableTransition: false
  30912. });
  30913. }
  30914. });
  30915. scopeEventListener.run(() => {
  30916. useEventListener(document, "keydown", keydownHandler);
  30917. useEventListener(document, mousewheelEventName, mousewheelHandler);
  30918. });
  30919. }
  30920. function unregisterEventListener() {
  30921. scopeEventListener.stop();
  30922. }
  30923. function handleImgLoad() {
  30924. loading.value = false;
  30925. }
  30926. function handleImgError(e) {
  30927. loading.value = false;
  30928. e.target.alt = t("el.image.error");
  30929. }
  30930. function handleMouseDown(e) {
  30931. if (loading.value || e.button !== 0 || !wrapper.value)
  30932. return;
  30933. transform2.value.enableTransition = false;
  30934. const { offsetX, offsetY } = transform2.value;
  30935. const startX = e.pageX;
  30936. const startY = e.pageY;
  30937. const dragHandler = throttle_default((ev) => {
  30938. transform2.value = {
  30939. ...transform2.value,
  30940. offsetX: offsetX + ev.pageX - startX,
  30941. offsetY: offsetY + ev.pageY - startY
  30942. };
  30943. });
  30944. const removeMousemove = useEventListener(document, "mousemove", dragHandler);
  30945. useEventListener(document, "mouseup", () => {
  30946. removeMousemove();
  30947. });
  30948. e.preventDefault();
  30949. }
  30950. function reset() {
  30951. transform2.value = {
  30952. scale: 1,
  30953. deg: 0,
  30954. offsetX: 0,
  30955. offsetY: 0,
  30956. enableTransition: false
  30957. };
  30958. }
  30959. function toggleMode() {
  30960. if (loading.value)
  30961. return;
  30962. const modeNames = keysOf(modes);
  30963. const modeValues = Object.values(modes);
  30964. const currentMode = mode.value.name;
  30965. const index = modeValues.findIndex((i) => i.name === currentMode);
  30966. const nextIndex = (index + 1) % modeNames.length;
  30967. mode.value = modes[modeNames[nextIndex]];
  30968. reset();
  30969. }
  30970. function setActiveItem(index) {
  30971. const len = props.urlList.length;
  30972. activeIndex.value = (index + len) % len;
  30973. }
  30974. function prev() {
  30975. if (isFirst.value && !props.infinite)
  30976. return;
  30977. setActiveItem(activeIndex.value - 1);
  30978. }
  30979. function next() {
  30980. if (isLast.value && !props.infinite)
  30981. return;
  30982. setActiveItem(activeIndex.value + 1);
  30983. }
  30984. function handleActions(action, options = {}) {
  30985. if (loading.value)
  30986. return;
  30987. const { zoomRate, rotateDeg, enableTransition } = {
  30988. zoomRate: props.zoomRate,
  30989. rotateDeg: 90,
  30990. enableTransition: true,
  30991. ...options
  30992. };
  30993. switch (action) {
  30994. case "zoomOut":
  30995. if (transform2.value.scale > 0.2) {
  30996. transform2.value.scale = Number.parseFloat((transform2.value.scale / zoomRate).toFixed(3));
  30997. }
  30998. break;
  30999. case "zoomIn":
  31000. if (transform2.value.scale < 7) {
  31001. transform2.value.scale = Number.parseFloat((transform2.value.scale * zoomRate).toFixed(3));
  31002. }
  31003. break;
  31004. case "clockwise":
  31005. transform2.value.deg += rotateDeg;
  31006. break;
  31007. case "anticlockwise":
  31008. transform2.value.deg -= rotateDeg;
  31009. break;
  31010. }
  31011. transform2.value.enableTransition = enableTransition;
  31012. }
  31013. watch(currentImg, () => {
  31014. nextTick(() => {
  31015. const $img = imgRefs.value[0];
  31016. if (!($img == null ? void 0 : $img.complete)) {
  31017. loading.value = true;
  31018. }
  31019. });
  31020. });
  31021. watch(activeIndex, (val) => {
  31022. reset();
  31023. emit("switch", val);
  31024. });
  31025. onMounted(() => {
  31026. var _a2, _b;
  31027. registerEventListener();
  31028. (_b = (_a2 = wrapper.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
  31029. });
  31030. expose({
  31031. setActiveItem
  31032. });
  31033. return (_ctx, _cache) => {
  31034. return openBlock(), createBlock(Teleport, {
  31035. to: "body",
  31036. disabled: !_ctx.teleported
  31037. }, [
  31038. createVNode(Transition, {
  31039. name: "viewer-fade",
  31040. appear: ""
  31041. }, {
  31042. default: withCtx(() => [
  31043. createBaseVNode("div", {
  31044. ref_key: "wrapper",
  31045. ref: wrapper,
  31046. tabindex: -1,
  31047. class: normalizeClass(unref(ns2).e("wrapper")),
  31048. style: normalizeStyle({ zIndex: unref(computedZIndex) })
  31049. }, [
  31050. createBaseVNode("div", {
  31051. class: normalizeClass(unref(ns2).e("mask")),
  31052. onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.hideOnClickModal && hide2(), ["self"]))
  31053. }, null, 2),
  31054. createCommentVNode(" CLOSE "),
  31055. createBaseVNode("span", {
  31056. class: normalizeClass([unref(ns2).e("btn"), unref(ns2).e("close")]),
  31057. onClick: hide2
  31058. }, [
  31059. createVNode(unref(ElIcon), null, {
  31060. default: withCtx(() => [
  31061. createVNode(unref(close_default))
  31062. ]),
  31063. _: 1
  31064. })
  31065. ], 2),
  31066. createCommentVNode(" ARROW "),
  31067. !unref(isSingle) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  31068. createBaseVNode("span", {
  31069. class: normalizeClass([
  31070. unref(ns2).e("btn"),
  31071. unref(ns2).e("prev"),
  31072. unref(ns2).is("disabled", !_ctx.infinite && unref(isFirst))
  31073. ]),
  31074. onClick: prev
  31075. }, [
  31076. createVNode(unref(ElIcon), null, {
  31077. default: withCtx(() => [
  31078. createVNode(unref(arrow_left_default))
  31079. ]),
  31080. _: 1
  31081. })
  31082. ], 2),
  31083. createBaseVNode("span", {
  31084. class: normalizeClass([
  31085. unref(ns2).e("btn"),
  31086. unref(ns2).e("next"),
  31087. unref(ns2).is("disabled", !_ctx.infinite && unref(isLast))
  31088. ]),
  31089. onClick: next
  31090. }, [
  31091. createVNode(unref(ElIcon), null, {
  31092. default: withCtx(() => [
  31093. createVNode(unref(arrow_right_default))
  31094. ]),
  31095. _: 1
  31096. })
  31097. ], 2)
  31098. ], 64)) : createCommentVNode("v-if", true),
  31099. createCommentVNode(" ACTIONS "),
  31100. createBaseVNode("div", {
  31101. class: normalizeClass([unref(ns2).e("btn"), unref(ns2).e("actions")])
  31102. }, [
  31103. createBaseVNode("div", {
  31104. class: normalizeClass(unref(ns2).e("actions__inner"))
  31105. }, [
  31106. createVNode(unref(ElIcon), {
  31107. onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut"))
  31108. }, {
  31109. default: withCtx(() => [
  31110. createVNode(unref(zoom_out_default))
  31111. ]),
  31112. _: 1
  31113. }),
  31114. createVNode(unref(ElIcon), {
  31115. onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn"))
  31116. }, {
  31117. default: withCtx(() => [
  31118. createVNode(unref(zoom_in_default))
  31119. ]),
  31120. _: 1
  31121. }),
  31122. createBaseVNode("i", {
  31123. class: normalizeClass(unref(ns2).e("actions__divider"))
  31124. }, null, 2),
  31125. createVNode(unref(ElIcon), { onClick: toggleMode }, {
  31126. default: withCtx(() => [
  31127. (openBlock(), createBlock(resolveDynamicComponent(unref(mode).icon)))
  31128. ]),
  31129. _: 1
  31130. }),
  31131. createBaseVNode("i", {
  31132. class: normalizeClass(unref(ns2).e("actions__divider"))
  31133. }, null, 2),
  31134. createVNode(unref(ElIcon), {
  31135. onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise"))
  31136. }, {
  31137. default: withCtx(() => [
  31138. createVNode(unref(refresh_left_default))
  31139. ]),
  31140. _: 1
  31141. }),
  31142. createVNode(unref(ElIcon), {
  31143. onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise"))
  31144. }, {
  31145. default: withCtx(() => [
  31146. createVNode(unref(refresh_right_default))
  31147. ]),
  31148. _: 1
  31149. })
  31150. ], 2)
  31151. ], 2),
  31152. createCommentVNode(" CANVAS "),
  31153. createBaseVNode("div", {
  31154. class: normalizeClass(unref(ns2).e("canvas"))
  31155. }, [
  31156. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.urlList, (url2, i) => {
  31157. return withDirectives((openBlock(), createElementBlock("img", {
  31158. ref_for: true,
  31159. ref: (el) => imgRefs.value[i] = el,
  31160. key: url2,
  31161. src: url2,
  31162. style: normalizeStyle(unref(imgStyle)),
  31163. class: normalizeClass(unref(ns2).e("img")),
  31164. onLoad: handleImgLoad,
  31165. onError: handleImgError,
  31166. onMousedown: handleMouseDown
  31167. }, null, 46, _hoisted_139)), [
  31168. [vShow, i === activeIndex.value]
  31169. ]);
  31170. }), 128))
  31171. ], 2),
  31172. renderSlot(_ctx.$slots, "default")
  31173. ], 6)
  31174. ]),
  31175. _: 3
  31176. })
  31177. ], 8, ["disabled"]);
  31178. };
  31179. }
  31180. });
  31181. var ImageViewer = _export_sfc(_sfc_main84, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image-viewer/src/image-viewer.vue"]]);
  31182. // node_modules/element-plus/es/components/image-viewer/index.mjs
  31183. var ElImageViewer = withInstall(ImageViewer);
  31184. // node_modules/element-plus/es/components/image/src/image.mjs
  31185. var imageProps = buildProps({
  31186. hideOnClickModal: {
  31187. type: Boolean,
  31188. default: false
  31189. },
  31190. src: {
  31191. type: String,
  31192. default: ""
  31193. },
  31194. fit: {
  31195. type: String,
  31196. values: ["", "contain", "cover", "fill", "none", "scale-down"],
  31197. default: ""
  31198. },
  31199. loading: {
  31200. type: String,
  31201. values: ["eager", "lazy"]
  31202. },
  31203. lazy: {
  31204. type: Boolean,
  31205. default: false
  31206. },
  31207. scrollContainer: {
  31208. type: definePropType([String, Object])
  31209. },
  31210. previewSrcList: {
  31211. type: definePropType(Array),
  31212. default: () => mutable([])
  31213. },
  31214. previewTeleported: {
  31215. type: Boolean,
  31216. default: false
  31217. },
  31218. zIndex: {
  31219. type: Number
  31220. },
  31221. initialIndex: {
  31222. type: Number,
  31223. default: 0
  31224. },
  31225. infinite: {
  31226. type: Boolean,
  31227. default: true
  31228. },
  31229. closeOnPressEscape: {
  31230. type: Boolean,
  31231. default: true
  31232. },
  31233. zoomRate: {
  31234. type: Number,
  31235. default: 1.2
  31236. }
  31237. });
  31238. var imageEmits = {
  31239. load: (evt) => evt instanceof Event,
  31240. error: (evt) => evt instanceof Event,
  31241. switch: (val) => isNumber2(val),
  31242. close: () => true,
  31243. show: () => true
  31244. };
  31245. // node_modules/element-plus/es/components/image/src/image2.mjs
  31246. var _hoisted_140 = ["src", "loading"];
  31247. var _hoisted_225 = { key: 0 };
  31248. var __default__55 = defineComponent({
  31249. name: "ElImage",
  31250. inheritAttrs: false
  31251. });
  31252. var _sfc_main85 = defineComponent({
  31253. ...__default__55,
  31254. props: imageProps,
  31255. emits: imageEmits,
  31256. setup(__props, { emit }) {
  31257. const props = __props;
  31258. let prevOverflow = "";
  31259. const { t } = useLocale();
  31260. const ns2 = useNamespace("image");
  31261. const rawAttrs = useAttrs();
  31262. const attrs = useAttrs2();
  31263. const imageSrc = ref();
  31264. const hasLoadError = ref(false);
  31265. const isLoading = ref(true);
  31266. const showViewer = ref(false);
  31267. const container = ref();
  31268. const _scrollContainer = ref();
  31269. const supportLoading = isClient && "loading" in HTMLImageElement.prototype;
  31270. let stopScrollListener;
  31271. let stopWheelListener;
  31272. const containerStyle = computed2(() => rawAttrs.style);
  31273. const imageStyle = computed2(() => {
  31274. const { fit } = props;
  31275. if (isClient && fit) {
  31276. return { objectFit: fit };
  31277. }
  31278. return {};
  31279. });
  31280. const preview = computed2(() => {
  31281. const { previewSrcList } = props;
  31282. return Array.isArray(previewSrcList) && previewSrcList.length > 0;
  31283. });
  31284. const imageIndex = computed2(() => {
  31285. const { previewSrcList, initialIndex } = props;
  31286. let previewIndex = initialIndex;
  31287. if (initialIndex > previewSrcList.length - 1) {
  31288. previewIndex = 0;
  31289. }
  31290. return previewIndex;
  31291. });
  31292. const isManual = computed2(() => {
  31293. if (props.loading === "eager")
  31294. return false;
  31295. return !supportLoading && props.loading === "lazy" || props.lazy;
  31296. });
  31297. const loadImage = () => {
  31298. if (!isClient)
  31299. return;
  31300. isLoading.value = true;
  31301. hasLoadError.value = false;
  31302. imageSrc.value = props.src;
  31303. };
  31304. function handleLoad(event) {
  31305. isLoading.value = false;
  31306. hasLoadError.value = false;
  31307. emit("load", event);
  31308. }
  31309. function handleError(event) {
  31310. isLoading.value = false;
  31311. hasLoadError.value = true;
  31312. emit("error", event);
  31313. }
  31314. function handleLazyLoad() {
  31315. if (isInContainer(container.value, _scrollContainer.value)) {
  31316. loadImage();
  31317. removeLazyLoadListener();
  31318. }
  31319. }
  31320. const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200);
  31321. async function addLazyLoadListener() {
  31322. var _a2;
  31323. if (!isClient)
  31324. return;
  31325. await nextTick();
  31326. const { scrollContainer } = props;
  31327. if (isElement2(scrollContainer)) {
  31328. _scrollContainer.value = scrollContainer;
  31329. } else if (isString(scrollContainer) && scrollContainer !== "") {
  31330. _scrollContainer.value = (_a2 = document.querySelector(scrollContainer)) != null ? _a2 : void 0;
  31331. } else if (container.value) {
  31332. _scrollContainer.value = getScrollContainer(container.value);
  31333. }
  31334. if (_scrollContainer.value) {
  31335. stopScrollListener = useEventListener(_scrollContainer, "scroll", lazyLoadHandler);
  31336. setTimeout(() => handleLazyLoad(), 100);
  31337. }
  31338. }
  31339. function removeLazyLoadListener() {
  31340. if (!isClient || !_scrollContainer.value || !lazyLoadHandler)
  31341. return;
  31342. stopScrollListener == null ? void 0 : stopScrollListener();
  31343. _scrollContainer.value = void 0;
  31344. }
  31345. function wheelHandler(e) {
  31346. if (!e.ctrlKey)
  31347. return;
  31348. if (e.deltaY < 0) {
  31349. e.preventDefault();
  31350. return false;
  31351. } else if (e.deltaY > 0) {
  31352. e.preventDefault();
  31353. return false;
  31354. }
  31355. }
  31356. function clickHandler() {
  31357. if (!preview.value)
  31358. return;
  31359. stopWheelListener = useEventListener("wheel", wheelHandler, {
  31360. passive: false
  31361. });
  31362. prevOverflow = document.body.style.overflow;
  31363. document.body.style.overflow = "hidden";
  31364. showViewer.value = true;
  31365. emit("show");
  31366. }
  31367. function closeViewer() {
  31368. stopWheelListener == null ? void 0 : stopWheelListener();
  31369. document.body.style.overflow = prevOverflow;
  31370. showViewer.value = false;
  31371. emit("close");
  31372. }
  31373. function switchViewer(val) {
  31374. emit("switch", val);
  31375. }
  31376. watch(() => props.src, () => {
  31377. if (isManual.value) {
  31378. isLoading.value = true;
  31379. hasLoadError.value = false;
  31380. removeLazyLoadListener();
  31381. addLazyLoadListener();
  31382. } else {
  31383. loadImage();
  31384. }
  31385. });
  31386. onMounted(() => {
  31387. if (isManual.value) {
  31388. addLazyLoadListener();
  31389. } else {
  31390. loadImage();
  31391. }
  31392. });
  31393. return (_ctx, _cache) => {
  31394. return openBlock(), createElementBlock("div", {
  31395. ref_key: "container",
  31396. ref: container,
  31397. class: normalizeClass([unref(ns2).b(), _ctx.$attrs.class]),
  31398. style: normalizeStyle(unref(containerStyle))
  31399. }, [
  31400. imageSrc.value !== void 0 && !hasLoadError.value ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(attrs), {
  31401. src: imageSrc.value,
  31402. loading: _ctx.loading,
  31403. style: unref(imageStyle),
  31404. class: [
  31405. unref(ns2).e("inner"),
  31406. unref(preview) && unref(ns2).e("preview"),
  31407. isLoading.value && unref(ns2).is("loading")
  31408. ],
  31409. onClick: clickHandler,
  31410. onLoad: handleLoad,
  31411. onError: handleError
  31412. }), null, 16, _hoisted_140)) : createCommentVNode("v-if", true),
  31413. isLoading.value || hasLoadError.value ? (openBlock(), createElementBlock("div", {
  31414. key: 1,
  31415. class: normalizeClass(unref(ns2).e("wrapper"))
  31416. }, [
  31417. isLoading.value ? renderSlot(_ctx.$slots, "placeholder", { key: 0 }, () => [
  31418. createBaseVNode("div", {
  31419. class: normalizeClass(unref(ns2).e("placeholder"))
  31420. }, null, 2)
  31421. ]) : hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 1 }, () => [
  31422. createBaseVNode("div", {
  31423. class: normalizeClass(unref(ns2).e("error"))
  31424. }, toDisplayString(unref(t)("el.image.error")), 3)
  31425. ]) : createCommentVNode("v-if", true)
  31426. ], 2)) : createCommentVNode("v-if", true),
  31427. unref(preview) ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
  31428. showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
  31429. key: 0,
  31430. "z-index": _ctx.zIndex,
  31431. "initial-index": unref(imageIndex),
  31432. infinite: _ctx.infinite,
  31433. "zoom-rate": _ctx.zoomRate,
  31434. "url-list": _ctx.previewSrcList,
  31435. "hide-on-click-modal": _ctx.hideOnClickModal,
  31436. teleported: _ctx.previewTeleported,
  31437. "close-on-press-escape": _ctx.closeOnPressEscape,
  31438. onClose: closeViewer,
  31439. onSwitch: switchViewer
  31440. }, {
  31441. default: withCtx(() => [
  31442. _ctx.$slots.viewer ? (openBlock(), createElementBlock("div", _hoisted_225, [
  31443. renderSlot(_ctx.$slots, "viewer")
  31444. ])) : createCommentVNode("v-if", true)
  31445. ]),
  31446. _: 3
  31447. }, 8, ["z-index", "initial-index", "infinite", "zoom-rate", "url-list", "hide-on-click-modal", "teleported", "close-on-press-escape"])) : createCommentVNode("v-if", true)
  31448. ], 64)) : createCommentVNode("v-if", true)
  31449. ], 6);
  31450. };
  31451. }
  31452. });
  31453. var Image2 = _export_sfc(_sfc_main85, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/image/src/image.vue"]]);
  31454. // node_modules/element-plus/es/components/image/index.mjs
  31455. var ElImage = withInstall(Image2);
  31456. // node_modules/element-plus/es/components/input-number/src/input-number.mjs
  31457. var inputNumberProps = buildProps({
  31458. id: {
  31459. type: String,
  31460. default: void 0
  31461. },
  31462. step: {
  31463. type: Number,
  31464. default: 1
  31465. },
  31466. stepStrictly: Boolean,
  31467. max: {
  31468. type: Number,
  31469. default: Number.POSITIVE_INFINITY
  31470. },
  31471. min: {
  31472. type: Number,
  31473. default: Number.NEGATIVE_INFINITY
  31474. },
  31475. modelValue: Number,
  31476. readonly: Boolean,
  31477. disabled: Boolean,
  31478. size: useSizeProp,
  31479. controls: {
  31480. type: Boolean,
  31481. default: true
  31482. },
  31483. controlsPosition: {
  31484. type: String,
  31485. default: "",
  31486. values: ["", "right"]
  31487. },
  31488. valueOnClear: {
  31489. type: [String, Number, null],
  31490. validator: (val) => val === null || isNumber2(val) || ["min", "max"].includes(val),
  31491. default: null
  31492. },
  31493. name: String,
  31494. label: String,
  31495. placeholder: String,
  31496. precision: {
  31497. type: Number,
  31498. validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
  31499. },
  31500. validateEvent: {
  31501. type: Boolean,
  31502. default: true
  31503. }
  31504. });
  31505. var inputNumberEmits = {
  31506. [CHANGE_EVENT]: (prev, cur) => prev !== cur,
  31507. blur: (e) => e instanceof FocusEvent,
  31508. focus: (e) => e instanceof FocusEvent,
  31509. [INPUT_EVENT]: (val) => isNumber2(val) || isNil_default(val),
  31510. [UPDATE_MODEL_EVENT]: (val) => isNumber2(val) || isNil_default(val)
  31511. };
  31512. // node_modules/element-plus/es/components/input-number/src/input-number2.mjs
  31513. var _hoisted_141 = ["aria-label", "onKeydown"];
  31514. var _hoisted_226 = ["aria-label", "onKeydown"];
  31515. var __default__56 = defineComponent({
  31516. name: "ElInputNumber"
  31517. });
  31518. var _sfc_main86 = defineComponent({
  31519. ...__default__56,
  31520. props: inputNumberProps,
  31521. emits: inputNumberEmits,
  31522. setup(__props, { expose, emit }) {
  31523. const props = __props;
  31524. const { t } = useLocale();
  31525. const ns2 = useNamespace("input-number");
  31526. const input = ref();
  31527. const data = reactive({
  31528. currentValue: props.modelValue,
  31529. userInput: null
  31530. });
  31531. const { formItem } = useFormItem();
  31532. const minDisabled = computed2(() => isNumber2(props.modelValue) && props.modelValue <= props.min);
  31533. const maxDisabled = computed2(() => isNumber2(props.modelValue) && props.modelValue >= props.max);
  31534. const numPrecision = computed2(() => {
  31535. const stepPrecision = getPrecision(props.step);
  31536. if (!isUndefined2(props.precision)) {
  31537. if (stepPrecision > props.precision) {
  31538. debugWarn("InputNumber", "precision should not be less than the decimal places of step");
  31539. }
  31540. return props.precision;
  31541. } else {
  31542. return Math.max(getPrecision(props.modelValue), stepPrecision);
  31543. }
  31544. });
  31545. const controlsAtRight = computed2(() => {
  31546. return props.controls && props.controlsPosition === "right";
  31547. });
  31548. const inputNumberSize = useSize();
  31549. const inputNumberDisabled = useDisabled();
  31550. const displayValue = computed2(() => {
  31551. if (data.userInput !== null) {
  31552. return data.userInput;
  31553. }
  31554. let currentValue = data.currentValue;
  31555. if (isNil_default(currentValue))
  31556. return "";
  31557. if (isNumber2(currentValue)) {
  31558. if (Number.isNaN(currentValue))
  31559. return "";
  31560. if (!isUndefined2(props.precision)) {
  31561. currentValue = currentValue.toFixed(props.precision);
  31562. }
  31563. }
  31564. return currentValue;
  31565. });
  31566. const toPrecision = (num, pre) => {
  31567. if (isUndefined2(pre))
  31568. pre = numPrecision.value;
  31569. if (pre === 0)
  31570. return Math.round(num);
  31571. let snum = String(num);
  31572. const pointPos = snum.indexOf(".");
  31573. if (pointPos === -1)
  31574. return num;
  31575. const nums = snum.replace(".", "").split("");
  31576. const datum = nums[pointPos + pre];
  31577. if (!datum)
  31578. return num;
  31579. const length = snum.length;
  31580. if (snum.charAt(length - 1) === "5") {
  31581. snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
  31582. }
  31583. return Number.parseFloat(Number(snum).toFixed(pre));
  31584. };
  31585. const getPrecision = (value) => {
  31586. if (isNil_default(value))
  31587. return 0;
  31588. const valueString = value.toString();
  31589. const dotPosition = valueString.indexOf(".");
  31590. let precision = 0;
  31591. if (dotPosition !== -1) {
  31592. precision = valueString.length - dotPosition - 1;
  31593. }
  31594. return precision;
  31595. };
  31596. const ensurePrecision = (val, coefficient = 1) => {
  31597. if (!isNumber2(val))
  31598. return data.currentValue;
  31599. return toPrecision(val + props.step * coefficient);
  31600. };
  31601. const increase = () => {
  31602. if (props.readonly || inputNumberDisabled.value || maxDisabled.value)
  31603. return;
  31604. const value = Number(displayValue.value) || 0;
  31605. const newVal = ensurePrecision(value);
  31606. setCurrentValue(newVal);
  31607. emit(INPUT_EVENT, data.currentValue);
  31608. };
  31609. const decrease = () => {
  31610. if (props.readonly || inputNumberDisabled.value || minDisabled.value)
  31611. return;
  31612. const value = Number(displayValue.value) || 0;
  31613. const newVal = ensurePrecision(value, -1);
  31614. setCurrentValue(newVal);
  31615. emit(INPUT_EVENT, data.currentValue);
  31616. };
  31617. const verifyValue = (value, update2) => {
  31618. const { max: max5, min: min5, step, precision, stepStrictly, valueOnClear } = props;
  31619. let newVal = Number(value);
  31620. if (isNil_default(value) || Number.isNaN(newVal)) {
  31621. return null;
  31622. }
  31623. if (value === "") {
  31624. if (valueOnClear === null) {
  31625. return null;
  31626. }
  31627. newVal = isString(valueOnClear) ? { min: min5, max: max5 }[valueOnClear] : valueOnClear;
  31628. }
  31629. if (stepStrictly) {
  31630. newVal = toPrecision(Math.round(newVal / step) * step, precision);
  31631. }
  31632. if (!isUndefined2(precision)) {
  31633. newVal = toPrecision(newVal, precision);
  31634. }
  31635. if (newVal > max5 || newVal < min5) {
  31636. newVal = newVal > max5 ? max5 : min5;
  31637. update2 && emit(UPDATE_MODEL_EVENT, newVal);
  31638. }
  31639. return newVal;
  31640. };
  31641. const setCurrentValue = (value, emitChange = true) => {
  31642. var _a2;
  31643. const oldVal = data.currentValue;
  31644. const newVal = verifyValue(value);
  31645. if (oldVal === newVal)
  31646. return;
  31647. if (!emitChange) {
  31648. emit(UPDATE_MODEL_EVENT, newVal);
  31649. return;
  31650. }
  31651. data.userInput = null;
  31652. emit(UPDATE_MODEL_EVENT, newVal);
  31653. emit(CHANGE_EVENT, newVal, oldVal);
  31654. if (props.validateEvent) {
  31655. (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change").catch((err) => debugWarn(err));
  31656. }
  31657. data.currentValue = newVal;
  31658. };
  31659. const handleInput = (value) => {
  31660. data.userInput = value;
  31661. const newVal = value === "" ? null : Number(value);
  31662. emit(INPUT_EVENT, newVal);
  31663. setCurrentValue(newVal, false);
  31664. };
  31665. const handleInputChange = (value) => {
  31666. const newVal = value !== "" ? Number(value) : "";
  31667. if (isNumber2(newVal) && !Number.isNaN(newVal) || value === "") {
  31668. setCurrentValue(newVal);
  31669. }
  31670. data.userInput = null;
  31671. };
  31672. const focus = () => {
  31673. var _a2, _b;
  31674. (_b = (_a2 = input.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
  31675. };
  31676. const blur = () => {
  31677. var _a2, _b;
  31678. (_b = (_a2 = input.value) == null ? void 0 : _a2.blur) == null ? void 0 : _b.call(_a2);
  31679. };
  31680. const handleFocus = (event) => {
  31681. emit("focus", event);
  31682. };
  31683. const handleBlur = (event) => {
  31684. var _a2;
  31685. emit("blur", event);
  31686. if (props.validateEvent) {
  31687. (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur").catch((err) => debugWarn(err));
  31688. }
  31689. };
  31690. watch(() => props.modelValue, (value) => {
  31691. const userInput = verifyValue(data.userInput);
  31692. const newValue = verifyValue(value, true);
  31693. if (!isNumber2(userInput) && (!userInput || userInput !== newValue)) {
  31694. data.currentValue = newValue;
  31695. data.userInput = null;
  31696. }
  31697. }, { immediate: true });
  31698. onMounted(() => {
  31699. var _a2;
  31700. const { min: min5, max: max5, modelValue } = props;
  31701. const innerInput = (_a2 = input.value) == null ? void 0 : _a2.input;
  31702. innerInput.setAttribute("role", "spinbutton");
  31703. if (Number.isFinite(max5)) {
  31704. innerInput.setAttribute("aria-valuemax", String(max5));
  31705. } else {
  31706. innerInput.removeAttribute("aria-valuemax");
  31707. }
  31708. if (Number.isFinite(min5)) {
  31709. innerInput.setAttribute("aria-valuemin", String(min5));
  31710. } else {
  31711. innerInput.removeAttribute("aria-valuemin");
  31712. }
  31713. innerInput.setAttribute("aria-valuenow", String(data.currentValue));
  31714. innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
  31715. if (!isNumber2(modelValue) && modelValue != null) {
  31716. let val = Number(modelValue);
  31717. if (Number.isNaN(val)) {
  31718. val = null;
  31719. }
  31720. emit(UPDATE_MODEL_EVENT, val);
  31721. }
  31722. });
  31723. onUpdated(() => {
  31724. var _a2;
  31725. const innerInput = (_a2 = input.value) == null ? void 0 : _a2.input;
  31726. innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${data.currentValue}`);
  31727. });
  31728. expose({
  31729. focus,
  31730. blur
  31731. });
  31732. return (_ctx, _cache) => {
  31733. return openBlock(), createElementBlock("div", {
  31734. class: normalizeClass([
  31735. unref(ns2).b(),
  31736. unref(ns2).m(unref(inputNumberSize)),
  31737. unref(ns2).is("disabled", unref(inputNumberDisabled)),
  31738. unref(ns2).is("without-controls", !_ctx.controls),
  31739. unref(ns2).is("controls-right", unref(controlsAtRight))
  31740. ]),
  31741. onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {
  31742. }, ["prevent"]))
  31743. }, [
  31744. _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
  31745. key: 0,
  31746. role: "button",
  31747. "aria-label": unref(t)("el.inputNumber.decrease"),
  31748. class: normalizeClass([unref(ns2).e("decrease"), unref(ns2).is("disabled", unref(minDisabled))]),
  31749. onKeydown: withKeys(decrease, ["enter"])
  31750. }, [
  31751. createVNode(unref(ElIcon), null, {
  31752. default: withCtx(() => [
  31753. unref(controlsAtRight) ? (openBlock(), createBlock(unref(arrow_down_default), { key: 0 })) : (openBlock(), createBlock(unref(minus_default), { key: 1 }))
  31754. ]),
  31755. _: 1
  31756. })
  31757. ], 42, _hoisted_141)), [
  31758. [unref(vRepeatClick), decrease]
  31759. ]) : createCommentVNode("v-if", true),
  31760. _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
  31761. key: 1,
  31762. role: "button",
  31763. "aria-label": unref(t)("el.inputNumber.increase"),
  31764. class: normalizeClass([unref(ns2).e("increase"), unref(ns2).is("disabled", unref(maxDisabled))]),
  31765. onKeydown: withKeys(increase, ["enter"])
  31766. }, [
  31767. createVNode(unref(ElIcon), null, {
  31768. default: withCtx(() => [
  31769. unref(controlsAtRight) ? (openBlock(), createBlock(unref(arrow_up_default), { key: 0 })) : (openBlock(), createBlock(unref(plus_default), { key: 1 }))
  31770. ]),
  31771. _: 1
  31772. })
  31773. ], 42, _hoisted_226)), [
  31774. [unref(vRepeatClick), increase]
  31775. ]) : createCommentVNode("v-if", true),
  31776. createVNode(unref(ElInput), {
  31777. id: _ctx.id,
  31778. ref_key: "input",
  31779. ref: input,
  31780. type: "number",
  31781. step: _ctx.step,
  31782. "model-value": unref(displayValue),
  31783. placeholder: _ctx.placeholder,
  31784. readonly: _ctx.readonly,
  31785. disabled: unref(inputNumberDisabled),
  31786. size: unref(inputNumberSize),
  31787. max: _ctx.max,
  31788. min: _ctx.min,
  31789. name: _ctx.name,
  31790. label: _ctx.label,
  31791. "validate-event": false,
  31792. onKeydown: [
  31793. withKeys(withModifiers(increase, ["prevent"]), ["up"]),
  31794. withKeys(withModifiers(decrease, ["prevent"]), ["down"])
  31795. ],
  31796. onBlur: handleBlur,
  31797. onFocus: handleFocus,
  31798. onInput: handleInput,
  31799. onChange: handleInputChange
  31800. }, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
  31801. ], 34);
  31802. };
  31803. }
  31804. });
  31805. var InputNumber = _export_sfc(_sfc_main86, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
  31806. // node_modules/element-plus/es/components/input-number/index.mjs
  31807. var ElInputNumber = withInstall(InputNumber);
  31808. // node_modules/element-plus/es/components/link/src/link.mjs
  31809. var linkProps = buildProps({
  31810. type: {
  31811. type: String,
  31812. values: ["primary", "success", "warning", "info", "danger", "default"],
  31813. default: "default"
  31814. },
  31815. underline: {
  31816. type: Boolean,
  31817. default: true
  31818. },
  31819. disabled: { type: Boolean, default: false },
  31820. href: { type: String, default: "" },
  31821. icon: {
  31822. type: iconPropType
  31823. }
  31824. });
  31825. var linkEmits = {
  31826. click: (evt) => evt instanceof MouseEvent
  31827. };
  31828. // node_modules/element-plus/es/components/link/src/link2.mjs
  31829. var _hoisted_143 = ["href"];
  31830. var __default__57 = defineComponent({
  31831. name: "ElLink"
  31832. });
  31833. var _sfc_main87 = defineComponent({
  31834. ...__default__57,
  31835. props: linkProps,
  31836. emits: linkEmits,
  31837. setup(__props, { emit }) {
  31838. const props = __props;
  31839. const ns2 = useNamespace("link");
  31840. const linkKls = computed2(() => [
  31841. ns2.b(),
  31842. ns2.m(props.type),
  31843. ns2.is("disabled", props.disabled),
  31844. ns2.is("underline", props.underline && !props.disabled)
  31845. ]);
  31846. function handleClick(event) {
  31847. if (!props.disabled)
  31848. emit("click", event);
  31849. }
  31850. return (_ctx, _cache) => {
  31851. return openBlock(), createElementBlock("a", {
  31852. class: normalizeClass(unref(linkKls)),
  31853. href: _ctx.disabled || !_ctx.href ? void 0 : _ctx.href,
  31854. onClick: handleClick
  31855. }, [
  31856. _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  31857. default: withCtx(() => [
  31858. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  31859. ]),
  31860. _: 1
  31861. })) : createCommentVNode("v-if", true),
  31862. _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
  31863. key: 1,
  31864. class: normalizeClass(unref(ns2).e("inner"))
  31865. }, [
  31866. renderSlot(_ctx.$slots, "default")
  31867. ], 2)) : createCommentVNode("v-if", true),
  31868. _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
  31869. ], 10, _hoisted_143);
  31870. };
  31871. }
  31872. });
  31873. var Link = _export_sfc(_sfc_main87, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/link/src/link.vue"]]);
  31874. // node_modules/element-plus/es/components/link/index.mjs
  31875. var ElLink = withInstall(Link);
  31876. // node_modules/element-plus/es/components/menu/src/utils/submenu.mjs
  31877. var SubMenu = class {
  31878. constructor(parent2, domNode) {
  31879. this.parent = parent2;
  31880. this.domNode = domNode;
  31881. this.subIndex = 0;
  31882. this.subIndex = 0;
  31883. this.init();
  31884. }
  31885. init() {
  31886. this.subMenuItems = this.domNode.querySelectorAll("li");
  31887. this.addListeners();
  31888. }
  31889. gotoSubIndex(idx) {
  31890. if (idx === this.subMenuItems.length) {
  31891. idx = 0;
  31892. } else if (idx < 0) {
  31893. idx = this.subMenuItems.length - 1;
  31894. }
  31895. ;
  31896. this.subMenuItems[idx].focus();
  31897. this.subIndex = idx;
  31898. }
  31899. addListeners() {
  31900. const parentNode = this.parent.domNode;
  31901. Array.prototype.forEach.call(this.subMenuItems, (el) => {
  31902. el.addEventListener("keydown", (event) => {
  31903. let prevDef = false;
  31904. switch (event.code) {
  31905. case EVENT_CODE.down: {
  31906. this.gotoSubIndex(this.subIndex + 1);
  31907. prevDef = true;
  31908. break;
  31909. }
  31910. case EVENT_CODE.up: {
  31911. this.gotoSubIndex(this.subIndex - 1);
  31912. prevDef = true;
  31913. break;
  31914. }
  31915. case EVENT_CODE.tab: {
  31916. triggerEvent(parentNode, "mouseleave");
  31917. break;
  31918. }
  31919. case EVENT_CODE.enter:
  31920. case EVENT_CODE.space: {
  31921. prevDef = true;
  31922. event.currentTarget.click();
  31923. break;
  31924. }
  31925. }
  31926. if (prevDef) {
  31927. event.preventDefault();
  31928. event.stopPropagation();
  31929. }
  31930. return false;
  31931. });
  31932. });
  31933. }
  31934. };
  31935. // node_modules/element-plus/es/components/menu/src/utils/menu-item.mjs
  31936. var MenuItem = class {
  31937. constructor(domNode, namespace) {
  31938. this.domNode = domNode;
  31939. this.submenu = null;
  31940. this.submenu = null;
  31941. this.init(namespace);
  31942. }
  31943. init(namespace) {
  31944. this.domNode.setAttribute("tabindex", "0");
  31945. const menuChild = this.domNode.querySelector(`.${namespace}-menu`);
  31946. if (menuChild) {
  31947. this.submenu = new SubMenu(this, menuChild);
  31948. }
  31949. this.addListeners();
  31950. }
  31951. addListeners() {
  31952. this.domNode.addEventListener("keydown", (event) => {
  31953. let prevDef = false;
  31954. switch (event.code) {
  31955. case EVENT_CODE.down: {
  31956. triggerEvent(event.currentTarget, "mouseenter");
  31957. this.submenu && this.submenu.gotoSubIndex(0);
  31958. prevDef = true;
  31959. break;
  31960. }
  31961. case EVENT_CODE.up: {
  31962. triggerEvent(event.currentTarget, "mouseenter");
  31963. this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);
  31964. prevDef = true;
  31965. break;
  31966. }
  31967. case EVENT_CODE.tab: {
  31968. triggerEvent(event.currentTarget, "mouseleave");
  31969. break;
  31970. }
  31971. case EVENT_CODE.enter:
  31972. case EVENT_CODE.space: {
  31973. prevDef = true;
  31974. event.currentTarget.click();
  31975. break;
  31976. }
  31977. }
  31978. if (prevDef) {
  31979. event.preventDefault();
  31980. }
  31981. });
  31982. }
  31983. };
  31984. // node_modules/element-plus/es/components/menu/src/utils/menu-bar.mjs
  31985. var Menu = class {
  31986. constructor(domNode, namespace) {
  31987. this.domNode = domNode;
  31988. this.init(namespace);
  31989. }
  31990. init(namespace) {
  31991. const menuChildren = this.domNode.childNodes;
  31992. Array.from(menuChildren).forEach((child) => {
  31993. if (child.nodeType === 1) {
  31994. new MenuItem(child, namespace);
  31995. }
  31996. });
  31997. }
  31998. };
  31999. // node_modules/element-plus/es/components/menu/src/menu-collapse-transition.mjs
  32000. var _sfc_main88 = defineComponent({
  32001. name: "ElMenuCollapseTransition",
  32002. setup() {
  32003. const ns2 = useNamespace("menu");
  32004. const listeners = {
  32005. onBeforeEnter: (el) => el.style.opacity = "0.2",
  32006. onEnter(el, done) {
  32007. addClass(el, `${ns2.namespace.value}-opacity-transition`);
  32008. el.style.opacity = "1";
  32009. done();
  32010. },
  32011. onAfterEnter(el) {
  32012. removeClass(el, `${ns2.namespace.value}-opacity-transition`);
  32013. el.style.opacity = "";
  32014. },
  32015. onBeforeLeave(el) {
  32016. if (!el.dataset) {
  32017. ;
  32018. el.dataset = {};
  32019. }
  32020. if (hasClass(el, ns2.m("collapse"))) {
  32021. removeClass(el, ns2.m("collapse"));
  32022. el.dataset.oldOverflow = el.style.overflow;
  32023. el.dataset.scrollWidth = el.clientWidth.toString();
  32024. addClass(el, ns2.m("collapse"));
  32025. } else {
  32026. addClass(el, ns2.m("collapse"));
  32027. el.dataset.oldOverflow = el.style.overflow;
  32028. el.dataset.scrollWidth = el.clientWidth.toString();
  32029. removeClass(el, ns2.m("collapse"));
  32030. }
  32031. el.style.width = `${el.scrollWidth}px`;
  32032. el.style.overflow = "hidden";
  32033. },
  32034. onLeave(el) {
  32035. addClass(el, "horizontal-collapse-transition");
  32036. el.style.width = `${el.dataset.scrollWidth}px`;
  32037. }
  32038. };
  32039. return {
  32040. listeners
  32041. };
  32042. }
  32043. });
  32044. function _sfc_render21(_ctx, _cache, $props, $setup, $data, $options) {
  32045. return openBlock(), createBlock(Transition, mergeProps({ mode: "out-in" }, _ctx.listeners), {
  32046. default: withCtx(() => [
  32047. renderSlot(_ctx.$slots, "default")
  32048. ]),
  32049. _: 3
  32050. }, 16);
  32051. }
  32052. var ElMenuCollapseTransition = _export_sfc(_sfc_main88, [["render", _sfc_render21], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);
  32053. // node_modules/element-plus/es/components/menu/src/use-menu.mjs
  32054. function useMenu(instance, currentIndex) {
  32055. const indexPath = computed2(() => {
  32056. let parent2 = instance.parent;
  32057. const path = [currentIndex.value];
  32058. while (parent2.type.name !== "ElMenu") {
  32059. if (parent2.props.index) {
  32060. path.unshift(parent2.props.index);
  32061. }
  32062. parent2 = parent2.parent;
  32063. }
  32064. return path;
  32065. });
  32066. const parentMenu = computed2(() => {
  32067. let parent2 = instance.parent;
  32068. while (parent2 && !["ElMenu", "ElSubMenu"].includes(parent2.type.name)) {
  32069. parent2 = parent2.parent;
  32070. }
  32071. return parent2;
  32072. });
  32073. return {
  32074. parentMenu,
  32075. indexPath
  32076. };
  32077. }
  32078. // node_modules/element-plus/es/components/menu/src/use-menu-color.mjs
  32079. function useMenuColor(props) {
  32080. const menuBarColor = computed2(() => {
  32081. const color = props.backgroundColor;
  32082. if (!color) {
  32083. return "";
  32084. } else {
  32085. return new TinyColor(color).shade(20).toString();
  32086. }
  32087. });
  32088. return menuBarColor;
  32089. }
  32090. // node_modules/element-plus/es/components/menu/src/use-menu-css-var.mjs
  32091. var useMenuCssVar = (props, level) => {
  32092. const ns2 = useNamespace("menu");
  32093. return computed2(() => {
  32094. return ns2.cssVarBlock({
  32095. "text-color": props.textColor || "",
  32096. "hover-text-color": props.textColor || "",
  32097. "bg-color": props.backgroundColor || "",
  32098. "hover-bg-color": useMenuColor(props).value || "",
  32099. "active-color": props.activeTextColor || "",
  32100. level: `${level}`
  32101. });
  32102. });
  32103. };
  32104. // node_modules/element-plus/es/components/menu/src/sub-menu.mjs
  32105. var subMenuProps = buildProps({
  32106. index: {
  32107. type: String,
  32108. required: true
  32109. },
  32110. showTimeout: {
  32111. type: Number,
  32112. default: 300
  32113. },
  32114. hideTimeout: {
  32115. type: Number,
  32116. default: 300
  32117. },
  32118. popperClass: String,
  32119. disabled: Boolean,
  32120. popperAppendToBody: {
  32121. type: Boolean,
  32122. default: void 0
  32123. },
  32124. popperOffset: {
  32125. type: Number,
  32126. default: 6
  32127. },
  32128. expandCloseIcon: {
  32129. type: iconPropType
  32130. },
  32131. expandOpenIcon: {
  32132. type: iconPropType
  32133. },
  32134. collapseCloseIcon: {
  32135. type: iconPropType
  32136. },
  32137. collapseOpenIcon: {
  32138. type: iconPropType
  32139. }
  32140. });
  32141. var COMPONENT_NAME12 = "ElSubMenu";
  32142. var SubMenu2 = defineComponent({
  32143. name: COMPONENT_NAME12,
  32144. props: subMenuProps,
  32145. setup(props, { slots, expose }) {
  32146. const instance = getCurrentInstance();
  32147. const { indexPath, parentMenu } = useMenu(instance, computed2(() => props.index));
  32148. const nsMenu = useNamespace("menu");
  32149. const nsSubMenu = useNamespace("sub-menu");
  32150. const rootMenu = inject("rootMenu");
  32151. if (!rootMenu)
  32152. throwError(COMPONENT_NAME12, "can not inject root menu");
  32153. const subMenu = inject(`subMenu:${parentMenu.value.uid}`);
  32154. if (!subMenu)
  32155. throwError(COMPONENT_NAME12, "can not inject sub menu");
  32156. const items = ref({});
  32157. const subMenus = ref({});
  32158. let timeout;
  32159. const mouseInChild = ref(false);
  32160. const verticalTitleRef = ref();
  32161. const vPopper = ref(null);
  32162. const currentPlacement = computed2(() => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start");
  32163. const subMenuTitleIcon = computed2(() => {
  32164. return mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse ? props.expandCloseIcon && props.expandOpenIcon ? opened.value ? props.expandOpenIcon : props.expandCloseIcon : arrow_down_default : props.collapseCloseIcon && props.collapseOpenIcon ? opened.value ? props.collapseOpenIcon : props.collapseCloseIcon : arrow_right_default;
  32165. });
  32166. const isFirstLevel = computed2(() => {
  32167. return subMenu.level === 0;
  32168. });
  32169. const appendToBody = computed2(() => {
  32170. return props.popperAppendToBody === void 0 ? isFirstLevel.value : Boolean(props.popperAppendToBody);
  32171. });
  32172. const menuTransitionName = computed2(() => rootMenu.props.collapse ? `${nsMenu.namespace.value}-zoom-in-left` : `${nsMenu.namespace.value}-zoom-in-top`);
  32173. const fallbackPlacements = computed2(() => mode.value === "horizontal" && isFirstLevel.value ? [
  32174. "bottom-start",
  32175. "bottom-end",
  32176. "top-start",
  32177. "top-end",
  32178. "right-start",
  32179. "left-start"
  32180. ] : [
  32181. "right-start",
  32182. "left-start",
  32183. "bottom-start",
  32184. "bottom-end",
  32185. "top-start",
  32186. "top-end"
  32187. ]);
  32188. const opened = computed2(() => rootMenu.openedMenus.includes(props.index));
  32189. const active = computed2(() => {
  32190. let isActive = false;
  32191. Object.values(items.value).forEach((item2) => {
  32192. if (item2.active) {
  32193. isActive = true;
  32194. }
  32195. });
  32196. Object.values(subMenus.value).forEach((subItem) => {
  32197. if (subItem.active) {
  32198. isActive = true;
  32199. }
  32200. });
  32201. return isActive;
  32202. });
  32203. const backgroundColor = computed2(() => rootMenu.props.backgroundColor || "");
  32204. const activeTextColor = computed2(() => rootMenu.props.activeTextColor || "");
  32205. const textColor = computed2(() => rootMenu.props.textColor || "");
  32206. const mode = computed2(() => rootMenu.props.mode);
  32207. const item = reactive({
  32208. index: props.index,
  32209. indexPath,
  32210. active
  32211. });
  32212. const titleStyle = computed2(() => {
  32213. if (mode.value !== "horizontal") {
  32214. return {
  32215. color: textColor.value
  32216. };
  32217. }
  32218. return {
  32219. borderBottomColor: active.value ? rootMenu.props.activeTextColor ? activeTextColor.value : "" : "transparent",
  32220. color: active.value ? activeTextColor.value : textColor.value
  32221. };
  32222. });
  32223. const doDestroy = () => {
  32224. var _a2, _b, _c;
  32225. return (_c = (_b = (_a2 = vPopper.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.popperInstanceRef) == null ? void 0 : _c.destroy();
  32226. };
  32227. const handleCollapseToggle = (value) => {
  32228. if (!value) {
  32229. doDestroy();
  32230. }
  32231. };
  32232. const handleClick = () => {
  32233. if (rootMenu.props.menuTrigger === "hover" && rootMenu.props.mode === "horizontal" || rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled)
  32234. return;
  32235. rootMenu.handleSubMenuClick({
  32236. index: props.index,
  32237. indexPath: indexPath.value,
  32238. active: active.value
  32239. });
  32240. };
  32241. const handleMouseenter = (event, showTimeout = props.showTimeout) => {
  32242. var _a2;
  32243. if (event.type === "focus") {
  32244. return;
  32245. }
  32246. if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) {
  32247. return;
  32248. }
  32249. subMenu.mouseInChild.value = true;
  32250. timeout == null ? void 0 : timeout();
  32251. ({ stop: timeout } = useTimeoutFn(() => {
  32252. rootMenu.openMenu(props.index, indexPath.value);
  32253. }, showTimeout));
  32254. if (appendToBody.value) {
  32255. (_a2 = parentMenu.value.vnode.el) == null ? void 0 : _a2.dispatchEvent(new MouseEvent("mouseenter"));
  32256. }
  32257. };
  32258. const handleMouseleave = (deepDispatch = false) => {
  32259. var _a2, _b;
  32260. if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical") {
  32261. return;
  32262. }
  32263. timeout == null ? void 0 : timeout();
  32264. subMenu.mouseInChild.value = false;
  32265. ({ stop: timeout } = useTimeoutFn(() => !mouseInChild.value && rootMenu.closeMenu(props.index, indexPath.value), props.hideTimeout));
  32266. if (appendToBody.value && deepDispatch) {
  32267. if (((_a2 = instance.parent) == null ? void 0 : _a2.type.name) === "ElSubMenu") {
  32268. (_b = subMenu.handleMouseleave) == null ? void 0 : _b.call(subMenu, true);
  32269. }
  32270. }
  32271. };
  32272. watch(() => rootMenu.props.collapse, (value) => handleCollapseToggle(Boolean(value)));
  32273. {
  32274. const addSubMenu = (item2) => {
  32275. subMenus.value[item2.index] = item2;
  32276. };
  32277. const removeSubMenu = (item2) => {
  32278. delete subMenus.value[item2.index];
  32279. };
  32280. provide(`subMenu:${instance.uid}`, {
  32281. addSubMenu,
  32282. removeSubMenu,
  32283. handleMouseleave,
  32284. mouseInChild,
  32285. level: subMenu.level + 1
  32286. });
  32287. }
  32288. expose({
  32289. opened
  32290. });
  32291. onMounted(() => {
  32292. rootMenu.addSubMenu(item);
  32293. subMenu.addSubMenu(item);
  32294. });
  32295. onBeforeUnmount(() => {
  32296. subMenu.removeSubMenu(item);
  32297. rootMenu.removeSubMenu(item);
  32298. });
  32299. return () => {
  32300. var _a2;
  32301. const titleTag = [
  32302. (_a2 = slots.title) == null ? void 0 : _a2.call(slots),
  32303. h(ElIcon, {
  32304. class: nsSubMenu.e("icon-arrow"),
  32305. style: {
  32306. transform: opened.value ? props.expandCloseIcon && props.expandOpenIcon || props.collapseCloseIcon && props.collapseOpenIcon && rootMenu.props.collapse ? "none" : "rotateZ(180deg)" : "none"
  32307. }
  32308. }, {
  32309. default: () => isString(subMenuTitleIcon.value) ? h(instance.appContext.components[subMenuTitleIcon.value]) : h(subMenuTitleIcon.value)
  32310. })
  32311. ];
  32312. const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1);
  32313. const child = rootMenu.isMenuPopup ? h(ElTooltip, {
  32314. ref: vPopper,
  32315. visible: opened.value,
  32316. effect: "light",
  32317. pure: true,
  32318. offset: props.popperOffset,
  32319. showArrow: false,
  32320. persistent: true,
  32321. popperClass: props.popperClass,
  32322. placement: currentPlacement.value,
  32323. teleported: appendToBody.value,
  32324. fallbackPlacements: fallbackPlacements.value,
  32325. transition: menuTransitionName.value,
  32326. gpuAcceleration: false
  32327. }, {
  32328. content: () => {
  32329. var _a22;
  32330. return h("div", {
  32331. class: [
  32332. nsMenu.m(mode.value),
  32333. nsMenu.m("popup-container"),
  32334. props.popperClass
  32335. ],
  32336. onMouseenter: (evt) => handleMouseenter(evt, 100),
  32337. onMouseleave: () => handleMouseleave(true),
  32338. onFocus: (evt) => handleMouseenter(evt, 100)
  32339. }, [
  32340. h("ul", {
  32341. class: [
  32342. nsMenu.b(),
  32343. nsMenu.m("popup"),
  32344. nsMenu.m(`popup-${currentPlacement.value}`)
  32345. ],
  32346. style: ulStyle.value
  32347. }, [(_a22 = slots.default) == null ? void 0 : _a22.call(slots)])
  32348. ]);
  32349. },
  32350. default: () => h("div", {
  32351. class: nsSubMenu.e("title"),
  32352. style: [
  32353. titleStyle.value,
  32354. { backgroundColor: backgroundColor.value }
  32355. ],
  32356. onClick: handleClick
  32357. }, titleTag)
  32358. }) : h(Fragment, {}, [
  32359. h("div", {
  32360. class: nsSubMenu.e("title"),
  32361. style: [
  32362. titleStyle.value,
  32363. { backgroundColor: backgroundColor.value }
  32364. ],
  32365. ref: verticalTitleRef,
  32366. onClick: handleClick
  32367. }, titleTag),
  32368. h(_CollapseTransition, {}, {
  32369. default: () => {
  32370. var _a22;
  32371. return withDirectives(h("ul", {
  32372. role: "menu",
  32373. class: [nsMenu.b(), nsMenu.m("inline")],
  32374. style: ulStyle.value
  32375. }, [(_a22 = slots.default) == null ? void 0 : _a22.call(slots)]), [[vShow, opened.value]]);
  32376. }
  32377. })
  32378. ]);
  32379. return h("li", {
  32380. class: [
  32381. nsSubMenu.b(),
  32382. nsSubMenu.is("active", active.value),
  32383. nsSubMenu.is("opened", opened.value),
  32384. nsSubMenu.is("disabled", props.disabled)
  32385. ],
  32386. role: "menuitem",
  32387. ariaHaspopup: true,
  32388. ariaExpanded: opened.value,
  32389. onMouseenter: handleMouseenter,
  32390. onMouseleave: () => handleMouseleave(true),
  32391. onFocus: handleMouseenter
  32392. }, [child]);
  32393. };
  32394. }
  32395. });
  32396. // node_modules/element-plus/es/components/menu/src/menu.mjs
  32397. var menuProps = buildProps({
  32398. mode: {
  32399. type: String,
  32400. values: ["horizontal", "vertical"],
  32401. default: "vertical"
  32402. },
  32403. defaultActive: {
  32404. type: String,
  32405. default: ""
  32406. },
  32407. defaultOpeneds: {
  32408. type: definePropType(Array),
  32409. default: () => mutable([])
  32410. },
  32411. uniqueOpened: Boolean,
  32412. router: Boolean,
  32413. menuTrigger: {
  32414. type: String,
  32415. values: ["hover", "click"],
  32416. default: "hover"
  32417. },
  32418. collapse: Boolean,
  32419. backgroundColor: String,
  32420. textColor: String,
  32421. activeTextColor: String,
  32422. collapseTransition: {
  32423. type: Boolean,
  32424. default: true
  32425. },
  32426. ellipsis: {
  32427. type: Boolean,
  32428. default: true
  32429. },
  32430. popperEffect: {
  32431. type: String,
  32432. values: ["dark", "light"],
  32433. default: "dark"
  32434. }
  32435. });
  32436. var checkIndexPath = (indexPath) => Array.isArray(indexPath) && indexPath.every((path) => isString(path));
  32437. var menuEmits = {
  32438. close: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
  32439. open: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
  32440. select: (index, indexPath, item, routerResult) => isString(index) && checkIndexPath(indexPath) && isObject(item) && (routerResult === void 0 || routerResult instanceof Promise)
  32441. };
  32442. var Menu2 = defineComponent({
  32443. name: "ElMenu",
  32444. props: menuProps,
  32445. emits: menuEmits,
  32446. setup(props, { emit, slots, expose }) {
  32447. const instance = getCurrentInstance();
  32448. const router = instance.appContext.config.globalProperties.$router;
  32449. const menu = ref();
  32450. const nsMenu = useNamespace("menu");
  32451. const nsSubMenu = useNamespace("sub-menu");
  32452. const sliceIndex = ref(-1);
  32453. const openedMenus = ref(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
  32454. const activeIndex = ref(props.defaultActive);
  32455. const items = ref({});
  32456. const subMenus = ref({});
  32457. const isMenuPopup = computed2(() => {
  32458. return props.mode === "horizontal" || props.mode === "vertical" && props.collapse;
  32459. });
  32460. const initMenu = () => {
  32461. const activeItem = activeIndex.value && items.value[activeIndex.value];
  32462. if (!activeItem || props.mode === "horizontal" || props.collapse)
  32463. return;
  32464. const indexPath = activeItem.indexPath;
  32465. indexPath.forEach((index) => {
  32466. const subMenu = subMenus.value[index];
  32467. subMenu && openMenu(index, subMenu.indexPath);
  32468. });
  32469. };
  32470. const openMenu = (index, indexPath) => {
  32471. if (openedMenus.value.includes(index))
  32472. return;
  32473. if (props.uniqueOpened) {
  32474. openedMenus.value = openedMenus.value.filter((index2) => indexPath.includes(index2));
  32475. }
  32476. openedMenus.value.push(index);
  32477. emit("open", index, indexPath);
  32478. };
  32479. const closeMenu = (index, indexPath) => {
  32480. const i = openedMenus.value.indexOf(index);
  32481. if (i !== -1) {
  32482. openedMenus.value.splice(i, 1);
  32483. }
  32484. emit("close", index, indexPath);
  32485. };
  32486. const handleSubMenuClick = ({
  32487. index,
  32488. indexPath
  32489. }) => {
  32490. const isOpened = openedMenus.value.includes(index);
  32491. if (isOpened) {
  32492. closeMenu(index, indexPath);
  32493. } else {
  32494. openMenu(index, indexPath);
  32495. }
  32496. };
  32497. const handleMenuItemClick = (menuItem) => {
  32498. if (props.mode === "horizontal" || props.collapse) {
  32499. openedMenus.value = [];
  32500. }
  32501. const { index, indexPath } = menuItem;
  32502. if (index === void 0 || indexPath === void 0)
  32503. return;
  32504. if (props.router && router) {
  32505. const route = menuItem.route || index;
  32506. const routerResult = router.push(route).then((res) => {
  32507. if (!res)
  32508. activeIndex.value = index;
  32509. return res;
  32510. });
  32511. emit("select", index, indexPath, { index, indexPath, route }, routerResult);
  32512. } else {
  32513. activeIndex.value = index;
  32514. emit("select", index, indexPath, { index, indexPath });
  32515. }
  32516. };
  32517. const updateActiveIndex = (val) => {
  32518. const itemsInData = items.value;
  32519. const item = itemsInData[val] || activeIndex.value && itemsInData[activeIndex.value] || itemsInData[props.defaultActive];
  32520. if (item) {
  32521. activeIndex.value = item.index;
  32522. } else {
  32523. activeIndex.value = val;
  32524. }
  32525. };
  32526. const calcSliceIndex = () => {
  32527. var _a2, _b;
  32528. if (!menu.value)
  32529. return -1;
  32530. const items2 = Array.from((_b = (_a2 = menu.value) == null ? void 0 : _a2.childNodes) != null ? _b : []).filter((item) => item.nodeName !== "#text" || item.nodeValue);
  32531. const moreItemWidth = 64;
  32532. const paddingLeft = Number.parseInt(getComputedStyle(menu.value).paddingLeft, 10);
  32533. const paddingRight = Number.parseInt(getComputedStyle(menu.value).paddingRight, 10);
  32534. const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight;
  32535. let calcWidth = 0;
  32536. let sliceIndex2 = 0;
  32537. items2.forEach((item, index) => {
  32538. calcWidth += item.offsetWidth || 0;
  32539. if (calcWidth <= menuWidth - moreItemWidth) {
  32540. sliceIndex2 = index + 1;
  32541. }
  32542. });
  32543. return sliceIndex2 === items2.length ? -1 : sliceIndex2;
  32544. };
  32545. const debounce2 = (fn2, wait = 33.34) => {
  32546. let timmer;
  32547. return () => {
  32548. timmer && clearTimeout(timmer);
  32549. timmer = setTimeout(() => {
  32550. fn2();
  32551. }, wait);
  32552. };
  32553. };
  32554. let isFirstTimeRender = true;
  32555. const handleResize = () => {
  32556. const callback = () => {
  32557. sliceIndex.value = -1;
  32558. nextTick(() => {
  32559. sliceIndex.value = calcSliceIndex();
  32560. });
  32561. };
  32562. isFirstTimeRender ? callback() : debounce2(callback)();
  32563. isFirstTimeRender = false;
  32564. };
  32565. watch(() => props.defaultActive, (currentActive) => {
  32566. if (!items.value[currentActive]) {
  32567. activeIndex.value = "";
  32568. }
  32569. updateActiveIndex(currentActive);
  32570. });
  32571. watch(() => props.collapse, (value) => {
  32572. if (value)
  32573. openedMenus.value = [];
  32574. });
  32575. watch(items.value, initMenu);
  32576. let resizeStopper;
  32577. watchEffect(() => {
  32578. if (props.mode === "horizontal" && props.ellipsis)
  32579. resizeStopper = useResizeObserver(menu, handleResize).stop;
  32580. else
  32581. resizeStopper == null ? void 0 : resizeStopper();
  32582. });
  32583. {
  32584. const addSubMenu = (item) => {
  32585. subMenus.value[item.index] = item;
  32586. };
  32587. const removeSubMenu = (item) => {
  32588. delete subMenus.value[item.index];
  32589. };
  32590. const addMenuItem = (item) => {
  32591. items.value[item.index] = item;
  32592. };
  32593. const removeMenuItem = (item) => {
  32594. delete items.value[item.index];
  32595. };
  32596. provide("rootMenu", reactive({
  32597. props,
  32598. openedMenus,
  32599. items,
  32600. subMenus,
  32601. activeIndex,
  32602. isMenuPopup,
  32603. addMenuItem,
  32604. removeMenuItem,
  32605. addSubMenu,
  32606. removeSubMenu,
  32607. openMenu,
  32608. closeMenu,
  32609. handleMenuItemClick,
  32610. handleSubMenuClick
  32611. }));
  32612. provide(`subMenu:${instance.uid}`, {
  32613. addSubMenu,
  32614. removeSubMenu,
  32615. mouseInChild: ref(false),
  32616. level: 0
  32617. });
  32618. }
  32619. onMounted(() => {
  32620. if (props.mode === "horizontal") {
  32621. new Menu(instance.vnode.el, nsMenu.namespace.value);
  32622. }
  32623. });
  32624. {
  32625. const open = (index) => {
  32626. const { indexPath } = subMenus.value[index];
  32627. indexPath.forEach((i) => openMenu(i, indexPath));
  32628. };
  32629. expose({
  32630. open,
  32631. close: closeMenu,
  32632. handleResize
  32633. });
  32634. }
  32635. return () => {
  32636. var _a2, _b;
  32637. let slot = (_b = (_a2 = slots.default) == null ? void 0 : _a2.call(slots)) != null ? _b : [];
  32638. const vShowMore = [];
  32639. if (props.mode === "horizontal" && menu.value) {
  32640. const originalSlot = flattedChildren(slot);
  32641. const slotDefault = sliceIndex.value === -1 ? originalSlot : originalSlot.slice(0, sliceIndex.value);
  32642. const slotMore = sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value);
  32643. if ((slotMore == null ? void 0 : slotMore.length) && props.ellipsis) {
  32644. slot = slotDefault;
  32645. vShowMore.push(h(SubMenu2, {
  32646. index: "sub-menu-more",
  32647. class: nsSubMenu.e("hide-arrow")
  32648. }, {
  32649. title: () => h(ElIcon, {
  32650. class: nsSubMenu.e("icon-more")
  32651. }, { default: () => h(more_default) }),
  32652. default: () => slotMore
  32653. }));
  32654. }
  32655. }
  32656. const ulStyle = useMenuCssVar(props, 0);
  32657. const vMenu = h("ul", {
  32658. key: String(props.collapse),
  32659. role: "menubar",
  32660. ref: menu,
  32661. style: ulStyle.value,
  32662. class: {
  32663. [nsMenu.b()]: true,
  32664. [nsMenu.m(props.mode)]: true,
  32665. [nsMenu.m("collapse")]: props.collapse
  32666. }
  32667. }, [...slot, ...vShowMore]);
  32668. if (props.collapseTransition && props.mode === "vertical") {
  32669. return h(ElMenuCollapseTransition, () => vMenu);
  32670. }
  32671. return vMenu;
  32672. };
  32673. }
  32674. });
  32675. // node_modules/element-plus/es/components/menu/src/menu-item.mjs
  32676. var menuItemProps = buildProps({
  32677. index: {
  32678. type: definePropType([String, null]),
  32679. default: null
  32680. },
  32681. route: {
  32682. type: definePropType([String, Object])
  32683. },
  32684. disabled: Boolean
  32685. });
  32686. var menuItemEmits = {
  32687. click: (item) => isString(item.index) && Array.isArray(item.indexPath)
  32688. };
  32689. // node_modules/element-plus/es/components/menu/src/menu-item2.mjs
  32690. var COMPONENT_NAME13 = "ElMenuItem";
  32691. var _sfc_main89 = defineComponent({
  32692. name: COMPONENT_NAME13,
  32693. components: {
  32694. ElTooltip
  32695. },
  32696. props: menuItemProps,
  32697. emits: menuItemEmits,
  32698. setup(props, { emit }) {
  32699. const instance = getCurrentInstance();
  32700. const rootMenu = inject("rootMenu");
  32701. const nsMenu = useNamespace("menu");
  32702. const nsMenuItem = useNamespace("menu-item");
  32703. if (!rootMenu)
  32704. throwError(COMPONENT_NAME13, "can not inject root menu");
  32705. const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
  32706. const subMenu = inject(`subMenu:${parentMenu.value.uid}`);
  32707. if (!subMenu)
  32708. throwError(COMPONENT_NAME13, "can not inject sub menu");
  32709. const active = computed2(() => props.index === rootMenu.activeIndex);
  32710. const item = reactive({
  32711. index: props.index,
  32712. indexPath,
  32713. active
  32714. });
  32715. const handleClick = () => {
  32716. if (!props.disabled) {
  32717. rootMenu.handleMenuItemClick({
  32718. index: props.index,
  32719. indexPath: indexPath.value,
  32720. route: props.route
  32721. });
  32722. emit("click", item);
  32723. }
  32724. };
  32725. onMounted(() => {
  32726. subMenu.addSubMenu(item);
  32727. rootMenu.addMenuItem(item);
  32728. });
  32729. onBeforeUnmount(() => {
  32730. subMenu.removeSubMenu(item);
  32731. rootMenu.removeMenuItem(item);
  32732. });
  32733. return {
  32734. parentMenu,
  32735. rootMenu,
  32736. active,
  32737. nsMenu,
  32738. nsMenuItem,
  32739. handleClick
  32740. };
  32741. }
  32742. });
  32743. function _sfc_render22(_ctx, _cache, $props, $setup, $data, $options) {
  32744. const _component_el_tooltip = resolveComponent("el-tooltip");
  32745. return openBlock(), createElementBlock("li", {
  32746. class: normalizeClass([
  32747. _ctx.nsMenuItem.b(),
  32748. _ctx.nsMenuItem.is("active", _ctx.active),
  32749. _ctx.nsMenuItem.is("disabled", _ctx.disabled)
  32750. ]),
  32751. role: "menuitem",
  32752. tabindex: "-1",
  32753. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
  32754. }, [
  32755. _ctx.parentMenu.type.name === "ElMenu" && _ctx.rootMenu.props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(_component_el_tooltip, {
  32756. key: 0,
  32757. effect: _ctx.rootMenu.props.popperEffect,
  32758. placement: "right",
  32759. "fallback-placements": ["left"],
  32760. persistent: ""
  32761. }, {
  32762. content: withCtx(() => [
  32763. renderSlot(_ctx.$slots, "title")
  32764. ]),
  32765. default: withCtx(() => [
  32766. createBaseVNode("div", {
  32767. class: normalizeClass(_ctx.nsMenu.be("tooltip", "trigger"))
  32768. }, [
  32769. renderSlot(_ctx.$slots, "default")
  32770. ], 2)
  32771. ]),
  32772. _: 3
  32773. }, 8, ["effect"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  32774. renderSlot(_ctx.$slots, "default"),
  32775. renderSlot(_ctx.$slots, "title")
  32776. ], 64))
  32777. ], 2);
  32778. }
  32779. var MenuItem2 = _export_sfc(_sfc_main89, [["render", _sfc_render22], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);
  32780. // node_modules/element-plus/es/components/menu/src/menu-item-group.mjs
  32781. var menuItemGroupProps = {
  32782. title: String
  32783. };
  32784. // node_modules/element-plus/es/components/menu/src/menu-item-group2.mjs
  32785. var COMPONENT_NAME14 = "ElMenuItemGroup";
  32786. var _sfc_main90 = defineComponent({
  32787. name: COMPONENT_NAME14,
  32788. props: menuItemGroupProps,
  32789. setup() {
  32790. const ns2 = useNamespace("menu-item-group");
  32791. return {
  32792. ns: ns2
  32793. };
  32794. }
  32795. });
  32796. function _sfc_render23(_ctx, _cache, $props, $setup, $data, $options) {
  32797. return openBlock(), createElementBlock("li", {
  32798. class: normalizeClass(_ctx.ns.b())
  32799. }, [
  32800. createBaseVNode("div", {
  32801. class: normalizeClass(_ctx.ns.e("title"))
  32802. }, [
  32803. !_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  32804. createTextVNode(toDisplayString(_ctx.title), 1)
  32805. ], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })
  32806. ], 2),
  32807. createBaseVNode("ul", null, [
  32808. renderSlot(_ctx.$slots, "default")
  32809. ])
  32810. ], 2);
  32811. }
  32812. var MenuItemGroup = _export_sfc(_sfc_main90, [["render", _sfc_render23], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);
  32813. // node_modules/element-plus/es/components/menu/index.mjs
  32814. var ElMenu = withInstall(Menu2, {
  32815. MenuItem: MenuItem2,
  32816. MenuItemGroup,
  32817. SubMenu: SubMenu2
  32818. });
  32819. var ElMenuItem = withNoopInstall(MenuItem2);
  32820. var ElMenuItemGroup = withNoopInstall(MenuItemGroup);
  32821. var ElSubMenu = withNoopInstall(SubMenu2);
  32822. // node_modules/element-plus/es/components/page-header/src/page-header.mjs
  32823. var pageHeaderProps = buildProps({
  32824. icon: {
  32825. type: iconPropType,
  32826. default: () => back_default
  32827. },
  32828. title: String,
  32829. content: {
  32830. type: String,
  32831. default: ""
  32832. }
  32833. });
  32834. var pageHeaderEmits = {
  32835. back: () => true
  32836. };
  32837. // node_modules/element-plus/es/components/page-header/src/page-header2.mjs
  32838. var _hoisted_144 = ["aria-label"];
  32839. var __default__58 = defineComponent({
  32840. name: "ElPageHeader"
  32841. });
  32842. var _sfc_main91 = defineComponent({
  32843. ...__default__58,
  32844. props: pageHeaderProps,
  32845. emits: pageHeaderEmits,
  32846. setup(__props, { emit }) {
  32847. const slots = useSlots();
  32848. const { t } = useLocale();
  32849. const ns2 = useNamespace("page-header");
  32850. const kls = computed2(() => {
  32851. return [
  32852. ns2.b(),
  32853. {
  32854. [ns2.m("has-breadcrumb")]: !!slots.breadcrumb,
  32855. [ns2.m("has-extra")]: !!slots.extra,
  32856. [ns2.is("contentful")]: !!slots.default
  32857. }
  32858. ];
  32859. });
  32860. function handleClick() {
  32861. emit("back");
  32862. }
  32863. return (_ctx, _cache) => {
  32864. return openBlock(), createElementBlock("div", {
  32865. class: normalizeClass(unref(kls))
  32866. }, [
  32867. _ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
  32868. key: 0,
  32869. class: normalizeClass(unref(ns2).e("breadcrumb"))
  32870. }, [
  32871. renderSlot(_ctx.$slots, "breadcrumb")
  32872. ], 2)) : createCommentVNode("v-if", true),
  32873. createBaseVNode("div", {
  32874. class: normalizeClass(unref(ns2).e("header"))
  32875. }, [
  32876. createBaseVNode("div", {
  32877. class: normalizeClass(unref(ns2).e("left"))
  32878. }, [
  32879. createBaseVNode("div", {
  32880. class: normalizeClass(unref(ns2).e("back")),
  32881. role: "button",
  32882. tabindex: "0",
  32883. onClick: handleClick
  32884. }, [
  32885. _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
  32886. key: 0,
  32887. "aria-label": _ctx.title || unref(t)("el.pageHeader.title"),
  32888. class: normalizeClass(unref(ns2).e("icon"))
  32889. }, [
  32890. renderSlot(_ctx.$slots, "icon", {}, () => [
  32891. _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  32892. default: withCtx(() => [
  32893. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  32894. ]),
  32895. _: 1
  32896. })) : createCommentVNode("v-if", true)
  32897. ])
  32898. ], 10, _hoisted_144)) : createCommentVNode("v-if", true),
  32899. createBaseVNode("div", {
  32900. class: normalizeClass(unref(ns2).e("title"))
  32901. }, [
  32902. renderSlot(_ctx.$slots, "title", {}, () => [
  32903. createTextVNode(toDisplayString(_ctx.title || unref(t)("el.pageHeader.title")), 1)
  32904. ])
  32905. ], 2)
  32906. ], 2),
  32907. createVNode(unref(ElDivider), { direction: "vertical" }),
  32908. createBaseVNode("div", {
  32909. class: normalizeClass(unref(ns2).e("content"))
  32910. }, [
  32911. renderSlot(_ctx.$slots, "content", {}, () => [
  32912. createTextVNode(toDisplayString(_ctx.content), 1)
  32913. ])
  32914. ], 2)
  32915. ], 2),
  32916. _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  32917. key: 0,
  32918. class: normalizeClass(unref(ns2).e("extra"))
  32919. }, [
  32920. renderSlot(_ctx.$slots, "extra")
  32921. ], 2)) : createCommentVNode("v-if", true)
  32922. ], 2),
  32923. _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
  32924. key: 1,
  32925. class: normalizeClass(unref(ns2).e("main"))
  32926. }, [
  32927. renderSlot(_ctx.$slots, "default")
  32928. ], 2)) : createCommentVNode("v-if", true)
  32929. ], 2);
  32930. };
  32931. }
  32932. });
  32933. var PageHeader = _export_sfc(_sfc_main91, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/page-header/src/page-header.vue"]]);
  32934. // node_modules/element-plus/es/components/page-header/index.mjs
  32935. var ElPageHeader = withInstall(PageHeader);
  32936. // node_modules/element-plus/es/components/pagination/src/components/prev.mjs
  32937. var paginationPrevProps = buildProps({
  32938. disabled: Boolean,
  32939. currentPage: {
  32940. type: Number,
  32941. default: 1
  32942. },
  32943. prevText: {
  32944. type: String
  32945. },
  32946. prevIcon: {
  32947. type: iconPropType
  32948. }
  32949. });
  32950. var paginationPrevEmits = {
  32951. click: (evt) => evt instanceof MouseEvent
  32952. };
  32953. // node_modules/element-plus/es/components/pagination/src/components/prev2.mjs
  32954. var _hoisted_145 = ["disabled", "aria-disabled"];
  32955. var _hoisted_227 = { key: 0 };
  32956. var __default__59 = defineComponent({
  32957. name: "ElPaginationPrev"
  32958. });
  32959. var _sfc_main92 = defineComponent({
  32960. ...__default__59,
  32961. props: paginationPrevProps,
  32962. emits: paginationPrevEmits,
  32963. setup(__props) {
  32964. const props = __props;
  32965. const internalDisabled = computed2(() => props.disabled || props.currentPage <= 1);
  32966. return (_ctx, _cache) => {
  32967. return openBlock(), createElementBlock("button", {
  32968. type: "button",
  32969. class: "btn-prev",
  32970. disabled: unref(internalDisabled),
  32971. "aria-disabled": unref(internalDisabled),
  32972. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
  32973. }, [
  32974. _ctx.prevText ? (openBlock(), createElementBlock("span", _hoisted_227, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  32975. default: withCtx(() => [
  32976. (openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))
  32977. ]),
  32978. _: 1
  32979. }))
  32980. ], 8, _hoisted_145);
  32981. };
  32982. }
  32983. });
  32984. var Prev = _export_sfc(_sfc_main92, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/prev.vue"]]);
  32985. // node_modules/element-plus/es/components/pagination/src/components/next.mjs
  32986. var paginationNextProps = buildProps({
  32987. disabled: Boolean,
  32988. currentPage: {
  32989. type: Number,
  32990. default: 1
  32991. },
  32992. pageCount: {
  32993. type: Number,
  32994. default: 50
  32995. },
  32996. nextText: {
  32997. type: String
  32998. },
  32999. nextIcon: {
  33000. type: iconPropType
  33001. }
  33002. });
  33003. // node_modules/element-plus/es/components/pagination/src/components/next2.mjs
  33004. var _hoisted_146 = ["disabled", "aria-disabled"];
  33005. var _hoisted_228 = { key: 0 };
  33006. var __default__60 = defineComponent({
  33007. name: "ElPaginationNext"
  33008. });
  33009. var _sfc_main93 = defineComponent({
  33010. ...__default__60,
  33011. props: paginationNextProps,
  33012. emits: ["click"],
  33013. setup(__props) {
  33014. const props = __props;
  33015. const internalDisabled = computed2(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
  33016. return (_ctx, _cache) => {
  33017. return openBlock(), createElementBlock("button", {
  33018. type: "button",
  33019. class: "btn-next",
  33020. disabled: unref(internalDisabled),
  33021. "aria-disabled": unref(internalDisabled),
  33022. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
  33023. }, [
  33024. _ctx.nextText ? (openBlock(), createElementBlock("span", _hoisted_228, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  33025. default: withCtx(() => [
  33026. (openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))
  33027. ]),
  33028. _: 1
  33029. }))
  33030. ], 8, _hoisted_146);
  33031. };
  33032. }
  33033. });
  33034. var Next = _export_sfc(_sfc_main93, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/next.vue"]]);
  33035. // node_modules/element-plus/es/components/select/src/token.mjs
  33036. var selectGroupKey = "ElSelectGroup";
  33037. var selectKey = "ElSelect";
  33038. // node_modules/element-plus/es/components/select/src/useOption.mjs
  33039. function useOption(props, states) {
  33040. const select = inject(selectKey);
  33041. const selectGroup = inject(selectGroupKey, { disabled: false });
  33042. const isObject5 = computed2(() => {
  33043. return Object.prototype.toString.call(props.value).toLowerCase() === "[object object]";
  33044. });
  33045. const itemSelected = computed2(() => {
  33046. if (!select.props.multiple) {
  33047. return isEqual3(props.value, select.props.modelValue);
  33048. } else {
  33049. return contains2(select.props.modelValue, props.value);
  33050. }
  33051. });
  33052. const limitReached = computed2(() => {
  33053. if (select.props.multiple) {
  33054. const modelValue = select.props.modelValue || [];
  33055. return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
  33056. } else {
  33057. return false;
  33058. }
  33059. });
  33060. const currentLabel = computed2(() => {
  33061. return props.label || (isObject5.value ? "" : props.value);
  33062. });
  33063. const currentValue = computed2(() => {
  33064. return props.value || props.label || "";
  33065. });
  33066. const isDisabled = computed2(() => {
  33067. return props.disabled || states.groupDisabled || limitReached.value;
  33068. });
  33069. const instance = getCurrentInstance();
  33070. const contains2 = (arr = [], target2) => {
  33071. if (!isObject5.value) {
  33072. return arr && arr.includes(target2);
  33073. } else {
  33074. const valueKey = select.props.valueKey;
  33075. return arr && arr.some((item) => {
  33076. return toRaw(get_default(item, valueKey)) === get_default(target2, valueKey);
  33077. });
  33078. }
  33079. };
  33080. const isEqual3 = (a2, b2) => {
  33081. if (!isObject5.value) {
  33082. return a2 === b2;
  33083. } else {
  33084. const { valueKey } = select.props;
  33085. return get_default(a2, valueKey) === get_default(b2, valueKey);
  33086. }
  33087. };
  33088. const hoverItem = () => {
  33089. if (!props.disabled && !selectGroup.disabled) {
  33090. select.hoverIndex = select.optionsArray.indexOf(instance.proxy);
  33091. }
  33092. };
  33093. watch(() => currentLabel.value, () => {
  33094. if (!props.created && !select.props.remote)
  33095. select.setSelected();
  33096. });
  33097. watch(() => props.value, (val, oldVal) => {
  33098. const { remote, valueKey } = select.props;
  33099. if (!Object.is(val, oldVal)) {
  33100. select.onOptionDestroy(oldVal, instance.proxy);
  33101. select.onOptionCreate(instance.proxy);
  33102. }
  33103. if (!props.created && !remote) {
  33104. if (valueKey && typeof val === "object" && typeof oldVal === "object" && val[valueKey] === oldVal[valueKey]) {
  33105. return;
  33106. }
  33107. select.setSelected();
  33108. }
  33109. });
  33110. watch(() => selectGroup.disabled, () => {
  33111. states.groupDisabled = selectGroup.disabled;
  33112. }, { immediate: true });
  33113. const { queryChange } = toRaw(select);
  33114. watch(queryChange, (changes) => {
  33115. const { query } = unref(changes);
  33116. const regexp4 = new RegExp(escapeStringRegexp(query), "i");
  33117. states.visible = regexp4.test(currentLabel.value) || props.created;
  33118. if (!states.visible) {
  33119. select.filteredOptionsCount--;
  33120. }
  33121. });
  33122. return {
  33123. select,
  33124. currentLabel,
  33125. currentValue,
  33126. itemSelected,
  33127. isDisabled,
  33128. hoverItem
  33129. };
  33130. }
  33131. // node_modules/element-plus/es/components/select/src/option.mjs
  33132. var _sfc_main94 = defineComponent({
  33133. name: "ElOption",
  33134. componentName: "ElOption",
  33135. props: {
  33136. value: {
  33137. required: true,
  33138. type: [String, Number, Boolean, Object]
  33139. },
  33140. label: [String, Number],
  33141. created: Boolean,
  33142. disabled: {
  33143. type: Boolean,
  33144. default: false
  33145. }
  33146. },
  33147. setup(props) {
  33148. const ns2 = useNamespace("select");
  33149. const states = reactive({
  33150. index: -1,
  33151. groupDisabled: false,
  33152. visible: true,
  33153. hitState: false,
  33154. hover: false
  33155. });
  33156. const { currentLabel, itemSelected, isDisabled, select, hoverItem } = useOption(props, states);
  33157. const { visible, hover } = toRefs(states);
  33158. const vm = getCurrentInstance().proxy;
  33159. select.onOptionCreate(vm);
  33160. onBeforeUnmount(() => {
  33161. const key = vm.value;
  33162. const { selected } = select;
  33163. const selectedOptions = select.props.multiple ? selected : [selected];
  33164. const doesSelected = selectedOptions.some((item) => {
  33165. return item.value === vm.value;
  33166. });
  33167. nextTick(() => {
  33168. if (select.cachedOptions.get(key) === vm && !doesSelected) {
  33169. select.cachedOptions.delete(key);
  33170. }
  33171. });
  33172. select.onOptionDestroy(key, vm);
  33173. });
  33174. function selectOptionClick() {
  33175. if (props.disabled !== true && states.groupDisabled !== true) {
  33176. select.handleOptionSelect(vm, true);
  33177. }
  33178. }
  33179. return {
  33180. ns: ns2,
  33181. currentLabel,
  33182. itemSelected,
  33183. isDisabled,
  33184. select,
  33185. hoverItem,
  33186. visible,
  33187. hover,
  33188. selectOptionClick,
  33189. states
  33190. };
  33191. }
  33192. });
  33193. function _sfc_render24(_ctx, _cache, $props, $setup, $data, $options) {
  33194. return withDirectives((openBlock(), createElementBlock("li", {
  33195. class: normalizeClass([
  33196. _ctx.ns.be("dropdown", "item"),
  33197. _ctx.ns.is("disabled", _ctx.isDisabled),
  33198. {
  33199. selected: _ctx.itemSelected,
  33200. hover: _ctx.hover
  33201. }
  33202. ]),
  33203. onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
  33204. onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
  33205. }, [
  33206. renderSlot(_ctx.$slots, "default", {}, () => [
  33207. createBaseVNode("span", null, toDisplayString(_ctx.currentLabel), 1)
  33208. ])
  33209. ], 34)), [
  33210. [vShow, _ctx.visible]
  33211. ]);
  33212. }
  33213. var Option = _export_sfc(_sfc_main94, [["render", _sfc_render24], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);
  33214. // node_modules/element-plus/es/components/select/src/select-dropdown.mjs
  33215. var _sfc_main95 = defineComponent({
  33216. name: "ElSelectDropdown",
  33217. componentName: "ElSelectDropdown",
  33218. setup() {
  33219. const select = inject(selectKey);
  33220. const ns2 = useNamespace("select");
  33221. const popperClass = computed2(() => select.props.popperClass);
  33222. const isMultiple = computed2(() => select.props.multiple);
  33223. const isFitInputWidth = computed2(() => select.props.fitInputWidth);
  33224. const minWidth = ref("");
  33225. function updateMinWidth() {
  33226. var _a2;
  33227. minWidth.value = `${(_a2 = select.selectWrapper) == null ? void 0 : _a2.offsetWidth}px`;
  33228. }
  33229. onMounted(() => {
  33230. updateMinWidth();
  33231. useResizeObserver(select.selectWrapper, updateMinWidth);
  33232. });
  33233. return {
  33234. ns: ns2,
  33235. minWidth,
  33236. popperClass,
  33237. isMultiple,
  33238. isFitInputWidth
  33239. };
  33240. }
  33241. });
  33242. function _sfc_render25(_ctx, _cache, $props, $setup, $data, $options) {
  33243. return openBlock(), createElementBlock("div", {
  33244. class: normalizeClass([_ctx.ns.b("dropdown"), _ctx.ns.is("multiple", _ctx.isMultiple), _ctx.popperClass]),
  33245. style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
  33246. }, [
  33247. renderSlot(_ctx.$slots, "default")
  33248. ], 6);
  33249. }
  33250. var ElSelectMenu = _export_sfc(_sfc_main95, [["render", _sfc_render25], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);
  33251. // node_modules/element-plus/es/components/select/src/useSelect.mjs
  33252. function useSelectStates(props) {
  33253. const { t } = useLocale();
  33254. return reactive({
  33255. options: /* @__PURE__ */ new Map(),
  33256. cachedOptions: /* @__PURE__ */ new Map(),
  33257. createdLabel: null,
  33258. createdSelected: false,
  33259. selected: props.multiple ? [] : {},
  33260. inputLength: 20,
  33261. inputWidth: 0,
  33262. optionsCount: 0,
  33263. filteredOptionsCount: 0,
  33264. visible: false,
  33265. softFocus: false,
  33266. selectedLabel: "",
  33267. hoverIndex: -1,
  33268. query: "",
  33269. previousQuery: null,
  33270. inputHovering: false,
  33271. cachedPlaceHolder: "",
  33272. currentPlaceholder: t("el.select.placeholder"),
  33273. menuVisibleOnFocus: false,
  33274. isOnComposition: false,
  33275. isSilentBlur: false,
  33276. prefixWidth: 11,
  33277. tagInMultiLine: false,
  33278. mouseEnter: false
  33279. });
  33280. }
  33281. var useSelect = (props, states, ctx) => {
  33282. const { t } = useLocale();
  33283. const ns2 = useNamespace("select");
  33284. useDeprecated({
  33285. from: "suffixTransition",
  33286. replacement: "override style scheme",
  33287. version: "2.3.0",
  33288. scope: "props",
  33289. ref: "https://element-plus.org/en-US/component/select.html#select-attributes"
  33290. }, computed2(() => props.suffixTransition === false));
  33291. const reference = ref(null);
  33292. const input = ref(null);
  33293. const tooltipRef = ref(null);
  33294. const tags = ref(null);
  33295. const selectWrapper = ref(null);
  33296. const scrollbar = ref(null);
  33297. const hoverOption = ref(-1);
  33298. const queryChange = shallowRef({ query: "" });
  33299. const groupQueryChange = shallowRef("");
  33300. const { form, formItem } = useFormItem();
  33301. const readonly2 = computed2(() => !props.filterable || props.multiple || !states.visible);
  33302. const selectDisabled = computed2(() => props.disabled || (form == null ? void 0 : form.disabled));
  33303. const showClose = computed2(() => {
  33304. const hasValue = props.multiple ? Array.isArray(props.modelValue) && props.modelValue.length > 0 : props.modelValue !== void 0 && props.modelValue !== null && props.modelValue !== "";
  33305. const criteria = props.clearable && !selectDisabled.value && states.inputHovering && hasValue;
  33306. return criteria;
  33307. });
  33308. const iconComponent = computed2(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
  33309. const iconReverse = computed2(() => ns2.is("reverse", iconComponent.value && states.visible && props.suffixTransition));
  33310. const debounce$1 = computed2(() => props.remote ? 300 : 0);
  33311. const emptyText = computed2(() => {
  33312. if (props.loading) {
  33313. return props.loadingText || t("el.select.loading");
  33314. } else {
  33315. if (props.remote && states.query === "" && states.options.size === 0)
  33316. return false;
  33317. if (props.filterable && states.query && states.options.size > 0 && states.filteredOptionsCount === 0) {
  33318. return props.noMatchText || t("el.select.noMatch");
  33319. }
  33320. if (states.options.size === 0) {
  33321. return props.noDataText || t("el.select.noData");
  33322. }
  33323. }
  33324. return null;
  33325. });
  33326. const optionsArray = computed2(() => Array.from(states.options.values()));
  33327. const cachedOptionsArray = computed2(() => Array.from(states.cachedOptions.values()));
  33328. const showNewOption = computed2(() => {
  33329. const hasExistingOption = optionsArray.value.filter((option) => {
  33330. return !option.created;
  33331. }).some((option) => {
  33332. return option.currentLabel === states.query;
  33333. });
  33334. return props.filterable && props.allowCreate && states.query !== "" && !hasExistingOption;
  33335. });
  33336. const selectSize = useSize();
  33337. const collapseTagSize = computed2(() => ["small"].includes(selectSize.value) ? "small" : "default");
  33338. const dropMenuVisible = computed2({
  33339. get() {
  33340. return states.visible && emptyText.value !== false;
  33341. },
  33342. set(val) {
  33343. states.visible = val;
  33344. }
  33345. });
  33346. watch([() => selectDisabled.value, () => selectSize.value, () => form == null ? void 0 : form.size], () => {
  33347. nextTick(() => {
  33348. resetInputHeight();
  33349. });
  33350. });
  33351. watch(() => props.placeholder, (val) => {
  33352. states.cachedPlaceHolder = states.currentPlaceholder = val;
  33353. });
  33354. watch(() => props.modelValue, (val, oldVal) => {
  33355. if (props.multiple) {
  33356. resetInputHeight();
  33357. if (val && val.length > 0 || input.value && states.query !== "") {
  33358. states.currentPlaceholder = "";
  33359. } else {
  33360. states.currentPlaceholder = states.cachedPlaceHolder;
  33361. }
  33362. if (props.filterable && !props.reserveKeyword) {
  33363. states.query = "";
  33364. handleQueryChange(states.query);
  33365. }
  33366. }
  33367. setSelected();
  33368. if (props.filterable && !props.multiple) {
  33369. states.inputLength = 20;
  33370. }
  33371. if (!isEqual_default(val, oldVal) && props.validateEvent) {
  33372. formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
  33373. }
  33374. }, {
  33375. flush: "post",
  33376. deep: true
  33377. });
  33378. watch(() => states.visible, (val) => {
  33379. var _a2, _b, _c;
  33380. if (!val) {
  33381. if (props.filterable) {
  33382. if (isFunction(props.filterMethod)) {
  33383. props.filterMethod("");
  33384. }
  33385. if (isFunction(props.remoteMethod)) {
  33386. props.remoteMethod("");
  33387. }
  33388. }
  33389. input.value && input.value.blur();
  33390. states.query = "";
  33391. states.previousQuery = null;
  33392. states.selectedLabel = "";
  33393. states.inputLength = 20;
  33394. states.menuVisibleOnFocus = false;
  33395. resetHoverIndex();
  33396. nextTick(() => {
  33397. if (input.value && input.value.value === "" && states.selected.length === 0) {
  33398. states.currentPlaceholder = states.cachedPlaceHolder;
  33399. }
  33400. });
  33401. if (!props.multiple) {
  33402. if (states.selected) {
  33403. if (props.filterable && props.allowCreate && states.createdSelected && states.createdLabel) {
  33404. states.selectedLabel = states.createdLabel;
  33405. } else {
  33406. states.selectedLabel = states.selected.currentLabel;
  33407. }
  33408. if (props.filterable)
  33409. states.query = states.selectedLabel;
  33410. }
  33411. if (props.filterable) {
  33412. states.currentPlaceholder = states.cachedPlaceHolder;
  33413. }
  33414. }
  33415. } else {
  33416. (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  33417. if (props.filterable) {
  33418. states.filteredOptionsCount = states.optionsCount;
  33419. states.query = props.remote ? "" : states.selectedLabel;
  33420. if (props.multiple) {
  33421. (_c = input.value) == null ? void 0 : _c.focus();
  33422. } else {
  33423. if (states.selectedLabel) {
  33424. states.currentPlaceholder = `${states.selectedLabel}`;
  33425. states.selectedLabel = "";
  33426. }
  33427. }
  33428. handleQueryChange(states.query);
  33429. if (!props.multiple && !props.remote) {
  33430. queryChange.value.query = "";
  33431. triggerRef(queryChange);
  33432. triggerRef(groupQueryChange);
  33433. }
  33434. }
  33435. }
  33436. ctx.emit("visible-change", val);
  33437. });
  33438. watch(() => states.options.entries(), () => {
  33439. var _a2, _b, _c;
  33440. if (!isClient)
  33441. return;
  33442. (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  33443. if (props.multiple) {
  33444. resetInputHeight();
  33445. }
  33446. const inputs = ((_c = selectWrapper.value) == null ? void 0 : _c.querySelectorAll("input")) || [];
  33447. if (!Array.from(inputs).includes(document.activeElement)) {
  33448. setSelected();
  33449. }
  33450. if (props.defaultFirstOption && (props.filterable || props.remote) && states.filteredOptionsCount) {
  33451. checkDefaultFirstOption();
  33452. }
  33453. }, {
  33454. flush: "post"
  33455. });
  33456. watch(() => states.hoverIndex, (val) => {
  33457. if (isNumber2(val) && val > -1) {
  33458. hoverOption.value = optionsArray.value[val] || {};
  33459. } else {
  33460. hoverOption.value = {};
  33461. }
  33462. optionsArray.value.forEach((option) => {
  33463. option.hover = hoverOption.value === option;
  33464. });
  33465. });
  33466. const resetInputHeight = () => {
  33467. if (props.collapseTags && !props.filterable)
  33468. return;
  33469. nextTick(() => {
  33470. var _a2, _b;
  33471. if (!reference.value)
  33472. return;
  33473. const input2 = reference.value.$el.querySelector("input");
  33474. const _tags = tags.value;
  33475. const sizeInMap = getComponentSize(selectSize.value || (form == null ? void 0 : form.size));
  33476. input2.style.height = `${(states.selected.length === 0 ? sizeInMap : Math.max(_tags ? _tags.clientHeight + (_tags.clientHeight > sizeInMap ? 6 : 0) : 0, sizeInMap)) - 2}px`;
  33477. states.tagInMultiLine = Number.parseFloat(input2.style.height) >= sizeInMap;
  33478. if (states.visible && emptyText.value !== false) {
  33479. (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  33480. }
  33481. });
  33482. };
  33483. const handleQueryChange = async (val) => {
  33484. if (states.previousQuery === val || states.isOnComposition)
  33485. return;
  33486. if (states.previousQuery === null && (isFunction(props.filterMethod) || isFunction(props.remoteMethod))) {
  33487. states.previousQuery = val;
  33488. return;
  33489. }
  33490. states.previousQuery = val;
  33491. nextTick(() => {
  33492. var _a2, _b;
  33493. if (states.visible)
  33494. (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  33495. });
  33496. states.hoverIndex = -1;
  33497. if (props.multiple && props.filterable) {
  33498. nextTick(() => {
  33499. const length = input.value.value.length * 15 + 20;
  33500. states.inputLength = props.collapseTags ? Math.min(50, length) : length;
  33501. managePlaceholder();
  33502. resetInputHeight();
  33503. });
  33504. }
  33505. if (props.remote && isFunction(props.remoteMethod)) {
  33506. states.hoverIndex = -1;
  33507. props.remoteMethod(val);
  33508. } else if (isFunction(props.filterMethod)) {
  33509. props.filterMethod(val);
  33510. triggerRef(groupQueryChange);
  33511. } else {
  33512. states.filteredOptionsCount = states.optionsCount;
  33513. queryChange.value.query = val;
  33514. triggerRef(queryChange);
  33515. triggerRef(groupQueryChange);
  33516. }
  33517. if (props.defaultFirstOption && (props.filterable || props.remote) && states.filteredOptionsCount) {
  33518. await nextTick();
  33519. checkDefaultFirstOption();
  33520. }
  33521. };
  33522. const managePlaceholder = () => {
  33523. if (states.currentPlaceholder !== "") {
  33524. states.currentPlaceholder = input.value.value ? "" : states.cachedPlaceHolder;
  33525. }
  33526. };
  33527. const checkDefaultFirstOption = () => {
  33528. const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.states.groupDisabled);
  33529. const userCreatedOption = optionsInDropdown.find((n) => n.created);
  33530. const firstOriginOption = optionsInDropdown[0];
  33531. states.hoverIndex = getValueIndex(optionsArray.value, userCreatedOption || firstOriginOption);
  33532. };
  33533. const setSelected = () => {
  33534. var _a2;
  33535. if (!props.multiple) {
  33536. const option = getOption(props.modelValue);
  33537. if ((_a2 = option.props) == null ? void 0 : _a2.created) {
  33538. states.createdLabel = option.props.value;
  33539. states.createdSelected = true;
  33540. } else {
  33541. states.createdSelected = false;
  33542. }
  33543. states.selectedLabel = option.currentLabel;
  33544. states.selected = option;
  33545. if (props.filterable)
  33546. states.query = states.selectedLabel;
  33547. return;
  33548. } else {
  33549. states.selectedLabel = "";
  33550. }
  33551. const result2 = [];
  33552. if (Array.isArray(props.modelValue)) {
  33553. props.modelValue.forEach((value) => {
  33554. result2.push(getOption(value));
  33555. });
  33556. }
  33557. states.selected = result2;
  33558. nextTick(() => {
  33559. resetInputHeight();
  33560. });
  33561. };
  33562. const getOption = (value) => {
  33563. let option;
  33564. const isObjectValue = toRawType(value).toLowerCase() === "object";
  33565. const isNull2 = toRawType(value).toLowerCase() === "null";
  33566. const isUndefined3 = toRawType(value).toLowerCase() === "undefined";
  33567. for (let i = states.cachedOptions.size - 1; i >= 0; i--) {
  33568. const cachedOption = cachedOptionsArray.value[i];
  33569. const isEqualValue = isObjectValue ? get_default(cachedOption.value, props.valueKey) === get_default(value, props.valueKey) : cachedOption.value === value;
  33570. if (isEqualValue) {
  33571. option = {
  33572. value,
  33573. currentLabel: cachedOption.currentLabel,
  33574. isDisabled: cachedOption.isDisabled
  33575. };
  33576. break;
  33577. }
  33578. }
  33579. if (option)
  33580. return option;
  33581. const label = isObjectValue ? value.label : !isNull2 && !isUndefined3 ? value : "";
  33582. const newOption = {
  33583. value,
  33584. currentLabel: label
  33585. };
  33586. if (props.multiple) {
  33587. ;
  33588. newOption.hitState = false;
  33589. }
  33590. return newOption;
  33591. };
  33592. const resetHoverIndex = () => {
  33593. setTimeout(() => {
  33594. const valueKey = props.valueKey;
  33595. if (!props.multiple) {
  33596. states.hoverIndex = optionsArray.value.findIndex((item) => {
  33597. return getValueKey(item) === getValueKey(states.selected);
  33598. });
  33599. } else {
  33600. if (states.selected.length > 0) {
  33601. states.hoverIndex = Math.min.apply(null, states.selected.map((selected) => {
  33602. return optionsArray.value.findIndex((item) => {
  33603. return get_default(item, valueKey) === get_default(selected, valueKey);
  33604. });
  33605. }));
  33606. } else {
  33607. states.hoverIndex = -1;
  33608. }
  33609. }
  33610. }, 300);
  33611. };
  33612. const handleResize = () => {
  33613. var _a2, _b;
  33614. resetInputWidth();
  33615. (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  33616. if (props.multiple && !props.filterable)
  33617. resetInputHeight();
  33618. };
  33619. const resetInputWidth = () => {
  33620. var _a2;
  33621. states.inputWidth = (_a2 = reference.value) == null ? void 0 : _a2.$el.getBoundingClientRect().width;
  33622. };
  33623. const onInputChange = () => {
  33624. if (props.filterable && states.query !== states.selectedLabel) {
  33625. states.query = states.selectedLabel;
  33626. handleQueryChange(states.query);
  33627. }
  33628. };
  33629. const debouncedOnInputChange = debounce_default(() => {
  33630. onInputChange();
  33631. }, debounce$1.value);
  33632. const debouncedQueryChange = debounce_default((e) => {
  33633. handleQueryChange(e.target.value);
  33634. }, debounce$1.value);
  33635. const emitChange = (val) => {
  33636. if (!isEqual_default(props.modelValue, val)) {
  33637. ctx.emit(CHANGE_EVENT, val);
  33638. }
  33639. };
  33640. const deletePrevTag = (e) => {
  33641. if (e.target.value.length <= 0 && !toggleLastOptionHitState()) {
  33642. const value = props.modelValue.slice();
  33643. value.pop();
  33644. ctx.emit(UPDATE_MODEL_EVENT, value);
  33645. emitChange(value);
  33646. }
  33647. if (e.target.value.length === 1 && props.modelValue.length === 0) {
  33648. states.currentPlaceholder = states.cachedPlaceHolder;
  33649. }
  33650. };
  33651. const deleteTag = (event, tag) => {
  33652. const index = states.selected.indexOf(tag);
  33653. if (index > -1 && !selectDisabled.value) {
  33654. const value = props.modelValue.slice();
  33655. value.splice(index, 1);
  33656. ctx.emit(UPDATE_MODEL_EVENT, value);
  33657. emitChange(value);
  33658. ctx.emit("remove-tag", tag.value);
  33659. }
  33660. event.stopPropagation();
  33661. };
  33662. const deleteSelected = (event) => {
  33663. event.stopPropagation();
  33664. const value = props.multiple ? [] : "";
  33665. if (!isString(value)) {
  33666. for (const item of states.selected) {
  33667. if (item.isDisabled)
  33668. value.push(item.value);
  33669. }
  33670. }
  33671. ctx.emit(UPDATE_MODEL_EVENT, value);
  33672. emitChange(value);
  33673. states.hoverIndex = -1;
  33674. states.visible = false;
  33675. ctx.emit("clear");
  33676. };
  33677. const handleOptionSelect = (option, byClick) => {
  33678. var _a2;
  33679. if (props.multiple) {
  33680. const value = (props.modelValue || []).slice();
  33681. const optionIndex = getValueIndex(value, option.value);
  33682. if (optionIndex > -1) {
  33683. value.splice(optionIndex, 1);
  33684. } else if (props.multipleLimit <= 0 || value.length < props.multipleLimit) {
  33685. value.push(option.value);
  33686. }
  33687. ctx.emit(UPDATE_MODEL_EVENT, value);
  33688. emitChange(value);
  33689. if (option.created) {
  33690. states.query = "";
  33691. handleQueryChange("");
  33692. states.inputLength = 20;
  33693. }
  33694. if (props.filterable)
  33695. (_a2 = input.value) == null ? void 0 : _a2.focus();
  33696. } else {
  33697. ctx.emit(UPDATE_MODEL_EVENT, option.value);
  33698. emitChange(option.value);
  33699. states.visible = false;
  33700. }
  33701. states.isSilentBlur = byClick;
  33702. setSoftFocus();
  33703. if (states.visible)
  33704. return;
  33705. nextTick(() => {
  33706. scrollToOption(option);
  33707. });
  33708. };
  33709. const getValueIndex = (arr = [], value) => {
  33710. if (!isObject(value))
  33711. return arr.indexOf(value);
  33712. const valueKey = props.valueKey;
  33713. let index = -1;
  33714. arr.some((item, i) => {
  33715. if (toRaw(get_default(item, valueKey)) === get_default(value, valueKey)) {
  33716. index = i;
  33717. return true;
  33718. }
  33719. return false;
  33720. });
  33721. return index;
  33722. };
  33723. const setSoftFocus = () => {
  33724. states.softFocus = true;
  33725. const _input = input.value || reference.value;
  33726. if (_input) {
  33727. _input == null ? void 0 : _input.focus();
  33728. }
  33729. };
  33730. const scrollToOption = (option) => {
  33731. var _a2, _b, _c, _d, _e;
  33732. const targetOption = Array.isArray(option) ? option[0] : option;
  33733. let target2 = null;
  33734. if (targetOption == null ? void 0 : targetOption.value) {
  33735. const options = optionsArray.value.filter((item) => item.value === targetOption.value);
  33736. if (options.length > 0) {
  33737. target2 = options[0].$el;
  33738. }
  33739. }
  33740. if (tooltipRef.value && target2) {
  33741. const menu = (_d = (_c = (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef) == null ? void 0 : _c.querySelector) == null ? void 0 : _d.call(_c, `.${ns2.be("dropdown", "wrap")}`);
  33742. if (menu) {
  33743. scrollIntoView(menu, target2);
  33744. }
  33745. }
  33746. (_e = scrollbar.value) == null ? void 0 : _e.handleScroll();
  33747. };
  33748. const onOptionCreate = (vm) => {
  33749. states.optionsCount++;
  33750. states.filteredOptionsCount++;
  33751. states.options.set(vm.value, vm);
  33752. states.cachedOptions.set(vm.value, vm);
  33753. };
  33754. const onOptionDestroy = (key, vm) => {
  33755. if (states.options.get(key) === vm) {
  33756. states.optionsCount--;
  33757. states.filteredOptionsCount--;
  33758. states.options.delete(key);
  33759. }
  33760. };
  33761. const resetInputState = (e) => {
  33762. if (e.code !== EVENT_CODE.backspace)
  33763. toggleLastOptionHitState(false);
  33764. states.inputLength = input.value.value.length * 15 + 20;
  33765. resetInputHeight();
  33766. };
  33767. const toggleLastOptionHitState = (hit) => {
  33768. if (!Array.isArray(states.selected))
  33769. return;
  33770. const option = states.selected[states.selected.length - 1];
  33771. if (!option)
  33772. return;
  33773. if (hit === true || hit === false) {
  33774. option.hitState = hit;
  33775. return hit;
  33776. }
  33777. option.hitState = !option.hitState;
  33778. return option.hitState;
  33779. };
  33780. const handleComposition = (event) => {
  33781. const text = event.target.value;
  33782. if (event.type === "compositionend") {
  33783. states.isOnComposition = false;
  33784. nextTick(() => handleQueryChange(text));
  33785. } else {
  33786. const lastCharacter = text[text.length - 1] || "";
  33787. states.isOnComposition = !isKorean(lastCharacter);
  33788. }
  33789. };
  33790. const handleMenuEnter = () => {
  33791. nextTick(() => scrollToOption(states.selected));
  33792. };
  33793. const handleFocus = (event) => {
  33794. if (!states.softFocus) {
  33795. if (props.automaticDropdown || props.filterable) {
  33796. if (props.filterable && !states.visible) {
  33797. states.menuVisibleOnFocus = true;
  33798. }
  33799. states.visible = true;
  33800. }
  33801. ctx.emit("focus", event);
  33802. } else {
  33803. states.softFocus = false;
  33804. }
  33805. };
  33806. const blur = () => {
  33807. var _a2;
  33808. states.visible = false;
  33809. (_a2 = reference.value) == null ? void 0 : _a2.blur();
  33810. };
  33811. const handleBlur = (event) => {
  33812. nextTick(() => {
  33813. if (states.isSilentBlur) {
  33814. states.isSilentBlur = false;
  33815. } else {
  33816. ctx.emit("blur", event);
  33817. }
  33818. });
  33819. states.softFocus = false;
  33820. };
  33821. const handleClearClick = (event) => {
  33822. deleteSelected(event);
  33823. };
  33824. const handleClose = () => {
  33825. states.visible = false;
  33826. };
  33827. const handleKeydownEscape = (event) => {
  33828. if (states.visible) {
  33829. event.preventDefault();
  33830. event.stopPropagation();
  33831. states.visible = false;
  33832. }
  33833. };
  33834. const toggleMenu = (e) => {
  33835. var _a2;
  33836. if (e && !states.mouseEnter) {
  33837. return;
  33838. }
  33839. if (!selectDisabled.value) {
  33840. if (states.menuVisibleOnFocus) {
  33841. states.menuVisibleOnFocus = false;
  33842. } else {
  33843. if (!tooltipRef.value || !tooltipRef.value.isFocusInsideContent()) {
  33844. states.visible = !states.visible;
  33845. }
  33846. }
  33847. if (states.visible) {
  33848. ;
  33849. (_a2 = input.value || reference.value) == null ? void 0 : _a2.focus();
  33850. }
  33851. }
  33852. };
  33853. const selectOption = () => {
  33854. if (!states.visible) {
  33855. toggleMenu();
  33856. } else {
  33857. if (optionsArray.value[states.hoverIndex]) {
  33858. handleOptionSelect(optionsArray.value[states.hoverIndex], void 0);
  33859. }
  33860. }
  33861. };
  33862. const getValueKey = (item) => {
  33863. return isObject(item.value) ? get_default(item.value, props.valueKey) : item.value;
  33864. };
  33865. const optionsAllDisabled = computed2(() => optionsArray.value.filter((option) => option.visible).every((option) => option.disabled));
  33866. const navigateOptions = (direction2) => {
  33867. if (!states.visible) {
  33868. states.visible = true;
  33869. return;
  33870. }
  33871. if (states.options.size === 0 || states.filteredOptionsCount === 0)
  33872. return;
  33873. if (states.isOnComposition)
  33874. return;
  33875. if (!optionsAllDisabled.value) {
  33876. if (direction2 === "next") {
  33877. states.hoverIndex++;
  33878. if (states.hoverIndex === states.options.size) {
  33879. states.hoverIndex = 0;
  33880. }
  33881. } else if (direction2 === "prev") {
  33882. states.hoverIndex--;
  33883. if (states.hoverIndex < 0) {
  33884. states.hoverIndex = states.options.size - 1;
  33885. }
  33886. }
  33887. const option = optionsArray.value[states.hoverIndex];
  33888. if (option.disabled === true || option.states.groupDisabled === true || !option.visible) {
  33889. navigateOptions(direction2);
  33890. }
  33891. nextTick(() => scrollToOption(hoverOption.value));
  33892. }
  33893. };
  33894. const handleMouseEnter = () => {
  33895. states.mouseEnter = true;
  33896. };
  33897. const handleMouseLeave = () => {
  33898. states.mouseEnter = false;
  33899. };
  33900. return {
  33901. optionsArray,
  33902. selectSize,
  33903. handleResize,
  33904. debouncedOnInputChange,
  33905. debouncedQueryChange,
  33906. deletePrevTag,
  33907. deleteTag,
  33908. deleteSelected,
  33909. handleOptionSelect,
  33910. scrollToOption,
  33911. readonly: readonly2,
  33912. resetInputHeight,
  33913. showClose,
  33914. iconComponent,
  33915. iconReverse,
  33916. showNewOption,
  33917. collapseTagSize,
  33918. setSelected,
  33919. managePlaceholder,
  33920. selectDisabled,
  33921. emptyText,
  33922. toggleLastOptionHitState,
  33923. resetInputState,
  33924. handleComposition,
  33925. onOptionCreate,
  33926. onOptionDestroy,
  33927. handleMenuEnter,
  33928. handleFocus,
  33929. blur,
  33930. handleBlur,
  33931. handleClearClick,
  33932. handleClose,
  33933. handleKeydownEscape,
  33934. toggleMenu,
  33935. selectOption,
  33936. getValueKey,
  33937. navigateOptions,
  33938. dropMenuVisible,
  33939. queryChange,
  33940. groupQueryChange,
  33941. reference,
  33942. input,
  33943. tooltipRef,
  33944. tags,
  33945. selectWrapper,
  33946. scrollbar,
  33947. handleMouseEnter,
  33948. handleMouseLeave
  33949. };
  33950. };
  33951. // node_modules/element-plus/es/components/select/src/select.mjs
  33952. var COMPONENT_NAME15 = "ElSelect";
  33953. var _sfc_main96 = defineComponent({
  33954. name: COMPONENT_NAME15,
  33955. componentName: COMPONENT_NAME15,
  33956. components: {
  33957. ElInput,
  33958. ElSelectMenu,
  33959. ElOption: Option,
  33960. ElTag,
  33961. ElScrollbar,
  33962. ElTooltip,
  33963. ElIcon
  33964. },
  33965. directives: { ClickOutside },
  33966. props: {
  33967. name: String,
  33968. id: String,
  33969. modelValue: {
  33970. type: [Array, String, Number, Boolean, Object],
  33971. default: void 0
  33972. },
  33973. autocomplete: {
  33974. type: String,
  33975. default: "off"
  33976. },
  33977. automaticDropdown: Boolean,
  33978. size: {
  33979. type: String,
  33980. validator: isValidComponentSize
  33981. },
  33982. effect: {
  33983. type: String,
  33984. default: "light"
  33985. },
  33986. disabled: Boolean,
  33987. clearable: Boolean,
  33988. filterable: Boolean,
  33989. allowCreate: Boolean,
  33990. loading: Boolean,
  33991. popperClass: {
  33992. type: String,
  33993. default: ""
  33994. },
  33995. remote: Boolean,
  33996. loadingText: String,
  33997. noMatchText: String,
  33998. noDataText: String,
  33999. remoteMethod: Function,
  34000. filterMethod: Function,
  34001. multiple: Boolean,
  34002. multipleLimit: {
  34003. type: Number,
  34004. default: 0
  34005. },
  34006. placeholder: {
  34007. type: String
  34008. },
  34009. defaultFirstOption: Boolean,
  34010. reserveKeyword: {
  34011. type: Boolean,
  34012. default: true
  34013. },
  34014. valueKey: {
  34015. type: String,
  34016. default: "value"
  34017. },
  34018. collapseTags: Boolean,
  34019. collapseTagsTooltip: {
  34020. type: Boolean,
  34021. default: false
  34022. },
  34023. teleported: useTooltipContentProps.teleported,
  34024. persistent: {
  34025. type: Boolean,
  34026. default: true
  34027. },
  34028. clearIcon: {
  34029. type: iconPropType,
  34030. default: circle_close_default
  34031. },
  34032. fitInputWidth: {
  34033. type: Boolean,
  34034. default: false
  34035. },
  34036. suffixIcon: {
  34037. type: iconPropType,
  34038. default: arrow_down_default
  34039. },
  34040. tagType: { ...tagProps.type, default: "info" },
  34041. validateEvent: {
  34042. type: Boolean,
  34043. default: true
  34044. },
  34045. remoteShowSuffix: {
  34046. type: Boolean,
  34047. default: false
  34048. },
  34049. suffixTransition: {
  34050. type: Boolean,
  34051. default: true
  34052. },
  34053. placement: {
  34054. type: String,
  34055. values: Ee,
  34056. default: "bottom-start"
  34057. }
  34058. },
  34059. emits: [
  34060. UPDATE_MODEL_EVENT,
  34061. CHANGE_EVENT,
  34062. "remove-tag",
  34063. "clear",
  34064. "visible-change",
  34065. "focus",
  34066. "blur"
  34067. ],
  34068. setup(props, ctx) {
  34069. const nsSelect = useNamespace("select");
  34070. const nsInput = useNamespace("input");
  34071. const { t } = useLocale();
  34072. const states = useSelectStates(props);
  34073. const {
  34074. optionsArray,
  34075. selectSize,
  34076. readonly: readonly2,
  34077. handleResize,
  34078. collapseTagSize,
  34079. debouncedOnInputChange,
  34080. debouncedQueryChange,
  34081. deletePrevTag,
  34082. deleteTag,
  34083. deleteSelected,
  34084. handleOptionSelect,
  34085. scrollToOption,
  34086. setSelected,
  34087. resetInputHeight,
  34088. managePlaceholder,
  34089. showClose,
  34090. selectDisabled,
  34091. iconComponent,
  34092. iconReverse,
  34093. showNewOption,
  34094. emptyText,
  34095. toggleLastOptionHitState,
  34096. resetInputState,
  34097. handleComposition,
  34098. onOptionCreate,
  34099. onOptionDestroy,
  34100. handleMenuEnter,
  34101. handleFocus,
  34102. blur,
  34103. handleBlur,
  34104. handleClearClick,
  34105. handleClose,
  34106. handleKeydownEscape,
  34107. toggleMenu,
  34108. selectOption,
  34109. getValueKey,
  34110. navigateOptions,
  34111. dropMenuVisible,
  34112. reference,
  34113. input,
  34114. tooltipRef,
  34115. tags,
  34116. selectWrapper,
  34117. scrollbar,
  34118. queryChange,
  34119. groupQueryChange,
  34120. handleMouseEnter,
  34121. handleMouseLeave
  34122. } = useSelect(props, states, ctx);
  34123. const { focus } = useFocus(reference);
  34124. const {
  34125. inputWidth,
  34126. selected,
  34127. inputLength,
  34128. filteredOptionsCount,
  34129. visible,
  34130. softFocus,
  34131. selectedLabel,
  34132. hoverIndex,
  34133. query,
  34134. inputHovering,
  34135. currentPlaceholder,
  34136. menuVisibleOnFocus,
  34137. isOnComposition,
  34138. isSilentBlur,
  34139. options,
  34140. cachedOptions,
  34141. optionsCount,
  34142. prefixWidth,
  34143. tagInMultiLine
  34144. } = toRefs(states);
  34145. const wrapperKls = computed2(() => {
  34146. const classList = [nsSelect.b()];
  34147. const _selectSize = unref(selectSize);
  34148. if (_selectSize) {
  34149. classList.push(nsSelect.m(_selectSize));
  34150. }
  34151. if (props.disabled) {
  34152. classList.push(nsSelect.m("disabled"));
  34153. }
  34154. return classList;
  34155. });
  34156. const selectTagsStyle = computed2(() => ({
  34157. maxWidth: `${unref(inputWidth) - 32}px`,
  34158. width: "100%"
  34159. }));
  34160. const tagTextStyle = computed2(() => {
  34161. const maxWidth = unref(inputWidth) > 123 ? unref(inputWidth) - 123 : unref(inputWidth) - 75;
  34162. return { maxWidth: `${maxWidth}px` };
  34163. });
  34164. provide(selectKey, reactive({
  34165. props,
  34166. options,
  34167. optionsArray,
  34168. cachedOptions,
  34169. optionsCount,
  34170. filteredOptionsCount,
  34171. hoverIndex,
  34172. handleOptionSelect,
  34173. onOptionCreate,
  34174. onOptionDestroy,
  34175. selectWrapper,
  34176. selected,
  34177. setSelected,
  34178. queryChange,
  34179. groupQueryChange
  34180. }));
  34181. onMounted(() => {
  34182. states.cachedPlaceHolder = currentPlaceholder.value = props.placeholder || t("el.select.placeholder");
  34183. if (props.multiple && Array.isArray(props.modelValue) && props.modelValue.length > 0) {
  34184. currentPlaceholder.value = "";
  34185. }
  34186. useResizeObserver(selectWrapper, handleResize);
  34187. if (props.remote && props.multiple) {
  34188. resetInputHeight();
  34189. }
  34190. nextTick(() => {
  34191. const refEl = reference.value && reference.value.$el;
  34192. if (!refEl)
  34193. return;
  34194. inputWidth.value = refEl.getBoundingClientRect().width;
  34195. if (ctx.slots.prefix) {
  34196. const prefix = refEl.querySelector(`.${nsInput.e("prefix")}`);
  34197. prefixWidth.value = Math.max(prefix.getBoundingClientRect().width + 5, 30);
  34198. }
  34199. });
  34200. setSelected();
  34201. });
  34202. if (props.multiple && !Array.isArray(props.modelValue)) {
  34203. ctx.emit(UPDATE_MODEL_EVENT, []);
  34204. }
  34205. if (!props.multiple && Array.isArray(props.modelValue)) {
  34206. ctx.emit(UPDATE_MODEL_EVENT, "");
  34207. }
  34208. const popperPaneRef = computed2(() => {
  34209. var _a2, _b;
  34210. return (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef;
  34211. });
  34212. return {
  34213. tagInMultiLine,
  34214. prefixWidth,
  34215. selectSize,
  34216. readonly: readonly2,
  34217. handleResize,
  34218. collapseTagSize,
  34219. debouncedOnInputChange,
  34220. debouncedQueryChange,
  34221. deletePrevTag,
  34222. deleteTag,
  34223. deleteSelected,
  34224. handleOptionSelect,
  34225. scrollToOption,
  34226. inputWidth,
  34227. selected,
  34228. inputLength,
  34229. filteredOptionsCount,
  34230. visible,
  34231. softFocus,
  34232. selectedLabel,
  34233. hoverIndex,
  34234. query,
  34235. inputHovering,
  34236. currentPlaceholder,
  34237. menuVisibleOnFocus,
  34238. isOnComposition,
  34239. isSilentBlur,
  34240. options,
  34241. resetInputHeight,
  34242. managePlaceholder,
  34243. showClose,
  34244. selectDisabled,
  34245. iconComponent,
  34246. iconReverse,
  34247. showNewOption,
  34248. emptyText,
  34249. toggleLastOptionHitState,
  34250. resetInputState,
  34251. handleComposition,
  34252. handleMenuEnter,
  34253. handleFocus,
  34254. blur,
  34255. handleBlur,
  34256. handleClearClick,
  34257. handleClose,
  34258. handleKeydownEscape,
  34259. toggleMenu,
  34260. selectOption,
  34261. getValueKey,
  34262. navigateOptions,
  34263. dropMenuVisible,
  34264. focus,
  34265. reference,
  34266. input,
  34267. tooltipRef,
  34268. popperPaneRef,
  34269. tags,
  34270. selectWrapper,
  34271. scrollbar,
  34272. wrapperKls,
  34273. selectTagsStyle,
  34274. nsSelect,
  34275. tagTextStyle,
  34276. handleMouseEnter,
  34277. handleMouseLeave
  34278. };
  34279. }
  34280. });
  34281. var _hoisted_147 = ["disabled", "autocomplete"];
  34282. var _hoisted_229 = { style: { "height": "100%", "display": "flex", "justify-content": "center", "align-items": "center" } };
  34283. function _sfc_render26(_ctx, _cache, $props, $setup, $data, $options) {
  34284. const _component_el_tag = resolveComponent("el-tag");
  34285. const _component_el_tooltip = resolveComponent("el-tooltip");
  34286. const _component_el_icon = resolveComponent("el-icon");
  34287. const _component_el_input = resolveComponent("el-input");
  34288. const _component_el_option = resolveComponent("el-option");
  34289. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  34290. const _component_el_select_menu = resolveComponent("el-select-menu");
  34291. const _directive_click_outside = resolveDirective("click-outside");
  34292. return withDirectives((openBlock(), createElementBlock("div", {
  34293. ref: "selectWrapper",
  34294. class: normalizeClass(_ctx.wrapperKls),
  34295. onMouseenter: _cache[22] || (_cache[22] = (...args) => _ctx.handleMouseEnter && _ctx.handleMouseEnter(...args)),
  34296. onMouseleave: _cache[23] || (_cache[23] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args)),
  34297. onClick: _cache[24] || (_cache[24] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
  34298. }, [
  34299. createVNode(_component_el_tooltip, {
  34300. ref: "tooltipRef",
  34301. visible: _ctx.dropMenuVisible,
  34302. placement: _ctx.placement,
  34303. teleported: _ctx.teleported,
  34304. "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
  34305. "fallback-placements": ["bottom-start", "top-start", "right", "left"],
  34306. effect: _ctx.effect,
  34307. pure: "",
  34308. trigger: "click",
  34309. transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
  34310. "stop-popper-mouse-event": false,
  34311. "gpu-acceleration": false,
  34312. persistent: _ctx.persistent,
  34313. onShow: _ctx.handleMenuEnter
  34314. }, {
  34315. default: withCtx(() => [
  34316. createBaseVNode("div", {
  34317. class: "select-trigger",
  34318. onMouseenter: _cache[20] || (_cache[20] = ($event) => _ctx.inputHovering = true),
  34319. onMouseleave: _cache[21] || (_cache[21] = ($event) => _ctx.inputHovering = false)
  34320. }, [
  34321. _ctx.multiple ? (openBlock(), createElementBlock("div", {
  34322. key: 0,
  34323. ref: "tags",
  34324. class: normalizeClass(_ctx.nsSelect.e("tags")),
  34325. style: normalizeStyle(_ctx.selectTagsStyle)
  34326. }, [
  34327. _ctx.collapseTags && _ctx.selected.length ? (openBlock(), createElementBlock("span", {
  34328. key: 0,
  34329. class: normalizeClass([
  34330. _ctx.nsSelect.b("tags-wrapper"),
  34331. { "has-prefix": _ctx.prefixWidth && _ctx.selected.length }
  34332. ])
  34333. }, [
  34334. createVNode(_component_el_tag, {
  34335. closable: !_ctx.selectDisabled && !_ctx.selected[0].isDisabled,
  34336. size: _ctx.collapseTagSize,
  34337. hit: _ctx.selected[0].hitState,
  34338. type: _ctx.tagType,
  34339. "disable-transitions": "",
  34340. onClose: _cache[0] || (_cache[0] = ($event) => _ctx.deleteTag($event, _ctx.selected[0]))
  34341. }, {
  34342. default: withCtx(() => [
  34343. createBaseVNode("span", {
  34344. class: normalizeClass(_ctx.nsSelect.e("tags-text")),
  34345. style: normalizeStyle(_ctx.tagTextStyle)
  34346. }, toDisplayString(_ctx.selected[0].currentLabel), 7)
  34347. ]),
  34348. _: 1
  34349. }, 8, ["closable", "size", "hit", "type"]),
  34350. _ctx.selected.length > 1 ? (openBlock(), createBlock(_component_el_tag, {
  34351. key: 0,
  34352. closable: false,
  34353. size: _ctx.collapseTagSize,
  34354. type: _ctx.tagType,
  34355. "disable-transitions": ""
  34356. }, {
  34357. default: withCtx(() => [
  34358. _ctx.collapseTagsTooltip ? (openBlock(), createBlock(_component_el_tooltip, {
  34359. key: 0,
  34360. disabled: _ctx.dropMenuVisible,
  34361. "fallback-placements": ["bottom", "top", "right", "left"],
  34362. effect: _ctx.effect,
  34363. placement: "bottom",
  34364. teleported: _ctx.teleported
  34365. }, {
  34366. default: withCtx(() => [
  34367. createBaseVNode("span", {
  34368. class: normalizeClass(_ctx.nsSelect.e("tags-text"))
  34369. }, "+ " + toDisplayString(_ctx.selected.length - 1), 3)
  34370. ]),
  34371. content: withCtx(() => [
  34372. createBaseVNode("div", {
  34373. class: normalizeClass(_ctx.nsSelect.e("collapse-tags"))
  34374. }, [
  34375. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected.slice(1), (item, idx) => {
  34376. return openBlock(), createElementBlock("div", {
  34377. key: idx,
  34378. class: normalizeClass(_ctx.nsSelect.e("collapse-tag"))
  34379. }, [
  34380. (openBlock(), createBlock(_component_el_tag, {
  34381. key: _ctx.getValueKey(item),
  34382. class: "in-tooltip",
  34383. closable: !_ctx.selectDisabled && !item.isDisabled,
  34384. size: _ctx.collapseTagSize,
  34385. hit: item.hitState,
  34386. type: _ctx.tagType,
  34387. "disable-transitions": "",
  34388. style: { margin: "2px" },
  34389. onClose: ($event) => _ctx.deleteTag($event, item)
  34390. }, {
  34391. default: withCtx(() => [
  34392. createBaseVNode("span", {
  34393. class: normalizeClass(_ctx.nsSelect.e("tags-text")),
  34394. style: normalizeStyle({
  34395. maxWidth: _ctx.inputWidth - 75 + "px"
  34396. })
  34397. }, toDisplayString(item.currentLabel), 7)
  34398. ]),
  34399. _: 2
  34400. }, 1032, ["closable", "size", "hit", "type", "onClose"]))
  34401. ], 2);
  34402. }), 128))
  34403. ], 2)
  34404. ]),
  34405. _: 1
  34406. }, 8, ["disabled", "effect", "teleported"])) : (openBlock(), createElementBlock("span", {
  34407. key: 1,
  34408. class: normalizeClass(_ctx.nsSelect.e("tags-text"))
  34409. }, "+ " + toDisplayString(_ctx.selected.length - 1), 3))
  34410. ]),
  34411. _: 1
  34412. }, 8, ["size", "type"])) : createCommentVNode("v-if", true)
  34413. ], 2)) : createCommentVNode("v-if", true),
  34414. createCommentVNode(" <div> "),
  34415. !_ctx.collapseTags ? (openBlock(), createBlock(Transition, {
  34416. key: 1,
  34417. onAfterLeave: _ctx.resetInputHeight
  34418. }, {
  34419. default: withCtx(() => [
  34420. createBaseVNode("span", {
  34421. class: normalizeClass([
  34422. _ctx.nsSelect.b("tags-wrapper"),
  34423. { "has-prefix": _ctx.prefixWidth && _ctx.selected.length }
  34424. ])
  34425. }, [
  34426. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item) => {
  34427. return openBlock(), createBlock(_component_el_tag, {
  34428. key: _ctx.getValueKey(item),
  34429. closable: !_ctx.selectDisabled && !item.isDisabled,
  34430. size: _ctx.collapseTagSize,
  34431. hit: item.hitState,
  34432. type: _ctx.tagType,
  34433. "disable-transitions": "",
  34434. onClose: ($event) => _ctx.deleteTag($event, item)
  34435. }, {
  34436. default: withCtx(() => [
  34437. createBaseVNode("span", {
  34438. class: normalizeClass(_ctx.nsSelect.e("tags-text")),
  34439. style: normalizeStyle({ maxWidth: _ctx.inputWidth - 75 + "px" })
  34440. }, toDisplayString(item.currentLabel), 7)
  34441. ]),
  34442. _: 2
  34443. }, 1032, ["closable", "size", "hit", "type", "onClose"]);
  34444. }), 128))
  34445. ], 2)
  34446. ]),
  34447. _: 1
  34448. }, 8, ["onAfterLeave"])) : createCommentVNode("v-if", true),
  34449. createCommentVNode(" </div> "),
  34450. _ctx.filterable ? withDirectives((openBlock(), createElementBlock("input", {
  34451. key: 2,
  34452. ref: "input",
  34453. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.query = $event),
  34454. type: "text",
  34455. class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
  34456. disabled: _ctx.selectDisabled,
  34457. autocomplete: _ctx.autocomplete,
  34458. style: normalizeStyle({
  34459. marginLeft: _ctx.prefixWidth && !_ctx.selected.length || _ctx.tagInMultiLine ? `${_ctx.prefixWidth}px` : "",
  34460. flexGrow: 1,
  34461. width: `${_ctx.inputLength / (_ctx.inputWidth - 32)}%`,
  34462. maxWidth: `${_ctx.inputWidth - 42}px`
  34463. }),
  34464. onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  34465. onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
  34466. onKeyup: _cache[4] || (_cache[4] = (...args) => _ctx.managePlaceholder && _ctx.managePlaceholder(...args)),
  34467. onKeydown: [
  34468. _cache[5] || (_cache[5] = (...args) => _ctx.resetInputState && _ctx.resetInputState(...args)),
  34469. _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
  34470. _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"])),
  34471. _cache[8] || (_cache[8] = withKeys((...args) => _ctx.handleKeydownEscape && _ctx.handleKeydownEscape(...args), ["esc"])),
  34472. _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.selectOption && _ctx.selectOption(...args), ["stop", "prevent"]), ["enter"])),
  34473. _cache[10] || (_cache[10] = withKeys((...args) => _ctx.deletePrevTag && _ctx.deletePrevTag(...args), ["delete"])),
  34474. _cache[11] || (_cache[11] = withKeys(($event) => _ctx.visible = false, ["tab"]))
  34475. ],
  34476. onCompositionstart: _cache[12] || (_cache[12] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
  34477. onCompositionupdate: _cache[13] || (_cache[13] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
  34478. onCompositionend: _cache[14] || (_cache[14] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
  34479. onInput: _cache[15] || (_cache[15] = (...args) => _ctx.debouncedQueryChange && _ctx.debouncedQueryChange(...args))
  34480. }, null, 46, _hoisted_147)), [
  34481. [vModelText, _ctx.query]
  34482. ]) : createCommentVNode("v-if", true)
  34483. ], 6)) : createCommentVNode("v-if", true),
  34484. createVNode(_component_el_input, {
  34485. id: _ctx.id,
  34486. ref: "reference",
  34487. modelValue: _ctx.selectedLabel,
  34488. "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => _ctx.selectedLabel = $event),
  34489. type: "text",
  34490. placeholder: _ctx.currentPlaceholder,
  34491. name: _ctx.name,
  34492. autocomplete: _ctx.autocomplete,
  34493. size: _ctx.selectSize,
  34494. disabled: _ctx.selectDisabled,
  34495. readonly: _ctx.readonly,
  34496. "validate-event": false,
  34497. class: normalizeClass([_ctx.nsSelect.is("focus", _ctx.visible)]),
  34498. tabindex: _ctx.multiple && _ctx.filterable ? -1 : void 0,
  34499. onFocus: _ctx.handleFocus,
  34500. onBlur: _ctx.handleBlur,
  34501. onInput: _ctx.debouncedOnInputChange,
  34502. onPaste: _ctx.debouncedOnInputChange,
  34503. onCompositionstart: _ctx.handleComposition,
  34504. onCompositionupdate: _ctx.handleComposition,
  34505. onCompositionend: _ctx.handleComposition,
  34506. onKeydown: [
  34507. _cache[17] || (_cache[17] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["stop", "prevent"]), ["down"])),
  34508. _cache[18] || (_cache[18] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["stop", "prevent"]), ["up"])),
  34509. withKeys(withModifiers(_ctx.selectOption, ["stop", "prevent"]), ["enter"]),
  34510. withKeys(_ctx.handleKeydownEscape, ["esc"]),
  34511. _cache[19] || (_cache[19] = withKeys(($event) => _ctx.visible = false, ["tab"]))
  34512. ]
  34513. }, createSlots({
  34514. suffix: withCtx(() => [
  34515. _ctx.iconComponent && !_ctx.showClose ? (openBlock(), createBlock(_component_el_icon, {
  34516. key: 0,
  34517. class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon"), _ctx.iconReverse])
  34518. }, {
  34519. default: withCtx(() => [
  34520. (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
  34521. ]),
  34522. _: 1
  34523. }, 8, ["class"])) : createCommentVNode("v-if", true),
  34524. _ctx.showClose && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
  34525. key: 1,
  34526. class: normalizeClass([_ctx.nsSelect.e("caret"), _ctx.nsSelect.e("icon")]),
  34527. onClick: _ctx.handleClearClick
  34528. }, {
  34529. default: withCtx(() => [
  34530. (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
  34531. ]),
  34532. _: 1
  34533. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
  34534. ]),
  34535. _: 2
  34536. }, [
  34537. _ctx.$slots.prefix ? {
  34538. name: "prefix",
  34539. fn: withCtx(() => [
  34540. createBaseVNode("div", _hoisted_229, [
  34541. renderSlot(_ctx.$slots, "prefix")
  34542. ])
  34543. ])
  34544. } : void 0
  34545. ]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"])
  34546. ], 32)
  34547. ]),
  34548. content: withCtx(() => [
  34549. createVNode(_component_el_select_menu, null, {
  34550. default: withCtx(() => [
  34551. withDirectives(createVNode(_component_el_scrollbar, {
  34552. ref: "scrollbar",
  34553. tag: "ul",
  34554. "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
  34555. "view-class": _ctx.nsSelect.be("dropdown", "list"),
  34556. class: normalizeClass([
  34557. _ctx.nsSelect.is("empty", !_ctx.allowCreate && Boolean(_ctx.query) && _ctx.filteredOptionsCount === 0)
  34558. ])
  34559. }, {
  34560. default: withCtx(() => [
  34561. _ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
  34562. key: 0,
  34563. value: _ctx.query,
  34564. created: true
  34565. }, null, 8, ["value"])) : createCommentVNode("v-if", true),
  34566. renderSlot(_ctx.$slots, "default")
  34567. ]),
  34568. _: 3
  34569. }, 8, ["wrap-class", "view-class", "class"]), [
  34570. [vShow, _ctx.options.size > 0 && !_ctx.loading]
  34571. ]),
  34572. _ctx.emptyText && (!_ctx.allowCreate || _ctx.loading || _ctx.allowCreate && _ctx.options.size === 0) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  34573. _ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }) : (openBlock(), createElementBlock("p", {
  34574. key: 1,
  34575. class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
  34576. }, toDisplayString(_ctx.emptyText), 3))
  34577. ], 64)) : createCommentVNode("v-if", true)
  34578. ]),
  34579. _: 3
  34580. })
  34581. ]),
  34582. _: 3
  34583. }, 8, ["visible", "placement", "teleported", "popper-class", "effect", "transition", "persistent", "onShow"])
  34584. ], 34)), [
  34585. [_directive_click_outside, _ctx.handleClose, _ctx.popperPaneRef]
  34586. ]);
  34587. }
  34588. var Select = _export_sfc(_sfc_main96, [["render", _sfc_render26], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);
  34589. // node_modules/element-plus/es/components/select/src/option-group.mjs
  34590. var _sfc_main97 = defineComponent({
  34591. name: "ElOptionGroup",
  34592. componentName: "ElOptionGroup",
  34593. props: {
  34594. label: String,
  34595. disabled: {
  34596. type: Boolean,
  34597. default: false
  34598. }
  34599. },
  34600. setup(props) {
  34601. const ns2 = useNamespace("select");
  34602. const visible = ref(true);
  34603. const instance = getCurrentInstance();
  34604. const children = ref([]);
  34605. provide(selectGroupKey, reactive({
  34606. ...toRefs(props)
  34607. }));
  34608. const select = inject(selectKey);
  34609. onMounted(() => {
  34610. children.value = flattedChildren2(instance.subTree);
  34611. });
  34612. const flattedChildren2 = (node) => {
  34613. const children2 = [];
  34614. if (Array.isArray(node.children)) {
  34615. node.children.forEach((child) => {
  34616. var _a2;
  34617. if (child.type && child.type.name === "ElOption" && child.component && child.component.proxy) {
  34618. children2.push(child.component.proxy);
  34619. } else if ((_a2 = child.children) == null ? void 0 : _a2.length) {
  34620. children2.push(...flattedChildren2(child));
  34621. }
  34622. });
  34623. }
  34624. return children2;
  34625. };
  34626. const { groupQueryChange } = toRaw(select);
  34627. watch(groupQueryChange, () => {
  34628. visible.value = children.value.some((option) => option.visible === true);
  34629. }, { flush: "post" });
  34630. return {
  34631. visible,
  34632. ns: ns2
  34633. };
  34634. }
  34635. });
  34636. function _sfc_render27(_ctx, _cache, $props, $setup, $data, $options) {
  34637. return withDirectives((openBlock(), createElementBlock("ul", {
  34638. class: normalizeClass(_ctx.ns.be("group", "wrap"))
  34639. }, [
  34640. createBaseVNode("li", {
  34641. class: normalizeClass(_ctx.ns.be("group", "title"))
  34642. }, toDisplayString(_ctx.label), 3),
  34643. createBaseVNode("li", null, [
  34644. createBaseVNode("ul", {
  34645. class: normalizeClass(_ctx.ns.b("group"))
  34646. }, [
  34647. renderSlot(_ctx.$slots, "default")
  34648. ], 2)
  34649. ])
  34650. ], 2)), [
  34651. [vShow, _ctx.visible]
  34652. ]);
  34653. }
  34654. var OptionGroup = _export_sfc(_sfc_main97, [["render", _sfc_render27], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);
  34655. // node_modules/element-plus/es/components/select/index.mjs
  34656. var ElSelect = withInstall(Select, {
  34657. Option,
  34658. OptionGroup
  34659. });
  34660. var ElOption = withNoopInstall(Option);
  34661. var ElOptionGroup = withNoopInstall(OptionGroup);
  34662. // node_modules/element-plus/es/components/pagination/src/usePagination.mjs
  34663. var usePagination = () => inject(elPaginationKey, {});
  34664. // node_modules/element-plus/es/components/pagination/src/components/sizes.mjs
  34665. var paginationSizesProps = buildProps({
  34666. pageSize: {
  34667. type: Number,
  34668. required: true
  34669. },
  34670. pageSizes: {
  34671. type: definePropType(Array),
  34672. default: () => mutable([10, 20, 30, 40, 50, 100])
  34673. },
  34674. popperClass: {
  34675. type: String
  34676. },
  34677. disabled: Boolean,
  34678. size: {
  34679. type: String,
  34680. values: componentSizes
  34681. }
  34682. });
  34683. // node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs
  34684. var __default__61 = defineComponent({
  34685. name: "ElPaginationSizes"
  34686. });
  34687. var _sfc_main98 = defineComponent({
  34688. ...__default__61,
  34689. props: paginationSizesProps,
  34690. emits: ["page-size-change"],
  34691. setup(__props, { emit }) {
  34692. const props = __props;
  34693. const { t } = useLocale();
  34694. const ns2 = useNamespace("pagination");
  34695. const pagination = usePagination();
  34696. const innerPageSize = ref(props.pageSize);
  34697. watch(() => props.pageSizes, (newVal, oldVal) => {
  34698. if (isEqual_default(newVal, oldVal))
  34699. return;
  34700. if (Array.isArray(newVal)) {
  34701. const pageSize = newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0];
  34702. emit("page-size-change", pageSize);
  34703. }
  34704. });
  34705. watch(() => props.pageSize, (newVal) => {
  34706. innerPageSize.value = newVal;
  34707. });
  34708. const innerPageSizes = computed2(() => props.pageSizes);
  34709. function handleChange(val) {
  34710. var _a2;
  34711. if (val !== innerPageSize.value) {
  34712. innerPageSize.value = val;
  34713. (_a2 = pagination.handleSizeChange) == null ? void 0 : _a2.call(pagination, Number(val));
  34714. }
  34715. }
  34716. return (_ctx, _cache) => {
  34717. return openBlock(), createElementBlock("span", {
  34718. class: normalizeClass(unref(ns2).e("sizes"))
  34719. }, [
  34720. createVNode(unref(ElSelect), {
  34721. "model-value": innerPageSize.value,
  34722. disabled: _ctx.disabled,
  34723. "popper-class": _ctx.popperClass,
  34724. size: _ctx.size,
  34725. "validate-event": false,
  34726. onChange: handleChange
  34727. }, {
  34728. default: withCtx(() => [
  34729. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(innerPageSizes), (item) => {
  34730. return openBlock(), createBlock(unref(ElOption), {
  34731. key: item,
  34732. value: item,
  34733. label: item + unref(t)("el.pagination.pagesize")
  34734. }, null, 8, ["value", "label"]);
  34735. }), 128))
  34736. ]),
  34737. _: 1
  34738. }, 8, ["model-value", "disabled", "popper-class", "size"])
  34739. ], 2);
  34740. };
  34741. }
  34742. });
  34743. var Sizes = _export_sfc(_sfc_main98, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]);
  34744. // node_modules/element-plus/es/components/pagination/src/components/jumper.mjs
  34745. var paginationJumperProps = buildProps({
  34746. size: {
  34747. type: String,
  34748. values: componentSizes
  34749. }
  34750. });
  34751. // node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs
  34752. var _hoisted_148 = ["disabled"];
  34753. var __default__62 = defineComponent({
  34754. name: "ElPaginationJumper"
  34755. });
  34756. var _sfc_main99 = defineComponent({
  34757. ...__default__62,
  34758. props: paginationJumperProps,
  34759. setup(__props) {
  34760. const { t } = useLocale();
  34761. const ns2 = useNamespace("pagination");
  34762. const { pageCount, disabled, currentPage, changeEvent } = usePagination();
  34763. const userInput = ref();
  34764. const innerValue = computed2(() => {
  34765. var _a2;
  34766. return (_a2 = userInput.value) != null ? _a2 : currentPage == null ? void 0 : currentPage.value;
  34767. });
  34768. function handleInput(val) {
  34769. userInput.value = +val;
  34770. }
  34771. function handleChange(val) {
  34772. val = Math.trunc(+val);
  34773. changeEvent == null ? void 0 : changeEvent(+val);
  34774. userInput.value = void 0;
  34775. }
  34776. return (_ctx, _cache) => {
  34777. return openBlock(), createElementBlock("span", {
  34778. class: normalizeClass(unref(ns2).e("jump")),
  34779. disabled: unref(disabled)
  34780. }, [
  34781. createBaseVNode("span", {
  34782. class: normalizeClass([unref(ns2).e("goto")])
  34783. }, toDisplayString(unref(t)("el.pagination.goto")), 3),
  34784. createVNode(unref(ElInput), {
  34785. size: _ctx.size,
  34786. class: normalizeClass([unref(ns2).e("editor"), unref(ns2).is("in-pagination")]),
  34787. min: 1,
  34788. max: unref(pageCount),
  34789. disabled: unref(disabled),
  34790. "model-value": unref(innerValue),
  34791. "validate-event": false,
  34792. type: "number",
  34793. "onUpdate:modelValue": handleInput,
  34794. onChange: handleChange
  34795. }, null, 8, ["size", "class", "max", "disabled", "model-value"]),
  34796. createBaseVNode("span", {
  34797. class: normalizeClass([unref(ns2).e("classifier")])
  34798. }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3)
  34799. ], 10, _hoisted_148);
  34800. };
  34801. }
  34802. });
  34803. var Jumper = _export_sfc(_sfc_main99, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]);
  34804. // node_modules/element-plus/es/components/pagination/src/components/total.mjs
  34805. var paginationTotalProps = buildProps({
  34806. total: {
  34807. type: Number,
  34808. default: 1e3
  34809. }
  34810. });
  34811. // node_modules/element-plus/es/components/pagination/src/components/total2.mjs
  34812. var _hoisted_149 = ["disabled"];
  34813. var __default__63 = defineComponent({
  34814. name: "ElPaginationTotal"
  34815. });
  34816. var _sfc_main100 = defineComponent({
  34817. ...__default__63,
  34818. props: paginationTotalProps,
  34819. setup(__props) {
  34820. const { t } = useLocale();
  34821. const ns2 = useNamespace("pagination");
  34822. const { disabled } = usePagination();
  34823. return (_ctx, _cache) => {
  34824. return openBlock(), createElementBlock("span", {
  34825. class: normalizeClass(unref(ns2).e("total")),
  34826. disabled: unref(disabled)
  34827. }, toDisplayString(unref(t)("el.pagination.total", {
  34828. total: _ctx.total
  34829. })), 11, _hoisted_149);
  34830. };
  34831. }
  34832. });
  34833. var Total = _export_sfc(_sfc_main100, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]);
  34834. // node_modules/element-plus/es/components/pagination/src/components/pager.mjs
  34835. var paginationPagerProps = buildProps({
  34836. currentPage: {
  34837. type: Number,
  34838. default: 1
  34839. },
  34840. pageCount: {
  34841. type: Number,
  34842. required: true
  34843. },
  34844. pagerCount: {
  34845. type: Number,
  34846. default: 7
  34847. },
  34848. disabled: Boolean
  34849. });
  34850. // node_modules/element-plus/es/components/pagination/src/components/pager2.mjs
  34851. var _hoisted_150 = ["onKeyup"];
  34852. var _hoisted_230 = ["aria-current", "tabindex"];
  34853. var _hoisted_314 = ["tabindex"];
  34854. var _hoisted_47 = ["aria-current", "tabindex"];
  34855. var _hoisted_54 = ["tabindex"];
  34856. var _hoisted_62 = ["aria-current", "tabindex"];
  34857. var __default__64 = defineComponent({
  34858. name: "ElPaginationPager"
  34859. });
  34860. var _sfc_main101 = defineComponent({
  34861. ...__default__64,
  34862. props: paginationPagerProps,
  34863. emits: ["change"],
  34864. setup(__props, { emit }) {
  34865. const props = __props;
  34866. const nsPager = useNamespace("pager");
  34867. const nsIcon = useNamespace("icon");
  34868. const showPrevMore = ref(false);
  34869. const showNextMore = ref(false);
  34870. const quickPrevHover = ref(false);
  34871. const quickNextHover = ref(false);
  34872. const quickPrevFocus = ref(false);
  34873. const quickNextFocus = ref(false);
  34874. const pagers = computed2(() => {
  34875. const pagerCount = props.pagerCount;
  34876. const halfPagerCount = (pagerCount - 1) / 2;
  34877. const currentPage = Number(props.currentPage);
  34878. const pageCount = Number(props.pageCount);
  34879. let showPrevMore2 = false;
  34880. let showNextMore2 = false;
  34881. if (pageCount > pagerCount) {
  34882. if (currentPage > pagerCount - halfPagerCount) {
  34883. showPrevMore2 = true;
  34884. }
  34885. if (currentPage < pageCount - halfPagerCount) {
  34886. showNextMore2 = true;
  34887. }
  34888. }
  34889. const array4 = [];
  34890. if (showPrevMore2 && !showNextMore2) {
  34891. const startPage = pageCount - (pagerCount - 2);
  34892. for (let i = startPage; i < pageCount; i++) {
  34893. array4.push(i);
  34894. }
  34895. } else if (!showPrevMore2 && showNextMore2) {
  34896. for (let i = 2; i < pagerCount; i++) {
  34897. array4.push(i);
  34898. }
  34899. } else if (showPrevMore2 && showNextMore2) {
  34900. const offset2 = Math.floor(pagerCount / 2) - 1;
  34901. for (let i = currentPage - offset2; i <= currentPage + offset2; i++) {
  34902. array4.push(i);
  34903. }
  34904. } else {
  34905. for (let i = 2; i < pageCount; i++) {
  34906. array4.push(i);
  34907. }
  34908. }
  34909. return array4;
  34910. });
  34911. const tabindex = computed2(() => props.disabled ? -1 : 0);
  34912. watchEffect(() => {
  34913. const halfPagerCount = (props.pagerCount - 1) / 2;
  34914. showPrevMore.value = false;
  34915. showNextMore.value = false;
  34916. if (props.pageCount > props.pagerCount) {
  34917. if (props.currentPage > props.pagerCount - halfPagerCount) {
  34918. showPrevMore.value = true;
  34919. }
  34920. if (props.currentPage < props.pageCount - halfPagerCount) {
  34921. showNextMore.value = true;
  34922. }
  34923. }
  34924. });
  34925. function onMouseEnter(forward = false) {
  34926. if (props.disabled)
  34927. return;
  34928. if (forward) {
  34929. quickPrevHover.value = true;
  34930. } else {
  34931. quickNextHover.value = true;
  34932. }
  34933. }
  34934. function onFocus(forward = false) {
  34935. if (forward) {
  34936. quickPrevFocus.value = true;
  34937. } else {
  34938. quickNextFocus.value = true;
  34939. }
  34940. }
  34941. function onEnter(e) {
  34942. const target2 = e.target;
  34943. if (target2.tagName.toLowerCase() === "li" && Array.from(target2.classList).includes("number")) {
  34944. const newPage = Number(target2.textContent);
  34945. if (newPage !== props.currentPage) {
  34946. emit("change", newPage);
  34947. }
  34948. } else if (target2.tagName.toLowerCase() === "li" && Array.from(target2.classList).includes("more")) {
  34949. onPagerClick(e);
  34950. }
  34951. }
  34952. function onPagerClick(event) {
  34953. const target2 = event.target;
  34954. if (target2.tagName.toLowerCase() === "ul" || props.disabled) {
  34955. return;
  34956. }
  34957. let newPage = Number(target2.textContent);
  34958. const pageCount = props.pageCount;
  34959. const currentPage = props.currentPage;
  34960. const pagerCountOffset = props.pagerCount - 2;
  34961. if (target2.className.includes("more")) {
  34962. if (target2.className.includes("quickprev")) {
  34963. newPage = currentPage - pagerCountOffset;
  34964. } else if (target2.className.includes("quicknext")) {
  34965. newPage = currentPage + pagerCountOffset;
  34966. }
  34967. }
  34968. if (!Number.isNaN(+newPage)) {
  34969. if (newPage < 1) {
  34970. newPage = 1;
  34971. }
  34972. if (newPage > pageCount) {
  34973. newPage = pageCount;
  34974. }
  34975. }
  34976. if (newPage !== currentPage) {
  34977. emit("change", newPage);
  34978. }
  34979. }
  34980. return (_ctx, _cache) => {
  34981. return openBlock(), createElementBlock("ul", {
  34982. class: normalizeClass(unref(nsPager).b()),
  34983. onClick: onPagerClick,
  34984. onKeyup: withKeys(onEnter, ["enter"])
  34985. }, [
  34986. _ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
  34987. key: 0,
  34988. class: normalizeClass([[
  34989. unref(nsPager).is("active", _ctx.currentPage === 1),
  34990. unref(nsPager).is("disabled", _ctx.disabled)
  34991. ], "number"]),
  34992. "aria-current": _ctx.currentPage === 1,
  34993. tabindex: unref(tabindex)
  34994. }, " 1 ", 10, _hoisted_230)) : createCommentVNode("v-if", true),
  34995. showPrevMore.value ? (openBlock(), createElementBlock("li", {
  34996. key: 1,
  34997. class: normalizeClass([
  34998. "more",
  34999. "btn-quickprev",
  35000. unref(nsIcon).b(),
  35001. unref(nsPager).is("disabled", _ctx.disabled)
  35002. ]),
  35003. tabindex: unref(tabindex),
  35004. onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)),
  35005. onMouseleave: _cache[1] || (_cache[1] = ($event) => quickPrevHover.value = false),
  35006. onFocus: _cache[2] || (_cache[2] = ($event) => onFocus(true)),
  35007. onBlur: _cache[3] || (_cache[3] = ($event) => quickPrevFocus.value = false)
  35008. }, [
  35009. (quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_left_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))
  35010. ], 42, _hoisted_314)) : createCommentVNode("v-if", true),
  35011. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagers), (pager) => {
  35012. return openBlock(), createElementBlock("li", {
  35013. key: pager,
  35014. class: normalizeClass([[
  35015. unref(nsPager).is("active", _ctx.currentPage === pager),
  35016. unref(nsPager).is("disabled", _ctx.disabled)
  35017. ], "number"]),
  35018. "aria-current": _ctx.currentPage === pager,
  35019. tabindex: unref(tabindex)
  35020. }, toDisplayString(pager), 11, _hoisted_47);
  35021. }), 128)),
  35022. showNextMore.value ? (openBlock(), createElementBlock("li", {
  35023. key: 2,
  35024. class: normalizeClass([
  35025. "more",
  35026. "btn-quicknext",
  35027. unref(nsIcon).b(),
  35028. unref(nsPager).is("disabled", _ctx.disabled)
  35029. ]),
  35030. tabindex: unref(tabindex),
  35031. onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()),
  35032. onMouseleave: _cache[5] || (_cache[5] = ($event) => quickNextHover.value = false),
  35033. onFocus: _cache[6] || (_cache[6] = ($event) => onFocus()),
  35034. onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false)
  35035. }, [
  35036. (quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_right_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))
  35037. ], 42, _hoisted_54)) : createCommentVNode("v-if", true),
  35038. _ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
  35039. key: 3,
  35040. class: normalizeClass([[
  35041. unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount),
  35042. unref(nsPager).is("disabled", _ctx.disabled)
  35043. ], "number"]),
  35044. "aria-current": _ctx.currentPage === _ctx.pageCount,
  35045. tabindex: unref(tabindex)
  35046. }, toDisplayString(_ctx.pageCount), 11, _hoisted_62)) : createCommentVNode("v-if", true)
  35047. ], 42, _hoisted_150);
  35048. };
  35049. }
  35050. });
  35051. var Pager = _export_sfc(_sfc_main101, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]);
  35052. // node_modules/element-plus/es/components/pagination/src/pagination.mjs
  35053. var isAbsent = (v2) => typeof v2 !== "number";
  35054. var paginationProps = buildProps({
  35055. total: Number,
  35056. pageSize: Number,
  35057. defaultPageSize: Number,
  35058. currentPage: Number,
  35059. defaultCurrentPage: Number,
  35060. pageCount: Number,
  35061. pagerCount: {
  35062. type: Number,
  35063. validator: (value) => {
  35064. return isNumber2(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
  35065. },
  35066. default: 7
  35067. },
  35068. layout: {
  35069. type: String,
  35070. default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ")
  35071. },
  35072. pageSizes: {
  35073. type: definePropType(Array),
  35074. default: () => mutable([10, 20, 30, 40, 50, 100])
  35075. },
  35076. popperClass: {
  35077. type: String,
  35078. default: ""
  35079. },
  35080. prevText: {
  35081. type: String,
  35082. default: ""
  35083. },
  35084. prevIcon: {
  35085. type: iconPropType,
  35086. default: () => arrow_left_default
  35087. },
  35088. nextText: {
  35089. type: String,
  35090. default: ""
  35091. },
  35092. nextIcon: {
  35093. type: iconPropType,
  35094. default: () => arrow_right_default
  35095. },
  35096. small: Boolean,
  35097. background: Boolean,
  35098. disabled: Boolean,
  35099. hideOnSinglePage: Boolean
  35100. });
  35101. var paginationEmits = {
  35102. "update:current-page": (val) => isNumber2(val),
  35103. "update:page-size": (val) => isNumber2(val),
  35104. "size-change": (val) => isNumber2(val),
  35105. "current-change": (val) => isNumber2(val),
  35106. "prev-click": (val) => isNumber2(val),
  35107. "next-click": (val) => isNumber2(val)
  35108. };
  35109. var componentName = "ElPagination";
  35110. var Pagination = defineComponent({
  35111. name: componentName,
  35112. props: paginationProps,
  35113. emits: paginationEmits,
  35114. setup(props, { emit, slots }) {
  35115. const { t } = useLocale();
  35116. const ns2 = useNamespace("pagination");
  35117. const vnodeProps = getCurrentInstance().vnode.props || {};
  35118. const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
  35119. const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
  35120. const assertValidUsage = computed2(() => {
  35121. if (isAbsent(props.total) && isAbsent(props.pageCount))
  35122. return false;
  35123. if (!isAbsent(props.currentPage) && !hasCurrentPageListener)
  35124. return false;
  35125. if (props.layout.includes("sizes")) {
  35126. if (!isAbsent(props.pageCount)) {
  35127. if (!hasPageSizeListener)
  35128. return false;
  35129. } else if (!isAbsent(props.total)) {
  35130. if (!isAbsent(props.pageSize)) {
  35131. if (!hasPageSizeListener) {
  35132. return false;
  35133. }
  35134. } else {
  35135. }
  35136. }
  35137. }
  35138. return true;
  35139. });
  35140. const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);
  35141. const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);
  35142. const pageSizeBridge = computed2({
  35143. get() {
  35144. return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;
  35145. },
  35146. set(v2) {
  35147. if (isAbsent(props.pageSize)) {
  35148. innerPageSize.value = v2;
  35149. }
  35150. if (hasPageSizeListener) {
  35151. emit("update:page-size", v2);
  35152. emit("size-change", v2);
  35153. }
  35154. }
  35155. });
  35156. const pageCountBridge = computed2(() => {
  35157. let pageCount = 0;
  35158. if (!isAbsent(props.pageCount)) {
  35159. pageCount = props.pageCount;
  35160. } else if (!isAbsent(props.total)) {
  35161. pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));
  35162. }
  35163. return pageCount;
  35164. });
  35165. const currentPageBridge = computed2({
  35166. get() {
  35167. return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;
  35168. },
  35169. set(v2) {
  35170. let newCurrentPage = v2;
  35171. if (v2 < 1) {
  35172. newCurrentPage = 1;
  35173. } else if (v2 > pageCountBridge.value) {
  35174. newCurrentPage = pageCountBridge.value;
  35175. }
  35176. if (isAbsent(props.currentPage)) {
  35177. innerCurrentPage.value = newCurrentPage;
  35178. }
  35179. if (hasCurrentPageListener) {
  35180. emit("update:current-page", newCurrentPage);
  35181. emit("current-change", newCurrentPage);
  35182. }
  35183. }
  35184. });
  35185. watch(pageCountBridge, (val) => {
  35186. if (currentPageBridge.value > val)
  35187. currentPageBridge.value = val;
  35188. });
  35189. function handleCurrentChange2(val) {
  35190. currentPageBridge.value = val;
  35191. }
  35192. function handleSizeChange(val) {
  35193. pageSizeBridge.value = val;
  35194. const newPageCount = pageCountBridge.value;
  35195. if (currentPageBridge.value > newPageCount) {
  35196. currentPageBridge.value = newPageCount;
  35197. }
  35198. }
  35199. function prev() {
  35200. if (props.disabled)
  35201. return;
  35202. currentPageBridge.value -= 1;
  35203. emit("prev-click", currentPageBridge.value);
  35204. }
  35205. function next() {
  35206. if (props.disabled)
  35207. return;
  35208. currentPageBridge.value += 1;
  35209. emit("next-click", currentPageBridge.value);
  35210. }
  35211. function addClass2(element, cls) {
  35212. if (element) {
  35213. if (!element.props) {
  35214. element.props = {};
  35215. }
  35216. element.props.class = [element.props.class, cls].join(" ");
  35217. }
  35218. }
  35219. provide(elPaginationKey, {
  35220. pageCount: pageCountBridge,
  35221. disabled: computed2(() => props.disabled),
  35222. currentPage: currentPageBridge,
  35223. changeEvent: handleCurrentChange2,
  35224. handleSizeChange
  35225. });
  35226. return () => {
  35227. var _a2, _b;
  35228. if (!assertValidUsage.value) {
  35229. debugWarn(componentName, t("el.pagination.deprecationWarning"));
  35230. return null;
  35231. }
  35232. if (!props.layout)
  35233. return null;
  35234. if (props.hideOnSinglePage && pageCountBridge.value <= 1)
  35235. return null;
  35236. const rootChildren = [];
  35237. const rightWrapperChildren = [];
  35238. const rightWrapperRoot = h("div", { class: ns2.e("rightwrapper") }, rightWrapperChildren);
  35239. const TEMPLATE_MAP = {
  35240. prev: h(Prev, {
  35241. disabled: props.disabled,
  35242. currentPage: currentPageBridge.value,
  35243. prevText: props.prevText,
  35244. prevIcon: props.prevIcon,
  35245. onClick: prev
  35246. }),
  35247. jumper: h(Jumper, {
  35248. size: props.small ? "small" : "default"
  35249. }),
  35250. pager: h(Pager, {
  35251. currentPage: currentPageBridge.value,
  35252. pageCount: pageCountBridge.value,
  35253. pagerCount: props.pagerCount,
  35254. onChange: handleCurrentChange2,
  35255. disabled: props.disabled
  35256. }),
  35257. next: h(Next, {
  35258. disabled: props.disabled,
  35259. currentPage: currentPageBridge.value,
  35260. pageCount: pageCountBridge.value,
  35261. nextText: props.nextText,
  35262. nextIcon: props.nextIcon,
  35263. onClick: next
  35264. }),
  35265. sizes: h(Sizes, {
  35266. pageSize: pageSizeBridge.value,
  35267. pageSizes: props.pageSizes,
  35268. popperClass: props.popperClass,
  35269. disabled: props.disabled,
  35270. size: props.small ? "small" : "default"
  35271. }),
  35272. slot: (_b = (_a2 = slots == null ? void 0 : slots.default) == null ? void 0 : _a2.call(slots)) != null ? _b : null,
  35273. total: h(Total, { total: isAbsent(props.total) ? 0 : props.total })
  35274. };
  35275. const components = props.layout.split(",").map((item) => item.trim());
  35276. let haveRightWrapper = false;
  35277. components.forEach((c2) => {
  35278. if (c2 === "->") {
  35279. haveRightWrapper = true;
  35280. return;
  35281. }
  35282. if (!haveRightWrapper) {
  35283. rootChildren.push(TEMPLATE_MAP[c2]);
  35284. } else {
  35285. rightWrapperChildren.push(TEMPLATE_MAP[c2]);
  35286. }
  35287. });
  35288. addClass2(rootChildren[0], ns2.is("first"));
  35289. addClass2(rootChildren[rootChildren.length - 1], ns2.is("last"));
  35290. if (haveRightWrapper && rightWrapperChildren.length > 0) {
  35291. addClass2(rightWrapperChildren[0], ns2.is("first"));
  35292. addClass2(rightWrapperChildren[rightWrapperChildren.length - 1], ns2.is("last"));
  35293. rootChildren.push(rightWrapperRoot);
  35294. }
  35295. return h("div", {
  35296. role: "pagination",
  35297. "aria-label": "pagination",
  35298. class: [
  35299. ns2.b(),
  35300. ns2.is("background", props.background),
  35301. {
  35302. [ns2.m("small")]: props.small
  35303. }
  35304. ]
  35305. }, rootChildren);
  35306. };
  35307. }
  35308. });
  35309. // node_modules/element-plus/es/components/pagination/index.mjs
  35310. var ElPagination = withInstall(Pagination);
  35311. // node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs
  35312. var popconfirmProps = buildProps({
  35313. title: String,
  35314. confirmButtonText: String,
  35315. cancelButtonText: String,
  35316. confirmButtonType: {
  35317. type: String,
  35318. values: buttonTypes,
  35319. default: "primary"
  35320. },
  35321. cancelButtonType: {
  35322. type: String,
  35323. values: buttonTypes,
  35324. default: "text"
  35325. },
  35326. icon: {
  35327. type: iconPropType,
  35328. default: () => question_filled_default
  35329. },
  35330. iconColor: {
  35331. type: String,
  35332. default: "#f90"
  35333. },
  35334. hideIcon: {
  35335. type: Boolean,
  35336. default: false
  35337. },
  35338. hideAfter: {
  35339. type: Number,
  35340. default: 200
  35341. },
  35342. onConfirm: {
  35343. type: definePropType(Function)
  35344. },
  35345. onCancel: {
  35346. type: definePropType(Function)
  35347. },
  35348. teleported: useTooltipContentProps.teleported,
  35349. persistent: useTooltipContentProps.persistent,
  35350. width: {
  35351. type: [String, Number],
  35352. default: 150
  35353. }
  35354. });
  35355. // node_modules/element-plus/es/components/popconfirm/src/popconfirm2.mjs
  35356. var __default__65 = defineComponent({
  35357. name: "ElPopconfirm"
  35358. });
  35359. var _sfc_main102 = defineComponent({
  35360. ...__default__65,
  35361. props: popconfirmProps,
  35362. setup(__props) {
  35363. const props = __props;
  35364. const { t } = useLocale();
  35365. const ns2 = useNamespace("popconfirm");
  35366. const tooltipRef = ref();
  35367. const hidePopper = () => {
  35368. var _a2, _b;
  35369. (_b = (_a2 = tooltipRef.value) == null ? void 0 : _a2.onClose) == null ? void 0 : _b.call(_a2);
  35370. };
  35371. const style = computed2(() => {
  35372. return {
  35373. width: addUnit(props.width)
  35374. };
  35375. });
  35376. const confirm = (e) => {
  35377. var _a2;
  35378. (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, e);
  35379. hidePopper();
  35380. };
  35381. const cancel = (e) => {
  35382. var _a2;
  35383. (_a2 = props.onCancel) == null ? void 0 : _a2.call(props, e);
  35384. hidePopper();
  35385. };
  35386. const finalConfirmButtonText = computed2(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
  35387. const finalCancelButtonText = computed2(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
  35388. return (_ctx, _cache) => {
  35389. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  35390. ref_key: "tooltipRef",
  35391. ref: tooltipRef,
  35392. trigger: "click",
  35393. effect: "light"
  35394. }, _ctx.$attrs, {
  35395. "popper-class": `${unref(ns2).namespace.value}-popover`,
  35396. "popper-style": unref(style),
  35397. teleported: _ctx.teleported,
  35398. "fallback-placements": ["bottom", "top", "right", "left"],
  35399. "hide-after": _ctx.hideAfter,
  35400. persistent: _ctx.persistent
  35401. }), {
  35402. content: withCtx(() => [
  35403. createBaseVNode("div", {
  35404. class: normalizeClass(unref(ns2).b())
  35405. }, [
  35406. createBaseVNode("div", {
  35407. class: normalizeClass(unref(ns2).e("main"))
  35408. }, [
  35409. !_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
  35410. key: 0,
  35411. class: normalizeClass(unref(ns2).e("icon")),
  35412. style: normalizeStyle({ color: _ctx.iconColor })
  35413. }, {
  35414. default: withCtx(() => [
  35415. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  35416. ]),
  35417. _: 1
  35418. }, 8, ["class", "style"])) : createCommentVNode("v-if", true),
  35419. createTextVNode(" " + toDisplayString(_ctx.title), 1)
  35420. ], 2),
  35421. createBaseVNode("div", {
  35422. class: normalizeClass(unref(ns2).e("action"))
  35423. }, [
  35424. createVNode(unref(ElButton), {
  35425. size: "small",
  35426. type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
  35427. text: _ctx.cancelButtonType === "text",
  35428. onClick: cancel
  35429. }, {
  35430. default: withCtx(() => [
  35431. createTextVNode(toDisplayString(unref(finalCancelButtonText)), 1)
  35432. ]),
  35433. _: 1
  35434. }, 8, ["type", "text"]),
  35435. createVNode(unref(ElButton), {
  35436. size: "small",
  35437. type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
  35438. text: _ctx.confirmButtonType === "text",
  35439. onClick: confirm
  35440. }, {
  35441. default: withCtx(() => [
  35442. createTextVNode(toDisplayString(unref(finalConfirmButtonText)), 1)
  35443. ]),
  35444. _: 1
  35445. }, 8, ["type", "text"])
  35446. ], 2)
  35447. ], 2)
  35448. ]),
  35449. default: withCtx(() => [
  35450. _ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
  35451. ]),
  35452. _: 3
  35453. }, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]);
  35454. };
  35455. }
  35456. });
  35457. var Popconfirm = _export_sfc(_sfc_main102, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popconfirm/src/popconfirm.vue"]]);
  35458. // node_modules/element-plus/es/components/popconfirm/index.mjs
  35459. var ElPopconfirm = withInstall(Popconfirm);
  35460. // node_modules/element-plus/es/components/popover/src/popover.mjs
  35461. var popoverProps = buildProps({
  35462. trigger: useTooltipTriggerProps.trigger,
  35463. placement: dropdownProps.placement,
  35464. disabled: useTooltipTriggerProps.disabled,
  35465. visible: useTooltipContentProps.visible,
  35466. transition: useTooltipContentProps.transition,
  35467. popperOptions: dropdownProps.popperOptions,
  35468. tabindex: dropdownProps.tabindex,
  35469. content: useTooltipContentProps.content,
  35470. popperStyle: useTooltipContentProps.popperStyle,
  35471. popperClass: useTooltipContentProps.popperClass,
  35472. enterable: {
  35473. ...useTooltipContentProps.enterable,
  35474. default: true
  35475. },
  35476. effect: {
  35477. ...useTooltipContentProps.effect,
  35478. default: "light"
  35479. },
  35480. teleported: useTooltipContentProps.teleported,
  35481. title: String,
  35482. width: {
  35483. type: [String, Number],
  35484. default: 150
  35485. },
  35486. offset: {
  35487. type: Number,
  35488. default: void 0
  35489. },
  35490. showAfter: {
  35491. type: Number,
  35492. default: 0
  35493. },
  35494. hideAfter: {
  35495. type: Number,
  35496. default: 200
  35497. },
  35498. autoClose: {
  35499. type: Number,
  35500. default: 0
  35501. },
  35502. showArrow: {
  35503. type: Boolean,
  35504. default: true
  35505. },
  35506. persistent: {
  35507. type: Boolean,
  35508. default: true
  35509. },
  35510. "onUpdate:visible": {
  35511. type: Function
  35512. }
  35513. });
  35514. var popoverEmits = {
  35515. "update:visible": (value) => isBoolean2(value),
  35516. "before-enter": () => true,
  35517. "before-leave": () => true,
  35518. "after-enter": () => true,
  35519. "after-leave": () => true
  35520. };
  35521. // node_modules/element-plus/es/components/popover/src/popover2.mjs
  35522. var updateEventKeyRaw = `onUpdate:visible`;
  35523. var __default__66 = defineComponent({
  35524. name: "ElPopover"
  35525. });
  35526. var _sfc_main103 = defineComponent({
  35527. ...__default__66,
  35528. props: popoverProps,
  35529. emits: popoverEmits,
  35530. setup(__props, { expose, emit }) {
  35531. const props = __props;
  35532. const onUpdateVisible = computed2(() => {
  35533. return props[updateEventKeyRaw];
  35534. });
  35535. const ns2 = useNamespace("popover");
  35536. const tooltipRef = ref();
  35537. const popperRef = computed2(() => {
  35538. var _a2;
  35539. return (_a2 = unref(tooltipRef)) == null ? void 0 : _a2.popperRef;
  35540. });
  35541. const style = computed2(() => {
  35542. return [
  35543. {
  35544. width: addUnit(props.width)
  35545. },
  35546. props.popperStyle
  35547. ];
  35548. });
  35549. const kls = computed2(() => {
  35550. return [ns2.b(), props.popperClass, { [ns2.m("plain")]: !!props.content }];
  35551. });
  35552. const gpuAcceleration = computed2(() => {
  35553. return props.transition === `${ns2.namespace.value}-fade-in-linear`;
  35554. });
  35555. const hide2 = () => {
  35556. var _a2;
  35557. (_a2 = tooltipRef.value) == null ? void 0 : _a2.hide();
  35558. };
  35559. const beforeEnter = () => {
  35560. emit("before-enter");
  35561. };
  35562. const beforeLeave = () => {
  35563. emit("before-leave");
  35564. };
  35565. const afterEnter = () => {
  35566. emit("after-enter");
  35567. };
  35568. const afterLeave = () => {
  35569. emit("update:visible", false);
  35570. emit("after-leave");
  35571. };
  35572. expose({
  35573. popperRef,
  35574. hide: hide2
  35575. });
  35576. return (_ctx, _cache) => {
  35577. return openBlock(), createBlock(unref(ElTooltip), mergeProps({
  35578. ref_key: "tooltipRef",
  35579. ref: tooltipRef
  35580. }, _ctx.$attrs, {
  35581. trigger: _ctx.trigger,
  35582. placement: _ctx.placement,
  35583. disabled: _ctx.disabled,
  35584. visible: _ctx.visible,
  35585. transition: _ctx.transition,
  35586. "popper-options": _ctx.popperOptions,
  35587. tabindex: _ctx.tabindex,
  35588. content: _ctx.content,
  35589. offset: _ctx.offset,
  35590. "show-after": _ctx.showAfter,
  35591. "hide-after": _ctx.hideAfter,
  35592. "auto-close": _ctx.autoClose,
  35593. "show-arrow": _ctx.showArrow,
  35594. "aria-label": _ctx.title,
  35595. effect: _ctx.effect,
  35596. enterable: _ctx.enterable,
  35597. "popper-class": unref(kls),
  35598. "popper-style": unref(style),
  35599. teleported: _ctx.teleported,
  35600. persistent: _ctx.persistent,
  35601. "gpu-acceleration": unref(gpuAcceleration),
  35602. "onUpdate:visible": unref(onUpdateVisible),
  35603. onBeforeShow: beforeEnter,
  35604. onBeforeHide: beforeLeave,
  35605. onShow: afterEnter,
  35606. onHide: afterLeave
  35607. }), {
  35608. content: withCtx(() => [
  35609. _ctx.title ? (openBlock(), createElementBlock("div", {
  35610. key: 0,
  35611. class: normalizeClass(unref(ns2).e("title")),
  35612. role: "title"
  35613. }, toDisplayString(_ctx.title), 3)) : createCommentVNode("v-if", true),
  35614. renderSlot(_ctx.$slots, "default", {}, () => [
  35615. createTextVNode(toDisplayString(_ctx.content), 1)
  35616. ])
  35617. ]),
  35618. default: withCtx(() => [
  35619. _ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
  35620. ]),
  35621. _: 3
  35622. }, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]);
  35623. };
  35624. }
  35625. });
  35626. var Popover = _export_sfc(_sfc_main103, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);
  35627. // node_modules/element-plus/es/components/popover/src/directive.mjs
  35628. var attachEvents = (el, binding) => {
  35629. const popperComponent = binding.arg || binding.value;
  35630. const popover = popperComponent == null ? void 0 : popperComponent.popperRef;
  35631. if (popover) {
  35632. popover.triggerRef = el;
  35633. }
  35634. };
  35635. var PopoverDirective = {
  35636. mounted(el, binding) {
  35637. attachEvents(el, binding);
  35638. },
  35639. updated(el, binding) {
  35640. attachEvents(el, binding);
  35641. }
  35642. };
  35643. var VPopover = "popover";
  35644. // node_modules/element-plus/es/components/popover/index.mjs
  35645. var ElPopoverDirective = withInstallDirective(PopoverDirective, VPopover);
  35646. var ElPopover = withInstall(Popover, {
  35647. directive: ElPopoverDirective
  35648. });
  35649. // node_modules/element-plus/es/components/progress/src/progress.mjs
  35650. var progressProps = buildProps({
  35651. type: {
  35652. type: String,
  35653. default: "line",
  35654. values: ["line", "circle", "dashboard"]
  35655. },
  35656. percentage: {
  35657. type: Number,
  35658. default: 0,
  35659. validator: (val) => val >= 0 && val <= 100
  35660. },
  35661. status: {
  35662. type: String,
  35663. default: "",
  35664. values: ["", "success", "exception", "warning"]
  35665. },
  35666. indeterminate: {
  35667. type: Boolean,
  35668. default: false
  35669. },
  35670. duration: {
  35671. type: Number,
  35672. default: 3
  35673. },
  35674. strokeWidth: {
  35675. type: Number,
  35676. default: 6
  35677. },
  35678. strokeLinecap: {
  35679. type: definePropType(String),
  35680. default: "round"
  35681. },
  35682. textInside: {
  35683. type: Boolean,
  35684. default: false
  35685. },
  35686. width: {
  35687. type: Number,
  35688. default: 126
  35689. },
  35690. showText: {
  35691. type: Boolean,
  35692. default: true
  35693. },
  35694. color: {
  35695. type: definePropType([
  35696. String,
  35697. Array,
  35698. Function
  35699. ]),
  35700. default: ""
  35701. },
  35702. format: {
  35703. type: definePropType(Function),
  35704. default: (percentage) => `${percentage}%`
  35705. }
  35706. });
  35707. // node_modules/element-plus/es/components/progress/src/progress2.mjs
  35708. var _hoisted_151 = ["aria-valuenow"];
  35709. var _hoisted_231 = { viewBox: "0 0 100 100" };
  35710. var _hoisted_315 = ["d", "stroke", "stroke-width"];
  35711. var _hoisted_48 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"];
  35712. var _hoisted_55 = { key: 0 };
  35713. var __default__67 = defineComponent({
  35714. name: "ElProgress"
  35715. });
  35716. var _sfc_main104 = defineComponent({
  35717. ...__default__67,
  35718. props: progressProps,
  35719. setup(__props) {
  35720. const props = __props;
  35721. const STATUS_COLOR_MAP = {
  35722. success: "#13ce66",
  35723. exception: "#ff4949",
  35724. warning: "#e6a23c",
  35725. default: "#20a0ff"
  35726. };
  35727. const ns2 = useNamespace("progress");
  35728. const barStyle = computed2(() => ({
  35729. width: `${props.percentage}%`,
  35730. animationDuration: `${props.duration}s`,
  35731. backgroundColor: getCurrentColor(props.percentage)
  35732. }));
  35733. const relativeStrokeWidth = computed2(() => (props.strokeWidth / props.width * 100).toFixed(1));
  35734. const radius = computed2(() => {
  35735. if (["circle", "dashboard"].includes(props.type)) {
  35736. return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10);
  35737. }
  35738. return 0;
  35739. });
  35740. const trackPath = computed2(() => {
  35741. const r = radius.value;
  35742. const isDashboard = props.type === "dashboard";
  35743. return `
  35744. M 50 50
  35745. m 0 ${isDashboard ? "" : "-"}${r}
  35746. a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2}
  35747. a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2}
  35748. `;
  35749. });
  35750. const perimeter = computed2(() => 2 * Math.PI * radius.value);
  35751. const rate = computed2(() => props.type === "dashboard" ? 0.75 : 1);
  35752. const strokeDashoffset = computed2(() => {
  35753. const offset2 = -1 * perimeter.value * (1 - rate.value) / 2;
  35754. return `${offset2}px`;
  35755. });
  35756. const trailPathStyle = computed2(() => ({
  35757. strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,
  35758. strokeDashoffset: strokeDashoffset.value
  35759. }));
  35760. const circlePathStyle = computed2(() => ({
  35761. strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,
  35762. strokeDashoffset: strokeDashoffset.value,
  35763. transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
  35764. }));
  35765. const stroke = computed2(() => {
  35766. let ret;
  35767. if (props.color) {
  35768. ret = getCurrentColor(props.percentage);
  35769. } else {
  35770. ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default;
  35771. }
  35772. return ret;
  35773. });
  35774. const statusIcon = computed2(() => {
  35775. if (props.status === "warning") {
  35776. return warning_filled_default;
  35777. }
  35778. if (props.type === "line") {
  35779. return props.status === "success" ? circle_check_default : circle_close_default;
  35780. } else {
  35781. return props.status === "success" ? check_default : close_default;
  35782. }
  35783. });
  35784. const progressTextSize = computed2(() => {
  35785. return props.type === "line" ? 12 + props.strokeWidth * 0.4 : props.width * 0.111111 + 2;
  35786. });
  35787. const content = computed2(() => props.format(props.percentage));
  35788. function getColors(color) {
  35789. const span = 100 / color.length;
  35790. const seriesColors = color.map((seriesColor, index) => {
  35791. if (isString(seriesColor)) {
  35792. return {
  35793. color: seriesColor,
  35794. percentage: (index + 1) * span
  35795. };
  35796. }
  35797. return seriesColor;
  35798. });
  35799. return seriesColors.sort((a2, b2) => a2.percentage - b2.percentage);
  35800. }
  35801. const getCurrentColor = (percentage) => {
  35802. var _a2;
  35803. const { color } = props;
  35804. if (isFunction(color)) {
  35805. return color(percentage);
  35806. } else if (isString(color)) {
  35807. return color;
  35808. } else {
  35809. const colors = getColors(color);
  35810. for (const color2 of colors) {
  35811. if (color2.percentage > percentage)
  35812. return color2.color;
  35813. }
  35814. return (_a2 = colors[colors.length - 1]) == null ? void 0 : _a2.color;
  35815. }
  35816. };
  35817. return (_ctx, _cache) => {
  35818. return openBlock(), createElementBlock("div", {
  35819. class: normalizeClass([
  35820. unref(ns2).b(),
  35821. unref(ns2).m(_ctx.type),
  35822. unref(ns2).is(_ctx.status),
  35823. {
  35824. [unref(ns2).m("without-text")]: !_ctx.showText,
  35825. [unref(ns2).m("text-inside")]: _ctx.textInside
  35826. }
  35827. ]),
  35828. role: "progressbar",
  35829. "aria-valuenow": _ctx.percentage,
  35830. "aria-valuemin": "0",
  35831. "aria-valuemax": "100"
  35832. }, [
  35833. _ctx.type === "line" ? (openBlock(), createElementBlock("div", {
  35834. key: 0,
  35835. class: normalizeClass(unref(ns2).b("bar"))
  35836. }, [
  35837. createBaseVNode("div", {
  35838. class: normalizeClass(unref(ns2).be("bar", "outer")),
  35839. style: normalizeStyle({ height: `${_ctx.strokeWidth}px` })
  35840. }, [
  35841. createBaseVNode("div", {
  35842. class: normalizeClass([
  35843. unref(ns2).be("bar", "inner"),
  35844. { [unref(ns2).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate }
  35845. ]),
  35846. style: normalizeStyle(unref(barStyle))
  35847. }, [
  35848. (_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (openBlock(), createElementBlock("div", {
  35849. key: 0,
  35850. class: normalizeClass(unref(ns2).be("bar", "innerText"))
  35851. }, [
  35852. renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
  35853. createBaseVNode("span", null, toDisplayString(unref(content)), 1)
  35854. ])
  35855. ], 2)) : createCommentVNode("v-if", true)
  35856. ], 6)
  35857. ], 6)
  35858. ], 2)) : (openBlock(), createElementBlock("div", {
  35859. key: 1,
  35860. class: normalizeClass(unref(ns2).b("circle")),
  35861. style: normalizeStyle({ height: `${_ctx.width}px`, width: `${_ctx.width}px` })
  35862. }, [
  35863. (openBlock(), createElementBlock("svg", _hoisted_231, [
  35864. createBaseVNode("path", {
  35865. class: normalizeClass(unref(ns2).be("circle", "track")),
  35866. d: unref(trackPath),
  35867. stroke: `var(${unref(ns2).cssVarName("fill-color-light")}, #e5e9f2)`,
  35868. "stroke-width": unref(relativeStrokeWidth),
  35869. fill: "none",
  35870. style: normalizeStyle(unref(trailPathStyle))
  35871. }, null, 14, _hoisted_315),
  35872. createBaseVNode("path", {
  35873. class: normalizeClass(unref(ns2).be("circle", "path")),
  35874. d: unref(trackPath),
  35875. stroke: unref(stroke),
  35876. fill: "none",
  35877. opacity: _ctx.percentage ? 1 : 0,
  35878. "stroke-linecap": _ctx.strokeLinecap,
  35879. "stroke-width": unref(relativeStrokeWidth),
  35880. style: normalizeStyle(unref(circlePathStyle))
  35881. }, null, 14, _hoisted_48)
  35882. ]))
  35883. ], 6)),
  35884. (_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (openBlock(), createElementBlock("div", {
  35885. key: 2,
  35886. class: normalizeClass(unref(ns2).e("text")),
  35887. style: normalizeStyle({ fontSize: `${unref(progressTextSize)}px` })
  35888. }, [
  35889. renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
  35890. !_ctx.status ? (openBlock(), createElementBlock("span", _hoisted_55, toDisplayString(unref(content)), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
  35891. default: withCtx(() => [
  35892. (openBlock(), createBlock(resolveDynamicComponent(unref(statusIcon))))
  35893. ]),
  35894. _: 1
  35895. }))
  35896. ])
  35897. ], 6)) : createCommentVNode("v-if", true)
  35898. ], 10, _hoisted_151);
  35899. };
  35900. }
  35901. });
  35902. var Progress = _export_sfc(_sfc_main104, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);
  35903. // node_modules/element-plus/es/components/progress/index.mjs
  35904. var ElProgress = withInstall(Progress);
  35905. // node_modules/element-plus/es/components/rate/src/rate.mjs
  35906. var rateProps = buildProps({
  35907. modelValue: {
  35908. type: Number,
  35909. default: 0
  35910. },
  35911. id: {
  35912. type: String,
  35913. default: void 0
  35914. },
  35915. lowThreshold: {
  35916. type: Number,
  35917. default: 2
  35918. },
  35919. highThreshold: {
  35920. type: Number,
  35921. default: 4
  35922. },
  35923. max: {
  35924. type: Number,
  35925. default: 5
  35926. },
  35927. colors: {
  35928. type: definePropType([Array, Object]),
  35929. default: () => mutable(["", "", ""])
  35930. },
  35931. voidColor: {
  35932. type: String,
  35933. default: ""
  35934. },
  35935. disabledVoidColor: {
  35936. type: String,
  35937. default: ""
  35938. },
  35939. icons: {
  35940. type: definePropType([Array, Object]),
  35941. default: () => [star_filled_default, star_filled_default, star_filled_default]
  35942. },
  35943. voidIcon: {
  35944. type: iconPropType,
  35945. default: () => star_default
  35946. },
  35947. disabledVoidIcon: {
  35948. type: iconPropType,
  35949. default: () => star_filled_default
  35950. },
  35951. disabled: {
  35952. type: Boolean
  35953. },
  35954. allowHalf: {
  35955. type: Boolean
  35956. },
  35957. showText: {
  35958. type: Boolean
  35959. },
  35960. showScore: {
  35961. type: Boolean
  35962. },
  35963. textColor: {
  35964. type: String,
  35965. default: ""
  35966. },
  35967. texts: {
  35968. type: definePropType(Array),
  35969. default: () => mutable([
  35970. "Extremely bad",
  35971. "Disappointed",
  35972. "Fair",
  35973. "Satisfied",
  35974. "Surprise"
  35975. ])
  35976. },
  35977. scoreTemplate: {
  35978. type: String,
  35979. default: "{value}"
  35980. },
  35981. size: {
  35982. type: String,
  35983. validator: isValidComponentSize
  35984. },
  35985. label: {
  35986. type: String,
  35987. default: void 0
  35988. },
  35989. clearable: {
  35990. type: Boolean,
  35991. default: false
  35992. }
  35993. });
  35994. var rateEmits = {
  35995. [CHANGE_EVENT]: (value) => isNumber2(value),
  35996. [UPDATE_MODEL_EVENT]: (value) => isNumber2(value)
  35997. };
  35998. // node_modules/element-plus/es/components/rate/src/rate2.mjs
  35999. var _hoisted_153 = ["id", "aria-label", "aria-labelledby", "aria-valuenow", "aria-valuetext", "aria-valuemax"];
  36000. var _hoisted_233 = ["onMousemove", "onClick"];
  36001. var __default__68 = defineComponent({
  36002. name: "ElRate"
  36003. });
  36004. var _sfc_main105 = defineComponent({
  36005. ...__default__68,
  36006. props: rateProps,
  36007. emits: rateEmits,
  36008. setup(__props, { expose, emit }) {
  36009. const props = __props;
  36010. function getValueFromMap(value, map2) {
  36011. const isExcludedObject = (val) => isObject(val);
  36012. const matchedKeys = Object.keys(map2).map((key) => +key).filter((key) => {
  36013. const val = map2[key];
  36014. const excluded = isExcludedObject(val) ? val.excluded : false;
  36015. return excluded ? value < key : value <= key;
  36016. }).sort((a2, b2) => a2 - b2);
  36017. const matchedValue = map2[matchedKeys[0]];
  36018. return isExcludedObject(matchedValue) && matchedValue.value || matchedValue;
  36019. }
  36020. const formContext = inject(formContextKey, void 0);
  36021. const formItemContext = inject(formItemContextKey, void 0);
  36022. const rateSize = useSize();
  36023. const ns2 = useNamespace("rate");
  36024. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
  36025. formItemContext
  36026. });
  36027. const currentValue = ref(props.modelValue);
  36028. const hoverIndex = ref(-1);
  36029. const pointerAtLeftHalf = ref(true);
  36030. const rateClasses = computed2(() => [ns2.b(), ns2.m(rateSize.value)]);
  36031. const rateDisabled = computed2(() => props.disabled || (formContext == null ? void 0 : formContext.disabled));
  36032. const rateStyles = computed2(() => {
  36033. return ns2.cssVarBlock({
  36034. "void-color": props.voidColor,
  36035. "disabled-void-color": props.disabledVoidColor,
  36036. "fill-color": activeColor.value
  36037. });
  36038. });
  36039. const text = computed2(() => {
  36040. let result2 = "";
  36041. if (props.showScore) {
  36042. result2 = props.scoreTemplate.replace(/\{\s*value\s*\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`);
  36043. } else if (props.showText) {
  36044. result2 = props.texts[Math.ceil(currentValue.value) - 1];
  36045. }
  36046. return result2;
  36047. });
  36048. const valueDecimal = computed2(() => props.modelValue * 100 - Math.floor(props.modelValue) * 100);
  36049. const colorMap = computed2(() => isArray(props.colors) ? {
  36050. [props.lowThreshold]: props.colors[0],
  36051. [props.highThreshold]: { value: props.colors[1], excluded: true },
  36052. [props.max]: props.colors[2]
  36053. } : props.colors);
  36054. const activeColor = computed2(() => {
  36055. const color = getValueFromMap(currentValue.value, colorMap.value);
  36056. return isObject(color) ? "" : color;
  36057. });
  36058. const decimalStyle = computed2(() => {
  36059. let width = "";
  36060. if (rateDisabled.value) {
  36061. width = `${valueDecimal.value}%`;
  36062. } else if (props.allowHalf) {
  36063. width = "50%";
  36064. }
  36065. return {
  36066. color: activeColor.value,
  36067. width
  36068. };
  36069. });
  36070. const componentMap = computed2(() => {
  36071. let icons = isArray(props.icons) ? [...props.icons] : { ...props.icons };
  36072. icons = markRaw(icons);
  36073. return isArray(icons) ? {
  36074. [props.lowThreshold]: icons[0],
  36075. [props.highThreshold]: {
  36076. value: icons[1],
  36077. excluded: true
  36078. },
  36079. [props.max]: icons[2]
  36080. } : icons;
  36081. });
  36082. const decimalIconComponent = computed2(() => getValueFromMap(props.modelValue, componentMap.value));
  36083. const voidComponent = computed2(() => rateDisabled.value ? isString(props.disabledVoidIcon) ? props.disabledVoidIcon : markRaw(props.disabledVoidIcon) : isString(props.voidIcon) ? props.voidIcon : markRaw(props.voidIcon));
  36084. const activeComponent = computed2(() => getValueFromMap(currentValue.value, componentMap.value));
  36085. function showDecimalIcon(item) {
  36086. const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue;
  36087. const showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - 0.5 <= currentValue.value && item > currentValue.value;
  36088. return showWhenDisabled || showWhenAllowHalf;
  36089. }
  36090. function emitValue(value) {
  36091. if (props.clearable && value === props.modelValue) {
  36092. value = 0;
  36093. }
  36094. emit(UPDATE_MODEL_EVENT, value);
  36095. if (props.modelValue !== value) {
  36096. emit("change", value);
  36097. }
  36098. }
  36099. function selectValue(value) {
  36100. if (rateDisabled.value) {
  36101. return;
  36102. }
  36103. if (props.allowHalf && pointerAtLeftHalf.value) {
  36104. emitValue(currentValue.value);
  36105. } else {
  36106. emitValue(value);
  36107. }
  36108. }
  36109. function handleKey(e) {
  36110. if (rateDisabled.value) {
  36111. return;
  36112. }
  36113. let _currentValue = currentValue.value;
  36114. const code = e.code;
  36115. if (code === EVENT_CODE.up || code === EVENT_CODE.right) {
  36116. if (props.allowHalf) {
  36117. _currentValue += 0.5;
  36118. } else {
  36119. _currentValue += 1;
  36120. }
  36121. e.stopPropagation();
  36122. e.preventDefault();
  36123. } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {
  36124. if (props.allowHalf) {
  36125. _currentValue -= 0.5;
  36126. } else {
  36127. _currentValue -= 1;
  36128. }
  36129. e.stopPropagation();
  36130. e.preventDefault();
  36131. }
  36132. _currentValue = _currentValue < 0 ? 0 : _currentValue;
  36133. _currentValue = _currentValue > props.max ? props.max : _currentValue;
  36134. emit(UPDATE_MODEL_EVENT, _currentValue);
  36135. emit("change", _currentValue);
  36136. return _currentValue;
  36137. }
  36138. function setCurrentValue(value, event) {
  36139. if (rateDisabled.value) {
  36140. return;
  36141. }
  36142. if (props.allowHalf) {
  36143. let target2 = event.target;
  36144. if (hasClass(target2, ns2.e("item"))) {
  36145. target2 = target2.querySelector(`.${ns2.e("icon")}`);
  36146. }
  36147. if (target2.clientWidth === 0 || hasClass(target2, ns2.e("decimal"))) {
  36148. target2 = target2.parentNode;
  36149. }
  36150. pointerAtLeftHalf.value = event.offsetX * 2 <= target2.clientWidth;
  36151. currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value;
  36152. } else {
  36153. currentValue.value = value;
  36154. }
  36155. hoverIndex.value = value;
  36156. }
  36157. function resetCurrentValue() {
  36158. if (rateDisabled.value) {
  36159. return;
  36160. }
  36161. if (props.allowHalf) {
  36162. pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
  36163. }
  36164. currentValue.value = props.modelValue;
  36165. hoverIndex.value = -1;
  36166. }
  36167. watch(() => props.modelValue, (val) => {
  36168. currentValue.value = val;
  36169. pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
  36170. });
  36171. if (!props.modelValue) {
  36172. emit(UPDATE_MODEL_EVENT, 0);
  36173. }
  36174. expose({
  36175. setCurrentValue,
  36176. resetCurrentValue
  36177. });
  36178. return (_ctx, _cache) => {
  36179. var _a2;
  36180. return openBlock(), createElementBlock("div", {
  36181. id: unref(inputId),
  36182. class: normalizeClass([unref(rateClasses), unref(ns2).is("disabled", unref(rateDisabled))]),
  36183. role: "slider",
  36184. "aria-label": !unref(isLabeledByFormItem) ? _ctx.label || "rating" : void 0,
  36185. "aria-labelledby": unref(isLabeledByFormItem) ? (_a2 = unref(formItemContext)) == null ? void 0 : _a2.labelId : void 0,
  36186. "aria-valuenow": currentValue.value,
  36187. "aria-valuetext": unref(text) || void 0,
  36188. "aria-valuemin": "0",
  36189. "aria-valuemax": _ctx.max,
  36190. tabindex: "0",
  36191. style: normalizeStyle(unref(rateStyles)),
  36192. onKeydown: handleKey
  36193. }, [
  36194. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.max, (item, key) => {
  36195. return openBlock(), createElementBlock("span", {
  36196. key,
  36197. class: normalizeClass(unref(ns2).e("item")),
  36198. onMousemove: ($event) => setCurrentValue(item, $event),
  36199. onMouseleave: resetCurrentValue,
  36200. onClick: ($event) => selectValue(item)
  36201. }, [
  36202. createVNode(unref(ElIcon), {
  36203. class: normalizeClass([
  36204. unref(ns2).e("icon"),
  36205. { hover: hoverIndex.value === item },
  36206. unref(ns2).is("active", item <= currentValue.value)
  36207. ])
  36208. }, {
  36209. default: withCtx(() => [
  36210. !showDecimalIcon(item) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  36211. withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(activeComponent)), null, null, 512)), [
  36212. [vShow, item <= currentValue.value]
  36213. ]),
  36214. withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(voidComponent)), null, null, 512)), [
  36215. [vShow, !(item <= currentValue.value)]
  36216. ])
  36217. ], 64)) : createCommentVNode("v-if", true),
  36218. showDecimalIcon(item) ? (openBlock(), createBlock(unref(ElIcon), {
  36219. key: 1,
  36220. style: normalizeStyle(unref(decimalStyle)),
  36221. class: normalizeClass([unref(ns2).e("icon"), unref(ns2).e("decimal")])
  36222. }, {
  36223. default: withCtx(() => [
  36224. (openBlock(), createBlock(resolveDynamicComponent(unref(decimalIconComponent))))
  36225. ]),
  36226. _: 1
  36227. }, 8, ["style", "class"])) : createCommentVNode("v-if", true)
  36228. ]),
  36229. _: 2
  36230. }, 1032, ["class"])
  36231. ], 42, _hoisted_233);
  36232. }), 128)),
  36233. _ctx.showText || _ctx.showScore ? (openBlock(), createElementBlock("span", {
  36234. key: 0,
  36235. class: normalizeClass(unref(ns2).e("text"))
  36236. }, toDisplayString(unref(text)), 3)) : createCommentVNode("v-if", true)
  36237. ], 46, _hoisted_153);
  36238. };
  36239. }
  36240. });
  36241. var Rate = _export_sfc(_sfc_main105, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/rate/src/rate.vue"]]);
  36242. // node_modules/element-plus/es/components/rate/index.mjs
  36243. var ElRate = withInstall(Rate);
  36244. // node_modules/element-plus/es/components/result/src/result.mjs
  36245. var IconMap = {
  36246. success: "icon-success",
  36247. warning: "icon-warning",
  36248. error: "icon-error",
  36249. info: "icon-info"
  36250. };
  36251. var IconComponentMap = {
  36252. [IconMap.success]: circle_check_filled_default,
  36253. [IconMap.warning]: warning_filled_default,
  36254. [IconMap.error]: circle_close_filled_default,
  36255. [IconMap.info]: info_filled_default
  36256. };
  36257. var resultProps = buildProps({
  36258. title: {
  36259. type: String,
  36260. default: ""
  36261. },
  36262. subTitle: {
  36263. type: String,
  36264. default: ""
  36265. },
  36266. icon: {
  36267. type: String,
  36268. values: ["success", "warning", "info", "error"],
  36269. default: "info"
  36270. }
  36271. });
  36272. // node_modules/element-plus/es/components/result/src/result2.mjs
  36273. var __default__69 = defineComponent({
  36274. name: "ElResult"
  36275. });
  36276. var _sfc_main106 = defineComponent({
  36277. ...__default__69,
  36278. props: resultProps,
  36279. setup(__props) {
  36280. const props = __props;
  36281. const ns2 = useNamespace("result");
  36282. const resultIcon = computed2(() => {
  36283. const icon = props.icon;
  36284. const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
  36285. const iconComponent = IconComponentMap[iconClass] || IconComponentMap["icon-info"];
  36286. return {
  36287. class: iconClass,
  36288. component: iconComponent
  36289. };
  36290. });
  36291. return (_ctx, _cache) => {
  36292. return openBlock(), createElementBlock("div", {
  36293. class: normalizeClass(unref(ns2).b())
  36294. }, [
  36295. createBaseVNode("div", {
  36296. class: normalizeClass(unref(ns2).e("icon"))
  36297. }, [
  36298. renderSlot(_ctx.$slots, "icon", {}, () => [
  36299. unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
  36300. key: 0,
  36301. class: normalizeClass(unref(resultIcon).class)
  36302. }, null, 8, ["class"])) : createCommentVNode("v-if", true)
  36303. ])
  36304. ], 2),
  36305. _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
  36306. key: 0,
  36307. class: normalizeClass(unref(ns2).e("title"))
  36308. }, [
  36309. renderSlot(_ctx.$slots, "title", {}, () => [
  36310. createBaseVNode("p", null, toDisplayString(_ctx.title), 1)
  36311. ])
  36312. ], 2)) : createCommentVNode("v-if", true),
  36313. _ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
  36314. key: 1,
  36315. class: normalizeClass(unref(ns2).e("subtitle"))
  36316. }, [
  36317. renderSlot(_ctx.$slots, "sub-title", {}, () => [
  36318. createBaseVNode("p", null, toDisplayString(_ctx.subTitle), 1)
  36319. ])
  36320. ], 2)) : createCommentVNode("v-if", true),
  36321. _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
  36322. key: 2,
  36323. class: normalizeClass(unref(ns2).e("extra"))
  36324. }, [
  36325. renderSlot(_ctx.$slots, "extra")
  36326. ], 2)) : createCommentVNode("v-if", true)
  36327. ], 2);
  36328. };
  36329. }
  36330. });
  36331. var Result = _export_sfc(_sfc_main106, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/result/src/result.vue"]]);
  36332. // node_modules/element-plus/es/components/result/index.mjs
  36333. var ElResult = withInstall(Result);
  36334. // node_modules/element-plus/es/components/row/src/row.mjs
  36335. var RowJustify = [
  36336. "start",
  36337. "center",
  36338. "end",
  36339. "space-around",
  36340. "space-between",
  36341. "space-evenly"
  36342. ];
  36343. var RowAlign = ["top", "middle", "bottom"];
  36344. var rowProps = buildProps({
  36345. tag: {
  36346. type: String,
  36347. default: "div"
  36348. },
  36349. gutter: {
  36350. type: Number,
  36351. default: 0
  36352. },
  36353. justify: {
  36354. type: String,
  36355. values: RowJustify,
  36356. default: "start"
  36357. },
  36358. align: {
  36359. type: String,
  36360. values: RowAlign,
  36361. default: "top"
  36362. }
  36363. });
  36364. // node_modules/element-plus/es/components/row/src/row2.mjs
  36365. var __default__70 = defineComponent({
  36366. name: "ElRow"
  36367. });
  36368. var _sfc_main107 = defineComponent({
  36369. ...__default__70,
  36370. props: rowProps,
  36371. setup(__props) {
  36372. const props = __props;
  36373. const ns2 = useNamespace("row");
  36374. const gutter = computed2(() => props.gutter);
  36375. provide(rowContextKey, {
  36376. gutter
  36377. });
  36378. const style = computed2(() => {
  36379. const styles = {};
  36380. if (!props.gutter) {
  36381. return styles;
  36382. }
  36383. styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`;
  36384. return styles;
  36385. });
  36386. const rowKls = computed2(() => [
  36387. ns2.b(),
  36388. ns2.is(`justify-${props.justify}`, props.justify !== "start"),
  36389. ns2.is(`align-${props.align}`, props.align !== "top")
  36390. ]);
  36391. return (_ctx, _cache) => {
  36392. return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
  36393. class: normalizeClass(unref(rowKls)),
  36394. style: normalizeStyle(unref(style))
  36395. }, {
  36396. default: withCtx(() => [
  36397. renderSlot(_ctx.$slots, "default")
  36398. ]),
  36399. _: 3
  36400. }, 8, ["class", "style"]);
  36401. };
  36402. }
  36403. });
  36404. var Row = _export_sfc(_sfc_main107, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);
  36405. // node_modules/element-plus/es/components/row/index.mjs
  36406. var ElRow = withInstall(Row);
  36407. // node_modules/memoize-one/dist/memoize-one.esm.js
  36408. var safeIsNaN = Number.isNaN || function ponyfill(value) {
  36409. return typeof value === "number" && value !== value;
  36410. };
  36411. function isEqual2(first, second) {
  36412. if (first === second) {
  36413. return true;
  36414. }
  36415. if (safeIsNaN(first) && safeIsNaN(second)) {
  36416. return true;
  36417. }
  36418. return false;
  36419. }
  36420. function areInputsEqual(newInputs, lastInputs) {
  36421. if (newInputs.length !== lastInputs.length) {
  36422. return false;
  36423. }
  36424. for (var i = 0; i < newInputs.length; i++) {
  36425. if (!isEqual2(newInputs[i], lastInputs[i])) {
  36426. return false;
  36427. }
  36428. }
  36429. return true;
  36430. }
  36431. function memoizeOne(resultFn, isEqual3) {
  36432. if (isEqual3 === void 0) {
  36433. isEqual3 = areInputsEqual;
  36434. }
  36435. var cache2 = null;
  36436. function memoized() {
  36437. var newArgs = [];
  36438. for (var _i = 0; _i < arguments.length; _i++) {
  36439. newArgs[_i] = arguments[_i];
  36440. }
  36441. if (cache2 && cache2.lastThis === this && isEqual3(newArgs, cache2.lastArgs)) {
  36442. return cache2.lastResult;
  36443. }
  36444. var lastResult = resultFn.apply(this, newArgs);
  36445. cache2 = {
  36446. lastResult,
  36447. lastArgs: newArgs,
  36448. lastThis: this
  36449. };
  36450. return lastResult;
  36451. }
  36452. memoized.clear = function clear() {
  36453. cache2 = null;
  36454. };
  36455. return memoized;
  36456. }
  36457. // node_modules/element-plus/es/components/virtual-list/src/hooks/use-cache.mjs
  36458. var useCache = () => {
  36459. const vm = getCurrentInstance();
  36460. const props = vm.proxy.$props;
  36461. return computed2(() => {
  36462. const _getItemStyleCache = (_2, __, ___) => ({});
  36463. return props.perfMode ? memoize_default(_getItemStyleCache) : memoizeOne(_getItemStyleCache);
  36464. });
  36465. };
  36466. // node_modules/element-plus/es/components/virtual-list/src/defaults.mjs
  36467. var DEFAULT_DYNAMIC_LIST_ITEM_SIZE = 50;
  36468. var ITEM_RENDER_EVT = "itemRendered";
  36469. var SCROLL_EVT = "scroll";
  36470. var FORWARD = "forward";
  36471. var BACKWARD = "backward";
  36472. var AUTO_ALIGNMENT = "auto";
  36473. var SMART_ALIGNMENT = "smart";
  36474. var START_ALIGNMENT = "start";
  36475. var CENTERED_ALIGNMENT = "center";
  36476. var END_ALIGNMENT = "end";
  36477. var HORIZONTAL = "horizontal";
  36478. var VERTICAL = "vertical";
  36479. var LTR = "ltr";
  36480. var RTL = "rtl";
  36481. var RTL_OFFSET_NAG = "negative";
  36482. var RTL_OFFSET_POS_ASC = "positive-ascending";
  36483. var RTL_OFFSET_POS_DESC = "positive-descending";
  36484. var PageKey = {
  36485. [HORIZONTAL]: "pageX",
  36486. [VERTICAL]: "pageY"
  36487. };
  36488. var ScrollbarSizeKey = {
  36489. [HORIZONTAL]: "height",
  36490. [VERTICAL]: "width"
  36491. };
  36492. var ScrollbarDirKey = {
  36493. [HORIZONTAL]: "left",
  36494. [VERTICAL]: "top"
  36495. };
  36496. var SCROLLBAR_MIN_SIZE = 20;
  36497. // node_modules/element-plus/es/components/virtual-list/src/hooks/use-wheel.mjs
  36498. var LayoutKeys = {
  36499. [HORIZONTAL]: "deltaX",
  36500. [VERTICAL]: "deltaY"
  36501. };
  36502. var useWheel = ({ atEndEdge, atStartEdge, layout: layout2 }, onWheelDelta) => {
  36503. let frameHandle;
  36504. let offset2 = 0;
  36505. const hasReachedEdge = (offset22) => {
  36506. const edgeReached = offset22 < 0 && atStartEdge.value || offset22 > 0 && atEndEdge.value;
  36507. return edgeReached;
  36508. };
  36509. const onWheel = (e) => {
  36510. cAF(frameHandle);
  36511. const newOffset = e[LayoutKeys[layout2.value]];
  36512. if (hasReachedEdge(offset2) && hasReachedEdge(offset2 + newOffset))
  36513. return;
  36514. offset2 += newOffset;
  36515. if (!isFirefox()) {
  36516. e.preventDefault();
  36517. }
  36518. frameHandle = rAF(() => {
  36519. onWheelDelta(offset2);
  36520. offset2 = 0;
  36521. });
  36522. };
  36523. return {
  36524. hasReachedEdge,
  36525. onWheel
  36526. };
  36527. };
  36528. // node_modules/element-plus/es/components/virtual-list/src/props.mjs
  36529. var itemSize = buildProp({
  36530. type: definePropType([Number, Function]),
  36531. required: true
  36532. });
  36533. var estimatedItemSize = buildProp({
  36534. type: Number
  36535. });
  36536. var cache = buildProp({
  36537. type: Number,
  36538. default: 2
  36539. });
  36540. var direction = buildProp({
  36541. type: String,
  36542. values: ["ltr", "rtl"],
  36543. default: "ltr"
  36544. });
  36545. var initScrollOffset = buildProp({
  36546. type: Number,
  36547. default: 0
  36548. });
  36549. var total = buildProp({
  36550. type: Number,
  36551. required: true
  36552. });
  36553. var layout = buildProp({
  36554. type: String,
  36555. values: ["horizontal", "vertical"],
  36556. default: VERTICAL
  36557. });
  36558. var virtualizedProps = buildProps({
  36559. className: {
  36560. type: String,
  36561. default: ""
  36562. },
  36563. containerElement: {
  36564. type: definePropType([String, Object]),
  36565. default: "div"
  36566. },
  36567. data: {
  36568. type: definePropType(Array),
  36569. default: () => mutable([])
  36570. },
  36571. direction,
  36572. height: {
  36573. type: [String, Number],
  36574. required: true
  36575. },
  36576. innerElement: {
  36577. type: [String, Object],
  36578. default: "div"
  36579. },
  36580. style: {
  36581. type: definePropType([Object, String, Array])
  36582. },
  36583. useIsScrolling: {
  36584. type: Boolean,
  36585. default: false
  36586. },
  36587. width: {
  36588. type: [Number, String],
  36589. required: false
  36590. },
  36591. perfMode: {
  36592. type: Boolean,
  36593. default: true
  36594. },
  36595. scrollbarAlwaysOn: {
  36596. type: Boolean,
  36597. default: false
  36598. }
  36599. });
  36600. var virtualizedListProps = buildProps({
  36601. cache,
  36602. estimatedItemSize,
  36603. layout,
  36604. initScrollOffset,
  36605. total,
  36606. itemSize,
  36607. ...virtualizedProps
  36608. });
  36609. var scrollbarSize = {
  36610. type: Number,
  36611. default: 6
  36612. };
  36613. var startGap = { type: Number, default: 0 };
  36614. var endGap = { type: Number, default: 2 };
  36615. var virtualizedGridProps = buildProps({
  36616. columnCache: cache,
  36617. columnWidth: itemSize,
  36618. estimatedColumnWidth: estimatedItemSize,
  36619. estimatedRowHeight: estimatedItemSize,
  36620. initScrollLeft: initScrollOffset,
  36621. initScrollTop: initScrollOffset,
  36622. itemKey: {
  36623. type: definePropType(Function),
  36624. default: ({
  36625. columnIndex,
  36626. rowIndex
  36627. }) => `${rowIndex}:${columnIndex}`
  36628. },
  36629. rowCache: cache,
  36630. rowHeight: itemSize,
  36631. totalColumn: total,
  36632. totalRow: total,
  36633. hScrollbarSize: scrollbarSize,
  36634. vScrollbarSize: scrollbarSize,
  36635. scrollbarStartGap: startGap,
  36636. scrollbarEndGap: endGap,
  36637. ...virtualizedProps
  36638. });
  36639. var virtualizedScrollbarProps = buildProps({
  36640. alwaysOn: Boolean,
  36641. class: String,
  36642. layout,
  36643. total,
  36644. ratio: {
  36645. type: Number,
  36646. required: true
  36647. },
  36648. clientSize: {
  36649. type: Number,
  36650. required: true
  36651. },
  36652. scrollFrom: {
  36653. type: Number,
  36654. required: true
  36655. },
  36656. scrollbarSize,
  36657. startGap,
  36658. endGap,
  36659. visible: Boolean
  36660. });
  36661. // node_modules/element-plus/es/components/virtual-list/src/utils.mjs
  36662. var getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;
  36663. var isHorizontal = (dir) => dir === LTR || dir === RTL || dir === HORIZONTAL;
  36664. var isRTL = (dir) => dir === RTL;
  36665. var cachedRTLResult = null;
  36666. function getRTLOffsetType(recalculate = false) {
  36667. if (cachedRTLResult === null || recalculate) {
  36668. const outerDiv = document.createElement("div");
  36669. const outerStyle = outerDiv.style;
  36670. outerStyle.width = "50px";
  36671. outerStyle.height = "50px";
  36672. outerStyle.overflow = "scroll";
  36673. outerStyle.direction = "rtl";
  36674. const innerDiv = document.createElement("div");
  36675. const innerStyle = innerDiv.style;
  36676. innerStyle.width = "100px";
  36677. innerStyle.height = "100px";
  36678. outerDiv.appendChild(innerDiv);
  36679. document.body.appendChild(outerDiv);
  36680. if (outerDiv.scrollLeft > 0) {
  36681. cachedRTLResult = RTL_OFFSET_POS_DESC;
  36682. } else {
  36683. outerDiv.scrollLeft = 1;
  36684. if (outerDiv.scrollLeft === 0) {
  36685. cachedRTLResult = RTL_OFFSET_NAG;
  36686. } else {
  36687. cachedRTLResult = RTL_OFFSET_POS_ASC;
  36688. }
  36689. }
  36690. document.body.removeChild(outerDiv);
  36691. return cachedRTLResult;
  36692. }
  36693. return cachedRTLResult;
  36694. }
  36695. function renderThumbStyle2({ move, size: size3, bar }, layout2) {
  36696. const style = {};
  36697. const translate2 = `translate${bar.axis}(${move}px)`;
  36698. style[bar.size] = size3;
  36699. style.transform = translate2;
  36700. style.msTransform = translate2;
  36701. style.webkitTransform = translate2;
  36702. if (layout2 === "horizontal") {
  36703. style.height = "100%";
  36704. } else {
  36705. style.width = "100%";
  36706. }
  36707. return style;
  36708. }
  36709. // node_modules/element-plus/es/components/virtual-list/src/components/scrollbar.mjs
  36710. var ScrollBar = defineComponent({
  36711. name: "ElVirtualScrollBar",
  36712. props: virtualizedScrollbarProps,
  36713. emits: ["scroll", "start-move", "stop-move"],
  36714. setup(props, { emit }) {
  36715. const GAP2 = computed2(() => props.startGap + props.endGap);
  36716. const nsVirtualScrollbar = useNamespace("virtual-scrollbar");
  36717. const nsScrollbar = useNamespace("scrollbar");
  36718. const trackRef = ref();
  36719. const thumbRef = ref();
  36720. let frameHandle = null;
  36721. let onselectstartStore = null;
  36722. const state = reactive({
  36723. isDragging: false,
  36724. traveled: 0
  36725. });
  36726. const bar = computed2(() => BAR_MAP[props.layout]);
  36727. const trackSize = computed2(() => props.clientSize - unref(GAP2));
  36728. const trackStyle = computed2(() => ({
  36729. position: "absolute",
  36730. width: `${HORIZONTAL === props.layout ? trackSize.value : props.scrollbarSize}px`,
  36731. height: `${HORIZONTAL === props.layout ? props.scrollbarSize : trackSize.value}px`,
  36732. [ScrollbarDirKey[props.layout]]: "2px",
  36733. right: "2px",
  36734. bottom: "2px",
  36735. borderRadius: "4px"
  36736. }));
  36737. const thumbSize = computed2(() => {
  36738. const ratio = props.ratio;
  36739. const clientSize = props.clientSize;
  36740. if (ratio >= 100) {
  36741. return Number.POSITIVE_INFINITY;
  36742. }
  36743. if (ratio >= 50) {
  36744. return ratio * clientSize / 100;
  36745. }
  36746. const SCROLLBAR_MAX_SIZE = clientSize / 3;
  36747. return Math.floor(Math.min(Math.max(ratio * clientSize, SCROLLBAR_MIN_SIZE), SCROLLBAR_MAX_SIZE));
  36748. });
  36749. const thumbStyle = computed2(() => {
  36750. if (!Number.isFinite(thumbSize.value)) {
  36751. return {
  36752. display: "none"
  36753. };
  36754. }
  36755. const thumb = `${thumbSize.value}px`;
  36756. const style = renderThumbStyle2({
  36757. bar: bar.value,
  36758. size: thumb,
  36759. move: state.traveled
  36760. }, props.layout);
  36761. return style;
  36762. });
  36763. const totalSteps = computed2(() => Math.floor(props.clientSize - thumbSize.value - unref(GAP2)));
  36764. const attachEvents2 = () => {
  36765. window.addEventListener("mousemove", onMouseMove);
  36766. window.addEventListener("mouseup", onMouseUp);
  36767. const thumbEl = unref(thumbRef);
  36768. if (!thumbEl)
  36769. return;
  36770. onselectstartStore = document.onselectstart;
  36771. document.onselectstart = () => false;
  36772. thumbEl.addEventListener("touchmove", onMouseMove);
  36773. thumbEl.addEventListener("touchend", onMouseUp);
  36774. };
  36775. const detachEvents = () => {
  36776. window.removeEventListener("mousemove", onMouseMove);
  36777. window.removeEventListener("mouseup", onMouseUp);
  36778. document.onselectstart = onselectstartStore;
  36779. onselectstartStore = null;
  36780. const thumbEl = unref(thumbRef);
  36781. if (!thumbEl)
  36782. return;
  36783. thumbEl.removeEventListener("touchmove", onMouseMove);
  36784. thumbEl.removeEventListener("touchend", onMouseUp);
  36785. };
  36786. const onThumbMouseDown = (e) => {
  36787. e.stopImmediatePropagation();
  36788. if (e.ctrlKey || [1, 2].includes(e.button)) {
  36789. return;
  36790. }
  36791. state.isDragging = true;
  36792. state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
  36793. emit("start-move");
  36794. attachEvents2();
  36795. };
  36796. const onMouseUp = () => {
  36797. state.isDragging = false;
  36798. state[bar.value.axis] = 0;
  36799. emit("stop-move");
  36800. detachEvents();
  36801. };
  36802. const onMouseMove = (e) => {
  36803. const { isDragging: isDragging2 } = state;
  36804. if (!isDragging2)
  36805. return;
  36806. if (!thumbRef.value || !trackRef.value)
  36807. return;
  36808. const prevPage = state[bar.value.axis];
  36809. if (!prevPage)
  36810. return;
  36811. cAF(frameHandle);
  36812. const offset2 = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
  36813. const thumbClickPosition = thumbRef.value[bar.value.offset] - prevPage;
  36814. const distance = offset2 - thumbClickPosition;
  36815. frameHandle = rAF(() => {
  36816. state.traveled = Math.max(props.startGap, Math.min(distance, totalSteps.value));
  36817. emit("scroll", distance, totalSteps.value);
  36818. });
  36819. };
  36820. const clickTrackHandler = (e) => {
  36821. const offset2 = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);
  36822. const thumbHalf = thumbRef.value[bar.value.offset] / 2;
  36823. const distance = offset2 - thumbHalf;
  36824. state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
  36825. emit("scroll", distance, totalSteps.value);
  36826. };
  36827. watch(() => props.scrollFrom, (v2) => {
  36828. if (state.isDragging)
  36829. return;
  36830. state.traveled = Math.ceil(v2 * totalSteps.value);
  36831. });
  36832. onBeforeUnmount(() => {
  36833. detachEvents();
  36834. });
  36835. return () => {
  36836. return h("div", {
  36837. role: "presentation",
  36838. ref: trackRef,
  36839. class: [
  36840. nsVirtualScrollbar.b(),
  36841. props.class,
  36842. (props.alwaysOn || state.isDragging) && "always-on"
  36843. ],
  36844. style: trackStyle.value,
  36845. onMousedown: withModifiers(clickTrackHandler, ["stop", "prevent"]),
  36846. onTouchstartPrevent: onThumbMouseDown
  36847. }, h("div", {
  36848. ref: thumbRef,
  36849. class: nsScrollbar.e("thumb"),
  36850. style: thumbStyle.value,
  36851. onMousedown: onThumbMouseDown
  36852. }, []));
  36853. };
  36854. }
  36855. });
  36856. // node_modules/element-plus/es/components/virtual-list/src/builders/build-list.mjs
  36857. var createList = ({
  36858. name,
  36859. getOffset: getOffset3,
  36860. getItemSize,
  36861. getItemOffset,
  36862. getEstimatedTotalSize: getEstimatedTotalSize2,
  36863. getStartIndexForOffset,
  36864. getStopIndexForStartIndex,
  36865. initCache,
  36866. clearCache,
  36867. validateProps
  36868. }) => {
  36869. return defineComponent({
  36870. name: name != null ? name : "ElVirtualList",
  36871. props: virtualizedListProps,
  36872. emits: [ITEM_RENDER_EVT, SCROLL_EVT],
  36873. setup(props, { emit, expose }) {
  36874. validateProps(props);
  36875. const instance = getCurrentInstance();
  36876. const ns2 = useNamespace("vl");
  36877. const dynamicSizeCache = ref(initCache(props, instance));
  36878. const getItemStyleCache = useCache();
  36879. const windowRef = ref();
  36880. const innerRef = ref();
  36881. const scrollbarRef = ref();
  36882. const states = ref({
  36883. isScrolling: false,
  36884. scrollDir: "forward",
  36885. scrollOffset: isNumber2(props.initScrollOffset) ? props.initScrollOffset : 0,
  36886. updateRequested: false,
  36887. isScrollbarDragging: false,
  36888. scrollbarAlwaysOn: props.scrollbarAlwaysOn
  36889. });
  36890. const itemsToRender = computed2(() => {
  36891. const { total: total2, cache: cache2 } = props;
  36892. const { isScrolling, scrollDir, scrollOffset } = unref(states);
  36893. if (total2 === 0) {
  36894. return [0, 0, 0, 0];
  36895. }
  36896. const startIndex = getStartIndexForOffset(props, scrollOffset, unref(dynamicSizeCache));
  36897. const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, unref(dynamicSizeCache));
  36898. const cacheBackward = !isScrolling || scrollDir === BACKWARD ? Math.max(1, cache2) : 1;
  36899. const cacheForward = !isScrolling || scrollDir === FORWARD ? Math.max(1, cache2) : 1;
  36900. return [
  36901. Math.max(0, startIndex - cacheBackward),
  36902. Math.max(0, Math.min(total2 - 1, stopIndex + cacheForward)),
  36903. startIndex,
  36904. stopIndex
  36905. ];
  36906. });
  36907. const estimatedTotalSize = computed2(() => getEstimatedTotalSize2(props, unref(dynamicSizeCache)));
  36908. const _isHorizontal = computed2(() => isHorizontal(props.layout));
  36909. const windowStyle = computed2(() => [
  36910. {
  36911. position: "relative",
  36912. [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll",
  36913. WebkitOverflowScrolling: "touch",
  36914. willChange: "transform"
  36915. },
  36916. {
  36917. direction: props.direction,
  36918. height: isNumber2(props.height) ? `${props.height}px` : props.height,
  36919. width: isNumber2(props.width) ? `${props.width}px` : props.width
  36920. },
  36921. props.style
  36922. ]);
  36923. const innerStyle = computed2(() => {
  36924. const size3 = unref(estimatedTotalSize);
  36925. const horizontal = unref(_isHorizontal);
  36926. return {
  36927. height: horizontal ? "100%" : `${size3}px`,
  36928. pointerEvents: unref(states).isScrolling ? "none" : void 0,
  36929. width: horizontal ? `${size3}px` : "100%"
  36930. };
  36931. });
  36932. const clientSize = computed2(() => _isHorizontal.value ? props.width : props.height);
  36933. const { onWheel } = useWheel({
  36934. atStartEdge: computed2(() => states.value.scrollOffset <= 0),
  36935. atEndEdge: computed2(() => states.value.scrollOffset >= estimatedTotalSize.value),
  36936. layout: computed2(() => props.layout)
  36937. }, (offset2) => {
  36938. var _a2, _b;
  36939. ;
  36940. (_b = (_a2 = scrollbarRef.value).onMouseUp) == null ? void 0 : _b.call(_a2);
  36941. scrollTo(Math.min(states.value.scrollOffset + offset2, estimatedTotalSize.value - clientSize.value));
  36942. });
  36943. const emitEvents = () => {
  36944. const { total: total2 } = props;
  36945. if (total2 > 0) {
  36946. const [cacheStart, cacheEnd, visibleStart, visibleEnd] = unref(itemsToRender);
  36947. emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);
  36948. }
  36949. const { scrollDir, scrollOffset, updateRequested } = unref(states);
  36950. emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);
  36951. };
  36952. const scrollVertically = (e) => {
  36953. const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;
  36954. const _states = unref(states);
  36955. if (_states.scrollOffset === scrollTop) {
  36956. return;
  36957. }
  36958. const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
  36959. states.value = {
  36960. ..._states,
  36961. isScrolling: true,
  36962. scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
  36963. scrollOffset,
  36964. updateRequested: false
  36965. };
  36966. nextTick(resetIsScrolling);
  36967. };
  36968. const scrollHorizontally = (e) => {
  36969. const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;
  36970. const _states = unref(states);
  36971. if (_states.scrollOffset === scrollLeft) {
  36972. return;
  36973. }
  36974. const { direction: direction2 } = props;
  36975. let scrollOffset = scrollLeft;
  36976. if (direction2 === RTL) {
  36977. switch (getRTLOffsetType()) {
  36978. case RTL_OFFSET_NAG: {
  36979. scrollOffset = -scrollLeft;
  36980. break;
  36981. }
  36982. case RTL_OFFSET_POS_DESC: {
  36983. scrollOffset = scrollWidth - clientWidth - scrollLeft;
  36984. break;
  36985. }
  36986. }
  36987. }
  36988. scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
  36989. states.value = {
  36990. ..._states,
  36991. isScrolling: true,
  36992. scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
  36993. scrollOffset,
  36994. updateRequested: false
  36995. };
  36996. nextTick(resetIsScrolling);
  36997. };
  36998. const onScroll = (e) => {
  36999. unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);
  37000. emitEvents();
  37001. };
  37002. const onScrollbarScroll = (distanceToGo, totalSteps) => {
  37003. const offset2 = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo;
  37004. scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset2));
  37005. };
  37006. const scrollTo = (offset2) => {
  37007. offset2 = Math.max(offset2, 0);
  37008. if (offset2 === unref(states).scrollOffset) {
  37009. return;
  37010. }
  37011. states.value = {
  37012. ...unref(states),
  37013. scrollOffset: offset2,
  37014. scrollDir: getScrollDir(unref(states).scrollOffset, offset2),
  37015. updateRequested: true
  37016. };
  37017. nextTick(resetIsScrolling);
  37018. };
  37019. const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {
  37020. const { scrollOffset } = unref(states);
  37021. idx = Math.max(0, Math.min(idx, props.total - 1));
  37022. scrollTo(getOffset3(props, idx, alignment, scrollOffset, unref(dynamicSizeCache)));
  37023. };
  37024. const getItemStyle = (idx) => {
  37025. const { direction: direction2, itemSize: itemSize3, layout: layout2 } = props;
  37026. const itemStyleCache = getItemStyleCache.value(clearCache && itemSize3, clearCache && layout2, clearCache && direction2);
  37027. let style;
  37028. if (hasOwn(itemStyleCache, String(idx))) {
  37029. style = itemStyleCache[idx];
  37030. } else {
  37031. const offset2 = getItemOffset(props, idx, unref(dynamicSizeCache));
  37032. const size3 = getItemSize(props, idx, unref(dynamicSizeCache));
  37033. const horizontal = unref(_isHorizontal);
  37034. const isRtl = direction2 === RTL;
  37035. const offsetHorizontal = horizontal ? offset2 : 0;
  37036. itemStyleCache[idx] = style = {
  37037. position: "absolute",
  37038. left: isRtl ? void 0 : `${offsetHorizontal}px`,
  37039. right: isRtl ? `${offsetHorizontal}px` : void 0,
  37040. top: !horizontal ? `${offset2}px` : 0,
  37041. height: !horizontal ? `${size3}px` : "100%",
  37042. width: horizontal ? `${size3}px` : "100%"
  37043. };
  37044. }
  37045. return style;
  37046. };
  37047. const resetIsScrolling = () => {
  37048. states.value.isScrolling = false;
  37049. nextTick(() => {
  37050. getItemStyleCache.value(-1, null, null);
  37051. });
  37052. };
  37053. const resetScrollTop = () => {
  37054. const window2 = windowRef.value;
  37055. if (window2) {
  37056. window2.scrollTop = 0;
  37057. }
  37058. };
  37059. onMounted(() => {
  37060. if (!isClient)
  37061. return;
  37062. const { initScrollOffset: initScrollOffset2 } = props;
  37063. const windowElement = unref(windowRef);
  37064. if (isNumber2(initScrollOffset2) && windowElement) {
  37065. if (unref(_isHorizontal)) {
  37066. windowElement.scrollLeft = initScrollOffset2;
  37067. } else {
  37068. windowElement.scrollTop = initScrollOffset2;
  37069. }
  37070. }
  37071. emitEvents();
  37072. });
  37073. onUpdated(() => {
  37074. const { direction: direction2, layout: layout2 } = props;
  37075. const { scrollOffset, updateRequested } = unref(states);
  37076. const windowElement = unref(windowRef);
  37077. if (updateRequested && windowElement) {
  37078. if (layout2 === HORIZONTAL) {
  37079. if (direction2 === RTL) {
  37080. switch (getRTLOffsetType()) {
  37081. case RTL_OFFSET_NAG: {
  37082. windowElement.scrollLeft = -scrollOffset;
  37083. break;
  37084. }
  37085. case RTL_OFFSET_POS_ASC: {
  37086. windowElement.scrollLeft = scrollOffset;
  37087. break;
  37088. }
  37089. default: {
  37090. const { clientWidth, scrollWidth } = windowElement;
  37091. windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;
  37092. break;
  37093. }
  37094. }
  37095. } else {
  37096. windowElement.scrollLeft = scrollOffset;
  37097. }
  37098. } else {
  37099. windowElement.scrollTop = scrollOffset;
  37100. }
  37101. }
  37102. });
  37103. const api = {
  37104. ns: ns2,
  37105. clientSize,
  37106. estimatedTotalSize,
  37107. windowStyle,
  37108. windowRef,
  37109. innerRef,
  37110. innerStyle,
  37111. itemsToRender,
  37112. scrollbarRef,
  37113. states,
  37114. getItemStyle,
  37115. onScroll,
  37116. onScrollbarScroll,
  37117. onWheel,
  37118. scrollTo,
  37119. scrollToItem,
  37120. resetScrollTop
  37121. };
  37122. expose({
  37123. windowRef,
  37124. innerRef,
  37125. getItemStyleCache,
  37126. scrollTo,
  37127. scrollToItem,
  37128. resetScrollTop,
  37129. states
  37130. });
  37131. return api;
  37132. },
  37133. render(ctx) {
  37134. var _a2;
  37135. const {
  37136. $slots,
  37137. className,
  37138. clientSize,
  37139. containerElement,
  37140. data,
  37141. getItemStyle,
  37142. innerElement,
  37143. itemsToRender,
  37144. innerStyle,
  37145. layout: layout2,
  37146. total: total2,
  37147. onScroll,
  37148. onScrollbarScroll,
  37149. onWheel,
  37150. states,
  37151. useIsScrolling,
  37152. windowStyle,
  37153. ns: ns2
  37154. } = ctx;
  37155. const [start, end2] = itemsToRender;
  37156. const Container2 = resolveDynamicComponent(containerElement);
  37157. const Inner = resolveDynamicComponent(innerElement);
  37158. const children = [];
  37159. if (total2 > 0) {
  37160. for (let i = start; i <= end2; i++) {
  37161. children.push((_a2 = $slots.default) == null ? void 0 : _a2.call($slots, {
  37162. data,
  37163. key: i,
  37164. index: i,
  37165. isScrolling: useIsScrolling ? states.isScrolling : void 0,
  37166. style: getItemStyle(i)
  37167. }));
  37168. }
  37169. }
  37170. const InnerNode = [
  37171. h(Inner, {
  37172. style: innerStyle,
  37173. ref: "innerRef"
  37174. }, !isString(Inner) ? {
  37175. default: () => children
  37176. } : children)
  37177. ];
  37178. const scrollbar = h(ScrollBar, {
  37179. ref: "scrollbarRef",
  37180. clientSize,
  37181. layout: layout2,
  37182. onScroll: onScrollbarScroll,
  37183. ratio: clientSize * 100 / this.estimatedTotalSize,
  37184. scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),
  37185. total: total2
  37186. });
  37187. const listContainer = h(Container2, {
  37188. class: [ns2.e("window"), className],
  37189. style: windowStyle,
  37190. onScroll,
  37191. onWheel,
  37192. ref: "windowRef",
  37193. key: 0
  37194. }, !isString(Container2) ? { default: () => [InnerNode] } : [InnerNode]);
  37195. return h("div", {
  37196. key: 0,
  37197. class: [ns2.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""]
  37198. }, [listContainer, scrollbar]);
  37199. }
  37200. });
  37201. };
  37202. // node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-list.mjs
  37203. var FixedSizeList = createList({
  37204. name: "ElFixedSizeList",
  37205. getItemOffset: ({ itemSize: itemSize3 }, index) => index * itemSize3,
  37206. getItemSize: ({ itemSize: itemSize3 }) => itemSize3,
  37207. getEstimatedTotalSize: ({ total: total2, itemSize: itemSize3 }) => itemSize3 * total2,
  37208. getOffset: ({ height, total: total2, itemSize: itemSize3, layout: layout2, width }, index, alignment, scrollOffset) => {
  37209. const size3 = isHorizontal(layout2) ? width : height;
  37210. if (isString(size3)) {
  37211. throwError("[ElVirtualList]", `
  37212. You should set
  37213. width/height
  37214. to number when your layout is
  37215. horizontal/vertical
  37216. `);
  37217. }
  37218. const lastItemOffset = Math.max(0, total2 * itemSize3 - size3);
  37219. const maxOffset = Math.min(lastItemOffset, index * itemSize3);
  37220. const minOffset = Math.max(0, (index + 1) * itemSize3 - size3);
  37221. if (alignment === SMART_ALIGNMENT) {
  37222. if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) {
  37223. alignment = AUTO_ALIGNMENT;
  37224. } else {
  37225. alignment = CENTERED_ALIGNMENT;
  37226. }
  37227. }
  37228. switch (alignment) {
  37229. case START_ALIGNMENT: {
  37230. return maxOffset;
  37231. }
  37232. case END_ALIGNMENT: {
  37233. return minOffset;
  37234. }
  37235. case CENTERED_ALIGNMENT: {
  37236. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  37237. if (middleOffset < Math.ceil(size3 / 2)) {
  37238. return 0;
  37239. } else if (middleOffset > lastItemOffset + Math.floor(size3 / 2)) {
  37240. return lastItemOffset;
  37241. } else {
  37242. return middleOffset;
  37243. }
  37244. }
  37245. case AUTO_ALIGNMENT:
  37246. default: {
  37247. if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
  37248. return scrollOffset;
  37249. } else if (scrollOffset < minOffset) {
  37250. return minOffset;
  37251. } else {
  37252. return maxOffset;
  37253. }
  37254. }
  37255. }
  37256. },
  37257. getStartIndexForOffset: ({ total: total2, itemSize: itemSize3 }, offset2) => Math.max(0, Math.min(total2 - 1, Math.floor(offset2 / itemSize3))),
  37258. getStopIndexForStartIndex: ({ height, total: total2, itemSize: itemSize3, layout: layout2, width }, startIndex, scrollOffset) => {
  37259. const offset2 = startIndex * itemSize3;
  37260. const size3 = isHorizontal(layout2) ? width : height;
  37261. const numVisibleItems = Math.ceil((size3 + scrollOffset - offset2) / itemSize3);
  37262. return Math.max(0, Math.min(total2 - 1, startIndex + numVisibleItems - 1));
  37263. },
  37264. initCache() {
  37265. return void 0;
  37266. },
  37267. clearCache: true,
  37268. validateProps() {
  37269. }
  37270. });
  37271. // node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-list.mjs
  37272. var SCOPE4 = "ElDynamicSizeList";
  37273. var getItemFromCache = (props, index, listCache) => {
  37274. const { itemSize: itemSize3 } = props;
  37275. const { items, lastVisitedIndex } = listCache;
  37276. if (index > lastVisitedIndex) {
  37277. let offset2 = 0;
  37278. if (lastVisitedIndex >= 0) {
  37279. const item = items[lastVisitedIndex];
  37280. offset2 = item.offset + item.size;
  37281. }
  37282. for (let i = lastVisitedIndex + 1; i <= index; i++) {
  37283. const size3 = itemSize3(i);
  37284. items[i] = {
  37285. offset: offset2,
  37286. size: size3
  37287. };
  37288. offset2 += size3;
  37289. }
  37290. listCache.lastVisitedIndex = index;
  37291. }
  37292. return items[index];
  37293. };
  37294. var findItem = (props, listCache, offset2) => {
  37295. const { items, lastVisitedIndex } = listCache;
  37296. const lastVisitedOffset = lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0;
  37297. if (lastVisitedOffset >= offset2) {
  37298. return bs(props, listCache, 0, lastVisitedIndex, offset2);
  37299. }
  37300. return es(props, listCache, Math.max(0, lastVisitedIndex), offset2);
  37301. };
  37302. var bs = (props, listCache, low, high, offset2) => {
  37303. while (low <= high) {
  37304. const mid = low + Math.floor((high - low) / 2);
  37305. const currentOffset = getItemFromCache(props, mid, listCache).offset;
  37306. if (currentOffset === offset2) {
  37307. return mid;
  37308. } else if (currentOffset < offset2) {
  37309. low = mid + 1;
  37310. } else if (currentOffset > offset2) {
  37311. high = mid - 1;
  37312. }
  37313. }
  37314. return Math.max(0, low - 1);
  37315. };
  37316. var es = (props, listCache, index, offset2) => {
  37317. const { total: total2 } = props;
  37318. let exponent = 1;
  37319. while (index < total2 && getItemFromCache(props, index, listCache).offset < offset2) {
  37320. index += exponent;
  37321. exponent *= 2;
  37322. }
  37323. return bs(props, listCache, Math.floor(index / 2), Math.min(index, total2 - 1), offset2);
  37324. };
  37325. var getEstimatedTotalSize = ({ total: total2 }, { items, estimatedItemSize: estimatedItemSize2, lastVisitedIndex }) => {
  37326. let totalSizeOfMeasuredItems = 0;
  37327. if (lastVisitedIndex >= total2) {
  37328. lastVisitedIndex = total2 - 1;
  37329. }
  37330. if (lastVisitedIndex >= 0) {
  37331. const item = items[lastVisitedIndex];
  37332. totalSizeOfMeasuredItems = item.offset + item.size;
  37333. }
  37334. const numUnmeasuredItems = total2 - lastVisitedIndex - 1;
  37335. const totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize2;
  37336. return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
  37337. };
  37338. var DynamicSizeList = createList({
  37339. name: "ElDynamicSizeList",
  37340. getItemOffset: (props, index, listCache) => getItemFromCache(props, index, listCache).offset,
  37341. getItemSize: (_2, index, { items }) => items[index].size,
  37342. getEstimatedTotalSize,
  37343. getOffset: (props, index, alignment, scrollOffset, listCache) => {
  37344. const { height, layout: layout2, width } = props;
  37345. const size3 = isHorizontal(layout2) ? width : height;
  37346. const item = getItemFromCache(props, index, listCache);
  37347. const estimatedTotalSize = getEstimatedTotalSize(props, listCache);
  37348. const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size3, item.offset));
  37349. const minOffset = Math.max(0, item.offset - size3 + item.size);
  37350. if (alignment === SMART_ALIGNMENT) {
  37351. if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) {
  37352. alignment = AUTO_ALIGNMENT;
  37353. } else {
  37354. alignment = CENTERED_ALIGNMENT;
  37355. }
  37356. }
  37357. switch (alignment) {
  37358. case START_ALIGNMENT: {
  37359. return maxOffset;
  37360. }
  37361. case END_ALIGNMENT: {
  37362. return minOffset;
  37363. }
  37364. case CENTERED_ALIGNMENT: {
  37365. return Math.round(minOffset + (maxOffset - minOffset) / 2);
  37366. }
  37367. case AUTO_ALIGNMENT:
  37368. default: {
  37369. if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
  37370. return scrollOffset;
  37371. } else if (scrollOffset < minOffset) {
  37372. return minOffset;
  37373. } else {
  37374. return maxOffset;
  37375. }
  37376. }
  37377. }
  37378. },
  37379. getStartIndexForOffset: (props, offset2, listCache) => findItem(props, listCache, offset2),
  37380. getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {
  37381. const { height, total: total2, layout: layout2, width } = props;
  37382. const size3 = isHorizontal(layout2) ? width : height;
  37383. const item = getItemFromCache(props, startIndex, listCache);
  37384. const maxOffset = scrollOffset + size3;
  37385. let offset2 = item.offset + item.size;
  37386. let stopIndex = startIndex;
  37387. while (stopIndex < total2 - 1 && offset2 < maxOffset) {
  37388. stopIndex++;
  37389. offset2 += getItemFromCache(props, stopIndex, listCache).size;
  37390. }
  37391. return stopIndex;
  37392. },
  37393. initCache({ estimatedItemSize: estimatedItemSize2 = DEFAULT_DYNAMIC_LIST_ITEM_SIZE }, instance) {
  37394. const cache2 = {
  37395. items: {},
  37396. estimatedItemSize: estimatedItemSize2,
  37397. lastVisitedIndex: -1
  37398. };
  37399. cache2.clearCacheAfterIndex = (index, forceUpdate = true) => {
  37400. var _a2, _b;
  37401. cache2.lastVisitedIndex = Math.min(cache2.lastVisitedIndex, index - 1);
  37402. (_a2 = instance.exposed) == null ? void 0 : _a2.getItemStyleCache(-1);
  37403. if (forceUpdate) {
  37404. (_b = instance.proxy) == null ? void 0 : _b.$forceUpdate();
  37405. }
  37406. };
  37407. return cache2;
  37408. },
  37409. clearCache: false,
  37410. validateProps: ({ itemSize: itemSize3 }) => {
  37411. if (true) {
  37412. if (typeof itemSize3 !== "function") {
  37413. throwError(SCOPE4, `
  37414. itemSize is required as function, but the given value was ${typeof itemSize3}
  37415. `);
  37416. }
  37417. }
  37418. }
  37419. });
  37420. // node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-wheel.mjs
  37421. var useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, onWheelDelta) => {
  37422. let frameHandle = null;
  37423. let xOffset = 0;
  37424. let yOffset = 0;
  37425. const hasReachedEdge = (x2, y) => {
  37426. const xEdgeReached = x2 < 0 && atXStartEdge.value || x2 > 0 && atXEndEdge.value;
  37427. const yEdgeReached = y < 0 && atYStartEdge.value || y > 0 && atYEndEdge.value;
  37428. return xEdgeReached && yEdgeReached;
  37429. };
  37430. const onWheel = (e) => {
  37431. cAF(frameHandle);
  37432. let x2 = e.deltaX;
  37433. let y = e.deltaY;
  37434. if (Math.abs(x2) > Math.abs(y)) {
  37435. y = 0;
  37436. } else {
  37437. x2 = 0;
  37438. }
  37439. if (e.shiftKey && y !== 0) {
  37440. x2 = y;
  37441. y = 0;
  37442. }
  37443. if (hasReachedEdge(xOffset, yOffset) && hasReachedEdge(xOffset + x2, yOffset + y))
  37444. return;
  37445. xOffset += x2;
  37446. yOffset += y;
  37447. if (!isFirefox()) {
  37448. e.preventDefault();
  37449. }
  37450. frameHandle = rAF(() => {
  37451. onWheelDelta(xOffset, yOffset);
  37452. xOffset = 0;
  37453. yOffset = 0;
  37454. });
  37455. };
  37456. return {
  37457. hasReachedEdge,
  37458. onWheel
  37459. };
  37460. };
  37461. // node_modules/element-plus/es/components/virtual-list/src/builders/build-grid.mjs
  37462. var createGrid = ({
  37463. name,
  37464. clearCache,
  37465. getColumnPosition,
  37466. getColumnStartIndexForOffset,
  37467. getColumnStopIndexForStartIndex,
  37468. getEstimatedTotalHeight: getEstimatedTotalHeight2,
  37469. getEstimatedTotalWidth: getEstimatedTotalWidth2,
  37470. getColumnOffset,
  37471. getRowOffset,
  37472. getRowPosition,
  37473. getRowStartIndexForOffset,
  37474. getRowStopIndexForStartIndex,
  37475. initCache,
  37476. injectToInstance,
  37477. validateProps
  37478. }) => {
  37479. return defineComponent({
  37480. name: name != null ? name : "ElVirtualList",
  37481. props: virtualizedGridProps,
  37482. emits: [ITEM_RENDER_EVT, SCROLL_EVT],
  37483. setup(props, { emit, expose, slots }) {
  37484. const ns2 = useNamespace("vl");
  37485. validateProps(props);
  37486. const instance = getCurrentInstance();
  37487. const cache2 = ref(initCache(props, instance));
  37488. injectToInstance == null ? void 0 : injectToInstance(instance, cache2);
  37489. const windowRef = ref();
  37490. const hScrollbar = ref();
  37491. const vScrollbar = ref();
  37492. const innerRef = ref(null);
  37493. const states = ref({
  37494. isScrolling: false,
  37495. scrollLeft: isNumber2(props.initScrollLeft) ? props.initScrollLeft : 0,
  37496. scrollTop: isNumber2(props.initScrollTop) ? props.initScrollTop : 0,
  37497. updateRequested: false,
  37498. xAxisScrollDir: FORWARD,
  37499. yAxisScrollDir: FORWARD
  37500. });
  37501. const getItemStyleCache = useCache();
  37502. const parsedHeight = computed2(() => Number.parseInt(`${props.height}`, 10));
  37503. const parsedWidth = computed2(() => Number.parseInt(`${props.width}`, 10));
  37504. const columnsToRender = computed2(() => {
  37505. const { totalColumn, totalRow, columnCache } = props;
  37506. const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states);
  37507. if (totalColumn === 0 || totalRow === 0) {
  37508. return [0, 0, 0, 0];
  37509. }
  37510. const startIndex = getColumnStartIndexForOffset(props, scrollLeft, unref(cache2));
  37511. const stopIndex = getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, unref(cache2));
  37512. const cacheBackward = !isScrolling || xAxisScrollDir === BACKWARD ? Math.max(1, columnCache) : 1;
  37513. const cacheForward = !isScrolling || xAxisScrollDir === FORWARD ? Math.max(1, columnCache) : 1;
  37514. return [
  37515. Math.max(0, startIndex - cacheBackward),
  37516. Math.max(0, Math.min(totalColumn - 1, stopIndex + cacheForward)),
  37517. startIndex,
  37518. stopIndex
  37519. ];
  37520. });
  37521. const rowsToRender = computed2(() => {
  37522. const { totalColumn, totalRow, rowCache } = props;
  37523. const { isScrolling, yAxisScrollDir, scrollTop } = unref(states);
  37524. if (totalColumn === 0 || totalRow === 0) {
  37525. return [0, 0, 0, 0];
  37526. }
  37527. const startIndex = getRowStartIndexForOffset(props, scrollTop, unref(cache2));
  37528. const stopIndex = getRowStopIndexForStartIndex(props, startIndex, scrollTop, unref(cache2));
  37529. const cacheBackward = !isScrolling || yAxisScrollDir === BACKWARD ? Math.max(1, rowCache) : 1;
  37530. const cacheForward = !isScrolling || yAxisScrollDir === FORWARD ? Math.max(1, rowCache) : 1;
  37531. return [
  37532. Math.max(0, startIndex - cacheBackward),
  37533. Math.max(0, Math.min(totalRow - 1, stopIndex + cacheForward)),
  37534. startIndex,
  37535. stopIndex
  37536. ];
  37537. });
  37538. const estimatedTotalHeight = computed2(() => getEstimatedTotalHeight2(props, unref(cache2)));
  37539. const estimatedTotalWidth = computed2(() => getEstimatedTotalWidth2(props, unref(cache2)));
  37540. const windowStyle = computed2(() => {
  37541. var _a2;
  37542. return [
  37543. {
  37544. position: "relative",
  37545. overflow: "hidden",
  37546. WebkitOverflowScrolling: "touch",
  37547. willChange: "transform"
  37548. },
  37549. {
  37550. direction: props.direction,
  37551. height: isNumber2(props.height) ? `${props.height}px` : props.height,
  37552. width: isNumber2(props.width) ? `${props.width}px` : props.width
  37553. },
  37554. (_a2 = props.style) != null ? _a2 : {}
  37555. ];
  37556. });
  37557. const innerStyle = computed2(() => {
  37558. const width = `${unref(estimatedTotalWidth)}px`;
  37559. const height = `${unref(estimatedTotalHeight)}px`;
  37560. return {
  37561. height,
  37562. pointerEvents: unref(states).isScrolling ? "none" : void 0,
  37563. width
  37564. };
  37565. });
  37566. const emitEvents = () => {
  37567. const { totalColumn, totalRow } = props;
  37568. if (totalColumn > 0 && totalRow > 0) {
  37569. const [
  37570. columnCacheStart,
  37571. columnCacheEnd,
  37572. columnVisibleStart,
  37573. columnVisibleEnd
  37574. ] = unref(columnsToRender);
  37575. const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] = unref(rowsToRender);
  37576. emit(ITEM_RENDER_EVT, {
  37577. columnCacheStart,
  37578. columnCacheEnd,
  37579. rowCacheStart,
  37580. rowCacheEnd,
  37581. columnVisibleStart,
  37582. columnVisibleEnd,
  37583. rowVisibleStart,
  37584. rowVisibleEnd
  37585. });
  37586. }
  37587. const {
  37588. scrollLeft,
  37589. scrollTop,
  37590. updateRequested,
  37591. xAxisScrollDir,
  37592. yAxisScrollDir
  37593. } = unref(states);
  37594. emit(SCROLL_EVT, {
  37595. xAxisScrollDir,
  37596. scrollLeft,
  37597. yAxisScrollDir,
  37598. scrollTop,
  37599. updateRequested
  37600. });
  37601. };
  37602. const onScroll = (e) => {
  37603. const {
  37604. clientHeight,
  37605. clientWidth,
  37606. scrollHeight,
  37607. scrollLeft,
  37608. scrollTop,
  37609. scrollWidth
  37610. } = e.currentTarget;
  37611. const _states = unref(states);
  37612. if (_states.scrollTop === scrollTop && _states.scrollLeft === scrollLeft) {
  37613. return;
  37614. }
  37615. let _scrollLeft = scrollLeft;
  37616. if (isRTL(props.direction)) {
  37617. switch (getRTLOffsetType()) {
  37618. case RTL_OFFSET_NAG:
  37619. _scrollLeft = -scrollLeft;
  37620. break;
  37621. case RTL_OFFSET_POS_DESC:
  37622. _scrollLeft = scrollWidth - clientWidth - scrollLeft;
  37623. break;
  37624. }
  37625. }
  37626. states.value = {
  37627. ..._states,
  37628. isScrolling: true,
  37629. scrollLeft: _scrollLeft,
  37630. scrollTop: Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight)),
  37631. updateRequested: true,
  37632. xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),
  37633. yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop)
  37634. };
  37635. nextTick(() => resetIsScrolling());
  37636. onUpdated2();
  37637. emitEvents();
  37638. };
  37639. const onVerticalScroll = (distance, totalSteps) => {
  37640. const height = unref(parsedHeight);
  37641. const offset2 = (estimatedTotalHeight.value - height) / totalSteps * distance;
  37642. scrollTo({
  37643. scrollTop: Math.min(estimatedTotalHeight.value - height, offset2)
  37644. });
  37645. };
  37646. const onHorizontalScroll = (distance, totalSteps) => {
  37647. const width = unref(parsedWidth);
  37648. const offset2 = (estimatedTotalWidth.value - width) / totalSteps * distance;
  37649. scrollTo({
  37650. scrollLeft: Math.min(estimatedTotalWidth.value - width, offset2)
  37651. });
  37652. };
  37653. const { onWheel } = useGridWheel({
  37654. atXStartEdge: computed2(() => states.value.scrollLeft <= 0),
  37655. atXEndEdge: computed2(() => states.value.scrollLeft >= estimatedTotalWidth.value),
  37656. atYStartEdge: computed2(() => states.value.scrollTop <= 0),
  37657. atYEndEdge: computed2(() => states.value.scrollTop >= estimatedTotalHeight.value)
  37658. }, (x2, y) => {
  37659. var _a2, _b, _c, _d;
  37660. (_b = (_a2 = hScrollbar.value) == null ? void 0 : _a2.onMouseUp) == null ? void 0 : _b.call(_a2);
  37661. (_d = (_c = hScrollbar.value) == null ? void 0 : _c.onMouseUp) == null ? void 0 : _d.call(_c);
  37662. const width = unref(parsedWidth);
  37663. const height = unref(parsedHeight);
  37664. scrollTo({
  37665. scrollLeft: Math.min(states.value.scrollLeft + x2, estimatedTotalWidth.value - width),
  37666. scrollTop: Math.min(states.value.scrollTop + y, estimatedTotalHeight.value - height)
  37667. });
  37668. });
  37669. const scrollTo = ({
  37670. scrollLeft = states.value.scrollLeft,
  37671. scrollTop = states.value.scrollTop
  37672. }) => {
  37673. scrollLeft = Math.max(scrollLeft, 0);
  37674. scrollTop = Math.max(scrollTop, 0);
  37675. const _states = unref(states);
  37676. if (scrollTop === _states.scrollTop && scrollLeft === _states.scrollLeft) {
  37677. return;
  37678. }
  37679. states.value = {
  37680. ..._states,
  37681. xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),
  37682. yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),
  37683. scrollLeft,
  37684. scrollTop,
  37685. updateRequested: true
  37686. };
  37687. nextTick(() => resetIsScrolling());
  37688. onUpdated2();
  37689. emitEvents();
  37690. };
  37691. const scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => {
  37692. const _states = unref(states);
  37693. columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn - 1));
  37694. rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow - 1));
  37695. const scrollBarWidth2 = getScrollBarWidth(ns2.namespace.value);
  37696. const _cache = unref(cache2);
  37697. const estimatedHeight = getEstimatedTotalHeight2(props, _cache);
  37698. const estimatedWidth = getEstimatedTotalWidth2(props, _cache);
  37699. scrollTo({
  37700. scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth2 : 0),
  37701. scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth2 : 0)
  37702. });
  37703. };
  37704. const getItemStyle = (rowIndex, columnIndex) => {
  37705. const { columnWidth, direction: direction2, rowHeight } = props;
  37706. const itemStyleCache = getItemStyleCache.value(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction2);
  37707. const key = `${rowIndex},${columnIndex}`;
  37708. if (hasOwn(itemStyleCache, key)) {
  37709. return itemStyleCache[key];
  37710. } else {
  37711. const [, left2] = getColumnPosition(props, columnIndex, unref(cache2));
  37712. const _cache = unref(cache2);
  37713. const rtl = isRTL(direction2);
  37714. const [height, top] = getRowPosition(props, rowIndex, _cache);
  37715. const [width] = getColumnPosition(props, columnIndex, _cache);
  37716. itemStyleCache[key] = {
  37717. position: "absolute",
  37718. left: rtl ? void 0 : `${left2}px`,
  37719. right: rtl ? `${left2}px` : void 0,
  37720. top: `${top}px`,
  37721. height: `${height}px`,
  37722. width: `${width}px`
  37723. };
  37724. return itemStyleCache[key];
  37725. }
  37726. };
  37727. const resetIsScrolling = () => {
  37728. states.value.isScrolling = false;
  37729. nextTick(() => {
  37730. getItemStyleCache.value(-1, null, null);
  37731. });
  37732. };
  37733. onMounted(() => {
  37734. if (!isClient)
  37735. return;
  37736. const { initScrollLeft, initScrollTop } = props;
  37737. const windowElement = unref(windowRef);
  37738. if (windowElement) {
  37739. if (isNumber2(initScrollLeft)) {
  37740. windowElement.scrollLeft = initScrollLeft;
  37741. }
  37742. if (isNumber2(initScrollTop)) {
  37743. windowElement.scrollTop = initScrollTop;
  37744. }
  37745. }
  37746. emitEvents();
  37747. });
  37748. const onUpdated2 = () => {
  37749. const { direction: direction2 } = props;
  37750. const { scrollLeft, scrollTop, updateRequested } = unref(states);
  37751. const windowElement = unref(windowRef);
  37752. if (updateRequested && windowElement) {
  37753. if (direction2 === RTL) {
  37754. switch (getRTLOffsetType()) {
  37755. case RTL_OFFSET_NAG: {
  37756. windowElement.scrollLeft = -scrollLeft;
  37757. break;
  37758. }
  37759. case RTL_OFFSET_POS_ASC: {
  37760. windowElement.scrollLeft = scrollLeft;
  37761. break;
  37762. }
  37763. default: {
  37764. const { clientWidth, scrollWidth } = windowElement;
  37765. windowElement.scrollLeft = scrollWidth - clientWidth - scrollLeft;
  37766. break;
  37767. }
  37768. }
  37769. } else {
  37770. windowElement.scrollLeft = Math.max(0, scrollLeft);
  37771. }
  37772. windowElement.scrollTop = Math.max(0, scrollTop);
  37773. }
  37774. };
  37775. const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } = instance.proxy;
  37776. expose({
  37777. windowRef,
  37778. innerRef,
  37779. getItemStyleCache,
  37780. scrollTo,
  37781. scrollToItem,
  37782. states,
  37783. resetAfterColumnIndex,
  37784. resetAfterRowIndex,
  37785. resetAfter
  37786. });
  37787. const renderScrollbars = () => {
  37788. const {
  37789. scrollbarAlwaysOn,
  37790. scrollbarStartGap,
  37791. scrollbarEndGap,
  37792. totalColumn,
  37793. totalRow
  37794. } = props;
  37795. const width = unref(parsedWidth);
  37796. const height = unref(parsedHeight);
  37797. const estimatedWidth = unref(estimatedTotalWidth);
  37798. const estimatedHeight = unref(estimatedTotalHeight);
  37799. const { scrollLeft, scrollTop } = unref(states);
  37800. const horizontalScrollbar = h(ScrollBar, {
  37801. ref: hScrollbar,
  37802. alwaysOn: scrollbarAlwaysOn,
  37803. startGap: scrollbarStartGap,
  37804. endGap: scrollbarEndGap,
  37805. class: ns2.e("horizontal"),
  37806. clientSize: width,
  37807. layout: "horizontal",
  37808. onScroll: onHorizontalScroll,
  37809. ratio: width * 100 / estimatedWidth,
  37810. scrollFrom: scrollLeft / (estimatedWidth - width),
  37811. total: totalRow,
  37812. visible: true
  37813. });
  37814. const verticalScrollbar = h(ScrollBar, {
  37815. ref: vScrollbar,
  37816. alwaysOn: scrollbarAlwaysOn,
  37817. startGap: scrollbarStartGap,
  37818. endGap: scrollbarEndGap,
  37819. class: ns2.e("vertical"),
  37820. clientSize: height,
  37821. layout: "vertical",
  37822. onScroll: onVerticalScroll,
  37823. ratio: height * 100 / estimatedHeight,
  37824. scrollFrom: scrollTop / (estimatedHeight - height),
  37825. total: totalColumn,
  37826. visible: true
  37827. });
  37828. return {
  37829. horizontalScrollbar,
  37830. verticalScrollbar
  37831. };
  37832. };
  37833. const renderItems = () => {
  37834. var _a2;
  37835. const [columnStart, columnEnd] = unref(columnsToRender);
  37836. const [rowStart, rowEnd] = unref(rowsToRender);
  37837. const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props;
  37838. const children = [];
  37839. if (totalRow > 0 && totalColumn > 0) {
  37840. for (let row = rowStart; row <= rowEnd; row++) {
  37841. for (let column2 = columnStart; column2 <= columnEnd; column2++) {
  37842. children.push((_a2 = slots.default) == null ? void 0 : _a2.call(slots, {
  37843. columnIndex: column2,
  37844. data,
  37845. key: itemKey({ columnIndex: column2, data, rowIndex: row }),
  37846. isScrolling: useIsScrolling ? unref(states).isScrolling : void 0,
  37847. style: getItemStyle(row, column2),
  37848. rowIndex: row
  37849. }));
  37850. }
  37851. }
  37852. }
  37853. return children;
  37854. };
  37855. const renderInner = () => {
  37856. const Inner = resolveDynamicComponent(props.innerElement);
  37857. const children = renderItems();
  37858. return [
  37859. h(Inner, {
  37860. style: unref(innerStyle),
  37861. ref: innerRef
  37862. }, !isString(Inner) ? {
  37863. default: () => children
  37864. } : children)
  37865. ];
  37866. };
  37867. const renderWindow = () => {
  37868. const Container2 = resolveDynamicComponent(props.containerElement);
  37869. const { horizontalScrollbar, verticalScrollbar } = renderScrollbars();
  37870. const Inner = renderInner();
  37871. return h("div", {
  37872. key: 0,
  37873. class: ns2.e("wrapper")
  37874. }, [
  37875. h(Container2, {
  37876. class: props.className,
  37877. style: unref(windowStyle),
  37878. onScroll,
  37879. onWheel,
  37880. ref: windowRef
  37881. }, !isString(Container2) ? { default: () => Inner } : Inner),
  37882. horizontalScrollbar,
  37883. verticalScrollbar
  37884. ]);
  37885. };
  37886. return renderWindow;
  37887. }
  37888. });
  37889. };
  37890. // node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs
  37891. var SCOPE5 = "ElFixedSizeGrid";
  37892. var FixedSizeGrid = createGrid({
  37893. name: "ElFixedSizeGrid",
  37894. getColumnPosition: ({ columnWidth }, index) => [
  37895. columnWidth,
  37896. index * columnWidth
  37897. ],
  37898. getRowPosition: ({ rowHeight }, index) => [
  37899. rowHeight,
  37900. index * rowHeight
  37901. ],
  37902. getEstimatedTotalHeight: ({ totalRow, rowHeight }) => rowHeight * totalRow,
  37903. getEstimatedTotalWidth: ({ totalColumn, columnWidth }) => columnWidth * totalColumn,
  37904. getColumnOffset: ({ totalColumn, columnWidth, width }, columnIndex, alignment, scrollLeft, _2, scrollBarWidth2) => {
  37905. width = Number(width);
  37906. const lastColumnOffset = Math.max(0, totalColumn * columnWidth - width);
  37907. const maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);
  37908. const minOffset = Math.max(0, columnIndex * columnWidth - width + scrollBarWidth2 + columnWidth);
  37909. if (alignment === "smart") {
  37910. if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {
  37911. alignment = AUTO_ALIGNMENT;
  37912. } else {
  37913. alignment = CENTERED_ALIGNMENT;
  37914. }
  37915. }
  37916. switch (alignment) {
  37917. case START_ALIGNMENT:
  37918. return maxOffset;
  37919. case END_ALIGNMENT:
  37920. return minOffset;
  37921. case CENTERED_ALIGNMENT: {
  37922. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  37923. if (middleOffset < Math.ceil(width / 2)) {
  37924. return 0;
  37925. } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {
  37926. return lastColumnOffset;
  37927. } else {
  37928. return middleOffset;
  37929. }
  37930. }
  37931. case AUTO_ALIGNMENT:
  37932. default:
  37933. if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {
  37934. return scrollLeft;
  37935. } else if (minOffset > maxOffset) {
  37936. return minOffset;
  37937. } else if (scrollLeft < minOffset) {
  37938. return minOffset;
  37939. } else {
  37940. return maxOffset;
  37941. }
  37942. }
  37943. },
  37944. getRowOffset: ({ rowHeight, height, totalRow }, rowIndex, align, scrollTop, _2, scrollBarWidth2) => {
  37945. height = Number(height);
  37946. const lastRowOffset = Math.max(0, totalRow * rowHeight - height);
  37947. const maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);
  37948. const minOffset = Math.max(0, rowIndex * rowHeight - height + scrollBarWidth2 + rowHeight);
  37949. if (align === SMART_ALIGNMENT) {
  37950. if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {
  37951. align = AUTO_ALIGNMENT;
  37952. } else {
  37953. align = CENTERED_ALIGNMENT;
  37954. }
  37955. }
  37956. switch (align) {
  37957. case START_ALIGNMENT:
  37958. return maxOffset;
  37959. case END_ALIGNMENT:
  37960. return minOffset;
  37961. case CENTERED_ALIGNMENT: {
  37962. const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
  37963. if (middleOffset < Math.ceil(height / 2)) {
  37964. return 0;
  37965. } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {
  37966. return lastRowOffset;
  37967. } else {
  37968. return middleOffset;
  37969. }
  37970. }
  37971. case AUTO_ALIGNMENT:
  37972. default:
  37973. if (scrollTop >= minOffset && scrollTop <= maxOffset) {
  37974. return scrollTop;
  37975. } else if (minOffset > maxOffset) {
  37976. return minOffset;
  37977. } else if (scrollTop < minOffset) {
  37978. return minOffset;
  37979. } else {
  37980. return maxOffset;
  37981. }
  37982. }
  37983. },
  37984. getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max(0, Math.min(totalColumn - 1, Math.floor(scrollLeft / columnWidth))),
  37985. getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => {
  37986. const left2 = startIndex * columnWidth;
  37987. const visibleColumnsCount = Math.ceil((width + scrollLeft - left2) / columnWidth);
  37988. return Math.max(0, Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1));
  37989. },
  37990. getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max(0, Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight))),
  37991. getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => {
  37992. const top = startIndex * rowHeight;
  37993. const numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);
  37994. return Math.max(0, Math.min(totalRow - 1, startIndex + numVisibleRows - 1));
  37995. },
  37996. initCache: () => void 0,
  37997. clearCache: true,
  37998. validateProps: ({ columnWidth, rowHeight }) => {
  37999. if (true) {
  38000. if (!isNumber2(columnWidth)) {
  38001. throwError(SCOPE5, `
  38002. "columnWidth" must be passed as number,
  38003. instead ${typeof columnWidth} was given.
  38004. `);
  38005. }
  38006. if (!isNumber2(rowHeight)) {
  38007. throwError(SCOPE5, `
  38008. "columnWidth" must be passed as number,
  38009. instead ${typeof rowHeight} was given.
  38010. `);
  38011. }
  38012. }
  38013. }
  38014. });
  38015. // node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs
  38016. var { max: max4, min: min4, floor: floor2 } = Math;
  38017. var SCOPE6 = "ElDynamicSizeGrid";
  38018. var ACCESS_SIZER_KEY_MAP = {
  38019. column: "columnWidth",
  38020. row: "rowHeight"
  38021. };
  38022. var ACCESS_LAST_VISITED_KEY_MAP = {
  38023. column: "lastVisitedColumnIndex",
  38024. row: "lastVisitedRowIndex"
  38025. };
  38026. var getItemFromCache2 = (props, index, gridCache, type4) => {
  38027. const [cachedItems, sizer, lastVisited] = [
  38028. gridCache[type4],
  38029. props[ACCESS_SIZER_KEY_MAP[type4]],
  38030. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]]
  38031. ];
  38032. if (index > lastVisited) {
  38033. let offset2 = 0;
  38034. if (lastVisited >= 0) {
  38035. const item = cachedItems[lastVisited];
  38036. offset2 = item.offset + item.size;
  38037. }
  38038. for (let i = lastVisited + 1; i <= index; i++) {
  38039. const size3 = sizer(i);
  38040. cachedItems[i] = {
  38041. offset: offset2,
  38042. size: size3
  38043. };
  38044. offset2 += size3;
  38045. }
  38046. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]] = index;
  38047. }
  38048. return cachedItems[index];
  38049. };
  38050. var bs2 = (props, gridCache, low, high, offset2, type4) => {
  38051. while (low <= high) {
  38052. const mid = low + floor2((high - low) / 2);
  38053. const currentOffset = getItemFromCache2(props, mid, gridCache, type4).offset;
  38054. if (currentOffset === offset2) {
  38055. return mid;
  38056. } else if (currentOffset < offset2) {
  38057. low = mid + 1;
  38058. } else {
  38059. high = mid - 1;
  38060. }
  38061. }
  38062. return max4(0, low - 1);
  38063. };
  38064. var es2 = (props, gridCache, idx, offset2, type4) => {
  38065. const total2 = type4 === "column" ? props.totalColumn : props.totalRow;
  38066. let exponent = 1;
  38067. while (idx < total2 && getItemFromCache2(props, idx, gridCache, type4).offset < offset2) {
  38068. idx += exponent;
  38069. exponent *= 2;
  38070. }
  38071. return bs2(props, gridCache, floor2(idx / 2), min4(idx, total2 - 1), offset2, type4);
  38072. };
  38073. var findItem2 = (props, gridCache, offset2, type4) => {
  38074. const [cache2, lastVisitedIndex] = [
  38075. gridCache[type4],
  38076. gridCache[ACCESS_LAST_VISITED_KEY_MAP[type4]]
  38077. ];
  38078. const lastVisitedItemOffset = lastVisitedIndex > 0 ? cache2[lastVisitedIndex].offset : 0;
  38079. if (lastVisitedItemOffset >= offset2) {
  38080. return bs2(props, gridCache, 0, lastVisitedIndex, offset2, type4);
  38081. }
  38082. return es2(props, gridCache, max4(0, lastVisitedIndex), offset2, type4);
  38083. };
  38084. var getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => {
  38085. let sizeOfVisitedRows = 0;
  38086. if (lastVisitedRowIndex >= totalRow) {
  38087. lastVisitedRowIndex = totalRow - 1;
  38088. }
  38089. if (lastVisitedRowIndex >= 0) {
  38090. const item = row[lastVisitedRowIndex];
  38091. sizeOfVisitedRows = item.offset + item.size;
  38092. }
  38093. const unvisitedItems = totalRow - lastVisitedRowIndex - 1;
  38094. const sizeOfUnvisitedItems = unvisitedItems * estimatedRowHeight;
  38095. return sizeOfVisitedRows + sizeOfUnvisitedItems;
  38096. };
  38097. var getEstimatedTotalWidth = ({ totalColumn }, { column: column2, estimatedColumnWidth, lastVisitedColumnIndex }) => {
  38098. let sizeOfVisitedColumns = 0;
  38099. if (lastVisitedColumnIndex > totalColumn) {
  38100. lastVisitedColumnIndex = totalColumn - 1;
  38101. }
  38102. if (lastVisitedColumnIndex >= 0) {
  38103. const item = column2[lastVisitedColumnIndex];
  38104. sizeOfVisitedColumns = item.offset + item.size;
  38105. }
  38106. const unvisitedItems = totalColumn - lastVisitedColumnIndex - 1;
  38107. const sizeOfUnvisitedItems = unvisitedItems * estimatedColumnWidth;
  38108. return sizeOfVisitedColumns + sizeOfUnvisitedItems;
  38109. };
  38110. var ACCESS_ESTIMATED_SIZE_KEY_MAP = {
  38111. column: getEstimatedTotalWidth,
  38112. row: getEstimatedTotalHeight
  38113. };
  38114. var getOffset = (props, index, alignment, scrollOffset, cache2, type4, scrollBarWidth2) => {
  38115. const [size3, estimatedSizeAssociates] = [
  38116. type4 === "row" ? props.height : props.width,
  38117. ACCESS_ESTIMATED_SIZE_KEY_MAP[type4]
  38118. ];
  38119. const item = getItemFromCache2(props, index, cache2, type4);
  38120. const estimatedSize = estimatedSizeAssociates(props, cache2);
  38121. const maxOffset = max4(0, min4(estimatedSize - size3, item.offset));
  38122. const minOffset = max4(0, item.offset - size3 + scrollBarWidth2 + item.size);
  38123. if (alignment === SMART_ALIGNMENT) {
  38124. if (scrollOffset >= minOffset - size3 && scrollOffset <= maxOffset + size3) {
  38125. alignment = AUTO_ALIGNMENT;
  38126. } else {
  38127. alignment = CENTERED_ALIGNMENT;
  38128. }
  38129. }
  38130. switch (alignment) {
  38131. case START_ALIGNMENT: {
  38132. return maxOffset;
  38133. }
  38134. case END_ALIGNMENT: {
  38135. return minOffset;
  38136. }
  38137. case CENTERED_ALIGNMENT: {
  38138. return Math.round(minOffset + (maxOffset - minOffset) / 2);
  38139. }
  38140. case AUTO_ALIGNMENT:
  38141. default: {
  38142. if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
  38143. return scrollOffset;
  38144. } else if (minOffset > maxOffset) {
  38145. return minOffset;
  38146. } else if (scrollOffset < minOffset) {
  38147. return minOffset;
  38148. } else {
  38149. return maxOffset;
  38150. }
  38151. }
  38152. }
  38153. };
  38154. var DynamicSizeGrid = createGrid({
  38155. name: "ElDynamicSizeGrid",
  38156. getColumnPosition: (props, idx, cache2) => {
  38157. const item = getItemFromCache2(props, idx, cache2, "column");
  38158. return [item.size, item.offset];
  38159. },
  38160. getRowPosition: (props, idx, cache2) => {
  38161. const item = getItemFromCache2(props, idx, cache2, "row");
  38162. return [item.size, item.offset];
  38163. },
  38164. getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache2, scrollBarWidth2) => getOffset(props, columnIndex, alignment, scrollLeft, cache2, "column", scrollBarWidth2),
  38165. getRowOffset: (props, rowIndex, alignment, scrollTop, cache2, scrollBarWidth2) => getOffset(props, rowIndex, alignment, scrollTop, cache2, "row", scrollBarWidth2),
  38166. getColumnStartIndexForOffset: (props, scrollLeft, cache2) => findItem2(props, cache2, scrollLeft, "column"),
  38167. getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache2) => {
  38168. const item = getItemFromCache2(props, startIndex, cache2, "column");
  38169. const maxOffset = scrollLeft + props.width;
  38170. let offset2 = item.offset + item.size;
  38171. let stopIndex = startIndex;
  38172. while (stopIndex < props.totalColumn - 1 && offset2 < maxOffset) {
  38173. stopIndex++;
  38174. offset2 += getItemFromCache2(props, startIndex, cache2, "column").size;
  38175. }
  38176. return stopIndex;
  38177. },
  38178. getEstimatedTotalHeight,
  38179. getEstimatedTotalWidth,
  38180. getRowStartIndexForOffset: (props, scrollTop, cache2) => findItem2(props, cache2, scrollTop, "row"),
  38181. getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache2) => {
  38182. const { totalRow, height } = props;
  38183. const item = getItemFromCache2(props, startIndex, cache2, "row");
  38184. const maxOffset = scrollTop + height;
  38185. let offset2 = item.size + item.offset;
  38186. let stopIndex = startIndex;
  38187. while (stopIndex < totalRow - 1 && offset2 < maxOffset) {
  38188. stopIndex++;
  38189. offset2 += getItemFromCache2(props, stopIndex, cache2, "row").size;
  38190. }
  38191. return stopIndex;
  38192. },
  38193. injectToInstance: (instance, cache2) => {
  38194. const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => {
  38195. var _a2, _b;
  38196. forceUpdate = isUndefined2(forceUpdate) ? true : forceUpdate;
  38197. if (isNumber2(columnIndex)) {
  38198. cache2.value.lastVisitedColumnIndex = Math.min(cache2.value.lastVisitedColumnIndex, columnIndex - 1);
  38199. }
  38200. if (isNumber2(rowIndex)) {
  38201. cache2.value.lastVisitedRowIndex = Math.min(cache2.value.lastVisitedRowIndex, rowIndex - 1);
  38202. }
  38203. (_a2 = instance.exposed) == null ? void 0 : _a2.getItemStyleCache.value(-1, null, null);
  38204. if (forceUpdate)
  38205. (_b = instance.proxy) == null ? void 0 : _b.$forceUpdate();
  38206. };
  38207. const resetAfterColumnIndex = (columnIndex, forceUpdate) => {
  38208. resetAfter({
  38209. columnIndex
  38210. }, forceUpdate);
  38211. };
  38212. const resetAfterRowIndex = (rowIndex, forceUpdate) => {
  38213. resetAfter({
  38214. rowIndex
  38215. }, forceUpdate);
  38216. };
  38217. Object.assign(instance.proxy, {
  38218. resetAfterColumnIndex,
  38219. resetAfterRowIndex,
  38220. resetAfter
  38221. });
  38222. },
  38223. initCache: ({
  38224. estimatedColumnWidth = DEFAULT_DYNAMIC_LIST_ITEM_SIZE,
  38225. estimatedRowHeight = DEFAULT_DYNAMIC_LIST_ITEM_SIZE
  38226. }) => {
  38227. const cache2 = {
  38228. column: {},
  38229. estimatedColumnWidth,
  38230. estimatedRowHeight,
  38231. lastVisitedColumnIndex: -1,
  38232. lastVisitedRowIndex: -1,
  38233. row: {}
  38234. };
  38235. return cache2;
  38236. },
  38237. clearCache: false,
  38238. validateProps: ({ columnWidth, rowHeight }) => {
  38239. if (true) {
  38240. if (!isFunction(columnWidth)) {
  38241. throwError(SCOPE6, `
  38242. "columnWidth" must be passed as function,
  38243. instead ${typeof columnWidth} was given.
  38244. `);
  38245. }
  38246. if (!isFunction(rowHeight)) {
  38247. throwError(SCOPE6, `
  38248. "rowHeight" must be passed as function,
  38249. instead ${typeof rowHeight} was given.
  38250. `);
  38251. }
  38252. }
  38253. }
  38254. });
  38255. // node_modules/element-plus/es/components/select-v2/src/group-item.mjs
  38256. var _sfc_main108 = defineComponent({
  38257. props: {
  38258. item: {
  38259. type: Object,
  38260. required: true
  38261. },
  38262. style: Object,
  38263. height: Number
  38264. },
  38265. setup() {
  38266. const ns2 = useNamespace("select");
  38267. return {
  38268. ns: ns2
  38269. };
  38270. }
  38271. });
  38272. function _sfc_render28(_ctx, _cache, $props, $setup, $data, $options) {
  38273. return _ctx.item.isTitle ? (openBlock(), createElementBlock("div", {
  38274. key: 0,
  38275. class: normalizeClass(_ctx.ns.be("group", "title")),
  38276. style: normalizeStyle([_ctx.style, { lineHeight: `${_ctx.height}px` }])
  38277. }, toDisplayString(_ctx.item.label), 7)) : (openBlock(), createElementBlock("div", {
  38278. key: 1,
  38279. class: normalizeClass(_ctx.ns.be("group", "split")),
  38280. style: normalizeStyle(_ctx.style)
  38281. }, [
  38282. createBaseVNode("span", {
  38283. class: normalizeClass(_ctx.ns.be("group", "split-dash")),
  38284. style: normalizeStyle({ top: `${_ctx.height / 2}px` })
  38285. }, null, 6)
  38286. ], 6));
  38287. }
  38288. var GroupItem = _export_sfc(_sfc_main108, [["render", _sfc_render28], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]);
  38289. // node_modules/element-plus/es/components/select-v2/src/useOption.mjs
  38290. function useOption2(props, { emit }) {
  38291. return {
  38292. hoverItem: () => {
  38293. if (!props.disabled) {
  38294. emit("hover", props.index);
  38295. }
  38296. },
  38297. selectOptionClick: () => {
  38298. if (!props.disabled) {
  38299. emit("select", props.item, props.index);
  38300. }
  38301. }
  38302. };
  38303. }
  38304. // node_modules/element-plus/es/components/select-v2/src/defaults.mjs
  38305. var SelectProps = {
  38306. allowCreate: Boolean,
  38307. autocomplete: {
  38308. type: String,
  38309. default: "none"
  38310. },
  38311. automaticDropdown: Boolean,
  38312. clearable: Boolean,
  38313. clearIcon: {
  38314. type: [String, Object],
  38315. default: circle_close_default
  38316. },
  38317. effect: {
  38318. type: String,
  38319. default: "light"
  38320. },
  38321. collapseTags: Boolean,
  38322. collapseTagsTooltip: {
  38323. type: Boolean,
  38324. default: false
  38325. },
  38326. defaultFirstOption: Boolean,
  38327. disabled: Boolean,
  38328. estimatedOptionHeight: {
  38329. type: Number,
  38330. default: void 0
  38331. },
  38332. filterable: Boolean,
  38333. filterMethod: Function,
  38334. height: {
  38335. type: Number,
  38336. default: 170
  38337. },
  38338. itemHeight: {
  38339. type: Number,
  38340. default: 34
  38341. },
  38342. id: String,
  38343. loading: Boolean,
  38344. loadingText: String,
  38345. label: String,
  38346. modelValue: [Array, String, Number, Boolean, Object],
  38347. multiple: Boolean,
  38348. multipleLimit: {
  38349. type: Number,
  38350. default: 0
  38351. },
  38352. name: String,
  38353. noDataText: String,
  38354. noMatchText: String,
  38355. remoteMethod: Function,
  38356. reserveKeyword: {
  38357. type: Boolean,
  38358. default: true
  38359. },
  38360. options: {
  38361. type: Array,
  38362. required: true
  38363. },
  38364. placeholder: {
  38365. type: String
  38366. },
  38367. teleported: useTooltipContentProps.teleported,
  38368. persistent: {
  38369. type: Boolean,
  38370. default: true
  38371. },
  38372. popperClass: {
  38373. type: String,
  38374. default: ""
  38375. },
  38376. popperOptions: {
  38377. type: Object,
  38378. default: () => ({})
  38379. },
  38380. remote: Boolean,
  38381. size: {
  38382. type: String,
  38383. validator: isValidComponentSize
  38384. },
  38385. valueKey: {
  38386. type: String,
  38387. default: "value"
  38388. },
  38389. scrollbarAlwaysOn: {
  38390. type: Boolean,
  38391. default: false
  38392. },
  38393. validateEvent: {
  38394. type: Boolean,
  38395. default: true
  38396. },
  38397. placement: {
  38398. type: definePropType(String),
  38399. values: Ee,
  38400. default: "bottom-start"
  38401. }
  38402. };
  38403. var OptionProps = {
  38404. data: Array,
  38405. disabled: Boolean,
  38406. hovering: Boolean,
  38407. item: Object,
  38408. index: Number,
  38409. style: Object,
  38410. selected: Boolean,
  38411. created: Boolean
  38412. };
  38413. // node_modules/element-plus/es/components/select-v2/src/option-item.mjs
  38414. var _sfc_main109 = defineComponent({
  38415. props: OptionProps,
  38416. emits: ["select", "hover"],
  38417. setup(props, { emit }) {
  38418. const ns2 = useNamespace("select");
  38419. const { hoverItem, selectOptionClick } = useOption2(props, { emit });
  38420. return {
  38421. ns: ns2,
  38422. hoverItem,
  38423. selectOptionClick
  38424. };
  38425. }
  38426. });
  38427. var _hoisted_154 = ["aria-selected"];
  38428. function _sfc_render29(_ctx, _cache, $props, $setup, $data, $options) {
  38429. return openBlock(), createElementBlock("li", {
  38430. "aria-selected": _ctx.selected,
  38431. style: normalizeStyle(_ctx.style),
  38432. class: normalizeClass([
  38433. _ctx.ns.be("dropdown", "option-item"),
  38434. _ctx.ns.is("selected", _ctx.selected),
  38435. _ctx.ns.is("disabled", _ctx.disabled),
  38436. _ctx.ns.is("created", _ctx.created),
  38437. { hover: _ctx.hovering }
  38438. ]),
  38439. onMouseenter: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
  38440. onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
  38441. }, [
  38442. renderSlot(_ctx.$slots, "default", {
  38443. item: _ctx.item,
  38444. index: _ctx.index,
  38445. disabled: _ctx.disabled
  38446. }, () => [
  38447. createBaseVNode("span", null, toDisplayString(_ctx.item.label), 1)
  38448. ])
  38449. ], 46, _hoisted_154);
  38450. }
  38451. var OptionItem = _export_sfc(_sfc_main109, [["render", _sfc_render29], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]);
  38452. // node_modules/element-plus/es/components/select-v2/src/token.mjs
  38453. var selectV2InjectionKey = "ElSelectV2Injection";
  38454. // node_modules/element-plus/es/components/select-v2/src/select-dropdown.mjs
  38455. var ElSelectMenu2 = defineComponent({
  38456. name: "ElSelectDropdown",
  38457. props: {
  38458. data: {
  38459. type: Array,
  38460. required: true
  38461. },
  38462. hoveringIndex: Number,
  38463. width: Number
  38464. },
  38465. setup(props, {
  38466. slots,
  38467. expose
  38468. }) {
  38469. const select = inject(selectV2InjectionKey);
  38470. const ns2 = useNamespace("select");
  38471. const cachedHeights = ref([]);
  38472. const listRef = ref();
  38473. const size3 = computed2(() => props.data.length);
  38474. watch(() => size3.value, () => {
  38475. var _a2, _b;
  38476. (_b = (_a2 = select.popper.value).updatePopper) == null ? void 0 : _b.call(_a2);
  38477. });
  38478. const isSized = computed2(() => isUndefined2(select.props.estimatedOptionHeight));
  38479. const listProps = computed2(() => {
  38480. if (isSized.value) {
  38481. return {
  38482. itemSize: select.props.itemHeight
  38483. };
  38484. }
  38485. return {
  38486. estimatedSize: select.props.estimatedOptionHeight,
  38487. itemSize: (idx) => cachedHeights.value[idx]
  38488. };
  38489. });
  38490. const contains2 = (arr = [], target2) => {
  38491. const {
  38492. props: {
  38493. valueKey
  38494. }
  38495. } = select;
  38496. if (!isObject(target2)) {
  38497. return arr.includes(target2);
  38498. }
  38499. return arr && arr.some((item) => {
  38500. return get_default(item, valueKey) === get_default(target2, valueKey);
  38501. });
  38502. };
  38503. const isEqual3 = (selected, target2) => {
  38504. if (!isObject(target2)) {
  38505. return selected === target2;
  38506. } else {
  38507. const {
  38508. valueKey
  38509. } = select.props;
  38510. return get_default(selected, valueKey) === get_default(target2, valueKey);
  38511. }
  38512. };
  38513. const isItemSelected = (modelValue, target2) => {
  38514. const {
  38515. valueKey
  38516. } = select.props;
  38517. if (select.props.multiple) {
  38518. return contains2(modelValue, get_default(target2, valueKey));
  38519. }
  38520. return isEqual3(modelValue, get_default(target2, valueKey));
  38521. };
  38522. const isItemDisabled = (modelValue, selected) => {
  38523. const {
  38524. disabled,
  38525. multiple,
  38526. multipleLimit
  38527. } = select.props;
  38528. return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);
  38529. };
  38530. const isItemHovering = (target2) => props.hoveringIndex === target2;
  38531. const scrollToItem = (index) => {
  38532. const list = listRef.value;
  38533. if (list) {
  38534. list.scrollToItem(index);
  38535. }
  38536. };
  38537. const resetScrollTop = () => {
  38538. const list = listRef.value;
  38539. if (list) {
  38540. list.resetScrollTop();
  38541. }
  38542. };
  38543. expose({
  38544. listRef,
  38545. isSized,
  38546. isItemDisabled,
  38547. isItemHovering,
  38548. isItemSelected,
  38549. scrollToItem,
  38550. resetScrollTop
  38551. });
  38552. const Item = (itemProps) => {
  38553. const {
  38554. index,
  38555. data,
  38556. style
  38557. } = itemProps;
  38558. const sized = unref(isSized);
  38559. const {
  38560. itemSize: itemSize3,
  38561. estimatedSize
  38562. } = unref(listProps);
  38563. const {
  38564. modelValue
  38565. } = select.props;
  38566. const {
  38567. onSelect,
  38568. onHover
  38569. } = select;
  38570. const item = data[index];
  38571. if (item.type === "Group") {
  38572. return createVNode(GroupItem, {
  38573. "item": item,
  38574. "style": style,
  38575. "height": sized ? itemSize3 : estimatedSize
  38576. }, null);
  38577. }
  38578. const isSelected = isItemSelected(modelValue, item);
  38579. const isDisabled = isItemDisabled(modelValue, isSelected);
  38580. const isHovering = isItemHovering(index);
  38581. return createVNode(OptionItem, mergeProps(itemProps, {
  38582. "selected": isSelected,
  38583. "disabled": item.disabled || isDisabled,
  38584. "created": !!item.created,
  38585. "hovering": isHovering,
  38586. "item": item,
  38587. "onSelect": onSelect,
  38588. "onHover": onHover
  38589. }), {
  38590. default: (props2) => {
  38591. var _a2;
  38592. return ((_a2 = slots.default) == null ? void 0 : _a2.call(slots, props2)) || createVNode("span", null, [item.label]);
  38593. }
  38594. });
  38595. };
  38596. const {
  38597. onKeyboardNavigate,
  38598. onKeyboardSelect
  38599. } = select;
  38600. const onForward = () => {
  38601. onKeyboardNavigate("forward");
  38602. };
  38603. const onBackward = () => {
  38604. onKeyboardNavigate("backward");
  38605. };
  38606. const onEscOrTab = () => {
  38607. select.expanded = false;
  38608. };
  38609. const onKeydown = (e) => {
  38610. const {
  38611. code
  38612. } = e;
  38613. const {
  38614. tab,
  38615. esc,
  38616. down: down2,
  38617. up: up2,
  38618. enter
  38619. } = EVENT_CODE;
  38620. if (code !== tab) {
  38621. e.preventDefault();
  38622. e.stopPropagation();
  38623. }
  38624. switch (code) {
  38625. case tab:
  38626. case esc: {
  38627. onEscOrTab();
  38628. break;
  38629. }
  38630. case down2: {
  38631. onForward();
  38632. break;
  38633. }
  38634. case up2: {
  38635. onBackward();
  38636. break;
  38637. }
  38638. case enter: {
  38639. onKeyboardSelect();
  38640. break;
  38641. }
  38642. }
  38643. };
  38644. return () => {
  38645. var _a2;
  38646. const {
  38647. data,
  38648. width
  38649. } = props;
  38650. const {
  38651. height,
  38652. multiple,
  38653. scrollbarAlwaysOn
  38654. } = select.props;
  38655. if (data.length === 0) {
  38656. return createVNode("div", {
  38657. "class": ns2.b("dropdown"),
  38658. "style": {
  38659. width: `${width}px`
  38660. }
  38661. }, [(_a2 = slots.empty) == null ? void 0 : _a2.call(slots)]);
  38662. }
  38663. const List = unref(isSized) ? FixedSizeList : DynamicSizeList;
  38664. return createVNode("div", {
  38665. "class": [ns2.b("dropdown"), ns2.is("multiple", multiple)]
  38666. }, [createVNode(List, mergeProps({
  38667. "ref": listRef
  38668. }, unref(listProps), {
  38669. "className": ns2.be("dropdown", "list"),
  38670. "scrollbarAlwaysOn": scrollbarAlwaysOn,
  38671. "data": data,
  38672. "height": height,
  38673. "width": width,
  38674. "total": data.length,
  38675. "onKeydown": onKeydown
  38676. }), {
  38677. default: (props2) => createVNode(Item, props2, null)
  38678. })]);
  38679. };
  38680. }
  38681. });
  38682. // node_modules/element-plus/es/components/select-v2/src/useAllowCreate.mjs
  38683. function useAllowCreate(props, states) {
  38684. const createOptionCount = ref(0);
  38685. const cachedSelectedOption = ref(null);
  38686. const enableAllowCreateMode = computed2(() => {
  38687. return props.allowCreate && props.filterable;
  38688. });
  38689. function hasExistingOption(query) {
  38690. const hasValue = (option) => option.value === query;
  38691. return props.options && props.options.some(hasValue) || states.createdOptions.some(hasValue);
  38692. }
  38693. function selectNewOption(option) {
  38694. if (!enableAllowCreateMode.value) {
  38695. return;
  38696. }
  38697. if (props.multiple && option.created) {
  38698. createOptionCount.value++;
  38699. } else {
  38700. cachedSelectedOption.value = option;
  38701. }
  38702. }
  38703. function createNewOption(query) {
  38704. if (enableAllowCreateMode.value) {
  38705. if (query && query.length > 0 && !hasExistingOption(query)) {
  38706. const newOption = {
  38707. value: query,
  38708. label: query,
  38709. created: true,
  38710. disabled: false
  38711. };
  38712. if (states.createdOptions.length >= createOptionCount.value) {
  38713. states.createdOptions[createOptionCount.value] = newOption;
  38714. } else {
  38715. states.createdOptions.push(newOption);
  38716. }
  38717. } else {
  38718. if (props.multiple) {
  38719. states.createdOptions.length = createOptionCount.value;
  38720. } else {
  38721. const selectedOption = cachedSelectedOption.value;
  38722. states.createdOptions.length = 0;
  38723. if (selectedOption && selectedOption.created) {
  38724. states.createdOptions.push(selectedOption);
  38725. }
  38726. }
  38727. }
  38728. }
  38729. }
  38730. function removeNewOption(option) {
  38731. if (!enableAllowCreateMode.value || !option || !option.created || option.created && props.reserveKeyword && states.inputValue === option.label) {
  38732. return;
  38733. }
  38734. const idx = states.createdOptions.findIndex((it2) => it2.value === option.value);
  38735. if (~idx) {
  38736. states.createdOptions.splice(idx, 1);
  38737. createOptionCount.value--;
  38738. }
  38739. }
  38740. function clearAllNewOption() {
  38741. if (enableAllowCreateMode.value) {
  38742. states.createdOptions.length = 0;
  38743. createOptionCount.value = 0;
  38744. }
  38745. }
  38746. return {
  38747. createNewOption,
  38748. removeNewOption,
  38749. selectNewOption,
  38750. clearAllNewOption
  38751. };
  38752. }
  38753. // node_modules/element-plus/es/components/select-v2/src/util.mjs
  38754. var flattenOptions = (options) => {
  38755. const flattened = [];
  38756. options.forEach((option) => {
  38757. if (isArray(option.options)) {
  38758. flattened.push({
  38759. label: option.label,
  38760. isTitle: true,
  38761. type: "Group"
  38762. });
  38763. option.options.forEach((o2) => {
  38764. flattened.push(o2);
  38765. });
  38766. flattened.push({
  38767. type: "Group"
  38768. });
  38769. } else {
  38770. flattened.push(option);
  38771. }
  38772. });
  38773. return flattened;
  38774. };
  38775. // node_modules/element-plus/es/components/select-v2/src/useInput.mjs
  38776. function useInput(handleInput) {
  38777. const isComposing = ref(false);
  38778. const handleCompositionStart = () => {
  38779. isComposing.value = true;
  38780. };
  38781. const handleCompositionUpdate = (event) => {
  38782. const text = event.target.value;
  38783. const lastCharacter = text[text.length - 1] || "";
  38784. isComposing.value = !isKorean(lastCharacter);
  38785. };
  38786. const handleCompositionEnd = (event) => {
  38787. if (isComposing.value) {
  38788. isComposing.value = false;
  38789. if (isFunction(handleInput)) {
  38790. handleInput(event);
  38791. }
  38792. }
  38793. };
  38794. return {
  38795. handleCompositionStart,
  38796. handleCompositionUpdate,
  38797. handleCompositionEnd
  38798. };
  38799. }
  38800. // node_modules/element-plus/es/components/select-v2/src/useSelect.mjs
  38801. var DEFAULT_INPUT_PLACEHOLDER = "";
  38802. var MINIMUM_INPUT_WIDTH = 11;
  38803. var TAG_BASE_WIDTH = {
  38804. larget: 51,
  38805. default: 42,
  38806. small: 33
  38807. };
  38808. var useSelect2 = (props, emit) => {
  38809. const { t } = useLocale();
  38810. const nsSelectV2 = useNamespace("select-v2");
  38811. const nsInput = useNamespace("input");
  38812. const { form: elForm, formItem: elFormItem } = useFormItem();
  38813. const states = reactive({
  38814. inputValue: DEFAULT_INPUT_PLACEHOLDER,
  38815. displayInputValue: DEFAULT_INPUT_PLACEHOLDER,
  38816. calculatedWidth: 0,
  38817. cachedPlaceholder: "",
  38818. cachedOptions: [],
  38819. createdOptions: [],
  38820. createdLabel: "",
  38821. createdSelected: false,
  38822. currentPlaceholder: "",
  38823. hoveringIndex: -1,
  38824. comboBoxHovering: false,
  38825. isOnComposition: false,
  38826. isSilentBlur: false,
  38827. isComposing: false,
  38828. inputLength: 20,
  38829. selectWidth: 200,
  38830. initialInputHeight: 0,
  38831. previousQuery: null,
  38832. previousValue: void 0,
  38833. query: "",
  38834. selectedLabel: "",
  38835. softFocus: false,
  38836. tagInMultiLine: false
  38837. });
  38838. const selectedIndex = ref(-1);
  38839. const popperSize = ref(-1);
  38840. const controlRef = ref(null);
  38841. const inputRef = ref(null);
  38842. const menuRef = ref(null);
  38843. const popper = ref(null);
  38844. const selectRef = ref(null);
  38845. const selectionRef = ref(null);
  38846. const calculatorRef = ref(null);
  38847. const expanded = ref(false);
  38848. const selectDisabled = computed2(() => props.disabled || (elForm == null ? void 0 : elForm.disabled));
  38849. const popupHeight = computed2(() => {
  38850. const totalHeight = filteredOptions.value.length * 34;
  38851. return totalHeight > props.height ? props.height : totalHeight;
  38852. });
  38853. const hasModelValue = computed2(() => {
  38854. return !isNil_default(props.modelValue);
  38855. });
  38856. const showClearBtn = computed2(() => {
  38857. const hasValue = props.multiple ? Array.isArray(props.modelValue) && props.modelValue.length > 0 : hasModelValue.value;
  38858. const criteria = props.clearable && !selectDisabled.value && states.comboBoxHovering && hasValue;
  38859. return criteria;
  38860. });
  38861. const iconComponent = computed2(() => props.remote && props.filterable ? "" : arrow_up_default);
  38862. const iconReverse = computed2(() => iconComponent.value && nsSelectV2.is("reverse", expanded.value));
  38863. const validateState = computed2(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
  38864. const validateIcon = computed2(() => ValidateComponentsMap[validateState.value]);
  38865. const debounce$1 = computed2(() => props.remote ? 300 : 0);
  38866. const emptyText = computed2(() => {
  38867. const options = filteredOptions.value;
  38868. if (props.loading) {
  38869. return props.loadingText || t("el.select.loading");
  38870. } else {
  38871. if (props.remote && states.inputValue === "" && options.length === 0)
  38872. return false;
  38873. if (props.filterable && states.inputValue && options.length > 0) {
  38874. return props.noMatchText || t("el.select.noMatch");
  38875. }
  38876. if (options.length === 0) {
  38877. return props.noDataText || t("el.select.noData");
  38878. }
  38879. }
  38880. return null;
  38881. });
  38882. const filteredOptions = computed2(() => {
  38883. const isValidOption = (o2) => {
  38884. const query = states.inputValue;
  38885. const regexp4 = new RegExp(escapeStringRegexp(query), "i");
  38886. const containsQueryString = query ? regexp4.test(o2.label || "") : true;
  38887. return containsQueryString;
  38888. };
  38889. if (props.loading) {
  38890. return [];
  38891. }
  38892. return flattenOptions(props.options.concat(states.createdOptions).map((v2) => {
  38893. if (isArray(v2.options)) {
  38894. const filtered = v2.options.filter(isValidOption);
  38895. if (filtered.length > 0) {
  38896. return {
  38897. ...v2,
  38898. options: filtered
  38899. };
  38900. }
  38901. } else {
  38902. if (props.remote || isValidOption(v2)) {
  38903. return v2;
  38904. }
  38905. }
  38906. return null;
  38907. }).filter((v2) => v2 !== null));
  38908. });
  38909. const optionsAllDisabled = computed2(() => filteredOptions.value.every((option) => option.disabled));
  38910. const selectSize = useSize();
  38911. const collapseTagSize = computed2(() => selectSize.value === "small" ? "small" : "default");
  38912. const tagMaxWidth = computed2(() => {
  38913. const select = selectionRef.value;
  38914. const size3 = collapseTagSize.value || "default";
  38915. const paddingLeft = select ? Number.parseInt(getComputedStyle(select).paddingLeft) : 0;
  38916. const paddingRight = select ? Number.parseInt(getComputedStyle(select).paddingRight) : 0;
  38917. return states.selectWidth - paddingRight - paddingLeft - TAG_BASE_WIDTH[size3];
  38918. });
  38919. const calculatePopperSize = () => {
  38920. var _a2;
  38921. popperSize.value = ((_a2 = selectRef.value) == null ? void 0 : _a2.offsetWidth) || 200;
  38922. };
  38923. const inputWrapperStyle = computed2(() => {
  38924. return {
  38925. width: `${states.calculatedWidth === 0 ? MINIMUM_INPUT_WIDTH : Math.ceil(states.calculatedWidth) + MINIMUM_INPUT_WIDTH}px`
  38926. };
  38927. });
  38928. const shouldShowPlaceholder = computed2(() => {
  38929. if (isArray(props.modelValue)) {
  38930. return props.modelValue.length === 0 && !states.displayInputValue;
  38931. }
  38932. return props.filterable ? states.displayInputValue.length === 0 : true;
  38933. });
  38934. const currentPlaceholder = computed2(() => {
  38935. const _placeholder = props.placeholder || t("el.select.placeholder");
  38936. return props.multiple || isNil_default(props.modelValue) ? _placeholder : states.selectedLabel;
  38937. });
  38938. const popperRef = computed2(() => {
  38939. var _a2, _b;
  38940. return (_b = (_a2 = popper.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef;
  38941. });
  38942. const indexRef = computed2(() => {
  38943. if (props.multiple) {
  38944. const len = props.modelValue.length;
  38945. if (props.modelValue.length > 0) {
  38946. return filteredOptions.value.findIndex((o2) => o2.value === props.modelValue[len - 1]);
  38947. }
  38948. } else {
  38949. if (props.modelValue) {
  38950. return filteredOptions.value.findIndex((o2) => o2.value === props.modelValue);
  38951. }
  38952. }
  38953. return -1;
  38954. });
  38955. const dropdownMenuVisible = computed2({
  38956. get() {
  38957. return expanded.value && emptyText.value !== false;
  38958. },
  38959. set(val) {
  38960. expanded.value = val;
  38961. }
  38962. });
  38963. const {
  38964. createNewOption,
  38965. removeNewOption,
  38966. selectNewOption,
  38967. clearAllNewOption
  38968. } = useAllowCreate(props, states);
  38969. const {
  38970. handleCompositionStart,
  38971. handleCompositionUpdate,
  38972. handleCompositionEnd
  38973. } = useInput((e) => onInput(e));
  38974. const focusAndUpdatePopup = () => {
  38975. var _a2, _b, _c;
  38976. (_b = (_a2 = inputRef.value).focus) == null ? void 0 : _b.call(_a2);
  38977. (_c = popper.value) == null ? void 0 : _c.updatePopper();
  38978. };
  38979. const toggleMenu = () => {
  38980. if (props.automaticDropdown)
  38981. return;
  38982. if (!selectDisabled.value) {
  38983. if (states.isComposing)
  38984. states.softFocus = true;
  38985. return nextTick(() => {
  38986. var _a2, _b;
  38987. expanded.value = !expanded.value;
  38988. (_b = (_a2 = inputRef.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
  38989. });
  38990. }
  38991. };
  38992. const onInputChange = () => {
  38993. if (props.filterable && states.inputValue !== states.selectedLabel) {
  38994. states.query = states.selectedLabel;
  38995. }
  38996. handleQueryChange(states.inputValue);
  38997. return nextTick(() => {
  38998. createNewOption(states.inputValue);
  38999. });
  39000. };
  39001. const debouncedOnInputChange = debounce_default(onInputChange, debounce$1.value);
  39002. const handleQueryChange = (val) => {
  39003. if (states.previousQuery === val) {
  39004. return;
  39005. }
  39006. states.previousQuery = val;
  39007. if (props.filterable && isFunction(props.filterMethod)) {
  39008. props.filterMethod(val);
  39009. } else if (props.filterable && props.remote && isFunction(props.remoteMethod)) {
  39010. props.remoteMethod(val);
  39011. }
  39012. };
  39013. const emitChange = (val) => {
  39014. if (!isEqual_default(props.modelValue, val)) {
  39015. emit(CHANGE_EVENT, val);
  39016. }
  39017. };
  39018. const update2 = (val) => {
  39019. emit(UPDATE_MODEL_EVENT, val);
  39020. emitChange(val);
  39021. states.previousValue = val == null ? void 0 : val.toString();
  39022. };
  39023. const getValueIndex = (arr = [], value) => {
  39024. if (!isObject(value)) {
  39025. return arr.indexOf(value);
  39026. }
  39027. const valueKey = props.valueKey;
  39028. let index = -1;
  39029. arr.some((item, i) => {
  39030. if (get_default(item, valueKey) === get_default(value, valueKey)) {
  39031. index = i;
  39032. return true;
  39033. }
  39034. return false;
  39035. });
  39036. return index;
  39037. };
  39038. const getValueKey = (item) => {
  39039. return isObject(item) ? get_default(item, props.valueKey) : item;
  39040. };
  39041. const getLabel = (item) => {
  39042. return isObject(item) ? item.label : item;
  39043. };
  39044. const resetInputHeight = () => {
  39045. if (props.collapseTags && !props.filterable) {
  39046. return;
  39047. }
  39048. return nextTick(() => {
  39049. var _a2, _b;
  39050. if (!inputRef.value)
  39051. return;
  39052. const selection = selectionRef.value;
  39053. selectRef.value.height = selection.offsetHeight;
  39054. if (expanded.value && emptyText.value !== false) {
  39055. (_b = (_a2 = popper.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  39056. }
  39057. });
  39058. };
  39059. const handleResize = () => {
  39060. var _a2, _b;
  39061. resetInputWidth();
  39062. calculatePopperSize();
  39063. (_b = (_a2 = popper.value) == null ? void 0 : _a2.updatePopper) == null ? void 0 : _b.call(_a2);
  39064. if (props.multiple) {
  39065. return resetInputHeight();
  39066. }
  39067. };
  39068. const resetInputWidth = () => {
  39069. const select = selectionRef.value;
  39070. if (select) {
  39071. states.selectWidth = select.getBoundingClientRect().width;
  39072. }
  39073. };
  39074. const onSelect = (option, idx, byClick = true) => {
  39075. var _a2, _b;
  39076. if (props.multiple) {
  39077. let selectedOptions = props.modelValue.slice();
  39078. const index = getValueIndex(selectedOptions, getValueKey(option));
  39079. if (index > -1) {
  39080. selectedOptions = [
  39081. ...selectedOptions.slice(0, index),
  39082. ...selectedOptions.slice(index + 1)
  39083. ];
  39084. states.cachedOptions.splice(index, 1);
  39085. removeNewOption(option);
  39086. } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {
  39087. selectedOptions = [...selectedOptions, getValueKey(option)];
  39088. states.cachedOptions.push(option);
  39089. selectNewOption(option);
  39090. updateHoveringIndex(idx);
  39091. }
  39092. update2(selectedOptions);
  39093. if (option.created) {
  39094. states.query = "";
  39095. handleQueryChange("");
  39096. states.inputLength = 20;
  39097. }
  39098. if (props.filterable && !props.reserveKeyword) {
  39099. (_b = (_a2 = inputRef.value).focus) == null ? void 0 : _b.call(_a2);
  39100. onUpdateInputValue("");
  39101. }
  39102. if (props.filterable) {
  39103. states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width;
  39104. }
  39105. resetInputHeight();
  39106. setSoftFocus();
  39107. } else {
  39108. selectedIndex.value = idx;
  39109. states.selectedLabel = option.label;
  39110. update2(getValueKey(option));
  39111. expanded.value = false;
  39112. states.isComposing = false;
  39113. states.isSilentBlur = byClick;
  39114. selectNewOption(option);
  39115. if (!option.created) {
  39116. clearAllNewOption();
  39117. }
  39118. updateHoveringIndex(idx);
  39119. }
  39120. };
  39121. const deleteTag = (event, tag) => {
  39122. const { valueKey } = props;
  39123. const index = props.modelValue.indexOf(get_default(tag, valueKey));
  39124. if (index > -1 && !selectDisabled.value) {
  39125. const value = [
  39126. ...props.modelValue.slice(0, index),
  39127. ...props.modelValue.slice(index + 1)
  39128. ];
  39129. states.cachedOptions.splice(index, 1);
  39130. update2(value);
  39131. emit("remove-tag", get_default(tag, valueKey));
  39132. states.softFocus = true;
  39133. removeNewOption(tag);
  39134. return nextTick(focusAndUpdatePopup);
  39135. }
  39136. event.stopPropagation();
  39137. };
  39138. const handleFocus = (event) => {
  39139. const focused = states.isComposing;
  39140. states.isComposing = true;
  39141. if (!states.softFocus) {
  39142. if (!focused)
  39143. emit("focus", event);
  39144. } else {
  39145. states.softFocus = false;
  39146. }
  39147. };
  39148. const handleBlur = (event) => {
  39149. states.softFocus = false;
  39150. return nextTick(() => {
  39151. var _a2, _b;
  39152. (_b = (_a2 = inputRef.value) == null ? void 0 : _a2.blur) == null ? void 0 : _b.call(_a2);
  39153. if (calculatorRef.value) {
  39154. states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width;
  39155. }
  39156. if (states.isSilentBlur) {
  39157. states.isSilentBlur = false;
  39158. } else {
  39159. if (states.isComposing) {
  39160. emit("blur", event);
  39161. }
  39162. }
  39163. states.isComposing = false;
  39164. });
  39165. };
  39166. const handleEsc = () => {
  39167. if (states.displayInputValue.length > 0) {
  39168. onUpdateInputValue("");
  39169. } else {
  39170. expanded.value = false;
  39171. }
  39172. };
  39173. const handleDel = (e) => {
  39174. if (states.displayInputValue.length === 0) {
  39175. e.preventDefault();
  39176. const selected = props.modelValue.slice();
  39177. selected.pop();
  39178. removeNewOption(states.cachedOptions.pop());
  39179. update2(selected);
  39180. }
  39181. };
  39182. const handleClear = () => {
  39183. let emptyValue;
  39184. if (isArray(props.modelValue)) {
  39185. emptyValue = [];
  39186. } else {
  39187. emptyValue = void 0;
  39188. }
  39189. states.softFocus = true;
  39190. if (props.multiple) {
  39191. states.cachedOptions = [];
  39192. } else {
  39193. states.selectedLabel = "";
  39194. }
  39195. expanded.value = false;
  39196. update2(emptyValue);
  39197. emit("clear");
  39198. clearAllNewOption();
  39199. return nextTick(focusAndUpdatePopup);
  39200. };
  39201. const onUpdateInputValue = (val) => {
  39202. states.displayInputValue = val;
  39203. states.inputValue = val;
  39204. };
  39205. const onKeyboardNavigate = (direction2, hoveringIndex = void 0) => {
  39206. const options = filteredOptions.value;
  39207. if (!["forward", "backward"].includes(direction2) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value) {
  39208. return;
  39209. }
  39210. if (!expanded.value) {
  39211. return toggleMenu();
  39212. }
  39213. if (hoveringIndex === void 0) {
  39214. hoveringIndex = states.hoveringIndex;
  39215. }
  39216. let newIndex = -1;
  39217. if (direction2 === "forward") {
  39218. newIndex = hoveringIndex + 1;
  39219. if (newIndex >= options.length) {
  39220. newIndex = 0;
  39221. }
  39222. } else if (direction2 === "backward") {
  39223. newIndex = hoveringIndex - 1;
  39224. if (newIndex < 0 || newIndex >= options.length) {
  39225. newIndex = options.length - 1;
  39226. }
  39227. }
  39228. const option = options[newIndex];
  39229. if (option.disabled || option.type === "Group") {
  39230. return onKeyboardNavigate(direction2, newIndex);
  39231. } else {
  39232. updateHoveringIndex(newIndex);
  39233. scrollToItem(newIndex);
  39234. }
  39235. };
  39236. const onKeyboardSelect = () => {
  39237. if (!expanded.value) {
  39238. return toggleMenu();
  39239. } else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) {
  39240. onSelect(filteredOptions.value[states.hoveringIndex], states.hoveringIndex, false);
  39241. }
  39242. };
  39243. const updateHoveringIndex = (idx) => {
  39244. states.hoveringIndex = idx;
  39245. };
  39246. const resetHoveringIndex = () => {
  39247. states.hoveringIndex = -1;
  39248. };
  39249. const setSoftFocus = () => {
  39250. var _a2;
  39251. const _input = inputRef.value;
  39252. if (_input) {
  39253. (_a2 = _input.focus) == null ? void 0 : _a2.call(_input);
  39254. }
  39255. };
  39256. const onInput = (event) => {
  39257. const value = event.target.value;
  39258. onUpdateInputValue(value);
  39259. if (states.displayInputValue.length > 0 && !expanded.value) {
  39260. expanded.value = true;
  39261. }
  39262. states.calculatedWidth = calculatorRef.value.getBoundingClientRect().width;
  39263. if (props.multiple) {
  39264. resetInputHeight();
  39265. }
  39266. if (props.remote) {
  39267. debouncedOnInputChange();
  39268. } else {
  39269. return onInputChange();
  39270. }
  39271. };
  39272. const handleClickOutside = () => {
  39273. expanded.value = false;
  39274. return handleBlur();
  39275. };
  39276. const handleMenuEnter = () => {
  39277. states.inputValue = states.displayInputValue;
  39278. return nextTick(() => {
  39279. if (~indexRef.value) {
  39280. updateHoveringIndex(indexRef.value);
  39281. scrollToItem(states.hoveringIndex);
  39282. }
  39283. });
  39284. };
  39285. const scrollToItem = (index) => {
  39286. menuRef.value.scrollToItem(index);
  39287. };
  39288. const initStates = () => {
  39289. resetHoveringIndex();
  39290. if (props.multiple) {
  39291. if (props.modelValue.length > 0) {
  39292. let initHovering = false;
  39293. states.cachedOptions.length = 0;
  39294. states.previousValue = props.modelValue.toString();
  39295. props.modelValue.forEach((selected) => {
  39296. const itemIndex = filteredOptions.value.findIndex((option) => getValueKey(option) === selected);
  39297. if (~itemIndex) {
  39298. states.cachedOptions.push(filteredOptions.value[itemIndex]);
  39299. if (!initHovering) {
  39300. updateHoveringIndex(itemIndex);
  39301. }
  39302. initHovering = true;
  39303. }
  39304. });
  39305. } else {
  39306. states.cachedOptions = [];
  39307. states.previousValue = void 0;
  39308. }
  39309. } else {
  39310. if (hasModelValue.value) {
  39311. states.previousValue = props.modelValue;
  39312. const options = filteredOptions.value;
  39313. const selectedItemIndex = options.findIndex((option) => getValueKey(option) === getValueKey(props.modelValue));
  39314. if (~selectedItemIndex) {
  39315. states.selectedLabel = options[selectedItemIndex].label;
  39316. updateHoveringIndex(selectedItemIndex);
  39317. } else {
  39318. states.selectedLabel = `${props.modelValue}`;
  39319. }
  39320. } else {
  39321. states.selectedLabel = "";
  39322. states.previousValue = void 0;
  39323. }
  39324. }
  39325. clearAllNewOption();
  39326. calculatePopperSize();
  39327. };
  39328. watch(expanded, (val) => {
  39329. var _a2, _b;
  39330. emit("visible-change", val);
  39331. if (val) {
  39332. (_b = (_a2 = popper.value).update) == null ? void 0 : _b.call(_a2);
  39333. } else {
  39334. states.displayInputValue = "";
  39335. states.previousQuery = null;
  39336. createNewOption("");
  39337. }
  39338. });
  39339. watch(() => props.modelValue, (val, oldVal) => {
  39340. var _a2;
  39341. if (!val || val.toString() !== states.previousValue) {
  39342. initStates();
  39343. }
  39344. if (!isEqual_default(val, oldVal) && props.validateEvent) {
  39345. (_a2 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a2.call(elFormItem, "change").catch((err) => debugWarn(err));
  39346. }
  39347. }, {
  39348. deep: true
  39349. });
  39350. watch(() => props.options, () => {
  39351. const input = inputRef.value;
  39352. if (!input || input && document.activeElement !== input) {
  39353. initStates();
  39354. }
  39355. }, {
  39356. deep: true
  39357. });
  39358. watch(filteredOptions, () => {
  39359. return nextTick(menuRef.value.resetScrollTop);
  39360. });
  39361. onMounted(() => {
  39362. initStates();
  39363. });
  39364. useResizeObserver(selectRef, handleResize);
  39365. return {
  39366. collapseTagSize,
  39367. currentPlaceholder,
  39368. expanded,
  39369. emptyText,
  39370. popupHeight,
  39371. debounce: debounce$1,
  39372. filteredOptions,
  39373. iconComponent,
  39374. iconReverse,
  39375. inputWrapperStyle,
  39376. popperSize,
  39377. dropdownMenuVisible,
  39378. hasModelValue,
  39379. shouldShowPlaceholder,
  39380. selectDisabled,
  39381. selectSize,
  39382. showClearBtn,
  39383. states,
  39384. tagMaxWidth,
  39385. nsSelectV2,
  39386. nsInput,
  39387. calculatorRef,
  39388. controlRef,
  39389. inputRef,
  39390. menuRef,
  39391. popper,
  39392. selectRef,
  39393. selectionRef,
  39394. popperRef,
  39395. validateState,
  39396. validateIcon,
  39397. debouncedOnInputChange,
  39398. deleteTag,
  39399. getLabel,
  39400. getValueKey,
  39401. handleBlur,
  39402. handleClear,
  39403. handleClickOutside,
  39404. handleDel,
  39405. handleEsc,
  39406. handleFocus,
  39407. handleMenuEnter,
  39408. handleResize,
  39409. toggleMenu,
  39410. scrollTo: scrollToItem,
  39411. onInput,
  39412. onKeyboardNavigate,
  39413. onKeyboardSelect,
  39414. onSelect,
  39415. onHover: updateHoveringIndex,
  39416. onUpdateInputValue,
  39417. handleCompositionStart,
  39418. handleCompositionEnd,
  39419. handleCompositionUpdate
  39420. };
  39421. };
  39422. // node_modules/element-plus/es/components/select-v2/src/select.mjs
  39423. var _sfc_main110 = defineComponent({
  39424. name: "ElSelectV2",
  39425. components: {
  39426. ElSelectMenu: ElSelectMenu2,
  39427. ElTag,
  39428. ElTooltip,
  39429. ElIcon
  39430. },
  39431. directives: { ClickOutside, ModelText: vModelText },
  39432. props: SelectProps,
  39433. emits: [
  39434. UPDATE_MODEL_EVENT,
  39435. CHANGE_EVENT,
  39436. "remove-tag",
  39437. "clear",
  39438. "visible-change",
  39439. "focus",
  39440. "blur"
  39441. ],
  39442. setup(props, { emit }) {
  39443. const modelValue = computed2(() => {
  39444. const { modelValue: rawModelValue, multiple } = props;
  39445. const fallback = multiple ? [] : void 0;
  39446. if (isArray(rawModelValue)) {
  39447. return multiple ? rawModelValue : fallback;
  39448. }
  39449. return multiple ? fallback : rawModelValue;
  39450. });
  39451. const API = useSelect2(reactive({
  39452. ...toRefs(props),
  39453. modelValue
  39454. }), emit);
  39455. provide(selectV2InjectionKey, {
  39456. props: reactive({
  39457. ...toRefs(props),
  39458. height: API.popupHeight,
  39459. modelValue
  39460. }),
  39461. popper: API.popper,
  39462. onSelect: API.onSelect,
  39463. onHover: API.onHover,
  39464. onKeyboardNavigate: API.onKeyboardNavigate,
  39465. onKeyboardSelect: API.onKeyboardSelect
  39466. });
  39467. return {
  39468. ...API,
  39469. modelValue
  39470. };
  39471. }
  39472. });
  39473. var _hoisted_155 = { key: 0 };
  39474. var _hoisted_234 = ["id", "autocomplete", "aria-expanded", "aria-labelledby", "disabled", "readonly", "name", "unselectable"];
  39475. var _hoisted_316 = ["textContent"];
  39476. var _hoisted_49 = ["id", "aria-labelledby", "aria-expanded", "autocomplete", "disabled", "name", "readonly", "unselectable"];
  39477. var _hoisted_56 = ["textContent"];
  39478. function _sfc_render30(_ctx, _cache, $props, $setup, $data, $options) {
  39479. const _component_el_tag = resolveComponent("el-tag");
  39480. const _component_el_tooltip = resolveComponent("el-tooltip");
  39481. const _component_el_icon = resolveComponent("el-icon");
  39482. const _component_el_select_menu = resolveComponent("el-select-menu");
  39483. const _directive_model_text = resolveDirective("model-text");
  39484. const _directive_click_outside = resolveDirective("click-outside");
  39485. return withDirectives((openBlock(), createElementBlock("div", {
  39486. ref: "selectRef",
  39487. class: normalizeClass([_ctx.nsSelectV2.b(), _ctx.nsSelectV2.m(_ctx.selectSize)]),
  39488. onClick: _cache[25] || (_cache[25] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"])),
  39489. onMouseenter: _cache[26] || (_cache[26] = ($event) => _ctx.states.comboBoxHovering = true),
  39490. onMouseleave: _cache[27] || (_cache[27] = ($event) => _ctx.states.comboBoxHovering = false)
  39491. }, [
  39492. createVNode(_component_el_tooltip, {
  39493. ref: "popper",
  39494. visible: _ctx.dropdownMenuVisible,
  39495. teleported: _ctx.teleported,
  39496. "popper-class": [_ctx.nsSelectV2.e("popper"), _ctx.popperClass],
  39497. "gpu-acceleration": false,
  39498. "stop-popper-mouse-event": false,
  39499. "popper-options": _ctx.popperOptions,
  39500. "fallback-placements": ["bottom-start", "top-start", "right", "left"],
  39501. effect: _ctx.effect,
  39502. placement: _ctx.placement,
  39503. pure: "",
  39504. transition: `${_ctx.nsSelectV2.namespace.value}-zoom-in-top`,
  39505. trigger: "click",
  39506. persistent: _ctx.persistent,
  39507. onBeforeShow: _ctx.handleMenuEnter,
  39508. onHide: _cache[24] || (_cache[24] = ($event) => _ctx.states.inputValue = _ctx.states.displayInputValue)
  39509. }, {
  39510. default: withCtx(() => {
  39511. var _a2;
  39512. return [
  39513. createBaseVNode("div", {
  39514. ref: "selectionRef",
  39515. class: normalizeClass([
  39516. _ctx.nsSelectV2.e("wrapper"),
  39517. _ctx.nsSelectV2.is("focused", _ctx.states.isComposing || _ctx.expanded),
  39518. _ctx.nsSelectV2.is("hovering", _ctx.states.comboBoxHovering),
  39519. _ctx.nsSelectV2.is("filterable", _ctx.filterable),
  39520. _ctx.nsSelectV2.is("disabled", _ctx.selectDisabled)
  39521. ])
  39522. }, [
  39523. _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_155, [
  39524. renderSlot(_ctx.$slots, "prefix")
  39525. ])) : createCommentVNode("v-if", true),
  39526. _ctx.multiple ? (openBlock(), createElementBlock("div", {
  39527. key: 1,
  39528. class: normalizeClass(_ctx.nsSelectV2.e("selection"))
  39529. }, [
  39530. _ctx.collapseTags && _ctx.modelValue.length > 0 ? (openBlock(), createElementBlock("div", {
  39531. key: 0,
  39532. class: normalizeClass(_ctx.nsSelectV2.e("selected-item"))
  39533. }, [
  39534. createVNode(_component_el_tag, {
  39535. closable: !_ctx.selectDisabled && !((_a2 = _ctx.states.cachedOptions[0]) == null ? void 0 : _a2.disable),
  39536. size: _ctx.collapseTagSize,
  39537. type: "info",
  39538. "disable-transitions": "",
  39539. onClose: _cache[0] || (_cache[0] = ($event) => _ctx.deleteTag($event, _ctx.states.cachedOptions[0]))
  39540. }, {
  39541. default: withCtx(() => {
  39542. var _a22;
  39543. return [
  39544. createBaseVNode("span", {
  39545. class: normalizeClass(_ctx.nsSelectV2.e("tags-text")),
  39546. style: normalizeStyle({
  39547. maxWidth: `${_ctx.tagMaxWidth}px`
  39548. })
  39549. }, toDisplayString((_a22 = _ctx.states.cachedOptions[0]) == null ? void 0 : _a22.label), 7)
  39550. ];
  39551. }),
  39552. _: 1
  39553. }, 8, ["closable", "size"]),
  39554. _ctx.modelValue.length > 1 ? (openBlock(), createBlock(_component_el_tag, {
  39555. key: 0,
  39556. closable: false,
  39557. size: _ctx.collapseTagSize,
  39558. type: "info",
  39559. "disable-transitions": ""
  39560. }, {
  39561. default: withCtx(() => [
  39562. _ctx.collapseTagsTooltip ? (openBlock(), createBlock(_component_el_tooltip, {
  39563. key: 0,
  39564. disabled: _ctx.dropdownMenuVisible,
  39565. "fallback-placements": ["bottom", "top", "right", "left"],
  39566. effect: _ctx.effect,
  39567. placement: "bottom",
  39568. teleported: false
  39569. }, {
  39570. default: withCtx(() => [
  39571. createBaseVNode("span", {
  39572. class: normalizeClass(_ctx.nsSelectV2.e("tags-text")),
  39573. style: normalizeStyle({
  39574. maxWidth: `${_ctx.tagMaxWidth}px`
  39575. })
  39576. }, "+ " + toDisplayString(_ctx.modelValue.length - 1), 7)
  39577. ]),
  39578. content: withCtx(() => [
  39579. createBaseVNode("div", {
  39580. class: normalizeClass(_ctx.nsSelectV2.e("selection"))
  39581. }, [
  39582. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.states.cachedOptions.slice(1), (selected, idx) => {
  39583. return openBlock(), createElementBlock("div", {
  39584. key: idx,
  39585. class: normalizeClass(_ctx.nsSelectV2.e("selected-item"))
  39586. }, [
  39587. (openBlock(), createBlock(_component_el_tag, {
  39588. key: _ctx.getValueKey(selected),
  39589. closable: !_ctx.selectDisabled && !selected.disabled,
  39590. size: _ctx.collapseTagSize,
  39591. class: "in-tooltip",
  39592. type: "info",
  39593. "disable-transitions": "",
  39594. onClose: ($event) => _ctx.deleteTag($event, selected)
  39595. }, {
  39596. default: withCtx(() => [
  39597. createBaseVNode("span", {
  39598. class: normalizeClass(_ctx.nsSelectV2.e("tags-text")),
  39599. style: normalizeStyle({
  39600. maxWidth: `${_ctx.tagMaxWidth}px`
  39601. })
  39602. }, toDisplayString(_ctx.getLabel(selected)), 7)
  39603. ]),
  39604. _: 2
  39605. }, 1032, ["closable", "size", "onClose"]))
  39606. ], 2);
  39607. }), 128))
  39608. ], 2)
  39609. ]),
  39610. _: 1
  39611. }, 8, ["disabled", "effect"])) : (openBlock(), createElementBlock("span", {
  39612. key: 1,
  39613. class: normalizeClass(_ctx.nsSelectV2.e("tags-text")),
  39614. style: normalizeStyle({
  39615. maxWidth: `${_ctx.tagMaxWidth}px`
  39616. })
  39617. }, "+ " + toDisplayString(_ctx.modelValue.length - 1), 7))
  39618. ]),
  39619. _: 1
  39620. }, 8, ["size"])) : createCommentVNode("v-if", true)
  39621. ], 2)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.states.cachedOptions, (selected, idx) => {
  39622. return openBlock(), createElementBlock("div", {
  39623. key: idx,
  39624. class: normalizeClass(_ctx.nsSelectV2.e("selected-item"))
  39625. }, [
  39626. (openBlock(), createBlock(_component_el_tag, {
  39627. key: _ctx.getValueKey(selected),
  39628. closable: !_ctx.selectDisabled && !selected.disabled,
  39629. size: _ctx.collapseTagSize,
  39630. type: "info",
  39631. "disable-transitions": "",
  39632. onClose: ($event) => _ctx.deleteTag($event, selected)
  39633. }, {
  39634. default: withCtx(() => [
  39635. createBaseVNode("span", {
  39636. class: normalizeClass(_ctx.nsSelectV2.e("tags-text")),
  39637. style: normalizeStyle({
  39638. maxWidth: `${_ctx.tagMaxWidth}px`
  39639. })
  39640. }, toDisplayString(_ctx.getLabel(selected)), 7)
  39641. ]),
  39642. _: 2
  39643. }, 1032, ["closable", "size", "onClose"]))
  39644. ], 2);
  39645. }), 128)),
  39646. createBaseVNode("div", {
  39647. class: normalizeClass([
  39648. _ctx.nsSelectV2.e("selected-item"),
  39649. _ctx.nsSelectV2.e("input-wrapper")
  39650. ]),
  39651. style: normalizeStyle(_ctx.inputWrapperStyle)
  39652. }, [
  39653. withDirectives(createBaseVNode("input", {
  39654. id: _ctx.id,
  39655. ref: "inputRef",
  39656. autocomplete: _ctx.autocomplete,
  39657. "aria-autocomplete": "list",
  39658. "aria-haspopup": "listbox",
  39659. autocapitalize: "off",
  39660. "aria-expanded": _ctx.expanded,
  39661. "aria-labelledby": _ctx.label,
  39662. class: normalizeClass([
  39663. _ctx.nsSelectV2.is(_ctx.selectSize),
  39664. _ctx.nsSelectV2.e("combobox-input")
  39665. ]),
  39666. disabled: _ctx.disabled,
  39667. role: "combobox",
  39668. readonly: !_ctx.filterable,
  39669. spellcheck: "false",
  39670. type: "text",
  39671. name: _ctx.name,
  39672. unselectable: _ctx.expanded ? "on" : void 0,
  39673. "onUpdate:modelValue": _cache[1] || (_cache[1] = (...args) => _ctx.onUpdateInputValue && _ctx.onUpdateInputValue(...args)),
  39674. onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  39675. onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
  39676. onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
  39677. onCompositionstart: _cache[5] || (_cache[5] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
  39678. onCompositionupdate: _cache[6] || (_cache[6] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
  39679. onCompositionend: _cache[7] || (_cache[7] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
  39680. onKeydown: [
  39681. _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
  39682. _cache[9] || (_cache[9] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
  39683. _cache[10] || (_cache[10] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])),
  39684. _cache[11] || (_cache[11] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])),
  39685. _cache[12] || (_cache[12] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"]))
  39686. ]
  39687. }, null, 42, _hoisted_234), [
  39688. [_directive_model_text, _ctx.states.displayInputValue]
  39689. ]),
  39690. _ctx.filterable ? (openBlock(), createElementBlock("span", {
  39691. key: 0,
  39692. ref: "calculatorRef",
  39693. "aria-hidden": "true",
  39694. class: normalizeClass(_ctx.nsSelectV2.e("input-calculator")),
  39695. textContent: toDisplayString(_ctx.states.displayInputValue)
  39696. }, null, 10, _hoisted_316)) : createCommentVNode("v-if", true)
  39697. ], 6)
  39698. ], 2)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
  39699. createBaseVNode("div", {
  39700. class: normalizeClass([
  39701. _ctx.nsSelectV2.e("selected-item"),
  39702. _ctx.nsSelectV2.e("input-wrapper")
  39703. ])
  39704. }, [
  39705. withDirectives(createBaseVNode("input", {
  39706. id: _ctx.id,
  39707. ref: "inputRef",
  39708. "aria-autocomplete": "list",
  39709. "aria-haspopup": "listbox",
  39710. "aria-labelledby": _ctx.label,
  39711. "aria-expanded": _ctx.expanded,
  39712. autocapitalize: "off",
  39713. autocomplete: _ctx.autocomplete,
  39714. class: normalizeClass(_ctx.nsSelectV2.e("combobox-input")),
  39715. disabled: _ctx.disabled,
  39716. name: _ctx.name,
  39717. role: "combobox",
  39718. readonly: !_ctx.filterable,
  39719. spellcheck: "false",
  39720. type: "text",
  39721. unselectable: _ctx.expanded ? "on" : void 0,
  39722. onCompositionstart: _cache[13] || (_cache[13] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
  39723. onCompositionupdate: _cache[14] || (_cache[14] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
  39724. onCompositionend: _cache[15] || (_cache[15] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
  39725. onFocus: _cache[16] || (_cache[16] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
  39726. onBlur: _cache[17] || (_cache[17] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
  39727. onInput: _cache[18] || (_cache[18] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
  39728. onKeydown: [
  39729. _cache[19] || (_cache[19] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
  39730. _cache[20] || (_cache[20] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
  39731. _cache[21] || (_cache[21] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])),
  39732. _cache[22] || (_cache[22] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"]))
  39733. ],
  39734. "onUpdate:modelValue": _cache[23] || (_cache[23] = (...args) => _ctx.onUpdateInputValue && _ctx.onUpdateInputValue(...args))
  39735. }, null, 42, _hoisted_49), [
  39736. [_directive_model_text, _ctx.states.displayInputValue]
  39737. ])
  39738. ], 2),
  39739. _ctx.filterable ? (openBlock(), createElementBlock("span", {
  39740. key: 0,
  39741. ref: "calculatorRef",
  39742. "aria-hidden": "true",
  39743. class: normalizeClass([
  39744. _ctx.nsSelectV2.e("selected-item"),
  39745. _ctx.nsSelectV2.e("input-calculator")
  39746. ]),
  39747. textContent: toDisplayString(_ctx.states.displayInputValue)
  39748. }, null, 10, _hoisted_56)) : createCommentVNode("v-if", true)
  39749. ], 64)),
  39750. _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("span", {
  39751. key: 3,
  39752. class: normalizeClass([
  39753. _ctx.nsSelectV2.e("placeholder"),
  39754. _ctx.nsSelectV2.is("transparent", _ctx.multiple ? _ctx.modelValue.length === 0 : !_ctx.hasModelValue)
  39755. ])
  39756. }, toDisplayString(_ctx.currentPlaceholder), 3)) : createCommentVNode("v-if", true),
  39757. createBaseVNode("span", {
  39758. class: normalizeClass(_ctx.nsSelectV2.e("suffix"))
  39759. }, [
  39760. _ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, {
  39761. key: 0,
  39762. class: normalizeClass([_ctx.nsSelectV2.e("caret"), _ctx.nsInput.e("icon"), _ctx.iconReverse])
  39763. }, {
  39764. default: withCtx(() => [
  39765. (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
  39766. ]),
  39767. _: 1
  39768. }, 8, ["class"])), [
  39769. [vShow, !_ctx.showClearBtn]
  39770. ]) : createCommentVNode("v-if", true),
  39771. _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
  39772. key: 1,
  39773. class: normalizeClass([_ctx.nsSelectV2.e("caret"), _ctx.nsInput.e("icon")]),
  39774. onClick: withModifiers(_ctx.handleClear, ["prevent", "stop"])
  39775. }, {
  39776. default: withCtx(() => [
  39777. (openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))
  39778. ]),
  39779. _: 1
  39780. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  39781. _ctx.validateState && _ctx.validateIcon ? (openBlock(), createBlock(_component_el_icon, {
  39782. key: 2,
  39783. class: normalizeClass([_ctx.nsInput.e("icon"), _ctx.nsInput.e("validateIcon")])
  39784. }, {
  39785. default: withCtx(() => [
  39786. (openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))
  39787. ]),
  39788. _: 1
  39789. }, 8, ["class"])) : createCommentVNode("v-if", true)
  39790. ], 2)
  39791. ], 2)
  39792. ];
  39793. }),
  39794. content: withCtx(() => [
  39795. createVNode(_component_el_select_menu, {
  39796. ref: "menuRef",
  39797. data: _ctx.filteredOptions,
  39798. width: _ctx.popperSize,
  39799. "hovering-index": _ctx.states.hoveringIndex,
  39800. "scrollbar-always-on": _ctx.scrollbarAlwaysOn
  39801. }, {
  39802. default: withCtx((scope) => [
  39803. renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))
  39804. ]),
  39805. empty: withCtx(() => [
  39806. renderSlot(_ctx.$slots, "empty", {}, () => [
  39807. createBaseVNode("p", {
  39808. class: normalizeClass(_ctx.nsSelectV2.e("empty"))
  39809. }, toDisplayString(_ctx.emptyText ? _ctx.emptyText : ""), 3)
  39810. ])
  39811. ]),
  39812. _: 3
  39813. }, 8, ["data", "width", "hovering-index", "scrollbar-always-on"])
  39814. ]),
  39815. _: 3
  39816. }, 8, ["visible", "teleported", "popper-class", "popper-options", "effect", "placement", "transition", "persistent", "onBeforeShow"])
  39817. ], 34)), [
  39818. [_directive_click_outside, _ctx.handleClickOutside, _ctx.popperRef]
  39819. ]);
  39820. }
  39821. var Select2 = _export_sfc(_sfc_main110, [["render", _sfc_render30], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/select.vue"]]);
  39822. // node_modules/element-plus/es/components/select-v2/index.mjs
  39823. Select2.install = (app) => {
  39824. app.component(Select2.name, Select2);
  39825. };
  39826. var _Select = Select2;
  39827. var ElSelectV2 = _Select;
  39828. // node_modules/element-plus/es/components/skeleton/src/skeleton.mjs
  39829. var skeletonProps = buildProps({
  39830. animated: {
  39831. type: Boolean,
  39832. default: false
  39833. },
  39834. count: {
  39835. type: Number,
  39836. default: 1
  39837. },
  39838. rows: {
  39839. type: Number,
  39840. default: 3
  39841. },
  39842. loading: {
  39843. type: Boolean,
  39844. default: true
  39845. },
  39846. throttle: {
  39847. type: Number
  39848. }
  39849. });
  39850. // node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs
  39851. var skeletonItemProps = buildProps({
  39852. variant: {
  39853. type: String,
  39854. values: [
  39855. "circle",
  39856. "rect",
  39857. "h1",
  39858. "h3",
  39859. "text",
  39860. "caption",
  39861. "p",
  39862. "image",
  39863. "button"
  39864. ],
  39865. default: "text"
  39866. }
  39867. });
  39868. // node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs
  39869. var __default__71 = defineComponent({
  39870. name: "ElSkeletonItem"
  39871. });
  39872. var _sfc_main111 = defineComponent({
  39873. ...__default__71,
  39874. props: skeletonItemProps,
  39875. setup(__props) {
  39876. const ns2 = useNamespace("skeleton");
  39877. return (_ctx, _cache) => {
  39878. return openBlock(), createElementBlock("div", {
  39879. class: normalizeClass([unref(ns2).e("item"), unref(ns2).e(_ctx.variant)])
  39880. }, [
  39881. _ctx.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true)
  39882. ], 2);
  39883. };
  39884. }
  39885. });
  39886. var SkeletonItem = _export_sfc(_sfc_main111, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);
  39887. // node_modules/element-plus/es/components/skeleton/src/skeleton2.mjs
  39888. var __default__72 = defineComponent({
  39889. name: "ElSkeleton"
  39890. });
  39891. var _sfc_main112 = defineComponent({
  39892. ...__default__72,
  39893. props: skeletonProps,
  39894. setup(__props, { expose }) {
  39895. const props = __props;
  39896. const ns2 = useNamespace("skeleton");
  39897. const uiLoading = useThrottleRender(toRef(props, "loading"), props.throttle);
  39898. expose({
  39899. uiLoading
  39900. });
  39901. return (_ctx, _cache) => {
  39902. return unref(uiLoading) ? (openBlock(), createElementBlock("div", mergeProps({
  39903. key: 0,
  39904. class: [unref(ns2).b(), unref(ns2).is("animated", _ctx.animated)]
  39905. }, _ctx.$attrs), [
  39906. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (i) => {
  39907. return openBlock(), createElementBlock(Fragment, { key: i }, [
  39908. _ctx.loading ? renderSlot(_ctx.$slots, "template", { key: i }, () => [
  39909. createVNode(SkeletonItem, {
  39910. class: normalizeClass(unref(ns2).is("first")),
  39911. variant: "p"
  39912. }, null, 8, ["class"]),
  39913. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (item) => {
  39914. return openBlock(), createBlock(SkeletonItem, {
  39915. key: item,
  39916. class: normalizeClass([
  39917. unref(ns2).e("paragraph"),
  39918. unref(ns2).is("last", item === _ctx.rows && _ctx.rows > 1)
  39919. ]),
  39920. variant: "p"
  39921. }, null, 8, ["class"]);
  39922. }), 128))
  39923. ]) : createCommentVNode("v-if", true)
  39924. ], 64);
  39925. }), 128))
  39926. ], 16)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)));
  39927. };
  39928. }
  39929. });
  39930. var Skeleton = _export_sfc(_sfc_main112, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);
  39931. // node_modules/element-plus/es/components/skeleton/index.mjs
  39932. var ElSkeleton = withInstall(Skeleton, {
  39933. SkeletonItem
  39934. });
  39935. var ElSkeletonItem = withNoopInstall(SkeletonItem);
  39936. // node_modules/element-plus/es/components/slider/src/slider.mjs
  39937. var sliderProps = buildProps({
  39938. modelValue: {
  39939. type: definePropType([Number, Array]),
  39940. default: 0
  39941. },
  39942. id: {
  39943. type: String,
  39944. default: void 0
  39945. },
  39946. min: {
  39947. type: Number,
  39948. default: 0
  39949. },
  39950. max: {
  39951. type: Number,
  39952. default: 100
  39953. },
  39954. step: {
  39955. type: Number,
  39956. default: 1
  39957. },
  39958. showInput: Boolean,
  39959. showInputControls: {
  39960. type: Boolean,
  39961. default: true
  39962. },
  39963. size: useSizeProp,
  39964. inputSize: useSizeProp,
  39965. showStops: Boolean,
  39966. showTooltip: {
  39967. type: Boolean,
  39968. default: true
  39969. },
  39970. formatTooltip: {
  39971. type: definePropType(Function),
  39972. default: void 0
  39973. },
  39974. disabled: Boolean,
  39975. range: Boolean,
  39976. vertical: Boolean,
  39977. height: String,
  39978. debounce: {
  39979. type: Number,
  39980. default: 300
  39981. },
  39982. label: {
  39983. type: String,
  39984. default: void 0
  39985. },
  39986. rangeStartLabel: {
  39987. type: String,
  39988. default: void 0
  39989. },
  39990. rangeEndLabel: {
  39991. type: String,
  39992. default: void 0
  39993. },
  39994. formatValueText: {
  39995. type: definePropType(Function),
  39996. default: void 0
  39997. },
  39998. tooltipClass: {
  39999. type: String,
  40000. default: void 0
  40001. },
  40002. placement: {
  40003. type: String,
  40004. values: Ee,
  40005. default: "top"
  40006. },
  40007. marks: {
  40008. type: definePropType(Object)
  40009. },
  40010. validateEvent: {
  40011. type: Boolean,
  40012. default: true
  40013. }
  40014. });
  40015. var isValidValue = (value) => isNumber2(value) || isArray(value) && value.every(isNumber2);
  40016. var sliderEmits = {
  40017. [UPDATE_MODEL_EVENT]: isValidValue,
  40018. [INPUT_EVENT]: isValidValue,
  40019. [CHANGE_EVENT]: isValidValue
  40020. };
  40021. // node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs
  40022. var useLifecycle = (props, initData, resetSize) => {
  40023. const sliderWrapper = ref();
  40024. onMounted(async () => {
  40025. if (props.range) {
  40026. if (Array.isArray(props.modelValue)) {
  40027. initData.firstValue = Math.max(props.min, props.modelValue[0]);
  40028. initData.secondValue = Math.min(props.max, props.modelValue[1]);
  40029. } else {
  40030. initData.firstValue = props.min;
  40031. initData.secondValue = props.max;
  40032. }
  40033. initData.oldValue = [initData.firstValue, initData.secondValue];
  40034. } else {
  40035. if (typeof props.modelValue !== "number" || Number.isNaN(props.modelValue)) {
  40036. initData.firstValue = props.min;
  40037. } else {
  40038. initData.firstValue = Math.min(props.max, Math.max(props.min, props.modelValue));
  40039. }
  40040. initData.oldValue = initData.firstValue;
  40041. }
  40042. useEventListener(window, "resize", resetSize);
  40043. await nextTick();
  40044. resetSize();
  40045. });
  40046. return {
  40047. sliderWrapper
  40048. };
  40049. };
  40050. // node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs
  40051. var useMarks = (props) => {
  40052. return computed2(() => {
  40053. if (!props.marks) {
  40054. return [];
  40055. }
  40056. const marksKeys = Object.keys(props.marks);
  40057. return marksKeys.map(Number.parseFloat).sort((a2, b2) => a2 - b2).filter((point) => point <= props.max && point >= props.min).map((point) => ({
  40058. point,
  40059. position: (point - props.min) * 100 / (props.max - props.min),
  40060. mark: props.marks[point]
  40061. }));
  40062. });
  40063. };
  40064. // node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs
  40065. var useSlide = (props, initData, emit) => {
  40066. const { form: elForm, formItem: elFormItem } = useFormItem();
  40067. const slider = shallowRef();
  40068. const firstButton = ref();
  40069. const secondButton = ref();
  40070. const buttonRefs = {
  40071. firstButton,
  40072. secondButton
  40073. };
  40074. const sliderDisabled = computed2(() => {
  40075. return props.disabled || (elForm == null ? void 0 : elForm.disabled) || false;
  40076. });
  40077. const minValue = computed2(() => {
  40078. return Math.min(initData.firstValue, initData.secondValue);
  40079. });
  40080. const maxValue = computed2(() => {
  40081. return Math.max(initData.firstValue, initData.secondValue);
  40082. });
  40083. const barSize = computed2(() => {
  40084. return props.range ? `${100 * (maxValue.value - minValue.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`;
  40085. });
  40086. const barStart = computed2(() => {
  40087. return props.range ? `${100 * (minValue.value - props.min) / (props.max - props.min)}%` : "0%";
  40088. });
  40089. const runwayStyle = computed2(() => {
  40090. return props.vertical ? { height: props.height } : {};
  40091. });
  40092. const barStyle = computed2(() => {
  40093. return props.vertical ? {
  40094. height: barSize.value,
  40095. bottom: barStart.value
  40096. } : {
  40097. width: barSize.value,
  40098. left: barStart.value
  40099. };
  40100. });
  40101. const resetSize = () => {
  40102. if (slider.value) {
  40103. initData.sliderSize = slider.value[`client${props.vertical ? "Height" : "Width"}`];
  40104. }
  40105. };
  40106. const getButtonRefByPercent = (percent) => {
  40107. const targetValue = props.min + percent * (props.max - props.min) / 100;
  40108. if (!props.range) {
  40109. return firstButton;
  40110. }
  40111. let buttonRefName;
  40112. if (Math.abs(minValue.value - targetValue) < Math.abs(maxValue.value - targetValue)) {
  40113. buttonRefName = initData.firstValue < initData.secondValue ? "firstButton" : "secondButton";
  40114. } else {
  40115. buttonRefName = initData.firstValue > initData.secondValue ? "firstButton" : "secondButton";
  40116. }
  40117. return buttonRefs[buttonRefName];
  40118. };
  40119. const setPosition = (percent) => {
  40120. const buttonRef = getButtonRefByPercent(percent);
  40121. buttonRef.value.setPosition(percent);
  40122. return buttonRef;
  40123. };
  40124. const setFirstValue = (firstValue) => {
  40125. initData.firstValue = firstValue;
  40126. _emit(props.range ? [minValue.value, maxValue.value] : firstValue);
  40127. };
  40128. const setSecondValue = (secondValue) => {
  40129. initData.secondValue = secondValue;
  40130. if (props.range) {
  40131. _emit([minValue.value, maxValue.value]);
  40132. }
  40133. };
  40134. const _emit = (val) => {
  40135. emit(UPDATE_MODEL_EVENT, val);
  40136. emit(INPUT_EVENT, val);
  40137. };
  40138. const emitChange = async () => {
  40139. await nextTick();
  40140. emit(CHANGE_EVENT, props.range ? [minValue.value, maxValue.value] : props.modelValue);
  40141. };
  40142. const handleSliderPointerEvent = (event) => {
  40143. var _a2, _b, _c, _d, _e, _f;
  40144. if (sliderDisabled.value || initData.dragging)
  40145. return;
  40146. resetSize();
  40147. let newPercent = 0;
  40148. if (props.vertical) {
  40149. const clientY = (_c = (_b = (_a2 = event.touches) == null ? void 0 : _a2.item(0)) == null ? void 0 : _b.clientY) != null ? _c : event.clientY;
  40150. const sliderOffsetBottom = slider.value.getBoundingClientRect().bottom;
  40151. newPercent = (sliderOffsetBottom - clientY) / initData.sliderSize * 100;
  40152. } else {
  40153. const clientX = (_f = (_e = (_d = event.touches) == null ? void 0 : _d.item(0)) == null ? void 0 : _e.clientX) != null ? _f : event.clientX;
  40154. const sliderOffsetLeft = slider.value.getBoundingClientRect().left;
  40155. newPercent = (clientX - sliderOffsetLeft) / initData.sliderSize * 100;
  40156. }
  40157. if (newPercent < 0 || newPercent > 100)
  40158. return;
  40159. return setPosition(newPercent);
  40160. };
  40161. const onSliderWrapperPrevent = (event) => {
  40162. var _a2, _b;
  40163. if (((_a2 = buttonRefs["firstButton"].value) == null ? void 0 : _a2.dragging) || ((_b = buttonRefs["secondButton"].value) == null ? void 0 : _b.dragging)) {
  40164. event.preventDefault();
  40165. }
  40166. };
  40167. const onSliderDown = async (event) => {
  40168. const buttonRef = handleSliderPointerEvent(event);
  40169. if (buttonRef) {
  40170. await nextTick();
  40171. buttonRef.value.onButtonDown(event);
  40172. }
  40173. };
  40174. const onSliderClick = (event) => {
  40175. const buttonRef = handleSliderPointerEvent(event);
  40176. if (buttonRef) {
  40177. emitChange();
  40178. }
  40179. };
  40180. return {
  40181. elFormItem,
  40182. slider,
  40183. firstButton,
  40184. secondButton,
  40185. sliderDisabled,
  40186. minValue,
  40187. maxValue,
  40188. runwayStyle,
  40189. barStyle,
  40190. resetSize,
  40191. setPosition,
  40192. emitChange,
  40193. onSliderWrapperPrevent,
  40194. onSliderClick,
  40195. onSliderDown,
  40196. setFirstValue,
  40197. setSecondValue
  40198. };
  40199. };
  40200. // node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs
  40201. var { left, down, right, up, home, end, pageUp, pageDown } = EVENT_CODE;
  40202. var useTooltip = (props, formatTooltip, showTooltip) => {
  40203. const tooltip = ref();
  40204. const tooltipVisible = ref(false);
  40205. const enableFormat = computed2(() => {
  40206. return formatTooltip.value instanceof Function;
  40207. });
  40208. const formatValue = computed2(() => {
  40209. return enableFormat.value && formatTooltip.value(props.modelValue) || props.modelValue;
  40210. });
  40211. const displayTooltip = debounce_default(() => {
  40212. showTooltip.value && (tooltipVisible.value = true);
  40213. }, 50);
  40214. const hideTooltip = debounce_default(() => {
  40215. showTooltip.value && (tooltipVisible.value = false);
  40216. }, 50);
  40217. return {
  40218. tooltip,
  40219. tooltipVisible,
  40220. formatValue,
  40221. displayTooltip,
  40222. hideTooltip
  40223. };
  40224. };
  40225. var useSliderButton = (props, initData, emit) => {
  40226. const {
  40227. disabled,
  40228. min: min5,
  40229. max: max5,
  40230. step,
  40231. showTooltip,
  40232. precision,
  40233. sliderSize,
  40234. formatTooltip,
  40235. emitChange,
  40236. resetSize,
  40237. updateDragging
  40238. } = inject(sliderContextKey);
  40239. const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props, formatTooltip, showTooltip);
  40240. const button = ref();
  40241. const currentPosition = computed2(() => {
  40242. return `${(props.modelValue - min5.value) / (max5.value - min5.value) * 100}%`;
  40243. });
  40244. const wrapperStyle = computed2(() => {
  40245. return props.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value };
  40246. });
  40247. const handleMouseEnter = () => {
  40248. initData.hovering = true;
  40249. displayTooltip();
  40250. };
  40251. const handleMouseLeave = () => {
  40252. initData.hovering = false;
  40253. if (!initData.dragging) {
  40254. hideTooltip();
  40255. }
  40256. };
  40257. const onButtonDown = (event) => {
  40258. if (disabled.value)
  40259. return;
  40260. event.preventDefault();
  40261. onDragStart(event);
  40262. window.addEventListener("mousemove", onDragging);
  40263. window.addEventListener("touchmove", onDragging);
  40264. window.addEventListener("mouseup", onDragEnd);
  40265. window.addEventListener("touchend", onDragEnd);
  40266. window.addEventListener("contextmenu", onDragEnd);
  40267. button.value.focus();
  40268. };
  40269. const incrementPosition = (amount) => {
  40270. if (disabled.value)
  40271. return;
  40272. initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max5.value - min5.value) * 100;
  40273. setPosition(initData.newPosition);
  40274. emitChange();
  40275. };
  40276. const onLeftKeyDown = () => {
  40277. incrementPosition(-step.value);
  40278. };
  40279. const onRightKeyDown = () => {
  40280. incrementPosition(step.value);
  40281. };
  40282. const onPageDownKeyDown = () => {
  40283. incrementPosition(-step.value * 4);
  40284. };
  40285. const onPageUpKeyDown = () => {
  40286. incrementPosition(step.value * 4);
  40287. };
  40288. const onHomeKeyDown = () => {
  40289. if (disabled.value)
  40290. return;
  40291. setPosition(0);
  40292. emitChange();
  40293. };
  40294. const onEndKeyDown = () => {
  40295. if (disabled.value)
  40296. return;
  40297. setPosition(100);
  40298. emitChange();
  40299. };
  40300. const onKeyDown = (event) => {
  40301. let isPreventDefault = true;
  40302. if ([left, down].includes(event.key)) {
  40303. onLeftKeyDown();
  40304. } else if ([right, up].includes(event.key)) {
  40305. onRightKeyDown();
  40306. } else if (event.key === home) {
  40307. onHomeKeyDown();
  40308. } else if (event.key === end) {
  40309. onEndKeyDown();
  40310. } else if (event.key === pageDown) {
  40311. onPageDownKeyDown();
  40312. } else if (event.key === pageUp) {
  40313. onPageUpKeyDown();
  40314. } else {
  40315. isPreventDefault = false;
  40316. }
  40317. isPreventDefault && event.preventDefault();
  40318. };
  40319. const getClientXY2 = (event) => {
  40320. let clientX;
  40321. let clientY;
  40322. if (event.type.startsWith("touch")) {
  40323. clientY = event.touches[0].clientY;
  40324. clientX = event.touches[0].clientX;
  40325. } else {
  40326. clientY = event.clientY;
  40327. clientX = event.clientX;
  40328. }
  40329. return {
  40330. clientX,
  40331. clientY
  40332. };
  40333. };
  40334. const onDragStart = (event) => {
  40335. initData.dragging = true;
  40336. initData.isClick = true;
  40337. const { clientX, clientY } = getClientXY2(event);
  40338. if (props.vertical) {
  40339. initData.startY = clientY;
  40340. } else {
  40341. initData.startX = clientX;
  40342. }
  40343. initData.startPosition = Number.parseFloat(currentPosition.value);
  40344. initData.newPosition = initData.startPosition;
  40345. };
  40346. const onDragging = (event) => {
  40347. if (initData.dragging) {
  40348. initData.isClick = false;
  40349. displayTooltip();
  40350. resetSize();
  40351. let diff;
  40352. const { clientX, clientY } = getClientXY2(event);
  40353. if (props.vertical) {
  40354. initData.currentY = clientY;
  40355. diff = (initData.startY - initData.currentY) / sliderSize.value * 100;
  40356. } else {
  40357. initData.currentX = clientX;
  40358. diff = (initData.currentX - initData.startX) / sliderSize.value * 100;
  40359. }
  40360. initData.newPosition = initData.startPosition + diff;
  40361. setPosition(initData.newPosition);
  40362. }
  40363. };
  40364. const onDragEnd = () => {
  40365. if (initData.dragging) {
  40366. setTimeout(() => {
  40367. initData.dragging = false;
  40368. if (!initData.hovering) {
  40369. hideTooltip();
  40370. }
  40371. if (!initData.isClick) {
  40372. setPosition(initData.newPosition);
  40373. }
  40374. emitChange();
  40375. }, 0);
  40376. window.removeEventListener("mousemove", onDragging);
  40377. window.removeEventListener("touchmove", onDragging);
  40378. window.removeEventListener("mouseup", onDragEnd);
  40379. window.removeEventListener("touchend", onDragEnd);
  40380. window.removeEventListener("contextmenu", onDragEnd);
  40381. }
  40382. };
  40383. const setPosition = async (newPosition) => {
  40384. if (newPosition === null || Number.isNaN(+newPosition))
  40385. return;
  40386. if (newPosition < 0) {
  40387. newPosition = 0;
  40388. } else if (newPosition > 100) {
  40389. newPosition = 100;
  40390. }
  40391. const lengthPerStep = 100 / ((max5.value - min5.value) / step.value);
  40392. const steps = Math.round(newPosition / lengthPerStep);
  40393. let value = steps * lengthPerStep * (max5.value - min5.value) * 0.01 + min5.value;
  40394. value = Number.parseFloat(value.toFixed(precision.value));
  40395. if (value !== props.modelValue) {
  40396. emit(UPDATE_MODEL_EVENT, value);
  40397. }
  40398. if (!initData.dragging && props.modelValue !== initData.oldValue) {
  40399. initData.oldValue = props.modelValue;
  40400. }
  40401. await nextTick();
  40402. initData.dragging && displayTooltip();
  40403. tooltip.value.updatePopper();
  40404. };
  40405. watch(() => initData.dragging, (val) => {
  40406. updateDragging(val);
  40407. });
  40408. return {
  40409. disabled,
  40410. button,
  40411. tooltip,
  40412. tooltipVisible,
  40413. showTooltip,
  40414. wrapperStyle,
  40415. formatValue,
  40416. handleMouseEnter,
  40417. handleMouseLeave,
  40418. onButtonDown,
  40419. onKeyDown,
  40420. setPosition
  40421. };
  40422. };
  40423. // node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs
  40424. var useStops = (props, initData, minValue, maxValue) => {
  40425. const stops = computed2(() => {
  40426. if (!props.showStops || props.min > props.max)
  40427. return [];
  40428. if (props.step === 0) {
  40429. debugWarn("ElSlider", "step should not be 0.");
  40430. return [];
  40431. }
  40432. const stopCount = (props.max - props.min) / props.step;
  40433. const stepWidth = 100 * props.step / (props.max - props.min);
  40434. const result2 = Array.from({ length: stopCount - 1 }).map((_2, index) => (index + 1) * stepWidth);
  40435. if (props.range) {
  40436. return result2.filter((step) => {
  40437. return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min);
  40438. });
  40439. } else {
  40440. return result2.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min));
  40441. }
  40442. });
  40443. const getStopStyle = (position) => {
  40444. return props.vertical ? { bottom: `${position}%` } : { left: `${position}%` };
  40445. };
  40446. return {
  40447. stops,
  40448. getStopStyle
  40449. };
  40450. };
  40451. // node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs
  40452. var useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => {
  40453. const _emit = (val) => {
  40454. emit(UPDATE_MODEL_EVENT, val);
  40455. emit(INPUT_EVENT, val);
  40456. };
  40457. const valueChanged = () => {
  40458. if (props.range) {
  40459. return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]);
  40460. } else {
  40461. return props.modelValue !== initData.oldValue;
  40462. }
  40463. };
  40464. const setValues = () => {
  40465. var _a2, _b;
  40466. if (props.min > props.max) {
  40467. throwError("Slider", "min should not be greater than max.");
  40468. return;
  40469. }
  40470. const val = props.modelValue;
  40471. if (props.range && Array.isArray(val)) {
  40472. if (val[1] < props.min) {
  40473. _emit([props.min, props.min]);
  40474. } else if (val[0] > props.max) {
  40475. _emit([props.max, props.max]);
  40476. } else if (val[0] < props.min) {
  40477. _emit([props.min, val[1]]);
  40478. } else if (val[1] > props.max) {
  40479. _emit([val[0], props.max]);
  40480. } else {
  40481. initData.firstValue = val[0];
  40482. initData.secondValue = val[1];
  40483. if (valueChanged()) {
  40484. if (props.validateEvent) {
  40485. (_a2 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a2.call(elFormItem, "change").catch((err) => debugWarn(err));
  40486. }
  40487. initData.oldValue = val.slice();
  40488. }
  40489. }
  40490. } else if (!props.range && typeof val === "number" && !Number.isNaN(val)) {
  40491. if (val < props.min) {
  40492. _emit(props.min);
  40493. } else if (val > props.max) {
  40494. _emit(props.max);
  40495. } else {
  40496. initData.firstValue = val;
  40497. if (valueChanged()) {
  40498. if (props.validateEvent) {
  40499. (_b = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _b.call(elFormItem, "change").catch((err) => debugWarn(err));
  40500. }
  40501. initData.oldValue = val;
  40502. }
  40503. }
  40504. }
  40505. };
  40506. setValues();
  40507. watch(() => initData.dragging, (val) => {
  40508. if (!val) {
  40509. setValues();
  40510. }
  40511. });
  40512. watch(() => props.modelValue, (val, oldVal) => {
  40513. if (initData.dragging || Array.isArray(val) && Array.isArray(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) {
  40514. return;
  40515. }
  40516. setValues();
  40517. }, {
  40518. deep: true
  40519. });
  40520. watch(() => [props.min, props.max], () => {
  40521. setValues();
  40522. });
  40523. };
  40524. // node_modules/element-plus/es/components/slider/src/button.mjs
  40525. var sliderButtonProps = buildProps({
  40526. modelValue: {
  40527. type: Number,
  40528. default: 0
  40529. },
  40530. vertical: Boolean,
  40531. tooltipClass: String,
  40532. placement: {
  40533. type: String,
  40534. values: Ee,
  40535. default: "top"
  40536. }
  40537. });
  40538. var sliderButtonEmits = {
  40539. [UPDATE_MODEL_EVENT]: (value) => isNumber2(value)
  40540. };
  40541. // node_modules/element-plus/es/components/slider/src/button2.mjs
  40542. var _hoisted_156 = ["tabindex"];
  40543. var __default__73 = defineComponent({
  40544. name: "ElSliderButton"
  40545. });
  40546. var _sfc_main113 = defineComponent({
  40547. ...__default__73,
  40548. props: sliderButtonProps,
  40549. emits: sliderButtonEmits,
  40550. setup(__props, { expose, emit }) {
  40551. const props = __props;
  40552. const ns2 = useNamespace("slider");
  40553. const initData = reactive({
  40554. hovering: false,
  40555. dragging: false,
  40556. isClick: false,
  40557. startX: 0,
  40558. currentX: 0,
  40559. startY: 0,
  40560. currentY: 0,
  40561. startPosition: 0,
  40562. newPosition: 0,
  40563. oldValue: props.modelValue
  40564. });
  40565. const {
  40566. disabled,
  40567. button,
  40568. tooltip,
  40569. showTooltip,
  40570. tooltipVisible,
  40571. wrapperStyle,
  40572. formatValue,
  40573. handleMouseEnter,
  40574. handleMouseLeave,
  40575. onButtonDown,
  40576. onKeyDown,
  40577. setPosition
  40578. } = useSliderButton(props, initData, emit);
  40579. const { hovering, dragging } = toRefs(initData);
  40580. expose({
  40581. onButtonDown,
  40582. onKeyDown,
  40583. setPosition,
  40584. hovering,
  40585. dragging
  40586. });
  40587. return (_ctx, _cache) => {
  40588. return openBlock(), createElementBlock("div", {
  40589. ref_key: "button",
  40590. ref: button,
  40591. class: normalizeClass([unref(ns2).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
  40592. style: normalizeStyle(unref(wrapperStyle)),
  40593. tabindex: unref(disabled) ? -1 : 0,
  40594. onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  40595. onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
  40596. onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
  40597. onTouchstart: _cache[3] || (_cache[3] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
  40598. onFocus: _cache[4] || (_cache[4] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
  40599. onBlur: _cache[5] || (_cache[5] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
  40600. onKeydown: _cache[6] || (_cache[6] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args))
  40601. }, [
  40602. createVNode(unref(ElTooltip), {
  40603. ref_key: "tooltip",
  40604. ref: tooltip,
  40605. visible: unref(tooltipVisible),
  40606. placement: _ctx.placement,
  40607. "fallback-placements": ["top", "bottom", "right", "left"],
  40608. "stop-popper-mouse-event": false,
  40609. "popper-class": _ctx.tooltipClass,
  40610. disabled: !unref(showTooltip),
  40611. persistent: ""
  40612. }, {
  40613. content: withCtx(() => [
  40614. createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1)
  40615. ]),
  40616. default: withCtx(() => [
  40617. createBaseVNode("div", {
  40618. class: normalizeClass([unref(ns2).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
  40619. }, null, 2)
  40620. ]),
  40621. _: 1
  40622. }, 8, ["visible", "placement", "popper-class", "disabled"])
  40623. ], 46, _hoisted_156);
  40624. };
  40625. }
  40626. });
  40627. var SliderButton = _export_sfc(_sfc_main113, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]);
  40628. // node_modules/element-plus/es/components/slider/src/marker.mjs
  40629. var sliderMarkerProps = buildProps({
  40630. mark: {
  40631. type: definePropType([String, Object]),
  40632. default: void 0
  40633. }
  40634. });
  40635. var SliderMarker = defineComponent({
  40636. name: "ElSliderMarker",
  40637. props: sliderMarkerProps,
  40638. setup(props) {
  40639. const ns2 = useNamespace("slider");
  40640. const label = computed2(() => {
  40641. return isString(props.mark) ? props.mark : props.mark.label;
  40642. });
  40643. const style = computed2(() => isString(props.mark) ? void 0 : props.mark.style);
  40644. return () => h("div", {
  40645. class: ns2.e("marks-text"),
  40646. style: style.value
  40647. }, label.value);
  40648. }
  40649. });
  40650. // node_modules/element-plus/es/components/slider/src/slider2.mjs
  40651. var _hoisted_157 = ["id", "role", "aria-label", "aria-labelledby"];
  40652. var _hoisted_235 = { key: 1 };
  40653. var __default__74 = defineComponent({
  40654. name: "ElSlider"
  40655. });
  40656. var _sfc_main114 = defineComponent({
  40657. ...__default__74,
  40658. props: sliderProps,
  40659. emits: sliderEmits,
  40660. setup(__props, { expose, emit }) {
  40661. const props = __props;
  40662. const ns2 = useNamespace("slider");
  40663. const { t } = useLocale();
  40664. const initData = reactive({
  40665. firstValue: 0,
  40666. secondValue: 0,
  40667. oldValue: 0,
  40668. dragging: false,
  40669. sliderSize: 1
  40670. });
  40671. const {
  40672. elFormItem,
  40673. slider,
  40674. firstButton,
  40675. secondButton,
  40676. sliderDisabled,
  40677. minValue,
  40678. maxValue,
  40679. runwayStyle,
  40680. barStyle,
  40681. resetSize,
  40682. emitChange,
  40683. onSliderWrapperPrevent,
  40684. onSliderClick,
  40685. onSliderDown,
  40686. setFirstValue,
  40687. setSecondValue
  40688. } = useSlide(props, initData, emit);
  40689. const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue);
  40690. const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
  40691. formItemContext: elFormItem
  40692. });
  40693. const sliderWrapperSize = useSize();
  40694. const sliderInputSize = computed2(() => props.inputSize || sliderWrapperSize.value);
  40695. const groupLabel = computed2(() => {
  40696. return props.label || t("el.slider.defaultLabel", {
  40697. min: props.min,
  40698. max: props.max
  40699. });
  40700. });
  40701. const firstButtonLabel = computed2(() => {
  40702. if (props.range) {
  40703. return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel");
  40704. } else {
  40705. return groupLabel.value;
  40706. }
  40707. });
  40708. const firstValueText = computed2(() => {
  40709. return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`;
  40710. });
  40711. const secondButtonLabel = computed2(() => {
  40712. return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel");
  40713. });
  40714. const secondValueText = computed2(() => {
  40715. return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`;
  40716. });
  40717. const sliderKls = computed2(() => [
  40718. ns2.b(),
  40719. ns2.m(sliderWrapperSize.value),
  40720. ns2.is("vertical", props.vertical),
  40721. { [ns2.m("with-input")]: props.showInput }
  40722. ]);
  40723. const markList = useMarks(props);
  40724. useWatch(props, initData, minValue, maxValue, emit, elFormItem);
  40725. const precision = computed2(() => {
  40726. const precisions = [props.min, props.max, props.step].map((item) => {
  40727. const decimal = `${item}`.split(".")[1];
  40728. return decimal ? decimal.length : 0;
  40729. });
  40730. return Math.max.apply(null, precisions);
  40731. });
  40732. const { sliderWrapper } = useLifecycle(props, initData, resetSize);
  40733. const { firstValue, secondValue, sliderSize } = toRefs(initData);
  40734. const updateDragging = (val) => {
  40735. initData.dragging = val;
  40736. };
  40737. provide(sliderContextKey, {
  40738. ...toRefs(props),
  40739. sliderSize,
  40740. disabled: sliderDisabled,
  40741. precision,
  40742. emitChange,
  40743. resetSize,
  40744. updateDragging
  40745. });
  40746. expose({
  40747. onSliderClick
  40748. });
  40749. return (_ctx, _cache) => {
  40750. var _a2, _b;
  40751. return openBlock(), createElementBlock("div", {
  40752. id: _ctx.range ? unref(inputId) : void 0,
  40753. ref_key: "sliderWrapper",
  40754. ref: sliderWrapper,
  40755. class: normalizeClass(unref(sliderKls)),
  40756. role: _ctx.range ? "group" : void 0,
  40757. "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? unref(groupLabel) : void 0,
  40758. "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? (_a2 = unref(elFormItem)) == null ? void 0 : _a2.labelId : void 0,
  40759. onTouchstart: _cache[2] || (_cache[2] = (...args) => unref(onSliderWrapperPrevent) && unref(onSliderWrapperPrevent)(...args)),
  40760. onTouchmove: _cache[3] || (_cache[3] = (...args) => unref(onSliderWrapperPrevent) && unref(onSliderWrapperPrevent)(...args))
  40761. }, [
  40762. createBaseVNode("div", {
  40763. ref_key: "slider",
  40764. ref: slider,
  40765. class: normalizeClass([
  40766. unref(ns2).e("runway"),
  40767. { "show-input": _ctx.showInput && !_ctx.range },
  40768. unref(ns2).is("disabled", unref(sliderDisabled))
  40769. ]),
  40770. style: normalizeStyle(unref(runwayStyle)),
  40771. onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)),
  40772. onTouchstart: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args))
  40773. }, [
  40774. createBaseVNode("div", {
  40775. class: normalizeClass(unref(ns2).e("bar")),
  40776. style: normalizeStyle(unref(barStyle))
  40777. }, null, 6),
  40778. createVNode(SliderButton, {
  40779. id: !_ctx.range ? unref(inputId) : void 0,
  40780. ref_key: "firstButton",
  40781. ref: firstButton,
  40782. "model-value": unref(firstValue),
  40783. vertical: _ctx.vertical,
  40784. "tooltip-class": _ctx.tooltipClass,
  40785. placement: _ctx.placement,
  40786. role: "slider",
  40787. "aria-label": _ctx.range || !unref(isLabeledByFormItem) ? unref(firstButtonLabel) : void 0,
  40788. "aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? (_b = unref(elFormItem)) == null ? void 0 : _b.labelId : void 0,
  40789. "aria-valuemin": _ctx.min,
  40790. "aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max,
  40791. "aria-valuenow": unref(firstValue),
  40792. "aria-valuetext": unref(firstValueText),
  40793. "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
  40794. "aria-disabled": unref(sliderDisabled),
  40795. "onUpdate:modelValue": unref(setFirstValue)
  40796. }, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
  40797. _ctx.range ? (openBlock(), createBlock(SliderButton, {
  40798. key: 0,
  40799. ref_key: "secondButton",
  40800. ref: secondButton,
  40801. "model-value": unref(secondValue),
  40802. vertical: _ctx.vertical,
  40803. "tooltip-class": _ctx.tooltipClass,
  40804. placement: _ctx.placement,
  40805. role: "slider",
  40806. "aria-label": unref(secondButtonLabel),
  40807. "aria-valuemin": unref(firstValue),
  40808. "aria-valuemax": _ctx.max,
  40809. "aria-valuenow": unref(secondValue),
  40810. "aria-valuetext": unref(secondValueText),
  40811. "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
  40812. "aria-disabled": unref(sliderDisabled),
  40813. "onUpdate:modelValue": unref(setSecondValue)
  40814. }, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : createCommentVNode("v-if", true),
  40815. _ctx.showStops ? (openBlock(), createElementBlock("div", _hoisted_235, [
  40816. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => {
  40817. return openBlock(), createElementBlock("div", {
  40818. key,
  40819. class: normalizeClass(unref(ns2).e("stop")),
  40820. style: normalizeStyle(unref(getStopStyle)(item))
  40821. }, null, 6);
  40822. }), 128))
  40823. ])) : createCommentVNode("v-if", true),
  40824. unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
  40825. createBaseVNode("div", null, [
  40826. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
  40827. return openBlock(), createElementBlock("div", {
  40828. key,
  40829. style: normalizeStyle(unref(getStopStyle)(item.position)),
  40830. class: normalizeClass([unref(ns2).e("stop"), unref(ns2).e("marks-stop")])
  40831. }, null, 6);
  40832. }), 128))
  40833. ]),
  40834. createBaseVNode("div", {
  40835. class: normalizeClass(unref(ns2).e("marks"))
  40836. }, [
  40837. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
  40838. return openBlock(), createBlock(unref(SliderMarker), {
  40839. key,
  40840. mark: item.mark,
  40841. style: normalizeStyle(unref(getStopStyle)(item.position))
  40842. }, null, 8, ["mark", "style"]);
  40843. }), 128))
  40844. ], 2)
  40845. ], 64)) : createCommentVNode("v-if", true)
  40846. ], 38),
  40847. _ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), {
  40848. key: 0,
  40849. ref: "input",
  40850. "model-value": unref(firstValue),
  40851. class: normalizeClass(unref(ns2).e("input")),
  40852. step: _ctx.step,
  40853. disabled: unref(sliderDisabled),
  40854. controls: _ctx.showInputControls,
  40855. min: _ctx.min,
  40856. max: _ctx.max,
  40857. debounce: _ctx.debounce,
  40858. size: unref(sliderInputSize),
  40859. "onUpdate:modelValue": unref(setFirstValue),
  40860. onChange: unref(emitChange)
  40861. }, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true)
  40862. ], 42, _hoisted_157);
  40863. };
  40864. }
  40865. });
  40866. var Slider = _export_sfc(_sfc_main114, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]);
  40867. // node_modules/element-plus/es/components/slider/index.mjs
  40868. var ElSlider = withInstall(Slider);
  40869. // node_modules/element-plus/es/components/space/src/item.mjs
  40870. var spaceItemProps = buildProps({
  40871. prefixCls: {
  40872. type: String
  40873. }
  40874. });
  40875. var SpaceItem = defineComponent({
  40876. name: "ElSpaceItem",
  40877. props: spaceItemProps,
  40878. setup(props, { slots }) {
  40879. const ns2 = useNamespace("space");
  40880. const classes = computed2(() => `${props.prefixCls || ns2.b()}__item`);
  40881. return () => h("div", { class: classes.value }, renderSlot(slots, "default"));
  40882. }
  40883. });
  40884. // node_modules/element-plus/es/components/space/src/use-space.mjs
  40885. var SIZE_MAP = {
  40886. small: 8,
  40887. default: 12,
  40888. large: 16
  40889. };
  40890. function useSpace(props) {
  40891. const ns2 = useNamespace("space");
  40892. const classes = computed2(() => [ns2.b(), ns2.m(props.direction), props.class]);
  40893. const horizontalSize = ref(0);
  40894. const verticalSize = ref(0);
  40895. const containerStyle = computed2(() => {
  40896. const wrapKls = props.wrap || props.fill ? { flexWrap: "wrap", marginBottom: `-${verticalSize.value}px` } : {};
  40897. const alignment = {
  40898. alignItems: props.alignment
  40899. };
  40900. return [wrapKls, alignment, props.style];
  40901. });
  40902. const itemStyle = computed2(() => {
  40903. const itemBaseStyle = {
  40904. paddingBottom: `${verticalSize.value}px`,
  40905. marginRight: `${horizontalSize.value}px`
  40906. };
  40907. const fillStyle = props.fill ? { flexGrow: 1, minWidth: `${props.fillRatio}%` } : {};
  40908. return [itemBaseStyle, fillStyle];
  40909. });
  40910. watchEffect(() => {
  40911. const { size: size3 = "small", wrap: wrap2, direction: dir, fill: fill2 } = props;
  40912. if (isArray(size3)) {
  40913. const [h3 = 0, v2 = 0] = size3;
  40914. horizontalSize.value = h3;
  40915. verticalSize.value = v2;
  40916. } else {
  40917. let val;
  40918. if (isNumber2(size3)) {
  40919. val = size3;
  40920. } else {
  40921. val = SIZE_MAP[size3 || "small"] || SIZE_MAP.small;
  40922. }
  40923. if ((wrap2 || fill2) && dir === "horizontal") {
  40924. horizontalSize.value = verticalSize.value = val;
  40925. } else {
  40926. if (dir === "horizontal") {
  40927. horizontalSize.value = val;
  40928. verticalSize.value = 0;
  40929. } else {
  40930. verticalSize.value = val;
  40931. horizontalSize.value = 0;
  40932. }
  40933. }
  40934. }
  40935. });
  40936. return {
  40937. classes,
  40938. containerStyle,
  40939. itemStyle
  40940. };
  40941. }
  40942. // node_modules/element-plus/es/components/space/src/space.mjs
  40943. var spaceProps = buildProps({
  40944. direction: {
  40945. type: String,
  40946. values: ["horizontal", "vertical"],
  40947. default: "horizontal"
  40948. },
  40949. class: {
  40950. type: definePropType([
  40951. String,
  40952. Object,
  40953. Array
  40954. ]),
  40955. default: ""
  40956. },
  40957. style: {
  40958. type: definePropType([String, Array, Object]),
  40959. default: ""
  40960. },
  40961. alignment: {
  40962. type: definePropType(String),
  40963. default: "center"
  40964. },
  40965. prefixCls: {
  40966. type: String
  40967. },
  40968. spacer: {
  40969. type: definePropType([Object, String, Number, Array]),
  40970. default: null,
  40971. validator: (val) => isVNode(val) || isNumber2(val) || isString(val)
  40972. },
  40973. wrap: Boolean,
  40974. fill: Boolean,
  40975. fillRatio: {
  40976. type: Number,
  40977. default: 100
  40978. },
  40979. size: {
  40980. type: [String, Array, Number],
  40981. values: componentSizes,
  40982. validator: (val) => {
  40983. return isNumber2(val) || isArray(val) && val.length === 2 && val.every(isNumber2);
  40984. }
  40985. }
  40986. });
  40987. var Space = defineComponent({
  40988. name: "ElSpace",
  40989. props: spaceProps,
  40990. setup(props, { slots }) {
  40991. const { classes, containerStyle, itemStyle } = useSpace(props);
  40992. function extractChildren(children, parentKey = "", extractedChildren = []) {
  40993. const { prefixCls } = props;
  40994. children.forEach((child, loopKey) => {
  40995. if (isFragment(child)) {
  40996. if (isArray(child.children)) {
  40997. child.children.forEach((nested, key) => {
  40998. if (isFragment(nested) && isArray(nested.children)) {
  40999. extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
  41000. } else {
  41001. extractedChildren.push(createVNode(SpaceItem, {
  41002. style: itemStyle.value,
  41003. prefixCls,
  41004. key: `nested-${parentKey + key}`
  41005. }, {
  41006. default: () => [nested]
  41007. }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
  41008. }
  41009. });
  41010. }
  41011. } else if (isValidElementNode(child)) {
  41012. extractedChildren.push(createVNode(SpaceItem, {
  41013. style: itemStyle.value,
  41014. prefixCls,
  41015. key: `LoopKey${parentKey + loopKey}`
  41016. }, {
  41017. default: () => [child]
  41018. }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
  41019. }
  41020. });
  41021. return extractedChildren;
  41022. }
  41023. return () => {
  41024. var _a2;
  41025. const { spacer, direction: direction2 } = props;
  41026. const children = renderSlot(slots, "default", { key: 0 }, () => []);
  41027. if (((_a2 = children.children) != null ? _a2 : []).length === 0)
  41028. return null;
  41029. if (isArray(children.children)) {
  41030. let extractedChildren = extractChildren(children.children);
  41031. if (spacer) {
  41032. const len = extractedChildren.length - 1;
  41033. extractedChildren = extractedChildren.reduce((acc, child, idx) => {
  41034. const children2 = [...acc, child];
  41035. if (idx !== len) {
  41036. children2.push(createVNode("span", {
  41037. style: [
  41038. itemStyle.value,
  41039. direction2 === "vertical" ? "width: 100%" : null
  41040. ],
  41041. key: idx
  41042. }, [
  41043. isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT)
  41044. ], PatchFlags.STYLE));
  41045. }
  41046. return children2;
  41047. }, []);
  41048. }
  41049. return createVNode("div", {
  41050. class: classes.value,
  41051. style: containerStyle.value
  41052. }, extractedChildren, PatchFlags.STYLE | PatchFlags.CLASS);
  41053. }
  41054. return children.children;
  41055. };
  41056. }
  41057. });
  41058. // node_modules/element-plus/es/components/space/index.mjs
  41059. var ElSpace = withInstall(Space);
  41060. // node_modules/element-plus/es/components/statistic/src/statistic.mjs
  41061. var statisticProps = buildProps({
  41062. decimalSeparator: {
  41063. type: String,
  41064. default: "."
  41065. },
  41066. groupSeparator: {
  41067. type: String,
  41068. default: ","
  41069. },
  41070. precision: {
  41071. type: Number,
  41072. default: 0
  41073. },
  41074. formatter: Function,
  41075. value: {
  41076. type: definePropType([Number, Object]),
  41077. default: 0
  41078. },
  41079. prefix: String,
  41080. suffix: String,
  41081. title: String,
  41082. valueStyle: {
  41083. type: definePropType([String, Object, Array])
  41084. }
  41085. });
  41086. // node_modules/element-plus/es/components/statistic/src/statistic2.mjs
  41087. var __default__75 = defineComponent({
  41088. name: "ElStatistic"
  41089. });
  41090. var _sfc_main115 = defineComponent({
  41091. ...__default__75,
  41092. props: statisticProps,
  41093. setup(__props, { expose }) {
  41094. const props = __props;
  41095. const ns2 = useNamespace("statistic");
  41096. const displayValue = computed2(() => {
  41097. const { value, formatter: formatter2, precision, decimalSeparator, groupSeparator } = props;
  41098. if (isFunction(formatter2))
  41099. return formatter2(value);
  41100. if (!isNumber2(value))
  41101. return value;
  41102. let [integer4, decimal = ""] = String(value).split(".");
  41103. decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
  41104. integer4 = integer4.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
  41105. return [integer4, decimal].join(decimal ? decimalSeparator : "");
  41106. });
  41107. expose({
  41108. displayValue
  41109. });
  41110. return (_ctx, _cache) => {
  41111. return openBlock(), createElementBlock("div", {
  41112. class: normalizeClass(unref(ns2).b())
  41113. }, [
  41114. _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
  41115. key: 0,
  41116. class: normalizeClass(unref(ns2).e("head"))
  41117. }, [
  41118. renderSlot(_ctx.$slots, "title", {}, () => [
  41119. createTextVNode(toDisplayString(_ctx.title), 1)
  41120. ])
  41121. ], 2)) : createCommentVNode("v-if", true),
  41122. createBaseVNode("div", {
  41123. class: normalizeClass(unref(ns2).e("content"))
  41124. }, [
  41125. _ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
  41126. key: 0,
  41127. class: normalizeClass(unref(ns2).e("prefix"))
  41128. }, [
  41129. renderSlot(_ctx.$slots, "prefix", {}, () => [
  41130. createBaseVNode("span", null, toDisplayString(_ctx.prefix), 1)
  41131. ])
  41132. ], 2)) : createCommentVNode("v-if", true),
  41133. createBaseVNode("span", {
  41134. class: normalizeClass(unref(ns2).e("number")),
  41135. style: normalizeStyle(_ctx.valueStyle)
  41136. }, toDisplayString(unref(displayValue)), 7),
  41137. _ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
  41138. key: 1,
  41139. class: normalizeClass(unref(ns2).e("suffix"))
  41140. }, [
  41141. renderSlot(_ctx.$slots, "suffix", {}, () => [
  41142. createBaseVNode("span", null, toDisplayString(_ctx.suffix), 1)
  41143. ])
  41144. ], 2)) : createCommentVNode("v-if", true)
  41145. ], 2)
  41146. ], 2);
  41147. };
  41148. }
  41149. });
  41150. var Statistic = _export_sfc(_sfc_main115, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]);
  41151. // node_modules/element-plus/es/components/statistic/index.mjs
  41152. var ElStatistic = withInstall(Statistic);
  41153. // node_modules/element-plus/es/components/countdown/src/countdown.mjs
  41154. var countdownProps = buildProps({
  41155. format: {
  41156. type: String,
  41157. default: "HH:mm:ss"
  41158. },
  41159. prefix: String,
  41160. suffix: String,
  41161. title: String,
  41162. value: {
  41163. type: definePropType([Number, Object]),
  41164. default: 0
  41165. },
  41166. valueStyle: {
  41167. type: definePropType([String, Object, Array])
  41168. }
  41169. });
  41170. var countdownEmits = {
  41171. finish: () => true,
  41172. [CHANGE_EVENT]: (value) => isNumber2(value)
  41173. };
  41174. // node_modules/element-plus/es/components/countdown/src/utils.mjs
  41175. var timeUnits2 = [
  41176. ["Y", 1e3 * 60 * 60 * 24 * 365],
  41177. ["M", 1e3 * 60 * 60 * 24 * 30],
  41178. ["D", 1e3 * 60 * 60 * 24],
  41179. ["H", 1e3 * 60 * 60],
  41180. ["m", 1e3 * 60],
  41181. ["s", 1e3],
  41182. ["S", 1]
  41183. ];
  41184. var getTime = (value) => {
  41185. return isNumber2(value) ? new Date(value).getTime() : value.valueOf();
  41186. };
  41187. var formatTime = (timestamp2, format2) => {
  41188. let timeLeft = timestamp2;
  41189. const escapeRegex = /\[([^\]]*)]/g;
  41190. const replacedText = timeUnits2.reduce((current, [name, unit3]) => {
  41191. const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g");
  41192. if (replaceRegex.test(current)) {
  41193. const value = Math.floor(timeLeft / unit3);
  41194. timeLeft -= value * unit3;
  41195. return current.replace(replaceRegex, (match) => String(value).padStart(match.length, "0"));
  41196. }
  41197. return current;
  41198. }, format2);
  41199. return replacedText.replace(escapeRegex, "$1");
  41200. };
  41201. // node_modules/element-plus/es/components/countdown/src/countdown2.mjs
  41202. var __default__76 = defineComponent({
  41203. name: "ElCountdown"
  41204. });
  41205. var _sfc_main116 = defineComponent({
  41206. ...__default__76,
  41207. props: countdownProps,
  41208. emits: countdownEmits,
  41209. setup(__props, { expose, emit }) {
  41210. const props = __props;
  41211. let timer;
  41212. const rawValue = ref(getTime(props.value) - Date.now());
  41213. const displayValue = computed2(() => formatTime(rawValue.value, props.format));
  41214. const formatter2 = (val) => formatTime(val, props.format);
  41215. const stopTimer = () => {
  41216. if (timer) {
  41217. cAF(timer);
  41218. timer = void 0;
  41219. }
  41220. };
  41221. const startTimer = () => {
  41222. const timestamp2 = getTime(props.value);
  41223. const frameFunc = () => {
  41224. let diff = timestamp2 - Date.now();
  41225. emit("change", diff);
  41226. if (diff <= 0) {
  41227. diff = 0;
  41228. stopTimer();
  41229. emit("finish");
  41230. } else {
  41231. timer = rAF(frameFunc);
  41232. }
  41233. rawValue.value = diff;
  41234. };
  41235. timer = rAF(frameFunc);
  41236. };
  41237. watch(() => [props.value, props.format], () => {
  41238. stopTimer();
  41239. startTimer();
  41240. }, {
  41241. immediate: true
  41242. });
  41243. onBeforeUnmount(() => {
  41244. stopTimer();
  41245. });
  41246. expose({
  41247. displayValue
  41248. });
  41249. return (_ctx, _cache) => {
  41250. return openBlock(), createBlock(unref(ElStatistic), {
  41251. value: rawValue.value,
  41252. title: _ctx.title,
  41253. prefix: _ctx.prefix,
  41254. suffix: _ctx.suffix,
  41255. "value-style": _ctx.valueStyle,
  41256. formatter: formatter2
  41257. }, createSlots({ _: 2 }, [
  41258. renderList(_ctx.$slots, (_2, name) => {
  41259. return {
  41260. name,
  41261. fn: withCtx(() => [
  41262. renderSlot(_ctx.$slots, name)
  41263. ])
  41264. };
  41265. })
  41266. ]), 1032, ["value", "title", "prefix", "suffix", "value-style"]);
  41267. };
  41268. }
  41269. });
  41270. var Countdown = _export_sfc(_sfc_main116, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]);
  41271. // node_modules/element-plus/es/components/countdown/index.mjs
  41272. var ElCountdown = withInstall(Countdown);
  41273. // node_modules/element-plus/es/components/steps/src/steps.mjs
  41274. var stepsProps = buildProps({
  41275. space: {
  41276. type: [Number, String],
  41277. default: ""
  41278. },
  41279. active: {
  41280. type: Number,
  41281. default: 0
  41282. },
  41283. direction: {
  41284. type: String,
  41285. default: "horizontal",
  41286. values: ["horizontal", "vertical"]
  41287. },
  41288. alignCenter: {
  41289. type: Boolean
  41290. },
  41291. simple: {
  41292. type: Boolean
  41293. },
  41294. finishStatus: {
  41295. type: String,
  41296. values: ["wait", "process", "finish", "error", "success"],
  41297. default: "finish"
  41298. },
  41299. processStatus: {
  41300. type: String,
  41301. values: ["wait", "process", "finish", "error", "success"],
  41302. default: "process"
  41303. }
  41304. });
  41305. var stepsEmits = {
  41306. [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber2)
  41307. };
  41308. // node_modules/element-plus/es/components/steps/src/steps2.mjs
  41309. var __default__77 = defineComponent({
  41310. name: "ElSteps"
  41311. });
  41312. var _sfc_main117 = defineComponent({
  41313. ...__default__77,
  41314. props: stepsProps,
  41315. emits: stepsEmits,
  41316. setup(__props, { emit }) {
  41317. const props = __props;
  41318. const ns2 = useNamespace("steps");
  41319. const steps = ref([]);
  41320. watch(steps, () => {
  41321. steps.value.forEach((instance, index) => {
  41322. instance.setIndex(index);
  41323. });
  41324. });
  41325. provide("ElSteps", { props, steps });
  41326. watch(() => props.active, (newVal, oldVal) => {
  41327. emit(CHANGE_EVENT, newVal, oldVal);
  41328. });
  41329. return (_ctx, _cache) => {
  41330. return openBlock(), createElementBlock("div", {
  41331. class: normalizeClass([unref(ns2).b(), unref(ns2).m(_ctx.simple ? "simple" : _ctx.direction)])
  41332. }, [
  41333. renderSlot(_ctx.$slots, "default")
  41334. ], 2);
  41335. };
  41336. }
  41337. });
  41338. var Steps = _export_sfc(_sfc_main117, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]);
  41339. // node_modules/element-plus/es/components/steps/src/item.mjs
  41340. var stepProps = buildProps({
  41341. title: {
  41342. type: String,
  41343. default: ""
  41344. },
  41345. icon: {
  41346. type: iconPropType
  41347. },
  41348. description: {
  41349. type: String,
  41350. default: ""
  41351. },
  41352. status: {
  41353. type: String,
  41354. values: ["", "wait", "process", "finish", "error", "success"],
  41355. default: ""
  41356. }
  41357. });
  41358. // node_modules/element-plus/es/components/steps/src/item2.mjs
  41359. var __default__78 = defineComponent({
  41360. name: "ElStep"
  41361. });
  41362. var _sfc_main118 = defineComponent({
  41363. ...__default__78,
  41364. props: stepProps,
  41365. setup(__props) {
  41366. const props = __props;
  41367. const ns2 = useNamespace("step");
  41368. const index = ref(-1);
  41369. const lineStyle = ref({});
  41370. const internalStatus = ref("");
  41371. const parent2 = inject("ElSteps");
  41372. const currentInstance = getCurrentInstance();
  41373. onMounted(() => {
  41374. watch([
  41375. () => parent2.props.active,
  41376. () => parent2.props.processStatus,
  41377. () => parent2.props.finishStatus
  41378. ], ([active]) => {
  41379. updateStatus(active);
  41380. }, { immediate: true });
  41381. });
  41382. onBeforeUnmount(() => {
  41383. parent2.steps.value = parent2.steps.value.filter((instance) => instance.uid !== (currentInstance == null ? void 0 : currentInstance.uid));
  41384. });
  41385. const currentStatus = computed2(() => {
  41386. return props.status || internalStatus.value;
  41387. });
  41388. const prevStatus = computed2(() => {
  41389. const prevStep = parent2.steps.value[index.value - 1];
  41390. return prevStep ? prevStep.currentStatus : "wait";
  41391. });
  41392. const isCenter = computed2(() => {
  41393. return parent2.props.alignCenter;
  41394. });
  41395. const isVertical = computed2(() => {
  41396. return parent2.props.direction === "vertical";
  41397. });
  41398. const isSimple = computed2(() => {
  41399. return parent2.props.simple;
  41400. });
  41401. const stepsCount = computed2(() => {
  41402. return parent2.steps.value.length;
  41403. });
  41404. const isLast = computed2(() => {
  41405. var _a2;
  41406. return ((_a2 = parent2.steps.value[stepsCount.value - 1]) == null ? void 0 : _a2.uid) === (currentInstance == null ? void 0 : currentInstance.uid);
  41407. });
  41408. const space = computed2(() => {
  41409. return isSimple.value ? "" : parent2.props.space;
  41410. });
  41411. const style = computed2(() => {
  41412. const style2 = {
  41413. flexBasis: typeof space.value === "number" ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
  41414. };
  41415. if (isVertical.value)
  41416. return style2;
  41417. if (isLast.value) {
  41418. style2.maxWidth = `${100 / stepsCount.value}%`;
  41419. }
  41420. return style2;
  41421. });
  41422. const setIndex = (val) => {
  41423. index.value = val;
  41424. };
  41425. const calcProgress = (status) => {
  41426. let step = 100;
  41427. const style2 = {};
  41428. style2.transitionDelay = `${150 * index.value}ms`;
  41429. if (status === parent2.props.processStatus) {
  41430. step = 0;
  41431. } else if (status === "wait") {
  41432. step = 0;
  41433. style2.transitionDelay = `${-150 * index.value}ms`;
  41434. }
  41435. style2.borderWidth = step && !isSimple.value ? "1px" : 0;
  41436. style2[parent2.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
  41437. lineStyle.value = style2;
  41438. };
  41439. const updateStatus = (activeIndex) => {
  41440. if (activeIndex > index.value) {
  41441. internalStatus.value = parent2.props.finishStatus;
  41442. } else if (activeIndex === index.value && prevStatus.value !== "error") {
  41443. internalStatus.value = parent2.props.processStatus;
  41444. } else {
  41445. internalStatus.value = "wait";
  41446. }
  41447. const prevChild = parent2.steps.value[index.value - 1];
  41448. if (prevChild)
  41449. prevChild.calcProgress(internalStatus.value);
  41450. };
  41451. const stepItemState = reactive({
  41452. uid: computed2(() => currentInstance == null ? void 0 : currentInstance.uid),
  41453. currentStatus,
  41454. setIndex,
  41455. calcProgress
  41456. });
  41457. parent2.steps.value = [...parent2.steps.value, stepItemState];
  41458. return (_ctx, _cache) => {
  41459. return openBlock(), createElementBlock("div", {
  41460. style: normalizeStyle(unref(style)),
  41461. class: normalizeClass([
  41462. unref(ns2).b(),
  41463. unref(ns2).is(unref(isSimple) ? "simple" : unref(parent2).props.direction),
  41464. unref(ns2).is("flex", unref(isLast) && !unref(space) && !unref(isCenter)),
  41465. unref(ns2).is("center", unref(isCenter) && !unref(isVertical) && !unref(isSimple))
  41466. ])
  41467. }, [
  41468. createCommentVNode(" icon & line "),
  41469. createBaseVNode("div", {
  41470. class: normalizeClass([unref(ns2).e("head"), unref(ns2).is(unref(currentStatus))])
  41471. }, [
  41472. !unref(isSimple) ? (openBlock(), createElementBlock("div", {
  41473. key: 0,
  41474. class: normalizeClass(unref(ns2).e("line"))
  41475. }, [
  41476. createBaseVNode("i", {
  41477. class: normalizeClass(unref(ns2).e("line-inner")),
  41478. style: normalizeStyle(lineStyle.value)
  41479. }, null, 6)
  41480. ], 2)) : createCommentVNode("v-if", true),
  41481. createBaseVNode("div", {
  41482. class: normalizeClass([unref(ns2).e("icon"), unref(ns2).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
  41483. }, [
  41484. renderSlot(_ctx.$slots, "icon", {}, () => [
  41485. _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
  41486. key: 0,
  41487. class: normalizeClass(unref(ns2).e("icon-inner"))
  41488. }, {
  41489. default: withCtx(() => [
  41490. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  41491. ]),
  41492. _: 1
  41493. }, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), {
  41494. key: 1,
  41495. class: normalizeClass([unref(ns2).e("icon-inner"), unref(ns2).is("status")])
  41496. }, {
  41497. default: withCtx(() => [
  41498. createVNode(unref(check_default))
  41499. ]),
  41500. _: 1
  41501. }, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), {
  41502. key: 2,
  41503. class: normalizeClass([unref(ns2).e("icon-inner"), unref(ns2).is("status")])
  41504. }, {
  41505. default: withCtx(() => [
  41506. createVNode(unref(close_default))
  41507. ]),
  41508. _: 1
  41509. }, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", {
  41510. key: 3,
  41511. class: normalizeClass(unref(ns2).e("icon-inner"))
  41512. }, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)
  41513. ])
  41514. ], 2)
  41515. ], 2),
  41516. createCommentVNode(" title & description "),
  41517. createBaseVNode("div", {
  41518. class: normalizeClass(unref(ns2).e("main"))
  41519. }, [
  41520. createBaseVNode("div", {
  41521. class: normalizeClass([unref(ns2).e("title"), unref(ns2).is(unref(currentStatus))])
  41522. }, [
  41523. renderSlot(_ctx.$slots, "title", {}, () => [
  41524. createTextVNode(toDisplayString(_ctx.title), 1)
  41525. ])
  41526. ], 2),
  41527. unref(isSimple) ? (openBlock(), createElementBlock("div", {
  41528. key: 0,
  41529. class: normalizeClass(unref(ns2).e("arrow"))
  41530. }, null, 2)) : (openBlock(), createElementBlock("div", {
  41531. key: 1,
  41532. class: normalizeClass([unref(ns2).e("description"), unref(ns2).is(unref(currentStatus))])
  41533. }, [
  41534. renderSlot(_ctx.$slots, "description", {}, () => [
  41535. createTextVNode(toDisplayString(_ctx.description), 1)
  41536. ])
  41537. ], 2))
  41538. ], 2)
  41539. ], 6);
  41540. };
  41541. }
  41542. });
  41543. var Step = _export_sfc(_sfc_main118, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]);
  41544. // node_modules/element-plus/es/components/steps/index.mjs
  41545. var ElSteps = withInstall(Steps, {
  41546. Step
  41547. });
  41548. var ElStep = withNoopInstall(Step);
  41549. // node_modules/element-plus/es/components/switch/src/switch.mjs
  41550. var switchProps = buildProps({
  41551. modelValue: {
  41552. type: [Boolean, String, Number],
  41553. default: false
  41554. },
  41555. value: {
  41556. type: [Boolean, String, Number],
  41557. default: false
  41558. },
  41559. disabled: {
  41560. type: Boolean,
  41561. default: false
  41562. },
  41563. width: {
  41564. type: [String, Number],
  41565. default: ""
  41566. },
  41567. inlinePrompt: {
  41568. type: Boolean,
  41569. default: false
  41570. },
  41571. activeIcon: {
  41572. type: iconPropType
  41573. },
  41574. inactiveIcon: {
  41575. type: iconPropType
  41576. },
  41577. activeText: {
  41578. type: String,
  41579. default: ""
  41580. },
  41581. inactiveText: {
  41582. type: String,
  41583. default: ""
  41584. },
  41585. activeColor: {
  41586. type: String,
  41587. default: ""
  41588. },
  41589. inactiveColor: {
  41590. type: String,
  41591. default: ""
  41592. },
  41593. borderColor: {
  41594. type: String,
  41595. default: ""
  41596. },
  41597. activeValue: {
  41598. type: [Boolean, String, Number],
  41599. default: true
  41600. },
  41601. inactiveValue: {
  41602. type: [Boolean, String, Number],
  41603. default: false
  41604. },
  41605. name: {
  41606. type: String,
  41607. default: ""
  41608. },
  41609. validateEvent: {
  41610. type: Boolean,
  41611. default: true
  41612. },
  41613. id: String,
  41614. loading: {
  41615. type: Boolean,
  41616. default: false
  41617. },
  41618. beforeChange: {
  41619. type: definePropType(Function)
  41620. },
  41621. size: {
  41622. type: String,
  41623. validator: isValidComponentSize
  41624. },
  41625. tabindex: {
  41626. type: [String, Number]
  41627. }
  41628. });
  41629. var switchEmits = {
  41630. [UPDATE_MODEL_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber2(val),
  41631. [CHANGE_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber2(val),
  41632. [INPUT_EVENT]: (val) => isBoolean2(val) || isString(val) || isNumber2(val)
  41633. };
  41634. // node_modules/element-plus/es/components/switch/src/switch2.mjs
  41635. var _hoisted_158 = ["onClick"];
  41636. var _hoisted_236 = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"];
  41637. var _hoisted_317 = ["aria-hidden"];
  41638. var _hoisted_410 = ["aria-hidden"];
  41639. var _hoisted_57 = ["aria-hidden"];
  41640. var COMPONENT_NAME16 = "ElSwitch";
  41641. var __default__79 = defineComponent({
  41642. name: COMPONENT_NAME16
  41643. });
  41644. var _sfc_main119 = defineComponent({
  41645. ...__default__79,
  41646. props: switchProps,
  41647. emits: switchEmits,
  41648. setup(__props, { expose, emit }) {
  41649. const props = __props;
  41650. const vm = getCurrentInstance();
  41651. const { formItem } = useFormItem();
  41652. const switchSize = useSize();
  41653. const ns2 = useNamespace("switch");
  41654. useDeprecated({
  41655. from: '"value"',
  41656. replacement: '"model-value" or "v-model"',
  41657. scope: COMPONENT_NAME16,
  41658. version: "2.3.0",
  41659. ref: "https://element-plus.org/en-US/component/switch.html#attributes",
  41660. type: "Attribute"
  41661. }, computed2(() => {
  41662. var _a2;
  41663. return !!((_a2 = vm.vnode.props) == null ? void 0 : _a2.value);
  41664. }));
  41665. const { inputId } = useFormItemInputId(props, {
  41666. formItemContext: formItem
  41667. });
  41668. const switchDisabled = useDisabled(computed2(() => props.loading));
  41669. const isControlled = ref(props.modelValue !== false);
  41670. const input = ref();
  41671. const core = ref();
  41672. const switchKls = computed2(() => [
  41673. ns2.b(),
  41674. ns2.m(switchSize.value),
  41675. ns2.is("disabled", switchDisabled.value),
  41676. ns2.is("checked", checked.value)
  41677. ]);
  41678. const coreStyle = computed2(() => ({
  41679. width: addUnit(props.width)
  41680. }));
  41681. watch(() => props.modelValue, () => {
  41682. isControlled.value = true;
  41683. });
  41684. watch(() => props.value, () => {
  41685. isControlled.value = false;
  41686. });
  41687. const actualValue = computed2(() => {
  41688. return isControlled.value ? props.modelValue : props.value;
  41689. });
  41690. const checked = computed2(() => actualValue.value === props.activeValue);
  41691. if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
  41692. emit(UPDATE_MODEL_EVENT, props.inactiveValue);
  41693. emit(CHANGE_EVENT, props.inactiveValue);
  41694. emit(INPUT_EVENT, props.inactiveValue);
  41695. }
  41696. watch(checked, (val) => {
  41697. var _a2;
  41698. input.value.checked = val;
  41699. if (props.validateEvent) {
  41700. (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change").catch((err) => debugWarn(err));
  41701. }
  41702. });
  41703. const handleChange = () => {
  41704. const val = checked.value ? props.inactiveValue : props.activeValue;
  41705. emit(UPDATE_MODEL_EVENT, val);
  41706. emit(CHANGE_EVENT, val);
  41707. emit(INPUT_EVENT, val);
  41708. nextTick(() => {
  41709. input.value.checked = checked.value;
  41710. });
  41711. };
  41712. const switchValue = () => {
  41713. if (switchDisabled.value)
  41714. return;
  41715. const { beforeChange } = props;
  41716. if (!beforeChange) {
  41717. handleChange();
  41718. return;
  41719. }
  41720. const shouldChange = beforeChange();
  41721. const isPromiseOrBool = [
  41722. isPromise(shouldChange),
  41723. isBoolean2(shouldChange)
  41724. ].includes(true);
  41725. if (!isPromiseOrBool) {
  41726. throwError(COMPONENT_NAME16, "beforeChange must return type `Promise<boolean>` or `boolean`");
  41727. }
  41728. if (isPromise(shouldChange)) {
  41729. shouldChange.then((result2) => {
  41730. if (result2) {
  41731. handleChange();
  41732. }
  41733. }).catch((e) => {
  41734. debugWarn(COMPONENT_NAME16, `some error occurred: ${e}`);
  41735. });
  41736. } else if (shouldChange) {
  41737. handleChange();
  41738. }
  41739. };
  41740. const styles = computed2(() => {
  41741. return ns2.cssVarBlock({
  41742. ...props.activeColor ? { "on-color": props.activeColor } : null,
  41743. ...props.inactiveColor ? { "off-color": props.inactiveColor } : null,
  41744. ...props.borderColor ? { "border-color": props.borderColor } : null
  41745. });
  41746. });
  41747. const focus = () => {
  41748. var _a2, _b;
  41749. (_b = (_a2 = input.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
  41750. };
  41751. onMounted(() => {
  41752. input.value.checked = checked.value;
  41753. });
  41754. expose({
  41755. focus,
  41756. checked
  41757. });
  41758. return (_ctx, _cache) => {
  41759. return openBlock(), createElementBlock("div", {
  41760. class: normalizeClass(unref(switchKls)),
  41761. style: normalizeStyle(unref(styles)),
  41762. onClick: withModifiers(switchValue, ["prevent"])
  41763. }, [
  41764. createBaseVNode("input", {
  41765. id: unref(inputId),
  41766. ref_key: "input",
  41767. ref: input,
  41768. class: normalizeClass(unref(ns2).e("input")),
  41769. type: "checkbox",
  41770. role: "switch",
  41771. "aria-checked": unref(checked),
  41772. "aria-disabled": unref(switchDisabled),
  41773. name: _ctx.name,
  41774. "true-value": _ctx.activeValue,
  41775. "false-value": _ctx.inactiveValue,
  41776. disabled: unref(switchDisabled),
  41777. tabindex: _ctx.tabindex,
  41778. onChange: handleChange,
  41779. onKeydown: withKeys(switchValue, ["enter"])
  41780. }, null, 42, _hoisted_236),
  41781. !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", {
  41782. key: 0,
  41783. class: normalizeClass([
  41784. unref(ns2).e("label"),
  41785. unref(ns2).em("label", "left"),
  41786. unref(ns2).is("active", !unref(checked))
  41787. ])
  41788. }, [
  41789. _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  41790. default: withCtx(() => [
  41791. (openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon)))
  41792. ]),
  41793. _: 1
  41794. })) : createCommentVNode("v-if", true),
  41795. !_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
  41796. key: 1,
  41797. "aria-hidden": unref(checked)
  41798. }, toDisplayString(_ctx.inactiveText), 9, _hoisted_317)) : createCommentVNode("v-if", true)
  41799. ], 2)) : createCommentVNode("v-if", true),
  41800. createBaseVNode("span", {
  41801. ref_key: "core",
  41802. ref: core,
  41803. class: normalizeClass(unref(ns2).e("core")),
  41804. style: normalizeStyle(unref(coreStyle))
  41805. }, [
  41806. _ctx.inlinePrompt ? (openBlock(), createElementBlock("div", {
  41807. key: 0,
  41808. class: normalizeClass(unref(ns2).e("inner"))
  41809. }, [
  41810. _ctx.activeIcon || _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), {
  41811. key: 0,
  41812. class: normalizeClass(unref(ns2).is("icon"))
  41813. }, {
  41814. default: withCtx(() => [
  41815. (openBlock(), createBlock(resolveDynamicComponent(unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon)))
  41816. ]),
  41817. _: 1
  41818. }, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
  41819. key: 1,
  41820. class: normalizeClass(unref(ns2).is("text")),
  41821. "aria-hidden": !unref(checked)
  41822. }, toDisplayString(unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, _hoisted_410)) : createCommentVNode("v-if", true)
  41823. ], 2)) : createCommentVNode("v-if", true),
  41824. createBaseVNode("div", {
  41825. class: normalizeClass(unref(ns2).e("action"))
  41826. }, [
  41827. _ctx.loading ? (openBlock(), createBlock(unref(ElIcon), {
  41828. key: 0,
  41829. class: normalizeClass(unref(ns2).is("loading"))
  41830. }, {
  41831. default: withCtx(() => [
  41832. createVNode(unref(loading_default))
  41833. ]),
  41834. _: 1
  41835. }, 8, ["class"])) : createCommentVNode("v-if", true)
  41836. ], 2)
  41837. ], 6),
  41838. !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", {
  41839. key: 1,
  41840. class: normalizeClass([
  41841. unref(ns2).e("label"),
  41842. unref(ns2).em("label", "right"),
  41843. unref(ns2).is("active", unref(checked))
  41844. ])
  41845. }, [
  41846. _ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
  41847. default: withCtx(() => [
  41848. (openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon)))
  41849. ]),
  41850. _: 1
  41851. })) : createCommentVNode("v-if", true),
  41852. !_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock("span", {
  41853. key: 1,
  41854. "aria-hidden": !unref(checked)
  41855. }, toDisplayString(_ctx.activeText), 9, _hoisted_57)) : createCommentVNode("v-if", true)
  41856. ], 2)) : createCommentVNode("v-if", true)
  41857. ], 14, _hoisted_158);
  41858. };
  41859. }
  41860. });
  41861. var Switch = _export_sfc(_sfc_main119, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);
  41862. // node_modules/element-plus/es/components/switch/index.mjs
  41863. var ElSwitch = withInstall(Switch);
  41864. // node_modules/element-plus/es/components/table/src/util.mjs
  41865. var import_escape_html = __toESM(require_escape_html(), 1);
  41866. var getCell = function(event) {
  41867. var _a2;
  41868. return (_a2 = event.target) == null ? void 0 : _a2.closest("td");
  41869. };
  41870. var isObject4 = function(obj) {
  41871. return obj !== null && typeof obj === "object";
  41872. };
  41873. var orderBy2 = function(array4, sortKey, reverse2, sortMethod, sortBy2) {
  41874. if (!sortKey && !sortMethod && (!sortBy2 || Array.isArray(sortBy2) && !sortBy2.length)) {
  41875. return array4;
  41876. }
  41877. if (typeof reverse2 === "string") {
  41878. reverse2 = reverse2 === "descending" ? -1 : 1;
  41879. } else {
  41880. reverse2 = reverse2 && reverse2 < 0 ? -1 : 1;
  41881. }
  41882. const getKey = sortMethod ? null : function(value, index) {
  41883. if (sortBy2) {
  41884. if (!Array.isArray(sortBy2)) {
  41885. sortBy2 = [sortBy2];
  41886. }
  41887. return sortBy2.map((by) => {
  41888. if (typeof by === "string") {
  41889. return get_default(value, by);
  41890. } else {
  41891. return by(value, index, array4);
  41892. }
  41893. });
  41894. }
  41895. if (sortKey !== "$key") {
  41896. if (isObject4(value) && "$value" in value)
  41897. value = value.$value;
  41898. }
  41899. return [isObject4(value) ? get_default(value, sortKey) : value];
  41900. };
  41901. const compare = function(a2, b2) {
  41902. if (sortMethod) {
  41903. return sortMethod(a2.value, b2.value);
  41904. }
  41905. for (let i = 0, len = a2.key.length; i < len; i++) {
  41906. if (a2.key[i] < b2.key[i]) {
  41907. return -1;
  41908. }
  41909. if (a2.key[i] > b2.key[i]) {
  41910. return 1;
  41911. }
  41912. }
  41913. return 0;
  41914. };
  41915. return array4.map((value, index) => {
  41916. return {
  41917. value,
  41918. index,
  41919. key: getKey ? getKey(value, index) : null
  41920. };
  41921. }).sort((a2, b2) => {
  41922. let order = compare(a2, b2);
  41923. if (!order) {
  41924. order = a2.index - b2.index;
  41925. }
  41926. return order * +reverse2;
  41927. }).map((item) => item.value);
  41928. };
  41929. var getColumnById = function(table, columnId) {
  41930. let column2 = null;
  41931. table.columns.forEach((item) => {
  41932. if (item.id === columnId) {
  41933. column2 = item;
  41934. }
  41935. });
  41936. return column2;
  41937. };
  41938. var getColumnByKey = function(table, columnKey) {
  41939. let column2 = null;
  41940. for (let i = 0; i < table.columns.length; i++) {
  41941. const item = table.columns[i];
  41942. if (item.columnKey === columnKey) {
  41943. column2 = item;
  41944. break;
  41945. }
  41946. }
  41947. if (!column2)
  41948. throwError("ElTable", `No column matching with column-key: ${columnKey}`);
  41949. return column2;
  41950. };
  41951. var getColumnByCell = function(table, cell, namespace) {
  41952. const matches2 = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm"));
  41953. if (matches2) {
  41954. return getColumnById(table, matches2[0]);
  41955. }
  41956. return null;
  41957. };
  41958. var getRowIdentity = (row, rowKey2) => {
  41959. if (!row)
  41960. throw new Error("Row is required when get row identity");
  41961. if (typeof rowKey2 === "string") {
  41962. if (!rowKey2.includes(".")) {
  41963. return `${row[rowKey2]}`;
  41964. }
  41965. const key = rowKey2.split(".");
  41966. let current = row;
  41967. for (const element of key) {
  41968. current = current[element];
  41969. }
  41970. return `${current}`;
  41971. } else if (typeof rowKey2 === "function") {
  41972. return rowKey2.call(null, row);
  41973. }
  41974. };
  41975. var getKeysMap = function(array4, rowKey2) {
  41976. const arrayMap2 = {};
  41977. (array4 || []).forEach((row, index) => {
  41978. arrayMap2[getRowIdentity(row, rowKey2)] = { row, index };
  41979. });
  41980. return arrayMap2;
  41981. };
  41982. function mergeOptions(defaults2, config) {
  41983. const options = {};
  41984. let key;
  41985. for (key in defaults2) {
  41986. options[key] = defaults2[key];
  41987. }
  41988. for (key in config) {
  41989. if (hasOwn(config, key)) {
  41990. const value = config[key];
  41991. if (typeof value !== "undefined") {
  41992. options[key] = value;
  41993. }
  41994. }
  41995. }
  41996. return options;
  41997. }
  41998. function parseWidth(width) {
  41999. if (width === "")
  42000. return width;
  42001. if (width !== void 0) {
  42002. width = Number.parseInt(width, 10);
  42003. if (Number.isNaN(width)) {
  42004. width = "";
  42005. }
  42006. }
  42007. return width;
  42008. }
  42009. function parseMinWidth(minWidth) {
  42010. if (minWidth === "")
  42011. return minWidth;
  42012. if (minWidth !== void 0) {
  42013. minWidth = parseWidth(minWidth);
  42014. if (Number.isNaN(minWidth)) {
  42015. minWidth = 80;
  42016. }
  42017. }
  42018. return minWidth;
  42019. }
  42020. function parseHeight(height) {
  42021. if (typeof height === "number") {
  42022. return height;
  42023. }
  42024. if (typeof height === "string") {
  42025. if (/^\d+(?:px)?$/.test(height)) {
  42026. return Number.parseInt(height, 10);
  42027. } else {
  42028. return height;
  42029. }
  42030. }
  42031. return null;
  42032. }
  42033. function compose(...funcs) {
  42034. if (funcs.length === 0) {
  42035. return (arg) => arg;
  42036. }
  42037. if (funcs.length === 1) {
  42038. return funcs[0];
  42039. }
  42040. return funcs.reduce((a2, b2) => (...args) => a2(b2(...args)));
  42041. }
  42042. function toggleRowStatus(statusArr, row, newVal) {
  42043. let changed = false;
  42044. const index = statusArr.indexOf(row);
  42045. const included = index !== -1;
  42046. const toggleStatus = (type4) => {
  42047. if (type4 === "add") {
  42048. statusArr.push(row);
  42049. } else {
  42050. statusArr.splice(index, 1);
  42051. }
  42052. changed = true;
  42053. if (isArray(row.children)) {
  42054. row.children.forEach((item) => {
  42055. toggleRowStatus(statusArr, item, newVal != null ? newVal : !included);
  42056. });
  42057. }
  42058. };
  42059. if (isBoolean2(newVal)) {
  42060. if (newVal && !included) {
  42061. toggleStatus("add");
  42062. } else if (!newVal && included) {
  42063. toggleStatus("remove");
  42064. }
  42065. } else {
  42066. included ? toggleStatus("remove") : toggleStatus("add");
  42067. }
  42068. return changed;
  42069. }
  42070. function walkTreeNode(root2, cb, childrenKey = "children", lazyKey = "hasChildren") {
  42071. const isNil2 = (array4) => !(Array.isArray(array4) && array4.length);
  42072. function _walker(parent2, children, level) {
  42073. cb(parent2, children, level);
  42074. children.forEach((item) => {
  42075. if (item[lazyKey]) {
  42076. cb(item, null, level + 1);
  42077. return;
  42078. }
  42079. const children2 = item[childrenKey];
  42080. if (!isNil2(children2)) {
  42081. _walker(item, children2, level + 1);
  42082. }
  42083. });
  42084. }
  42085. root2.forEach((item) => {
  42086. if (item[lazyKey]) {
  42087. cb(item, null, 0);
  42088. return;
  42089. }
  42090. const children = item[childrenKey];
  42091. if (!isNil2(children)) {
  42092. _walker(item, children, 0);
  42093. }
  42094. });
  42095. }
  42096. var removePopper;
  42097. function createTablePopper(parentNode, trigger, popperContent, popperOptions2, tooltipEffect) {
  42098. const { nextZIndex } = useZIndex();
  42099. const ns2 = parentNode == null ? void 0 : parentNode.dataset.prefix;
  42100. const scrollContainer = parentNode == null ? void 0 : parentNode.querySelector(`.${ns2}-scrollbar__wrap`);
  42101. function renderContent() {
  42102. const isLight = tooltipEffect === "light";
  42103. const content2 = document.createElement("div");
  42104. content2.className = `${ns2}-popper ${isLight ? "is-light" : "is-dark"}`;
  42105. popperContent = (0, import_escape_html.default)(popperContent);
  42106. content2.innerHTML = popperContent;
  42107. content2.style.zIndex = String(nextZIndex());
  42108. parentNode == null ? void 0 : parentNode.appendChild(content2);
  42109. return content2;
  42110. }
  42111. function renderArrow() {
  42112. const arrow22 = document.createElement("div");
  42113. arrow22.className = `${ns2}-popper__arrow`;
  42114. return arrow22;
  42115. }
  42116. function showPopper() {
  42117. popperInstance && popperInstance.update();
  42118. }
  42119. removePopper == null ? void 0 : removePopper();
  42120. removePopper = () => {
  42121. try {
  42122. popperInstance && popperInstance.destroy();
  42123. content && (parentNode == null ? void 0 : parentNode.removeChild(content));
  42124. trigger.removeEventListener("mouseenter", showPopper);
  42125. trigger.removeEventListener("mouseleave", removePopper);
  42126. scrollContainer == null ? void 0 : scrollContainer.removeEventListener("scroll", removePopper);
  42127. removePopper = void 0;
  42128. } catch (e) {
  42129. }
  42130. };
  42131. let popperInstance = null;
  42132. const content = renderContent();
  42133. const arrow2 = renderArrow();
  42134. content.appendChild(arrow2);
  42135. popperInstance = yn(trigger, content, {
  42136. strategy: "absolute",
  42137. modifiers: [
  42138. {
  42139. name: "offset",
  42140. options: {
  42141. offset: [0, 8]
  42142. }
  42143. },
  42144. {
  42145. name: "arrow",
  42146. options: {
  42147. element: arrow2,
  42148. padding: 10
  42149. }
  42150. }
  42151. ],
  42152. ...popperOptions2
  42153. });
  42154. trigger.addEventListener("mouseenter", showPopper);
  42155. trigger.addEventListener("mouseleave", removePopper);
  42156. scrollContainer == null ? void 0 : scrollContainer.addEventListener("scroll", removePopper);
  42157. return popperInstance;
  42158. }
  42159. function getCurrentColumns(column2) {
  42160. if (column2.children) {
  42161. return flatMap_default(column2.children, getCurrentColumns);
  42162. } else {
  42163. return [column2];
  42164. }
  42165. }
  42166. function getColSpan(colSpan, column2) {
  42167. return colSpan + column2.colSpan;
  42168. }
  42169. var isFixedColumn = (index, fixed, store, realColumns) => {
  42170. let start = 0;
  42171. let after2 = index;
  42172. const columns2 = store.states.columns.value;
  42173. if (realColumns) {
  42174. const curColumns = getCurrentColumns(realColumns[index]);
  42175. const preColumns = columns2.slice(0, columns2.indexOf(curColumns[0]));
  42176. start = preColumns.reduce(getColSpan, 0);
  42177. after2 = start + curColumns.reduce(getColSpan, 0) - 1;
  42178. } else {
  42179. start = index;
  42180. }
  42181. let fixedLayout;
  42182. switch (fixed) {
  42183. case "left":
  42184. if (after2 < store.states.fixedLeafColumnsLength.value) {
  42185. fixedLayout = "left";
  42186. }
  42187. break;
  42188. case "right":
  42189. if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) {
  42190. fixedLayout = "right";
  42191. }
  42192. break;
  42193. default:
  42194. if (after2 < store.states.fixedLeafColumnsLength.value) {
  42195. fixedLayout = "left";
  42196. } else if (start >= columns2.length - store.states.rightFixedLeafColumnsLength.value) {
  42197. fixedLayout = "right";
  42198. }
  42199. }
  42200. return fixedLayout ? {
  42201. direction: fixedLayout,
  42202. start,
  42203. after: after2
  42204. } : {};
  42205. };
  42206. var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset2 = 0) => {
  42207. const classes = [];
  42208. const { direction: direction2, start, after: after2 } = isFixedColumn(index, fixed, store, realColumns);
  42209. if (direction2) {
  42210. const isLeft = direction2 === "left";
  42211. classes.push(`${namespace}-fixed-column--${direction2}`);
  42212. if (isLeft && after2 + offset2 === store.states.fixedLeafColumnsLength.value - 1) {
  42213. classes.push("is-last-column");
  42214. } else if (!isLeft && start - offset2 === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) {
  42215. classes.push("is-first-column");
  42216. }
  42217. }
  42218. return classes;
  42219. };
  42220. function getOffset2(offset2, column2) {
  42221. return offset2 + (column2.realWidth === null || Number.isNaN(column2.realWidth) ? Number(column2.width) : column2.realWidth);
  42222. }
  42223. var getFixedColumnOffset = (index, fixed, store, realColumns) => {
  42224. const {
  42225. direction: direction2,
  42226. start = 0,
  42227. after: after2 = 0
  42228. } = isFixedColumn(index, fixed, store, realColumns);
  42229. if (!direction2) {
  42230. return;
  42231. }
  42232. const styles = {};
  42233. const isLeft = direction2 === "left";
  42234. const columns2 = store.states.columns.value;
  42235. if (isLeft) {
  42236. styles.left = columns2.slice(0, start).reduce(getOffset2, 0);
  42237. } else {
  42238. styles.right = columns2.slice(after2 + 1).reverse().reduce(getOffset2, 0);
  42239. }
  42240. return styles;
  42241. };
  42242. var ensurePosition = (style, key) => {
  42243. if (!style)
  42244. return;
  42245. if (!Number.isNaN(style[key])) {
  42246. style[key] = `${style[key]}px`;
  42247. }
  42248. };
  42249. // node_modules/element-plus/es/components/table/src/store/expand.mjs
  42250. function useExpand(watcherData) {
  42251. const instance = getCurrentInstance();
  42252. const defaultExpandAll = ref(false);
  42253. const expandRows = ref([]);
  42254. const updateExpandRows = () => {
  42255. const data = watcherData.data.value || [];
  42256. const rowKey2 = watcherData.rowKey.value;
  42257. if (defaultExpandAll.value) {
  42258. expandRows.value = data.slice();
  42259. } else if (rowKey2) {
  42260. const expandRowsMap = getKeysMap(expandRows.value, rowKey2);
  42261. expandRows.value = data.reduce((prev, row) => {
  42262. const rowId = getRowIdentity(row, rowKey2);
  42263. const rowInfo = expandRowsMap[rowId];
  42264. if (rowInfo) {
  42265. prev.push(row);
  42266. }
  42267. return prev;
  42268. }, []);
  42269. } else {
  42270. expandRows.value = [];
  42271. }
  42272. };
  42273. const toggleRowExpansion = (row, expanded) => {
  42274. const changed = toggleRowStatus(expandRows.value, row, expanded);
  42275. if (changed) {
  42276. instance.emit("expand-change", row, expandRows.value.slice());
  42277. }
  42278. };
  42279. const setExpandRowKeys = (rowKeys) => {
  42280. instance.store.assertRowKey();
  42281. const data = watcherData.data.value || [];
  42282. const rowKey2 = watcherData.rowKey.value;
  42283. const keysMap = getKeysMap(data, rowKey2);
  42284. expandRows.value = rowKeys.reduce((prev, cur) => {
  42285. const info = keysMap[cur];
  42286. if (info) {
  42287. prev.push(info.row);
  42288. }
  42289. return prev;
  42290. }, []);
  42291. };
  42292. const isRowExpanded = (row) => {
  42293. const rowKey2 = watcherData.rowKey.value;
  42294. if (rowKey2) {
  42295. const expandMap = getKeysMap(expandRows.value, rowKey2);
  42296. return !!expandMap[getRowIdentity(row, rowKey2)];
  42297. }
  42298. return expandRows.value.includes(row);
  42299. };
  42300. return {
  42301. updateExpandRows,
  42302. toggleRowExpansion,
  42303. setExpandRowKeys,
  42304. isRowExpanded,
  42305. states: {
  42306. expandRows,
  42307. defaultExpandAll
  42308. }
  42309. };
  42310. }
  42311. // node_modules/element-plus/es/components/table/src/store/current.mjs
  42312. function useCurrent(watcherData) {
  42313. const instance = getCurrentInstance();
  42314. const _currentRowKey = ref(null);
  42315. const currentRow = ref(null);
  42316. const setCurrentRowKey = (key) => {
  42317. instance.store.assertRowKey();
  42318. _currentRowKey.value = key;
  42319. setCurrentRowByKey(key);
  42320. };
  42321. const restoreCurrentRowKey = () => {
  42322. _currentRowKey.value = null;
  42323. };
  42324. const setCurrentRowByKey = (key) => {
  42325. const { data, rowKey: rowKey2 } = watcherData;
  42326. let _currentRow = null;
  42327. if (rowKey2.value) {
  42328. _currentRow = (unref(data) || []).find((item) => getRowIdentity(item, rowKey2.value) === key);
  42329. }
  42330. currentRow.value = _currentRow;
  42331. instance.emit("current-change", currentRow.value, null);
  42332. };
  42333. const updateCurrentRow = (_currentRow) => {
  42334. const oldCurrentRow = currentRow.value;
  42335. if (_currentRow && _currentRow !== oldCurrentRow) {
  42336. currentRow.value = _currentRow;
  42337. instance.emit("current-change", currentRow.value, oldCurrentRow);
  42338. return;
  42339. }
  42340. if (!_currentRow && oldCurrentRow) {
  42341. currentRow.value = null;
  42342. instance.emit("current-change", null, oldCurrentRow);
  42343. }
  42344. };
  42345. const updateCurrentRowData = () => {
  42346. const rowKey2 = watcherData.rowKey.value;
  42347. const data = watcherData.data.value || [];
  42348. const oldCurrentRow = currentRow.value;
  42349. if (!data.includes(oldCurrentRow) && oldCurrentRow) {
  42350. if (rowKey2) {
  42351. const currentRowKey = getRowIdentity(oldCurrentRow, rowKey2);
  42352. setCurrentRowByKey(currentRowKey);
  42353. } else {
  42354. currentRow.value = null;
  42355. }
  42356. if (currentRow.value === null) {
  42357. instance.emit("current-change", null, oldCurrentRow);
  42358. }
  42359. } else if (_currentRowKey.value) {
  42360. setCurrentRowByKey(_currentRowKey.value);
  42361. restoreCurrentRowKey();
  42362. }
  42363. };
  42364. return {
  42365. setCurrentRowKey,
  42366. restoreCurrentRowKey,
  42367. setCurrentRowByKey,
  42368. updateCurrentRow,
  42369. updateCurrentRowData,
  42370. states: {
  42371. _currentRowKey,
  42372. currentRow
  42373. }
  42374. };
  42375. }
  42376. // node_modules/element-plus/es/components/table/src/store/tree.mjs
  42377. function useTree(watcherData) {
  42378. const expandRowKeys = ref([]);
  42379. const treeData = ref({});
  42380. const indent = ref(16);
  42381. const lazy = ref(false);
  42382. const lazyTreeNodeMap = ref({});
  42383. const lazyColumnIdentifier = ref("hasChildren");
  42384. const childrenColumnName = ref("children");
  42385. const instance = getCurrentInstance();
  42386. const normalizedData = computed2(() => {
  42387. if (!watcherData.rowKey.value)
  42388. return {};
  42389. const data = watcherData.data.value || [];
  42390. return normalize(data);
  42391. });
  42392. const normalizedLazyNode = computed2(() => {
  42393. const rowKey2 = watcherData.rowKey.value;
  42394. const keys3 = Object.keys(lazyTreeNodeMap.value);
  42395. const res = {};
  42396. if (!keys3.length)
  42397. return res;
  42398. keys3.forEach((key) => {
  42399. if (lazyTreeNodeMap.value[key].length) {
  42400. const item = { children: [] };
  42401. lazyTreeNodeMap.value[key].forEach((row) => {
  42402. const currentRowKey = getRowIdentity(row, rowKey2);
  42403. item.children.push(currentRowKey);
  42404. if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) {
  42405. res[currentRowKey] = { children: [] };
  42406. }
  42407. });
  42408. res[key] = item;
  42409. }
  42410. });
  42411. return res;
  42412. });
  42413. const normalize = (data) => {
  42414. const rowKey2 = watcherData.rowKey.value;
  42415. const res = {};
  42416. walkTreeNode(data, (parent2, children, level) => {
  42417. const parentId = getRowIdentity(parent2, rowKey2);
  42418. if (Array.isArray(children)) {
  42419. res[parentId] = {
  42420. children: children.map((row) => getRowIdentity(row, rowKey2)),
  42421. level
  42422. };
  42423. } else if (lazy.value) {
  42424. res[parentId] = {
  42425. children: [],
  42426. lazy: true,
  42427. level
  42428. };
  42429. }
  42430. }, childrenColumnName.value, lazyColumnIdentifier.value);
  42431. return res;
  42432. };
  42433. const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll = ((_a2) => (_a2 = instance.store) == null ? void 0 : _a2.states.defaultExpandAll.value)()) => {
  42434. var _a2;
  42435. const nested = normalizedData.value;
  42436. const normalizedLazyNode_ = normalizedLazyNode.value;
  42437. const keys3 = Object.keys(nested);
  42438. const newTreeData = {};
  42439. if (keys3.length) {
  42440. const oldTreeData = unref(treeData);
  42441. const rootLazyRowKeys = [];
  42442. const getExpanded = (oldValue, key) => {
  42443. if (ifChangeExpandRowKeys) {
  42444. if (expandRowKeys.value) {
  42445. return ifExpandAll || expandRowKeys.value.includes(key);
  42446. } else {
  42447. return !!(ifExpandAll || (oldValue == null ? void 0 : oldValue.expanded));
  42448. }
  42449. } else {
  42450. const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key);
  42451. return !!((oldValue == null ? void 0 : oldValue.expanded) || included);
  42452. }
  42453. };
  42454. keys3.forEach((key) => {
  42455. const oldValue = oldTreeData[key];
  42456. const newValue = { ...nested[key] };
  42457. newValue.expanded = getExpanded(oldValue, key);
  42458. if (newValue.lazy) {
  42459. const { loaded = false, loading = false } = oldValue || {};
  42460. newValue.loaded = !!loaded;
  42461. newValue.loading = !!loading;
  42462. rootLazyRowKeys.push(key);
  42463. }
  42464. newTreeData[key] = newValue;
  42465. });
  42466. const lazyKeys = Object.keys(normalizedLazyNode_);
  42467. if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {
  42468. lazyKeys.forEach((key) => {
  42469. const oldValue = oldTreeData[key];
  42470. const lazyNodeChildren = normalizedLazyNode_[key].children;
  42471. if (rootLazyRowKeys.includes(key)) {
  42472. if (newTreeData[key].children.length !== 0) {
  42473. throw new Error("[ElTable]children must be an empty array.");
  42474. }
  42475. newTreeData[key].children = lazyNodeChildren;
  42476. } else {
  42477. const { loaded = false, loading = false } = oldValue || {};
  42478. newTreeData[key] = {
  42479. lazy: true,
  42480. loaded: !!loaded,
  42481. loading: !!loading,
  42482. expanded: getExpanded(oldValue, key),
  42483. children: lazyNodeChildren,
  42484. level: ""
  42485. };
  42486. }
  42487. });
  42488. }
  42489. }
  42490. treeData.value = newTreeData;
  42491. (_a2 = instance.store) == null ? void 0 : _a2.updateTableScrollY();
  42492. };
  42493. watch(() => expandRowKeys.value, () => {
  42494. updateTreeData(true);
  42495. });
  42496. watch(() => normalizedData.value, () => {
  42497. updateTreeData();
  42498. });
  42499. watch(() => normalizedLazyNode.value, () => {
  42500. updateTreeData();
  42501. });
  42502. const updateTreeExpandKeys = (value) => {
  42503. expandRowKeys.value = value;
  42504. updateTreeData();
  42505. };
  42506. const toggleTreeExpansion = (row, expanded) => {
  42507. instance.store.assertRowKey();
  42508. const rowKey2 = watcherData.rowKey.value;
  42509. const id2 = getRowIdentity(row, rowKey2);
  42510. const data = id2 && treeData.value[id2];
  42511. if (id2 && data && "expanded" in data) {
  42512. const oldExpanded = data.expanded;
  42513. expanded = typeof expanded === "undefined" ? !data.expanded : expanded;
  42514. treeData.value[id2].expanded = expanded;
  42515. if (oldExpanded !== expanded) {
  42516. instance.emit("expand-change", row, expanded);
  42517. }
  42518. instance.store.updateTableScrollY();
  42519. }
  42520. };
  42521. const loadOrToggle = (row) => {
  42522. instance.store.assertRowKey();
  42523. const rowKey2 = watcherData.rowKey.value;
  42524. const id2 = getRowIdentity(row, rowKey2);
  42525. const data = treeData.value[id2];
  42526. if (lazy.value && data && "loaded" in data && !data.loaded) {
  42527. loadData(row, id2, data);
  42528. } else {
  42529. toggleTreeExpansion(row, void 0);
  42530. }
  42531. };
  42532. const loadData = (row, key, treeNode) => {
  42533. const { load } = instance.props;
  42534. if (load && !treeData.value[key].loaded) {
  42535. treeData.value[key].loading = true;
  42536. load(row, treeNode, (data) => {
  42537. if (!Array.isArray(data)) {
  42538. throw new TypeError("[ElTable] data must be an array");
  42539. }
  42540. treeData.value[key].loading = false;
  42541. treeData.value[key].loaded = true;
  42542. treeData.value[key].expanded = true;
  42543. if (data.length) {
  42544. lazyTreeNodeMap.value[key] = data;
  42545. }
  42546. instance.emit("expand-change", row, true);
  42547. });
  42548. }
  42549. };
  42550. return {
  42551. loadData,
  42552. loadOrToggle,
  42553. toggleTreeExpansion,
  42554. updateTreeExpandKeys,
  42555. updateTreeData,
  42556. normalize,
  42557. states: {
  42558. expandRowKeys,
  42559. treeData,
  42560. indent,
  42561. lazy,
  42562. lazyTreeNodeMap,
  42563. lazyColumnIdentifier,
  42564. childrenColumnName
  42565. }
  42566. };
  42567. }
  42568. // node_modules/element-plus/es/components/table/src/store/watcher.mjs
  42569. var sortData = (data, states) => {
  42570. const sortingColumn = states.sortingColumn;
  42571. if (!sortingColumn || typeof sortingColumn.sortable === "string") {
  42572. return data;
  42573. }
  42574. return orderBy2(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
  42575. };
  42576. var doFlattenColumns = (columns2) => {
  42577. const result2 = [];
  42578. columns2.forEach((column2) => {
  42579. if (column2.children) {
  42580. result2.push.apply(result2, doFlattenColumns(column2.children));
  42581. } else {
  42582. result2.push(column2);
  42583. }
  42584. });
  42585. return result2;
  42586. };
  42587. function useWatcher() {
  42588. var _a2;
  42589. const instance = getCurrentInstance();
  42590. const { size: tableSize } = toRefs((_a2 = instance.proxy) == null ? void 0 : _a2.$props);
  42591. const rowKey2 = ref(null);
  42592. const data = ref([]);
  42593. const _data = ref([]);
  42594. const isComplex = ref(false);
  42595. const _columns = ref([]);
  42596. const originColumns = ref([]);
  42597. const columns2 = ref([]);
  42598. const fixedColumns = ref([]);
  42599. const rightFixedColumns = ref([]);
  42600. const leafColumns = ref([]);
  42601. const fixedLeafColumns = ref([]);
  42602. const rightFixedLeafColumns = ref([]);
  42603. const leafColumnsLength = ref(0);
  42604. const fixedLeafColumnsLength = ref(0);
  42605. const rightFixedLeafColumnsLength = ref(0);
  42606. const isAllSelected = ref(false);
  42607. const selection = ref([]);
  42608. const reserveSelection = ref(false);
  42609. const selectOnIndeterminate = ref(false);
  42610. const selectable = ref(null);
  42611. const filters = ref({});
  42612. const filteredData = ref(null);
  42613. const sortingColumn = ref(null);
  42614. const sortProp = ref(null);
  42615. const sortOrder = ref(null);
  42616. const hoverRow = ref(null);
  42617. watch(data, () => instance.state && scheduleLayout(false), {
  42618. deep: true
  42619. });
  42620. const assertRowKey = () => {
  42621. if (!rowKey2.value)
  42622. throw new Error("[ElTable] prop row-key is required");
  42623. };
  42624. const updateChildFixed = (column2) => {
  42625. var _a22;
  42626. (_a22 = column2.children) == null ? void 0 : _a22.forEach((childColumn) => {
  42627. childColumn.fixed = column2.fixed;
  42628. updateChildFixed(childColumn);
  42629. });
  42630. };
  42631. const updateColumns = () => {
  42632. _columns.value.forEach((column2) => {
  42633. updateChildFixed(column2);
  42634. });
  42635. fixedColumns.value = _columns.value.filter((column2) => column2.fixed === true || column2.fixed === "left");
  42636. rightFixedColumns.value = _columns.value.filter((column2) => column2.fixed === "right");
  42637. if (fixedColumns.value.length > 0 && _columns.value[0] && _columns.value[0].type === "selection" && !_columns.value[0].fixed) {
  42638. _columns.value[0].fixed = true;
  42639. fixedColumns.value.unshift(_columns.value[0]);
  42640. }
  42641. const notFixedColumns = _columns.value.filter((column2) => !column2.fixed);
  42642. originColumns.value = [].concat(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value);
  42643. const leafColumns2 = doFlattenColumns(notFixedColumns);
  42644. const fixedLeafColumns2 = doFlattenColumns(fixedColumns.value);
  42645. const rightFixedLeafColumns2 = doFlattenColumns(rightFixedColumns.value);
  42646. leafColumnsLength.value = leafColumns2.length;
  42647. fixedLeafColumnsLength.value = fixedLeafColumns2.length;
  42648. rightFixedLeafColumnsLength.value = rightFixedLeafColumns2.length;
  42649. columns2.value = [].concat(fixedLeafColumns2).concat(leafColumns2).concat(rightFixedLeafColumns2);
  42650. isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0;
  42651. };
  42652. const scheduleLayout = (needUpdateColumns, immediate = false) => {
  42653. if (needUpdateColumns) {
  42654. updateColumns();
  42655. }
  42656. if (immediate) {
  42657. instance.state.doLayout();
  42658. } else {
  42659. instance.state.debouncedUpdateLayout();
  42660. }
  42661. };
  42662. const isSelected = (row) => {
  42663. return selection.value.includes(row);
  42664. };
  42665. const clearSelection = () => {
  42666. isAllSelected.value = false;
  42667. const oldSelection = selection.value;
  42668. if (oldSelection.length) {
  42669. selection.value = [];
  42670. instance.emit("selection-change", []);
  42671. }
  42672. };
  42673. const cleanSelection = () => {
  42674. let deleted;
  42675. if (rowKey2.value) {
  42676. deleted = [];
  42677. const selectedMap = getKeysMap(selection.value, rowKey2.value);
  42678. const dataMap = getKeysMap(data.value, rowKey2.value);
  42679. for (const key in selectedMap) {
  42680. if (hasOwn(selectedMap, key) && !dataMap[key]) {
  42681. deleted.push(selectedMap[key].row);
  42682. }
  42683. }
  42684. } else {
  42685. deleted = selection.value.filter((item) => !data.value.includes(item));
  42686. }
  42687. if (deleted.length) {
  42688. const newSelection = selection.value.filter((item) => !deleted.includes(item));
  42689. selection.value = newSelection;
  42690. instance.emit("selection-change", newSelection.slice());
  42691. }
  42692. };
  42693. const getSelectionRows = () => {
  42694. return (selection.value || []).slice();
  42695. };
  42696. const toggleRowSelection = (row, selected = void 0, emitChange = true) => {
  42697. const changed = toggleRowStatus(selection.value, row, selected);
  42698. if (changed) {
  42699. const newSelection = (selection.value || []).slice();
  42700. if (emitChange) {
  42701. instance.emit("select", newSelection, row);
  42702. }
  42703. instance.emit("selection-change", newSelection);
  42704. }
  42705. };
  42706. const _toggleAllSelection = () => {
  42707. var _a22, _b;
  42708. const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length);
  42709. isAllSelected.value = value;
  42710. let selectionChanged = false;
  42711. let childrenCount = 0;
  42712. const rowKey22 = (_b = (_a22 = instance == null ? void 0 : instance.store) == null ? void 0 : _a22.states) == null ? void 0 : _b.rowKey.value;
  42713. data.value.forEach((row, index) => {
  42714. const rowIndex = index + childrenCount;
  42715. if (selectable.value) {
  42716. if (selectable.value.call(null, row, rowIndex) && toggleRowStatus(selection.value, row, value)) {
  42717. selectionChanged = true;
  42718. }
  42719. } else {
  42720. if (toggleRowStatus(selection.value, row, value)) {
  42721. selectionChanged = true;
  42722. }
  42723. }
  42724. childrenCount += getChildrenCount(getRowIdentity(row, rowKey22));
  42725. });
  42726. if (selectionChanged) {
  42727. instance.emit("selection-change", selection.value ? selection.value.slice() : []);
  42728. }
  42729. instance.emit("select-all", selection.value);
  42730. };
  42731. const updateSelectionByRowKey = () => {
  42732. const selectedMap = getKeysMap(selection.value, rowKey2.value);
  42733. data.value.forEach((row) => {
  42734. const rowId = getRowIdentity(row, rowKey2.value);
  42735. const rowInfo = selectedMap[rowId];
  42736. if (rowInfo) {
  42737. selection.value[rowInfo.index] = row;
  42738. }
  42739. });
  42740. };
  42741. const updateAllSelected = () => {
  42742. var _a22, _b, _c;
  42743. if (((_a22 = data.value) == null ? void 0 : _a22.length) === 0) {
  42744. isAllSelected.value = false;
  42745. return;
  42746. }
  42747. let selectedMap;
  42748. if (rowKey2.value) {
  42749. selectedMap = getKeysMap(selection.value, rowKey2.value);
  42750. }
  42751. const isSelected2 = function(row) {
  42752. if (selectedMap) {
  42753. return !!selectedMap[getRowIdentity(row, rowKey2.value)];
  42754. } else {
  42755. return selection.value.includes(row);
  42756. }
  42757. };
  42758. let isAllSelected_ = true;
  42759. let selectedCount = 0;
  42760. let childrenCount = 0;
  42761. for (let i = 0, j = (data.value || []).length; i < j; i++) {
  42762. const keyProp = (_c = (_b = instance == null ? void 0 : instance.store) == null ? void 0 : _b.states) == null ? void 0 : _c.rowKey.value;
  42763. const rowIndex = i + childrenCount;
  42764. const item = data.value[i];
  42765. const isRowSelectable = selectable.value && selectable.value.call(null, item, rowIndex);
  42766. if (!isSelected2(item)) {
  42767. if (!selectable.value || isRowSelectable) {
  42768. isAllSelected_ = false;
  42769. break;
  42770. }
  42771. } else {
  42772. selectedCount++;
  42773. }
  42774. childrenCount += getChildrenCount(getRowIdentity(item, keyProp));
  42775. }
  42776. if (selectedCount === 0)
  42777. isAllSelected_ = false;
  42778. isAllSelected.value = isAllSelected_;
  42779. };
  42780. const getChildrenCount = (rowKey22) => {
  42781. var _a22;
  42782. if (!instance || !instance.store)
  42783. return 0;
  42784. const { treeData } = instance.store.states;
  42785. let count = 0;
  42786. const children = (_a22 = treeData.value[rowKey22]) == null ? void 0 : _a22.children;
  42787. if (children) {
  42788. count += children.length;
  42789. children.forEach((childKey) => {
  42790. count += getChildrenCount(childKey);
  42791. });
  42792. }
  42793. return count;
  42794. };
  42795. const updateFilters = (columns22, values2) => {
  42796. if (!Array.isArray(columns22)) {
  42797. columns22 = [columns22];
  42798. }
  42799. const filters_ = {};
  42800. columns22.forEach((col) => {
  42801. filters.value[col.id] = values2;
  42802. filters_[col.columnKey || col.id] = values2;
  42803. });
  42804. return filters_;
  42805. };
  42806. const updateSort = (column2, prop, order) => {
  42807. if (sortingColumn.value && sortingColumn.value !== column2) {
  42808. sortingColumn.value.order = null;
  42809. }
  42810. sortingColumn.value = column2;
  42811. sortProp.value = prop;
  42812. sortOrder.value = order;
  42813. };
  42814. const execFilter = () => {
  42815. let sourceData = unref(_data);
  42816. Object.keys(filters.value).forEach((columnId) => {
  42817. const values2 = filters.value[columnId];
  42818. if (!values2 || values2.length === 0)
  42819. return;
  42820. const column2 = getColumnById({
  42821. columns: columns2.value
  42822. }, columnId);
  42823. if (column2 && column2.filterMethod) {
  42824. sourceData = sourceData.filter((row) => {
  42825. return values2.some((value) => column2.filterMethod.call(null, value, row, column2));
  42826. });
  42827. }
  42828. });
  42829. filteredData.value = sourceData;
  42830. };
  42831. const execSort = () => {
  42832. data.value = sortData(filteredData.value, {
  42833. sortingColumn: sortingColumn.value,
  42834. sortProp: sortProp.value,
  42835. sortOrder: sortOrder.value
  42836. });
  42837. };
  42838. const execQuery = (ignore = void 0) => {
  42839. if (!(ignore && ignore.filter)) {
  42840. execFilter();
  42841. }
  42842. execSort();
  42843. };
  42844. const clearFilter = (columnKeys) => {
  42845. const { tableHeaderRef } = instance.refs;
  42846. if (!tableHeaderRef)
  42847. return;
  42848. const panels = Object.assign({}, tableHeaderRef.filterPanels);
  42849. const keys3 = Object.keys(panels);
  42850. if (!keys3.length)
  42851. return;
  42852. if (typeof columnKeys === "string") {
  42853. columnKeys = [columnKeys];
  42854. }
  42855. if (Array.isArray(columnKeys)) {
  42856. const columns_ = columnKeys.map((key) => getColumnByKey({
  42857. columns: columns2.value
  42858. }, key));
  42859. keys3.forEach((key) => {
  42860. const column2 = columns_.find((col) => col.id === key);
  42861. if (column2) {
  42862. column2.filteredValue = [];
  42863. }
  42864. });
  42865. instance.store.commit("filterChange", {
  42866. column: columns_,
  42867. values: [],
  42868. silent: true,
  42869. multi: true
  42870. });
  42871. } else {
  42872. keys3.forEach((key) => {
  42873. const column2 = columns2.value.find((col) => col.id === key);
  42874. if (column2) {
  42875. column2.filteredValue = [];
  42876. }
  42877. });
  42878. filters.value = {};
  42879. instance.store.commit("filterChange", {
  42880. column: {},
  42881. values: [],
  42882. silent: true
  42883. });
  42884. }
  42885. };
  42886. const clearSort = () => {
  42887. if (!sortingColumn.value)
  42888. return;
  42889. updateSort(null, null, null);
  42890. instance.store.commit("changeSortCondition", {
  42891. silent: true
  42892. });
  42893. };
  42894. const {
  42895. setExpandRowKeys,
  42896. toggleRowExpansion,
  42897. updateExpandRows,
  42898. states: expandStates,
  42899. isRowExpanded
  42900. } = useExpand({
  42901. data,
  42902. rowKey: rowKey2
  42903. });
  42904. const {
  42905. updateTreeExpandKeys,
  42906. toggleTreeExpansion,
  42907. updateTreeData,
  42908. loadOrToggle,
  42909. states: treeStates
  42910. } = useTree({
  42911. data,
  42912. rowKey: rowKey2
  42913. });
  42914. const {
  42915. updateCurrentRowData,
  42916. updateCurrentRow,
  42917. setCurrentRowKey,
  42918. states: currentData
  42919. } = useCurrent({
  42920. data,
  42921. rowKey: rowKey2
  42922. });
  42923. const setExpandRowKeysAdapter = (val) => {
  42924. setExpandRowKeys(val);
  42925. updateTreeExpandKeys(val);
  42926. };
  42927. const toggleRowExpansionAdapter = (row, expanded) => {
  42928. const hasExpandColumn = columns2.value.some(({ type: type4 }) => type4 === "expand");
  42929. if (hasExpandColumn) {
  42930. toggleRowExpansion(row, expanded);
  42931. } else {
  42932. toggleTreeExpansion(row, expanded);
  42933. }
  42934. };
  42935. return {
  42936. assertRowKey,
  42937. updateColumns,
  42938. scheduleLayout,
  42939. isSelected,
  42940. clearSelection,
  42941. cleanSelection,
  42942. getSelectionRows,
  42943. toggleRowSelection,
  42944. _toggleAllSelection,
  42945. toggleAllSelection: null,
  42946. updateSelectionByRowKey,
  42947. updateAllSelected,
  42948. updateFilters,
  42949. updateCurrentRow,
  42950. updateSort,
  42951. execFilter,
  42952. execSort,
  42953. execQuery,
  42954. clearFilter,
  42955. clearSort,
  42956. toggleRowExpansion,
  42957. setExpandRowKeysAdapter,
  42958. setCurrentRowKey,
  42959. toggleRowExpansionAdapter,
  42960. isRowExpanded,
  42961. updateExpandRows,
  42962. updateCurrentRowData,
  42963. loadOrToggle,
  42964. updateTreeData,
  42965. states: {
  42966. tableSize,
  42967. rowKey: rowKey2,
  42968. data,
  42969. _data,
  42970. isComplex,
  42971. _columns,
  42972. originColumns,
  42973. columns: columns2,
  42974. fixedColumns,
  42975. rightFixedColumns,
  42976. leafColumns,
  42977. fixedLeafColumns,
  42978. rightFixedLeafColumns,
  42979. leafColumnsLength,
  42980. fixedLeafColumnsLength,
  42981. rightFixedLeafColumnsLength,
  42982. isAllSelected,
  42983. selection,
  42984. reserveSelection,
  42985. selectOnIndeterminate,
  42986. selectable,
  42987. filters,
  42988. filteredData,
  42989. sortingColumn,
  42990. sortProp,
  42991. sortOrder,
  42992. hoverRow,
  42993. ...expandStates,
  42994. ...treeStates,
  42995. ...currentData
  42996. }
  42997. };
  42998. }
  42999. // node_modules/element-plus/es/components/table/src/store/index.mjs
  43000. function replaceColumn(array4, column2) {
  43001. return array4.map((item) => {
  43002. var _a2;
  43003. if (item.id === column2.id) {
  43004. return column2;
  43005. } else if ((_a2 = item.children) == null ? void 0 : _a2.length) {
  43006. item.children = replaceColumn(item.children, column2);
  43007. }
  43008. return item;
  43009. });
  43010. }
  43011. function sortColumn(array4) {
  43012. array4.forEach((item) => {
  43013. var _a2, _b;
  43014. item.no = (_a2 = item.getColumnIndex) == null ? void 0 : _a2.call(item);
  43015. if ((_b = item.children) == null ? void 0 : _b.length) {
  43016. sortColumn(item.children);
  43017. }
  43018. });
  43019. array4.sort((cur, pre) => cur.no - pre.no);
  43020. }
  43021. function useStore() {
  43022. const instance = getCurrentInstance();
  43023. const watcher = useWatcher();
  43024. const ns2 = useNamespace("table");
  43025. const mutations = {
  43026. setData(states, data) {
  43027. const dataInstanceChanged = unref(states._data) !== data;
  43028. states.data.value = data;
  43029. states._data.value = data;
  43030. instance.store.execQuery();
  43031. instance.store.updateCurrentRowData();
  43032. instance.store.updateExpandRows();
  43033. instance.store.updateTreeData(instance.store.states.defaultExpandAll.value);
  43034. if (unref(states.reserveSelection)) {
  43035. instance.store.assertRowKey();
  43036. instance.store.updateSelectionByRowKey();
  43037. } else {
  43038. if (dataInstanceChanged) {
  43039. instance.store.clearSelection();
  43040. } else {
  43041. instance.store.cleanSelection();
  43042. }
  43043. }
  43044. instance.store.updateAllSelected();
  43045. if (instance.$ready) {
  43046. instance.store.scheduleLayout();
  43047. }
  43048. },
  43049. insertColumn(states, column2, parent2) {
  43050. const array4 = unref(states._columns);
  43051. let newColumns = [];
  43052. if (!parent2) {
  43053. array4.push(column2);
  43054. newColumns = array4;
  43055. } else {
  43056. if (parent2 && !parent2.children) {
  43057. parent2.children = [];
  43058. }
  43059. parent2.children.push(column2);
  43060. newColumns = replaceColumn(array4, parent2);
  43061. }
  43062. sortColumn(newColumns);
  43063. states._columns.value = newColumns;
  43064. if (column2.type === "selection") {
  43065. states.selectable.value = column2.selectable;
  43066. states.reserveSelection.value = column2.reserveSelection;
  43067. }
  43068. if (instance.$ready) {
  43069. instance.store.updateColumns();
  43070. instance.store.scheduleLayout();
  43071. }
  43072. },
  43073. removeColumn(states, column2, parent2) {
  43074. const array4 = unref(states._columns) || [];
  43075. if (parent2) {
  43076. parent2.children.splice(parent2.children.findIndex((item) => item.id === column2.id), 1);
  43077. nextTick(() => {
  43078. var _a2;
  43079. if (((_a2 = parent2.children) == null ? void 0 : _a2.length) === 0) {
  43080. delete parent2.children;
  43081. }
  43082. });
  43083. states._columns.value = replaceColumn(array4, parent2);
  43084. } else {
  43085. const index = array4.indexOf(column2);
  43086. if (index > -1) {
  43087. array4.splice(index, 1);
  43088. states._columns.value = array4;
  43089. }
  43090. }
  43091. if (instance.$ready) {
  43092. instance.store.updateColumns();
  43093. instance.store.scheduleLayout();
  43094. }
  43095. },
  43096. sort(states, options) {
  43097. const { prop, order, init } = options;
  43098. if (prop) {
  43099. const column2 = unref(states.columns).find((column22) => column22.property === prop);
  43100. if (column2) {
  43101. column2.order = order;
  43102. instance.store.updateSort(column2, prop, order);
  43103. instance.store.commit("changeSortCondition", { init });
  43104. }
  43105. }
  43106. },
  43107. changeSortCondition(states, options) {
  43108. const { sortingColumn, sortProp, sortOrder } = states;
  43109. const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder);
  43110. if (orderValue === null) {
  43111. states.sortingColumn.value = null;
  43112. states.sortProp.value = null;
  43113. }
  43114. const ignore = { filter: true };
  43115. instance.store.execQuery(ignore);
  43116. if (!options || !(options.silent || options.init)) {
  43117. instance.emit("sort-change", {
  43118. column: columnValue,
  43119. prop: propValue,
  43120. order: orderValue
  43121. });
  43122. }
  43123. instance.store.updateTableScrollY();
  43124. },
  43125. filterChange(_states, options) {
  43126. const { column: column2, values: values2, silent } = options;
  43127. const newFilters = instance.store.updateFilters(column2, values2);
  43128. instance.store.execQuery();
  43129. if (!silent) {
  43130. instance.emit("filter-change", newFilters);
  43131. }
  43132. instance.store.updateTableScrollY();
  43133. },
  43134. toggleAllSelection() {
  43135. instance.store.toggleAllSelection();
  43136. },
  43137. rowSelectedChanged(_states, row) {
  43138. instance.store.toggleRowSelection(row);
  43139. instance.store.updateAllSelected();
  43140. },
  43141. setHoverRow(states, row) {
  43142. states.hoverRow.value = row;
  43143. },
  43144. setCurrentRow(_states, row) {
  43145. instance.store.updateCurrentRow(row);
  43146. }
  43147. };
  43148. const commit = function(name, ...args) {
  43149. const mutations2 = instance.store.mutations;
  43150. if (mutations2[name]) {
  43151. mutations2[name].apply(instance, [instance.store.states].concat(args));
  43152. } else {
  43153. throw new Error(`Action not found: ${name}`);
  43154. }
  43155. };
  43156. const updateTableScrollY = function() {
  43157. nextTick(() => instance.layout.updateScrollY.apply(instance.layout));
  43158. };
  43159. return {
  43160. ns: ns2,
  43161. ...watcher,
  43162. mutations,
  43163. commit,
  43164. updateTableScrollY
  43165. };
  43166. }
  43167. // node_modules/element-plus/es/components/table/src/store/helper.mjs
  43168. var InitialStateMap = {
  43169. rowKey: "rowKey",
  43170. defaultExpandAll: "defaultExpandAll",
  43171. selectOnIndeterminate: "selectOnIndeterminate",
  43172. indent: "indent",
  43173. lazy: "lazy",
  43174. data: "data",
  43175. ["treeProps.hasChildren"]: {
  43176. key: "lazyColumnIdentifier",
  43177. default: "hasChildren"
  43178. },
  43179. ["treeProps.children"]: {
  43180. key: "childrenColumnName",
  43181. default: "children"
  43182. }
  43183. };
  43184. function createStore(table, props) {
  43185. if (!table) {
  43186. throw new Error("Table is required.");
  43187. }
  43188. const store = useStore();
  43189. store.toggleAllSelection = debounce_default(store._toggleAllSelection, 10);
  43190. Object.keys(InitialStateMap).forEach((key) => {
  43191. handleValue(getArrKeysValue(props, key), key, store);
  43192. });
  43193. proxyTableProps(store, props);
  43194. return store;
  43195. }
  43196. function proxyTableProps(store, props) {
  43197. Object.keys(InitialStateMap).forEach((key) => {
  43198. watch(() => getArrKeysValue(props, key), (value) => {
  43199. handleValue(value, key, store);
  43200. });
  43201. });
  43202. }
  43203. function handleValue(value, propsKey, store) {
  43204. let newVal = value;
  43205. let storeKey = InitialStateMap[propsKey];
  43206. if (typeof InitialStateMap[propsKey] === "object") {
  43207. storeKey = storeKey.key;
  43208. newVal = newVal || InitialStateMap[propsKey].default;
  43209. }
  43210. store.states[storeKey].value = newVal;
  43211. }
  43212. function getArrKeysValue(props, keys3) {
  43213. if (keys3.includes(".")) {
  43214. const keyList = keys3.split(".");
  43215. let value = props;
  43216. keyList.forEach((key) => {
  43217. value = value[key];
  43218. });
  43219. return value;
  43220. } else {
  43221. return props[keys3];
  43222. }
  43223. }
  43224. // node_modules/element-plus/es/components/table/src/table-layout.mjs
  43225. var TableLayout = class {
  43226. constructor(options) {
  43227. this.observers = [];
  43228. this.table = null;
  43229. this.store = null;
  43230. this.columns = [];
  43231. this.fit = true;
  43232. this.showHeader = true;
  43233. this.height = ref(null);
  43234. this.scrollX = ref(false);
  43235. this.scrollY = ref(false);
  43236. this.bodyWidth = ref(null);
  43237. this.fixedWidth = ref(null);
  43238. this.rightFixedWidth = ref(null);
  43239. this.gutterWidth = 0;
  43240. for (const name in options) {
  43241. if (hasOwn(options, name)) {
  43242. if (isRef(this[name])) {
  43243. this[name].value = options[name];
  43244. } else {
  43245. this[name] = options[name];
  43246. }
  43247. }
  43248. }
  43249. if (!this.table) {
  43250. throw new Error("Table is required for Table Layout");
  43251. }
  43252. if (!this.store) {
  43253. throw new Error("Store is required for Table Layout");
  43254. }
  43255. }
  43256. updateScrollY() {
  43257. const height = this.height.value;
  43258. if (height === null)
  43259. return false;
  43260. const scrollBarRef = this.table.refs.scrollBarRef;
  43261. if (this.table.vnode.el && scrollBarRef) {
  43262. let scrollY = true;
  43263. const prevScrollY = this.scrollY.value;
  43264. scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight;
  43265. this.scrollY.value = scrollY;
  43266. return prevScrollY !== scrollY;
  43267. }
  43268. return false;
  43269. }
  43270. setHeight(value, prop = "height") {
  43271. if (!isClient)
  43272. return;
  43273. const el = this.table.vnode.el;
  43274. value = parseHeight(value);
  43275. this.height.value = Number(value);
  43276. if (!el && (value || value === 0))
  43277. return nextTick(() => this.setHeight(value, prop));
  43278. if (typeof value === "number") {
  43279. el.style[prop] = `${value}px`;
  43280. this.updateElsHeight();
  43281. } else if (typeof value === "string") {
  43282. el.style[prop] = value;
  43283. this.updateElsHeight();
  43284. }
  43285. }
  43286. setMaxHeight(value) {
  43287. this.setHeight(value, "max-height");
  43288. }
  43289. getFlattenColumns() {
  43290. const flattenColumns = [];
  43291. const columns2 = this.table.store.states.columns.value;
  43292. columns2.forEach((column2) => {
  43293. if (column2.isColumnGroup) {
  43294. flattenColumns.push.apply(flattenColumns, column2.columns);
  43295. } else {
  43296. flattenColumns.push(column2);
  43297. }
  43298. });
  43299. return flattenColumns;
  43300. }
  43301. updateElsHeight() {
  43302. this.updateScrollY();
  43303. this.notifyObservers("scrollable");
  43304. }
  43305. headerDisplayNone(elm) {
  43306. if (!elm)
  43307. return true;
  43308. let headerChild = elm;
  43309. while (headerChild.tagName !== "DIV") {
  43310. if (getComputedStyle(headerChild).display === "none") {
  43311. return true;
  43312. }
  43313. headerChild = headerChild.parentElement;
  43314. }
  43315. return false;
  43316. }
  43317. updateColumnsWidth() {
  43318. if (!isClient)
  43319. return;
  43320. const fit = this.fit;
  43321. const bodyWidth = this.table.vnode.el.clientWidth;
  43322. let bodyMinWidth = 0;
  43323. const flattenColumns = this.getFlattenColumns();
  43324. const flexColumns = flattenColumns.filter((column2) => typeof column2.width !== "number");
  43325. flattenColumns.forEach((column2) => {
  43326. if (typeof column2.width === "number" && column2.realWidth)
  43327. column2.realWidth = null;
  43328. });
  43329. if (flexColumns.length > 0 && fit) {
  43330. flattenColumns.forEach((column2) => {
  43331. bodyMinWidth += Number(column2.width || column2.minWidth || 80);
  43332. });
  43333. if (bodyMinWidth <= bodyWidth) {
  43334. this.scrollX.value = false;
  43335. const totalFlexWidth = bodyWidth - bodyMinWidth;
  43336. if (flexColumns.length === 1) {
  43337. flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth;
  43338. } else {
  43339. const allColumnsWidth = flexColumns.reduce((prev, column2) => prev + Number(column2.minWidth || 80), 0);
  43340. const flexWidthPerPixel = totalFlexWidth / allColumnsWidth;
  43341. let noneFirstWidth = 0;
  43342. flexColumns.forEach((column2, index) => {
  43343. if (index === 0)
  43344. return;
  43345. const flexWidth = Math.floor(Number(column2.minWidth || 80) * flexWidthPerPixel);
  43346. noneFirstWidth += flexWidth;
  43347. column2.realWidth = Number(column2.minWidth || 80) + flexWidth;
  43348. });
  43349. flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
  43350. }
  43351. } else {
  43352. this.scrollX.value = true;
  43353. flexColumns.forEach((column2) => {
  43354. column2.realWidth = Number(column2.minWidth);
  43355. });
  43356. }
  43357. this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth);
  43358. this.table.state.resizeState.value.width = this.bodyWidth.value;
  43359. } else {
  43360. flattenColumns.forEach((column2) => {
  43361. if (!column2.width && !column2.minWidth) {
  43362. column2.realWidth = 80;
  43363. } else {
  43364. column2.realWidth = Number(column2.width || column2.minWidth);
  43365. }
  43366. bodyMinWidth += column2.realWidth;
  43367. });
  43368. this.scrollX.value = bodyMinWidth > bodyWidth;
  43369. this.bodyWidth.value = bodyMinWidth;
  43370. }
  43371. const fixedColumns = this.store.states.fixedColumns.value;
  43372. if (fixedColumns.length > 0) {
  43373. let fixedWidth = 0;
  43374. fixedColumns.forEach((column2) => {
  43375. fixedWidth += Number(column2.realWidth || column2.width);
  43376. });
  43377. this.fixedWidth.value = fixedWidth;
  43378. }
  43379. const rightFixedColumns = this.store.states.rightFixedColumns.value;
  43380. if (rightFixedColumns.length > 0) {
  43381. let rightFixedWidth = 0;
  43382. rightFixedColumns.forEach((column2) => {
  43383. rightFixedWidth += Number(column2.realWidth || column2.width);
  43384. });
  43385. this.rightFixedWidth.value = rightFixedWidth;
  43386. }
  43387. this.notifyObservers("columns");
  43388. }
  43389. addObserver(observer) {
  43390. this.observers.push(observer);
  43391. }
  43392. removeObserver(observer) {
  43393. const index = this.observers.indexOf(observer);
  43394. if (index !== -1) {
  43395. this.observers.splice(index, 1);
  43396. }
  43397. }
  43398. notifyObservers(event) {
  43399. const observers = this.observers;
  43400. observers.forEach((observer) => {
  43401. var _a2, _b;
  43402. switch (event) {
  43403. case "columns":
  43404. (_a2 = observer.state) == null ? void 0 : _a2.onColumnsChange(this);
  43405. break;
  43406. case "scrollable":
  43407. (_b = observer.state) == null ? void 0 : _b.onScrollableChange(this);
  43408. break;
  43409. default:
  43410. throw new Error(`Table Layout don't have event ${event}.`);
  43411. }
  43412. });
  43413. }
  43414. };
  43415. // node_modules/element-plus/es/components/table/src/filter-panel.mjs
  43416. var { CheckboxGroup: ElCheckboxGroup2 } = ElCheckbox;
  43417. var _sfc_main120 = defineComponent({
  43418. name: "ElTableFilterPanel",
  43419. components: {
  43420. ElCheckbox,
  43421. ElCheckboxGroup: ElCheckboxGroup2,
  43422. ElScrollbar,
  43423. ElTooltip,
  43424. ElIcon,
  43425. ArrowDown: arrow_down_default,
  43426. ArrowUp: arrow_up_default
  43427. },
  43428. directives: { ClickOutside },
  43429. props: {
  43430. placement: {
  43431. type: String,
  43432. default: "bottom-start"
  43433. },
  43434. store: {
  43435. type: Object
  43436. },
  43437. column: {
  43438. type: Object
  43439. },
  43440. upDataColumn: {
  43441. type: Function
  43442. }
  43443. },
  43444. setup(props) {
  43445. const instance = getCurrentInstance();
  43446. const { t } = useLocale();
  43447. const ns2 = useNamespace("table-filter");
  43448. const parent2 = instance == null ? void 0 : instance.parent;
  43449. if (!parent2.filterPanels.value[props.column.id]) {
  43450. parent2.filterPanels.value[props.column.id] = instance;
  43451. }
  43452. const tooltipVisible = ref(false);
  43453. const tooltip = ref(null);
  43454. const filters = computed2(() => {
  43455. return props.column && props.column.filters;
  43456. });
  43457. const filterValue = computed2({
  43458. get: () => {
  43459. var _a2;
  43460. return (((_a2 = props.column) == null ? void 0 : _a2.filteredValue) || [])[0];
  43461. },
  43462. set: (value) => {
  43463. if (filteredValue.value) {
  43464. if (typeof value !== "undefined" && value !== null) {
  43465. filteredValue.value.splice(0, 1, value);
  43466. } else {
  43467. filteredValue.value.splice(0, 1);
  43468. }
  43469. }
  43470. }
  43471. });
  43472. const filteredValue = computed2({
  43473. get() {
  43474. if (props.column) {
  43475. return props.column.filteredValue || [];
  43476. }
  43477. return [];
  43478. },
  43479. set(value) {
  43480. if (props.column) {
  43481. props.upDataColumn("filteredValue", value);
  43482. }
  43483. }
  43484. });
  43485. const multiple = computed2(() => {
  43486. if (props.column) {
  43487. return props.column.filterMultiple;
  43488. }
  43489. return true;
  43490. });
  43491. const isActive = (filter2) => {
  43492. return filter2.value === filterValue.value;
  43493. };
  43494. const hidden = () => {
  43495. tooltipVisible.value = false;
  43496. };
  43497. const showFilterPanel = (e) => {
  43498. e.stopPropagation();
  43499. tooltipVisible.value = !tooltipVisible.value;
  43500. };
  43501. const hideFilterPanel = () => {
  43502. tooltipVisible.value = false;
  43503. };
  43504. const handleConfirm = () => {
  43505. confirmFilter(filteredValue.value);
  43506. hidden();
  43507. };
  43508. const handleReset = () => {
  43509. filteredValue.value = [];
  43510. confirmFilter(filteredValue.value);
  43511. hidden();
  43512. };
  43513. const handleSelect = (_filterValue) => {
  43514. filterValue.value = _filterValue;
  43515. if (typeof _filterValue !== "undefined" && _filterValue !== null) {
  43516. confirmFilter(filteredValue.value);
  43517. } else {
  43518. confirmFilter([]);
  43519. }
  43520. hidden();
  43521. };
  43522. const confirmFilter = (filteredValue2) => {
  43523. props.store.commit("filterChange", {
  43524. column: props.column,
  43525. values: filteredValue2
  43526. });
  43527. props.store.updateAllSelected();
  43528. };
  43529. watch(tooltipVisible, (value) => {
  43530. if (props.column) {
  43531. props.upDataColumn("filterOpened", value);
  43532. }
  43533. }, {
  43534. immediate: true
  43535. });
  43536. const popperPaneRef = computed2(() => {
  43537. var _a2, _b;
  43538. return (_b = (_a2 = tooltip.value) == null ? void 0 : _a2.popperRef) == null ? void 0 : _b.contentRef;
  43539. });
  43540. return {
  43541. tooltipVisible,
  43542. multiple,
  43543. filteredValue,
  43544. filterValue,
  43545. filters,
  43546. handleConfirm,
  43547. handleReset,
  43548. handleSelect,
  43549. isActive,
  43550. t,
  43551. ns: ns2,
  43552. showFilterPanel,
  43553. hideFilterPanel,
  43554. popperPaneRef,
  43555. tooltip
  43556. };
  43557. }
  43558. });
  43559. var _hoisted_159 = { key: 0 };
  43560. var _hoisted_237 = ["disabled"];
  43561. var _hoisted_318 = ["label", "onClick"];
  43562. function _sfc_render31(_ctx, _cache, $props, $setup, $data, $options) {
  43563. const _component_el_checkbox = resolveComponent("el-checkbox");
  43564. const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
  43565. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  43566. const _component_arrow_up = resolveComponent("arrow-up");
  43567. const _component_arrow_down = resolveComponent("arrow-down");
  43568. const _component_el_icon = resolveComponent("el-icon");
  43569. const _component_el_tooltip = resolveComponent("el-tooltip");
  43570. const _directive_click_outside = resolveDirective("click-outside");
  43571. return openBlock(), createBlock(_component_el_tooltip, {
  43572. ref: "tooltip",
  43573. visible: _ctx.tooltipVisible,
  43574. offset: 0,
  43575. placement: _ctx.placement,
  43576. "show-arrow": false,
  43577. "stop-popper-mouse-event": false,
  43578. teleported: "",
  43579. effect: "light",
  43580. pure: "",
  43581. "popper-class": _ctx.ns.b(),
  43582. persistent: ""
  43583. }, {
  43584. content: withCtx(() => [
  43585. _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_159, [
  43586. createBaseVNode("div", {
  43587. class: normalizeClass(_ctx.ns.e("content"))
  43588. }, [
  43589. createVNode(_component_el_scrollbar, {
  43590. "wrap-class": _ctx.ns.e("wrap")
  43591. }, {
  43592. default: withCtx(() => [
  43593. createVNode(_component_el_checkbox_group, {
  43594. modelValue: _ctx.filteredValue,
  43595. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.filteredValue = $event),
  43596. class: normalizeClass(_ctx.ns.e("checkbox-group"))
  43597. }, {
  43598. default: withCtx(() => [
  43599. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter2) => {
  43600. return openBlock(), createBlock(_component_el_checkbox, {
  43601. key: filter2.value,
  43602. label: filter2.value
  43603. }, {
  43604. default: withCtx(() => [
  43605. createTextVNode(toDisplayString(filter2.text), 1)
  43606. ]),
  43607. _: 2
  43608. }, 1032, ["label"]);
  43609. }), 128))
  43610. ]),
  43611. _: 1
  43612. }, 8, ["modelValue", "class"])
  43613. ]),
  43614. _: 1
  43615. }, 8, ["wrap-class"])
  43616. ], 2),
  43617. createBaseVNode("div", {
  43618. class: normalizeClass(_ctx.ns.e("bottom"))
  43619. }, [
  43620. createBaseVNode("button", {
  43621. class: normalizeClass({ [_ctx.ns.is("disabled")]: _ctx.filteredValue.length === 0 }),
  43622. disabled: _ctx.filteredValue.length === 0,
  43623. type: "button",
  43624. onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args))
  43625. }, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, _hoisted_237),
  43626. createBaseVNode("button", {
  43627. type: "button",
  43628. onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args))
  43629. }, toDisplayString(_ctx.t("el.table.resetFilter")), 1)
  43630. ], 2)
  43631. ])) : (openBlock(), createElementBlock("ul", {
  43632. key: 1,
  43633. class: normalizeClass(_ctx.ns.e("list"))
  43634. }, [
  43635. createBaseVNode("li", {
  43636. class: normalizeClass([
  43637. _ctx.ns.e("list-item"),
  43638. {
  43639. [_ctx.ns.is("active")]: _ctx.filterValue === void 0 || _ctx.filterValue === null
  43640. }
  43641. ]),
  43642. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null))
  43643. }, toDisplayString(_ctx.t("el.table.clearFilter")), 3),
  43644. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter2) => {
  43645. return openBlock(), createElementBlock("li", {
  43646. key: filter2.value,
  43647. class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter2))]),
  43648. label: filter2.value,
  43649. onClick: ($event) => _ctx.handleSelect(filter2.value)
  43650. }, toDisplayString(filter2.text), 11, _hoisted_318);
  43651. }), 128))
  43652. ], 2))
  43653. ]),
  43654. default: withCtx(() => [
  43655. withDirectives((openBlock(), createElementBlock("span", {
  43656. class: normalizeClass([
  43657. `${_ctx.ns.namespace.value}-table__column-filter-trigger`,
  43658. `${_ctx.ns.namespace.value}-none-outline`
  43659. ]),
  43660. onClick: _cache[4] || (_cache[4] = (...args) => _ctx.showFilterPanel && _ctx.showFilterPanel(...args))
  43661. }, [
  43662. createVNode(_component_el_icon, null, {
  43663. default: withCtx(() => [
  43664. _ctx.column.filterOpened ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 }))
  43665. ]),
  43666. _: 1
  43667. })
  43668. ], 2)), [
  43669. [_directive_click_outside, _ctx.hideFilterPanel, _ctx.popperPaneRef]
  43670. ])
  43671. ]),
  43672. _: 1
  43673. }, 8, ["visible", "placement", "popper-class"]);
  43674. }
  43675. var FilterPanel = _export_sfc(_sfc_main120, [["render", _sfc_render31], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);
  43676. // node_modules/element-plus/es/components/table/src/layout-observer.mjs
  43677. function useLayoutObserver(root2) {
  43678. const instance = getCurrentInstance();
  43679. onBeforeMount(() => {
  43680. tableLayout.value.addObserver(instance);
  43681. });
  43682. onMounted(() => {
  43683. onColumnsChange(tableLayout.value);
  43684. onScrollableChange(tableLayout.value);
  43685. });
  43686. onUpdated(() => {
  43687. onColumnsChange(tableLayout.value);
  43688. onScrollableChange(tableLayout.value);
  43689. });
  43690. onUnmounted(() => {
  43691. tableLayout.value.removeObserver(instance);
  43692. });
  43693. const tableLayout = computed2(() => {
  43694. const layout2 = root2.layout;
  43695. if (!layout2) {
  43696. throw new Error("Can not find table layout.");
  43697. }
  43698. return layout2;
  43699. });
  43700. const onColumnsChange = (layout2) => {
  43701. var _a2;
  43702. const cols = ((_a2 = root2.vnode.el) == null ? void 0 : _a2.querySelectorAll("colgroup > col")) || [];
  43703. if (!cols.length)
  43704. return;
  43705. const flattenColumns = layout2.getFlattenColumns();
  43706. const columnsMap = {};
  43707. flattenColumns.forEach((column2) => {
  43708. columnsMap[column2.id] = column2;
  43709. });
  43710. for (let i = 0, j = cols.length; i < j; i++) {
  43711. const col = cols[i];
  43712. const name = col.getAttribute("name");
  43713. const column2 = columnsMap[name];
  43714. if (column2) {
  43715. col.setAttribute("width", column2.realWidth || column2.width);
  43716. }
  43717. }
  43718. };
  43719. const onScrollableChange = (layout2) => {
  43720. var _a2, _b;
  43721. const cols = ((_a2 = root2.vnode.el) == null ? void 0 : _a2.querySelectorAll("colgroup > col[name=gutter]")) || [];
  43722. for (let i = 0, j = cols.length; i < j; i++) {
  43723. const col = cols[i];
  43724. col.setAttribute("width", layout2.scrollY.value ? layout2.gutterWidth : "0");
  43725. }
  43726. const ths = ((_b = root2.vnode.el) == null ? void 0 : _b.querySelectorAll("th.gutter")) || [];
  43727. for (let i = 0, j = ths.length; i < j; i++) {
  43728. const th = ths[i];
  43729. th.style.width = layout2.scrollY.value ? `${layout2.gutterWidth}px` : "0";
  43730. th.style.display = layout2.scrollY.value ? "" : "none";
  43731. }
  43732. };
  43733. return {
  43734. tableLayout: tableLayout.value,
  43735. onColumnsChange,
  43736. onScrollableChange
  43737. };
  43738. }
  43739. // node_modules/element-plus/es/components/table/src/tokens.mjs
  43740. var TABLE_INJECTION_KEY = Symbol("ElTable");
  43741. // node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs
  43742. function useEvent(props, emit) {
  43743. const instance = getCurrentInstance();
  43744. const parent2 = inject(TABLE_INJECTION_KEY);
  43745. const handleFilterClick = (event) => {
  43746. event.stopPropagation();
  43747. return;
  43748. };
  43749. const handleHeaderClick = (event, column2) => {
  43750. if (!column2.filters && column2.sortable) {
  43751. handleSortClick(event, column2, false);
  43752. } else if (column2.filterable && !column2.sortable) {
  43753. handleFilterClick(event);
  43754. }
  43755. parent2 == null ? void 0 : parent2.emit("header-click", column2, event);
  43756. };
  43757. const handleHeaderContextMenu = (event, column2) => {
  43758. parent2 == null ? void 0 : parent2.emit("header-contextmenu", column2, event);
  43759. };
  43760. const draggingColumn = ref(null);
  43761. const dragging = ref(false);
  43762. const dragState = ref({});
  43763. const handleMouseDown = (event, column2) => {
  43764. if (!isClient)
  43765. return;
  43766. if (column2.children && column2.children.length > 0)
  43767. return;
  43768. if (draggingColumn.value && props.border) {
  43769. dragging.value = true;
  43770. const table = parent2;
  43771. emit("set-drag-visible", true);
  43772. const tableEl = table == null ? void 0 : table.vnode.el;
  43773. const tableLeft = tableEl.getBoundingClientRect().left;
  43774. const columnEl = instance.vnode.el.querySelector(`th.${column2.id}`);
  43775. const columnRect = columnEl.getBoundingClientRect();
  43776. const minLeft = columnRect.left - tableLeft + 30;
  43777. addClass(columnEl, "noclick");
  43778. dragState.value = {
  43779. startMouseLeft: event.clientX,
  43780. startLeft: columnRect.right - tableLeft,
  43781. startColumnLeft: columnRect.left - tableLeft,
  43782. tableLeft
  43783. };
  43784. const resizeProxy = table == null ? void 0 : table.refs.resizeProxy;
  43785. resizeProxy.style.left = `${dragState.value.startLeft}px`;
  43786. document.onselectstart = function() {
  43787. return false;
  43788. };
  43789. document.ondragstart = function() {
  43790. return false;
  43791. };
  43792. const handleMouseMove2 = (event2) => {
  43793. const deltaLeft = event2.clientX - dragState.value.startMouseLeft;
  43794. const proxyLeft = dragState.value.startLeft + deltaLeft;
  43795. resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`;
  43796. };
  43797. const handleMouseUp = () => {
  43798. if (dragging.value) {
  43799. const { startColumnLeft, startLeft } = dragState.value;
  43800. const finalLeft = Number.parseInt(resizeProxy.style.left, 10);
  43801. const columnWidth = finalLeft - startColumnLeft;
  43802. column2.width = column2.realWidth = columnWidth;
  43803. table == null ? void 0 : table.emit("header-dragend", column2.width, startLeft - startColumnLeft, column2, event);
  43804. requestAnimationFrame(() => {
  43805. props.store.scheduleLayout(false, true);
  43806. });
  43807. document.body.style.cursor = "";
  43808. dragging.value = false;
  43809. draggingColumn.value = null;
  43810. dragState.value = {};
  43811. emit("set-drag-visible", false);
  43812. }
  43813. document.removeEventListener("mousemove", handleMouseMove2);
  43814. document.removeEventListener("mouseup", handleMouseUp);
  43815. document.onselectstart = null;
  43816. document.ondragstart = null;
  43817. setTimeout(() => {
  43818. removeClass(columnEl, "noclick");
  43819. }, 0);
  43820. };
  43821. document.addEventListener("mousemove", handleMouseMove2);
  43822. document.addEventListener("mouseup", handleMouseUp);
  43823. }
  43824. };
  43825. const handleMouseMove = (event, column2) => {
  43826. var _a2;
  43827. if (column2.children && column2.children.length > 0)
  43828. return;
  43829. const target2 = (_a2 = event.target) == null ? void 0 : _a2.closest("th");
  43830. if (!column2 || !column2.resizable)
  43831. return;
  43832. if (!dragging.value && props.border) {
  43833. const rect = target2.getBoundingClientRect();
  43834. const bodyStyle = document.body.style;
  43835. if (rect.width > 12 && rect.right - event.pageX < 8) {
  43836. bodyStyle.cursor = "col-resize";
  43837. if (hasClass(target2, "is-sortable")) {
  43838. target2.style.cursor = "col-resize";
  43839. }
  43840. draggingColumn.value = column2;
  43841. } else if (!dragging.value) {
  43842. bodyStyle.cursor = "";
  43843. if (hasClass(target2, "is-sortable")) {
  43844. target2.style.cursor = "pointer";
  43845. }
  43846. draggingColumn.value = null;
  43847. }
  43848. }
  43849. };
  43850. const handleMouseOut = () => {
  43851. if (!isClient)
  43852. return;
  43853. document.body.style.cursor = "";
  43854. };
  43855. const toggleOrder = ({ order, sortOrders }) => {
  43856. if (order === "")
  43857. return sortOrders[0];
  43858. const index = sortOrders.indexOf(order || null);
  43859. return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
  43860. };
  43861. const handleSortClick = (event, column2, givenOrder) => {
  43862. var _a2;
  43863. event.stopPropagation();
  43864. const order = column2.order === givenOrder ? null : givenOrder || toggleOrder(column2);
  43865. const target2 = (_a2 = event.target) == null ? void 0 : _a2.closest("th");
  43866. if (target2) {
  43867. if (hasClass(target2, "noclick")) {
  43868. removeClass(target2, "noclick");
  43869. return;
  43870. }
  43871. }
  43872. if (!column2.sortable)
  43873. return;
  43874. const states = props.store.states;
  43875. let sortProp = states.sortProp.value;
  43876. let sortOrder;
  43877. const sortingColumn = states.sortingColumn.value;
  43878. if (sortingColumn !== column2 || sortingColumn === column2 && sortingColumn.order === null) {
  43879. if (sortingColumn) {
  43880. sortingColumn.order = null;
  43881. }
  43882. states.sortingColumn.value = column2;
  43883. sortProp = column2.property;
  43884. }
  43885. if (!order) {
  43886. sortOrder = column2.order = null;
  43887. } else {
  43888. sortOrder = column2.order = order;
  43889. }
  43890. states.sortProp.value = sortProp;
  43891. states.sortOrder.value = sortOrder;
  43892. parent2 == null ? void 0 : parent2.store.commit("changeSortCondition");
  43893. };
  43894. return {
  43895. handleHeaderClick,
  43896. handleHeaderContextMenu,
  43897. handleMouseDown,
  43898. handleMouseMove,
  43899. handleMouseOut,
  43900. handleSortClick,
  43901. handleFilterClick
  43902. };
  43903. }
  43904. // node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs
  43905. function useStyle(props) {
  43906. const parent2 = inject(TABLE_INJECTION_KEY);
  43907. const ns2 = useNamespace("table");
  43908. const getHeaderRowStyle = (rowIndex) => {
  43909. const headerRowStyle = parent2 == null ? void 0 : parent2.props.headerRowStyle;
  43910. if (typeof headerRowStyle === "function") {
  43911. return headerRowStyle.call(null, { rowIndex });
  43912. }
  43913. return headerRowStyle;
  43914. };
  43915. const getHeaderRowClass = (rowIndex) => {
  43916. const classes = [];
  43917. const headerRowClassName = parent2 == null ? void 0 : parent2.props.headerRowClassName;
  43918. if (typeof headerRowClassName === "string") {
  43919. classes.push(headerRowClassName);
  43920. } else if (typeof headerRowClassName === "function") {
  43921. classes.push(headerRowClassName.call(null, { rowIndex }));
  43922. }
  43923. return classes.join(" ");
  43924. };
  43925. const getHeaderCellStyle = (rowIndex, columnIndex, row, column2) => {
  43926. var _a2;
  43927. let headerCellStyles = (_a2 = parent2 == null ? void 0 : parent2.props.headerCellStyle) != null ? _a2 : {};
  43928. if (typeof headerCellStyles === "function") {
  43929. headerCellStyles = headerCellStyles.call(null, {
  43930. rowIndex,
  43931. columnIndex,
  43932. row,
  43933. column: column2
  43934. });
  43935. }
  43936. const fixedStyle = getFixedColumnOffset(columnIndex, column2.fixed, props.store, row);
  43937. ensurePosition(fixedStyle, "left");
  43938. ensurePosition(fixedStyle, "right");
  43939. return Object.assign({}, headerCellStyles, fixedStyle);
  43940. };
  43941. const getHeaderCellClass = (rowIndex, columnIndex, row, column2) => {
  43942. const fixedClasses = getFixedColumnsClass(ns2.b(), columnIndex, column2.fixed, props.store, row);
  43943. const classes = [
  43944. column2.id,
  43945. column2.order,
  43946. column2.headerAlign,
  43947. column2.className,
  43948. column2.labelClassName,
  43949. ...fixedClasses
  43950. ];
  43951. if (!column2.children) {
  43952. classes.push("is-leaf");
  43953. }
  43954. if (column2.sortable) {
  43955. classes.push("is-sortable");
  43956. }
  43957. const headerCellClassName = parent2 == null ? void 0 : parent2.props.headerCellClassName;
  43958. if (typeof headerCellClassName === "string") {
  43959. classes.push(headerCellClassName);
  43960. } else if (typeof headerCellClassName === "function") {
  43961. classes.push(headerCellClassName.call(null, {
  43962. rowIndex,
  43963. columnIndex,
  43964. row,
  43965. column: column2
  43966. }));
  43967. }
  43968. classes.push(ns2.e("cell"));
  43969. return classes.filter((className) => Boolean(className)).join(" ");
  43970. };
  43971. return {
  43972. getHeaderRowStyle,
  43973. getHeaderRowClass,
  43974. getHeaderCellStyle,
  43975. getHeaderCellClass
  43976. };
  43977. }
  43978. // node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs
  43979. var getAllColumns = (columns2) => {
  43980. const result2 = [];
  43981. columns2.forEach((column2) => {
  43982. if (column2.children) {
  43983. result2.push(column2);
  43984. result2.push.apply(result2, getAllColumns(column2.children));
  43985. } else {
  43986. result2.push(column2);
  43987. }
  43988. });
  43989. return result2;
  43990. };
  43991. var convertToRows = (originColumns) => {
  43992. let maxLevel = 1;
  43993. const traverse = (column2, parent2) => {
  43994. if (parent2) {
  43995. column2.level = parent2.level + 1;
  43996. if (maxLevel < column2.level) {
  43997. maxLevel = column2.level;
  43998. }
  43999. }
  44000. if (column2.children) {
  44001. let colSpan = 0;
  44002. column2.children.forEach((subColumn) => {
  44003. traverse(subColumn, column2);
  44004. colSpan += subColumn.colSpan;
  44005. });
  44006. column2.colSpan = colSpan;
  44007. } else {
  44008. column2.colSpan = 1;
  44009. }
  44010. };
  44011. originColumns.forEach((column2) => {
  44012. column2.level = 1;
  44013. traverse(column2, void 0);
  44014. });
  44015. const rows = [];
  44016. for (let i = 0; i < maxLevel; i++) {
  44017. rows.push([]);
  44018. }
  44019. const allColumns = getAllColumns(originColumns);
  44020. allColumns.forEach((column2) => {
  44021. if (!column2.children) {
  44022. column2.rowSpan = maxLevel - column2.level + 1;
  44023. } else {
  44024. column2.rowSpan = 1;
  44025. column2.children.forEach((col) => col.isSubColumn = true);
  44026. }
  44027. rows[column2.level - 1].push(column2);
  44028. });
  44029. return rows;
  44030. };
  44031. function useUtils(props) {
  44032. const parent2 = inject(TABLE_INJECTION_KEY);
  44033. const columnRows = computed2(() => {
  44034. return convertToRows(props.store.states.originColumns.value);
  44035. });
  44036. const isGroup = computed2(() => {
  44037. const result2 = columnRows.value.length > 1;
  44038. if (result2 && parent2) {
  44039. parent2.state.isGroup.value = true;
  44040. }
  44041. return result2;
  44042. });
  44043. const toggleAllSelection = (event) => {
  44044. event.stopPropagation();
  44045. parent2 == null ? void 0 : parent2.store.commit("toggleAllSelection");
  44046. };
  44047. return {
  44048. isGroup,
  44049. toggleAllSelection,
  44050. columnRows
  44051. };
  44052. }
  44053. // node_modules/element-plus/es/components/table/src/table-header/index.mjs
  44054. var TableHeader = defineComponent({
  44055. name: "ElTableHeader",
  44056. components: {
  44057. ElCheckbox
  44058. },
  44059. props: {
  44060. fixed: {
  44061. type: String,
  44062. default: ""
  44063. },
  44064. store: {
  44065. required: true,
  44066. type: Object
  44067. },
  44068. border: Boolean,
  44069. defaultSort: {
  44070. type: Object,
  44071. default: () => {
  44072. return {
  44073. prop: "",
  44074. order: ""
  44075. };
  44076. }
  44077. }
  44078. },
  44079. setup(props, { emit }) {
  44080. const instance = getCurrentInstance();
  44081. const parent2 = inject(TABLE_INJECTION_KEY);
  44082. const ns2 = useNamespace("table");
  44083. const filterPanels = ref({});
  44084. const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2);
  44085. onMounted(async () => {
  44086. await nextTick();
  44087. await nextTick();
  44088. const { prop, order } = props.defaultSort;
  44089. parent2 == null ? void 0 : parent2.store.commit("sort", { prop, order, init: true });
  44090. });
  44091. const {
  44092. handleHeaderClick,
  44093. handleHeaderContextMenu,
  44094. handleMouseDown,
  44095. handleMouseMove,
  44096. handleMouseOut,
  44097. handleSortClick,
  44098. handleFilterClick
  44099. } = useEvent(props, emit);
  44100. const {
  44101. getHeaderRowStyle,
  44102. getHeaderRowClass,
  44103. getHeaderCellStyle,
  44104. getHeaderCellClass
  44105. } = useStyle(props);
  44106. const { isGroup, toggleAllSelection, columnRows } = useUtils(props);
  44107. instance.state = {
  44108. onColumnsChange,
  44109. onScrollableChange
  44110. };
  44111. instance.filterPanels = filterPanels;
  44112. return {
  44113. ns: ns2,
  44114. filterPanels,
  44115. onColumnsChange,
  44116. onScrollableChange,
  44117. columnRows,
  44118. getHeaderRowClass,
  44119. getHeaderRowStyle,
  44120. getHeaderCellClass,
  44121. getHeaderCellStyle,
  44122. handleHeaderClick,
  44123. handleHeaderContextMenu,
  44124. handleMouseDown,
  44125. handleMouseMove,
  44126. handleMouseOut,
  44127. handleSortClick,
  44128. handleFilterClick,
  44129. isGroup,
  44130. toggleAllSelection
  44131. };
  44132. },
  44133. render() {
  44134. const {
  44135. ns: ns2,
  44136. isGroup,
  44137. columnRows,
  44138. getHeaderCellStyle,
  44139. getHeaderCellClass,
  44140. getHeaderRowClass,
  44141. getHeaderRowStyle,
  44142. handleHeaderClick,
  44143. handleHeaderContextMenu,
  44144. handleMouseDown,
  44145. handleMouseMove,
  44146. handleSortClick,
  44147. handleMouseOut,
  44148. store,
  44149. $parent
  44150. } = this;
  44151. let rowSpan = 1;
  44152. return h("thead", {
  44153. class: { [ns2.is("group")]: isGroup }
  44154. }, columnRows.map((subColumns, rowIndex) => h("tr", {
  44155. class: getHeaderRowClass(rowIndex),
  44156. key: rowIndex,
  44157. style: getHeaderRowStyle(rowIndex)
  44158. }, subColumns.map((column2, cellIndex) => {
  44159. if (column2.rowSpan > rowSpan) {
  44160. rowSpan = column2.rowSpan;
  44161. }
  44162. return h("th", {
  44163. class: getHeaderCellClass(rowIndex, cellIndex, subColumns, column2),
  44164. colspan: column2.colSpan,
  44165. key: `${column2.id}-thead`,
  44166. rowspan: column2.rowSpan,
  44167. style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column2),
  44168. onClick: ($event) => handleHeaderClick($event, column2),
  44169. onContextmenu: ($event) => handleHeaderContextMenu($event, column2),
  44170. onMousedown: ($event) => handleMouseDown($event, column2),
  44171. onMousemove: ($event) => handleMouseMove($event, column2),
  44172. onMouseout: handleMouseOut
  44173. }, [
  44174. h("div", {
  44175. class: [
  44176. "cell",
  44177. column2.filteredValue && column2.filteredValue.length > 0 ? "highlight" : ""
  44178. ]
  44179. }, [
  44180. column2.renderHeader ? column2.renderHeader({
  44181. column: column2,
  44182. $index: cellIndex,
  44183. store,
  44184. _self: $parent
  44185. }) : column2.label,
  44186. column2.sortable && h("span", {
  44187. onClick: ($event) => handleSortClick($event, column2),
  44188. class: "caret-wrapper"
  44189. }, [
  44190. h("i", {
  44191. onClick: ($event) => handleSortClick($event, column2, "ascending"),
  44192. class: "sort-caret ascending"
  44193. }),
  44194. h("i", {
  44195. onClick: ($event) => handleSortClick($event, column2, "descending"),
  44196. class: "sort-caret descending"
  44197. })
  44198. ]),
  44199. column2.filterable && h(FilterPanel, {
  44200. store,
  44201. placement: column2.filterPlacement || "bottom-start",
  44202. column: column2,
  44203. upDataColumn: (key, value) => {
  44204. column2[key] = value;
  44205. }
  44206. })
  44207. ])
  44208. ]);
  44209. }))));
  44210. }
  44211. });
  44212. // node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs
  44213. function useEvents(props) {
  44214. const parent2 = inject(TABLE_INJECTION_KEY);
  44215. const tooltipContent = ref("");
  44216. const tooltipTrigger = ref(h("div"));
  44217. const handleEvent = (event, row, name) => {
  44218. var _a2;
  44219. const table = parent2;
  44220. const cell = getCell(event);
  44221. let column2;
  44222. const namespace = (_a2 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a2.dataset.prefix;
  44223. if (cell) {
  44224. column2 = getColumnByCell({
  44225. columns: props.store.states.columns.value
  44226. }, cell, namespace);
  44227. if (column2) {
  44228. table == null ? void 0 : table.emit(`cell-${name}`, row, column2, cell, event);
  44229. }
  44230. }
  44231. table == null ? void 0 : table.emit(`row-${name}`, row, column2, event);
  44232. };
  44233. const handleDoubleClick = (event, row) => {
  44234. handleEvent(event, row, "dblclick");
  44235. };
  44236. const handleClick = (event, row) => {
  44237. props.store.commit("setCurrentRow", row);
  44238. handleEvent(event, row, "click");
  44239. };
  44240. const handleContextMenu = (event, row) => {
  44241. handleEvent(event, row, "contextmenu");
  44242. };
  44243. const handleMouseEnter = debounce_default((index) => {
  44244. props.store.commit("setHoverRow", index);
  44245. }, 30);
  44246. const handleMouseLeave = debounce_default(() => {
  44247. props.store.commit("setHoverRow", null);
  44248. }, 30);
  44249. const handleCellMouseEnter = (event, row, tooltipEffect) => {
  44250. var _a2;
  44251. const table = parent2;
  44252. const cell = getCell(event);
  44253. const namespace = (_a2 = table == null ? void 0 : table.vnode.el) == null ? void 0 : _a2.dataset.prefix;
  44254. if (cell) {
  44255. const column2 = getColumnByCell({
  44256. columns: props.store.states.columns.value
  44257. }, cell, namespace);
  44258. const hoverState = table.hoverState = { cell, column: column2, row };
  44259. table == null ? void 0 : table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event);
  44260. }
  44261. const cellChild = event.target.querySelector(".cell");
  44262. if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length)) {
  44263. return;
  44264. }
  44265. const range4 = document.createRange();
  44266. range4.setStart(cellChild, 0);
  44267. range4.setEnd(cellChild, cellChild.childNodes.length);
  44268. const rangeWidth = Math.round(range4.getBoundingClientRect().width);
  44269. const padding = (Number.parseInt(getStyle(cellChild, "paddingLeft"), 10) || 0) + (Number.parseInt(getStyle(cellChild, "paddingRight"), 10) || 0);
  44270. if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) {
  44271. createTablePopper(parent2 == null ? void 0 : parent2.refs.tableWrapper, cell, cell.innerText || cell.textContent, {
  44272. placement: "top",
  44273. strategy: "fixed"
  44274. }, tooltipEffect);
  44275. }
  44276. };
  44277. const handleCellMouseLeave = (event) => {
  44278. const cell = getCell(event);
  44279. if (!cell)
  44280. return;
  44281. const oldHoverState = parent2 == null ? void 0 : parent2.hoverState;
  44282. parent2 == null ? void 0 : parent2.emit("cell-mouse-leave", oldHoverState == null ? void 0 : oldHoverState.row, oldHoverState == null ? void 0 : oldHoverState.column, oldHoverState == null ? void 0 : oldHoverState.cell, event);
  44283. };
  44284. return {
  44285. handleDoubleClick,
  44286. handleClick,
  44287. handleContextMenu,
  44288. handleMouseEnter,
  44289. handleMouseLeave,
  44290. handleCellMouseEnter,
  44291. handleCellMouseLeave,
  44292. tooltipContent,
  44293. tooltipTrigger
  44294. };
  44295. }
  44296. // node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs
  44297. function useStyles(props) {
  44298. const parent2 = inject(TABLE_INJECTION_KEY);
  44299. const ns2 = useNamespace("table");
  44300. const getRowStyle = (row, rowIndex) => {
  44301. const rowStyle = parent2 == null ? void 0 : parent2.props.rowStyle;
  44302. if (typeof rowStyle === "function") {
  44303. return rowStyle.call(null, {
  44304. row,
  44305. rowIndex
  44306. });
  44307. }
  44308. return rowStyle || null;
  44309. };
  44310. const getRowClass = (row, rowIndex) => {
  44311. const classes = [ns2.e("row")];
  44312. if ((parent2 == null ? void 0 : parent2.props.highlightCurrentRow) && row === props.store.states.currentRow.value) {
  44313. classes.push("current-row");
  44314. }
  44315. if (props.stripe && rowIndex % 2 === 1) {
  44316. classes.push(ns2.em("row", "striped"));
  44317. }
  44318. const rowClassName = parent2 == null ? void 0 : parent2.props.rowClassName;
  44319. if (typeof rowClassName === "string") {
  44320. classes.push(rowClassName);
  44321. } else if (typeof rowClassName === "function") {
  44322. classes.push(rowClassName.call(null, {
  44323. row,
  44324. rowIndex
  44325. }));
  44326. }
  44327. return classes;
  44328. };
  44329. const getCellStyle = (rowIndex, columnIndex, row, column2) => {
  44330. const cellStyle = parent2 == null ? void 0 : parent2.props.cellStyle;
  44331. let cellStyles = cellStyle != null ? cellStyle : {};
  44332. if (typeof cellStyle === "function") {
  44333. cellStyles = cellStyle.call(null, {
  44334. rowIndex,
  44335. columnIndex,
  44336. row,
  44337. column: column2
  44338. });
  44339. }
  44340. const fixedStyle = getFixedColumnOffset(columnIndex, props == null ? void 0 : props.fixed, props.store);
  44341. ensurePosition(fixedStyle, "left");
  44342. ensurePosition(fixedStyle, "right");
  44343. return Object.assign({}, cellStyles, fixedStyle);
  44344. };
  44345. const getCellClass = (rowIndex, columnIndex, row, column2, offset2) => {
  44346. const fixedClasses = getFixedColumnsClass(ns2.b(), columnIndex, props == null ? void 0 : props.fixed, props.store, void 0, offset2);
  44347. const classes = [column2.id, column2.align, column2.className, ...fixedClasses];
  44348. const cellClassName = parent2 == null ? void 0 : parent2.props.cellClassName;
  44349. if (typeof cellClassName === "string") {
  44350. classes.push(cellClassName);
  44351. } else if (typeof cellClassName === "function") {
  44352. classes.push(cellClassName.call(null, {
  44353. rowIndex,
  44354. columnIndex,
  44355. row,
  44356. column: column2
  44357. }));
  44358. }
  44359. classes.push(ns2.e("cell"));
  44360. return classes.filter((className) => Boolean(className)).join(" ");
  44361. };
  44362. const getSpan = (row, column2, rowIndex, columnIndex) => {
  44363. let rowspan = 1;
  44364. let colspan = 1;
  44365. const fn2 = parent2 == null ? void 0 : parent2.props.spanMethod;
  44366. if (typeof fn2 === "function") {
  44367. const result2 = fn2({
  44368. row,
  44369. column: column2,
  44370. rowIndex,
  44371. columnIndex
  44372. });
  44373. if (Array.isArray(result2)) {
  44374. rowspan = result2[0];
  44375. colspan = result2[1];
  44376. } else if (typeof result2 === "object") {
  44377. rowspan = result2.rowspan;
  44378. colspan = result2.colspan;
  44379. }
  44380. }
  44381. return { rowspan, colspan };
  44382. };
  44383. const getColspanRealWidth = (columns2, colspan, index) => {
  44384. if (colspan < 1) {
  44385. return columns2[index].realWidth;
  44386. }
  44387. const widthArr = columns2.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan);
  44388. return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1));
  44389. };
  44390. return {
  44391. getRowStyle,
  44392. getRowClass,
  44393. getCellStyle,
  44394. getCellClass,
  44395. getSpan,
  44396. getColspanRealWidth
  44397. };
  44398. }
  44399. // node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs
  44400. function useRender(props) {
  44401. const parent2 = inject(TABLE_INJECTION_KEY);
  44402. const ns2 = useNamespace("table");
  44403. const {
  44404. handleDoubleClick,
  44405. handleClick,
  44406. handleContextMenu,
  44407. handleMouseEnter,
  44408. handleMouseLeave,
  44409. handleCellMouseEnter,
  44410. handleCellMouseLeave,
  44411. tooltipContent,
  44412. tooltipTrigger
  44413. } = useEvents(props);
  44414. const {
  44415. getRowStyle,
  44416. getRowClass,
  44417. getCellStyle,
  44418. getCellClass,
  44419. getSpan,
  44420. getColspanRealWidth
  44421. } = useStyles(props);
  44422. const firstDefaultColumnIndex = computed2(() => {
  44423. return props.store.states.columns.value.findIndex(({ type: type4 }) => type4 === "default");
  44424. });
  44425. const getKeyOfRow = (row, index) => {
  44426. const rowKey2 = parent2.props.rowKey;
  44427. if (rowKey2) {
  44428. return getRowIdentity(row, rowKey2);
  44429. }
  44430. return index;
  44431. };
  44432. const rowRender = (row, $index, treeRowData, expanded = false) => {
  44433. const { tooltipEffect, store } = props;
  44434. const { indent, columns: columns2 } = store.states;
  44435. const rowClasses = getRowClass(row, $index);
  44436. let display = true;
  44437. if (treeRowData) {
  44438. rowClasses.push(ns2.em("row", `level-${treeRowData.level}`));
  44439. display = treeRowData.display;
  44440. }
  44441. const displayStyle = display ? null : {
  44442. display: "none"
  44443. };
  44444. return h("tr", {
  44445. style: [displayStyle, getRowStyle(row, $index)],
  44446. class: rowClasses,
  44447. key: getKeyOfRow(row, $index),
  44448. onDblclick: ($event) => handleDoubleClick($event, row),
  44449. onClick: ($event) => handleClick($event, row),
  44450. onContextmenu: ($event) => handleContextMenu($event, row),
  44451. onMouseenter: () => handleMouseEnter($index),
  44452. onMouseleave: handleMouseLeave
  44453. }, columns2.value.map((column2, cellIndex) => {
  44454. const { rowspan, colspan } = getSpan(row, column2, $index, cellIndex);
  44455. if (!rowspan || !colspan) {
  44456. return null;
  44457. }
  44458. const columnData = { ...column2 };
  44459. columnData.realWidth = getColspanRealWidth(columns2.value, colspan, cellIndex);
  44460. const data = {
  44461. store: props.store,
  44462. _self: props.context || parent2,
  44463. column: columnData,
  44464. row,
  44465. $index,
  44466. cellIndex,
  44467. expanded
  44468. };
  44469. if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {
  44470. data.treeNode = {
  44471. indent: treeRowData.level * indent.value,
  44472. level: treeRowData.level
  44473. };
  44474. if (typeof treeRowData.expanded === "boolean") {
  44475. data.treeNode.expanded = treeRowData.expanded;
  44476. if ("loading" in treeRowData) {
  44477. data.treeNode.loading = treeRowData.loading;
  44478. }
  44479. if ("noLazyChildren" in treeRowData) {
  44480. data.treeNode.noLazyChildren = treeRowData.noLazyChildren;
  44481. }
  44482. }
  44483. }
  44484. const baseKey = `${$index},${cellIndex}`;
  44485. const patchKey = columnData.columnKey || columnData.rawColumnKey || "";
  44486. const tdChildren = cellChildren(cellIndex, column2, data);
  44487. return h("td", {
  44488. style: getCellStyle($index, cellIndex, row, column2),
  44489. class: getCellClass($index, cellIndex, row, column2, colspan - 1),
  44490. key: `${patchKey}${baseKey}`,
  44491. rowspan,
  44492. colspan,
  44493. onMouseenter: ($event) => handleCellMouseEnter($event, row, tooltipEffect),
  44494. onMouseleave: handleCellMouseLeave
  44495. }, [tdChildren]);
  44496. }));
  44497. };
  44498. const cellChildren = (cellIndex, column2, data) => {
  44499. return column2.renderCell(data);
  44500. };
  44501. const wrappedRowRender = (row, $index) => {
  44502. const store = props.store;
  44503. const { isRowExpanded, assertRowKey } = store;
  44504. const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey: rowKey2 } = store.states;
  44505. const columns2 = store.states.columns.value;
  44506. const hasExpandColumn = columns2.some(({ type: type4 }) => type4 === "expand");
  44507. if (hasExpandColumn) {
  44508. const expanded = isRowExpanded(row);
  44509. const tr = rowRender(row, $index, void 0, expanded);
  44510. const renderExpanded = parent2.renderExpanded;
  44511. if (expanded) {
  44512. if (!renderExpanded) {
  44513. console.error("[Element Error]renderExpanded is required.");
  44514. return tr;
  44515. }
  44516. return [
  44517. [
  44518. tr,
  44519. h("tr", {
  44520. key: `expanded-row__${tr.key}`
  44521. }, [
  44522. h("td", {
  44523. colspan: columns2.length,
  44524. class: `${ns2.e("cell")} ${ns2.e("expanded-cell")}`
  44525. }, [renderExpanded({ row, $index, store, expanded })])
  44526. ])
  44527. ]
  44528. ];
  44529. } else {
  44530. return [[tr]];
  44531. }
  44532. } else if (Object.keys(treeData.value).length) {
  44533. assertRowKey();
  44534. const key = getRowIdentity(row, rowKey2.value);
  44535. let cur = treeData.value[key];
  44536. let treeRowData = null;
  44537. if (cur) {
  44538. treeRowData = {
  44539. expanded: cur.expanded,
  44540. level: cur.level,
  44541. display: true
  44542. };
  44543. if (typeof cur.lazy === "boolean") {
  44544. if (typeof cur.loaded === "boolean" && cur.loaded) {
  44545. treeRowData.noLazyChildren = !(cur.children && cur.children.length);
  44546. }
  44547. treeRowData.loading = cur.loading;
  44548. }
  44549. }
  44550. const tmp = [rowRender(row, $index, treeRowData)];
  44551. if (cur) {
  44552. let i = 0;
  44553. const traverse = (children, parent22) => {
  44554. if (!(children && children.length && parent22))
  44555. return;
  44556. children.forEach((node) => {
  44557. const innerTreeRowData = {
  44558. display: parent22.display && parent22.expanded,
  44559. level: parent22.level + 1,
  44560. expanded: false,
  44561. noLazyChildren: false,
  44562. loading: false
  44563. };
  44564. const childKey = getRowIdentity(node, rowKey2.value);
  44565. if (childKey === void 0 || childKey === null) {
  44566. throw new Error("For nested data item, row-key is required.");
  44567. }
  44568. cur = { ...treeData.value[childKey] };
  44569. if (cur) {
  44570. innerTreeRowData.expanded = cur.expanded;
  44571. cur.level = cur.level || innerTreeRowData.level;
  44572. cur.display = !!(cur.expanded && innerTreeRowData.display);
  44573. if (typeof cur.lazy === "boolean") {
  44574. if (typeof cur.loaded === "boolean" && cur.loaded) {
  44575. innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);
  44576. }
  44577. innerTreeRowData.loading = cur.loading;
  44578. }
  44579. }
  44580. i++;
  44581. tmp.push(rowRender(node, $index + i, innerTreeRowData));
  44582. if (cur) {
  44583. const nodes2 = lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value];
  44584. traverse(nodes2, cur);
  44585. }
  44586. });
  44587. };
  44588. cur.display = true;
  44589. const nodes = lazyTreeNodeMap.value[key] || row[childrenColumnName.value];
  44590. traverse(nodes, cur);
  44591. }
  44592. return tmp;
  44593. } else {
  44594. return rowRender(row, $index, void 0);
  44595. }
  44596. };
  44597. return {
  44598. wrappedRowRender,
  44599. tooltipContent,
  44600. tooltipTrigger
  44601. };
  44602. }
  44603. // node_modules/element-plus/es/components/table/src/table-body/defaults.mjs
  44604. var defaultProps = {
  44605. store: {
  44606. required: true,
  44607. type: Object
  44608. },
  44609. stripe: Boolean,
  44610. tooltipEffect: String,
  44611. context: {
  44612. default: () => ({}),
  44613. type: Object
  44614. },
  44615. rowClassName: [String, Function],
  44616. rowStyle: [Object, Function],
  44617. fixed: {
  44618. type: String,
  44619. default: ""
  44620. },
  44621. highlight: Boolean
  44622. };
  44623. // node_modules/element-plus/es/components/table/src/table-body/index.mjs
  44624. var TableBody = defineComponent({
  44625. name: "ElTableBody",
  44626. props: defaultProps,
  44627. setup(props) {
  44628. const instance = getCurrentInstance();
  44629. const parent2 = inject(TABLE_INJECTION_KEY);
  44630. const ns2 = useNamespace("table");
  44631. const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender(props);
  44632. const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent2);
  44633. watch(props.store.states.hoverRow, (newVal, oldVal) => {
  44634. if (!props.store.states.isComplex.value || !isClient)
  44635. return;
  44636. let raf = window.requestAnimationFrame;
  44637. if (!raf) {
  44638. raf = (fn2) => window.setTimeout(fn2, 16);
  44639. }
  44640. raf(() => {
  44641. const el = instance == null ? void 0 : instance.vnode.el;
  44642. const rows = Array.from((el == null ? void 0 : el.children) || []).filter((e) => e == null ? void 0 : e.classList.contains(`${ns2.e("row")}`));
  44643. const oldRow = rows[oldVal];
  44644. const newRow = rows[newVal];
  44645. if (oldRow) {
  44646. removeClass(oldRow, "hover-row");
  44647. }
  44648. if (newRow) {
  44649. addClass(newRow, "hover-row");
  44650. }
  44651. });
  44652. });
  44653. onUnmounted(() => {
  44654. var _a2;
  44655. (_a2 = removePopper) == null ? void 0 : _a2();
  44656. });
  44657. return {
  44658. ns: ns2,
  44659. onColumnsChange,
  44660. onScrollableChange,
  44661. wrappedRowRender,
  44662. tooltipContent,
  44663. tooltipTrigger
  44664. };
  44665. },
  44666. render() {
  44667. const { wrappedRowRender, store } = this;
  44668. const data = store.states.data.value || [];
  44669. return h("tbody", {}, [
  44670. data.reduce((acc, row) => {
  44671. return acc.concat(wrappedRowRender(row, acc.length));
  44672. }, [])
  44673. ]);
  44674. }
  44675. });
  44676. // node_modules/element-plus/es/components/table/src/h-helper.mjs
  44677. function hColgroup(props) {
  44678. const isAuto = props.tableLayout === "auto";
  44679. let columns2 = props.columns || [];
  44680. if (isAuto) {
  44681. if (columns2.every((column2) => column2.width === void 0)) {
  44682. columns2 = [];
  44683. }
  44684. }
  44685. const getPropsData = (column2) => {
  44686. const propsData = {
  44687. key: `${props.tableLayout}_${column2.id}`,
  44688. style: {},
  44689. name: void 0
  44690. };
  44691. if (isAuto) {
  44692. propsData.style = {
  44693. width: `${column2.width}px`
  44694. };
  44695. } else {
  44696. propsData.name = column2.id;
  44697. }
  44698. return propsData;
  44699. };
  44700. return h("colgroup", {}, columns2.map((column2) => h("col", getPropsData(column2))));
  44701. }
  44702. hColgroup.props = ["columns", "tableLayout"];
  44703. // node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs
  44704. function useMapState() {
  44705. const table = inject(TABLE_INJECTION_KEY);
  44706. const store = table == null ? void 0 : table.store;
  44707. const leftFixedLeafCount = computed2(() => {
  44708. return store.states.fixedLeafColumnsLength.value;
  44709. });
  44710. const rightFixedLeafCount = computed2(() => {
  44711. return store.states.rightFixedColumns.value.length;
  44712. });
  44713. const columnsCount = computed2(() => {
  44714. return store.states.columns.value.length;
  44715. });
  44716. const leftFixedCount = computed2(() => {
  44717. return store.states.fixedColumns.value.length;
  44718. });
  44719. const rightFixedCount = computed2(() => {
  44720. return store.states.rightFixedColumns.value.length;
  44721. });
  44722. return {
  44723. leftFixedLeafCount,
  44724. rightFixedLeafCount,
  44725. columnsCount,
  44726. leftFixedCount,
  44727. rightFixedCount,
  44728. columns: store.states.columns
  44729. };
  44730. }
  44731. // node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs
  44732. function useStyle2(props) {
  44733. const { columns: columns2 } = useMapState();
  44734. const ns2 = useNamespace("table");
  44735. const getCellClasses = (columns22, cellIndex) => {
  44736. const column2 = columns22[cellIndex];
  44737. const classes = [
  44738. ns2.e("cell"),
  44739. column2.id,
  44740. column2.align,
  44741. column2.labelClassName,
  44742. ...getFixedColumnsClass(ns2.b(), cellIndex, column2.fixed, props.store)
  44743. ];
  44744. if (column2.className) {
  44745. classes.push(column2.className);
  44746. }
  44747. if (!column2.children) {
  44748. classes.push(ns2.is("leaf"));
  44749. }
  44750. return classes;
  44751. };
  44752. const getCellStyles = (column2, cellIndex) => {
  44753. const fixedStyle = getFixedColumnOffset(cellIndex, column2.fixed, props.store);
  44754. ensurePosition(fixedStyle, "left");
  44755. ensurePosition(fixedStyle, "right");
  44756. return fixedStyle;
  44757. };
  44758. return {
  44759. getCellClasses,
  44760. getCellStyles,
  44761. columns: columns2
  44762. };
  44763. }
  44764. // node_modules/element-plus/es/components/table/src/table-footer/index.mjs
  44765. var TableFooter = defineComponent({
  44766. name: "ElTableFooter",
  44767. props: {
  44768. fixed: {
  44769. type: String,
  44770. default: ""
  44771. },
  44772. store: {
  44773. required: true,
  44774. type: Object
  44775. },
  44776. summaryMethod: Function,
  44777. sumText: String,
  44778. border: Boolean,
  44779. defaultSort: {
  44780. type: Object,
  44781. default: () => {
  44782. return {
  44783. prop: "",
  44784. order: ""
  44785. };
  44786. }
  44787. }
  44788. },
  44789. setup(props) {
  44790. const { getCellClasses, getCellStyles, columns: columns2 } = useStyle2(props);
  44791. const ns2 = useNamespace("table");
  44792. return {
  44793. ns: ns2,
  44794. getCellClasses,
  44795. getCellStyles,
  44796. columns: columns2
  44797. };
  44798. },
  44799. render() {
  44800. const {
  44801. columns: columns2,
  44802. getCellStyles,
  44803. getCellClasses,
  44804. summaryMethod,
  44805. sumText,
  44806. ns: ns2
  44807. } = this;
  44808. const data = this.store.states.data.value;
  44809. let sums = [];
  44810. if (summaryMethod) {
  44811. sums = summaryMethod({
  44812. columns: columns2,
  44813. data
  44814. });
  44815. } else {
  44816. columns2.forEach((column2, index) => {
  44817. if (index === 0) {
  44818. sums[index] = sumText;
  44819. return;
  44820. }
  44821. const values2 = data.map((item) => Number(item[column2.property]));
  44822. const precisions = [];
  44823. let notNumber = true;
  44824. values2.forEach((value) => {
  44825. if (!Number.isNaN(+value)) {
  44826. notNumber = false;
  44827. const decimal = `${value}`.split(".")[1];
  44828. precisions.push(decimal ? decimal.length : 0);
  44829. }
  44830. });
  44831. const precision = Math.max.apply(null, precisions);
  44832. if (!notNumber) {
  44833. sums[index] = values2.reduce((prev, curr) => {
  44834. const value = Number(curr);
  44835. if (!Number.isNaN(+value)) {
  44836. return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
  44837. } else {
  44838. return prev;
  44839. }
  44840. }, 0);
  44841. } else {
  44842. sums[index] = "";
  44843. }
  44844. });
  44845. }
  44846. return h("table", {
  44847. class: ns2.e("footer"),
  44848. cellspacing: "0",
  44849. cellpadding: "0",
  44850. border: "0"
  44851. }, [
  44852. hColgroup({
  44853. columns: columns2
  44854. }),
  44855. h("tbody", [
  44856. h("tr", {}, [
  44857. ...columns2.map((column2, cellIndex) => h("td", {
  44858. key: cellIndex,
  44859. colspan: column2.colSpan,
  44860. rowspan: column2.rowSpan,
  44861. class: getCellClasses(columns2, cellIndex),
  44862. style: getCellStyles(column2, cellIndex)
  44863. }, [
  44864. h("div", {
  44865. class: ["cell", column2.labelClassName]
  44866. }, [sums[cellIndex]])
  44867. ]))
  44868. ])
  44869. ])
  44870. ]);
  44871. }
  44872. });
  44873. // node_modules/element-plus/es/components/table/src/table/utils-helper.mjs
  44874. function useUtils2(store) {
  44875. const setCurrentRow = (row) => {
  44876. store.commit("setCurrentRow", row);
  44877. };
  44878. const getSelectionRows = () => {
  44879. return store.getSelectionRows();
  44880. };
  44881. const toggleRowSelection = (row, selected) => {
  44882. store.toggleRowSelection(row, selected, false);
  44883. store.updateAllSelected();
  44884. };
  44885. const clearSelection = () => {
  44886. store.clearSelection();
  44887. };
  44888. const clearFilter = (columnKeys) => {
  44889. store.clearFilter(columnKeys);
  44890. };
  44891. const toggleAllSelection = () => {
  44892. store.commit("toggleAllSelection");
  44893. };
  44894. const toggleRowExpansion = (row, expanded) => {
  44895. store.toggleRowExpansionAdapter(row, expanded);
  44896. };
  44897. const clearSort = () => {
  44898. store.clearSort();
  44899. };
  44900. const sort = (prop, order) => {
  44901. store.commit("sort", { prop, order });
  44902. };
  44903. return {
  44904. setCurrentRow,
  44905. getSelectionRows,
  44906. toggleRowSelection,
  44907. clearSelection,
  44908. clearFilter,
  44909. toggleAllSelection,
  44910. toggleRowExpansion,
  44911. clearSort,
  44912. sort
  44913. };
  44914. }
  44915. // node_modules/element-plus/es/components/table/src/table/style-helper.mjs
  44916. function useStyle3(props, layout2, store, table) {
  44917. const isHidden2 = ref(false);
  44918. const renderExpanded = ref(null);
  44919. const resizeProxyVisible = ref(false);
  44920. const setDragVisible = (visible) => {
  44921. resizeProxyVisible.value = visible;
  44922. };
  44923. const resizeState = ref({
  44924. width: null,
  44925. height: null,
  44926. headerHeight: null
  44927. });
  44928. const isGroup = ref(false);
  44929. const scrollbarViewStyle = {
  44930. display: "inline-block",
  44931. verticalAlign: "middle"
  44932. };
  44933. const tableWidth = ref();
  44934. const tableScrollHeight = ref(0);
  44935. const bodyScrollHeight = ref(0);
  44936. const headerScrollHeight = ref(0);
  44937. const footerScrollHeight = ref(0);
  44938. watchEffect(() => {
  44939. layout2.setHeight(props.height);
  44940. });
  44941. watchEffect(() => {
  44942. layout2.setMaxHeight(props.maxHeight);
  44943. });
  44944. watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey2]) => {
  44945. if (!unref(rowKey2) || !unref(currentRowKey))
  44946. return;
  44947. store.setCurrentRowKey(`${currentRowKey}`);
  44948. }, {
  44949. immediate: true
  44950. });
  44951. watch(() => props.data, (data) => {
  44952. table.store.commit("setData", data);
  44953. }, {
  44954. immediate: true,
  44955. deep: true
  44956. });
  44957. watchEffect(() => {
  44958. if (props.expandRowKeys) {
  44959. store.setExpandRowKeysAdapter(props.expandRowKeys);
  44960. }
  44961. });
  44962. const handleMouseLeave = () => {
  44963. table.store.commit("setHoverRow", null);
  44964. if (table.hoverState)
  44965. table.hoverState = null;
  44966. };
  44967. const handleHeaderFooterMousewheel = (event, data) => {
  44968. const { pixelX, pixelY } = data;
  44969. if (Math.abs(pixelX) >= Math.abs(pixelY)) {
  44970. table.refs.bodyWrapper.scrollLeft += data.pixelX / 5;
  44971. }
  44972. };
  44973. const shouldUpdateHeight = computed2(() => {
  44974. return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;
  44975. });
  44976. const tableBodyStyles = computed2(() => {
  44977. return {
  44978. width: layout2.bodyWidth.value ? `${layout2.bodyWidth.value}px` : ""
  44979. };
  44980. });
  44981. const doLayout = () => {
  44982. if (shouldUpdateHeight.value) {
  44983. layout2.updateElsHeight();
  44984. }
  44985. layout2.updateColumnsWidth();
  44986. requestAnimationFrame(syncPosition);
  44987. };
  44988. onMounted(async () => {
  44989. await nextTick();
  44990. store.updateColumns();
  44991. bindEvents();
  44992. requestAnimationFrame(doLayout);
  44993. const el = table.vnode.el;
  44994. const tableHeader = table.refs.headerWrapper;
  44995. if (props.flexible && el && el.parentElement) {
  44996. el.parentElement.style.minWidth = "0";
  44997. }
  44998. resizeState.value = {
  44999. width: tableWidth.value = el.offsetWidth,
  45000. height: el.offsetHeight,
  45001. headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null
  45002. };
  45003. store.states.columns.value.forEach((column2) => {
  45004. if (column2.filteredValue && column2.filteredValue.length) {
  45005. table.store.commit("filterChange", {
  45006. column: column2,
  45007. values: column2.filteredValue,
  45008. silent: true
  45009. });
  45010. }
  45011. });
  45012. table.$ready = true;
  45013. });
  45014. const setScrollClassByEl = (el, className) => {
  45015. if (!el)
  45016. return;
  45017. const classList = Array.from(el.classList).filter((item) => !item.startsWith("is-scrolling-"));
  45018. classList.push(layout2.scrollX.value ? className : "is-scrolling-none");
  45019. el.className = classList.join(" ");
  45020. };
  45021. const setScrollClass = (className) => {
  45022. const { tableWrapper } = table.refs;
  45023. setScrollClassByEl(tableWrapper, className);
  45024. };
  45025. const hasScrollClass = (className) => {
  45026. const { tableWrapper } = table.refs;
  45027. return !!(tableWrapper && tableWrapper.classList.contains(className));
  45028. };
  45029. const syncPosition = function() {
  45030. if (!table.refs.scrollBarRef)
  45031. return;
  45032. if (!layout2.scrollX.value) {
  45033. const scrollingNoneClass = "is-scrolling-none";
  45034. if (!hasScrollClass(scrollingNoneClass)) {
  45035. setScrollClass(scrollingNoneClass);
  45036. }
  45037. return;
  45038. }
  45039. const scrollContainer = table.refs.scrollBarRef.wrapRef;
  45040. if (!scrollContainer)
  45041. return;
  45042. const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer;
  45043. const { headerWrapper, footerWrapper } = table.refs;
  45044. if (headerWrapper)
  45045. headerWrapper.scrollLeft = scrollLeft;
  45046. if (footerWrapper)
  45047. footerWrapper.scrollLeft = scrollLeft;
  45048. const maxScrollLeftPosition = scrollWidth - offsetWidth - 1;
  45049. if (scrollLeft >= maxScrollLeftPosition) {
  45050. setScrollClass("is-scrolling-right");
  45051. } else if (scrollLeft === 0) {
  45052. setScrollClass("is-scrolling-left");
  45053. } else {
  45054. setScrollClass("is-scrolling-middle");
  45055. }
  45056. };
  45057. const bindEvents = () => {
  45058. if (!table.refs.scrollBarRef)
  45059. return;
  45060. if (table.refs.scrollBarRef.wrapRef) {
  45061. useEventListener(table.refs.scrollBarRef.wrapRef, "scroll", syncPosition, {
  45062. passive: true
  45063. });
  45064. }
  45065. if (props.fit) {
  45066. useResizeObserver(table.vnode.el, resizeListener);
  45067. } else {
  45068. useEventListener(window, "resize", resizeListener);
  45069. }
  45070. useResizeObserver(table.refs.bodyWrapper, () => {
  45071. var _a2, _b;
  45072. resizeListener();
  45073. (_b = (_a2 = table.refs) == null ? void 0 : _a2.scrollBarRef) == null ? void 0 : _b.update();
  45074. });
  45075. };
  45076. const resizeListener = () => {
  45077. var _a2, _b, _c;
  45078. const el = table.vnode.el;
  45079. if (!table.$ready || !el)
  45080. return;
  45081. let shouldUpdateLayout = false;
  45082. const {
  45083. width: oldWidth,
  45084. height: oldHeight,
  45085. headerHeight: oldHeaderHeight
  45086. } = resizeState.value;
  45087. const width = tableWidth.value = el.offsetWidth;
  45088. if (oldWidth !== width) {
  45089. shouldUpdateLayout = true;
  45090. }
  45091. const height = el.offsetHeight;
  45092. if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {
  45093. shouldUpdateLayout = true;
  45094. }
  45095. const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : (_a2 = table.refs.tableHeaderRef) == null ? void 0 : _a2.$el;
  45096. if (props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) !== oldHeaderHeight) {
  45097. shouldUpdateLayout = true;
  45098. }
  45099. tableScrollHeight.value = ((_b = table.refs.tableWrapper) == null ? void 0 : _b.scrollHeight) || 0;
  45100. headerScrollHeight.value = (tableHeader == null ? void 0 : tableHeader.scrollHeight) || 0;
  45101. footerScrollHeight.value = ((_c = table.refs.footerWrapper) == null ? void 0 : _c.offsetHeight) || 0;
  45102. bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value;
  45103. if (shouldUpdateLayout) {
  45104. resizeState.value = {
  45105. width,
  45106. height,
  45107. headerHeight: props.showHeader && (tableHeader == null ? void 0 : tableHeader.offsetHeight) || 0
  45108. };
  45109. doLayout();
  45110. }
  45111. };
  45112. const tableSize = useSize();
  45113. const bodyWidth = computed2(() => {
  45114. const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout2;
  45115. return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : "";
  45116. });
  45117. const tableLayout = computed2(() => {
  45118. if (props.maxHeight)
  45119. return "fixed";
  45120. return props.tableLayout;
  45121. });
  45122. const emptyBlockStyle = computed2(() => {
  45123. if (props.data && props.data.length)
  45124. return null;
  45125. let height = "100%";
  45126. if (props.height && bodyScrollHeight.value) {
  45127. height = `${bodyScrollHeight.value}px`;
  45128. }
  45129. const width = tableWidth.value;
  45130. return {
  45131. width: width ? `${width}px` : "",
  45132. height
  45133. };
  45134. });
  45135. const tableInnerStyle = computed2(() => {
  45136. if (props.height) {
  45137. return {
  45138. height: !Number.isNaN(Number(props.height)) ? `${props.height}px` : props.height
  45139. };
  45140. }
  45141. if (props.maxHeight) {
  45142. return {
  45143. maxHeight: !Number.isNaN(Number(props.maxHeight)) ? `${props.maxHeight}px` : props.maxHeight
  45144. };
  45145. }
  45146. return {};
  45147. });
  45148. const scrollbarStyle = computed2(() => {
  45149. if (props.height) {
  45150. return {
  45151. height: "100%"
  45152. };
  45153. }
  45154. if (props.maxHeight) {
  45155. if (!Number.isNaN(Number(props.maxHeight))) {
  45156. const maxHeight = props.maxHeight;
  45157. const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight);
  45158. if (reachMaxHeight) {
  45159. return {
  45160. maxHeight: `${tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value}px`
  45161. };
  45162. }
  45163. } else {
  45164. return {
  45165. maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)`
  45166. };
  45167. }
  45168. }
  45169. return {};
  45170. });
  45171. const handleFixedMousewheel = (event, data) => {
  45172. const bodyWrapper = table.refs.bodyWrapper;
  45173. if (Math.abs(data.spinY) > 0) {
  45174. const currentScrollTop = bodyWrapper.scrollTop;
  45175. if (data.pixelY < 0 && currentScrollTop !== 0) {
  45176. event.preventDefault();
  45177. }
  45178. if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) {
  45179. event.preventDefault();
  45180. }
  45181. bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5);
  45182. } else {
  45183. bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);
  45184. }
  45185. };
  45186. return {
  45187. isHidden: isHidden2,
  45188. renderExpanded,
  45189. setDragVisible,
  45190. isGroup,
  45191. handleMouseLeave,
  45192. handleHeaderFooterMousewheel,
  45193. tableSize,
  45194. emptyBlockStyle,
  45195. handleFixedMousewheel,
  45196. resizeProxyVisible,
  45197. bodyWidth,
  45198. resizeState,
  45199. doLayout,
  45200. tableBodyStyles,
  45201. tableLayout,
  45202. scrollbarViewStyle,
  45203. tableInnerStyle,
  45204. scrollbarStyle
  45205. };
  45206. }
  45207. // node_modules/element-plus/es/components/table/src/table/defaults.mjs
  45208. var defaultProps2 = {
  45209. data: {
  45210. type: Array,
  45211. default: () => []
  45212. },
  45213. size: String,
  45214. width: [String, Number],
  45215. height: [String, Number],
  45216. maxHeight: [String, Number],
  45217. fit: {
  45218. type: Boolean,
  45219. default: true
  45220. },
  45221. stripe: Boolean,
  45222. border: Boolean,
  45223. rowKey: [String, Function],
  45224. showHeader: {
  45225. type: Boolean,
  45226. default: true
  45227. },
  45228. showSummary: Boolean,
  45229. sumText: String,
  45230. summaryMethod: Function,
  45231. rowClassName: [String, Function],
  45232. rowStyle: [Object, Function],
  45233. cellClassName: [String, Function],
  45234. cellStyle: [Object, Function],
  45235. headerRowClassName: [String, Function],
  45236. headerRowStyle: [Object, Function],
  45237. headerCellClassName: [String, Function],
  45238. headerCellStyle: [Object, Function],
  45239. highlightCurrentRow: Boolean,
  45240. currentRowKey: [String, Number],
  45241. emptyText: String,
  45242. expandRowKeys: Array,
  45243. defaultExpandAll: Boolean,
  45244. defaultSort: Object,
  45245. tooltipEffect: String,
  45246. spanMethod: Function,
  45247. selectOnIndeterminate: {
  45248. type: Boolean,
  45249. default: true
  45250. },
  45251. indent: {
  45252. type: Number,
  45253. default: 16
  45254. },
  45255. treeProps: {
  45256. type: Object,
  45257. default: () => {
  45258. return {
  45259. hasChildren: "hasChildren",
  45260. children: "children"
  45261. };
  45262. }
  45263. },
  45264. lazy: Boolean,
  45265. load: Function,
  45266. style: {
  45267. type: Object,
  45268. default: () => ({})
  45269. },
  45270. className: {
  45271. type: String,
  45272. default: ""
  45273. },
  45274. tableLayout: {
  45275. type: String,
  45276. default: "fixed"
  45277. },
  45278. scrollbarAlwaysOn: {
  45279. type: Boolean,
  45280. default: false
  45281. },
  45282. flexible: Boolean
  45283. };
  45284. // node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs
  45285. var useScrollbar = () => {
  45286. const scrollBarRef = ref();
  45287. const scrollTo = (options, yCoord) => {
  45288. const scrollbar = scrollBarRef.value;
  45289. if (scrollbar) {
  45290. scrollbar.scrollTo(options, yCoord);
  45291. }
  45292. };
  45293. const setScrollPosition = (position, offset2) => {
  45294. const scrollbar = scrollBarRef.value;
  45295. if (scrollbar && isNumber2(offset2) && ["Top", "Left"].includes(position)) {
  45296. scrollbar[`setScroll${position}`](offset2);
  45297. }
  45298. };
  45299. const setScrollTop = (top) => setScrollPosition("Top", top);
  45300. const setScrollLeft = (left2) => setScrollPosition("Left", left2);
  45301. return {
  45302. scrollBarRef,
  45303. scrollTo,
  45304. setScrollTop,
  45305. setScrollLeft
  45306. };
  45307. };
  45308. // node_modules/element-plus/es/components/table/src/table.mjs
  45309. var tableIdSeed = 1;
  45310. var _sfc_main121 = defineComponent({
  45311. name: "ElTable",
  45312. directives: {
  45313. Mousewheel
  45314. },
  45315. components: {
  45316. TableHeader,
  45317. TableBody,
  45318. TableFooter,
  45319. ElScrollbar,
  45320. hColgroup
  45321. },
  45322. props: defaultProps2,
  45323. emits: [
  45324. "select",
  45325. "select-all",
  45326. "selection-change",
  45327. "cell-mouse-enter",
  45328. "cell-mouse-leave",
  45329. "cell-contextmenu",
  45330. "cell-click",
  45331. "cell-dblclick",
  45332. "row-click",
  45333. "row-contextmenu",
  45334. "row-dblclick",
  45335. "header-click",
  45336. "header-contextmenu",
  45337. "sort-change",
  45338. "filter-change",
  45339. "current-change",
  45340. "header-dragend",
  45341. "expand-change"
  45342. ],
  45343. setup(props) {
  45344. const { t } = useLocale();
  45345. const ns2 = useNamespace("table");
  45346. const table = getCurrentInstance();
  45347. provide(TABLE_INJECTION_KEY, table);
  45348. const store = createStore(table, props);
  45349. table.store = store;
  45350. const layout2 = new TableLayout({
  45351. store: table.store,
  45352. table,
  45353. fit: props.fit,
  45354. showHeader: props.showHeader
  45355. });
  45356. table.layout = layout2;
  45357. const isEmpty3 = computed2(() => (store.states.data.value || []).length === 0);
  45358. const {
  45359. setCurrentRow,
  45360. getSelectionRows,
  45361. toggleRowSelection,
  45362. clearSelection,
  45363. clearFilter,
  45364. toggleAllSelection,
  45365. toggleRowExpansion,
  45366. clearSort,
  45367. sort
  45368. } = useUtils2(store);
  45369. const {
  45370. isHidden: isHidden2,
  45371. renderExpanded,
  45372. setDragVisible,
  45373. isGroup,
  45374. handleMouseLeave,
  45375. handleHeaderFooterMousewheel,
  45376. tableSize,
  45377. emptyBlockStyle,
  45378. handleFixedMousewheel,
  45379. resizeProxyVisible,
  45380. bodyWidth,
  45381. resizeState,
  45382. doLayout,
  45383. tableBodyStyles,
  45384. tableLayout,
  45385. scrollbarViewStyle,
  45386. tableInnerStyle,
  45387. scrollbarStyle
  45388. } = useStyle3(props, layout2, store, table);
  45389. const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar();
  45390. const debouncedUpdateLayout = debounce_default(doLayout, 50);
  45391. const tableId = `${ns2.namespace.value}-table_${tableIdSeed++}`;
  45392. table.tableId = tableId;
  45393. table.state = {
  45394. isGroup,
  45395. resizeState,
  45396. doLayout,
  45397. debouncedUpdateLayout
  45398. };
  45399. const computedSumText = computed2(() => props.sumText || t("el.table.sumText"));
  45400. const computedEmptyText = computed2(() => {
  45401. return props.emptyText || t("el.table.emptyText");
  45402. });
  45403. return {
  45404. ns: ns2,
  45405. layout: layout2,
  45406. store,
  45407. handleHeaderFooterMousewheel,
  45408. handleMouseLeave,
  45409. tableId,
  45410. tableSize,
  45411. isHidden: isHidden2,
  45412. isEmpty: isEmpty3,
  45413. renderExpanded,
  45414. resizeProxyVisible,
  45415. resizeState,
  45416. isGroup,
  45417. bodyWidth,
  45418. tableBodyStyles,
  45419. emptyBlockStyle,
  45420. debouncedUpdateLayout,
  45421. handleFixedMousewheel,
  45422. setCurrentRow,
  45423. getSelectionRows,
  45424. toggleRowSelection,
  45425. clearSelection,
  45426. clearFilter,
  45427. toggleAllSelection,
  45428. toggleRowExpansion,
  45429. clearSort,
  45430. doLayout,
  45431. sort,
  45432. t,
  45433. setDragVisible,
  45434. context: table,
  45435. computedSumText,
  45436. computedEmptyText,
  45437. tableLayout,
  45438. scrollbarViewStyle,
  45439. tableInnerStyle,
  45440. scrollbarStyle,
  45441. scrollBarRef,
  45442. scrollTo,
  45443. setScrollLeft,
  45444. setScrollTop
  45445. };
  45446. }
  45447. });
  45448. var _hoisted_160 = ["data-prefix"];
  45449. var _hoisted_238 = {
  45450. ref: "hiddenColumns",
  45451. class: "hidden-columns"
  45452. };
  45453. function _sfc_render32(_ctx, _cache, $props, $setup, $data, $options) {
  45454. const _component_hColgroup = resolveComponent("hColgroup");
  45455. const _component_table_header = resolveComponent("table-header");
  45456. const _component_table_body = resolveComponent("table-body");
  45457. const _component_el_scrollbar = resolveComponent("el-scrollbar");
  45458. const _component_table_footer = resolveComponent("table-footer");
  45459. const _directive_mousewheel = resolveDirective("mousewheel");
  45460. return openBlock(), createElementBlock("div", {
  45461. ref: "tableWrapper",
  45462. class: normalizeClass([
  45463. {
  45464. [_ctx.ns.m("fit")]: _ctx.fit,
  45465. [_ctx.ns.m("striped")]: _ctx.stripe,
  45466. [_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup,
  45467. [_ctx.ns.m("hidden")]: _ctx.isHidden,
  45468. [_ctx.ns.m("group")]: _ctx.isGroup,
  45469. [_ctx.ns.m("fluid-height")]: _ctx.maxHeight,
  45470. [_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value,
  45471. [_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value,
  45472. [_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value,
  45473. [_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100,
  45474. "has-footer": _ctx.showSummary
  45475. },
  45476. _ctx.ns.m(_ctx.tableSize),
  45477. _ctx.className,
  45478. _ctx.ns.b(),
  45479. _ctx.ns.m(`layout-${_ctx.tableLayout}`)
  45480. ]),
  45481. style: normalizeStyle(_ctx.style),
  45482. "data-prefix": _ctx.ns.namespace.value,
  45483. onMouseleave: _cache[0] || (_cache[0] = ($event) => _ctx.handleMouseLeave())
  45484. }, [
  45485. createBaseVNode("div", {
  45486. class: normalizeClass(_ctx.ns.e("inner-wrapper")),
  45487. style: normalizeStyle(_ctx.tableInnerStyle)
  45488. }, [
  45489. createBaseVNode("div", _hoisted_238, [
  45490. renderSlot(_ctx.$slots, "default")
  45491. ], 512),
  45492. _ctx.showHeader && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
  45493. key: 0,
  45494. ref: "headerWrapper",
  45495. class: normalizeClass(_ctx.ns.e("header-wrapper"))
  45496. }, [
  45497. createBaseVNode("table", {
  45498. ref: "tableHeader",
  45499. class: normalizeClass(_ctx.ns.e("header")),
  45500. style: normalizeStyle(_ctx.tableBodyStyles),
  45501. border: "0",
  45502. cellpadding: "0",
  45503. cellspacing: "0"
  45504. }, [
  45505. createVNode(_component_hColgroup, {
  45506. columns: _ctx.store.states.columns.value,
  45507. "table-layout": _ctx.tableLayout
  45508. }, null, 8, ["columns", "table-layout"]),
  45509. createVNode(_component_table_header, {
  45510. ref: "tableHeaderRef",
  45511. border: _ctx.border,
  45512. "default-sort": _ctx.defaultSort,
  45513. store: _ctx.store,
  45514. onSetDragVisible: _ctx.setDragVisible
  45515. }, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])
  45516. ], 6)
  45517. ], 2)), [
  45518. [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
  45519. ]) : createCommentVNode("v-if", true),
  45520. createBaseVNode("div", {
  45521. ref: "bodyWrapper",
  45522. class: normalizeClass(_ctx.ns.e("body-wrapper"))
  45523. }, [
  45524. createVNode(_component_el_scrollbar, {
  45525. ref: "scrollBarRef",
  45526. "view-style": _ctx.scrollbarViewStyle,
  45527. "wrap-style": _ctx.scrollbarStyle,
  45528. always: _ctx.scrollbarAlwaysOn
  45529. }, {
  45530. default: withCtx(() => [
  45531. createBaseVNode("table", {
  45532. ref: "tableBody",
  45533. class: normalizeClass(_ctx.ns.e("body")),
  45534. cellspacing: "0",
  45535. cellpadding: "0",
  45536. border: "0",
  45537. style: normalizeStyle({
  45538. width: _ctx.bodyWidth,
  45539. tableLayout: _ctx.tableLayout
  45540. })
  45541. }, [
  45542. createVNode(_component_hColgroup, {
  45543. columns: _ctx.store.states.columns.value,
  45544. "table-layout": _ctx.tableLayout
  45545. }, null, 8, ["columns", "table-layout"]),
  45546. _ctx.showHeader && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_header, {
  45547. key: 0,
  45548. ref: "tableHeaderRef",
  45549. border: _ctx.border,
  45550. "default-sort": _ctx.defaultSort,
  45551. store: _ctx.store,
  45552. onSetDragVisible: _ctx.setDragVisible
  45553. }, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])) : createCommentVNode("v-if", true),
  45554. createVNode(_component_table_body, {
  45555. context: _ctx.context,
  45556. highlight: _ctx.highlightCurrentRow,
  45557. "row-class-name": _ctx.rowClassName,
  45558. "tooltip-effect": _ctx.tooltipEffect,
  45559. "row-style": _ctx.rowStyle,
  45560. store: _ctx.store,
  45561. stripe: _ctx.stripe
  45562. }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "row-style", "store", "stripe"])
  45563. ], 6),
  45564. _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
  45565. key: 0,
  45566. ref: "emptyBlock",
  45567. style: normalizeStyle(_ctx.emptyBlockStyle),
  45568. class: normalizeClass(_ctx.ns.e("empty-block"))
  45569. }, [
  45570. createBaseVNode("span", {
  45571. class: normalizeClass(_ctx.ns.e("empty-text"))
  45572. }, [
  45573. renderSlot(_ctx.$slots, "empty", {}, () => [
  45574. createTextVNode(toDisplayString(_ctx.computedEmptyText), 1)
  45575. ])
  45576. ], 2)
  45577. ], 6)) : createCommentVNode("v-if", true),
  45578. _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
  45579. key: 1,
  45580. ref: "appendWrapper",
  45581. class: normalizeClass(_ctx.ns.e("append-wrapper"))
  45582. }, [
  45583. renderSlot(_ctx.$slots, "append")
  45584. ], 2)) : createCommentVNode("v-if", true)
  45585. ]),
  45586. _: 3
  45587. }, 8, ["view-style", "wrap-style", "always"])
  45588. ], 2),
  45589. _ctx.showSummary ? withDirectives((openBlock(), createElementBlock("div", {
  45590. key: 1,
  45591. ref: "footerWrapper",
  45592. class: normalizeClass(_ctx.ns.e("footer-wrapper"))
  45593. }, [
  45594. createVNode(_component_table_footer, {
  45595. border: _ctx.border,
  45596. "default-sort": _ctx.defaultSort,
  45597. store: _ctx.store,
  45598. style: normalizeStyle(_ctx.tableBodyStyles),
  45599. "sum-text": _ctx.computedSumText,
  45600. "summary-method": _ctx.summaryMethod
  45601. }, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])
  45602. ], 2)), [
  45603. [vShow, !_ctx.isEmpty],
  45604. [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]
  45605. ]) : createCommentVNode("v-if", true),
  45606. _ctx.border || _ctx.isGroup ? (openBlock(), createElementBlock("div", {
  45607. key: 2,
  45608. class: normalizeClass(_ctx.ns.e("border-left-patch"))
  45609. }, null, 2)) : createCommentVNode("v-if", true)
  45610. ], 6),
  45611. withDirectives(createBaseVNode("div", {
  45612. ref: "resizeProxy",
  45613. class: normalizeClass(_ctx.ns.e("column-resize-proxy"))
  45614. }, null, 2), [
  45615. [vShow, _ctx.resizeProxyVisible]
  45616. ])
  45617. ], 46, _hoisted_160);
  45618. }
  45619. var Table = _export_sfc(_sfc_main121, [["render", _sfc_render32], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);
  45620. // node_modules/element-plus/es/components/table/src/config.mjs
  45621. var defaultClassNames = {
  45622. selection: "table-column--selection",
  45623. expand: "table__expand-column"
  45624. };
  45625. var cellStarts = {
  45626. default: {
  45627. order: ""
  45628. },
  45629. selection: {
  45630. width: 48,
  45631. minWidth: 48,
  45632. realWidth: 48,
  45633. order: ""
  45634. },
  45635. expand: {
  45636. width: 48,
  45637. minWidth: 48,
  45638. realWidth: 48,
  45639. order: ""
  45640. },
  45641. index: {
  45642. width: 48,
  45643. minWidth: 48,
  45644. realWidth: 48,
  45645. order: ""
  45646. }
  45647. };
  45648. var getDefaultClassName = (type4) => {
  45649. return defaultClassNames[type4] || "";
  45650. };
  45651. var cellForced = {
  45652. selection: {
  45653. renderHeader({ store }) {
  45654. function isDisabled() {
  45655. return store.states.data.value && store.states.data.value.length === 0;
  45656. }
  45657. return h(ElCheckbox, {
  45658. disabled: isDisabled(),
  45659. size: store.states.tableSize.value,
  45660. indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
  45661. "onUpdate:modelValue": store.toggleAllSelection,
  45662. modelValue: store.states.isAllSelected.value
  45663. });
  45664. },
  45665. renderCell({
  45666. row,
  45667. column: column2,
  45668. store,
  45669. $index
  45670. }) {
  45671. return h(ElCheckbox, {
  45672. disabled: column2.selectable ? !column2.selectable.call(null, row, $index) : false,
  45673. size: store.states.tableSize.value,
  45674. onChange: () => {
  45675. store.commit("rowSelectedChanged", row);
  45676. },
  45677. onClick: (event) => event.stopPropagation(),
  45678. modelValue: store.isSelected(row)
  45679. });
  45680. },
  45681. sortable: false,
  45682. resizable: false
  45683. },
  45684. index: {
  45685. renderHeader({ column: column2 }) {
  45686. return column2.label || "#";
  45687. },
  45688. renderCell({
  45689. column: column2,
  45690. $index
  45691. }) {
  45692. let i = $index + 1;
  45693. const index = column2.index;
  45694. if (typeof index === "number") {
  45695. i = $index + index;
  45696. } else if (typeof index === "function") {
  45697. i = index($index);
  45698. }
  45699. return h("div", {}, [i]);
  45700. },
  45701. sortable: false
  45702. },
  45703. expand: {
  45704. renderHeader({ column: column2 }) {
  45705. return column2.label || "";
  45706. },
  45707. renderCell({
  45708. row,
  45709. store,
  45710. expanded
  45711. }) {
  45712. const { ns: ns2 } = store;
  45713. const classes = [ns2.e("expand-icon")];
  45714. if (expanded) {
  45715. classes.push(ns2.em("expand-icon", "expanded"));
  45716. }
  45717. const callback = function(e) {
  45718. e.stopPropagation();
  45719. store.toggleRowExpansion(row);
  45720. };
  45721. return h("div", {
  45722. class: classes,
  45723. onClick: callback
  45724. }, {
  45725. default: () => {
  45726. return [
  45727. h(ElIcon, null, {
  45728. default: () => {
  45729. return [h(arrow_right_default)];
  45730. }
  45731. })
  45732. ];
  45733. }
  45734. });
  45735. },
  45736. sortable: false,
  45737. resizable: false
  45738. }
  45739. };
  45740. function defaultRenderCell({
  45741. row,
  45742. column: column2,
  45743. $index
  45744. }) {
  45745. var _a2;
  45746. const property2 = column2.property;
  45747. const value = property2 && getProp(row, property2).value;
  45748. if (column2 && column2.formatter) {
  45749. return column2.formatter(row, column2, value, $index);
  45750. }
  45751. return ((_a2 = value == null ? void 0 : value.toString) == null ? void 0 : _a2.call(value)) || "";
  45752. }
  45753. function treeCellPrefix({
  45754. row,
  45755. treeNode,
  45756. store
  45757. }, createPlacehoder = false) {
  45758. const { ns: ns2 } = store;
  45759. if (!treeNode) {
  45760. if (createPlacehoder) {
  45761. return [
  45762. h("span", {
  45763. class: ns2.e("placeholder")
  45764. })
  45765. ];
  45766. }
  45767. return null;
  45768. }
  45769. const ele = [];
  45770. const callback = function(e) {
  45771. e.stopPropagation();
  45772. if (treeNode.loading) {
  45773. return;
  45774. }
  45775. store.loadOrToggle(row);
  45776. };
  45777. if (treeNode.indent) {
  45778. ele.push(h("span", {
  45779. class: ns2.e("indent"),
  45780. style: { "padding-left": `${treeNode.indent}px` }
  45781. }));
  45782. }
  45783. if (typeof treeNode.expanded === "boolean" && !treeNode.noLazyChildren) {
  45784. const expandClasses = [
  45785. ns2.e("expand-icon"),
  45786. treeNode.expanded ? ns2.em("expand-icon", "expanded") : ""
  45787. ];
  45788. let icon = arrow_right_default;
  45789. if (treeNode.loading) {
  45790. icon = loading_default;
  45791. }
  45792. ele.push(h("div", {
  45793. class: expandClasses,
  45794. onClick: callback
  45795. }, {
  45796. default: () => {
  45797. return [
  45798. h(ElIcon, { class: { [ns2.is("loading")]: treeNode.loading } }, {
  45799. default: () => [h(icon)]
  45800. })
  45801. ];
  45802. }
  45803. }));
  45804. } else {
  45805. ele.push(h("span", {
  45806. class: ns2.e("placeholder")
  45807. }));
  45808. }
  45809. return ele;
  45810. }
  45811. // node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs
  45812. function getAllAliases(props, aliases) {
  45813. return props.reduce((prev, cur) => {
  45814. prev[cur] = cur;
  45815. return prev;
  45816. }, aliases);
  45817. }
  45818. function useWatcher2(owner, props_) {
  45819. const instance = getCurrentInstance();
  45820. const registerComplexWatchers = () => {
  45821. const props = ["fixed"];
  45822. const aliases = {
  45823. realWidth: "width",
  45824. realMinWidth: "minWidth"
  45825. };
  45826. const allAliases = getAllAliases(props, aliases);
  45827. Object.keys(allAliases).forEach((key) => {
  45828. const columnKey = aliases[key];
  45829. if (hasOwn(props_, columnKey)) {
  45830. watch(() => props_[columnKey], (newVal) => {
  45831. let value = newVal;
  45832. if (columnKey === "width" && key === "realWidth") {
  45833. value = parseWidth(newVal);
  45834. }
  45835. if (columnKey === "minWidth" && key === "realMinWidth") {
  45836. value = parseMinWidth(newVal);
  45837. }
  45838. instance.columnConfig.value[columnKey] = value;
  45839. instance.columnConfig.value[key] = value;
  45840. const updateColumns = columnKey === "fixed";
  45841. owner.value.store.scheduleLayout(updateColumns);
  45842. });
  45843. }
  45844. });
  45845. };
  45846. const registerNormalWatchers = () => {
  45847. const props = [
  45848. "label",
  45849. "filters",
  45850. "filterMultiple",
  45851. "sortable",
  45852. "index",
  45853. "formatter",
  45854. "className",
  45855. "labelClassName",
  45856. "showOverflowTooltip"
  45857. ];
  45858. const aliases = {
  45859. property: "prop",
  45860. align: "realAlign",
  45861. headerAlign: "realHeaderAlign"
  45862. };
  45863. const allAliases = getAllAliases(props, aliases);
  45864. Object.keys(allAliases).forEach((key) => {
  45865. const columnKey = aliases[key];
  45866. if (hasOwn(props_, columnKey)) {
  45867. watch(() => props_[columnKey], (newVal) => {
  45868. instance.columnConfig.value[key] = newVal;
  45869. });
  45870. }
  45871. });
  45872. };
  45873. return {
  45874. registerComplexWatchers,
  45875. registerNormalWatchers
  45876. };
  45877. }
  45878. // node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs
  45879. function useRender2(props, slots, owner) {
  45880. const instance = getCurrentInstance();
  45881. const columnId = ref("");
  45882. const isSubColumn = ref(false);
  45883. const realAlign = ref();
  45884. const realHeaderAlign = ref();
  45885. const ns2 = useNamespace("table");
  45886. watchEffect(() => {
  45887. realAlign.value = props.align ? `is-${props.align}` : null;
  45888. realAlign.value;
  45889. });
  45890. watchEffect(() => {
  45891. realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value;
  45892. realHeaderAlign.value;
  45893. });
  45894. const columnOrTableParent = computed2(() => {
  45895. let parent2 = instance.vnode.vParent || instance.parent;
  45896. while (parent2 && !parent2.tableId && !parent2.columnId) {
  45897. parent2 = parent2.vnode.vParent || parent2.parent;
  45898. }
  45899. return parent2;
  45900. });
  45901. const hasTreeColumn = computed2(() => {
  45902. const { store } = instance.parent;
  45903. if (!store)
  45904. return false;
  45905. const { treeData } = store.states;
  45906. const treeDataValue = treeData.value;
  45907. return treeDataValue && Object.keys(treeDataValue).length > 0;
  45908. });
  45909. const realWidth = ref(parseWidth(props.width));
  45910. const realMinWidth = ref(parseMinWidth(props.minWidth));
  45911. const setColumnWidth = (column2) => {
  45912. if (realWidth.value)
  45913. column2.width = realWidth.value;
  45914. if (realMinWidth.value) {
  45915. column2.minWidth = realMinWidth.value;
  45916. }
  45917. if (!realWidth.value && realMinWidth.value) {
  45918. column2.width = void 0;
  45919. }
  45920. if (!column2.minWidth) {
  45921. column2.minWidth = 80;
  45922. }
  45923. column2.realWidth = Number(column2.width === void 0 ? column2.minWidth : column2.width);
  45924. return column2;
  45925. };
  45926. const setColumnForcedProps = (column2) => {
  45927. const type4 = column2.type;
  45928. const source = cellForced[type4] || {};
  45929. Object.keys(source).forEach((prop) => {
  45930. const value = source[prop];
  45931. if (prop !== "className" && value !== void 0) {
  45932. column2[prop] = value;
  45933. }
  45934. });
  45935. const className = getDefaultClassName(type4);
  45936. if (className) {
  45937. const forceClass = `${unref(ns2.namespace)}-${className}`;
  45938. column2.className = column2.className ? `${column2.className} ${forceClass}` : forceClass;
  45939. }
  45940. return column2;
  45941. };
  45942. const checkSubColumn = (children) => {
  45943. if (Array.isArray(children)) {
  45944. children.forEach((child) => check(child));
  45945. } else {
  45946. check(children);
  45947. }
  45948. function check(item) {
  45949. var _a2;
  45950. if (((_a2 = item == null ? void 0 : item.type) == null ? void 0 : _a2.name) === "ElTableColumn") {
  45951. item.vParent = instance;
  45952. }
  45953. }
  45954. };
  45955. const setColumnRenders = (column2) => {
  45956. if (props.renderHeader) {
  45957. debugWarn("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.");
  45958. } else if (column2.type !== "selection") {
  45959. column2.renderHeader = (scope) => {
  45960. instance.columnConfig.value["label"];
  45961. const renderHeader = slots.header;
  45962. return renderHeader ? renderHeader(scope) : column2.label;
  45963. };
  45964. }
  45965. let originRenderCell = column2.renderCell;
  45966. if (column2.type === "expand") {
  45967. column2.renderCell = (data) => h("div", {
  45968. class: "cell"
  45969. }, [originRenderCell(data)]);
  45970. owner.value.renderExpanded = (data) => {
  45971. return slots.default ? slots.default(data) : slots.default;
  45972. };
  45973. } else {
  45974. originRenderCell = originRenderCell || defaultRenderCell;
  45975. column2.renderCell = (data) => {
  45976. let children = null;
  45977. if (slots.default) {
  45978. const vnodes = slots.default(data);
  45979. children = vnodes.some((v2) => v2.type !== Comment) ? vnodes : originRenderCell(data);
  45980. } else {
  45981. children = originRenderCell(data);
  45982. }
  45983. const shouldCreatePlaceholder = hasTreeColumn.value && data.cellIndex === 0 && data.column.type !== "selection";
  45984. const prefix = treeCellPrefix(data, shouldCreatePlaceholder);
  45985. const props2 = {
  45986. class: "cell",
  45987. style: {}
  45988. };
  45989. if (column2.showOverflowTooltip) {
  45990. props2.class = `${props2.class} ${unref(ns2.namespace)}-tooltip`;
  45991. props2.style = {
  45992. width: `${(data.column.realWidth || Number(data.column.width)) - 1}px`
  45993. };
  45994. }
  45995. checkSubColumn(children);
  45996. return h("div", props2, [prefix, children]);
  45997. };
  45998. }
  45999. return column2;
  46000. };
  46001. const getPropsData = (...propsKey) => {
  46002. return propsKey.reduce((prev, cur) => {
  46003. if (Array.isArray(cur)) {
  46004. cur.forEach((key) => {
  46005. prev[key] = props[key];
  46006. });
  46007. }
  46008. return prev;
  46009. }, {});
  46010. };
  46011. const getColumnElIndex = (children, child) => {
  46012. return Array.prototype.indexOf.call(children, child);
  46013. };
  46014. return {
  46015. columnId,
  46016. realAlign,
  46017. isSubColumn,
  46018. realHeaderAlign,
  46019. columnOrTableParent,
  46020. setColumnWidth,
  46021. setColumnForcedProps,
  46022. setColumnRenders,
  46023. getPropsData,
  46024. getColumnElIndex
  46025. };
  46026. }
  46027. // node_modules/element-plus/es/components/table/src/table-column/defaults.mjs
  46028. var defaultProps3 = {
  46029. type: {
  46030. type: String,
  46031. default: "default"
  46032. },
  46033. label: String,
  46034. className: String,
  46035. labelClassName: String,
  46036. property: String,
  46037. prop: String,
  46038. width: {
  46039. type: [String, Number],
  46040. default: ""
  46041. },
  46042. minWidth: {
  46043. type: [String, Number],
  46044. default: ""
  46045. },
  46046. renderHeader: Function,
  46047. sortable: {
  46048. type: [Boolean, String],
  46049. default: false
  46050. },
  46051. sortMethod: Function,
  46052. sortBy: [String, Function, Array],
  46053. resizable: {
  46054. type: Boolean,
  46055. default: true
  46056. },
  46057. columnKey: String,
  46058. align: String,
  46059. headerAlign: String,
  46060. showTooltipWhenOverflow: Boolean,
  46061. showOverflowTooltip: Boolean,
  46062. fixed: [Boolean, String],
  46063. formatter: Function,
  46064. selectable: Function,
  46065. reserveSelection: Boolean,
  46066. filterMethod: Function,
  46067. filteredValue: Array,
  46068. filters: Array,
  46069. filterPlacement: String,
  46070. filterMultiple: {
  46071. type: Boolean,
  46072. default: true
  46073. },
  46074. index: [Number, Function],
  46075. sortOrders: {
  46076. type: Array,
  46077. default: () => {
  46078. return ["ascending", "descending", null];
  46079. },
  46080. validator: (val) => {
  46081. return val.every((order) => ["ascending", "descending", null].includes(order));
  46082. }
  46083. }
  46084. };
  46085. // node_modules/element-plus/es/components/table/src/table-column/index.mjs
  46086. var columnIdSeed = 1;
  46087. var ElTableColumn = defineComponent({
  46088. name: "ElTableColumn",
  46089. components: {
  46090. ElCheckbox
  46091. },
  46092. props: defaultProps3,
  46093. setup(props, { slots }) {
  46094. const instance = getCurrentInstance();
  46095. const columnConfig = ref({});
  46096. const owner = computed2(() => {
  46097. let parent22 = instance.parent;
  46098. while (parent22 && !parent22.tableId) {
  46099. parent22 = parent22.parent;
  46100. }
  46101. return parent22;
  46102. });
  46103. const { registerNormalWatchers, registerComplexWatchers } = useWatcher2(owner, props);
  46104. const {
  46105. columnId,
  46106. isSubColumn,
  46107. realHeaderAlign,
  46108. columnOrTableParent,
  46109. setColumnWidth,
  46110. setColumnForcedProps,
  46111. setColumnRenders,
  46112. getPropsData,
  46113. getColumnElIndex,
  46114. realAlign
  46115. } = useRender2(props, slots, owner);
  46116. const parent2 = columnOrTableParent.value;
  46117. columnId.value = `${parent2.tableId || parent2.columnId}_column_${columnIdSeed++}`;
  46118. onBeforeMount(() => {
  46119. isSubColumn.value = owner.value !== parent2;
  46120. const type4 = props.type || "default";
  46121. const sortable = props.sortable === "" ? true : props.sortable;
  46122. const defaults2 = {
  46123. ...cellStarts[type4],
  46124. id: columnId.value,
  46125. type: type4,
  46126. property: props.prop || props.property,
  46127. align: realAlign,
  46128. headerAlign: realHeaderAlign,
  46129. showOverflowTooltip: props.showOverflowTooltip || props.showTooltipWhenOverflow,
  46130. filterable: props.filters || props.filterMethod,
  46131. filteredValue: [],
  46132. filterPlacement: "",
  46133. isColumnGroup: false,
  46134. isSubColumn: false,
  46135. filterOpened: false,
  46136. sortable,
  46137. index: props.index,
  46138. rawColumnKey: instance.vnode.key
  46139. };
  46140. const basicProps = [
  46141. "columnKey",
  46142. "label",
  46143. "className",
  46144. "labelClassName",
  46145. "type",
  46146. "renderHeader",
  46147. "formatter",
  46148. "fixed",
  46149. "resizable"
  46150. ];
  46151. const sortProps = ["sortMethod", "sortBy", "sortOrders"];
  46152. const selectProps = ["selectable", "reserveSelection"];
  46153. const filterProps = [
  46154. "filterMethod",
  46155. "filters",
  46156. "filterMultiple",
  46157. "filterOpened",
  46158. "filteredValue",
  46159. "filterPlacement"
  46160. ];
  46161. let column2 = getPropsData(basicProps, sortProps, selectProps, filterProps);
  46162. column2 = mergeOptions(defaults2, column2);
  46163. const chains = compose(setColumnRenders, setColumnWidth, setColumnForcedProps);
  46164. column2 = chains(column2);
  46165. columnConfig.value = column2;
  46166. registerNormalWatchers();
  46167. registerComplexWatchers();
  46168. });
  46169. onMounted(() => {
  46170. var _a2;
  46171. const parent22 = columnOrTableParent.value;
  46172. const children = isSubColumn.value ? parent22.vnode.el.children : (_a2 = parent22.refs.hiddenColumns) == null ? void 0 : _a2.children;
  46173. const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);
  46174. columnConfig.value.getColumnIndex = getColumnIndex;
  46175. const columnIndex = getColumnIndex();
  46176. columnIndex > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? parent22.columnConfig.value : null);
  46177. });
  46178. onBeforeUnmount(() => {
  46179. owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? parent2.columnConfig.value : null);
  46180. });
  46181. instance.columnId = columnId.value;
  46182. instance.columnConfig = columnConfig;
  46183. return;
  46184. },
  46185. render() {
  46186. var _a2, _b, _c;
  46187. try {
  46188. const renderDefault = (_b = (_a2 = this.$slots).default) == null ? void 0 : _b.call(_a2, {
  46189. row: {},
  46190. column: {},
  46191. $index: -1
  46192. });
  46193. const children = [];
  46194. if (Array.isArray(renderDefault)) {
  46195. for (const childNode of renderDefault) {
  46196. if (((_c = childNode.type) == null ? void 0 : _c.name) === "ElTableColumn" || childNode.shapeFlag & 2) {
  46197. children.push(childNode);
  46198. } else if (childNode.type === Fragment && Array.isArray(childNode.children)) {
  46199. childNode.children.forEach((vnode2) => {
  46200. if ((vnode2 == null ? void 0 : vnode2.patchFlag) !== 1024 && !isString(vnode2 == null ? void 0 : vnode2.children)) {
  46201. children.push(vnode2);
  46202. }
  46203. });
  46204. }
  46205. }
  46206. }
  46207. const vnode = h("div", children);
  46208. return vnode;
  46209. } catch (e) {
  46210. return h("div", []);
  46211. }
  46212. }
  46213. });
  46214. // node_modules/element-plus/es/components/table/index.mjs
  46215. var ElTable = withInstall(Table, {
  46216. TableColumn: ElTableColumn
  46217. });
  46218. var ElTableColumn2 = withNoopInstall(ElTableColumn);
  46219. // node_modules/element-plus/es/components/table-v2/src/constants.mjs
  46220. var SortOrder = ((SortOrder2) => {
  46221. SortOrder2["ASC"] = "asc";
  46222. SortOrder2["DESC"] = "desc";
  46223. return SortOrder2;
  46224. })(SortOrder || {});
  46225. var Alignment = ((Alignment2) => {
  46226. Alignment2["CENTER"] = "center";
  46227. Alignment2["RIGHT"] = "right";
  46228. return Alignment2;
  46229. })(Alignment || {});
  46230. var FixedDir = ((FixedDir2) => {
  46231. FixedDir2["LEFT"] = "left";
  46232. FixedDir2["RIGHT"] = "right";
  46233. return FixedDir2;
  46234. })(FixedDir || {});
  46235. var oppositeOrderMap = {
  46236. ["asc"]: "desc",
  46237. ["desc"]: "asc"
  46238. };
  46239. // node_modules/element-plus/es/components/table-v2/src/private.mjs
  46240. var placeholderSign = Symbol("placeholder");
  46241. // node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs
  46242. var calcColumnStyle = (column2, fixedColumn, fixed) => {
  46243. var _a2;
  46244. const flex = {
  46245. flexGrow: 0,
  46246. flexShrink: 0,
  46247. ...fixed ? {} : {
  46248. flexGrow: column2.flexGrow || 0,
  46249. flexShrink: column2.flexShrink || 1
  46250. }
  46251. };
  46252. if (!fixed) {
  46253. flex.flexShrink = 1;
  46254. }
  46255. const style = {
  46256. ...(_a2 = column2.style) != null ? _a2 : {},
  46257. ...flex,
  46258. flexBasis: "auto",
  46259. width: column2.width
  46260. };
  46261. if (!fixedColumn) {
  46262. if (column2.maxWidth)
  46263. style.maxWidth = column2.maxWidth;
  46264. if (column2.minWidth)
  46265. style.minWidth = column2.minWidth;
  46266. }
  46267. return style;
  46268. };
  46269. // node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs
  46270. function useColumns(props, columns2, fixed) {
  46271. const visibleColumns = computed2(() => {
  46272. return unref(columns2).filter((column2) => !column2.hidden);
  46273. });
  46274. const fixedColumnsOnLeft = computed2(() => unref(visibleColumns).filter((column2) => column2.fixed === "left" || column2.fixed === true));
  46275. const fixedColumnsOnRight = computed2(() => unref(visibleColumns).filter((column2) => column2.fixed === "right"));
  46276. const normalColumns = computed2(() => unref(visibleColumns).filter((column2) => !column2.fixed));
  46277. const mainColumns = computed2(() => {
  46278. const ret = [];
  46279. unref(fixedColumnsOnLeft).forEach((column2) => {
  46280. ret.push({
  46281. ...column2,
  46282. placeholderSign
  46283. });
  46284. });
  46285. unref(normalColumns).forEach((column2) => {
  46286. ret.push(column2);
  46287. });
  46288. unref(fixedColumnsOnRight).forEach((column2) => {
  46289. ret.push({
  46290. ...column2,
  46291. placeholderSign
  46292. });
  46293. });
  46294. return ret;
  46295. });
  46296. const hasFixedColumns = computed2(() => {
  46297. return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length;
  46298. });
  46299. const columnsStyles = computed2(() => {
  46300. const _columns = unref(columns2);
  46301. return _columns.reduce((style, column2) => {
  46302. style[column2.key] = calcColumnStyle(column2, unref(fixed), props.fixed);
  46303. return style;
  46304. }, {});
  46305. });
  46306. const columnsTotalWidth = computed2(() => {
  46307. return unref(visibleColumns).reduce((width, column2) => width + column2.width, 0);
  46308. });
  46309. const getColumn = (key) => {
  46310. return unref(columns2).find((column2) => column2.key === key);
  46311. };
  46312. const getColumnStyle = (key) => {
  46313. return unref(columnsStyles)[key];
  46314. };
  46315. const updateColumnWidth = (column2, width) => {
  46316. column2.width = width;
  46317. };
  46318. function onColumnSorted(e) {
  46319. var _a2;
  46320. const { key } = e.currentTarget.dataset;
  46321. if (!key)
  46322. return;
  46323. const { sortState, sortBy: sortBy2 } = props;
  46324. let order = SortOrder.ASC;
  46325. if (isObject(sortState)) {
  46326. order = oppositeOrderMap[sortState[key]];
  46327. } else {
  46328. order = oppositeOrderMap[sortBy2.order];
  46329. }
  46330. (_a2 = props.onColumnSort) == null ? void 0 : _a2.call(props, { column: getColumn(key), key, order });
  46331. }
  46332. return {
  46333. columns: columns2,
  46334. columnsStyles,
  46335. columnsTotalWidth,
  46336. fixedColumnsOnLeft,
  46337. fixedColumnsOnRight,
  46338. hasFixedColumns,
  46339. mainColumns,
  46340. normalColumns,
  46341. visibleColumns,
  46342. getColumn,
  46343. getColumnStyle,
  46344. updateColumnWidth,
  46345. onColumnSorted
  46346. };
  46347. }
  46348. // node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs
  46349. var useScrollbar2 = (props, {
  46350. mainTableRef,
  46351. leftTableRef,
  46352. rightTableRef,
  46353. onMaybeEndReached
  46354. }) => {
  46355. const scrollPos = ref({ scrollLeft: 0, scrollTop: 0 });
  46356. function doScroll(params) {
  46357. var _a2, _b, _c;
  46358. const { scrollTop } = params;
  46359. (_a2 = mainTableRef.value) == null ? void 0 : _a2.scrollTo(params);
  46360. (_b = leftTableRef.value) == null ? void 0 : _b.scrollToTop(scrollTop);
  46361. (_c = rightTableRef.value) == null ? void 0 : _c.scrollToTop(scrollTop);
  46362. }
  46363. function scrollTo(params) {
  46364. scrollPos.value = params;
  46365. doScroll(params);
  46366. }
  46367. function scrollToTop(scrollTop) {
  46368. scrollPos.value.scrollTop = scrollTop;
  46369. doScroll(unref(scrollPos));
  46370. }
  46371. function scrollToLeft(scrollLeft) {
  46372. var _a2, _b;
  46373. scrollPos.value.scrollLeft = scrollLeft;
  46374. (_b = (_a2 = mainTableRef.value) == null ? void 0 : _a2.scrollTo) == null ? void 0 : _b.call(_a2, unref(scrollPos));
  46375. }
  46376. function onScroll(params) {
  46377. var _a2;
  46378. scrollTo(params);
  46379. (_a2 = props.onScroll) == null ? void 0 : _a2.call(props, params);
  46380. }
  46381. function onVerticalScroll({ scrollTop }) {
  46382. const { scrollTop: currentScrollTop } = unref(scrollPos);
  46383. if (scrollTop !== currentScrollTop)
  46384. scrollToTop(scrollTop);
  46385. }
  46386. function scrollToRow(row, strategy = "auto") {
  46387. var _a2;
  46388. (_a2 = mainTableRef.value) == null ? void 0 : _a2.scrollToRow(row, strategy);
  46389. }
  46390. watch(() => unref(scrollPos).scrollTop, (cur, prev) => {
  46391. if (cur > prev)
  46392. onMaybeEndReached();
  46393. });
  46394. return {
  46395. scrollPos,
  46396. scrollTo,
  46397. scrollToLeft,
  46398. scrollToTop,
  46399. scrollToRow,
  46400. onScroll,
  46401. onVerticalScroll
  46402. };
  46403. };
  46404. // node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs
  46405. var useRow = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => {
  46406. const vm = getCurrentInstance();
  46407. const { emit } = vm;
  46408. const isResetting = shallowRef(false);
  46409. const hoveringRowKey = shallowRef(null);
  46410. const expandedRowKeys = ref(props.defaultExpandedRowKeys || []);
  46411. const lastRenderedRowIndex = ref(-1);
  46412. const resetIndex = shallowRef(null);
  46413. const rowHeights = ref({});
  46414. const pendingRowHeights = ref({});
  46415. const leftTableHeights = shallowRef({});
  46416. const mainTableHeights = shallowRef({});
  46417. const rightTableHeights = shallowRef({});
  46418. const isDynamic = computed2(() => isNumber2(props.estimatedRowHeight));
  46419. function onRowsRendered(params) {
  46420. var _a2;
  46421. (_a2 = props.onRowsRendered) == null ? void 0 : _a2.call(props, params);
  46422. if (params.rowCacheEnd > unref(lastRenderedRowIndex)) {
  46423. lastRenderedRowIndex.value = params.rowCacheEnd;
  46424. }
  46425. }
  46426. function onRowHovered({ hovered, rowKey: rowKey2 }) {
  46427. hoveringRowKey.value = hovered ? rowKey2 : null;
  46428. }
  46429. function onRowExpanded({
  46430. expanded,
  46431. rowData,
  46432. rowIndex,
  46433. rowKey: rowKey2
  46434. }) {
  46435. var _a2, _b;
  46436. const _expandedRowKeys = [...unref(expandedRowKeys)];
  46437. const currentKeyIndex = _expandedRowKeys.indexOf(rowKey2);
  46438. if (expanded) {
  46439. if (currentKeyIndex === -1)
  46440. _expandedRowKeys.push(rowKey2);
  46441. } else {
  46442. if (currentKeyIndex > -1)
  46443. _expandedRowKeys.splice(currentKeyIndex, 1);
  46444. }
  46445. expandedRowKeys.value = _expandedRowKeys;
  46446. emit("update:expandedRowKeys", _expandedRowKeys);
  46447. (_a2 = props.onRowExpand) == null ? void 0 : _a2.call(props, {
  46448. expanded,
  46449. rowData,
  46450. rowIndex,
  46451. rowKey: rowKey2
  46452. });
  46453. (_b = props.onExpandedRowsChange) == null ? void 0 : _b.call(props, _expandedRowKeys);
  46454. }
  46455. const flushingRowHeights = debounce_default(() => {
  46456. var _a2, _b, _c, _d;
  46457. isResetting.value = true;
  46458. rowHeights.value = { ...unref(rowHeights), ...unref(pendingRowHeights) };
  46459. resetAfterIndex(unref(resetIndex), false);
  46460. pendingRowHeights.value = {};
  46461. resetIndex.value = null;
  46462. (_a2 = mainTableRef.value) == null ? void 0 : _a2.forceUpdate();
  46463. (_b = leftTableRef.value) == null ? void 0 : _b.forceUpdate();
  46464. (_c = rightTableRef.value) == null ? void 0 : _c.forceUpdate();
  46465. (_d = vm.proxy) == null ? void 0 : _d.$forceUpdate();
  46466. isResetting.value = false;
  46467. }, 0);
  46468. function resetAfterIndex(index, forceUpdate = false) {
  46469. if (!unref(isDynamic))
  46470. return;
  46471. [mainTableRef, leftTableRef, rightTableRef].forEach((tableRef) => {
  46472. const table = unref(tableRef);
  46473. if (table)
  46474. table.resetAfterRowIndex(index, forceUpdate);
  46475. });
  46476. }
  46477. function resetHeights(rowKey2, height, rowIdx) {
  46478. const resetIdx = unref(resetIndex);
  46479. if (resetIdx === null) {
  46480. resetIndex.value = rowIdx;
  46481. } else {
  46482. if (resetIdx > rowIdx) {
  46483. resetIndex.value = rowIdx;
  46484. }
  46485. }
  46486. pendingRowHeights.value[rowKey2] = height;
  46487. }
  46488. function onRowHeightChange({ rowKey: rowKey2, height, rowIndex }, fixedDir) {
  46489. if (!fixedDir) {
  46490. mainTableHeights.value[rowKey2] = height;
  46491. } else {
  46492. if (fixedDir === FixedDir.RIGHT) {
  46493. rightTableHeights.value[rowKey2] = height;
  46494. } else {
  46495. leftTableHeights.value[rowKey2] = height;
  46496. }
  46497. }
  46498. const maximumHeight = Math.max(...[leftTableHeights, rightTableHeights, mainTableHeights].map((records) => records.value[rowKey2] || 0));
  46499. if (unref(rowHeights)[rowKey2] !== maximumHeight) {
  46500. resetHeights(rowKey2, maximumHeight, rowIndex);
  46501. flushingRowHeights();
  46502. }
  46503. }
  46504. watch(lastRenderedRowIndex, () => onMaybeEndReached());
  46505. return {
  46506. hoveringRowKey,
  46507. expandedRowKeys,
  46508. lastRenderedRowIndex,
  46509. isDynamic,
  46510. isResetting,
  46511. rowHeights,
  46512. resetAfterIndex,
  46513. onRowExpanded,
  46514. onRowHovered,
  46515. onRowsRendered,
  46516. onRowHeightChange
  46517. };
  46518. };
  46519. // node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs
  46520. var useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => {
  46521. const depthMap = ref({});
  46522. const flattenedData = computed2(() => {
  46523. const depths = {};
  46524. const { data: data2, rowKey: rowKey2 } = props;
  46525. const _expandedRowKeys = unref(expandedRowKeys);
  46526. if (!_expandedRowKeys || !_expandedRowKeys.length)
  46527. return data2;
  46528. const array4 = [];
  46529. const keysSet = /* @__PURE__ */ new Set();
  46530. _expandedRowKeys.forEach((x2) => keysSet.add(x2));
  46531. let copy = data2.slice();
  46532. copy.forEach((x2) => depths[x2[rowKey2]] = 0);
  46533. while (copy.length > 0) {
  46534. const item = copy.shift();
  46535. array4.push(item);
  46536. if (keysSet.has(item[rowKey2]) && Array.isArray(item.children) && item.children.length > 0) {
  46537. copy = [...item.children, ...copy];
  46538. item.children.forEach((child) => depths[child[rowKey2]] = depths[item[rowKey2]] + 1);
  46539. }
  46540. }
  46541. depthMap.value = depths;
  46542. return array4;
  46543. });
  46544. const data = computed2(() => {
  46545. const { data: data2, expandColumnKey: expandColumnKey2 } = props;
  46546. return expandColumnKey2 ? unref(flattenedData) : data2;
  46547. });
  46548. watch(data, (val, prev) => {
  46549. if (val !== prev) {
  46550. lastRenderedRowIndex.value = -1;
  46551. resetAfterIndex(0, true);
  46552. }
  46553. });
  46554. return {
  46555. data,
  46556. depthMap
  46557. };
  46558. };
  46559. // node_modules/element-plus/es/components/table-v2/src/utils.mjs
  46560. var sumReducer = (sum22, num) => sum22 + num;
  46561. var sum2 = (listLike) => {
  46562. return isArray(listLike) ? listLike.reduce(sumReducer, 0) : listLike;
  46563. };
  46564. var tryCall = (fLike, params, defaultRet = {}) => {
  46565. return isFunction(fLike) ? fLike(params) : fLike != null ? fLike : defaultRet;
  46566. };
  46567. var enforceUnit = (style) => {
  46568. ;
  46569. ["width", "maxWidth", "minWidth", "height"].forEach((key) => {
  46570. style[key] = addUnit(style[key]);
  46571. });
  46572. return style;
  46573. };
  46574. var componentToSlot = (ComponentLike) => isVNode(ComponentLike) ? (props) => h(ComponentLike, props) : ComponentLike;
  46575. // node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs
  46576. var useStyles2 = (props, {
  46577. columnsTotalWidth,
  46578. data,
  46579. fixedColumnsOnLeft,
  46580. fixedColumnsOnRight
  46581. }) => {
  46582. const bodyWidth = computed2(() => {
  46583. const { fixed, width, vScrollbarSize } = props;
  46584. const ret = width - vScrollbarSize;
  46585. return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret;
  46586. });
  46587. const headerWidth = computed2(() => unref(bodyWidth) + (props.fixed ? props.vScrollbarSize : 0));
  46588. const mainTableHeight = computed2(() => {
  46589. const { height = 0, maxHeight = 0, footerHeight: footerHeight2, hScrollbarSize } = props;
  46590. if (maxHeight > 0) {
  46591. const _fixedRowsHeight = unref(fixedRowsHeight);
  46592. const _rowsHeight = unref(rowsHeight);
  46593. const _headerHeight = unref(headerHeight);
  46594. const total2 = _headerHeight + _fixedRowsHeight + _rowsHeight + hScrollbarSize;
  46595. return Math.min(total2, maxHeight - footerHeight2);
  46596. }
  46597. return height - footerHeight2;
  46598. });
  46599. const rowsHeight = computed2(() => {
  46600. const { rowHeight, estimatedRowHeight } = props;
  46601. const _data = unref(data);
  46602. if (isNumber2(estimatedRowHeight)) {
  46603. return _data.length * estimatedRowHeight;
  46604. }
  46605. return _data.length * rowHeight;
  46606. });
  46607. const fixedTableHeight = computed2(() => {
  46608. const { maxHeight } = props;
  46609. const tableHeight = unref(mainTableHeight);
  46610. if (isNumber2(maxHeight) && maxHeight > 0)
  46611. return tableHeight;
  46612. const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight);
  46613. return Math.min(tableHeight, totalHeight);
  46614. });
  46615. const mapColumn = (column2) => column2.width;
  46616. const leftTableWidth = computed2(() => sum2(unref(fixedColumnsOnLeft).map(mapColumn)));
  46617. const rightTableWidth = computed2(() => sum2(unref(fixedColumnsOnRight).map(mapColumn)));
  46618. const headerHeight = computed2(() => sum2(props.headerHeight));
  46619. const fixedRowsHeight = computed2(() => {
  46620. var _a2;
  46621. return (((_a2 = props.fixedData) == null ? void 0 : _a2.length) || 0) * props.rowHeight;
  46622. });
  46623. const windowHeight = computed2(() => {
  46624. return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight);
  46625. });
  46626. const rootStyle = computed2(() => {
  46627. const { style = {}, height, width } = props;
  46628. return enforceUnit({
  46629. ...style,
  46630. height,
  46631. width
  46632. });
  46633. });
  46634. const footerHeight = computed2(() => enforceUnit({ height: props.footerHeight }));
  46635. const emptyStyle = computed2(() => ({
  46636. top: addUnit(unref(headerHeight)),
  46637. bottom: addUnit(props.footerHeight),
  46638. width: addUnit(props.width)
  46639. }));
  46640. return {
  46641. bodyWidth,
  46642. fixedTableHeight,
  46643. mainTableHeight,
  46644. leftTableWidth,
  46645. rightTableWidth,
  46646. headerWidth,
  46647. rowsHeight,
  46648. windowHeight,
  46649. footerHeight,
  46650. emptyStyle,
  46651. rootStyle,
  46652. headerHeight
  46653. };
  46654. };
  46655. // node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs
  46656. var useAutoResize = (props) => {
  46657. const sizer = ref();
  46658. const width$ = ref(0);
  46659. const height$ = ref(0);
  46660. let resizerStopper;
  46661. onMounted(() => {
  46662. resizerStopper = useResizeObserver(sizer, ([entry]) => {
  46663. const { width, height } = entry.contentRect;
  46664. const { paddingLeft, paddingRight, paddingTop, paddingBottom } = getComputedStyle(entry.target);
  46665. const left2 = Number.parseInt(paddingLeft) || 0;
  46666. const right2 = Number.parseInt(paddingRight) || 0;
  46667. const top = Number.parseInt(paddingTop) || 0;
  46668. const bottom = Number.parseInt(paddingBottom) || 0;
  46669. width$.value = width - left2 - right2;
  46670. height$.value = height - top - bottom;
  46671. }).stop;
  46672. });
  46673. onBeforeUnmount(() => {
  46674. resizerStopper == null ? void 0 : resizerStopper();
  46675. });
  46676. watch([width$, height$], ([width, height]) => {
  46677. var _a2;
  46678. (_a2 = props.onResize) == null ? void 0 : _a2.call(props, {
  46679. width,
  46680. height
  46681. });
  46682. });
  46683. return {
  46684. sizer,
  46685. width: width$,
  46686. height: height$
  46687. };
  46688. };
  46689. // node_modules/element-plus/es/components/table-v2/src/use-table.mjs
  46690. function useTable(props) {
  46691. const mainTableRef = ref();
  46692. const leftTableRef = ref();
  46693. const rightTableRef = ref();
  46694. const {
  46695. columns: columns2,
  46696. columnsStyles,
  46697. columnsTotalWidth,
  46698. fixedColumnsOnLeft,
  46699. fixedColumnsOnRight,
  46700. hasFixedColumns,
  46701. mainColumns,
  46702. onColumnSorted
  46703. } = useColumns(props, toRef(props, "columns"), toRef(props, "fixed"));
  46704. const {
  46705. scrollTo,
  46706. scrollToLeft,
  46707. scrollToTop,
  46708. scrollToRow,
  46709. onScroll,
  46710. onVerticalScroll,
  46711. scrollPos
  46712. } = useScrollbar2(props, {
  46713. mainTableRef,
  46714. leftTableRef,
  46715. rightTableRef,
  46716. onMaybeEndReached
  46717. });
  46718. const {
  46719. expandedRowKeys,
  46720. hoveringRowKey,
  46721. lastRenderedRowIndex,
  46722. isDynamic,
  46723. isResetting,
  46724. rowHeights,
  46725. resetAfterIndex,
  46726. onRowExpanded,
  46727. onRowHeightChange,
  46728. onRowHovered,
  46729. onRowsRendered
  46730. } = useRow(props, {
  46731. mainTableRef,
  46732. leftTableRef,
  46733. rightTableRef,
  46734. onMaybeEndReached
  46735. });
  46736. const { data, depthMap } = useData(props, {
  46737. expandedRowKeys,
  46738. lastRenderedRowIndex,
  46739. resetAfterIndex
  46740. });
  46741. const {
  46742. bodyWidth,
  46743. fixedTableHeight,
  46744. mainTableHeight,
  46745. leftTableWidth,
  46746. rightTableWidth,
  46747. headerWidth,
  46748. rowsHeight,
  46749. windowHeight,
  46750. footerHeight,
  46751. emptyStyle,
  46752. rootStyle,
  46753. headerHeight
  46754. } = useStyles2(props, {
  46755. columnsTotalWidth,
  46756. data,
  46757. fixedColumnsOnLeft,
  46758. fixedColumnsOnRight
  46759. });
  46760. const isScrolling = shallowRef(false);
  46761. const containerRef = ref();
  46762. const showEmpty = computed2(() => {
  46763. const noData = unref(data).length === 0;
  46764. return isArray(props.fixedData) ? props.fixedData.length === 0 && noData : noData;
  46765. });
  46766. function getRowHeight(rowIndex) {
  46767. const { estimatedRowHeight, rowHeight, rowKey: rowKey2 } = props;
  46768. if (!estimatedRowHeight)
  46769. return rowHeight;
  46770. return unref(rowHeights)[unref(data)[rowIndex][rowKey2]] || estimatedRowHeight;
  46771. }
  46772. function onMaybeEndReached() {
  46773. const { onEndReached } = props;
  46774. if (!onEndReached)
  46775. return;
  46776. const { scrollTop } = unref(scrollPos);
  46777. const _totalHeight = unref(rowsHeight);
  46778. const clientHeight = unref(windowHeight);
  46779. const heightUntilEnd = _totalHeight - (scrollTop + clientHeight) + props.hScrollbarSize;
  46780. if (unref(lastRenderedRowIndex) >= 0 && _totalHeight === scrollTop + unref(mainTableHeight) - unref(headerHeight)) {
  46781. onEndReached(heightUntilEnd);
  46782. }
  46783. }
  46784. watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, {
  46785. deep: true
  46786. });
  46787. return {
  46788. columns: columns2,
  46789. containerRef,
  46790. mainTableRef,
  46791. leftTableRef,
  46792. rightTableRef,
  46793. isDynamic,
  46794. isResetting,
  46795. isScrolling,
  46796. hoveringRowKey,
  46797. hasFixedColumns,
  46798. columnsStyles,
  46799. columnsTotalWidth,
  46800. data,
  46801. expandedRowKeys,
  46802. depthMap,
  46803. fixedColumnsOnLeft,
  46804. fixedColumnsOnRight,
  46805. mainColumns,
  46806. bodyWidth,
  46807. emptyStyle,
  46808. rootStyle,
  46809. headerWidth,
  46810. footerHeight,
  46811. mainTableHeight,
  46812. fixedTableHeight,
  46813. leftTableWidth,
  46814. rightTableWidth,
  46815. showEmpty,
  46816. getRowHeight,
  46817. onColumnSorted,
  46818. onRowHovered,
  46819. onRowExpanded,
  46820. onRowsRendered,
  46821. onRowHeightChange,
  46822. scrollTo,
  46823. scrollToLeft,
  46824. scrollToTop,
  46825. scrollToRow,
  46826. onScroll,
  46827. onVerticalScroll
  46828. };
  46829. }
  46830. // node_modules/element-plus/es/components/table-v2/src/tokens.mjs
  46831. var TableV2InjectionKey = Symbol("tableV2");
  46832. // node_modules/element-plus/es/components/table-v2/src/common.mjs
  46833. var classType = String;
  46834. var columns = {
  46835. type: definePropType(Array),
  46836. required: true
  46837. };
  46838. var column = {
  46839. type: definePropType(Object)
  46840. };
  46841. var fixedDataType = {
  46842. type: definePropType(Array)
  46843. };
  46844. var dataType = {
  46845. ...fixedDataType,
  46846. required: true
  46847. };
  46848. var expandColumnKey = String;
  46849. var expandKeys = {
  46850. type: definePropType(Array),
  46851. default: () => mutable([])
  46852. };
  46853. var requiredNumber = {
  46854. type: Number,
  46855. required: true
  46856. };
  46857. var rowKey = {
  46858. type: definePropType([String, Number, Symbol]),
  46859. default: "id"
  46860. };
  46861. var styleType = {
  46862. type: definePropType(Object)
  46863. };
  46864. // node_modules/element-plus/es/components/table-v2/src/row.mjs
  46865. var tableV2RowProps = buildProps({
  46866. class: String,
  46867. columns,
  46868. columnsStyles: {
  46869. type: definePropType(Object),
  46870. required: true
  46871. },
  46872. depth: Number,
  46873. expandColumnKey,
  46874. estimatedRowHeight: {
  46875. ...virtualizedGridProps.estimatedRowHeight,
  46876. default: void 0
  46877. },
  46878. isScrolling: Boolean,
  46879. onRowExpand: {
  46880. type: definePropType(Function)
  46881. },
  46882. onRowHover: {
  46883. type: definePropType(Function)
  46884. },
  46885. onRowHeightChange: {
  46886. type: definePropType(Function)
  46887. },
  46888. rowData: {
  46889. type: definePropType(Object),
  46890. required: true
  46891. },
  46892. rowEventHandlers: {
  46893. type: definePropType(Object)
  46894. },
  46895. rowIndex: {
  46896. type: Number,
  46897. required: true
  46898. },
  46899. rowKey,
  46900. style: {
  46901. type: definePropType(Object)
  46902. }
  46903. });
  46904. // node_modules/element-plus/es/components/table-v2/src/header.mjs
  46905. var requiredNumberType = {
  46906. type: Number,
  46907. required: true
  46908. };
  46909. var tableV2HeaderProps = buildProps({
  46910. class: String,
  46911. columns,
  46912. fixedHeaderData: {
  46913. type: definePropType(Array)
  46914. },
  46915. headerData: {
  46916. type: definePropType(Array),
  46917. required: true
  46918. },
  46919. headerHeight: {
  46920. type: definePropType([Number, Array]),
  46921. default: 50
  46922. },
  46923. rowWidth: requiredNumberType,
  46924. rowHeight: {
  46925. type: Number,
  46926. default: 50
  46927. },
  46928. height: requiredNumberType,
  46929. width: requiredNumberType
  46930. });
  46931. // node_modules/element-plus/es/components/table-v2/src/grid.mjs
  46932. var tableV2GridProps = buildProps({
  46933. columns,
  46934. data: dataType,
  46935. fixedData: fixedDataType,
  46936. estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
  46937. width: requiredNumber,
  46938. height: requiredNumber,
  46939. headerWidth: requiredNumber,
  46940. headerHeight: tableV2HeaderProps.headerHeight,
  46941. bodyWidth: requiredNumber,
  46942. rowHeight: requiredNumber,
  46943. cache: virtualizedListProps.cache,
  46944. useIsScrolling: Boolean,
  46945. scrollbarAlwaysOn: virtualizedGridProps.scrollbarAlwaysOn,
  46946. scrollbarStartGap: virtualizedGridProps.scrollbarStartGap,
  46947. scrollbarEndGap: virtualizedGridProps.scrollbarEndGap,
  46948. class: classType,
  46949. style: styleType,
  46950. containerStyle: styleType,
  46951. getRowHeight: {
  46952. type: definePropType(Function),
  46953. required: true
  46954. },
  46955. rowKey: tableV2RowProps.rowKey,
  46956. onRowsRendered: {
  46957. type: definePropType(Function)
  46958. },
  46959. onScroll: {
  46960. type: definePropType(Function)
  46961. }
  46962. });
  46963. // node_modules/element-plus/es/components/table-v2/src/table.mjs
  46964. var tableV2Props = buildProps({
  46965. cache: tableV2GridProps.cache,
  46966. estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
  46967. rowKey,
  46968. headerClass: {
  46969. type: definePropType([
  46970. String,
  46971. Function
  46972. ])
  46973. },
  46974. headerProps: {
  46975. type: definePropType([
  46976. Object,
  46977. Function
  46978. ])
  46979. },
  46980. headerCellProps: {
  46981. type: definePropType([
  46982. Object,
  46983. Function
  46984. ])
  46985. },
  46986. headerHeight: tableV2HeaderProps.headerHeight,
  46987. footerHeight: {
  46988. type: Number,
  46989. default: 0
  46990. },
  46991. rowClass: {
  46992. type: definePropType([String, Function])
  46993. },
  46994. rowProps: {
  46995. type: definePropType([Object, Function])
  46996. },
  46997. rowHeight: {
  46998. type: Number,
  46999. default: 50
  47000. },
  47001. cellProps: {
  47002. type: definePropType([
  47003. Object,
  47004. Function
  47005. ])
  47006. },
  47007. columns,
  47008. data: dataType,
  47009. dataGetter: {
  47010. type: definePropType(Function)
  47011. },
  47012. fixedData: fixedDataType,
  47013. expandColumnKey: tableV2RowProps.expandColumnKey,
  47014. expandedRowKeys: expandKeys,
  47015. defaultExpandedRowKeys: expandKeys,
  47016. class: classType,
  47017. fixed: Boolean,
  47018. style: {
  47019. type: definePropType(Object)
  47020. },
  47021. width: requiredNumber,
  47022. height: requiredNumber,
  47023. maxHeight: Number,
  47024. useIsScrolling: Boolean,
  47025. indentSize: {
  47026. type: Number,
  47027. default: 12
  47028. },
  47029. iconSize: {
  47030. type: Number,
  47031. default: 12
  47032. },
  47033. hScrollbarSize: virtualizedGridProps.hScrollbarSize,
  47034. vScrollbarSize: virtualizedGridProps.vScrollbarSize,
  47035. scrollbarAlwaysOn: virtualizedScrollbarProps.alwaysOn,
  47036. sortBy: {
  47037. type: definePropType(Object),
  47038. default: () => ({})
  47039. },
  47040. sortState: {
  47041. type: definePropType(Object),
  47042. default: void 0
  47043. },
  47044. onColumnSort: {
  47045. type: definePropType(Function)
  47046. },
  47047. onExpandedRowsChange: {
  47048. type: definePropType(Function)
  47049. },
  47050. onEndReached: {
  47051. type: definePropType(Function)
  47052. },
  47053. onRowExpand: tableV2RowProps.onRowExpand,
  47054. onScroll: tableV2GridProps.onScroll,
  47055. onRowsRendered: tableV2GridProps.onRowsRendered,
  47056. rowEventHandlers: tableV2RowProps.rowEventHandlers
  47057. });
  47058. // node_modules/element-plus/es/components/table-v2/src/components/cell.mjs
  47059. var TableV2Cell = (props, {
  47060. slots
  47061. }) => {
  47062. var _a2;
  47063. const {
  47064. cellData,
  47065. style
  47066. } = props;
  47067. const displayText = ((_a2 = cellData == null ? void 0 : cellData.toString) == null ? void 0 : _a2.call(cellData)) || "";
  47068. return createVNode("div", {
  47069. "class": props.class,
  47070. "title": displayText,
  47071. "style": style
  47072. }, [slots.default ? slots.default(props) : displayText]);
  47073. };
  47074. TableV2Cell.displayName = "ElTableV2Cell";
  47075. TableV2Cell.inheritAttrs = false;
  47076. // node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs
  47077. var HeaderCell = (props, {
  47078. slots
  47079. }) => {
  47080. var _a2, _b;
  47081. return slots.default ? slots.default(props) : createVNode("div", {
  47082. "class": props.class,
  47083. "title": (_a2 = props.column) == null ? void 0 : _a2.title
  47084. }, [(_b = props.column) == null ? void 0 : _b.title]);
  47085. };
  47086. HeaderCell.displayName = "ElTableV2HeaderCell";
  47087. HeaderCell.inheritAttrs = false;
  47088. // node_modules/element-plus/es/components/table-v2/src/header-row.mjs
  47089. var tableV2HeaderRowProps = buildProps({
  47090. class: String,
  47091. columns,
  47092. columnsStyles: {
  47093. type: definePropType(Object),
  47094. required: true
  47095. },
  47096. headerIndex: Number,
  47097. style: { type: definePropType(Object) }
  47098. });
  47099. // node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs
  47100. var TableV2HeaderRow = defineComponent({
  47101. name: "ElTableV2HeaderRow",
  47102. props: tableV2HeaderRowProps,
  47103. setup(props, {
  47104. slots
  47105. }) {
  47106. return () => {
  47107. const {
  47108. columns: columns2,
  47109. columnsStyles,
  47110. headerIndex,
  47111. style
  47112. } = props;
  47113. let Cells = columns2.map((column2, columnIndex) => {
  47114. return slots.cell({
  47115. columns: columns2,
  47116. column: column2,
  47117. columnIndex,
  47118. headerIndex,
  47119. style: columnsStyles[column2.key]
  47120. });
  47121. });
  47122. if (slots.header) {
  47123. Cells = slots.header({
  47124. cells: Cells.map((node) => {
  47125. if (isArray(node) && node.length === 1) {
  47126. return node[0];
  47127. }
  47128. return node;
  47129. }),
  47130. columns: columns2,
  47131. headerIndex
  47132. });
  47133. }
  47134. return createVNode("div", {
  47135. "class": props.class,
  47136. "style": style
  47137. }, [Cells]);
  47138. };
  47139. }
  47140. });
  47141. // node_modules/element-plus/es/components/table-v2/src/components/header.mjs
  47142. var COMPONENT_NAME17 = "ElTableV2Header";
  47143. var TableV2Header = defineComponent({
  47144. name: COMPONENT_NAME17,
  47145. props: tableV2HeaderProps,
  47146. setup(props, {
  47147. slots,
  47148. expose
  47149. }) {
  47150. const ns2 = useNamespace("table-v2");
  47151. const headerRef = ref();
  47152. const headerStyle = computed2(() => enforceUnit({
  47153. width: props.width,
  47154. height: props.height
  47155. }));
  47156. const rowStyle = computed2(() => enforceUnit({
  47157. width: props.rowWidth,
  47158. height: props.height
  47159. }));
  47160. const headerHeights = computed2(() => castArray_default(unref(props.headerHeight)));
  47161. const scrollToLeft = (left2) => {
  47162. const headerEl = unref(headerRef);
  47163. nextTick(() => {
  47164. (headerEl == null ? void 0 : headerEl.scroll) && headerEl.scroll({
  47165. left: left2
  47166. });
  47167. });
  47168. };
  47169. const renderFixedRows = () => {
  47170. const fixedRowClassName = ns2.e("fixed-header-row");
  47171. const {
  47172. columns: columns2,
  47173. fixedHeaderData,
  47174. rowHeight
  47175. } = props;
  47176. return fixedHeaderData == null ? void 0 : fixedHeaderData.map((fixedRowData, fixedRowIndex) => {
  47177. var _a2;
  47178. const style = enforceUnit({
  47179. height: rowHeight,
  47180. width: "100%"
  47181. });
  47182. return (_a2 = slots.fixed) == null ? void 0 : _a2.call(slots, {
  47183. class: fixedRowClassName,
  47184. columns: columns2,
  47185. rowData: fixedRowData,
  47186. rowIndex: -(fixedRowIndex + 1),
  47187. style
  47188. });
  47189. });
  47190. };
  47191. const renderDynamicRows = () => {
  47192. const dynamicRowClassName = ns2.e("dynamic-header-row");
  47193. const {
  47194. columns: columns2
  47195. } = props;
  47196. return unref(headerHeights).map((rowHeight, rowIndex) => {
  47197. var _a2;
  47198. const style = enforceUnit({
  47199. width: "100%",
  47200. height: rowHeight
  47201. });
  47202. return (_a2 = slots.dynamic) == null ? void 0 : _a2.call(slots, {
  47203. class: dynamicRowClassName,
  47204. columns: columns2,
  47205. headerIndex: rowIndex,
  47206. style
  47207. });
  47208. });
  47209. };
  47210. expose({
  47211. scrollToLeft
  47212. });
  47213. return () => {
  47214. if (props.height <= 0)
  47215. return;
  47216. return createVNode("div", {
  47217. "ref": headerRef,
  47218. "class": props.class,
  47219. "style": unref(headerStyle)
  47220. }, [createVNode("div", {
  47221. "style": unref(rowStyle),
  47222. "class": ns2.e("header")
  47223. }, [renderDynamicRows(), renderFixedRows()])]);
  47224. };
  47225. }
  47226. });
  47227. // node_modules/element-plus/es/components/table-v2/src/components/row.mjs
  47228. var useTableRow = (props) => {
  47229. const {
  47230. isScrolling
  47231. } = inject(TableV2InjectionKey);
  47232. const measured = ref(false);
  47233. const rowRef = ref();
  47234. const measurable = computed2(() => {
  47235. return isNumber2(props.estimatedRowHeight) && props.rowIndex >= 0;
  47236. });
  47237. const doMeasure = (isInit = false) => {
  47238. const $rowRef = unref(rowRef);
  47239. if (!$rowRef)
  47240. return;
  47241. const {
  47242. columns: columns2,
  47243. onRowHeightChange,
  47244. rowKey: rowKey2,
  47245. rowIndex,
  47246. style
  47247. } = props;
  47248. const {
  47249. height
  47250. } = $rowRef.getBoundingClientRect();
  47251. measured.value = true;
  47252. nextTick(() => {
  47253. if (isInit || height !== Number.parseInt(style.height)) {
  47254. const firstColumn = columns2[0];
  47255. const isPlaceholder = (firstColumn == null ? void 0 : firstColumn.placeholderSign) === placeholderSign;
  47256. onRowHeightChange == null ? void 0 : onRowHeightChange({
  47257. rowKey: rowKey2,
  47258. height,
  47259. rowIndex
  47260. }, firstColumn && !isPlaceholder && firstColumn.fixed);
  47261. }
  47262. });
  47263. };
  47264. const eventHandlers = computed2(() => {
  47265. const {
  47266. rowData,
  47267. rowIndex,
  47268. rowKey: rowKey2,
  47269. onRowHover
  47270. } = props;
  47271. const handlers2 = props.rowEventHandlers || {};
  47272. const eventHandlers2 = {};
  47273. Object.entries(handlers2).forEach(([eventName, handler]) => {
  47274. if (isFunction(handler)) {
  47275. eventHandlers2[eventName] = (event) => {
  47276. handler({
  47277. event,
  47278. rowData,
  47279. rowIndex,
  47280. rowKey: rowKey2
  47281. });
  47282. };
  47283. }
  47284. });
  47285. if (onRowHover) {
  47286. ;
  47287. [{
  47288. name: "onMouseleave",
  47289. hovered: false
  47290. }, {
  47291. name: "onMouseenter",
  47292. hovered: true
  47293. }].forEach(({
  47294. name,
  47295. hovered
  47296. }) => {
  47297. const existedHandler = eventHandlers2[name];
  47298. eventHandlers2[name] = (event) => {
  47299. onRowHover({
  47300. event,
  47301. hovered,
  47302. rowData,
  47303. rowIndex,
  47304. rowKey: rowKey2
  47305. });
  47306. existedHandler == null ? void 0 : existedHandler(event);
  47307. };
  47308. });
  47309. }
  47310. return eventHandlers2;
  47311. });
  47312. const onExpand = (expanded) => {
  47313. const {
  47314. onRowExpand,
  47315. rowData,
  47316. rowIndex,
  47317. rowKey: rowKey2
  47318. } = props;
  47319. onRowExpand == null ? void 0 : onRowExpand({
  47320. expanded,
  47321. rowData,
  47322. rowIndex,
  47323. rowKey: rowKey2
  47324. });
  47325. };
  47326. onMounted(() => {
  47327. if (unref(measurable)) {
  47328. doMeasure(true);
  47329. }
  47330. });
  47331. return {
  47332. isScrolling,
  47333. measurable,
  47334. measured,
  47335. rowRef,
  47336. eventHandlers,
  47337. onExpand
  47338. };
  47339. };
  47340. var COMPONENT_NAME18 = "ElTableV2TableRow";
  47341. var TableV2Row = defineComponent({
  47342. name: COMPONENT_NAME18,
  47343. props: tableV2RowProps,
  47344. setup(props, {
  47345. expose,
  47346. slots,
  47347. attrs
  47348. }) {
  47349. const {
  47350. eventHandlers,
  47351. isScrolling,
  47352. measurable,
  47353. measured,
  47354. rowRef,
  47355. onExpand
  47356. } = useTableRow(props);
  47357. expose({
  47358. onExpand
  47359. });
  47360. return () => {
  47361. const {
  47362. columns: columns2,
  47363. columnsStyles,
  47364. expandColumnKey: expandColumnKey2,
  47365. depth,
  47366. rowData,
  47367. rowIndex,
  47368. style
  47369. } = props;
  47370. let ColumnCells = columns2.map((column2, columnIndex) => {
  47371. const expandable = isArray(rowData.children) && rowData.children.length > 0 && column2.key === expandColumnKey2;
  47372. return slots.cell({
  47373. column: column2,
  47374. columns: columns2,
  47375. columnIndex,
  47376. depth,
  47377. style: columnsStyles[column2.key],
  47378. rowData,
  47379. rowIndex,
  47380. isScrolling: unref(isScrolling),
  47381. expandIconProps: expandable ? {
  47382. rowData,
  47383. rowIndex,
  47384. onExpand
  47385. } : void 0
  47386. });
  47387. });
  47388. if (slots.row) {
  47389. ColumnCells = slots.row({
  47390. cells: ColumnCells.map((node) => {
  47391. if (isArray(node) && node.length === 1) {
  47392. return node[0];
  47393. }
  47394. return node;
  47395. }),
  47396. style,
  47397. columns: columns2,
  47398. depth,
  47399. rowData,
  47400. rowIndex,
  47401. isScrolling: unref(isScrolling)
  47402. });
  47403. }
  47404. if (unref(measurable)) {
  47405. const {
  47406. height,
  47407. ...exceptHeightStyle
  47408. } = style || {};
  47409. const _measured = unref(measured);
  47410. return createVNode("div", mergeProps({
  47411. "ref": rowRef,
  47412. "class": props.class,
  47413. "style": _measured ? style : exceptHeightStyle
  47414. }, attrs, unref(eventHandlers)), [ColumnCells]);
  47415. }
  47416. return createVNode("div", mergeProps(attrs, {
  47417. "ref": rowRef,
  47418. "class": props.class,
  47419. "style": style
  47420. }, unref(eventHandlers)), [ColumnCells]);
  47421. };
  47422. }
  47423. });
  47424. // node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs
  47425. var SortIcon = (props) => {
  47426. const {
  47427. sortOrder
  47428. } = props;
  47429. return createVNode(ElIcon, {
  47430. "size": 14,
  47431. "class": props.class
  47432. }, {
  47433. default: () => [sortOrder === SortOrder.ASC ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)]
  47434. });
  47435. };
  47436. // node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs
  47437. var ExpandIcon = (props) => {
  47438. const {
  47439. expanded,
  47440. expandable,
  47441. onExpand,
  47442. style,
  47443. size: size3
  47444. } = props;
  47445. const expandIconProps = {
  47446. onClick: expandable ? () => onExpand(!expanded) : void 0,
  47447. class: props.class
  47448. };
  47449. return createVNode(ElIcon, mergeProps(expandIconProps, {
  47450. "size": size3,
  47451. "style": style
  47452. }), {
  47453. default: () => [createVNode(arrow_right_default, null, null)]
  47454. });
  47455. };
  47456. // node_modules/element-plus/es/components/table-v2/src/table-grid.mjs
  47457. var COMPONENT_NAME19 = "ElTableV2Grid";
  47458. var useTableGrid = (props) => {
  47459. const headerRef = ref();
  47460. const bodyRef = ref();
  47461. const totalHeight = computed2(() => {
  47462. const {
  47463. data,
  47464. rowHeight,
  47465. estimatedRowHeight
  47466. } = props;
  47467. if (estimatedRowHeight) {
  47468. return;
  47469. }
  47470. return data.length * rowHeight;
  47471. });
  47472. const fixedRowHeight = computed2(() => {
  47473. const {
  47474. fixedData,
  47475. rowHeight
  47476. } = props;
  47477. return ((fixedData == null ? void 0 : fixedData.length) || 0) * rowHeight;
  47478. });
  47479. const headerHeight = computed2(() => sum2(props.headerHeight));
  47480. const gridHeight = computed2(() => {
  47481. const {
  47482. height
  47483. } = props;
  47484. return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight));
  47485. });
  47486. const hasHeader = computed2(() => {
  47487. return unref(headerHeight) + unref(fixedRowHeight) > 0;
  47488. });
  47489. const itemKey = ({
  47490. data,
  47491. rowIndex
  47492. }) => data[rowIndex][props.rowKey];
  47493. function onItemRendered({
  47494. rowCacheStart,
  47495. rowCacheEnd,
  47496. rowVisibleStart,
  47497. rowVisibleEnd
  47498. }) {
  47499. var _a2;
  47500. (_a2 = props.onRowsRendered) == null ? void 0 : _a2.call(props, {
  47501. rowCacheStart,
  47502. rowCacheEnd,
  47503. rowVisibleStart,
  47504. rowVisibleEnd
  47505. });
  47506. }
  47507. function resetAfterRowIndex(index, forceUpdate2) {
  47508. var _a2;
  47509. (_a2 = bodyRef.value) == null ? void 0 : _a2.resetAfterRowIndex(index, forceUpdate2);
  47510. }
  47511. function scrollTo(leftOrOptions, top) {
  47512. const header$ = unref(headerRef);
  47513. const body$ = unref(bodyRef);
  47514. if (!header$ || !body$)
  47515. return;
  47516. if (isObject(leftOrOptions)) {
  47517. header$.scrollToLeft(leftOrOptions.scrollLeft);
  47518. body$.scrollTo(leftOrOptions);
  47519. } else {
  47520. header$.scrollToLeft(leftOrOptions);
  47521. body$.scrollTo({
  47522. scrollLeft: leftOrOptions,
  47523. scrollTop: top
  47524. });
  47525. }
  47526. }
  47527. function scrollToTop(scrollTop) {
  47528. var _a2;
  47529. (_a2 = unref(bodyRef)) == null ? void 0 : _a2.scrollTo({
  47530. scrollTop
  47531. });
  47532. }
  47533. function scrollToRow(row, strategy) {
  47534. var _a2;
  47535. (_a2 = unref(bodyRef)) == null ? void 0 : _a2.scrollToItem(row, 1, strategy);
  47536. }
  47537. function forceUpdate() {
  47538. var _a2, _b;
  47539. (_a2 = unref(bodyRef)) == null ? void 0 : _a2.$forceUpdate();
  47540. (_b = unref(headerRef)) == null ? void 0 : _b.$forceUpdate();
  47541. }
  47542. return {
  47543. bodyRef,
  47544. forceUpdate,
  47545. fixedRowHeight,
  47546. gridHeight,
  47547. hasHeader,
  47548. headerHeight,
  47549. headerRef,
  47550. totalHeight,
  47551. itemKey,
  47552. onItemRendered,
  47553. resetAfterRowIndex,
  47554. scrollTo,
  47555. scrollToTop,
  47556. scrollToRow
  47557. };
  47558. };
  47559. var TableGrid = defineComponent({
  47560. name: COMPONENT_NAME19,
  47561. props: tableV2GridProps,
  47562. setup(props, {
  47563. slots,
  47564. expose
  47565. }) {
  47566. const {
  47567. ns: ns2
  47568. } = inject(TableV2InjectionKey);
  47569. const {
  47570. bodyRef,
  47571. fixedRowHeight,
  47572. gridHeight,
  47573. hasHeader,
  47574. headerRef,
  47575. headerHeight,
  47576. totalHeight,
  47577. forceUpdate,
  47578. itemKey,
  47579. onItemRendered,
  47580. resetAfterRowIndex,
  47581. scrollTo,
  47582. scrollToTop,
  47583. scrollToRow
  47584. } = useTableGrid(props);
  47585. expose({
  47586. forceUpdate,
  47587. totalHeight,
  47588. scrollTo,
  47589. scrollToTop,
  47590. scrollToRow,
  47591. resetAfterRowIndex
  47592. });
  47593. const getColumnWidth = () => props.bodyWidth;
  47594. return () => {
  47595. const {
  47596. cache: cache2,
  47597. columns: columns2,
  47598. data,
  47599. fixedData,
  47600. useIsScrolling,
  47601. scrollbarAlwaysOn,
  47602. scrollbarEndGap,
  47603. scrollbarStartGap,
  47604. style,
  47605. rowHeight,
  47606. bodyWidth,
  47607. estimatedRowHeight,
  47608. headerWidth,
  47609. height,
  47610. width,
  47611. getRowHeight,
  47612. onScroll
  47613. } = props;
  47614. const isDynamicRowEnabled = isNumber2(estimatedRowHeight);
  47615. const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid;
  47616. const _headerHeight = unref(headerHeight);
  47617. return createVNode("div", {
  47618. "role": "table",
  47619. "class": [ns2.e("table"), props.class],
  47620. "style": style
  47621. }, [createVNode(Grid, {
  47622. "ref": bodyRef,
  47623. "data": data,
  47624. "useIsScrolling": useIsScrolling,
  47625. "itemKey": itemKey,
  47626. "columnCache": 0,
  47627. "columnWidth": isDynamicRowEnabled ? getColumnWidth : bodyWidth,
  47628. "totalColumn": 1,
  47629. "totalRow": data.length,
  47630. "rowCache": cache2,
  47631. "rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight,
  47632. "width": width,
  47633. "height": unref(gridHeight),
  47634. "class": ns2.e("body"),
  47635. "scrollbarStartGap": scrollbarStartGap,
  47636. "scrollbarEndGap": scrollbarEndGap,
  47637. "scrollbarAlwaysOn": scrollbarAlwaysOn,
  47638. "onScroll": onScroll,
  47639. "onItemRendered": onItemRendered,
  47640. "perfMode": false
  47641. }, {
  47642. default: (params) => {
  47643. var _a2;
  47644. const rowData = data[params.rowIndex];
  47645. return (_a2 = slots.row) == null ? void 0 : _a2.call(slots, {
  47646. ...params,
  47647. columns: columns2,
  47648. rowData
  47649. });
  47650. }
  47651. }), unref(hasHeader) && createVNode(TableV2Header, {
  47652. "ref": headerRef,
  47653. "class": ns2.e("header-wrapper"),
  47654. "columns": columns2,
  47655. "headerData": data,
  47656. "headerHeight": props.headerHeight,
  47657. "fixedHeaderData": fixedData,
  47658. "rowWidth": headerWidth,
  47659. "rowHeight": rowHeight,
  47660. "width": width,
  47661. "height": Math.min(_headerHeight + unref(fixedRowHeight), height)
  47662. }, {
  47663. dynamic: slots.header,
  47664. fixed: slots.row
  47665. })]);
  47666. };
  47667. }
  47668. });
  47669. // node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs
  47670. function _isSlot(s2) {
  47671. return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
  47672. }
  47673. var MainTable = (props, {
  47674. slots
  47675. }) => {
  47676. const {
  47677. mainTableRef,
  47678. ...rest2
  47679. } = props;
  47680. return createVNode(TableGrid, mergeProps({
  47681. "ref": mainTableRef
  47682. }, rest2), _isSlot(slots) ? slots : {
  47683. default: () => [slots]
  47684. });
  47685. };
  47686. // node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs
  47687. function _isSlot2(s2) {
  47688. return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
  47689. }
  47690. var LeftTable = (props, {
  47691. slots
  47692. }) => {
  47693. if (!props.columns.length)
  47694. return;
  47695. const {
  47696. leftTableRef,
  47697. ...rest2
  47698. } = props;
  47699. return createVNode(TableGrid, mergeProps({
  47700. "ref": leftTableRef
  47701. }, rest2), _isSlot2(slots) ? slots : {
  47702. default: () => [slots]
  47703. });
  47704. };
  47705. // node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs
  47706. function _isSlot3(s2) {
  47707. return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
  47708. }
  47709. var LeftTable2 = (props, {
  47710. slots
  47711. }) => {
  47712. if (!props.columns.length)
  47713. return;
  47714. const {
  47715. rightTableRef,
  47716. ...rest2
  47717. } = props;
  47718. return createVNode(TableGrid, mergeProps({
  47719. "ref": rightTableRef
  47720. }, rest2), _isSlot3(slots) ? slots : {
  47721. default: () => [slots]
  47722. });
  47723. };
  47724. // node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs
  47725. function _isSlot4(s2) {
  47726. return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
  47727. }
  47728. var RowRenderer = (props, {
  47729. slots
  47730. }) => {
  47731. const {
  47732. columns: columns2,
  47733. columnsStyles,
  47734. depthMap,
  47735. expandColumnKey: expandColumnKey2,
  47736. expandedRowKeys,
  47737. estimatedRowHeight,
  47738. hasFixedColumns,
  47739. hoveringRowKey,
  47740. rowData,
  47741. rowIndex,
  47742. style,
  47743. isScrolling,
  47744. rowProps: rowProps2,
  47745. rowClass,
  47746. rowKey: rowKey2,
  47747. rowEventHandlers,
  47748. ns: ns2,
  47749. onRowHovered,
  47750. onRowExpanded
  47751. } = props;
  47752. const rowKls = tryCall(rowClass, {
  47753. columns: columns2,
  47754. rowData,
  47755. rowIndex
  47756. }, "");
  47757. const additionalProps = tryCall(rowProps2, {
  47758. columns: columns2,
  47759. rowData,
  47760. rowIndex
  47761. });
  47762. const _rowKey = rowData[rowKey2];
  47763. const depth = depthMap[_rowKey] || 0;
  47764. const canExpand = Boolean(expandColumnKey2);
  47765. const isFixedRow = rowIndex < 0;
  47766. const kls = [ns2.e("row"), rowKls, {
  47767. [ns2.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0,
  47768. [ns2.is("expanded")]: canExpand && expandedRowKeys.includes(_rowKey),
  47769. [ns2.is("hovered")]: !isScrolling && _rowKey === hoveringRowKey,
  47770. [ns2.is("fixed")]: !depth && isFixedRow,
  47771. [ns2.is("customized")]: Boolean(slots.row)
  47772. }];
  47773. const onRowHover = hasFixedColumns ? onRowHovered : void 0;
  47774. const _rowProps = {
  47775. ...additionalProps,
  47776. columns: columns2,
  47777. columnsStyles,
  47778. class: kls,
  47779. depth,
  47780. expandColumnKey: expandColumnKey2,
  47781. estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight,
  47782. isScrolling,
  47783. rowIndex,
  47784. rowData,
  47785. rowKey: _rowKey,
  47786. rowEventHandlers,
  47787. style
  47788. };
  47789. return createVNode(TableV2Row, mergeProps(_rowProps, {
  47790. "onRowHover": onRowHover,
  47791. "onRowExpand": onRowExpanded
  47792. }), _isSlot4(slots) ? slots : {
  47793. default: () => [slots]
  47794. });
  47795. };
  47796. // node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs
  47797. var CellRenderer = ({
  47798. columns: columns2,
  47799. column: column2,
  47800. columnIndex,
  47801. depth,
  47802. expandIconProps,
  47803. isScrolling,
  47804. rowData,
  47805. rowIndex,
  47806. style,
  47807. expandedRowKeys,
  47808. ns: ns2,
  47809. cellProps: _cellProps,
  47810. expandColumnKey: expandColumnKey2,
  47811. indentSize,
  47812. iconSize,
  47813. rowKey: rowKey2
  47814. }, {
  47815. slots
  47816. }) => {
  47817. const cellStyle = enforceUnit(style);
  47818. if (column2.placeholderSign === placeholderSign) {
  47819. return createVNode("div", {
  47820. "class": ns2.em("row-cell", "placeholder"),
  47821. "style": cellStyle
  47822. }, null);
  47823. }
  47824. const {
  47825. cellRenderer,
  47826. dataKey,
  47827. dataGetter
  47828. } = column2;
  47829. const columnCellRenderer = componentToSlot(cellRenderer);
  47830. const CellComponent = columnCellRenderer || slots.default || ((props) => createVNode(TableV2Cell, props, null));
  47831. const cellData = isFunction(dataGetter) ? dataGetter({
  47832. columns: columns2,
  47833. column: column2,
  47834. columnIndex,
  47835. rowData,
  47836. rowIndex
  47837. }) : get_default(rowData, dataKey != null ? dataKey : "");
  47838. const extraCellProps = tryCall(_cellProps, {
  47839. cellData,
  47840. columns: columns2,
  47841. column: column2,
  47842. columnIndex,
  47843. rowIndex,
  47844. rowData
  47845. });
  47846. const cellProps = {
  47847. class: ns2.e("cell-text"),
  47848. columns: columns2,
  47849. column: column2,
  47850. columnIndex,
  47851. cellData,
  47852. isScrolling,
  47853. rowData,
  47854. rowIndex
  47855. };
  47856. const Cell = CellComponent(cellProps);
  47857. const kls = [ns2.e("row-cell"), column2.align === Alignment.CENTER && ns2.is("align-center"), column2.align === Alignment.RIGHT && ns2.is("align-right")];
  47858. const expandable = rowIndex >= 0 && column2.key === expandColumnKey2;
  47859. const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey2]);
  47860. let IconOrPlaceholder;
  47861. const iconStyle = `margin-inline-start: ${depth * indentSize}px;`;
  47862. if (expandable) {
  47863. if (isObject(expandIconProps)) {
  47864. IconOrPlaceholder = createVNode(ExpandIcon, mergeProps(expandIconProps, {
  47865. "class": [ns2.e("expand-icon"), ns2.is("expanded", expanded)],
  47866. "size": iconSize,
  47867. "expanded": expanded,
  47868. "style": iconStyle,
  47869. "expandable": true
  47870. }), null);
  47871. } else {
  47872. IconOrPlaceholder = createVNode("div", {
  47873. "style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ")
  47874. }, null);
  47875. }
  47876. }
  47877. return createVNode("div", mergeProps({
  47878. "class": kls,
  47879. "style": cellStyle
  47880. }, extraCellProps), [IconOrPlaceholder, Cell]);
  47881. };
  47882. CellRenderer.inheritAttrs = false;
  47883. // node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs
  47884. function _isSlot5(s2) {
  47885. return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
  47886. }
  47887. var HeaderRenderer = ({
  47888. columns: columns2,
  47889. columnsStyles,
  47890. headerIndex,
  47891. style,
  47892. headerClass,
  47893. headerProps,
  47894. ns: ns2
  47895. }, {
  47896. slots
  47897. }) => {
  47898. const param = {
  47899. columns: columns2,
  47900. headerIndex
  47901. };
  47902. const kls = [ns2.e("header-row"), tryCall(headerClass, param, ""), {
  47903. [ns2.is("customized")]: Boolean(slots.header)
  47904. }];
  47905. const extraProps = {
  47906. ...tryCall(headerProps, param),
  47907. columnsStyles,
  47908. class: kls,
  47909. columns: columns2,
  47910. headerIndex,
  47911. style
  47912. };
  47913. return createVNode(TableV2HeaderRow, extraProps, _isSlot5(slots) ? slots : {
  47914. default: () => [slots]
  47915. });
  47916. };
  47917. // node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs
  47918. var HeaderCellRenderer = (props, {
  47919. slots
  47920. }) => {
  47921. const {
  47922. column: column2,
  47923. ns: ns2,
  47924. style,
  47925. onColumnSorted
  47926. } = props;
  47927. const cellStyle = enforceUnit(style);
  47928. if (column2.placeholderSign === placeholderSign) {
  47929. return createVNode("div", {
  47930. "class": ns2.em("header-row-cell", "placeholder"),
  47931. "style": cellStyle
  47932. }, null);
  47933. }
  47934. const {
  47935. headerCellRenderer,
  47936. headerClass,
  47937. sortable
  47938. } = column2;
  47939. const cellProps = {
  47940. ...props,
  47941. class: ns2.e("header-cell-text")
  47942. };
  47943. const cellRenderer = componentToSlot(headerCellRenderer) || slots.default || ((props2) => createVNode(HeaderCell, props2, null));
  47944. const Cell = cellRenderer(cellProps);
  47945. const {
  47946. sortBy: sortBy2,
  47947. sortState,
  47948. headerCellProps
  47949. } = props;
  47950. let sorting, sortOrder;
  47951. if (sortState) {
  47952. const order = sortState[column2.key];
  47953. sorting = Boolean(oppositeOrderMap[order]);
  47954. sortOrder = sorting ? order : SortOrder.ASC;
  47955. } else {
  47956. sorting = column2.key === sortBy2.key;
  47957. sortOrder = sorting ? sortBy2.order : SortOrder.ASC;
  47958. }
  47959. const cellKls = [ns2.e("header-cell"), tryCall(headerClass, props, ""), column2.align === Alignment.CENTER && ns2.is("align-center"), column2.align === Alignment.RIGHT && ns2.is("align-right"), sortable && ns2.is("sortable")];
  47960. const cellWrapperProps = {
  47961. ...tryCall(headerCellProps, props),
  47962. onClick: column2.sortable ? onColumnSorted : void 0,
  47963. class: cellKls,
  47964. style: cellStyle,
  47965. ["data-key"]: column2.key
  47966. };
  47967. return createVNode("div", cellWrapperProps, [Cell, sortable && createVNode(SortIcon, {
  47968. "class": [ns2.e("sort-icon"), sorting && ns2.is("sorting")],
  47969. "sortOrder": sortOrder
  47970. }, null)]);
  47971. };
  47972. // node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs
  47973. var Footer2 = (props, {
  47974. slots
  47975. }) => {
  47976. var _a2;
  47977. return createVNode("div", {
  47978. "class": props.class,
  47979. "style": props.style
  47980. }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]);
  47981. };
  47982. Footer2.displayName = "ElTableV2Footer";
  47983. // node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs
  47984. var Footer3 = (props, {
  47985. slots
  47986. }) => {
  47987. return createVNode("div", {
  47988. "class": props.class,
  47989. "style": props.style
  47990. }, [slots.default ? slots.default() : createVNode(ElEmpty, null, null)]);
  47991. };
  47992. Footer3.displayName = "ElTableV2Empty";
  47993. // node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs
  47994. var Overlay2 = (props, {
  47995. slots
  47996. }) => {
  47997. var _a2;
  47998. return createVNode("div", {
  47999. "class": props.class,
  48000. "style": props.style
  48001. }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]);
  48002. };
  48003. Overlay2.displayName = "ElTableV2Overlay";
  48004. // node_modules/element-plus/es/components/table-v2/src/table-v2.mjs
  48005. function _isSlot6(s2) {
  48006. return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
  48007. }
  48008. var COMPONENT_NAME20 = "ElTableV2";
  48009. var TableV2 = defineComponent({
  48010. name: COMPONENT_NAME20,
  48011. props: tableV2Props,
  48012. setup(props, {
  48013. slots,
  48014. expose
  48015. }) {
  48016. const ns2 = useNamespace("table-v2");
  48017. const {
  48018. columnsStyles,
  48019. fixedColumnsOnLeft,
  48020. fixedColumnsOnRight,
  48021. mainColumns,
  48022. mainTableHeight,
  48023. fixedTableHeight,
  48024. leftTableWidth,
  48025. rightTableWidth,
  48026. data,
  48027. depthMap,
  48028. expandedRowKeys,
  48029. hasFixedColumns,
  48030. hoveringRowKey,
  48031. mainTableRef,
  48032. leftTableRef,
  48033. rightTableRef,
  48034. isDynamic,
  48035. isResetting,
  48036. isScrolling,
  48037. bodyWidth,
  48038. emptyStyle,
  48039. rootStyle,
  48040. headerWidth,
  48041. footerHeight,
  48042. showEmpty,
  48043. scrollTo,
  48044. scrollToLeft,
  48045. scrollToTop,
  48046. scrollToRow,
  48047. getRowHeight,
  48048. onColumnSorted,
  48049. onRowHeightChange,
  48050. onRowHovered,
  48051. onRowExpanded,
  48052. onRowsRendered,
  48053. onScroll,
  48054. onVerticalScroll
  48055. } = useTable(props);
  48056. expose({
  48057. scrollTo,
  48058. scrollToLeft,
  48059. scrollToTop,
  48060. scrollToRow
  48061. });
  48062. provide(TableV2InjectionKey, {
  48063. ns: ns2,
  48064. isResetting,
  48065. hoveringRowKey,
  48066. isScrolling
  48067. });
  48068. return () => {
  48069. const {
  48070. cache: cache2,
  48071. cellProps,
  48072. estimatedRowHeight,
  48073. expandColumnKey: expandColumnKey2,
  48074. fixedData,
  48075. headerHeight,
  48076. headerClass,
  48077. headerProps,
  48078. headerCellProps,
  48079. sortBy: sortBy2,
  48080. sortState,
  48081. rowHeight,
  48082. rowClass,
  48083. rowEventHandlers,
  48084. rowKey: rowKey2,
  48085. rowProps: rowProps2,
  48086. scrollbarAlwaysOn,
  48087. indentSize,
  48088. iconSize,
  48089. useIsScrolling,
  48090. vScrollbarSize,
  48091. width
  48092. } = props;
  48093. const _data = unref(data);
  48094. const mainTableProps = {
  48095. cache: cache2,
  48096. class: ns2.e("main"),
  48097. columns: unref(mainColumns),
  48098. data: _data,
  48099. fixedData,
  48100. estimatedRowHeight,
  48101. bodyWidth: unref(bodyWidth),
  48102. headerHeight,
  48103. headerWidth: unref(headerWidth),
  48104. height: unref(mainTableHeight),
  48105. mainTableRef,
  48106. rowKey: rowKey2,
  48107. rowHeight,
  48108. scrollbarAlwaysOn,
  48109. scrollbarStartGap: 2,
  48110. scrollbarEndGap: vScrollbarSize,
  48111. useIsScrolling,
  48112. width,
  48113. getRowHeight,
  48114. onRowsRendered,
  48115. onScroll
  48116. };
  48117. const leftColumnsWidth = unref(leftTableWidth);
  48118. const _fixedTableHeight = unref(fixedTableHeight);
  48119. const leftTableProps = {
  48120. cache: cache2,
  48121. class: ns2.e("left"),
  48122. columns: unref(fixedColumnsOnLeft),
  48123. data: _data,
  48124. estimatedRowHeight,
  48125. leftTableRef,
  48126. rowHeight,
  48127. bodyWidth: leftColumnsWidth,
  48128. headerWidth: leftColumnsWidth,
  48129. headerHeight,
  48130. height: _fixedTableHeight,
  48131. rowKey: rowKey2,
  48132. scrollbarAlwaysOn,
  48133. scrollbarStartGap: 2,
  48134. scrollbarEndGap: vScrollbarSize,
  48135. useIsScrolling,
  48136. width: leftColumnsWidth,
  48137. getRowHeight,
  48138. onScroll: onVerticalScroll
  48139. };
  48140. const rightColumnsWidth = unref(rightTableWidth);
  48141. const rightColumnsWidthWithScrollbar = rightColumnsWidth + vScrollbarSize;
  48142. const rightTableProps = {
  48143. cache: cache2,
  48144. class: ns2.e("right"),
  48145. columns: unref(fixedColumnsOnRight),
  48146. data: _data,
  48147. estimatedRowHeight,
  48148. rightTableRef,
  48149. rowHeight,
  48150. bodyWidth: rightColumnsWidthWithScrollbar,
  48151. headerWidth: rightColumnsWidthWithScrollbar,
  48152. headerHeight,
  48153. height: _fixedTableHeight,
  48154. rowKey: rowKey2,
  48155. scrollbarAlwaysOn,
  48156. scrollbarStartGap: 2,
  48157. scrollbarEndGap: vScrollbarSize,
  48158. width: rightColumnsWidthWithScrollbar,
  48159. style: `--${unref(ns2.namespace)}-table-scrollbar-size: ${vScrollbarSize}px`,
  48160. useIsScrolling,
  48161. getRowHeight,
  48162. onScroll: onVerticalScroll
  48163. };
  48164. const _columnsStyles = unref(columnsStyles);
  48165. const tableRowProps = {
  48166. ns: ns2,
  48167. depthMap: unref(depthMap),
  48168. columnsStyles: _columnsStyles,
  48169. expandColumnKey: expandColumnKey2,
  48170. expandedRowKeys: unref(expandedRowKeys),
  48171. estimatedRowHeight,
  48172. hasFixedColumns: unref(hasFixedColumns),
  48173. hoveringRowKey: unref(hoveringRowKey),
  48174. rowProps: rowProps2,
  48175. rowClass,
  48176. rowKey: rowKey2,
  48177. rowEventHandlers,
  48178. onRowHovered,
  48179. onRowExpanded,
  48180. onRowHeightChange
  48181. };
  48182. const tableCellProps = {
  48183. cellProps,
  48184. expandColumnKey: expandColumnKey2,
  48185. indentSize,
  48186. iconSize,
  48187. rowKey: rowKey2,
  48188. expandedRowKeys: unref(expandedRowKeys),
  48189. ns: ns2
  48190. };
  48191. const tableHeaderProps = {
  48192. ns: ns2,
  48193. headerClass,
  48194. headerProps,
  48195. columnsStyles: _columnsStyles
  48196. };
  48197. const tableHeaderCellProps = {
  48198. ns: ns2,
  48199. sortBy: sortBy2,
  48200. sortState,
  48201. headerCellProps,
  48202. onColumnSorted
  48203. };
  48204. const tableSlots = {
  48205. row: (props2) => createVNode(RowRenderer, mergeProps(props2, tableRowProps), {
  48206. row: slots.row,
  48207. cell: (props3) => {
  48208. let _slot;
  48209. return slots.cell ? createVNode(CellRenderer, mergeProps(props3, tableCellProps, {
  48210. "style": _columnsStyles[props3.column.key]
  48211. }), _isSlot6(_slot = slots.cell(props3)) ? _slot : {
  48212. default: () => [_slot]
  48213. }) : createVNode(CellRenderer, mergeProps(props3, tableCellProps, {
  48214. "style": _columnsStyles[props3.column.key]
  48215. }), null);
  48216. }
  48217. }),
  48218. header: (props2) => createVNode(HeaderRenderer, mergeProps(props2, tableHeaderProps), {
  48219. header: slots.header,
  48220. cell: (props3) => {
  48221. let _slot2;
  48222. return slots["header-cell"] ? createVNode(HeaderCellRenderer, mergeProps(props3, tableHeaderCellProps, {
  48223. "style": _columnsStyles[props3.column.key]
  48224. }), _isSlot6(_slot2 = slots["header-cell"](props3)) ? _slot2 : {
  48225. default: () => [_slot2]
  48226. }) : createVNode(HeaderCellRenderer, mergeProps(props3, tableHeaderCellProps, {
  48227. "style": _columnsStyles[props3.column.key]
  48228. }), null);
  48229. }
  48230. })
  48231. };
  48232. const rootKls = [props.class, ns2.b(), ns2.e("root"), {
  48233. [ns2.is("dynamic")]: unref(isDynamic)
  48234. }];
  48235. const footerProps = {
  48236. class: ns2.e("footer"),
  48237. style: unref(footerHeight)
  48238. };
  48239. return createVNode("div", {
  48240. "class": rootKls,
  48241. "style": unref(rootStyle)
  48242. }, [createVNode(MainTable, mainTableProps, _isSlot6(tableSlots) ? tableSlots : {
  48243. default: () => [tableSlots]
  48244. }), createVNode(LeftTable, leftTableProps, _isSlot6(tableSlots) ? tableSlots : {
  48245. default: () => [tableSlots]
  48246. }), createVNode(LeftTable2, rightTableProps, _isSlot6(tableSlots) ? tableSlots : {
  48247. default: () => [tableSlots]
  48248. }), slots.footer && createVNode(Footer2, footerProps, {
  48249. default: slots.footer
  48250. }), unref(showEmpty) && createVNode(Footer3, {
  48251. "class": ns2.e("empty"),
  48252. "style": unref(emptyStyle)
  48253. }, {
  48254. default: slots.empty
  48255. }), slots.overlay && createVNode(Overlay2, {
  48256. "class": ns2.e("overlay")
  48257. }, {
  48258. default: slots.overlay
  48259. })]);
  48260. };
  48261. }
  48262. });
  48263. // node_modules/element-plus/es/components/table-v2/src/auto-resizer.mjs
  48264. var autoResizerProps = buildProps({
  48265. disableWidth: Boolean,
  48266. disableHeight: Boolean,
  48267. onResize: {
  48268. type: definePropType(Function)
  48269. }
  48270. });
  48271. // node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs
  48272. var AutoResizer = defineComponent({
  48273. name: "ElAutoResizer",
  48274. props: autoResizerProps,
  48275. setup(props, {
  48276. slots
  48277. }) {
  48278. const ns2 = useNamespace("auto-resizer");
  48279. const {
  48280. height,
  48281. width,
  48282. sizer
  48283. } = useAutoResize(props);
  48284. const style = {
  48285. width: "100%",
  48286. height: "100%"
  48287. };
  48288. return () => {
  48289. var _a2;
  48290. return createVNode("div", {
  48291. "ref": sizer,
  48292. "class": ns2.b(),
  48293. "style": style
  48294. }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots, {
  48295. height: height.value,
  48296. width: width.value
  48297. })]);
  48298. };
  48299. }
  48300. });
  48301. // node_modules/element-plus/es/components/table-v2/index.mjs
  48302. var ElTableV2 = withInstall(TableV2);
  48303. var ElAutoResizer = withInstall(AutoResizer);
  48304. // node_modules/element-plus/es/components/tabs/src/tab-bar.mjs
  48305. var tabBarProps = buildProps({
  48306. tabs: {
  48307. type: definePropType(Array),
  48308. default: () => mutable([])
  48309. }
  48310. });
  48311. // node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs
  48312. var COMPONENT_NAME21 = "ElTabBar";
  48313. var __default__80 = defineComponent({
  48314. name: COMPONENT_NAME21
  48315. });
  48316. var _sfc_main122 = defineComponent({
  48317. ...__default__80,
  48318. props: tabBarProps,
  48319. setup(__props, { expose }) {
  48320. const props = __props;
  48321. const instance = getCurrentInstance();
  48322. const rootTabs = inject(tabsRootContextKey);
  48323. if (!rootTabs)
  48324. throwError(COMPONENT_NAME21, "<el-tabs><el-tab-bar /></el-tabs>");
  48325. const ns2 = useNamespace("tabs");
  48326. const barRef = ref();
  48327. const barStyle = ref();
  48328. const getBarStyle = () => {
  48329. let offset2 = 0;
  48330. let tabSize = 0;
  48331. const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
  48332. const sizeDir = sizeName === "width" ? "x" : "y";
  48333. const position = sizeDir === "x" ? "left" : "top";
  48334. props.tabs.every((tab) => {
  48335. var _a2, _b;
  48336. const $el = (_b = (_a2 = instance.parent) == null ? void 0 : _a2.refs) == null ? void 0 : _b[`tab-${tab.uid}`];
  48337. if (!$el)
  48338. return false;
  48339. if (!tab.active) {
  48340. return true;
  48341. }
  48342. offset2 = $el[`offset${capitalize3(position)}`];
  48343. tabSize = $el[`client${capitalize3(sizeName)}`];
  48344. const tabStyles = window.getComputedStyle($el);
  48345. if (sizeName === "width") {
  48346. if (props.tabs.length > 1) {
  48347. tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
  48348. }
  48349. offset2 += Number.parseFloat(tabStyles.paddingLeft);
  48350. }
  48351. return false;
  48352. });
  48353. return {
  48354. [sizeName]: `${tabSize}px`,
  48355. transform: `translate${capitalize3(sizeDir)}(${offset2}px)`
  48356. };
  48357. };
  48358. const update2 = () => barStyle.value = getBarStyle();
  48359. watch(() => props.tabs, async () => {
  48360. await nextTick();
  48361. update2();
  48362. }, { immediate: true });
  48363. useResizeObserver(barRef, () => update2());
  48364. expose({
  48365. ref: barRef,
  48366. update: update2
  48367. });
  48368. return (_ctx, _cache) => {
  48369. return openBlock(), createElementBlock("div", {
  48370. ref_key: "barRef",
  48371. ref: barRef,
  48372. class: normalizeClass([unref(ns2).e("active-bar"), unref(ns2).is(unref(rootTabs).props.tabPosition)]),
  48373. style: normalizeStyle(barStyle.value)
  48374. }, null, 6);
  48375. };
  48376. }
  48377. });
  48378. var TabBar = _export_sfc(_sfc_main122, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);
  48379. // node_modules/element-plus/es/components/tabs/src/tab-nav.mjs
  48380. var tabNavProps = buildProps({
  48381. panes: {
  48382. type: definePropType(Array),
  48383. default: () => mutable([])
  48384. },
  48385. currentName: {
  48386. type: [String, Number],
  48387. default: ""
  48388. },
  48389. editable: Boolean,
  48390. type: {
  48391. type: String,
  48392. values: ["card", "border-card", ""],
  48393. default: ""
  48394. },
  48395. stretch: Boolean
  48396. });
  48397. var tabNavEmits = {
  48398. tabClick: (tab, tabName, ev) => ev instanceof Event,
  48399. tabRemove: (tab, ev) => ev instanceof Event
  48400. };
  48401. var COMPONENT_NAME22 = "ElTabNav";
  48402. var TabNav = defineComponent({
  48403. name: COMPONENT_NAME22,
  48404. props: tabNavProps,
  48405. emits: tabNavEmits,
  48406. setup(props, {
  48407. expose,
  48408. emit
  48409. }) {
  48410. const vm = getCurrentInstance();
  48411. const rootTabs = inject(tabsRootContextKey);
  48412. if (!rootTabs)
  48413. throwError(COMPONENT_NAME22, `<el-tabs><tab-nav /></el-tabs>`);
  48414. const ns2 = useNamespace("tabs");
  48415. const visibility = useDocumentVisibility();
  48416. const focused = useWindowFocus();
  48417. const navScroll$ = ref();
  48418. const nav$ = ref();
  48419. const el$ = ref();
  48420. const scrollable = ref(false);
  48421. const navOffset = ref(0);
  48422. const isFocus = ref(false);
  48423. const focusable = ref(true);
  48424. const sizeName = computed2(() => ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height");
  48425. const navStyle = computed2(() => {
  48426. const dir = sizeName.value === "width" ? "X" : "Y";
  48427. return {
  48428. transform: `translate${dir}(-${navOffset.value}px)`
  48429. };
  48430. });
  48431. const scrollPrev = () => {
  48432. if (!navScroll$.value)
  48433. return;
  48434. const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`];
  48435. const currentOffset = navOffset.value;
  48436. if (!currentOffset)
  48437. return;
  48438. const newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0;
  48439. navOffset.value = newOffset;
  48440. };
  48441. const scrollNext = () => {
  48442. if (!navScroll$.value || !nav$.value)
  48443. return;
  48444. const navSize = nav$.value[`offset${capitalize3(sizeName.value)}`];
  48445. const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`];
  48446. const currentOffset = navOffset.value;
  48447. if (navSize - currentOffset <= containerSize)
  48448. return;
  48449. const newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
  48450. navOffset.value = newOffset;
  48451. };
  48452. const scrollToActiveTab = async () => {
  48453. const nav = nav$.value;
  48454. if (!scrollable.value || !el$.value || !navScroll$.value || !nav)
  48455. return;
  48456. await nextTick();
  48457. const activeTab = el$.value.querySelector(".is-active");
  48458. if (!activeTab)
  48459. return;
  48460. const navScroll = navScroll$.value;
  48461. const isHorizontal2 = ["top", "bottom"].includes(rootTabs.props.tabPosition);
  48462. const activeTabBounding = activeTab.getBoundingClientRect();
  48463. const navScrollBounding = navScroll.getBoundingClientRect();
  48464. const maxOffset = isHorizontal2 ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
  48465. const currentOffset = navOffset.value;
  48466. let newOffset = currentOffset;
  48467. if (isHorizontal2) {
  48468. if (activeTabBounding.left < navScrollBounding.left) {
  48469. newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
  48470. }
  48471. if (activeTabBounding.right > navScrollBounding.right) {
  48472. newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
  48473. }
  48474. } else {
  48475. if (activeTabBounding.top < navScrollBounding.top) {
  48476. newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
  48477. }
  48478. if (activeTabBounding.bottom > navScrollBounding.bottom) {
  48479. newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
  48480. }
  48481. }
  48482. newOffset = Math.max(newOffset, 0);
  48483. navOffset.value = Math.min(newOffset, maxOffset);
  48484. };
  48485. const update2 = () => {
  48486. if (!nav$.value || !navScroll$.value)
  48487. return;
  48488. const navSize = nav$.value[`offset${capitalize3(sizeName.value)}`];
  48489. const containerSize = navScroll$.value[`offset${capitalize3(sizeName.value)}`];
  48490. const currentOffset = navOffset.value;
  48491. if (containerSize < navSize) {
  48492. const currentOffset2 = navOffset.value;
  48493. scrollable.value = scrollable.value || {};
  48494. scrollable.value.prev = currentOffset2;
  48495. scrollable.value.next = currentOffset2 + containerSize < navSize;
  48496. if (navSize - currentOffset2 < containerSize) {
  48497. navOffset.value = navSize - containerSize;
  48498. }
  48499. } else {
  48500. scrollable.value = false;
  48501. if (currentOffset > 0) {
  48502. navOffset.value = 0;
  48503. }
  48504. }
  48505. };
  48506. const changeTab = (e) => {
  48507. const code = e.code;
  48508. const {
  48509. up: up2,
  48510. down: down2,
  48511. left: left2,
  48512. right: right2
  48513. } = EVENT_CODE;
  48514. if (![up2, down2, left2, right2].includes(code))
  48515. return;
  48516. const tabList = Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
  48517. const currentIndex = tabList.indexOf(e.target);
  48518. let nextIndex;
  48519. if (code === left2 || code === up2) {
  48520. if (currentIndex === 0) {
  48521. nextIndex = tabList.length - 1;
  48522. } else {
  48523. nextIndex = currentIndex - 1;
  48524. }
  48525. } else {
  48526. if (currentIndex < tabList.length - 1) {
  48527. nextIndex = currentIndex + 1;
  48528. } else {
  48529. nextIndex = 0;
  48530. }
  48531. }
  48532. tabList[nextIndex].focus({
  48533. preventScroll: true
  48534. });
  48535. tabList[nextIndex].click();
  48536. setFocus();
  48537. };
  48538. const setFocus = () => {
  48539. if (focusable.value)
  48540. isFocus.value = true;
  48541. };
  48542. const removeFocus = () => isFocus.value = false;
  48543. watch(visibility, (visibility2) => {
  48544. if (visibility2 === "hidden") {
  48545. focusable.value = false;
  48546. } else if (visibility2 === "visible") {
  48547. setTimeout(() => focusable.value = true, 50);
  48548. }
  48549. });
  48550. watch(focused, (focused2) => {
  48551. if (focused2) {
  48552. setTimeout(() => focusable.value = true, 50);
  48553. } else {
  48554. focusable.value = false;
  48555. }
  48556. });
  48557. useResizeObserver(el$, update2);
  48558. onMounted(() => setTimeout(() => scrollToActiveTab(), 0));
  48559. onUpdated(() => update2());
  48560. expose({
  48561. scrollToActiveTab,
  48562. removeFocus
  48563. });
  48564. watch(() => props.panes, () => vm.update(), {
  48565. flush: "post"
  48566. });
  48567. return () => {
  48568. const scrollBtn = scrollable.value ? [createVNode("span", {
  48569. "class": [ns2.e("nav-prev"), ns2.is("disabled", !scrollable.value.prev)],
  48570. "onClick": scrollPrev
  48571. }, [createVNode(ElIcon, null, {
  48572. default: () => [createVNode(arrow_left_default, null, null)]
  48573. })]), createVNode("span", {
  48574. "class": [ns2.e("nav-next"), ns2.is("disabled", !scrollable.value.next)],
  48575. "onClick": scrollNext
  48576. }, [createVNode(ElIcon, null, {
  48577. default: () => [createVNode(arrow_right_default, null, null)]
  48578. })])] : null;
  48579. const tabs = props.panes.map((pane, index) => {
  48580. var _a2, _b, _c, _d;
  48581. const uid2 = pane.uid;
  48582. const disabled = pane.props.disabled;
  48583. const tabName = (_b = (_a2 = pane.props.name) != null ? _a2 : pane.index) != null ? _b : `${index}`;
  48584. const closable = !disabled && (pane.isClosable || props.editable);
  48585. pane.index = `${index}`;
  48586. const btnClose = closable ? createVNode(ElIcon, {
  48587. "class": "is-icon-close",
  48588. "onClick": (ev) => emit("tabRemove", pane, ev)
  48589. }, {
  48590. default: () => [createVNode(close_default, null, null)]
  48591. }) : null;
  48592. const tabLabelContent = ((_d = (_c = pane.slots).label) == null ? void 0 : _d.call(_c)) || pane.props.label;
  48593. const tabindex = !disabled && pane.active ? 0 : -1;
  48594. return createVNode("div", {
  48595. "ref": `tab-${uid2}`,
  48596. "class": [ns2.e("item"), ns2.is(rootTabs.props.tabPosition), ns2.is("active", pane.active), ns2.is("disabled", disabled), ns2.is("closable", closable), ns2.is("focus", isFocus.value)],
  48597. "id": `tab-${tabName}`,
  48598. "key": `tab-${uid2}`,
  48599. "aria-controls": `pane-${tabName}`,
  48600. "role": "tab",
  48601. "aria-selected": pane.active,
  48602. "tabindex": tabindex,
  48603. "onFocus": () => setFocus(),
  48604. "onBlur": () => removeFocus(),
  48605. "onClick": (ev) => {
  48606. removeFocus();
  48607. emit("tabClick", pane, tabName, ev);
  48608. },
  48609. "onKeydown": (ev) => {
  48610. if (closable && (ev.code === EVENT_CODE.delete || ev.code === EVENT_CODE.backspace)) {
  48611. emit("tabRemove", pane, ev);
  48612. }
  48613. }
  48614. }, [...[tabLabelContent, btnClose]]);
  48615. });
  48616. return createVNode("div", {
  48617. "ref": el$,
  48618. "class": [ns2.e("nav-wrap"), ns2.is("scrollable", !!scrollable.value), ns2.is(rootTabs.props.tabPosition)]
  48619. }, [scrollBtn, createVNode("div", {
  48620. "class": ns2.e("nav-scroll"),
  48621. "ref": navScroll$
  48622. }, [createVNode("div", {
  48623. "class": [ns2.e("nav"), ns2.is(rootTabs.props.tabPosition), ns2.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))],
  48624. "ref": nav$,
  48625. "style": navStyle.value,
  48626. "role": "tablist",
  48627. "onKeydown": changeTab
  48628. }, [...[!props.type ? createVNode(TabBar, {
  48629. "tabs": [...props.panes]
  48630. }, null) : null, tabs]])])]);
  48631. };
  48632. }
  48633. });
  48634. // node_modules/element-plus/es/components/tabs/src/tabs.mjs
  48635. var tabsProps = buildProps({
  48636. type: {
  48637. type: String,
  48638. values: ["card", "border-card", ""],
  48639. default: ""
  48640. },
  48641. activeName: {
  48642. type: [String, Number]
  48643. },
  48644. closable: Boolean,
  48645. addable: Boolean,
  48646. modelValue: {
  48647. type: [String, Number]
  48648. },
  48649. editable: Boolean,
  48650. tabPosition: {
  48651. type: String,
  48652. values: ["top", "right", "bottom", "left"],
  48653. default: "top"
  48654. },
  48655. beforeLeave: {
  48656. type: definePropType(Function),
  48657. default: () => true
  48658. },
  48659. stretch: Boolean
  48660. });
  48661. var isPaneName = (value) => isString(value) || isNumber2(value);
  48662. var tabsEmits = {
  48663. [UPDATE_MODEL_EVENT]: (name) => isPaneName(name),
  48664. tabClick: (pane, ev) => ev instanceof Event,
  48665. tabChange: (name) => isPaneName(name),
  48666. edit: (paneName, action) => ["remove", "add"].includes(action),
  48667. tabRemove: (name) => isPaneName(name),
  48668. tabAdd: () => true
  48669. };
  48670. var Tabs = defineComponent({
  48671. name: "ElTabs",
  48672. props: tabsProps,
  48673. emits: tabsEmits,
  48674. setup(props, {
  48675. emit,
  48676. slots,
  48677. expose
  48678. }) {
  48679. var _a2, _b;
  48680. const ns2 = useNamespace("tabs");
  48681. const {
  48682. children: panes,
  48683. addChild: registerPane,
  48684. removeChild: unregisterPane
  48685. } = useOrderedChildren(getCurrentInstance(), "ElTabPane");
  48686. const nav$ = ref();
  48687. const currentName = ref((_b = (_a2 = props.modelValue) != null ? _a2 : props.activeName) != null ? _b : "0");
  48688. const changeCurrentName = (value) => {
  48689. currentName.value = value;
  48690. emit(UPDATE_MODEL_EVENT, value);
  48691. emit("tabChange", value);
  48692. };
  48693. const setCurrentName = async (value) => {
  48694. var _a22, _b2, _c;
  48695. if (currentName.value === value || isUndefined2(value))
  48696. return;
  48697. try {
  48698. const canLeave = await ((_a22 = props.beforeLeave) == null ? void 0 : _a22.call(props, value, currentName.value));
  48699. if (canLeave !== false) {
  48700. changeCurrentName(value);
  48701. (_c = (_b2 = nav$.value) == null ? void 0 : _b2.removeFocus) == null ? void 0 : _c.call(_b2);
  48702. }
  48703. } catch (e) {
  48704. }
  48705. };
  48706. const handleTabClick = (tab, tabName, event) => {
  48707. if (tab.props.disabled)
  48708. return;
  48709. setCurrentName(tabName);
  48710. emit("tabClick", tab, event);
  48711. };
  48712. const handleTabRemove = (pane, ev) => {
  48713. if (pane.props.disabled || isUndefined2(pane.props.name))
  48714. return;
  48715. ev.stopPropagation();
  48716. emit("edit", pane.props.name, "remove");
  48717. emit("tabRemove", pane.props.name);
  48718. };
  48719. const handleTabAdd = () => {
  48720. emit("edit", void 0, "add");
  48721. emit("tabAdd");
  48722. };
  48723. useDeprecated({
  48724. from: '"activeName"',
  48725. replacement: '"model-value" or "v-model"',
  48726. scope: "ElTabs",
  48727. version: "2.3.0",
  48728. ref: "https://element-plus.org/en-US/component/tabs.html#attributes",
  48729. type: "Attribute"
  48730. }, computed2(() => !!props.activeName));
  48731. watch(() => props.activeName, (modelValue) => setCurrentName(modelValue));
  48732. watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue));
  48733. watch(currentName, async () => {
  48734. var _a22;
  48735. await nextTick();
  48736. (_a22 = nav$.value) == null ? void 0 : _a22.scrollToActiveTab();
  48737. });
  48738. provide(tabsRootContextKey, {
  48739. props,
  48740. currentName,
  48741. registerPane,
  48742. unregisterPane
  48743. });
  48744. expose({
  48745. currentName
  48746. });
  48747. return () => {
  48748. const newButton = props.editable || props.addable ? createVNode("span", {
  48749. "class": ns2.e("new-tab"),
  48750. "tabindex": "0",
  48751. "onClick": handleTabAdd,
  48752. "onKeydown": (ev) => {
  48753. if (ev.code === EVENT_CODE.enter)
  48754. handleTabAdd();
  48755. }
  48756. }, [createVNode(ElIcon, {
  48757. "class": ns2.is("icon-plus")
  48758. }, {
  48759. default: () => [createVNode(plus_default, null, null)]
  48760. })]) : null;
  48761. const header = createVNode("div", {
  48762. "class": [ns2.e("header"), ns2.is(props.tabPosition)]
  48763. }, [newButton, createVNode(TabNav, {
  48764. "ref": nav$,
  48765. "currentName": currentName.value,
  48766. "editable": props.editable,
  48767. "type": props.type,
  48768. "panes": panes.value,
  48769. "stretch": props.stretch,
  48770. "onTabClick": handleTabClick,
  48771. "onTabRemove": handleTabRemove
  48772. }, null)]);
  48773. const panels = createVNode("div", {
  48774. "class": ns2.e("content")
  48775. }, [renderSlot(slots, "default")]);
  48776. return createVNode("div", {
  48777. "class": [ns2.b(), ns2.m(props.tabPosition), {
  48778. [ns2.m("card")]: props.type === "card",
  48779. [ns2.m("border-card")]: props.type === "border-card"
  48780. }]
  48781. }, [...props.tabPosition !== "bottom" ? [header, panels] : [panels, header]]);
  48782. };
  48783. }
  48784. });
  48785. // node_modules/element-plus/es/components/tabs/src/tab-pane.mjs
  48786. var tabPaneProps = buildProps({
  48787. label: {
  48788. type: String,
  48789. default: ""
  48790. },
  48791. name: {
  48792. type: [String, Number]
  48793. },
  48794. closable: Boolean,
  48795. disabled: Boolean,
  48796. lazy: Boolean
  48797. });
  48798. // node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs
  48799. var _hoisted_161 = ["id", "aria-hidden", "aria-labelledby"];
  48800. var COMPONENT_NAME23 = "ElTabPane";
  48801. var __default__81 = defineComponent({
  48802. name: COMPONENT_NAME23
  48803. });
  48804. var _sfc_main123 = defineComponent({
  48805. ...__default__81,
  48806. props: tabPaneProps,
  48807. setup(__props) {
  48808. const props = __props;
  48809. const instance = getCurrentInstance();
  48810. const slots = useSlots();
  48811. const tabsRoot = inject(tabsRootContextKey);
  48812. if (!tabsRoot)
  48813. throwError(COMPONENT_NAME23, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
  48814. const ns2 = useNamespace("tab-pane");
  48815. const index = ref();
  48816. const isClosable = computed2(() => props.closable || tabsRoot.props.closable);
  48817. const active = computedEager(() => {
  48818. var _a2;
  48819. return tabsRoot.currentName.value === ((_a2 = props.name) != null ? _a2 : index.value);
  48820. });
  48821. const loaded = ref(active.value);
  48822. const paneName = computed2(() => {
  48823. var _a2;
  48824. return (_a2 = props.name) != null ? _a2 : index.value;
  48825. });
  48826. const shouldBeRender = computedEager(() => !props.lazy || loaded.value || active.value);
  48827. watch(active, (val) => {
  48828. if (val)
  48829. loaded.value = true;
  48830. });
  48831. const pane = reactive({
  48832. uid: instance.uid,
  48833. slots,
  48834. props,
  48835. paneName,
  48836. active,
  48837. index,
  48838. isClosable
  48839. });
  48840. onMounted(() => {
  48841. tabsRoot.registerPane(pane);
  48842. });
  48843. onUnmounted(() => {
  48844. tabsRoot.unregisterPane(pane.uid);
  48845. });
  48846. return (_ctx, _cache) => {
  48847. return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
  48848. key: 0,
  48849. id: `pane-${unref(paneName)}`,
  48850. class: normalizeClass(unref(ns2).b()),
  48851. role: "tabpanel",
  48852. "aria-hidden": !unref(active),
  48853. "aria-labelledby": `tab-${unref(paneName)}`
  48854. }, [
  48855. renderSlot(_ctx.$slots, "default")
  48856. ], 10, _hoisted_161)), [
  48857. [vShow, unref(active)]
  48858. ]) : createCommentVNode("v-if", true);
  48859. };
  48860. }
  48861. });
  48862. var TabPane = _export_sfc(_sfc_main123, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);
  48863. // node_modules/element-plus/es/components/tabs/index.mjs
  48864. var ElTabs = withInstall(Tabs, {
  48865. TabPane
  48866. });
  48867. var ElTabPane = withNoopInstall(TabPane);
  48868. // node_modules/element-plus/es/components/time-select/src/time-select2.mjs
  48869. var import_dayjs16 = __toESM(require_dayjs_min(), 1);
  48870. var import_customParseFormat3 = __toESM(require_customParseFormat(), 1);
  48871. // node_modules/element-plus/es/components/time-select/src/time-select.mjs
  48872. var timeSelectProps = buildProps({
  48873. format: {
  48874. type: String,
  48875. default: "HH:mm"
  48876. },
  48877. modelValue: String,
  48878. disabled: Boolean,
  48879. editable: {
  48880. type: Boolean,
  48881. default: true
  48882. },
  48883. effect: {
  48884. type: String,
  48885. default: "light"
  48886. },
  48887. clearable: {
  48888. type: Boolean,
  48889. default: true
  48890. },
  48891. size: useSizeProp,
  48892. placeholder: String,
  48893. start: {
  48894. type: String,
  48895. default: "09:00"
  48896. },
  48897. end: {
  48898. type: String,
  48899. default: "18:00"
  48900. },
  48901. step: {
  48902. type: String,
  48903. default: "00:30"
  48904. },
  48905. minTime: String,
  48906. maxTime: String,
  48907. name: String,
  48908. prefixIcon: {
  48909. type: definePropType([String, Object]),
  48910. default: () => clock_default
  48911. },
  48912. clearIcon: {
  48913. type: definePropType([String, Object]),
  48914. default: () => circle_close_default
  48915. }
  48916. });
  48917. // node_modules/element-plus/es/components/time-select/src/utils.mjs
  48918. var parseTime = (time) => {
  48919. const values2 = (time || "").split(":");
  48920. if (values2.length >= 2) {
  48921. let hours = Number.parseInt(values2[0], 10);
  48922. const minutes = Number.parseInt(values2[1], 10);
  48923. const timeUpper = time.toUpperCase();
  48924. if (timeUpper.includes("AM") && hours === 12) {
  48925. hours = 0;
  48926. } else if (timeUpper.includes("PM") && hours !== 12) {
  48927. hours += 12;
  48928. }
  48929. return {
  48930. hours,
  48931. minutes
  48932. };
  48933. }
  48934. return null;
  48935. };
  48936. var compareTime = (time1, time2) => {
  48937. const value1 = parseTime(time1);
  48938. if (!value1)
  48939. return -1;
  48940. const value2 = parseTime(time2);
  48941. if (!value2)
  48942. return -1;
  48943. const minutes1 = value1.minutes + value1.hours * 60;
  48944. const minutes2 = value2.minutes + value2.hours * 60;
  48945. if (minutes1 === minutes2) {
  48946. return 0;
  48947. }
  48948. return minutes1 > minutes2 ? 1 : -1;
  48949. };
  48950. var padTime = (time) => {
  48951. return `${time}`.padStart(2, "0");
  48952. };
  48953. var formatTime2 = (time) => {
  48954. return `${padTime(time.hours)}:${padTime(time.minutes)}`;
  48955. };
  48956. var nextTime = (time, step) => {
  48957. const timeValue = parseTime(time);
  48958. if (!timeValue)
  48959. return "";
  48960. const stepValue = parseTime(step);
  48961. if (!stepValue)
  48962. return "";
  48963. const next = {
  48964. hours: timeValue.hours,
  48965. minutes: timeValue.minutes
  48966. };
  48967. next.minutes += stepValue.minutes;
  48968. next.hours += stepValue.hours;
  48969. next.hours += Math.floor(next.minutes / 60);
  48970. next.minutes = next.minutes % 60;
  48971. return formatTime2(next);
  48972. };
  48973. // node_modules/element-plus/es/components/time-select/src/time-select2.mjs
  48974. var __default__82 = defineComponent({
  48975. name: "ElTimeSelect"
  48976. });
  48977. var _sfc_main124 = defineComponent({
  48978. ...__default__82,
  48979. props: timeSelectProps,
  48980. emits: ["change", "blur", "focus", "update:modelValue"],
  48981. setup(__props, { expose }) {
  48982. const props = __props;
  48983. import_dayjs16.default.extend(import_customParseFormat3.default);
  48984. const { Option: ElOption2 } = ElSelect;
  48985. const nsInput = useNamespace("input");
  48986. const select = ref();
  48987. const _disabled = useDisabled();
  48988. const value = computed2(() => props.modelValue);
  48989. const start = computed2(() => {
  48990. const time = parseTime(props.start);
  48991. return time ? formatTime2(time) : null;
  48992. });
  48993. const end2 = computed2(() => {
  48994. const time = parseTime(props.end);
  48995. return time ? formatTime2(time) : null;
  48996. });
  48997. const step = computed2(() => {
  48998. const time = parseTime(props.step);
  48999. return time ? formatTime2(time) : null;
  49000. });
  49001. const minTime = computed2(() => {
  49002. const time = parseTime(props.minTime || "");
  49003. return time ? formatTime2(time) : null;
  49004. });
  49005. const maxTime = computed2(() => {
  49006. const time = parseTime(props.maxTime || "");
  49007. return time ? formatTime2(time) : null;
  49008. });
  49009. const items = computed2(() => {
  49010. const result2 = [];
  49011. if (props.start && props.end && props.step) {
  49012. let current = start.value;
  49013. let currentTime;
  49014. while (current && end2.value && compareTime(current, end2.value) <= 0) {
  49015. currentTime = (0, import_dayjs16.default)(current, "HH:mm").format(props.format);
  49016. result2.push({
  49017. value: currentTime,
  49018. disabled: compareTime(current, minTime.value || "-1:-1") <= 0 || compareTime(current, maxTime.value || "100:100") >= 0
  49019. });
  49020. current = nextTime(current, step.value);
  49021. }
  49022. }
  49023. return result2;
  49024. });
  49025. const blur = () => {
  49026. var _a2, _b;
  49027. (_b = (_a2 = select.value) == null ? void 0 : _a2.blur) == null ? void 0 : _b.call(_a2);
  49028. };
  49029. const focus = () => {
  49030. var _a2, _b;
  49031. (_b = (_a2 = select.value) == null ? void 0 : _a2.focus) == null ? void 0 : _b.call(_a2);
  49032. };
  49033. expose({
  49034. blur,
  49035. focus
  49036. });
  49037. return (_ctx, _cache) => {
  49038. return openBlock(), createBlock(unref(ElSelect), {
  49039. ref_key: "select",
  49040. ref: select,
  49041. "model-value": unref(value),
  49042. disabled: unref(_disabled),
  49043. clearable: _ctx.clearable,
  49044. "clear-icon": _ctx.clearIcon,
  49045. size: _ctx.size,
  49046. effect: _ctx.effect,
  49047. placeholder: _ctx.placeholder,
  49048. "default-first-option": "",
  49049. filterable: _ctx.editable,
  49050. "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit("update:modelValue", event)),
  49051. onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit("change", event)),
  49052. onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)),
  49053. onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event))
  49054. }, {
  49055. prefix: withCtx(() => [
  49056. _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
  49057. key: 0,
  49058. class: normalizeClass(unref(nsInput).e("prefix-icon"))
  49059. }, {
  49060. default: withCtx(() => [
  49061. (openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
  49062. ]),
  49063. _: 1
  49064. }, 8, ["class"])) : createCommentVNode("v-if", true)
  49065. ]),
  49066. default: withCtx(() => [
  49067. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
  49068. return openBlock(), createBlock(unref(ElOption2), {
  49069. key: item.value,
  49070. label: item.value,
  49071. value: item.value,
  49072. disabled: item.disabled
  49073. }, null, 8, ["label", "value", "disabled"]);
  49074. }), 128))
  49075. ]),
  49076. _: 1
  49077. }, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable"]);
  49078. };
  49079. }
  49080. });
  49081. var TimeSelect = _export_sfc(_sfc_main124, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);
  49082. // node_modules/element-plus/es/components/time-select/index.mjs
  49083. TimeSelect.install = (app) => {
  49084. app.component(TimeSelect.name, TimeSelect);
  49085. };
  49086. var _TimeSelect = TimeSelect;
  49087. var ElTimeSelect = _TimeSelect;
  49088. // node_modules/element-plus/es/components/timeline/src/timeline.mjs
  49089. var Timeline = defineComponent({
  49090. name: "ElTimeline",
  49091. setup(_2, { slots }) {
  49092. const ns2 = useNamespace("timeline");
  49093. provide("timeline", slots);
  49094. return () => {
  49095. return h("ul", { class: [ns2.b()] }, [renderSlot(slots, "default")]);
  49096. };
  49097. }
  49098. });
  49099. // node_modules/element-plus/es/components/timeline/src/timeline-item.mjs
  49100. var timelineItemProps = buildProps({
  49101. timestamp: {
  49102. type: String,
  49103. default: ""
  49104. },
  49105. hideTimestamp: {
  49106. type: Boolean,
  49107. default: false
  49108. },
  49109. center: {
  49110. type: Boolean,
  49111. default: false
  49112. },
  49113. placement: {
  49114. type: String,
  49115. values: ["top", "bottom"],
  49116. default: "bottom"
  49117. },
  49118. type: {
  49119. type: String,
  49120. values: ["primary", "success", "warning", "danger", "info"],
  49121. default: ""
  49122. },
  49123. color: {
  49124. type: String,
  49125. default: ""
  49126. },
  49127. size: {
  49128. type: String,
  49129. values: ["normal", "large"],
  49130. default: "normal"
  49131. },
  49132. icon: {
  49133. type: iconPropType
  49134. },
  49135. hollow: {
  49136. type: Boolean,
  49137. default: false
  49138. }
  49139. });
  49140. // node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs
  49141. var __default__83 = defineComponent({
  49142. name: "ElTimelineItem"
  49143. });
  49144. var _sfc_main125 = defineComponent({
  49145. ...__default__83,
  49146. props: timelineItemProps,
  49147. setup(__props) {
  49148. const ns2 = useNamespace("timeline-item");
  49149. return (_ctx, _cache) => {
  49150. return openBlock(), createElementBlock("li", {
  49151. class: normalizeClass([unref(ns2).b(), { [unref(ns2).e("center")]: _ctx.center }])
  49152. }, [
  49153. createBaseVNode("div", {
  49154. class: normalizeClass(unref(ns2).e("tail"))
  49155. }, null, 2),
  49156. !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
  49157. key: 0,
  49158. class: normalizeClass([
  49159. unref(ns2).e("node"),
  49160. unref(ns2).em("node", _ctx.size || ""),
  49161. unref(ns2).em("node", _ctx.type || ""),
  49162. unref(ns2).is("hollow", _ctx.hollow)
  49163. ]),
  49164. style: normalizeStyle({
  49165. backgroundColor: _ctx.color
  49166. })
  49167. }, [
  49168. _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
  49169. key: 0,
  49170. class: normalizeClass(unref(ns2).e("icon"))
  49171. }, {
  49172. default: withCtx(() => [
  49173. (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
  49174. ]),
  49175. _: 1
  49176. }, 8, ["class"])) : createCommentVNode("v-if", true)
  49177. ], 6)) : createCommentVNode("v-if", true),
  49178. _ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
  49179. key: 1,
  49180. class: normalizeClass(unref(ns2).e("dot"))
  49181. }, [
  49182. renderSlot(_ctx.$slots, "dot")
  49183. ], 2)) : createCommentVNode("v-if", true),
  49184. createBaseVNode("div", {
  49185. class: normalizeClass(unref(ns2).e("wrapper"))
  49186. }, [
  49187. !_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", {
  49188. key: 0,
  49189. class: normalizeClass([unref(ns2).e("timestamp"), unref(ns2).is("top")])
  49190. }, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true),
  49191. createBaseVNode("div", {
  49192. class: normalizeClass(unref(ns2).e("content"))
  49193. }, [
  49194. renderSlot(_ctx.$slots, "default")
  49195. ], 2),
  49196. !_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", {
  49197. key: 1,
  49198. class: normalizeClass([unref(ns2).e("timestamp"), unref(ns2).is("bottom")])
  49199. }, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true)
  49200. ], 2)
  49201. ], 2);
  49202. };
  49203. }
  49204. });
  49205. var TimelineItem = _export_sfc(_sfc_main125, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]);
  49206. // node_modules/element-plus/es/components/timeline/index.mjs
  49207. var ElTimeline = withInstall(Timeline, {
  49208. TimelineItem
  49209. });
  49210. var ElTimelineItem = withNoopInstall(TimelineItem);
  49211. // node_modules/element-plus/es/components/tooltip-v2/src/common.mjs
  49212. var tooltipV2CommonProps = buildProps({
  49213. nowrap: Boolean
  49214. });
  49215. var TooltipV2Sides = ((TooltipV2Sides2) => {
  49216. TooltipV2Sides2["top"] = "top";
  49217. TooltipV2Sides2["bottom"] = "bottom";
  49218. TooltipV2Sides2["left"] = "left";
  49219. TooltipV2Sides2["right"] = "right";
  49220. return TooltipV2Sides2;
  49221. })(TooltipV2Sides || {});
  49222. var tooltipV2Sides = Object.values(TooltipV2Sides);
  49223. // node_modules/element-plus/es/components/tooltip-v2/src/arrow.mjs
  49224. var tooltipV2ArrowProps = buildProps({
  49225. width: {
  49226. type: Number,
  49227. default: 10
  49228. },
  49229. height: {
  49230. type: Number,
  49231. default: 10
  49232. },
  49233. style: {
  49234. type: definePropType(Object),
  49235. default: null
  49236. }
  49237. });
  49238. var tooltipV2ArrowSpecialProps = buildProps({
  49239. side: {
  49240. type: definePropType(String),
  49241. values: tooltipV2Sides,
  49242. required: true
  49243. }
  49244. });
  49245. // node_modules/element-plus/es/components/tooltip-v2/src/content.mjs
  49246. var tooltipV2Strategies = ["absolute", "fixed"];
  49247. var tooltipV2Placements = [
  49248. "top-start",
  49249. "top-end",
  49250. "top",
  49251. "bottom-start",
  49252. "bottom-end",
  49253. "bottom",
  49254. "left-start",
  49255. "left-end",
  49256. "left",
  49257. "right-start",
  49258. "right-end",
  49259. "right"
  49260. ];
  49261. var tooltipV2ContentProps = buildProps({
  49262. ariaLabel: String,
  49263. arrowPadding: {
  49264. type: definePropType(Number),
  49265. default: 5
  49266. },
  49267. effect: {
  49268. type: String,
  49269. default: ""
  49270. },
  49271. contentClass: String,
  49272. placement: {
  49273. type: definePropType(String),
  49274. values: tooltipV2Placements,
  49275. default: "bottom"
  49276. },
  49277. reference: {
  49278. type: definePropType(Object),
  49279. default: null
  49280. },
  49281. offset: {
  49282. type: Number,
  49283. default: 8
  49284. },
  49285. strategy: {
  49286. type: definePropType(String),
  49287. values: tooltipV2Strategies,
  49288. default: "absolute"
  49289. },
  49290. showArrow: {
  49291. type: Boolean,
  49292. default: false
  49293. }
  49294. });
  49295. // node_modules/element-plus/es/components/tooltip-v2/src/root.mjs
  49296. var tooltipV2RootProps = buildProps({
  49297. delayDuration: {
  49298. type: Number,
  49299. default: 300
  49300. },
  49301. defaultOpen: Boolean,
  49302. open: {
  49303. type: Boolean,
  49304. default: void 0
  49305. },
  49306. onOpenChange: {
  49307. type: definePropType(Function)
  49308. },
  49309. "onUpdate:open": {
  49310. type: definePropType(Function)
  49311. }
  49312. });
  49313. // node_modules/element-plus/es/components/tooltip-v2/src/trigger.mjs
  49314. var EventHandler = {
  49315. type: definePropType(Function)
  49316. };
  49317. var tooltipV2TriggerProps = buildProps({
  49318. onBlur: EventHandler,
  49319. onClick: EventHandler,
  49320. onFocus: EventHandler,
  49321. onMouseDown: EventHandler,
  49322. onMouseEnter: EventHandler,
  49323. onMouseLeave: EventHandler
  49324. });
  49325. // node_modules/element-plus/es/components/tooltip-v2/src/tooltip.mjs
  49326. var tooltipV2Props = buildProps({
  49327. ...tooltipV2RootProps,
  49328. ...tooltipV2ArrowProps,
  49329. ...tooltipV2TriggerProps,
  49330. ...tooltipV2ContentProps,
  49331. alwaysOn: Boolean,
  49332. fullTransition: Boolean,
  49333. transitionProps: {
  49334. type: definePropType(Object),
  49335. default: null
  49336. },
  49337. teleported: Boolean,
  49338. to: {
  49339. type: definePropType(String),
  49340. default: "body"
  49341. }
  49342. });
  49343. // node_modules/element-plus/es/components/tooltip-v2/src/root2.mjs
  49344. var __default__84 = defineComponent({
  49345. name: "ElTooltipV2Root"
  49346. });
  49347. var _sfc_main126 = defineComponent({
  49348. ...__default__84,
  49349. props: tooltipV2RootProps,
  49350. setup(__props, { expose }) {
  49351. const props = __props;
  49352. const _open = ref(props.defaultOpen);
  49353. const triggerRef2 = ref(null);
  49354. const open = computed2({
  49355. get: () => isPropAbsent(props.open) ? _open.value : props.open,
  49356. set: (open2) => {
  49357. var _a2;
  49358. _open.value = open2;
  49359. (_a2 = props["onUpdate:open"]) == null ? void 0 : _a2.call(props, open2);
  49360. }
  49361. });
  49362. const isOpenDelayed = computed2(() => isNumber2(props.delayDuration) && props.delayDuration > 0);
  49363. const { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(() => {
  49364. open.value = true;
  49365. }, computed2(() => props.delayDuration), {
  49366. immediate: false
  49367. });
  49368. const ns2 = useNamespace("tooltip-v2");
  49369. const contentId = useId();
  49370. const onNormalOpen = () => {
  49371. clearTimer();
  49372. open.value = true;
  49373. };
  49374. const onDelayOpen = () => {
  49375. unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen();
  49376. };
  49377. const onOpen = onNormalOpen;
  49378. const onClose = () => {
  49379. clearTimer();
  49380. open.value = false;
  49381. };
  49382. const onChange = (open2) => {
  49383. var _a2;
  49384. if (open2) {
  49385. document.dispatchEvent(new CustomEvent(TOOLTIP_V2_OPEN));
  49386. onOpen();
  49387. }
  49388. (_a2 = props.onOpenChange) == null ? void 0 : _a2.call(props, open2);
  49389. };
  49390. watch(open, onChange);
  49391. onMounted(() => {
  49392. document.addEventListener(TOOLTIP_V2_OPEN, onClose);
  49393. });
  49394. onBeforeUnmount(() => {
  49395. clearTimer();
  49396. document.removeEventListener(TOOLTIP_V2_OPEN, onClose);
  49397. });
  49398. provide(tooltipV2RootKey, {
  49399. contentId,
  49400. triggerRef: triggerRef2,
  49401. ns: ns2,
  49402. onClose,
  49403. onDelayOpen,
  49404. onOpen
  49405. });
  49406. expose({
  49407. onOpen,
  49408. onClose
  49409. });
  49410. return (_ctx, _cache) => {
  49411. return renderSlot(_ctx.$slots, "default", { open: unref(open) });
  49412. };
  49413. }
  49414. });
  49415. var TooltipV2Root = _export_sfc(_sfc_main126, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/root.vue"]]);
  49416. // node_modules/element-plus/es/components/tooltip-v2/src/arrow2.mjs
  49417. var __default__85 = defineComponent({
  49418. name: "ElTooltipV2Arrow"
  49419. });
  49420. var _sfc_main127 = defineComponent({
  49421. ...__default__85,
  49422. props: {
  49423. ...tooltipV2ArrowProps,
  49424. ...tooltipV2ArrowSpecialProps
  49425. },
  49426. setup(__props) {
  49427. const props = __props;
  49428. const { ns: ns2 } = inject(tooltipV2RootKey);
  49429. const { arrowRef } = inject(tooltipV2ContentKey);
  49430. const arrowStyle = computed2(() => {
  49431. const { style, width, height } = props;
  49432. const namespace = ns2.namespace.value;
  49433. return {
  49434. [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
  49435. [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
  49436. [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
  49437. [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
  49438. ...style || {}
  49439. };
  49440. });
  49441. return (_ctx, _cache) => {
  49442. return openBlock(), createElementBlock("span", {
  49443. ref_key: "arrowRef",
  49444. ref: arrowRef,
  49445. style: normalizeStyle(unref(arrowStyle)),
  49446. class: normalizeClass(unref(ns2).e("arrow"))
  49447. }, null, 6);
  49448. };
  49449. }
  49450. });
  49451. var TooltipV2Arrow = _export_sfc(_sfc_main127, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/arrow.vue"]]);
  49452. // node_modules/element-plus/es/components/visual-hidden/src/visual-hidden.mjs
  49453. var visualHiddenProps = buildProps({
  49454. style: {
  49455. type: definePropType([String, Object, Array]),
  49456. default: () => ({})
  49457. }
  49458. });
  49459. // node_modules/element-plus/es/components/visual-hidden/src/visual-hidden2.mjs
  49460. var __default__86 = defineComponent({
  49461. name: "ElVisuallyHidden"
  49462. });
  49463. var _sfc_main128 = defineComponent({
  49464. ...__default__86,
  49465. props: visualHiddenProps,
  49466. setup(__props) {
  49467. const props = __props;
  49468. const computedStyle = computed2(() => {
  49469. return [
  49470. props.style,
  49471. {
  49472. position: "absolute",
  49473. border: 0,
  49474. width: 1,
  49475. height: 1,
  49476. padding: 0,
  49477. margin: -1,
  49478. overflow: "hidden",
  49479. clip: "rect(0, 0, 0, 0)",
  49480. whiteSpace: "nowrap",
  49481. wordWrap: "normal"
  49482. }
  49483. ];
  49484. });
  49485. return (_ctx, _cache) => {
  49486. return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, { style: unref(computedStyle) }), [
  49487. renderSlot(_ctx.$slots, "default")
  49488. ], 16);
  49489. };
  49490. }
  49491. });
  49492. var ElVisuallyHidden = _export_sfc(_sfc_main128, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/visual-hidden/src/visual-hidden.vue"]]);
  49493. // node_modules/element-plus/es/components/tooltip-v2/src/content2.mjs
  49494. var _hoisted_163 = ["data-side"];
  49495. var __default__87 = defineComponent({
  49496. name: "ElTooltipV2Content"
  49497. });
  49498. var _sfc_main129 = defineComponent({
  49499. ...__default__87,
  49500. props: { ...tooltipV2ContentProps, ...tooltipV2CommonProps },
  49501. setup(__props) {
  49502. const props = __props;
  49503. const { triggerRef: triggerRef2, contentId } = inject(tooltipV2RootKey);
  49504. const placement = ref(props.placement);
  49505. const strategy = ref(props.strategy);
  49506. const arrowRef = ref(null);
  49507. const { referenceRef, contentRef, middlewareData, x: x2, y, update: update2 } = useFloating({
  49508. placement,
  49509. strategy,
  49510. middleware: computed2(() => {
  49511. const middleware = [offset(props.offset)];
  49512. if (props.showArrow) {
  49513. middleware.push(arrowMiddleware({
  49514. arrowRef
  49515. }));
  49516. }
  49517. return middleware;
  49518. })
  49519. });
  49520. const zIndex2 = useZIndex().nextZIndex();
  49521. const ns2 = useNamespace("tooltip-v2");
  49522. const side = computed2(() => {
  49523. return placement.value.split("-")[0];
  49524. });
  49525. const contentStyle = computed2(() => {
  49526. return {
  49527. position: unref(strategy),
  49528. top: `${unref(y) || 0}px`,
  49529. left: `${unref(x2) || 0}px`,
  49530. zIndex: zIndex2
  49531. };
  49532. });
  49533. const arrowStyle = computed2(() => {
  49534. if (!props.showArrow)
  49535. return {};
  49536. const { arrow: arrow2 } = unref(middlewareData);
  49537. return {
  49538. [`--${ns2.namespace.value}-tooltip-v2-arrow-x`]: `${arrow2 == null ? void 0 : arrow2.x}px` || "",
  49539. [`--${ns2.namespace.value}-tooltip-v2-arrow-y`]: `${arrow2 == null ? void 0 : arrow2.y}px` || ""
  49540. };
  49541. });
  49542. const contentClass = computed2(() => [
  49543. ns2.e("content"),
  49544. ns2.is("dark", props.effect === "dark"),
  49545. ns2.is(unref(strategy)),
  49546. props.contentClass
  49547. ]);
  49548. watch(arrowRef, () => update2());
  49549. watch(() => props.placement, (val) => placement.value = val);
  49550. onMounted(() => {
  49551. watch(() => props.reference || triggerRef2.value, (el) => {
  49552. referenceRef.value = el || void 0;
  49553. }, {
  49554. immediate: true
  49555. });
  49556. });
  49557. provide(tooltipV2ContentKey, { arrowRef });
  49558. return (_ctx, _cache) => {
  49559. return openBlock(), createElementBlock("div", {
  49560. ref_key: "contentRef",
  49561. ref: contentRef,
  49562. style: normalizeStyle(unref(contentStyle)),
  49563. "data-tooltip-v2-root": ""
  49564. }, [
  49565. !_ctx.nowrap ? (openBlock(), createElementBlock("div", {
  49566. key: 0,
  49567. "data-side": unref(side),
  49568. class: normalizeClass(unref(contentClass))
  49569. }, [
  49570. renderSlot(_ctx.$slots, "default", {
  49571. contentStyle: unref(contentStyle),
  49572. contentClass: unref(contentClass)
  49573. }),
  49574. createVNode(unref(ElVisuallyHidden), {
  49575. id: unref(contentId),
  49576. role: "tooltip"
  49577. }, {
  49578. default: withCtx(() => [
  49579. _ctx.ariaLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  49580. createTextVNode(toDisplayString(_ctx.ariaLabel), 1)
  49581. ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 })
  49582. ]),
  49583. _: 3
  49584. }, 8, ["id"]),
  49585. renderSlot(_ctx.$slots, "arrow", {
  49586. style: normalizeStyle(unref(arrowStyle)),
  49587. side: unref(side)
  49588. })
  49589. ], 10, _hoisted_163)) : createCommentVNode("v-if", true)
  49590. ], 4);
  49591. };
  49592. }
  49593. });
  49594. var TooltipV2Content = _export_sfc(_sfc_main129, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/content.vue"]]);
  49595. // node_modules/element-plus/es/components/tooltip-v2/src/forward-ref.mjs
  49596. var forwardRefProps = buildProps({
  49597. setRef: {
  49598. type: definePropType(Function),
  49599. required: true
  49600. },
  49601. onlyChild: Boolean
  49602. });
  49603. var ForwardRef = defineComponent({
  49604. props: forwardRefProps,
  49605. setup(props, {
  49606. slots
  49607. }) {
  49608. const fragmentRef = ref();
  49609. const setRef = composeRefs(fragmentRef, (el) => {
  49610. if (el) {
  49611. props.setRef(el.nextElementSibling);
  49612. } else {
  49613. props.setRef(null);
  49614. }
  49615. });
  49616. return () => {
  49617. var _a2;
  49618. const [firstChild] = ((_a2 = slots.default) == null ? void 0 : _a2.call(slots)) || [];
  49619. const child = props.onlyChild ? ensureOnlyChild(firstChild.children) : firstChild.children;
  49620. return createVNode(Fragment, {
  49621. "ref": setRef
  49622. }, [child]);
  49623. };
  49624. }
  49625. });
  49626. // node_modules/element-plus/es/components/tooltip-v2/src/trigger2.mjs
  49627. var __default__88 = defineComponent({
  49628. name: "ElTooltipV2Trigger"
  49629. });
  49630. var _sfc_main130 = defineComponent({
  49631. ...__default__88,
  49632. props: {
  49633. ...tooltipV2CommonProps,
  49634. ...tooltipV2TriggerProps
  49635. },
  49636. setup(__props) {
  49637. const props = __props;
  49638. const { onClose, onOpen, onDelayOpen, triggerRef: triggerRef2, contentId } = inject(tooltipV2RootKey);
  49639. let isMousedown = false;
  49640. const setTriggerRef = (el) => {
  49641. triggerRef2.value = el;
  49642. };
  49643. const onMouseup = () => {
  49644. isMousedown = false;
  49645. };
  49646. const onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen);
  49647. const onMouseleave = composeEventHandlers(props.onMouseLeave, onClose);
  49648. const onMousedown = composeEventHandlers(props.onMouseDown, () => {
  49649. onClose();
  49650. isMousedown = true;
  49651. document.addEventListener("mouseup", onMouseup, { once: true });
  49652. });
  49653. const onFocus = composeEventHandlers(props.onFocus, () => {
  49654. if (!isMousedown)
  49655. onOpen();
  49656. });
  49657. const onBlur = composeEventHandlers(props.onBlur, onClose);
  49658. const onClick = composeEventHandlers(props.onClick, (e) => {
  49659. if (e.detail === 0)
  49660. onClose();
  49661. });
  49662. const events = {
  49663. blur: onBlur,
  49664. click: onClick,
  49665. focus: onFocus,
  49666. mousedown: onMousedown,
  49667. mouseenter: onMouseenter,
  49668. mouseleave: onMouseleave
  49669. };
  49670. const setEvents = (el, events2, type4) => {
  49671. if (el) {
  49672. Object.entries(events2).forEach(([name, handler]) => {
  49673. el[type4](name, handler);
  49674. });
  49675. }
  49676. };
  49677. watch(triggerRef2, (triggerEl, previousTriggerEl) => {
  49678. setEvents(triggerEl, events, "addEventListener");
  49679. setEvents(previousTriggerEl, events, "removeEventListener");
  49680. if (triggerEl) {
  49681. triggerEl.setAttribute("aria-describedby", contentId.value);
  49682. }
  49683. });
  49684. onBeforeUnmount(() => {
  49685. setEvents(triggerRef2.value, events, "removeEventListener");
  49686. document.removeEventListener("mouseup", onMouseup);
  49687. });
  49688. return (_ctx, _cache) => {
  49689. return _ctx.nowrap ? (openBlock(), createBlock(unref(ForwardRef), {
  49690. key: 0,
  49691. "set-ref": setTriggerRef,
  49692. "only-child": ""
  49693. }, {
  49694. default: withCtx(() => [
  49695. renderSlot(_ctx.$slots, "default")
  49696. ]),
  49697. _: 3
  49698. })) : (openBlock(), createElementBlock("button", mergeProps({
  49699. key: 1,
  49700. ref_key: "triggerRef",
  49701. ref: triggerRef2
  49702. }, _ctx.$attrs), [
  49703. renderSlot(_ctx.$slots, "default")
  49704. ], 16));
  49705. };
  49706. }
  49707. });
  49708. var TooltipV2Trigger = _export_sfc(_sfc_main130, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/trigger.vue"]]);
  49709. // node_modules/element-plus/es/components/tooltip-v2/src/tooltip2.mjs
  49710. var __default__89 = defineComponent({
  49711. name: "ElTooltipV2"
  49712. });
  49713. var _sfc_main131 = defineComponent({
  49714. ...__default__89,
  49715. props: tooltipV2Props,
  49716. setup(__props) {
  49717. const props = __props;
  49718. const refedProps = toRefs(props);
  49719. const arrowProps = reactive(pick_default(refedProps, Object.keys(tooltipV2ArrowProps)));
  49720. const contentProps = reactive(pick_default(refedProps, Object.keys(tooltipV2ContentProps)));
  49721. const rootProps = reactive(pick_default(refedProps, Object.keys(tooltipV2RootProps)));
  49722. const triggerProps = reactive(pick_default(refedProps, Object.keys(tooltipV2TriggerProps)));
  49723. return (_ctx, _cache) => {
  49724. return openBlock(), createBlock(TooltipV2Root, normalizeProps(guardReactiveProps(rootProps)), {
  49725. default: withCtx(({ open }) => [
  49726. createVNode(TooltipV2Trigger, mergeProps(triggerProps, { nowrap: "" }), {
  49727. default: withCtx(() => [
  49728. renderSlot(_ctx.$slots, "trigger")
  49729. ]),
  49730. _: 3
  49731. }, 16),
  49732. (openBlock(), createBlock(Teleport, {
  49733. to: _ctx.to,
  49734. disabled: !_ctx.teleported
  49735. }, [
  49736. _ctx.fullTransition ? (openBlock(), createBlock(Transition, normalizeProps(mergeProps({ key: 0 }, _ctx.transitionProps)), {
  49737. default: withCtx(() => [
  49738. _ctx.alwaysOn || open ? (openBlock(), createBlock(TooltipV2Content, normalizeProps(mergeProps({ key: 0 }, contentProps)), {
  49739. arrow: withCtx(({ style, side }) => [
  49740. _ctx.showArrow ? (openBlock(), createBlock(TooltipV2Arrow, mergeProps({ key: 0 }, arrowProps, {
  49741. style,
  49742. side
  49743. }), null, 16, ["style", "side"])) : createCommentVNode("v-if", true)
  49744. ]),
  49745. default: withCtx(() => [
  49746. renderSlot(_ctx.$slots, "default")
  49747. ]),
  49748. _: 3
  49749. }, 16)) : createCommentVNode("v-if", true)
  49750. ]),
  49751. _: 2
  49752. }, 1040)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  49753. _ctx.alwaysOn || open ? (openBlock(), createBlock(TooltipV2Content, normalizeProps(mergeProps({ key: 0 }, contentProps)), {
  49754. arrow: withCtx(({ style, side }) => [
  49755. _ctx.showArrow ? (openBlock(), createBlock(TooltipV2Arrow, mergeProps({ key: 0 }, arrowProps, {
  49756. style,
  49757. side
  49758. }), null, 16, ["style", "side"])) : createCommentVNode("v-if", true)
  49759. ]),
  49760. default: withCtx(() => [
  49761. renderSlot(_ctx.$slots, "default")
  49762. ]),
  49763. _: 3
  49764. }, 16)) : createCommentVNode("v-if", true)
  49765. ], 64))
  49766. ], 8, ["to", "disabled"]))
  49767. ]),
  49768. _: 3
  49769. }, 16);
  49770. };
  49771. }
  49772. });
  49773. var TooltipV2 = _export_sfc(_sfc_main131, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip-v2/src/tooltip.vue"]]);
  49774. // node_modules/element-plus/es/components/tooltip-v2/index.mjs
  49775. var ElTooltipV2 = withInstall(TooltipV2);
  49776. // node_modules/element-plus/es/components/transfer/src/transfer.mjs
  49777. var LEFT_CHECK_CHANGE_EVENT = "left-check-change";
  49778. var RIGHT_CHECK_CHANGE_EVENT = "right-check-change";
  49779. var transferProps = buildProps({
  49780. data: {
  49781. type: definePropType(Array),
  49782. default: () => []
  49783. },
  49784. titles: {
  49785. type: definePropType(Array),
  49786. default: () => []
  49787. },
  49788. buttonTexts: {
  49789. type: definePropType(Array),
  49790. default: () => []
  49791. },
  49792. filterPlaceholder: String,
  49793. filterMethod: {
  49794. type: definePropType(Function)
  49795. },
  49796. leftDefaultChecked: {
  49797. type: definePropType(Array),
  49798. default: () => []
  49799. },
  49800. rightDefaultChecked: {
  49801. type: definePropType(Array),
  49802. default: () => []
  49803. },
  49804. renderContent: {
  49805. type: definePropType(Function)
  49806. },
  49807. modelValue: {
  49808. type: definePropType(Array),
  49809. default: () => []
  49810. },
  49811. format: {
  49812. type: definePropType(Object),
  49813. default: () => ({})
  49814. },
  49815. filterable: Boolean,
  49816. props: {
  49817. type: definePropType(Object),
  49818. default: () => mutable({
  49819. label: "label",
  49820. key: "key",
  49821. disabled: "disabled"
  49822. })
  49823. },
  49824. targetOrder: {
  49825. type: String,
  49826. values: ["original", "push", "unshift"],
  49827. default: "original"
  49828. },
  49829. validateEvent: {
  49830. type: Boolean,
  49831. default: true
  49832. }
  49833. });
  49834. var transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray) || isArray(value) && isNil_default(movedKeys);
  49835. var transferEmits = {
  49836. [CHANGE_EVENT]: (value, direction2, movedKeys) => [value, movedKeys].every(isArray) && ["left", "right"].includes(direction2),
  49837. [UPDATE_MODEL_EVENT]: (value) => isArray(value),
  49838. [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
  49839. [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn
  49840. };
  49841. // node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs
  49842. var CHECKED_CHANGE_EVENT = "checked-change";
  49843. var transferPanelProps = buildProps({
  49844. data: transferProps.data,
  49845. optionRender: {
  49846. type: definePropType(Function)
  49847. },
  49848. placeholder: String,
  49849. title: String,
  49850. filterable: Boolean,
  49851. format: transferProps.format,
  49852. filterMethod: transferProps.filterMethod,
  49853. defaultChecked: transferProps.leftDefaultChecked,
  49854. props: transferProps.props
  49855. });
  49856. var transferPanelEmits = {
  49857. [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn
  49858. };
  49859. // node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs
  49860. var usePropsAlias = (props) => {
  49861. const initProps = {
  49862. label: "label",
  49863. key: "key",
  49864. disabled: "disabled"
  49865. };
  49866. return computed2(() => ({
  49867. ...initProps,
  49868. ...props.props
  49869. }));
  49870. };
  49871. // node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs
  49872. var useCheck = (props, panelState, emit) => {
  49873. const propsAlias = usePropsAlias(props);
  49874. const filteredData = computed2(() => {
  49875. return props.data.filter((item) => {
  49876. if (isFunction(props.filterMethod)) {
  49877. return props.filterMethod(panelState.query, item);
  49878. } else {
  49879. const label = String(item[propsAlias.value.label] || item[propsAlias.value.key]);
  49880. return label.toLowerCase().includes(panelState.query.toLowerCase());
  49881. }
  49882. });
  49883. });
  49884. const checkableData = computed2(() => filteredData.value.filter((item) => !item[propsAlias.value.disabled]));
  49885. const checkedSummary = computed2(() => {
  49886. const checkedLength = panelState.checked.length;
  49887. const dataLength = props.data.length;
  49888. const { noChecked, hasChecked } = props.format;
  49889. if (noChecked && hasChecked) {
  49890. return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString());
  49891. } else {
  49892. return `${checkedLength}/${dataLength}`;
  49893. }
  49894. });
  49895. const isIndeterminate = computed2(() => {
  49896. const checkedLength = panelState.checked.length;
  49897. return checkedLength > 0 && checkedLength < checkableData.value.length;
  49898. });
  49899. const updateAllChecked = () => {
  49900. const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
  49901. panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item));
  49902. };
  49903. const handleAllCheckedChange = (value) => {
  49904. panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : [];
  49905. };
  49906. watch(() => panelState.checked, (val, oldVal) => {
  49907. updateAllChecked();
  49908. if (panelState.checkChangeByUser) {
  49909. const movedKeys = val.concat(oldVal).filter((v2) => !val.includes(v2) || !oldVal.includes(v2));
  49910. emit(CHECKED_CHANGE_EVENT, val, movedKeys);
  49911. } else {
  49912. emit(CHECKED_CHANGE_EVENT, val);
  49913. panelState.checkChangeByUser = true;
  49914. }
  49915. });
  49916. watch(checkableData, () => {
  49917. updateAllChecked();
  49918. });
  49919. watch(() => props.data, () => {
  49920. const checked = [];
  49921. const filteredDataKeys = filteredData.value.map((item) => item[propsAlias.value.key]);
  49922. panelState.checked.forEach((item) => {
  49923. if (filteredDataKeys.includes(item)) {
  49924. checked.push(item);
  49925. }
  49926. });
  49927. panelState.checkChangeByUser = false;
  49928. panelState.checked = checked;
  49929. });
  49930. watch(() => props.defaultChecked, (val, oldVal) => {
  49931. if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item)))
  49932. return;
  49933. const checked = [];
  49934. const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
  49935. val.forEach((item) => {
  49936. if (checkableDataKeys.includes(item)) {
  49937. checked.push(item);
  49938. }
  49939. });
  49940. panelState.checkChangeByUser = false;
  49941. panelState.checked = checked;
  49942. }, {
  49943. immediate: true
  49944. });
  49945. return {
  49946. filteredData,
  49947. checkableData,
  49948. checkedSummary,
  49949. isIndeterminate,
  49950. updateAllChecked,
  49951. handleAllCheckedChange
  49952. };
  49953. };
  49954. // node_modules/element-plus/es/components/transfer/src/composables/use-checked-change.mjs
  49955. var useCheckedChange = (checkedState, emit) => {
  49956. const onSourceCheckedChange = (val, movedKeys) => {
  49957. checkedState.leftChecked = val;
  49958. if (!movedKeys)
  49959. return;
  49960. emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys);
  49961. };
  49962. const onTargetCheckedChange = (val, movedKeys) => {
  49963. checkedState.rightChecked = val;
  49964. if (!movedKeys)
  49965. return;
  49966. emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);
  49967. };
  49968. return {
  49969. onSourceCheckedChange,
  49970. onTargetCheckedChange
  49971. };
  49972. };
  49973. // node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs
  49974. var useComputedData = (props) => {
  49975. const propsAlias = usePropsAlias(props);
  49976. const dataObj = computed2(() => props.data.reduce((o2, cur) => (o2[cur[propsAlias.value.key]] = cur) && o2, {}));
  49977. const sourceData = computed2(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key])));
  49978. const targetData = computed2(() => {
  49979. if (props.targetOrder === "original") {
  49980. return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key]));
  49981. } else {
  49982. return props.modelValue.reduce((arr, cur) => {
  49983. const val = dataObj.value[cur];
  49984. if (val) {
  49985. arr.push(val);
  49986. }
  49987. return arr;
  49988. }, []);
  49989. }
  49990. });
  49991. return {
  49992. sourceData,
  49993. targetData
  49994. };
  49995. };
  49996. // node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs
  49997. var useMove = (props, checkedState, emit) => {
  49998. const propsAlias = usePropsAlias(props);
  49999. const _emit = (value, direction2, movedKeys) => {
  50000. emit(UPDATE_MODEL_EVENT, value);
  50001. emit(CHANGE_EVENT, value, direction2, movedKeys);
  50002. };
  50003. const addToLeft = () => {
  50004. const currentValue = props.modelValue.slice();
  50005. checkedState.rightChecked.forEach((item) => {
  50006. const index = currentValue.indexOf(item);
  50007. if (index > -1) {
  50008. currentValue.splice(index, 1);
  50009. }
  50010. });
  50011. _emit(currentValue, "left", checkedState.rightChecked);
  50012. };
  50013. const addToRight = () => {
  50014. let currentValue = props.modelValue.slice();
  50015. const itemsToBeMoved = props.data.filter((item) => {
  50016. const itemKey = item[propsAlias.value.key];
  50017. return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);
  50018. }).map((item) => item[propsAlias.value.key]);
  50019. currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
  50020. if (props.targetOrder === "original") {
  50021. currentValue = props.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]);
  50022. }
  50023. _emit(currentValue, "right", checkedState.leftChecked);
  50024. };
  50025. return {
  50026. addToLeft,
  50027. addToRight
  50028. };
  50029. };
  50030. // node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs
  50031. var __default__90 = defineComponent({
  50032. name: "ElTransferPanel"
  50033. });
  50034. var _sfc_main132 = defineComponent({
  50035. ...__default__90,
  50036. props: transferPanelProps,
  50037. emits: transferPanelEmits,
  50038. setup(__props, { expose, emit }) {
  50039. const props = __props;
  50040. const slots = useSlots();
  50041. const OptionContent = ({ option }) => option;
  50042. const { t } = useLocale();
  50043. const ns2 = useNamespace("transfer");
  50044. const panelState = reactive({
  50045. checked: [],
  50046. allChecked: false,
  50047. query: "",
  50048. checkChangeByUser: true
  50049. });
  50050. const propsAlias = usePropsAlias(props);
  50051. const {
  50052. filteredData,
  50053. checkedSummary,
  50054. isIndeterminate,
  50055. handleAllCheckedChange
  50056. } = useCheck(props, panelState, emit);
  50057. const hasNoMatch = computed2(() => !isEmpty2(panelState.query) && isEmpty2(filteredData.value));
  50058. const hasFooter = computed2(() => !isEmpty2(slots.default()[0].children));
  50059. const { checked, allChecked, query } = toRefs(panelState);
  50060. expose({
  50061. query
  50062. });
  50063. return (_ctx, _cache) => {
  50064. return openBlock(), createElementBlock("div", {
  50065. class: normalizeClass(unref(ns2).b("panel"))
  50066. }, [
  50067. createBaseVNode("p", {
  50068. class: normalizeClass(unref(ns2).be("panel", "header"))
  50069. }, [
  50070. createVNode(unref(ElCheckbox), {
  50071. modelValue: unref(allChecked),
  50072. "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null),
  50073. indeterminate: unref(isIndeterminate),
  50074. "validate-event": false,
  50075. onChange: unref(handleAllCheckedChange)
  50076. }, {
  50077. default: withCtx(() => [
  50078. createTextVNode(toDisplayString(_ctx.title) + " ", 1),
  50079. createBaseVNode("span", null, toDisplayString(unref(checkedSummary)), 1)
  50080. ]),
  50081. _: 1
  50082. }, 8, ["modelValue", "indeterminate", "onChange"])
  50083. ], 2),
  50084. createBaseVNode("div", {
  50085. class: normalizeClass([unref(ns2).be("panel", "body"), unref(ns2).is("with-footer", unref(hasFooter))])
  50086. }, [
  50087. _ctx.filterable ? (openBlock(), createBlock(unref(ElInput), {
  50088. key: 0,
  50089. modelValue: unref(query),
  50090. "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null),
  50091. class: normalizeClass(unref(ns2).be("panel", "filter")),
  50092. size: "default",
  50093. placeholder: _ctx.placeholder,
  50094. "prefix-icon": unref(search_default),
  50095. clearable: "",
  50096. "validate-event": false
  50097. }, null, 8, ["modelValue", "class", "placeholder", "prefix-icon"])) : createCommentVNode("v-if", true),
  50098. withDirectives(createVNode(unref(ElCheckboxGroup), {
  50099. modelValue: unref(checked),
  50100. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(checked) ? checked.value = $event : null),
  50101. "validate-event": false,
  50102. class: normalizeClass([unref(ns2).is("filterable", _ctx.filterable), unref(ns2).be("panel", "list")])
  50103. }, {
  50104. default: withCtx(() => [
  50105. (openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => {
  50106. return openBlock(), createBlock(unref(ElCheckbox), {
  50107. key: item[unref(propsAlias).key],
  50108. class: normalizeClass(unref(ns2).be("panel", "item")),
  50109. label: item[unref(propsAlias).key],
  50110. disabled: item[unref(propsAlias).disabled],
  50111. "validate-event": false
  50112. }, {
  50113. default: withCtx(() => {
  50114. var _a2;
  50115. return [
  50116. createVNode(OptionContent, {
  50117. option: (_a2 = _ctx.optionRender) == null ? void 0 : _a2.call(_ctx, item)
  50118. }, null, 8, ["option"])
  50119. ];
  50120. }),
  50121. _: 2
  50122. }, 1032, ["class", "label", "disabled"]);
  50123. }), 128))
  50124. ]),
  50125. _: 1
  50126. }, 8, ["modelValue", "class"]), [
  50127. [vShow, !unref(hasNoMatch) && !unref(isEmpty2)(_ctx.data)]
  50128. ]),
  50129. withDirectives(createBaseVNode("p", {
  50130. class: normalizeClass(unref(ns2).be("panel", "empty"))
  50131. }, toDisplayString(unref(hasNoMatch) ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 3), [
  50132. [vShow, unref(hasNoMatch) || unref(isEmpty2)(_ctx.data)]
  50133. ])
  50134. ], 2),
  50135. unref(hasFooter) ? (openBlock(), createElementBlock("p", {
  50136. key: 0,
  50137. class: normalizeClass(unref(ns2).be("panel", "footer"))
  50138. }, [
  50139. renderSlot(_ctx.$slots, "default")
  50140. ], 2)) : createCommentVNode("v-if", true)
  50141. ], 2);
  50142. };
  50143. }
  50144. });
  50145. var TransferPanel = _export_sfc(_sfc_main132, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]);
  50146. // node_modules/element-plus/es/components/transfer/src/transfer2.mjs
  50147. var _hoisted_164 = { key: 0 };
  50148. var _hoisted_239 = { key: 0 };
  50149. var __default__91 = defineComponent({
  50150. name: "ElTransfer"
  50151. });
  50152. var _sfc_main133 = defineComponent({
  50153. ...__default__91,
  50154. props: transferProps,
  50155. emits: transferEmits,
  50156. setup(__props, { expose, emit }) {
  50157. const props = __props;
  50158. const slots = useSlots();
  50159. const { t } = useLocale();
  50160. const ns2 = useNamespace("transfer");
  50161. const { formItem } = useFormItem();
  50162. const checkedState = reactive({
  50163. leftChecked: [],
  50164. rightChecked: []
  50165. });
  50166. const propsAlias = usePropsAlias(props);
  50167. const { sourceData, targetData } = useComputedData(props);
  50168. const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit);
  50169. const { addToLeft, addToRight } = useMove(props, checkedState, emit);
  50170. const leftPanel = ref();
  50171. const rightPanel = ref();
  50172. const clearQuery = (which) => {
  50173. switch (which) {
  50174. case "left":
  50175. leftPanel.value.query = "";
  50176. break;
  50177. case "right":
  50178. rightPanel.value.query = "";
  50179. break;
  50180. }
  50181. };
  50182. const hasButtonTexts = computed2(() => props.buttonTexts.length === 2);
  50183. const leftPanelTitle = computed2(() => props.titles[0] || t("el.transfer.titles.0"));
  50184. const rightPanelTitle = computed2(() => props.titles[1] || t("el.transfer.titles.1"));
  50185. const panelFilterPlaceholder = computed2(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder"));
  50186. watch(() => props.modelValue, () => {
  50187. var _a2;
  50188. if (props.validateEvent) {
  50189. (_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "change").catch((err) => debugWarn(err));
  50190. }
  50191. });
  50192. const optionRender = computed2(() => (option) => {
  50193. if (props.renderContent)
  50194. return props.renderContent(h, option);
  50195. if (slots.default)
  50196. return slots.default({ option });
  50197. return h("span", option[propsAlias.value.label] || option[propsAlias.value.key]);
  50198. });
  50199. expose({
  50200. clearQuery,
  50201. leftPanel,
  50202. rightPanel
  50203. });
  50204. return (_ctx, _cache) => {
  50205. return openBlock(), createElementBlock("div", {
  50206. class: normalizeClass(unref(ns2).b())
  50207. }, [
  50208. createVNode(TransferPanel, {
  50209. ref_key: "leftPanel",
  50210. ref: leftPanel,
  50211. data: unref(sourceData),
  50212. "option-render": unref(optionRender),
  50213. placeholder: unref(panelFilterPlaceholder),
  50214. title: unref(leftPanelTitle),
  50215. filterable: _ctx.filterable,
  50216. format: _ctx.format,
  50217. "filter-method": _ctx.filterMethod,
  50218. "default-checked": _ctx.leftDefaultChecked,
  50219. props: props.props,
  50220. onCheckedChange: unref(onSourceCheckedChange)
  50221. }, {
  50222. default: withCtx(() => [
  50223. renderSlot(_ctx.$slots, "left-footer")
  50224. ]),
  50225. _: 3
  50226. }, 8, ["data", "option-render", "placeholder", "title", "filterable", "format", "filter-method", "default-checked", "props", "onCheckedChange"]),
  50227. createBaseVNode("div", {
  50228. class: normalizeClass(unref(ns2).e("buttons"))
  50229. }, [
  50230. createVNode(unref(ElButton), {
  50231. type: "primary",
  50232. class: normalizeClass([unref(ns2).e("button"), unref(ns2).is("with-texts", unref(hasButtonTexts))]),
  50233. disabled: unref(isEmpty2)(checkedState.rightChecked),
  50234. onClick: unref(addToLeft)
  50235. }, {
  50236. default: withCtx(() => [
  50237. createVNode(unref(ElIcon), null, {
  50238. default: withCtx(() => [
  50239. createVNode(unref(arrow_left_default))
  50240. ]),
  50241. _: 1
  50242. }),
  50243. !unref(isUndefined2)(_ctx.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_164, toDisplayString(_ctx.buttonTexts[0]), 1)) : createCommentVNode("v-if", true)
  50244. ]),
  50245. _: 1
  50246. }, 8, ["class", "disabled", "onClick"]),
  50247. createVNode(unref(ElButton), {
  50248. type: "primary",
  50249. class: normalizeClass([unref(ns2).e("button"), unref(ns2).is("with-texts", unref(hasButtonTexts))]),
  50250. disabled: unref(isEmpty2)(checkedState.leftChecked),
  50251. onClick: unref(addToRight)
  50252. }, {
  50253. default: withCtx(() => [
  50254. !unref(isUndefined2)(_ctx.buttonTexts[1]) ? (openBlock(), createElementBlock("span", _hoisted_239, toDisplayString(_ctx.buttonTexts[1]), 1)) : createCommentVNode("v-if", true),
  50255. createVNode(unref(ElIcon), null, {
  50256. default: withCtx(() => [
  50257. createVNode(unref(arrow_right_default))
  50258. ]),
  50259. _: 1
  50260. })
  50261. ]),
  50262. _: 1
  50263. }, 8, ["class", "disabled", "onClick"])
  50264. ], 2),
  50265. createVNode(TransferPanel, {
  50266. ref_key: "rightPanel",
  50267. ref: rightPanel,
  50268. data: unref(targetData),
  50269. "option-render": unref(optionRender),
  50270. placeholder: unref(panelFilterPlaceholder),
  50271. filterable: _ctx.filterable,
  50272. format: _ctx.format,
  50273. "filter-method": _ctx.filterMethod,
  50274. title: unref(rightPanelTitle),
  50275. "default-checked": _ctx.rightDefaultChecked,
  50276. props: props.props,
  50277. onCheckedChange: unref(onTargetCheckedChange)
  50278. }, {
  50279. default: withCtx(() => [
  50280. renderSlot(_ctx.$slots, "right-footer")
  50281. ]),
  50282. _: 3
  50283. }, 8, ["data", "option-render", "placeholder", "filterable", "format", "filter-method", "title", "default-checked", "props", "onCheckedChange"])
  50284. ], 2);
  50285. };
  50286. }
  50287. });
  50288. var Transfer = _export_sfc(_sfc_main133, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]);
  50289. // node_modules/element-plus/es/components/transfer/index.mjs
  50290. var ElTransfer = withInstall(Transfer);
  50291. // node_modules/element-plus/es/components/tree/src/model/util.mjs
  50292. var NODE_KEY = "$treeNodeId";
  50293. var markNodeData = function(node, data) {
  50294. if (!data || data[NODE_KEY])
  50295. return;
  50296. Object.defineProperty(data, NODE_KEY, {
  50297. value: node.id,
  50298. enumerable: false,
  50299. configurable: false,
  50300. writable: false
  50301. });
  50302. };
  50303. var getNodeKey = function(key, data) {
  50304. if (!key)
  50305. return data[NODE_KEY];
  50306. return data[key];
  50307. };
  50308. var handleCurrentChange = (store, emit, setCurrent) => {
  50309. const preCurrentNode = store.value.currentNode;
  50310. setCurrent();
  50311. const currentNode = store.value.currentNode;
  50312. if (preCurrentNode === currentNode)
  50313. return;
  50314. emit("current-change", currentNode ? currentNode.data : null, currentNode);
  50315. };
  50316. // node_modules/element-plus/es/components/tree/src/model/node.mjs
  50317. var getChildState = (node) => {
  50318. let all = true;
  50319. let none = true;
  50320. let allWithoutDisable = true;
  50321. for (let i = 0, j = node.length; i < j; i++) {
  50322. const n = node[i];
  50323. if (n.checked !== true || n.indeterminate) {
  50324. all = false;
  50325. if (!n.disabled) {
  50326. allWithoutDisable = false;
  50327. }
  50328. }
  50329. if (n.checked !== false || n.indeterminate) {
  50330. none = false;
  50331. }
  50332. }
  50333. return { all, none, allWithoutDisable, half: !all && !none };
  50334. };
  50335. var reInitChecked = function(node) {
  50336. if (node.childNodes.length === 0 || node.loading)
  50337. return;
  50338. const { all, none, half } = getChildState(node.childNodes);
  50339. if (all) {
  50340. node.checked = true;
  50341. node.indeterminate = false;
  50342. } else if (half) {
  50343. node.checked = false;
  50344. node.indeterminate = true;
  50345. } else if (none) {
  50346. node.checked = false;
  50347. node.indeterminate = false;
  50348. }
  50349. const parent2 = node.parent;
  50350. if (!parent2 || parent2.level === 0)
  50351. return;
  50352. if (!node.store.checkStrictly) {
  50353. reInitChecked(parent2);
  50354. }
  50355. };
  50356. var getPropertyFromData = function(node, prop) {
  50357. const props = node.store.props;
  50358. const data = node.data || {};
  50359. const config = props[prop];
  50360. if (typeof config === "function") {
  50361. return config(data, node);
  50362. } else if (typeof config === "string") {
  50363. return data[config];
  50364. } else if (typeof config === "undefined") {
  50365. const dataProp = data[prop];
  50366. return dataProp === void 0 ? "" : dataProp;
  50367. }
  50368. };
  50369. var nodeIdSeed = 0;
  50370. var Node2 = class {
  50371. constructor(options) {
  50372. this.id = nodeIdSeed++;
  50373. this.text = null;
  50374. this.checked = false;
  50375. this.indeterminate = false;
  50376. this.data = null;
  50377. this.expanded = false;
  50378. this.parent = null;
  50379. this.visible = true;
  50380. this.isCurrent = false;
  50381. this.canFocus = false;
  50382. for (const name in options) {
  50383. if (hasOwn(options, name)) {
  50384. this[name] = options[name];
  50385. }
  50386. }
  50387. this.level = 0;
  50388. this.loaded = false;
  50389. this.childNodes = [];
  50390. this.loading = false;
  50391. if (this.parent) {
  50392. this.level = this.parent.level + 1;
  50393. }
  50394. }
  50395. initialize() {
  50396. const store = this.store;
  50397. if (!store) {
  50398. throw new Error("[Node]store is required!");
  50399. }
  50400. store.registerNode(this);
  50401. const props = store.props;
  50402. if (props && typeof props.isLeaf !== "undefined") {
  50403. const isLeaf2 = getPropertyFromData(this, "isLeaf");
  50404. if (typeof isLeaf2 === "boolean") {
  50405. this.isLeafByUser = isLeaf2;
  50406. }
  50407. }
  50408. if (store.lazy !== true && this.data) {
  50409. this.setData(this.data);
  50410. if (store.defaultExpandAll) {
  50411. this.expanded = true;
  50412. this.canFocus = true;
  50413. }
  50414. } else if (this.level > 0 && store.lazy && store.defaultExpandAll) {
  50415. this.expand();
  50416. }
  50417. if (!Array.isArray(this.data)) {
  50418. markNodeData(this, this.data);
  50419. }
  50420. if (!this.data)
  50421. return;
  50422. const defaultExpandedKeys = store.defaultExpandedKeys;
  50423. const key = store.key;
  50424. if (key && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) {
  50425. this.expand(null, store.autoExpandParent);
  50426. }
  50427. if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {
  50428. store.currentNode = this;
  50429. store.currentNode.isCurrent = true;
  50430. }
  50431. if (store.lazy) {
  50432. store._initDefaultCheckedNode(this);
  50433. }
  50434. this.updateLeafState();
  50435. if (this.parent && (this.level === 1 || this.parent.expanded === true))
  50436. this.canFocus = true;
  50437. }
  50438. setData(data) {
  50439. if (!Array.isArray(data)) {
  50440. markNodeData(this, data);
  50441. }
  50442. this.data = data;
  50443. this.childNodes = [];
  50444. let children;
  50445. if (this.level === 0 && Array.isArray(this.data)) {
  50446. children = this.data;
  50447. } else {
  50448. children = getPropertyFromData(this, "children") || [];
  50449. }
  50450. for (let i = 0, j = children.length; i < j; i++) {
  50451. this.insertChild({ data: children[i] });
  50452. }
  50453. }
  50454. get label() {
  50455. return getPropertyFromData(this, "label");
  50456. }
  50457. get key() {
  50458. const nodeKey = this.store.key;
  50459. if (this.data)
  50460. return this.data[nodeKey];
  50461. return null;
  50462. }
  50463. get disabled() {
  50464. return getPropertyFromData(this, "disabled");
  50465. }
  50466. get nextSibling() {
  50467. const parent2 = this.parent;
  50468. if (parent2) {
  50469. const index = parent2.childNodes.indexOf(this);
  50470. if (index > -1) {
  50471. return parent2.childNodes[index + 1];
  50472. }
  50473. }
  50474. return null;
  50475. }
  50476. get previousSibling() {
  50477. const parent2 = this.parent;
  50478. if (parent2) {
  50479. const index = parent2.childNodes.indexOf(this);
  50480. if (index > -1) {
  50481. return index > 0 ? parent2.childNodes[index - 1] : null;
  50482. }
  50483. }
  50484. return null;
  50485. }
  50486. contains(target2, deep = true) {
  50487. return (this.childNodes || []).some((child) => child === target2 || deep && child.contains(target2));
  50488. }
  50489. remove() {
  50490. const parent2 = this.parent;
  50491. if (parent2) {
  50492. parent2.removeChild(this);
  50493. }
  50494. }
  50495. insertChild(child, index, batch) {
  50496. if (!child)
  50497. throw new Error("InsertChild error: child is required.");
  50498. if (!(child instanceof Node2)) {
  50499. if (!batch) {
  50500. const children = this.getChildren(true);
  50501. if (!children.includes(child.data)) {
  50502. if (typeof index === "undefined" || index < 0) {
  50503. children.push(child.data);
  50504. } else {
  50505. children.splice(index, 0, child.data);
  50506. }
  50507. }
  50508. }
  50509. Object.assign(child, {
  50510. parent: this,
  50511. store: this.store
  50512. });
  50513. child = reactive(new Node2(child));
  50514. if (child instanceof Node2) {
  50515. child.initialize();
  50516. }
  50517. }
  50518. ;
  50519. child.level = this.level + 1;
  50520. if (typeof index === "undefined" || index < 0) {
  50521. this.childNodes.push(child);
  50522. } else {
  50523. this.childNodes.splice(index, 0, child);
  50524. }
  50525. this.updateLeafState();
  50526. }
  50527. insertBefore(child, ref2) {
  50528. let index;
  50529. if (ref2) {
  50530. index = this.childNodes.indexOf(ref2);
  50531. }
  50532. this.insertChild(child, index);
  50533. }
  50534. insertAfter(child, ref2) {
  50535. let index;
  50536. if (ref2) {
  50537. index = this.childNodes.indexOf(ref2);
  50538. if (index !== -1)
  50539. index += 1;
  50540. }
  50541. this.insertChild(child, index);
  50542. }
  50543. removeChild(child) {
  50544. const children = this.getChildren() || [];
  50545. const dataIndex = children.indexOf(child.data);
  50546. if (dataIndex > -1) {
  50547. children.splice(dataIndex, 1);
  50548. }
  50549. const index = this.childNodes.indexOf(child);
  50550. if (index > -1) {
  50551. this.store && this.store.deregisterNode(child);
  50552. child.parent = null;
  50553. this.childNodes.splice(index, 1);
  50554. }
  50555. this.updateLeafState();
  50556. }
  50557. removeChildByData(data) {
  50558. let targetNode = null;
  50559. for (let i = 0; i < this.childNodes.length; i++) {
  50560. if (this.childNodes[i].data === data) {
  50561. targetNode = this.childNodes[i];
  50562. break;
  50563. }
  50564. }
  50565. if (targetNode) {
  50566. this.removeChild(targetNode);
  50567. }
  50568. }
  50569. expand(callback, expandParent) {
  50570. const done = () => {
  50571. if (expandParent) {
  50572. let parent2 = this.parent;
  50573. while (parent2.level > 0) {
  50574. parent2.expanded = true;
  50575. parent2 = parent2.parent;
  50576. }
  50577. }
  50578. this.expanded = true;
  50579. if (callback)
  50580. callback();
  50581. this.childNodes.forEach((item) => {
  50582. item.canFocus = true;
  50583. });
  50584. };
  50585. if (this.shouldLoadData()) {
  50586. this.loadData((data) => {
  50587. if (Array.isArray(data)) {
  50588. if (this.checked) {
  50589. this.setChecked(true, true);
  50590. } else if (!this.store.checkStrictly) {
  50591. reInitChecked(this);
  50592. }
  50593. done();
  50594. }
  50595. });
  50596. } else {
  50597. done();
  50598. }
  50599. }
  50600. doCreateChildren(array4, defaultProps4 = {}) {
  50601. array4.forEach((item) => {
  50602. this.insertChild(Object.assign({ data: item }, defaultProps4), void 0, true);
  50603. });
  50604. }
  50605. collapse() {
  50606. this.expanded = false;
  50607. this.childNodes.forEach((item) => {
  50608. item.canFocus = false;
  50609. });
  50610. }
  50611. shouldLoadData() {
  50612. return this.store.lazy === true && this.store.load && !this.loaded;
  50613. }
  50614. updateLeafState() {
  50615. if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") {
  50616. this.isLeaf = this.isLeafByUser;
  50617. return;
  50618. }
  50619. const childNodes = this.childNodes;
  50620. if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
  50621. this.isLeaf = !childNodes || childNodes.length === 0;
  50622. return;
  50623. }
  50624. this.isLeaf = false;
  50625. }
  50626. setChecked(value, deep, recursion, passValue) {
  50627. this.indeterminate = value === "half";
  50628. this.checked = value === true;
  50629. if (this.store.checkStrictly)
  50630. return;
  50631. if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
  50632. const { all, allWithoutDisable } = getChildState(this.childNodes);
  50633. if (!this.isLeaf && !all && allWithoutDisable) {
  50634. this.checked = false;
  50635. value = false;
  50636. }
  50637. const handleDescendants = () => {
  50638. if (deep) {
  50639. const childNodes = this.childNodes;
  50640. for (let i = 0, j = childNodes.length; i < j; i++) {
  50641. const child = childNodes[i];
  50642. passValue = passValue || value !== false;
  50643. const isCheck = child.disabled ? child.checked : passValue;
  50644. child.setChecked(isCheck, deep, true, passValue);
  50645. }
  50646. const { half, all: all2 } = getChildState(childNodes);
  50647. if (!all2) {
  50648. this.checked = all2;
  50649. this.indeterminate = half;
  50650. }
  50651. }
  50652. };
  50653. if (this.shouldLoadData()) {
  50654. this.loadData(() => {
  50655. handleDescendants();
  50656. reInitChecked(this);
  50657. }, {
  50658. checked: value !== false
  50659. });
  50660. return;
  50661. } else {
  50662. handleDescendants();
  50663. }
  50664. }
  50665. const parent2 = this.parent;
  50666. if (!parent2 || parent2.level === 0)
  50667. return;
  50668. if (!recursion) {
  50669. reInitChecked(parent2);
  50670. }
  50671. }
  50672. getChildren(forceInit = false) {
  50673. if (this.level === 0)
  50674. return this.data;
  50675. const data = this.data;
  50676. if (!data)
  50677. return null;
  50678. const props = this.store.props;
  50679. let children = "children";
  50680. if (props) {
  50681. children = props.children || "children";
  50682. }
  50683. if (data[children] === void 0) {
  50684. data[children] = null;
  50685. }
  50686. if (forceInit && !data[children]) {
  50687. data[children] = [];
  50688. }
  50689. return data[children];
  50690. }
  50691. updateChildren() {
  50692. const newData = this.getChildren() || [];
  50693. const oldData = this.childNodes.map((node) => node.data);
  50694. const newDataMap = {};
  50695. const newNodes = [];
  50696. newData.forEach((item, index) => {
  50697. const key = item[NODE_KEY];
  50698. const isNodeExists = !!key && oldData.findIndex((data) => data[NODE_KEY] === key) >= 0;
  50699. if (isNodeExists) {
  50700. newDataMap[key] = { index, data: item };
  50701. } else {
  50702. newNodes.push({ index, data: item });
  50703. }
  50704. });
  50705. if (!this.store.lazy) {
  50706. oldData.forEach((item) => {
  50707. if (!newDataMap[item[NODE_KEY]])
  50708. this.removeChildByData(item);
  50709. });
  50710. }
  50711. newNodes.forEach(({ index, data }) => {
  50712. this.insertChild({ data }, index);
  50713. });
  50714. this.updateLeafState();
  50715. }
  50716. loadData(callback, defaultProps4 = {}) {
  50717. if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps4).length)) {
  50718. this.loading = true;
  50719. const resolve = (children) => {
  50720. this.childNodes = [];
  50721. this.doCreateChildren(children, defaultProps4);
  50722. this.loaded = true;
  50723. this.loading = false;
  50724. this.updateLeafState();
  50725. if (callback) {
  50726. callback.call(this, children);
  50727. }
  50728. };
  50729. this.store.load(this, resolve);
  50730. } else {
  50731. if (callback) {
  50732. callback.call(this);
  50733. }
  50734. }
  50735. }
  50736. };
  50737. // node_modules/element-plus/es/components/tree/src/model/tree-store.mjs
  50738. var TreeStore = class {
  50739. constructor(options) {
  50740. this.currentNode = null;
  50741. this.currentNodeKey = null;
  50742. for (const option in options) {
  50743. if (hasOwn(options, option)) {
  50744. this[option] = options[option];
  50745. }
  50746. }
  50747. this.nodesMap = {};
  50748. }
  50749. initialize() {
  50750. this.root = new Node2({
  50751. data: this.data,
  50752. store: this
  50753. });
  50754. this.root.initialize();
  50755. if (this.lazy && this.load) {
  50756. const loadFn = this.load;
  50757. loadFn(this.root, (data) => {
  50758. this.root.doCreateChildren(data);
  50759. this._initDefaultCheckedNodes();
  50760. });
  50761. } else {
  50762. this._initDefaultCheckedNodes();
  50763. }
  50764. }
  50765. filter(value) {
  50766. const filterNodeMethod = this.filterNodeMethod;
  50767. const lazy = this.lazy;
  50768. const traverse = function(node) {
  50769. const childNodes = node.root ? node.root.childNodes : node.childNodes;
  50770. childNodes.forEach((child) => {
  50771. child.visible = filterNodeMethod.call(child, value, child.data, child);
  50772. traverse(child);
  50773. });
  50774. if (!node.visible && childNodes.length) {
  50775. let allHidden = true;
  50776. allHidden = !childNodes.some((child) => child.visible);
  50777. if (node.root) {
  50778. ;
  50779. node.root.visible = allHidden === false;
  50780. } else {
  50781. ;
  50782. node.visible = allHidden === false;
  50783. }
  50784. }
  50785. if (!value)
  50786. return;
  50787. if (node.visible && !node.isLeaf && !lazy)
  50788. node.expand();
  50789. };
  50790. traverse(this);
  50791. }
  50792. setData(newVal) {
  50793. const instanceChanged = newVal !== this.root.data;
  50794. if (instanceChanged) {
  50795. this.root.setData(newVal);
  50796. this._initDefaultCheckedNodes();
  50797. } else {
  50798. this.root.updateChildren();
  50799. }
  50800. }
  50801. getNode(data) {
  50802. if (data instanceof Node2)
  50803. return data;
  50804. const key = isObject(data) ? getNodeKey(this.key, data) : data;
  50805. return this.nodesMap[key] || null;
  50806. }
  50807. insertBefore(data, refData) {
  50808. const refNode = this.getNode(refData);
  50809. refNode.parent.insertBefore({ data }, refNode);
  50810. }
  50811. insertAfter(data, refData) {
  50812. const refNode = this.getNode(refData);
  50813. refNode.parent.insertAfter({ data }, refNode);
  50814. }
  50815. remove(data) {
  50816. const node = this.getNode(data);
  50817. if (node && node.parent) {
  50818. if (node === this.currentNode) {
  50819. this.currentNode = null;
  50820. }
  50821. node.parent.removeChild(node);
  50822. }
  50823. }
  50824. append(data, parentData) {
  50825. const parentNode = parentData ? this.getNode(parentData) : this.root;
  50826. if (parentNode) {
  50827. parentNode.insertChild({ data });
  50828. }
  50829. }
  50830. _initDefaultCheckedNodes() {
  50831. const defaultCheckedKeys = this.defaultCheckedKeys || [];
  50832. const nodesMap = this.nodesMap;
  50833. defaultCheckedKeys.forEach((checkedKey) => {
  50834. const node = nodesMap[checkedKey];
  50835. if (node) {
  50836. node.setChecked(true, !this.checkStrictly);
  50837. }
  50838. });
  50839. }
  50840. _initDefaultCheckedNode(node) {
  50841. const defaultCheckedKeys = this.defaultCheckedKeys || [];
  50842. if (defaultCheckedKeys.includes(node.key)) {
  50843. node.setChecked(true, !this.checkStrictly);
  50844. }
  50845. }
  50846. setDefaultCheckedKey(newVal) {
  50847. if (newVal !== this.defaultCheckedKeys) {
  50848. this.defaultCheckedKeys = newVal;
  50849. this._initDefaultCheckedNodes();
  50850. }
  50851. }
  50852. registerNode(node) {
  50853. const key = this.key;
  50854. if (!node || !node.data)
  50855. return;
  50856. if (!key) {
  50857. this.nodesMap[node.id] = node;
  50858. } else {
  50859. const nodeKey = node.key;
  50860. if (nodeKey !== void 0)
  50861. this.nodesMap[node.key] = node;
  50862. }
  50863. }
  50864. deregisterNode(node) {
  50865. const key = this.key;
  50866. if (!key || !node || !node.data)
  50867. return;
  50868. node.childNodes.forEach((child) => {
  50869. this.deregisterNode(child);
  50870. });
  50871. delete this.nodesMap[node.key];
  50872. }
  50873. getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
  50874. const checkedNodes = [];
  50875. const traverse = function(node) {
  50876. const childNodes = node.root ? node.root.childNodes : node.childNodes;
  50877. childNodes.forEach((child) => {
  50878. if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {
  50879. checkedNodes.push(child.data);
  50880. }
  50881. traverse(child);
  50882. });
  50883. };
  50884. traverse(this);
  50885. return checkedNodes;
  50886. }
  50887. getCheckedKeys(leafOnly = false) {
  50888. return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
  50889. }
  50890. getHalfCheckedNodes() {
  50891. const nodes = [];
  50892. const traverse = function(node) {
  50893. const childNodes = node.root ? node.root.childNodes : node.childNodes;
  50894. childNodes.forEach((child) => {
  50895. if (child.indeterminate) {
  50896. nodes.push(child.data);
  50897. }
  50898. traverse(child);
  50899. });
  50900. };
  50901. traverse(this);
  50902. return nodes;
  50903. }
  50904. getHalfCheckedKeys() {
  50905. return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
  50906. }
  50907. _getAllNodes() {
  50908. const allNodes = [];
  50909. const nodesMap = this.nodesMap;
  50910. for (const nodeKey in nodesMap) {
  50911. if (hasOwn(nodesMap, nodeKey)) {
  50912. allNodes.push(nodesMap[nodeKey]);
  50913. }
  50914. }
  50915. return allNodes;
  50916. }
  50917. updateChildren(key, data) {
  50918. const node = this.nodesMap[key];
  50919. if (!node)
  50920. return;
  50921. const childNodes = node.childNodes;
  50922. for (let i = childNodes.length - 1; i >= 0; i--) {
  50923. const child = childNodes[i];
  50924. this.remove(child.data);
  50925. }
  50926. for (let i = 0, j = data.length; i < j; i++) {
  50927. const child = data[i];
  50928. this.append(child, node.data);
  50929. }
  50930. }
  50931. _setCheckedKeys(key, leafOnly = false, checkedKeys) {
  50932. const allNodes = this._getAllNodes().sort((a2, b2) => b2.level - a2.level);
  50933. const cache2 = /* @__PURE__ */ Object.create(null);
  50934. const keys3 = Object.keys(checkedKeys);
  50935. allNodes.forEach((node) => node.setChecked(false, false));
  50936. for (let i = 0, j = allNodes.length; i < j; i++) {
  50937. const node = allNodes[i];
  50938. const nodeKey = node.data[key].toString();
  50939. const checked = keys3.includes(nodeKey);
  50940. if (!checked) {
  50941. if (node.checked && !cache2[nodeKey]) {
  50942. node.setChecked(false, false);
  50943. }
  50944. continue;
  50945. }
  50946. let parent2 = node.parent;
  50947. while (parent2 && parent2.level > 0) {
  50948. cache2[parent2.data[key]] = true;
  50949. parent2 = parent2.parent;
  50950. }
  50951. if (node.isLeaf || this.checkStrictly) {
  50952. node.setChecked(true, false);
  50953. continue;
  50954. }
  50955. node.setChecked(true, true);
  50956. if (leafOnly) {
  50957. node.setChecked(false, false);
  50958. const traverse = function(node2) {
  50959. const childNodes = node2.childNodes;
  50960. childNodes.forEach((child) => {
  50961. if (!child.isLeaf) {
  50962. child.setChecked(false, false);
  50963. }
  50964. traverse(child);
  50965. });
  50966. };
  50967. traverse(node);
  50968. }
  50969. }
  50970. }
  50971. setCheckedNodes(array4, leafOnly = false) {
  50972. const key = this.key;
  50973. const checkedKeys = {};
  50974. array4.forEach((item) => {
  50975. checkedKeys[(item || {})[key]] = true;
  50976. });
  50977. this._setCheckedKeys(key, leafOnly, checkedKeys);
  50978. }
  50979. setCheckedKeys(keys3, leafOnly = false) {
  50980. this.defaultCheckedKeys = keys3;
  50981. const key = this.key;
  50982. const checkedKeys = {};
  50983. keys3.forEach((key2) => {
  50984. checkedKeys[key2] = true;
  50985. });
  50986. this._setCheckedKeys(key, leafOnly, checkedKeys);
  50987. }
  50988. setDefaultExpandedKeys(keys3) {
  50989. keys3 = keys3 || [];
  50990. this.defaultExpandedKeys = keys3;
  50991. keys3.forEach((key) => {
  50992. const node = this.getNode(key);
  50993. if (node)
  50994. node.expand(null, this.autoExpandParent);
  50995. });
  50996. }
  50997. setChecked(data, checked, deep) {
  50998. const node = this.getNode(data);
  50999. if (node) {
  51000. node.setChecked(!!checked, deep);
  51001. }
  51002. }
  51003. getCurrentNode() {
  51004. return this.currentNode;
  51005. }
  51006. setCurrentNode(currentNode) {
  51007. const prevCurrentNode = this.currentNode;
  51008. if (prevCurrentNode) {
  51009. prevCurrentNode.isCurrent = false;
  51010. }
  51011. this.currentNode = currentNode;
  51012. this.currentNode.isCurrent = true;
  51013. }
  51014. setUserCurrentNode(node, shouldAutoExpandParent = true) {
  51015. const key = node[this.key];
  51016. const currNode = this.nodesMap[key];
  51017. this.setCurrentNode(currNode);
  51018. if (shouldAutoExpandParent && this.currentNode.level > 1) {
  51019. this.currentNode.parent.expand(null, true);
  51020. }
  51021. }
  51022. setCurrentNodeKey(key, shouldAutoExpandParent = true) {
  51023. if (key === null || key === void 0) {
  51024. this.currentNode && (this.currentNode.isCurrent = false);
  51025. this.currentNode = null;
  51026. return;
  51027. }
  51028. const node = this.getNode(key);
  51029. if (node) {
  51030. this.setCurrentNode(node);
  51031. if (shouldAutoExpandParent && this.currentNode.level > 1) {
  51032. this.currentNode.parent.expand(null, true);
  51033. }
  51034. }
  51035. }
  51036. };
  51037. // node_modules/element-plus/es/components/tree/src/tree-node-content.mjs
  51038. var _sfc_main134 = defineComponent({
  51039. name: "ElTreeNodeContent",
  51040. props: {
  51041. node: {
  51042. type: Object,
  51043. required: true
  51044. },
  51045. renderContent: Function
  51046. },
  51047. setup(props) {
  51048. const ns2 = useNamespace("tree");
  51049. const nodeInstance = inject("NodeInstance");
  51050. const tree = inject("RootTree");
  51051. return () => {
  51052. const node = props.node;
  51053. const { data, store } = node;
  51054. return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : tree.ctx.slots.default ? tree.ctx.slots.default({ node, data }) : h("span", { class: ns2.be("node", "label") }, [node.label]);
  51055. };
  51056. }
  51057. });
  51058. var NodeContent2 = _export_sfc(_sfc_main134, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);
  51059. // node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs
  51060. function useNodeExpandEventBroadcast(props) {
  51061. const parentNodeMap = inject("TreeNodeMap", null);
  51062. const currentNodeMap = {
  51063. treeNodeExpand: (node) => {
  51064. if (props.node !== node) {
  51065. props.node.collapse();
  51066. }
  51067. },
  51068. children: []
  51069. };
  51070. if (parentNodeMap) {
  51071. parentNodeMap.children.push(currentNodeMap);
  51072. }
  51073. provide("TreeNodeMap", currentNodeMap);
  51074. return {
  51075. broadcastExpanded: (node) => {
  51076. if (!props.accordion)
  51077. return;
  51078. for (const childNode of currentNodeMap.children) {
  51079. childNode.treeNodeExpand(node);
  51080. }
  51081. }
  51082. };
  51083. }
  51084. // node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs
  51085. var dragEventsKey = Symbol("dragEvents");
  51086. function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
  51087. const ns2 = useNamespace("tree");
  51088. const dragState = ref({
  51089. showDropIndicator: false,
  51090. draggingNode: null,
  51091. dropNode: null,
  51092. allowDrop: true,
  51093. dropType: null
  51094. });
  51095. const treeNodeDragStart = ({ event, treeNode }) => {
  51096. if (typeof props.allowDrag === "function" && !props.allowDrag(treeNode.node)) {
  51097. event.preventDefault();
  51098. return false;
  51099. }
  51100. event.dataTransfer.effectAllowed = "move";
  51101. try {
  51102. event.dataTransfer.setData("text/plain", "");
  51103. } catch (e) {
  51104. }
  51105. dragState.value.draggingNode = treeNode;
  51106. ctx.emit("node-drag-start", treeNode.node, event);
  51107. };
  51108. const treeNodeDragOver = ({ event, treeNode }) => {
  51109. const dropNode = treeNode;
  51110. const oldDropNode = dragState.value.dropNode;
  51111. if (oldDropNode && oldDropNode !== dropNode) {
  51112. removeClass(oldDropNode.$el, ns2.is("drop-inner"));
  51113. }
  51114. const draggingNode = dragState.value.draggingNode;
  51115. if (!draggingNode || !dropNode)
  51116. return;
  51117. let dropPrev = true;
  51118. let dropInner = true;
  51119. let dropNext = true;
  51120. let userAllowDropInner = true;
  51121. if (typeof props.allowDrop === "function") {
  51122. dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev");
  51123. userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner");
  51124. dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
  51125. }
  51126. event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
  51127. if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {
  51128. if (oldDropNode) {
  51129. ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
  51130. }
  51131. ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event);
  51132. }
  51133. if (dropPrev || dropInner || dropNext) {
  51134. dragState.value.dropNode = dropNode;
  51135. }
  51136. if (dropNode.node.nextSibling === draggingNode.node) {
  51137. dropNext = false;
  51138. }
  51139. if (dropNode.node.previousSibling === draggingNode.node) {
  51140. dropPrev = false;
  51141. }
  51142. if (dropNode.node.contains(draggingNode.node, false)) {
  51143. dropInner = false;
  51144. }
  51145. if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
  51146. dropPrev = false;
  51147. dropInner = false;
  51148. dropNext = false;
  51149. }
  51150. const targetPosition = dropNode.$el.getBoundingClientRect();
  51151. const treePosition = el$.value.getBoundingClientRect();
  51152. let dropType;
  51153. const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : -1;
  51154. const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : 1;
  51155. let indicatorTop = -9999;
  51156. const distance = event.clientY - targetPosition.top;
  51157. if (distance < targetPosition.height * prevPercent) {
  51158. dropType = "before";
  51159. } else if (distance > targetPosition.height * nextPercent) {
  51160. dropType = "after";
  51161. } else if (dropInner) {
  51162. dropType = "inner";
  51163. } else {
  51164. dropType = "none";
  51165. }
  51166. const iconPosition = dropNode.$el.querySelector(`.${ns2.be("node", "expand-icon")}`).getBoundingClientRect();
  51167. const dropIndicator = dropIndicator$.value;
  51168. if (dropType === "before") {
  51169. indicatorTop = iconPosition.top - treePosition.top;
  51170. } else if (dropType === "after") {
  51171. indicatorTop = iconPosition.bottom - treePosition.top;
  51172. }
  51173. dropIndicator.style.top = `${indicatorTop}px`;
  51174. dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`;
  51175. if (dropType === "inner") {
  51176. addClass(dropNode.$el, ns2.is("drop-inner"));
  51177. } else {
  51178. removeClass(dropNode.$el, ns2.is("drop-inner"));
  51179. }
  51180. dragState.value.showDropIndicator = dropType === "before" || dropType === "after";
  51181. dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;
  51182. dragState.value.dropType = dropType;
  51183. ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event);
  51184. };
  51185. const treeNodeDragEnd = (event) => {
  51186. const { draggingNode, dropType, dropNode } = dragState.value;
  51187. event.preventDefault();
  51188. event.dataTransfer.dropEffect = "move";
  51189. if (draggingNode && dropNode) {
  51190. const draggingNodeCopy = { data: draggingNode.node.data };
  51191. if (dropType !== "none") {
  51192. draggingNode.node.remove();
  51193. }
  51194. if (dropType === "before") {
  51195. dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node);
  51196. } else if (dropType === "after") {
  51197. dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node);
  51198. } else if (dropType === "inner") {
  51199. dropNode.node.insertChild(draggingNodeCopy);
  51200. }
  51201. if (dropType !== "none") {
  51202. store.value.registerNode(draggingNodeCopy);
  51203. }
  51204. removeClass(dropNode.$el, ns2.is("drop-inner"));
  51205. ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event);
  51206. if (dropType !== "none") {
  51207. ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event);
  51208. }
  51209. }
  51210. if (draggingNode && !dropNode) {
  51211. ctx.emit("node-drag-end", draggingNode.node, null, dropType, event);
  51212. }
  51213. dragState.value.showDropIndicator = false;
  51214. dragState.value.draggingNode = null;
  51215. dragState.value.dropNode = null;
  51216. dragState.value.allowDrop = true;
  51217. };
  51218. provide(dragEventsKey, {
  51219. treeNodeDragStart,
  51220. treeNodeDragOver,
  51221. treeNodeDragEnd
  51222. });
  51223. return {
  51224. dragState
  51225. };
  51226. }
  51227. // node_modules/element-plus/es/components/tree/src/tree-node.mjs
  51228. var _sfc_main135 = defineComponent({
  51229. name: "ElTreeNode",
  51230. components: {
  51231. ElCollapseTransition: _CollapseTransition,
  51232. ElCheckbox,
  51233. NodeContent: NodeContent2,
  51234. ElIcon,
  51235. Loading: loading_default
  51236. },
  51237. props: {
  51238. node: {
  51239. type: Node2,
  51240. default: () => ({})
  51241. },
  51242. props: {
  51243. type: Object,
  51244. default: () => ({})
  51245. },
  51246. accordion: Boolean,
  51247. renderContent: Function,
  51248. renderAfterExpand: Boolean,
  51249. showCheckbox: {
  51250. type: Boolean,
  51251. default: false
  51252. }
  51253. },
  51254. emits: ["node-expand"],
  51255. setup(props, ctx) {
  51256. const ns2 = useNamespace("tree");
  51257. const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
  51258. const tree = inject("RootTree");
  51259. const expanded = ref(false);
  51260. const childNodeRendered = ref(false);
  51261. const oldChecked = ref(null);
  51262. const oldIndeterminate = ref(null);
  51263. const node$ = ref(null);
  51264. const dragEvents = inject(dragEventsKey);
  51265. const instance = getCurrentInstance();
  51266. provide("NodeInstance", instance);
  51267. if (!tree) {
  51268. debugWarn("Tree", "Can not find node's tree.");
  51269. }
  51270. if (props.node.expanded) {
  51271. expanded.value = true;
  51272. childNodeRendered.value = true;
  51273. }
  51274. const childrenKey = tree.props["children"] || "children";
  51275. watch(() => {
  51276. const children = props.node.data[childrenKey];
  51277. return children && [...children];
  51278. }, () => {
  51279. props.node.updateChildren();
  51280. });
  51281. watch(() => props.node.indeterminate, (val) => {
  51282. handleSelectChange(props.node.checked, val);
  51283. });
  51284. watch(() => props.node.checked, (val) => {
  51285. handleSelectChange(val, props.node.indeterminate);
  51286. });
  51287. watch(() => props.node.expanded, (val) => {
  51288. nextTick(() => expanded.value = val);
  51289. if (val) {
  51290. childNodeRendered.value = true;
  51291. }
  51292. });
  51293. const getNodeKey$1 = (node) => {
  51294. return getNodeKey(tree.props.nodeKey, node.data);
  51295. };
  51296. const getNodeClass = (node) => {
  51297. const nodeClassFunc = props.props.class;
  51298. if (!nodeClassFunc) {
  51299. return {};
  51300. }
  51301. let className;
  51302. if (isFunction(nodeClassFunc)) {
  51303. const { data } = node;
  51304. className = nodeClassFunc(data, node);
  51305. } else {
  51306. className = nodeClassFunc;
  51307. }
  51308. if (isString(className)) {
  51309. return { [className]: true };
  51310. } else {
  51311. return className;
  51312. }
  51313. };
  51314. const handleSelectChange = (checked, indeterminate) => {
  51315. if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) {
  51316. tree.ctx.emit("check-change", props.node.data, checked, indeterminate);
  51317. }
  51318. oldChecked.value = checked;
  51319. oldIndeterminate.value = indeterminate;
  51320. };
  51321. const handleClick = (e) => {
  51322. handleCurrentChange(tree.store, tree.ctx.emit, () => tree.store.value.setCurrentNode(props.node));
  51323. tree.currentNode.value = props.node;
  51324. if (tree.props.expandOnClickNode) {
  51325. handleExpandIconClick();
  51326. }
  51327. if (tree.props.checkOnClickNode && !props.node.disabled) {
  51328. handleCheckChange(null, {
  51329. target: { checked: !props.node.checked }
  51330. });
  51331. }
  51332. tree.ctx.emit("node-click", props.node.data, props.node, instance, e);
  51333. };
  51334. const handleContextMenu = (event) => {
  51335. if (tree.instance.vnode.props["onNodeContextmenu"]) {
  51336. event.stopPropagation();
  51337. event.preventDefault();
  51338. }
  51339. tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance);
  51340. };
  51341. const handleExpandIconClick = () => {
  51342. if (props.node.isLeaf)
  51343. return;
  51344. if (expanded.value) {
  51345. tree.ctx.emit("node-collapse", props.node.data, props.node, instance);
  51346. props.node.collapse();
  51347. } else {
  51348. props.node.expand();
  51349. ctx.emit("node-expand", props.node.data, props.node, instance);
  51350. }
  51351. };
  51352. const handleCheckChange = (value, ev) => {
  51353. props.node.setChecked(ev.target.checked, !tree.props.checkStrictly);
  51354. nextTick(() => {
  51355. const store = tree.store.value;
  51356. tree.ctx.emit("check", props.node.data, {
  51357. checkedNodes: store.getCheckedNodes(),
  51358. checkedKeys: store.getCheckedKeys(),
  51359. halfCheckedNodes: store.getHalfCheckedNodes(),
  51360. halfCheckedKeys: store.getHalfCheckedKeys()
  51361. });
  51362. });
  51363. };
  51364. const handleChildNodeExpand = (nodeData, node, instance2) => {
  51365. broadcastExpanded(node);
  51366. tree.ctx.emit("node-expand", nodeData, node, instance2);
  51367. };
  51368. const handleDragStart = (event) => {
  51369. if (!tree.props.draggable)
  51370. return;
  51371. dragEvents.treeNodeDragStart({ event, treeNode: props });
  51372. };
  51373. const handleDragOver = (event) => {
  51374. event.preventDefault();
  51375. if (!tree.props.draggable)
  51376. return;
  51377. dragEvents.treeNodeDragOver({
  51378. event,
  51379. treeNode: { $el: node$.value, node: props.node }
  51380. });
  51381. };
  51382. const handleDrop = (event) => {
  51383. event.preventDefault();
  51384. };
  51385. const handleDragEnd = (event) => {
  51386. if (!tree.props.draggable)
  51387. return;
  51388. dragEvents.treeNodeDragEnd(event);
  51389. };
  51390. return {
  51391. ns: ns2,
  51392. node$,
  51393. tree,
  51394. expanded,
  51395. childNodeRendered,
  51396. oldChecked,
  51397. oldIndeterminate,
  51398. getNodeKey: getNodeKey$1,
  51399. getNodeClass,
  51400. handleSelectChange,
  51401. handleClick,
  51402. handleContextMenu,
  51403. handleExpandIconClick,
  51404. handleCheckChange,
  51405. handleChildNodeExpand,
  51406. handleDragStart,
  51407. handleDragOver,
  51408. handleDrop,
  51409. handleDragEnd,
  51410. CaretRight: caret_right_default
  51411. };
  51412. }
  51413. });
  51414. var _hoisted_165 = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"];
  51415. var _hoisted_240 = ["aria-expanded"];
  51416. function _sfc_render33(_ctx, _cache, $props, $setup, $data, $options) {
  51417. const _component_el_icon = resolveComponent("el-icon");
  51418. const _component_el_checkbox = resolveComponent("el-checkbox");
  51419. const _component_loading = resolveComponent("loading");
  51420. const _component_node_content = resolveComponent("node-content");
  51421. const _component_el_tree_node = resolveComponent("el-tree-node");
  51422. const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
  51423. return withDirectives((openBlock(), createElementBlock("div", {
  51424. ref: "node$",
  51425. class: normalizeClass([
  51426. _ctx.ns.b("node"),
  51427. _ctx.ns.is("expanded", _ctx.expanded),
  51428. _ctx.ns.is("current", _ctx.node.isCurrent),
  51429. _ctx.ns.is("hidden", !_ctx.node.visible),
  51430. _ctx.ns.is("focusable", !_ctx.node.disabled),
  51431. _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked),
  51432. _ctx.getNodeClass(_ctx.node)
  51433. ]),
  51434. role: "treeitem",
  51435. tabindex: "-1",
  51436. "aria-expanded": _ctx.expanded,
  51437. "aria-disabled": _ctx.node.disabled,
  51438. "aria-checked": _ctx.node.checked,
  51439. draggable: _ctx.tree.props.draggable,
  51440. "data-key": _ctx.getNodeKey(_ctx.node),
  51441. onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
  51442. onContextmenu: _cache[2] || (_cache[2] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)),
  51443. onDragstart: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])),
  51444. onDragover: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])),
  51445. onDragend: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])),
  51446. onDrop: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"]))
  51447. }, [
  51448. createBaseVNode("div", {
  51449. class: normalizeClass(_ctx.ns.be("node", "content")),
  51450. style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" })
  51451. }, [
  51452. _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, {
  51453. key: 0,
  51454. class: normalizeClass([
  51455. _ctx.ns.be("node", "expand-icon"),
  51456. _ctx.ns.is("leaf", _ctx.node.isLeaf),
  51457. {
  51458. expanded: !_ctx.node.isLeaf && _ctx.expanded
  51459. }
  51460. ]),
  51461. onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"])
  51462. }, {
  51463. default: withCtx(() => [
  51464. (openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight)))
  51465. ]),
  51466. _: 1
  51467. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  51468. _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
  51469. key: 1,
  51470. "model-value": _ctx.node.checked,
  51471. indeterminate: _ctx.node.indeterminate,
  51472. disabled: !!_ctx.node.disabled,
  51473. onClick: _cache[0] || (_cache[0] = withModifiers(() => {
  51474. }, ["stop"])),
  51475. onChange: _ctx.handleCheckChange
  51476. }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : createCommentVNode("v-if", true),
  51477. _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
  51478. key: 2,
  51479. class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")])
  51480. }, {
  51481. default: withCtx(() => [
  51482. createVNode(_component_loading)
  51483. ]),
  51484. _: 1
  51485. }, 8, ["class"])) : createCommentVNode("v-if", true),
  51486. createVNode(_component_node_content, {
  51487. node: _ctx.node,
  51488. "render-content": _ctx.renderContent
  51489. }, null, 8, ["node", "render-content"])
  51490. ], 6),
  51491. createVNode(_component_el_collapse_transition, null, {
  51492. default: withCtx(() => [
  51493. !_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", {
  51494. key: 0,
  51495. class: normalizeClass(_ctx.ns.be("node", "children")),
  51496. role: "group",
  51497. "aria-expanded": _ctx.expanded
  51498. }, [
  51499. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {
  51500. return openBlock(), createBlock(_component_el_tree_node, {
  51501. key: _ctx.getNodeKey(child),
  51502. "render-content": _ctx.renderContent,
  51503. "render-after-expand": _ctx.renderAfterExpand,
  51504. "show-checkbox": _ctx.showCheckbox,
  51505. node: child,
  51506. accordion: _ctx.accordion,
  51507. props: _ctx.props,
  51508. onNodeExpand: _ctx.handleChildNodeExpand
  51509. }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]);
  51510. }), 128))
  51511. ], 10, _hoisted_240)), [
  51512. [vShow, _ctx.expanded]
  51513. ]) : createCommentVNode("v-if", true)
  51514. ]),
  51515. _: 1
  51516. })
  51517. ], 42, _hoisted_165)), [
  51518. [vShow, _ctx.node.visible]
  51519. ]);
  51520. }
  51521. var ElTreeNode = _export_sfc(_sfc_main135, [["render", _sfc_render33], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]);
  51522. // node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs
  51523. function useKeydown({ el$ }, store) {
  51524. const ns2 = useNamespace("tree");
  51525. const treeItems = shallowRef([]);
  51526. const checkboxItems = shallowRef([]);
  51527. onMounted(() => {
  51528. initTabIndex();
  51529. });
  51530. onUpdated(() => {
  51531. treeItems.value = Array.from(el$.value.querySelectorAll("[role=treeitem]"));
  51532. checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]"));
  51533. });
  51534. watch(checkboxItems, (val) => {
  51535. val.forEach((checkbox) => {
  51536. checkbox.setAttribute("tabindex", "-1");
  51537. });
  51538. });
  51539. const handleKeydown = (ev) => {
  51540. const currentItem = ev.target;
  51541. if (!currentItem.className.includes(ns2.b("node")))
  51542. return;
  51543. const code = ev.code;
  51544. treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns2.is("focusable")}[role=treeitem]`));
  51545. const currentIndex = treeItems.value.indexOf(currentItem);
  51546. let nextIndex;
  51547. if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {
  51548. ev.preventDefault();
  51549. if (code === EVENT_CODE.up) {
  51550. nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.value.length - 1;
  51551. const startIndex = nextIndex;
  51552. while (true) {
  51553. if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus)
  51554. break;
  51555. nextIndex--;
  51556. if (nextIndex === startIndex) {
  51557. nextIndex = -1;
  51558. break;
  51559. }
  51560. if (nextIndex < 0) {
  51561. nextIndex = treeItems.value.length - 1;
  51562. }
  51563. }
  51564. } else {
  51565. nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.value.length - 1 ? currentIndex + 1 : 0;
  51566. const startIndex = nextIndex;
  51567. while (true) {
  51568. if (store.value.getNode(treeItems.value[nextIndex].dataset.key).canFocus)
  51569. break;
  51570. nextIndex++;
  51571. if (nextIndex === startIndex) {
  51572. nextIndex = -1;
  51573. break;
  51574. }
  51575. if (nextIndex >= treeItems.value.length) {
  51576. nextIndex = 0;
  51577. }
  51578. }
  51579. }
  51580. nextIndex !== -1 && treeItems.value[nextIndex].focus();
  51581. }
  51582. if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) {
  51583. ev.preventDefault();
  51584. currentItem.click();
  51585. }
  51586. const hasInput = currentItem.querySelector('[type="checkbox"]');
  51587. if ([EVENT_CODE.enter, EVENT_CODE.space].includes(code) && hasInput) {
  51588. ev.preventDefault();
  51589. hasInput.click();
  51590. }
  51591. };
  51592. useEventListener(el$, "keydown", handleKeydown);
  51593. const initTabIndex = () => {
  51594. var _a2;
  51595. treeItems.value = Array.from(el$.value.querySelectorAll(`.${ns2.is("focusable")}[role=treeitem]`));
  51596. checkboxItems.value = Array.from(el$.value.querySelectorAll("input[type=checkbox]"));
  51597. const checkedItem = el$.value.querySelectorAll(`.${ns2.is("checked")}[role=treeitem]`);
  51598. if (checkedItem.length) {
  51599. checkedItem[0].setAttribute("tabindex", "0");
  51600. return;
  51601. }
  51602. (_a2 = treeItems.value[0]) == null ? void 0 : _a2.setAttribute("tabindex", "0");
  51603. };
  51604. }
  51605. // node_modules/element-plus/es/components/tree/src/tree.mjs
  51606. var _sfc_main136 = defineComponent({
  51607. name: "ElTree",
  51608. components: { ElTreeNode },
  51609. props: {
  51610. data: {
  51611. type: Array,
  51612. default: () => []
  51613. },
  51614. emptyText: {
  51615. type: String
  51616. },
  51617. renderAfterExpand: {
  51618. type: Boolean,
  51619. default: true
  51620. },
  51621. nodeKey: String,
  51622. checkStrictly: Boolean,
  51623. defaultExpandAll: Boolean,
  51624. expandOnClickNode: {
  51625. type: Boolean,
  51626. default: true
  51627. },
  51628. checkOnClickNode: Boolean,
  51629. checkDescendants: {
  51630. type: Boolean,
  51631. default: false
  51632. },
  51633. autoExpandParent: {
  51634. type: Boolean,
  51635. default: true
  51636. },
  51637. defaultCheckedKeys: Array,
  51638. defaultExpandedKeys: Array,
  51639. currentNodeKey: [String, Number],
  51640. renderContent: Function,
  51641. showCheckbox: {
  51642. type: Boolean,
  51643. default: false
  51644. },
  51645. draggable: {
  51646. type: Boolean,
  51647. default: false
  51648. },
  51649. allowDrag: Function,
  51650. allowDrop: Function,
  51651. props: {
  51652. type: Object,
  51653. default: () => ({
  51654. children: "children",
  51655. label: "label",
  51656. disabled: "disabled"
  51657. })
  51658. },
  51659. lazy: {
  51660. type: Boolean,
  51661. default: false
  51662. },
  51663. highlightCurrent: Boolean,
  51664. load: Function,
  51665. filterNodeMethod: Function,
  51666. accordion: Boolean,
  51667. indent: {
  51668. type: Number,
  51669. default: 18
  51670. },
  51671. icon: {
  51672. type: iconPropType
  51673. }
  51674. },
  51675. emits: [
  51676. "check-change",
  51677. "current-change",
  51678. "node-click",
  51679. "node-contextmenu",
  51680. "node-collapse",
  51681. "node-expand",
  51682. "check",
  51683. "node-drag-start",
  51684. "node-drag-end",
  51685. "node-drop",
  51686. "node-drag-leave",
  51687. "node-drag-enter",
  51688. "node-drag-over"
  51689. ],
  51690. setup(props, ctx) {
  51691. const { t } = useLocale();
  51692. const ns2 = useNamespace("tree");
  51693. const store = ref(new TreeStore({
  51694. key: props.nodeKey,
  51695. data: props.data,
  51696. lazy: props.lazy,
  51697. props: props.props,
  51698. load: props.load,
  51699. currentNodeKey: props.currentNodeKey,
  51700. checkStrictly: props.checkStrictly,
  51701. checkDescendants: props.checkDescendants,
  51702. defaultCheckedKeys: props.defaultCheckedKeys,
  51703. defaultExpandedKeys: props.defaultExpandedKeys,
  51704. autoExpandParent: props.autoExpandParent,
  51705. defaultExpandAll: props.defaultExpandAll,
  51706. filterNodeMethod: props.filterNodeMethod
  51707. }));
  51708. store.value.initialize();
  51709. const root2 = ref(store.value.root);
  51710. const currentNode = ref(null);
  51711. const el$ = ref(null);
  51712. const dropIndicator$ = ref(null);
  51713. const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
  51714. const { dragState } = useDragNodeHandler({
  51715. props,
  51716. ctx,
  51717. el$,
  51718. dropIndicator$,
  51719. store
  51720. });
  51721. useKeydown({ el$ }, store);
  51722. const isEmpty3 = computed2(() => {
  51723. const { childNodes } = root2.value;
  51724. return !childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible);
  51725. });
  51726. watch(() => props.currentNodeKey, (newVal) => {
  51727. store.value.setCurrentNodeKey(newVal);
  51728. });
  51729. watch(() => props.defaultCheckedKeys, (newVal) => {
  51730. store.value.setDefaultCheckedKey(newVal);
  51731. });
  51732. watch(() => props.defaultExpandedKeys, (newVal) => {
  51733. store.value.setDefaultExpandedKeys(newVal);
  51734. });
  51735. watch(() => props.data, (newVal) => {
  51736. store.value.setData(newVal);
  51737. }, { deep: true });
  51738. watch(() => props.checkStrictly, (newVal) => {
  51739. store.value.checkStrictly = newVal;
  51740. });
  51741. const filter2 = (value) => {
  51742. if (!props.filterNodeMethod)
  51743. throw new Error("[Tree] filterNodeMethod is required when filter");
  51744. store.value.filter(value);
  51745. };
  51746. const getNodeKey$1 = (node) => {
  51747. return getNodeKey(props.nodeKey, node.data);
  51748. };
  51749. const getNodePath = (data) => {
  51750. if (!props.nodeKey)
  51751. throw new Error("[Tree] nodeKey is required in getNodePath");
  51752. const node = store.value.getNode(data);
  51753. if (!node)
  51754. return [];
  51755. const path = [node.data];
  51756. let parent2 = node.parent;
  51757. while (parent2 && parent2 !== root2.value) {
  51758. path.push(parent2.data);
  51759. parent2 = parent2.parent;
  51760. }
  51761. return path.reverse();
  51762. };
  51763. const getCheckedNodes = (leafOnly, includeHalfChecked) => {
  51764. return store.value.getCheckedNodes(leafOnly, includeHalfChecked);
  51765. };
  51766. const getCheckedKeys = (leafOnly) => {
  51767. return store.value.getCheckedKeys(leafOnly);
  51768. };
  51769. const getCurrentNode = () => {
  51770. const currentNode2 = store.value.getCurrentNode();
  51771. return currentNode2 ? currentNode2.data : null;
  51772. };
  51773. const getCurrentKey = () => {
  51774. if (!props.nodeKey)
  51775. throw new Error("[Tree] nodeKey is required in getCurrentKey");
  51776. const currentNode2 = getCurrentNode();
  51777. return currentNode2 ? currentNode2[props.nodeKey] : null;
  51778. };
  51779. const setCheckedNodes = (nodes, leafOnly) => {
  51780. if (!props.nodeKey)
  51781. throw new Error("[Tree] nodeKey is required in setCheckedNodes");
  51782. store.value.setCheckedNodes(nodes, leafOnly);
  51783. };
  51784. const setCheckedKeys = (keys3, leafOnly) => {
  51785. if (!props.nodeKey)
  51786. throw new Error("[Tree] nodeKey is required in setCheckedKeys");
  51787. store.value.setCheckedKeys(keys3, leafOnly);
  51788. };
  51789. const setChecked = (data, checked, deep) => {
  51790. store.value.setChecked(data, checked, deep);
  51791. };
  51792. const getHalfCheckedNodes = () => {
  51793. return store.value.getHalfCheckedNodes();
  51794. };
  51795. const getHalfCheckedKeys = () => {
  51796. return store.value.getHalfCheckedKeys();
  51797. };
  51798. const setCurrentNode = (node, shouldAutoExpandParent = true) => {
  51799. if (!props.nodeKey)
  51800. throw new Error("[Tree] nodeKey is required in setCurrentNode");
  51801. handleCurrentChange(store, ctx.emit, () => store.value.setUserCurrentNode(node, shouldAutoExpandParent));
  51802. };
  51803. const setCurrentKey = (key, shouldAutoExpandParent = true) => {
  51804. if (!props.nodeKey)
  51805. throw new Error("[Tree] nodeKey is required in setCurrentKey");
  51806. handleCurrentChange(store, ctx.emit, () => store.value.setCurrentNodeKey(key, shouldAutoExpandParent));
  51807. };
  51808. const getNode = (data) => {
  51809. return store.value.getNode(data);
  51810. };
  51811. const remove2 = (data) => {
  51812. store.value.remove(data);
  51813. };
  51814. const append = (data, parentNode) => {
  51815. store.value.append(data, parentNode);
  51816. };
  51817. const insertBefore = (data, refNode) => {
  51818. store.value.insertBefore(data, refNode);
  51819. };
  51820. const insertAfter = (data, refNode) => {
  51821. store.value.insertAfter(data, refNode);
  51822. };
  51823. const handleNodeExpand = (nodeData, node, instance) => {
  51824. broadcastExpanded(node);
  51825. ctx.emit("node-expand", nodeData, node, instance);
  51826. };
  51827. const updateKeyChildren = (key, data) => {
  51828. if (!props.nodeKey)
  51829. throw new Error("[Tree] nodeKey is required in updateKeyChild");
  51830. store.value.updateChildren(key, data);
  51831. };
  51832. provide("RootTree", {
  51833. ctx,
  51834. props,
  51835. store,
  51836. root: root2,
  51837. currentNode,
  51838. instance: getCurrentInstance()
  51839. });
  51840. provide(formItemContextKey, void 0);
  51841. return {
  51842. ns: ns2,
  51843. store,
  51844. root: root2,
  51845. currentNode,
  51846. dragState,
  51847. el$,
  51848. dropIndicator$,
  51849. isEmpty: isEmpty3,
  51850. filter: filter2,
  51851. getNodeKey: getNodeKey$1,
  51852. getNodePath,
  51853. getCheckedNodes,
  51854. getCheckedKeys,
  51855. getCurrentNode,
  51856. getCurrentKey,
  51857. setCheckedNodes,
  51858. setCheckedKeys,
  51859. setChecked,
  51860. getHalfCheckedNodes,
  51861. getHalfCheckedKeys,
  51862. setCurrentNode,
  51863. setCurrentKey,
  51864. t,
  51865. getNode,
  51866. remove: remove2,
  51867. append,
  51868. insertBefore,
  51869. insertAfter,
  51870. handleNodeExpand,
  51871. updateKeyChildren
  51872. };
  51873. }
  51874. });
  51875. function _sfc_render34(_ctx, _cache, $props, $setup, $data, $options) {
  51876. var _a2;
  51877. const _component_el_tree_node = resolveComponent("el-tree-node");
  51878. return openBlock(), createElementBlock("div", {
  51879. ref: "el$",
  51880. class: normalizeClass([
  51881. _ctx.ns.b(),
  51882. _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode),
  51883. _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop),
  51884. _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"),
  51885. { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent }
  51886. ]),
  51887. role: "tree"
  51888. }, [
  51889. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {
  51890. return openBlock(), createBlock(_component_el_tree_node, {
  51891. key: _ctx.getNodeKey(child),
  51892. node: child,
  51893. props: _ctx.props,
  51894. accordion: _ctx.accordion,
  51895. "render-after-expand": _ctx.renderAfterExpand,
  51896. "show-checkbox": _ctx.showCheckbox,
  51897. "render-content": _ctx.renderContent,
  51898. onNodeExpand: _ctx.handleNodeExpand
  51899. }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]);
  51900. }), 128)),
  51901. _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
  51902. key: 0,
  51903. class: normalizeClass(_ctx.ns.e("empty-block"))
  51904. }, [
  51905. createBaseVNode("span", {
  51906. class: normalizeClass(_ctx.ns.e("empty-text"))
  51907. }, toDisplayString((_a2 = _ctx.emptyText) != null ? _a2 : _ctx.t("el.tree.emptyText")), 3)
  51908. ], 2)) : createCommentVNode("v-if", true),
  51909. withDirectives(createBaseVNode("div", {
  51910. ref: "dropIndicator$",
  51911. class: normalizeClass(_ctx.ns.e("drop-indicator"))
  51912. }, null, 2), [
  51913. [vShow, _ctx.dragState.showDropIndicator]
  51914. ])
  51915. ], 2);
  51916. }
  51917. var Tree = _export_sfc(_sfc_main136, [["render", _sfc_render34], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);
  51918. // node_modules/element-plus/es/components/tree/index.mjs
  51919. Tree.install = (app) => {
  51920. app.component(Tree.name, Tree);
  51921. };
  51922. var _Tree = Tree;
  51923. var ElTree = _Tree;
  51924. // node_modules/element-plus/es/components/tree-select/src/select.mjs
  51925. var useSelect3 = (props, { attrs }, {
  51926. tree,
  51927. key
  51928. }) => {
  51929. const ns2 = useNamespace("tree-select");
  51930. const result2 = {
  51931. ...pick_default(toRefs(props), Object.keys(ElSelect.props)),
  51932. ...attrs,
  51933. valueKey: key,
  51934. popperClass: computed2(() => {
  51935. const classes = [ns2.e("popper")];
  51936. if (props.popperClass)
  51937. classes.push(props.popperClass);
  51938. return classes.join(" ");
  51939. }),
  51940. filterMethod: (keyword = "") => {
  51941. if (props.filterMethod)
  51942. props.filterMethod(keyword);
  51943. nextTick(() => {
  51944. var _a2;
  51945. (_a2 = tree.value) == null ? void 0 : _a2.filter(keyword);
  51946. });
  51947. },
  51948. onVisibleChange: (visible) => {
  51949. var _a2;
  51950. (_a2 = attrs.onVisibleChange) == null ? void 0 : _a2.call(attrs, visible);
  51951. if (props.filterable && visible) {
  51952. result2.filterMethod();
  51953. }
  51954. }
  51955. };
  51956. return result2;
  51957. };
  51958. // node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs
  51959. var component = defineComponent({
  51960. extends: ElOption,
  51961. setup(props, ctx) {
  51962. const result2 = ElOption.setup(props, ctx);
  51963. delete result2.selectOptionClick;
  51964. const vm = getCurrentInstance().proxy;
  51965. nextTick(() => {
  51966. if (!result2.select.cachedOptions.get(vm.value)) {
  51967. result2.select.onOptionCreate(vm);
  51968. }
  51969. });
  51970. return result2;
  51971. },
  51972. methods: {
  51973. selectOptionClick() {
  51974. this.$el.parentElement.click();
  51975. }
  51976. }
  51977. });
  51978. // node_modules/element-plus/es/components/tree-select/src/utils.mjs
  51979. function isValidValue2(val) {
  51980. return val || val === 0;
  51981. }
  51982. function isValidArray(val) {
  51983. return Array.isArray(val) && val.length;
  51984. }
  51985. function toValidArray(val) {
  51986. return Array.isArray(val) ? val : isValidValue2(val) ? [val] : [];
  51987. }
  51988. function treeFind(treeData, findCallback, getChildren, resultCallback, parent2) {
  51989. for (let i = 0; i < treeData.length; i++) {
  51990. const data = treeData[i];
  51991. if (findCallback(data, i, treeData, parent2)) {
  51992. return resultCallback ? resultCallback(data, i, treeData, parent2) : data;
  51993. } else {
  51994. const children = getChildren(data);
  51995. if (isValidArray(children)) {
  51996. const find2 = treeFind(children, findCallback, getChildren, resultCallback, data);
  51997. if (find2)
  51998. return find2;
  51999. }
  52000. }
  52001. }
  52002. }
  52003. function treeEach(treeData, callback, getChildren, parent2) {
  52004. for (let i = 0; i < treeData.length; i++) {
  52005. const data = treeData[i];
  52006. callback(data, i, treeData, parent2);
  52007. const children = getChildren(data);
  52008. if (isValidArray(children)) {
  52009. treeEach(children, callback, getChildren, data);
  52010. }
  52011. }
  52012. }
  52013. // node_modules/element-plus/es/components/tree-select/src/tree.mjs
  52014. var useTree2 = (props, { attrs, slots, emit }, {
  52015. select,
  52016. tree,
  52017. key
  52018. }) => {
  52019. watch(() => props.modelValue, () => {
  52020. if (props.showCheckbox) {
  52021. nextTick(() => {
  52022. const treeInstance = tree.value;
  52023. if (treeInstance && !isEqual_default(treeInstance.getCheckedKeys(), toValidArray(props.modelValue))) {
  52024. treeInstance.setCheckedKeys(toValidArray(props.modelValue));
  52025. }
  52026. });
  52027. }
  52028. }, {
  52029. immediate: true,
  52030. deep: true
  52031. });
  52032. const propsMap = computed2(() => ({
  52033. value: key.value,
  52034. ...props.props
  52035. }));
  52036. const getNodeValByProp = (prop, data) => {
  52037. var _a2;
  52038. const propVal = propsMap.value[prop];
  52039. if (isFunction(propVal)) {
  52040. return propVal(data, (_a2 = tree.value) == null ? void 0 : _a2.getNode(getNodeValByProp("value", data)));
  52041. } else {
  52042. return data[propVal];
  52043. }
  52044. };
  52045. const defaultExpandedParentKeys = toValidArray(props.modelValue).map((value) => {
  52046. return treeFind(props.data || [], (data) => getNodeValByProp("value", data) === value, (data) => getNodeValByProp("children", data), (data, index, array4, parent2) => parent2 && getNodeValByProp("value", parent2));
  52047. }).filter((item) => isValidValue2(item));
  52048. const cacheOptions = computed2(() => {
  52049. if (!props.renderAfterExpand && !props.lazy)
  52050. return [];
  52051. const options = [];
  52052. treeEach(props.data.concat(props.cacheData), (node) => {
  52053. const value = getNodeValByProp("value", node);
  52054. options.push({
  52055. value,
  52056. currentLabel: getNodeValByProp("label", node),
  52057. isDisabled: getNodeValByProp("disabled", node)
  52058. });
  52059. }, (data) => getNodeValByProp("children", data));
  52060. return options;
  52061. });
  52062. return {
  52063. ...pick_default(toRefs(props), Object.keys(_Tree.props)),
  52064. ...attrs,
  52065. nodeKey: key,
  52066. expandOnClickNode: computed2(() => {
  52067. return !props.checkStrictly && props.expandOnClickNode;
  52068. }),
  52069. defaultExpandedKeys: computed2(() => {
  52070. return props.defaultExpandedKeys ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys;
  52071. }),
  52072. renderContent: (h3, { node, data, store }) => {
  52073. return h3(component, {
  52074. value: getNodeValByProp("value", data),
  52075. label: getNodeValByProp("label", data),
  52076. disabled: getNodeValByProp("disabled", data)
  52077. }, props.renderContent ? () => props.renderContent(h3, { node, data, store }) : slots.default ? () => slots.default({ node, data, store }) : void 0);
  52078. },
  52079. filterNodeMethod: (value, data, node) => {
  52080. var _a2;
  52081. if (props.filterNodeMethod)
  52082. return props.filterNodeMethod(value, data, node);
  52083. if (!value)
  52084. return true;
  52085. return (_a2 = getNodeValByProp("label", data)) == null ? void 0 : _a2.includes(value);
  52086. },
  52087. onNodeClick: (data, node, e) => {
  52088. var _a2, _b, _c;
  52089. (_a2 = attrs.onNodeClick) == null ? void 0 : _a2.call(attrs, data, node, e);
  52090. if (props.showCheckbox && props.checkOnClickNode)
  52091. return;
  52092. if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {
  52093. if (!getNodeValByProp("disabled", data)) {
  52094. const option = (_b = select.value) == null ? void 0 : _b.options.get(getNodeValByProp("value", data));
  52095. (_c = select.value) == null ? void 0 : _c.handleOptionSelect(option, true);
  52096. }
  52097. } else if (props.expandOnClickNode) {
  52098. e.proxy.handleExpandIconClick();
  52099. }
  52100. },
  52101. onCheck: (data, params) => {
  52102. var _a2;
  52103. (_a2 = attrs.onCheck) == null ? void 0 : _a2.call(attrs, data, params);
  52104. const dataValue = getNodeValByProp("value", data);
  52105. if (props.checkStrictly) {
  52106. emit(UPDATE_MODEL_EVENT, props.multiple ? params.checkedKeys : params.checkedKeys.includes(dataValue) ? dataValue : void 0);
  52107. } else {
  52108. if (props.multiple) {
  52109. emit(UPDATE_MODEL_EVENT, tree.value.getCheckedKeys(true));
  52110. } else {
  52111. const firstLeaf = treeFind([data], (data2) => !isValidArray(getNodeValByProp("children", data2)) && !getNodeValByProp("disabled", data2), (data2) => getNodeValByProp("children", data2));
  52112. const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0;
  52113. const hasCheckedChild = isValidValue2(props.modelValue) && !!treeFind([data], (data2) => getNodeValByProp("value", data2) === props.modelValue, (data2) => getNodeValByProp("children", data2));
  52114. emit(UPDATE_MODEL_EVENT, firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey);
  52115. }
  52116. }
  52117. },
  52118. cacheOptions
  52119. };
  52120. };
  52121. // node_modules/element-plus/es/components/tree-select/src/cache-options.mjs
  52122. var CacheOptions = defineComponent({
  52123. props: {
  52124. data: {
  52125. type: Array,
  52126. default: () => []
  52127. }
  52128. },
  52129. setup(props) {
  52130. const select = inject(selectKey);
  52131. watch(() => props.data, () => {
  52132. props.data.forEach((item) => {
  52133. if (!select.cachedOptions.has(item.value)) {
  52134. select.cachedOptions.set(item.value, item);
  52135. }
  52136. });
  52137. select.setSelected();
  52138. }, { immediate: true, deep: true });
  52139. return () => void 0;
  52140. }
  52141. });
  52142. // node_modules/element-plus/es/components/tree-select/src/tree-select.mjs
  52143. var _sfc_main137 = defineComponent({
  52144. name: "ElTreeSelect",
  52145. inheritAttrs: false,
  52146. props: {
  52147. ...ElSelect.props,
  52148. ..._Tree.props,
  52149. cacheData: {
  52150. type: Array,
  52151. default: () => []
  52152. }
  52153. },
  52154. setup(props, context) {
  52155. const { slots, expose } = context;
  52156. const select = ref();
  52157. const tree = ref();
  52158. const key = computed2(() => props.nodeKey || props.valueKey || "value");
  52159. const selectProps = useSelect3(props, context, { select, tree, key });
  52160. const { cacheOptions, ...treeProps2 } = useTree2(props, context, {
  52161. select,
  52162. tree,
  52163. key
  52164. });
  52165. const methods = reactive({});
  52166. expose(methods);
  52167. onMounted(() => {
  52168. Object.assign(methods, {
  52169. ...pick_default(tree.value, [
  52170. "filter",
  52171. "updateKeyChildren",
  52172. "getCheckedNodes",
  52173. "setCheckedNodes",
  52174. "getCheckedKeys",
  52175. "setCheckedKeys",
  52176. "setChecked",
  52177. "getHalfCheckedNodes",
  52178. "getHalfCheckedKeys",
  52179. "getCurrentKey",
  52180. "getCurrentNode",
  52181. "setCurrentKey",
  52182. "setCurrentNode",
  52183. "getNode",
  52184. "remove",
  52185. "append",
  52186. "insertBefore",
  52187. "insertAfter"
  52188. ]),
  52189. ...pick_default(select.value, ["focus", "blur"])
  52190. });
  52191. });
  52192. return () => h(ElSelect, reactive({
  52193. ...selectProps,
  52194. ref: (ref2) => select.value = ref2
  52195. }), {
  52196. ...slots,
  52197. default: () => [
  52198. h(CacheOptions, { data: cacheOptions.value }),
  52199. h(_Tree, reactive({
  52200. ...treeProps2,
  52201. ref: (ref2) => tree.value = ref2
  52202. }))
  52203. ]
  52204. });
  52205. }
  52206. });
  52207. var TreeSelect = _export_sfc(_sfc_main137, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]);
  52208. // node_modules/element-plus/es/components/tree-select/index.mjs
  52209. TreeSelect.install = (app) => {
  52210. app.component(TreeSelect.name, TreeSelect);
  52211. };
  52212. var _TreeSelect = TreeSelect;
  52213. var ElTreeSelect = _TreeSelect;
  52214. // node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs
  52215. var ROOT_TREE_INJECTION_KEY = Symbol();
  52216. var EMPTY_NODE = {
  52217. key: -1,
  52218. level: -1,
  52219. data: {}
  52220. };
  52221. var TreeOptionsEnum = ((TreeOptionsEnum2) => {
  52222. TreeOptionsEnum2["KEY"] = "id";
  52223. TreeOptionsEnum2["LABEL"] = "label";
  52224. TreeOptionsEnum2["CHILDREN"] = "children";
  52225. TreeOptionsEnum2["DISABLED"] = "disabled";
  52226. return TreeOptionsEnum2;
  52227. })(TreeOptionsEnum || {});
  52228. var SetOperationEnum = ((SetOperationEnum2) => {
  52229. SetOperationEnum2["ADD"] = "add";
  52230. SetOperationEnum2["DELETE"] = "delete";
  52231. return SetOperationEnum2;
  52232. })(SetOperationEnum || {});
  52233. var treeProps = buildProps({
  52234. data: {
  52235. type: definePropType(Array),
  52236. default: () => mutable([])
  52237. },
  52238. emptyText: {
  52239. type: String
  52240. },
  52241. height: {
  52242. type: Number,
  52243. default: 200
  52244. },
  52245. props: {
  52246. type: definePropType(Object),
  52247. default: () => mutable({
  52248. children: "children",
  52249. label: "label",
  52250. disabled: "disabled",
  52251. value: "id"
  52252. })
  52253. },
  52254. highlightCurrent: {
  52255. type: Boolean,
  52256. default: false
  52257. },
  52258. showCheckbox: {
  52259. type: Boolean,
  52260. default: false
  52261. },
  52262. defaultCheckedKeys: {
  52263. type: definePropType(Array),
  52264. default: () => mutable([])
  52265. },
  52266. checkStrictly: {
  52267. type: Boolean,
  52268. default: false
  52269. },
  52270. defaultExpandedKeys: {
  52271. type: definePropType(Array),
  52272. default: () => mutable([])
  52273. },
  52274. indent: {
  52275. type: Number,
  52276. default: 16
  52277. },
  52278. icon: {
  52279. type: iconPropType
  52280. },
  52281. expandOnClickNode: {
  52282. type: Boolean,
  52283. default: true
  52284. },
  52285. checkOnClickNode: {
  52286. type: Boolean,
  52287. default: false
  52288. },
  52289. currentNodeKey: {
  52290. type: definePropType([String, Number])
  52291. },
  52292. accordion: {
  52293. type: Boolean,
  52294. default: false
  52295. },
  52296. filterMethod: {
  52297. type: definePropType(Function)
  52298. },
  52299. perfMode: {
  52300. type: Boolean,
  52301. default: true
  52302. }
  52303. });
  52304. var treeNodeProps = buildProps({
  52305. node: {
  52306. type: definePropType(Object),
  52307. default: () => mutable(EMPTY_NODE)
  52308. },
  52309. expanded: {
  52310. type: Boolean,
  52311. default: false
  52312. },
  52313. checked: {
  52314. type: Boolean,
  52315. default: false
  52316. },
  52317. indeterminate: {
  52318. type: Boolean,
  52319. default: false
  52320. },
  52321. showCheckbox: {
  52322. type: Boolean,
  52323. default: false
  52324. },
  52325. disabled: {
  52326. type: Boolean,
  52327. default: false
  52328. },
  52329. current: {
  52330. type: Boolean,
  52331. default: false
  52332. },
  52333. hiddenExpandIcon: {
  52334. type: Boolean,
  52335. default: false
  52336. }
  52337. });
  52338. var treeNodeContentProps = buildProps({
  52339. node: {
  52340. type: definePropType(Object),
  52341. required: true
  52342. }
  52343. });
  52344. var NODE_CLICK = "node-click";
  52345. var NODE_EXPAND = "node-expand";
  52346. var NODE_COLLAPSE = "node-collapse";
  52347. var CURRENT_CHANGE = "current-change";
  52348. var NODE_CHECK = "check";
  52349. var NODE_CHECK_CHANGE = "check-change";
  52350. var NODE_CONTEXTMENU = "node-contextmenu";
  52351. var treeEmits = {
  52352. [NODE_CLICK]: (data, node, e) => data && node && e,
  52353. [NODE_EXPAND]: (data, node) => data && node,
  52354. [NODE_COLLAPSE]: (data, node) => data && node,
  52355. [CURRENT_CHANGE]: (data, node) => data && node,
  52356. [NODE_CHECK]: (data, checkedInfo) => data && checkedInfo,
  52357. [NODE_CHECK_CHANGE]: (data, checked) => data && typeof checked === "boolean",
  52358. [NODE_CONTEXTMENU]: (event, data, node) => event && data && node
  52359. };
  52360. var treeNodeEmits = {
  52361. click: (node, e) => !!(node && e),
  52362. toggle: (node) => !!node,
  52363. check: (node, checked) => node && typeof checked === "boolean"
  52364. };
  52365. // node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs
  52366. function useCheck2(props, tree) {
  52367. const checkedKeys = ref(/* @__PURE__ */ new Set());
  52368. const indeterminateKeys = ref(/* @__PURE__ */ new Set());
  52369. const { emit } = getCurrentInstance();
  52370. watch([() => tree.value, () => props.defaultCheckedKeys], () => {
  52371. return nextTick(() => {
  52372. _setCheckedKeys(props.defaultCheckedKeys);
  52373. });
  52374. }, {
  52375. immediate: true
  52376. });
  52377. const updateCheckedKeys = () => {
  52378. if (!tree.value || !props.showCheckbox || props.checkStrictly) {
  52379. return;
  52380. }
  52381. const { levelTreeNodeMap, maxLevel } = tree.value;
  52382. const checkedKeySet = checkedKeys.value;
  52383. const indeterminateKeySet = /* @__PURE__ */ new Set();
  52384. for (let level = maxLevel - 1; level >= 1; --level) {
  52385. const nodes = levelTreeNodeMap.get(level);
  52386. if (!nodes)
  52387. continue;
  52388. nodes.forEach((node) => {
  52389. const children = node.children;
  52390. if (children) {
  52391. let allChecked = true;
  52392. let hasChecked = false;
  52393. for (const childNode of children) {
  52394. const key = childNode.key;
  52395. if (checkedKeySet.has(key)) {
  52396. hasChecked = true;
  52397. } else if (indeterminateKeySet.has(key)) {
  52398. allChecked = false;
  52399. hasChecked = true;
  52400. break;
  52401. } else {
  52402. allChecked = false;
  52403. }
  52404. }
  52405. if (allChecked) {
  52406. checkedKeySet.add(node.key);
  52407. } else if (hasChecked) {
  52408. indeterminateKeySet.add(node.key);
  52409. checkedKeySet.delete(node.key);
  52410. } else {
  52411. checkedKeySet.delete(node.key);
  52412. indeterminateKeySet.delete(node.key);
  52413. }
  52414. }
  52415. });
  52416. }
  52417. indeterminateKeys.value = indeterminateKeySet;
  52418. };
  52419. const isChecked = (node) => checkedKeys.value.has(node.key);
  52420. const isIndeterminate = (node) => indeterminateKeys.value.has(node.key);
  52421. const toggleCheckbox = (node, isChecked2, nodeClick = true) => {
  52422. const checkedKeySet = checkedKeys.value;
  52423. const toggle = (node2, checked) => {
  52424. checkedKeySet[checked ? SetOperationEnum.ADD : SetOperationEnum.DELETE](node2.key);
  52425. const children = node2.children;
  52426. if (!props.checkStrictly && children) {
  52427. children.forEach((childNode) => {
  52428. if (!childNode.disabled) {
  52429. toggle(childNode, checked);
  52430. }
  52431. });
  52432. }
  52433. };
  52434. toggle(node, isChecked2);
  52435. updateCheckedKeys();
  52436. if (nodeClick) {
  52437. afterNodeCheck(node, isChecked2);
  52438. }
  52439. };
  52440. const afterNodeCheck = (node, checked) => {
  52441. const { checkedNodes, checkedKeys: checkedKeys2 } = getChecked();
  52442. const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked();
  52443. emit(NODE_CHECK, node.data, {
  52444. checkedKeys: checkedKeys2,
  52445. checkedNodes,
  52446. halfCheckedKeys,
  52447. halfCheckedNodes
  52448. });
  52449. emit(NODE_CHECK_CHANGE, node.data, checked);
  52450. };
  52451. function getCheckedKeys(leafOnly = false) {
  52452. return getChecked(leafOnly).checkedKeys;
  52453. }
  52454. function getCheckedNodes(leafOnly = false) {
  52455. return getChecked(leafOnly).checkedNodes;
  52456. }
  52457. function getHalfCheckedKeys() {
  52458. return getHalfChecked().halfCheckedKeys;
  52459. }
  52460. function getHalfCheckedNodes() {
  52461. return getHalfChecked().halfCheckedNodes;
  52462. }
  52463. function getChecked(leafOnly = false) {
  52464. const checkedNodes = [];
  52465. const keys3 = [];
  52466. if ((tree == null ? void 0 : tree.value) && props.showCheckbox) {
  52467. const { treeNodeMap } = tree.value;
  52468. checkedKeys.value.forEach((key) => {
  52469. const node = treeNodeMap.get(key);
  52470. if (node && (!leafOnly || leafOnly && node.isLeaf)) {
  52471. keys3.push(key);
  52472. checkedNodes.push(node.data);
  52473. }
  52474. });
  52475. }
  52476. return {
  52477. checkedKeys: keys3,
  52478. checkedNodes
  52479. };
  52480. }
  52481. function getHalfChecked() {
  52482. const halfCheckedNodes = [];
  52483. const halfCheckedKeys = [];
  52484. if ((tree == null ? void 0 : tree.value) && props.showCheckbox) {
  52485. const { treeNodeMap } = tree.value;
  52486. indeterminateKeys.value.forEach((key) => {
  52487. const node = treeNodeMap.get(key);
  52488. if (node) {
  52489. halfCheckedKeys.push(key);
  52490. halfCheckedNodes.push(node.data);
  52491. }
  52492. });
  52493. }
  52494. return {
  52495. halfCheckedNodes,
  52496. halfCheckedKeys
  52497. };
  52498. }
  52499. function setCheckedKeys(keys3) {
  52500. checkedKeys.value.clear();
  52501. indeterminateKeys.value.clear();
  52502. _setCheckedKeys(keys3);
  52503. }
  52504. function setChecked(key, isChecked2) {
  52505. if ((tree == null ? void 0 : tree.value) && props.showCheckbox) {
  52506. const node = tree.value.treeNodeMap.get(key);
  52507. if (node) {
  52508. toggleCheckbox(node, isChecked2, false);
  52509. }
  52510. }
  52511. }
  52512. function _setCheckedKeys(keys3) {
  52513. if (tree == null ? void 0 : tree.value) {
  52514. const { treeNodeMap } = tree.value;
  52515. if (props.showCheckbox && treeNodeMap && keys3) {
  52516. for (const key of keys3) {
  52517. const node = treeNodeMap.get(key);
  52518. if (node && !isChecked(node)) {
  52519. toggleCheckbox(node, true, false);
  52520. }
  52521. }
  52522. }
  52523. }
  52524. }
  52525. return {
  52526. updateCheckedKeys,
  52527. toggleCheckbox,
  52528. isChecked,
  52529. isIndeterminate,
  52530. getCheckedKeys,
  52531. getCheckedNodes,
  52532. getHalfCheckedKeys,
  52533. getHalfCheckedNodes,
  52534. setChecked,
  52535. setCheckedKeys
  52536. };
  52537. }
  52538. // node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs
  52539. function useFilter(props, tree) {
  52540. const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([]));
  52541. const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([]));
  52542. const filterable = computed2(() => {
  52543. return isFunction(props.filterMethod);
  52544. });
  52545. function doFilter(query) {
  52546. var _a2;
  52547. if (!filterable.value) {
  52548. return;
  52549. }
  52550. const expandKeySet = /* @__PURE__ */ new Set();
  52551. const hiddenExpandIconKeys = hiddenExpandIconKeySet.value;
  52552. const hiddenKeys = hiddenNodeKeySet.value;
  52553. const family = [];
  52554. const nodes = ((_a2 = tree.value) == null ? void 0 : _a2.treeNodes) || [];
  52555. const filter2 = props.filterMethod;
  52556. hiddenKeys.clear();
  52557. function traverse(nodes2) {
  52558. nodes2.forEach((node) => {
  52559. family.push(node);
  52560. if (filter2 == null ? void 0 : filter2(query, node.data)) {
  52561. family.forEach((member) => {
  52562. expandKeySet.add(member.key);
  52563. });
  52564. } else if (node.isLeaf) {
  52565. hiddenKeys.add(node.key);
  52566. }
  52567. const children = node.children;
  52568. if (children) {
  52569. traverse(children);
  52570. }
  52571. if (!node.isLeaf) {
  52572. if (!expandKeySet.has(node.key)) {
  52573. hiddenKeys.add(node.key);
  52574. } else if (children) {
  52575. let allHidden = true;
  52576. for (const childNode of children) {
  52577. if (!hiddenKeys.has(childNode.key)) {
  52578. allHidden = false;
  52579. break;
  52580. }
  52581. }
  52582. if (allHidden) {
  52583. hiddenExpandIconKeys.add(node.key);
  52584. } else {
  52585. hiddenExpandIconKeys.delete(node.key);
  52586. }
  52587. }
  52588. }
  52589. family.pop();
  52590. });
  52591. }
  52592. traverse(nodes);
  52593. return expandKeySet;
  52594. }
  52595. function isForceHiddenExpandIcon(node) {
  52596. return hiddenExpandIconKeySet.value.has(node.key);
  52597. }
  52598. return {
  52599. hiddenExpandIconKeySet,
  52600. hiddenNodeKeySet,
  52601. doFilter,
  52602. isForceHiddenExpandIcon
  52603. };
  52604. }
  52605. // node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs
  52606. function useTree3(props, emit) {
  52607. const expandedKeySet = ref(new Set(props.defaultExpandedKeys));
  52608. const currentKey = ref();
  52609. const tree = shallowRef();
  52610. watch(() => props.currentNodeKey, (key) => {
  52611. currentKey.value = key;
  52612. }, {
  52613. immediate: true
  52614. });
  52615. watch(() => props.data, (data) => {
  52616. setData2(data);
  52617. }, {
  52618. immediate: true
  52619. });
  52620. const {
  52621. isIndeterminate,
  52622. isChecked,
  52623. toggleCheckbox,
  52624. getCheckedKeys,
  52625. getCheckedNodes,
  52626. getHalfCheckedKeys,
  52627. getHalfCheckedNodes,
  52628. setChecked,
  52629. setCheckedKeys
  52630. } = useCheck2(props, tree);
  52631. const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree);
  52632. const valueKey = computed2(() => {
  52633. var _a2;
  52634. return ((_a2 = props.props) == null ? void 0 : _a2.value) || TreeOptionsEnum.KEY;
  52635. });
  52636. const childrenKey = computed2(() => {
  52637. var _a2;
  52638. return ((_a2 = props.props) == null ? void 0 : _a2.children) || TreeOptionsEnum.CHILDREN;
  52639. });
  52640. const disabledKey = computed2(() => {
  52641. var _a2;
  52642. return ((_a2 = props.props) == null ? void 0 : _a2.disabled) || TreeOptionsEnum.DISABLED;
  52643. });
  52644. const labelKey = computed2(() => {
  52645. var _a2;
  52646. return ((_a2 = props.props) == null ? void 0 : _a2.label) || TreeOptionsEnum.LABEL;
  52647. });
  52648. const flattenTree = computed2(() => {
  52649. const expandedKeys = expandedKeySet.value;
  52650. const hiddenKeys = hiddenNodeKeySet.value;
  52651. const flattenNodes = [];
  52652. const nodes = tree.value && tree.value.treeNodes || [];
  52653. function traverse() {
  52654. const stack = [];
  52655. for (let i = nodes.length - 1; i >= 0; --i) {
  52656. stack.push(nodes[i]);
  52657. }
  52658. while (stack.length) {
  52659. const node = stack.pop();
  52660. if (!node)
  52661. continue;
  52662. if (!hiddenKeys.has(node.key)) {
  52663. flattenNodes.push(node);
  52664. }
  52665. if (expandedKeys.has(node.key)) {
  52666. const children = node.children;
  52667. if (children) {
  52668. const length = children.length;
  52669. for (let i = length - 1; i >= 0; --i) {
  52670. stack.push(children[i]);
  52671. }
  52672. }
  52673. }
  52674. }
  52675. }
  52676. traverse();
  52677. return flattenNodes;
  52678. });
  52679. const isNotEmpty = computed2(() => {
  52680. return flattenTree.value.length > 0;
  52681. });
  52682. function createTree(data) {
  52683. const treeNodeMap = /* @__PURE__ */ new Map();
  52684. const levelTreeNodeMap = /* @__PURE__ */ new Map();
  52685. let maxLevel = 1;
  52686. function traverse(nodes, level = 1, parent2 = void 0) {
  52687. var _a2;
  52688. const siblings = [];
  52689. for (const rawNode of nodes) {
  52690. const value = getKey(rawNode);
  52691. const node = {
  52692. level,
  52693. key: value,
  52694. data: rawNode
  52695. };
  52696. node.label = getLabel(rawNode);
  52697. node.parent = parent2;
  52698. const children = getChildren(rawNode);
  52699. node.disabled = getDisabled(rawNode);
  52700. node.isLeaf = !children || children.length === 0;
  52701. if (children && children.length) {
  52702. node.children = traverse(children, level + 1, node);
  52703. }
  52704. siblings.push(node);
  52705. treeNodeMap.set(value, node);
  52706. if (!levelTreeNodeMap.has(level)) {
  52707. levelTreeNodeMap.set(level, []);
  52708. }
  52709. (_a2 = levelTreeNodeMap.get(level)) == null ? void 0 : _a2.push(node);
  52710. }
  52711. if (level > maxLevel) {
  52712. maxLevel = level;
  52713. }
  52714. return siblings;
  52715. }
  52716. const treeNodes = traverse(data);
  52717. return {
  52718. treeNodeMap,
  52719. levelTreeNodeMap,
  52720. maxLevel,
  52721. treeNodes
  52722. };
  52723. }
  52724. function filter2(query) {
  52725. const keys3 = doFilter(query);
  52726. if (keys3) {
  52727. expandedKeySet.value = keys3;
  52728. }
  52729. }
  52730. function getChildren(node) {
  52731. return node[childrenKey.value];
  52732. }
  52733. function getKey(node) {
  52734. if (!node) {
  52735. return "";
  52736. }
  52737. return node[valueKey.value];
  52738. }
  52739. function getDisabled(node) {
  52740. return node[disabledKey.value];
  52741. }
  52742. function getLabel(node) {
  52743. return node[labelKey.value];
  52744. }
  52745. function toggleExpand(node) {
  52746. const expandedKeys = expandedKeySet.value;
  52747. if (expandedKeys.has(node.key)) {
  52748. collapseNode(node);
  52749. } else {
  52750. expandNode(node);
  52751. }
  52752. }
  52753. function setExpandedKeys(keys3) {
  52754. expandedKeySet.value = new Set(keys3);
  52755. }
  52756. function handleNodeClick(node, e) {
  52757. emit(NODE_CLICK, node.data, node, e);
  52758. handleCurrentChange2(node);
  52759. if (props.expandOnClickNode) {
  52760. toggleExpand(node);
  52761. }
  52762. if (props.showCheckbox && props.checkOnClickNode && !node.disabled) {
  52763. toggleCheckbox(node, !isChecked(node), true);
  52764. }
  52765. }
  52766. function handleCurrentChange2(node) {
  52767. if (!isCurrent(node)) {
  52768. currentKey.value = node.key;
  52769. emit(CURRENT_CHANGE, node.data, node);
  52770. }
  52771. }
  52772. function handleNodeCheck(node, checked) {
  52773. toggleCheckbox(node, checked);
  52774. }
  52775. function expandNode(node) {
  52776. const keySet = expandedKeySet.value;
  52777. if (tree.value && props.accordion) {
  52778. const { treeNodeMap } = tree.value;
  52779. keySet.forEach((key) => {
  52780. const treeNode = treeNodeMap.get(key);
  52781. if (node && node.level === (treeNode == null ? void 0 : treeNode.level)) {
  52782. keySet.delete(key);
  52783. }
  52784. });
  52785. }
  52786. keySet.add(node.key);
  52787. emit(NODE_EXPAND, node.data, node);
  52788. }
  52789. function collapseNode(node) {
  52790. expandedKeySet.value.delete(node.key);
  52791. emit(NODE_COLLAPSE, node.data, node);
  52792. }
  52793. function isExpanded(node) {
  52794. return expandedKeySet.value.has(node.key);
  52795. }
  52796. function isDisabled(node) {
  52797. return !!node.disabled;
  52798. }
  52799. function isCurrent(node) {
  52800. const current = currentKey.value;
  52801. return !!current && current === node.key;
  52802. }
  52803. function getCurrentNode() {
  52804. var _a2, _b;
  52805. if (!currentKey.value)
  52806. return void 0;
  52807. return (_b = (_a2 = tree.value) == null ? void 0 : _a2.treeNodeMap.get(currentKey.value)) == null ? void 0 : _b.data;
  52808. }
  52809. function getCurrentKey() {
  52810. return currentKey.value;
  52811. }
  52812. function setCurrentKey(key) {
  52813. currentKey.value = key;
  52814. }
  52815. function setData2(data) {
  52816. nextTick(() => tree.value = createTree(data));
  52817. }
  52818. function getNode(data) {
  52819. var _a2;
  52820. const key = isObject(data) ? getKey(data) : data;
  52821. return (_a2 = tree.value) == null ? void 0 : _a2.treeNodeMap.get(key);
  52822. }
  52823. return {
  52824. tree,
  52825. flattenTree,
  52826. isNotEmpty,
  52827. getKey,
  52828. getChildren,
  52829. toggleExpand,
  52830. toggleCheckbox,
  52831. isExpanded,
  52832. isChecked,
  52833. isIndeterminate,
  52834. isDisabled,
  52835. isCurrent,
  52836. isForceHiddenExpandIcon,
  52837. handleNodeClick,
  52838. handleNodeCheck,
  52839. getCurrentNode,
  52840. getCurrentKey,
  52841. setCurrentKey,
  52842. getCheckedKeys,
  52843. getCheckedNodes,
  52844. getHalfCheckedKeys,
  52845. getHalfCheckedNodes,
  52846. setChecked,
  52847. setCheckedKeys,
  52848. filter: filter2,
  52849. setData: setData2,
  52850. getNode,
  52851. expandNode,
  52852. collapseNode,
  52853. setExpandedKeys
  52854. };
  52855. }
  52856. // node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs
  52857. var ElNodeContent = defineComponent({
  52858. name: "ElTreeNodeContent",
  52859. props: treeNodeContentProps,
  52860. setup(props) {
  52861. const tree = inject(ROOT_TREE_INJECTION_KEY);
  52862. const ns2 = useNamespace("tree");
  52863. return () => {
  52864. const node = props.node;
  52865. const { data } = node;
  52866. return (tree == null ? void 0 : tree.ctx.slots.default) ? tree.ctx.slots.default({ node, data }) : h("span", { class: ns2.be("node", "label") }, [node == null ? void 0 : node.label]);
  52867. };
  52868. }
  52869. });
  52870. // node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs
  52871. var _hoisted_166 = ["aria-expanded", "aria-disabled", "aria-checked", "data-key", "onClick"];
  52872. var __default__92 = defineComponent({
  52873. name: "ElTreeNode"
  52874. });
  52875. var _sfc_main138 = defineComponent({
  52876. ...__default__92,
  52877. props: treeNodeProps,
  52878. emits: treeNodeEmits,
  52879. setup(__props, { emit }) {
  52880. const props = __props;
  52881. const tree = inject(ROOT_TREE_INJECTION_KEY);
  52882. const ns2 = useNamespace("tree");
  52883. const indent = computed2(() => {
  52884. var _a2;
  52885. return (_a2 = tree == null ? void 0 : tree.props.indent) != null ? _a2 : 16;
  52886. });
  52887. const icon = computed2(() => {
  52888. var _a2;
  52889. return (_a2 = tree == null ? void 0 : tree.props.icon) != null ? _a2 : caret_right_default;
  52890. });
  52891. const handleClick = (e) => {
  52892. emit("click", props.node, e);
  52893. };
  52894. const handleExpandIconClick = () => {
  52895. emit("toggle", props.node);
  52896. };
  52897. const handleCheckChange = (value) => {
  52898. emit("check", props.node, value);
  52899. };
  52900. const handleContextMenu = (event) => {
  52901. var _a2, _b, _c, _d;
  52902. if ((_c = (_b = (_a2 = tree == null ? void 0 : tree.instance) == null ? void 0 : _a2.vnode) == null ? void 0 : _b.props) == null ? void 0 : _c["onNodeContextmenu"]) {
  52903. event.stopPropagation();
  52904. event.preventDefault();
  52905. }
  52906. tree == null ? void 0 : tree.ctx.emit(NODE_CONTEXTMENU, event, (_d = props.node) == null ? void 0 : _d.data, props.node);
  52907. };
  52908. return (_ctx, _cache) => {
  52909. var _a2, _b, _c;
  52910. return openBlock(), createElementBlock("div", {
  52911. ref: "node$",
  52912. class: normalizeClass([
  52913. unref(ns2).b("node"),
  52914. unref(ns2).is("expanded", _ctx.expanded),
  52915. unref(ns2).is("current", _ctx.current),
  52916. unref(ns2).is("focusable", !_ctx.disabled),
  52917. unref(ns2).is("checked", !_ctx.disabled && _ctx.checked)
  52918. ]),
  52919. role: "treeitem",
  52920. tabindex: "-1",
  52921. "aria-expanded": _ctx.expanded,
  52922. "aria-disabled": _ctx.disabled,
  52923. "aria-checked": _ctx.checked,
  52924. "data-key": (_a2 = _ctx.node) == null ? void 0 : _a2.key,
  52925. onClick: withModifiers(handleClick, ["stop"]),
  52926. onContextmenu: handleContextMenu
  52927. }, [
  52928. createBaseVNode("div", {
  52929. class: normalizeClass(unref(ns2).be("node", "content")),
  52930. style: normalizeStyle({ paddingLeft: `${(_ctx.node.level - 1) * unref(indent)}px` })
  52931. }, [
  52932. unref(icon) ? (openBlock(), createBlock(unref(ElIcon), {
  52933. key: 0,
  52934. class: normalizeClass([
  52935. unref(ns2).is("leaf", !!((_b = _ctx.node) == null ? void 0 : _b.isLeaf)),
  52936. unref(ns2).is("hidden", _ctx.hiddenExpandIcon),
  52937. {
  52938. expanded: !((_c = _ctx.node) == null ? void 0 : _c.isLeaf) && _ctx.expanded
  52939. },
  52940. unref(ns2).be("node", "expand-icon")
  52941. ]),
  52942. onClick: withModifiers(handleExpandIconClick, ["stop"])
  52943. }, {
  52944. default: withCtx(() => [
  52945. (openBlock(), createBlock(resolveDynamicComponent(unref(icon))))
  52946. ]),
  52947. _: 1
  52948. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
  52949. _ctx.showCheckbox ? (openBlock(), createBlock(unref(ElCheckbox), {
  52950. key: 1,
  52951. "model-value": _ctx.checked,
  52952. indeterminate: _ctx.indeterminate,
  52953. disabled: _ctx.disabled,
  52954. onChange: handleCheckChange,
  52955. onClick: _cache[0] || (_cache[0] = withModifiers(() => {
  52956. }, ["stop"]))
  52957. }, null, 8, ["model-value", "indeterminate", "disabled"])) : createCommentVNode("v-if", true),
  52958. createVNode(unref(ElNodeContent), { node: _ctx.node }, null, 8, ["node"])
  52959. ], 6)
  52960. ], 42, _hoisted_166);
  52961. };
  52962. }
  52963. });
  52964. var ElTreeNode2 = _export_sfc(_sfc_main138, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]);
  52965. // node_modules/element-plus/es/components/tree-v2/src/tree.mjs
  52966. var itemSize2 = 26;
  52967. var __default__93 = defineComponent({
  52968. name: "ElTreeV2"
  52969. });
  52970. var _sfc_main139 = defineComponent({
  52971. ...__default__93,
  52972. props: treeProps,
  52973. emits: treeEmits,
  52974. setup(__props, { expose, emit }) {
  52975. const props = __props;
  52976. const slots = useSlots();
  52977. provide(ROOT_TREE_INJECTION_KEY, {
  52978. ctx: {
  52979. emit,
  52980. slots
  52981. },
  52982. props,
  52983. instance: getCurrentInstance()
  52984. });
  52985. provide(formItemContextKey, void 0);
  52986. const { t } = useLocale();
  52987. const ns2 = useNamespace("tree");
  52988. const {
  52989. flattenTree,
  52990. isNotEmpty,
  52991. toggleExpand,
  52992. isExpanded,
  52993. isIndeterminate,
  52994. isChecked,
  52995. isDisabled,
  52996. isCurrent,
  52997. isForceHiddenExpandIcon,
  52998. handleNodeClick,
  52999. handleNodeCheck,
  53000. toggleCheckbox,
  53001. getCurrentNode,
  53002. getCurrentKey,
  53003. setCurrentKey,
  53004. getCheckedKeys,
  53005. getCheckedNodes,
  53006. getHalfCheckedKeys,
  53007. getHalfCheckedNodes,
  53008. setChecked,
  53009. setCheckedKeys,
  53010. filter: filter2,
  53011. setData: setData2,
  53012. getNode,
  53013. expandNode,
  53014. collapseNode,
  53015. setExpandedKeys
  53016. } = useTree3(props, emit);
  53017. expose({
  53018. toggleCheckbox,
  53019. getCurrentNode,
  53020. getCurrentKey,
  53021. setCurrentKey,
  53022. getCheckedKeys,
  53023. getCheckedNodes,
  53024. getHalfCheckedKeys,
  53025. getHalfCheckedNodes,
  53026. setChecked,
  53027. setCheckedKeys,
  53028. filter: filter2,
  53029. setData: setData2,
  53030. getNode,
  53031. expandNode,
  53032. collapseNode,
  53033. setExpandedKeys
  53034. });
  53035. return (_ctx, _cache) => {
  53036. var _a2;
  53037. return openBlock(), createElementBlock("div", {
  53038. class: normalizeClass([unref(ns2).b(), { [unref(ns2).m("highlight-current")]: _ctx.highlightCurrent }]),
  53039. role: "tree"
  53040. }, [
  53041. unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), {
  53042. key: 0,
  53043. "class-name": unref(ns2).b("virtual-list"),
  53044. data: unref(flattenTree),
  53045. total: unref(flattenTree).length,
  53046. height: _ctx.height,
  53047. "item-size": itemSize2,
  53048. "perf-mode": _ctx.perfMode
  53049. }, {
  53050. default: withCtx(({ data, index, style }) => [
  53051. (openBlock(), createBlock(ElTreeNode2, {
  53052. key: data[index].key,
  53053. style: normalizeStyle(style),
  53054. node: data[index],
  53055. expanded: unref(isExpanded)(data[index]),
  53056. "show-checkbox": _ctx.showCheckbox,
  53057. checked: unref(isChecked)(data[index]),
  53058. indeterminate: unref(isIndeterminate)(data[index]),
  53059. disabled: unref(isDisabled)(data[index]),
  53060. current: unref(isCurrent)(data[index]),
  53061. "hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]),
  53062. onClick: unref(handleNodeClick),
  53063. onToggle: unref(toggleExpand),
  53064. onCheck: unref(handleNodeCheck)
  53065. }, null, 8, ["style", "node", "expanded", "show-checkbox", "checked", "indeterminate", "disabled", "current", "hidden-expand-icon", "onClick", "onToggle", "onCheck"]))
  53066. ]),
  53067. _: 1
  53068. }, 8, ["class-name", "data", "total", "height", "perf-mode"])) : (openBlock(), createElementBlock("div", {
  53069. key: 1,
  53070. class: normalizeClass(unref(ns2).e("empty-block"))
  53071. }, [
  53072. createBaseVNode("span", {
  53073. class: normalizeClass(unref(ns2).e("empty-text"))
  53074. }, toDisplayString((_a2 = _ctx.emptyText) != null ? _a2 : unref(t)("el.tree.emptyText")), 3)
  53075. ], 2))
  53076. ], 2);
  53077. };
  53078. }
  53079. });
  53080. var TreeV2 = _export_sfc(_sfc_main139, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]);
  53081. // node_modules/element-plus/es/components/tree-v2/index.mjs
  53082. var ElTreeV2 = withInstall(TreeV2);
  53083. // node_modules/element-plus/es/components/upload/src/ajax.mjs
  53084. var SCOPE7 = "ElUpload";
  53085. var UploadAjaxError = class extends Error {
  53086. constructor(message2, status, method5, url2) {
  53087. super(message2);
  53088. this.name = "UploadAjaxError";
  53089. this.status = status;
  53090. this.method = method5;
  53091. this.url = url2;
  53092. }
  53093. };
  53094. function getError(action, option, xhr) {
  53095. let msg;
  53096. if (xhr.response) {
  53097. msg = `${xhr.response.error || xhr.response}`;
  53098. } else if (xhr.responseText) {
  53099. msg = `${xhr.responseText}`;
  53100. } else {
  53101. msg = `fail to ${option.method} ${action} ${xhr.status}`;
  53102. }
  53103. return new UploadAjaxError(msg, xhr.status, option.method, action);
  53104. }
  53105. function getBody(xhr) {
  53106. const text = xhr.responseText || xhr.response;
  53107. if (!text) {
  53108. return text;
  53109. }
  53110. try {
  53111. return JSON.parse(text);
  53112. } catch (e) {
  53113. return text;
  53114. }
  53115. }
  53116. var ajaxUpload = (option) => {
  53117. if (typeof XMLHttpRequest === "undefined")
  53118. throwError(SCOPE7, "XMLHttpRequest is undefined");
  53119. const xhr = new XMLHttpRequest();
  53120. const action = option.action;
  53121. if (xhr.upload) {
  53122. xhr.upload.addEventListener("progress", (evt) => {
  53123. const progressEvt = evt;
  53124. progressEvt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0;
  53125. option.onProgress(progressEvt);
  53126. });
  53127. }
  53128. const formData = new FormData();
  53129. if (option.data) {
  53130. for (const [key, value] of Object.entries(option.data)) {
  53131. if (Array.isArray(value))
  53132. formData.append(key, ...value);
  53133. else
  53134. formData.append(key, value);
  53135. }
  53136. }
  53137. formData.append(option.filename, option.file, option.file.name);
  53138. xhr.addEventListener("error", () => {
  53139. option.onError(getError(action, option, xhr));
  53140. });
  53141. xhr.addEventListener("load", () => {
  53142. if (xhr.status < 200 || xhr.status >= 300) {
  53143. return option.onError(getError(action, option, xhr));
  53144. }
  53145. option.onSuccess(getBody(xhr));
  53146. });
  53147. xhr.open(option.method, action, true);
  53148. if (option.withCredentials && "withCredentials" in xhr) {
  53149. xhr.withCredentials = true;
  53150. }
  53151. const headers = option.headers || {};
  53152. if (headers instanceof Headers) {
  53153. headers.forEach((value, key) => xhr.setRequestHeader(key, value));
  53154. } else {
  53155. for (const [key, value] of Object.entries(headers)) {
  53156. if (isNil_default(value))
  53157. continue;
  53158. xhr.setRequestHeader(key, String(value));
  53159. }
  53160. }
  53161. xhr.send(formData);
  53162. return xhr;
  53163. };
  53164. // node_modules/element-plus/es/components/upload/src/upload.mjs
  53165. var uploadListTypes = ["text", "picture", "picture-card"];
  53166. var fileId = 1;
  53167. var genFileId = () => Date.now() + fileId++;
  53168. var uploadBaseProps = buildProps({
  53169. action: {
  53170. type: String,
  53171. default: "#"
  53172. },
  53173. headers: {
  53174. type: definePropType(Object)
  53175. },
  53176. method: {
  53177. type: String,
  53178. default: "post"
  53179. },
  53180. data: {
  53181. type: Object,
  53182. default: () => mutable({})
  53183. },
  53184. multiple: {
  53185. type: Boolean,
  53186. default: false
  53187. },
  53188. name: {
  53189. type: String,
  53190. default: "file"
  53191. },
  53192. drag: {
  53193. type: Boolean,
  53194. default: false
  53195. },
  53196. withCredentials: Boolean,
  53197. showFileList: {
  53198. type: Boolean,
  53199. default: true
  53200. },
  53201. accept: {
  53202. type: String,
  53203. default: ""
  53204. },
  53205. type: {
  53206. type: String,
  53207. default: "select"
  53208. },
  53209. fileList: {
  53210. type: definePropType(Array),
  53211. default: () => mutable([])
  53212. },
  53213. autoUpload: {
  53214. type: Boolean,
  53215. default: true
  53216. },
  53217. listType: {
  53218. type: String,
  53219. values: uploadListTypes,
  53220. default: "text"
  53221. },
  53222. httpRequest: {
  53223. type: definePropType(Function),
  53224. default: ajaxUpload
  53225. },
  53226. disabled: Boolean,
  53227. limit: Number
  53228. });
  53229. var uploadProps = buildProps({
  53230. ...uploadBaseProps,
  53231. beforeUpload: {
  53232. type: definePropType(Function),
  53233. default: NOOP
  53234. },
  53235. beforeRemove: {
  53236. type: definePropType(Function)
  53237. },
  53238. onRemove: {
  53239. type: definePropType(Function),
  53240. default: NOOP
  53241. },
  53242. onChange: {
  53243. type: definePropType(Function),
  53244. default: NOOP
  53245. },
  53246. onPreview: {
  53247. type: definePropType(Function),
  53248. default: NOOP
  53249. },
  53250. onSuccess: {
  53251. type: definePropType(Function),
  53252. default: NOOP
  53253. },
  53254. onProgress: {
  53255. type: definePropType(Function),
  53256. default: NOOP
  53257. },
  53258. onError: {
  53259. type: definePropType(Function),
  53260. default: NOOP
  53261. },
  53262. onExceed: {
  53263. type: definePropType(Function),
  53264. default: NOOP
  53265. }
  53266. });
  53267. // node_modules/element-plus/es/components/upload/src/upload-list.mjs
  53268. var uploadListProps = buildProps({
  53269. files: {
  53270. type: definePropType(Array),
  53271. default: () => mutable([])
  53272. },
  53273. disabled: {
  53274. type: Boolean,
  53275. default: false
  53276. },
  53277. handlePreview: {
  53278. type: definePropType(Function),
  53279. default: NOOP
  53280. },
  53281. listType: {
  53282. type: String,
  53283. values: uploadListTypes,
  53284. default: "text"
  53285. }
  53286. });
  53287. var uploadListEmits = {
  53288. remove: (file) => !!file
  53289. };
  53290. // node_modules/element-plus/es/components/upload/src/upload-list2.mjs
  53291. var _hoisted_167 = ["onKeydown"];
  53292. var _hoisted_241 = ["src"];
  53293. var _hoisted_319 = ["onClick"];
  53294. var _hoisted_411 = ["onClick"];
  53295. var _hoisted_58 = ["onClick"];
  53296. var __default__94 = defineComponent({
  53297. name: "ElUploadList"
  53298. });
  53299. var _sfc_main140 = defineComponent({
  53300. ...__default__94,
  53301. props: uploadListProps,
  53302. emits: uploadListEmits,
  53303. setup(__props, { emit }) {
  53304. const { t } = useLocale();
  53305. const nsUpload = useNamespace("upload");
  53306. const nsIcon = useNamespace("icon");
  53307. const nsList = useNamespace("list");
  53308. const disabled = useDisabled();
  53309. const focusing = ref(false);
  53310. const handleRemove = (file) => {
  53311. emit("remove", file);
  53312. };
  53313. return (_ctx, _cache) => {
  53314. return openBlock(), createBlock(TransitionGroup, {
  53315. tag: "ul",
  53316. class: normalizeClass([
  53317. unref(nsUpload).b("list"),
  53318. unref(nsUpload).bm("list", _ctx.listType),
  53319. unref(nsUpload).is("disabled", unref(disabled))
  53320. ]),
  53321. name: unref(nsList).b()
  53322. }, {
  53323. default: withCtx(() => [
  53324. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.files, (file) => {
  53325. return openBlock(), createElementBlock("li", {
  53326. key: file.uid || file.name,
  53327. class: normalizeClass([
  53328. unref(nsUpload).be("list", "item"),
  53329. unref(nsUpload).is(file.status),
  53330. { focusing: focusing.value }
  53331. ]),
  53332. tabindex: "0",
  53333. onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]),
  53334. onFocus: _cache[0] || (_cache[0] = ($event) => focusing.value = true),
  53335. onBlur: _cache[1] || (_cache[1] = ($event) => focusing.value = false),
  53336. onClick: _cache[2] || (_cache[2] = ($event) => focusing.value = false)
  53337. }, [
  53338. renderSlot(_ctx.$slots, "default", { file }, () => [
  53339. _ctx.listType === "picture" || file.status !== "uploading" && _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("img", {
  53340. key: 0,
  53341. class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")),
  53342. src: file.url,
  53343. alt: ""
  53344. }, null, 10, _hoisted_241)) : createCommentVNode("v-if", true),
  53345. file.status === "uploading" || _ctx.listType !== "picture-card" ? (openBlock(), createElementBlock("div", {
  53346. key: 1,
  53347. class: normalizeClass(unref(nsUpload).be("list", "item-info"))
  53348. }, [
  53349. createBaseVNode("a", {
  53350. class: normalizeClass(unref(nsUpload).be("list", "item-name")),
  53351. onClick: withModifiers(($event) => _ctx.handlePreview(file), ["prevent"])
  53352. }, [
  53353. createVNode(unref(ElIcon), {
  53354. class: normalizeClass(unref(nsIcon).m("document"))
  53355. }, {
  53356. default: withCtx(() => [
  53357. createVNode(unref(document_default))
  53358. ]),
  53359. _: 1
  53360. }, 8, ["class"]),
  53361. createBaseVNode("span", {
  53362. class: normalizeClass(unref(nsUpload).be("list", "item-file-name"))
  53363. }, toDisplayString(file.name), 3)
  53364. ], 10, _hoisted_319),
  53365. file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), {
  53366. key: 0,
  53367. type: _ctx.listType === "picture-card" ? "circle" : "line",
  53368. "stroke-width": _ctx.listType === "picture-card" ? 6 : 2,
  53369. percentage: Number(file.percentage),
  53370. style: normalizeStyle(_ctx.listType === "picture-card" ? "" : "margin-top: 0.5rem")
  53371. }, null, 8, ["type", "stroke-width", "percentage", "style"])) : createCommentVNode("v-if", true)
  53372. ], 2)) : createCommentVNode("v-if", true),
  53373. createBaseVNode("label", {
  53374. class: normalizeClass(unref(nsUpload).be("list", "item-status-label"))
  53375. }, [
  53376. _ctx.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), {
  53377. key: 0,
  53378. class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")])
  53379. }, {
  53380. default: withCtx(() => [
  53381. createVNode(unref(circle_check_default))
  53382. ]),
  53383. _: 1
  53384. }, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (openBlock(), createBlock(unref(ElIcon), {
  53385. key: 1,
  53386. class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")])
  53387. }, {
  53388. default: withCtx(() => [
  53389. createVNode(unref(check_default))
  53390. ]),
  53391. _: 1
  53392. }, 8, ["class"])) : createCommentVNode("v-if", true)
  53393. ], 2),
  53394. !unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), {
  53395. key: 2,
  53396. class: normalizeClass(unref(nsIcon).m("close")),
  53397. onClick: ($event) => handleRemove(file)
  53398. }, {
  53399. default: withCtx(() => [
  53400. createVNode(unref(close_default))
  53401. ]),
  53402. _: 2
  53403. }, 1032, ["class", "onClick"])) : createCommentVNode("v-if", true),
  53404. createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
  53405. createCommentVNode(" This is a bug which needs to be fixed "),
  53406. createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
  53407. !unref(disabled) ? (openBlock(), createElementBlock("i", {
  53408. key: 3,
  53409. class: normalizeClass(unref(nsIcon).m("close-tip"))
  53410. }, toDisplayString(unref(t)("el.upload.deleteTip")), 3)) : createCommentVNode("v-if", true),
  53411. _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
  53412. key: 4,
  53413. class: normalizeClass(unref(nsUpload).be("list", "item-actions"))
  53414. }, [
  53415. createBaseVNode("span", {
  53416. class: normalizeClass(unref(nsUpload).be("list", "item-preview")),
  53417. onClick: ($event) => _ctx.handlePreview(file)
  53418. }, [
  53419. createVNode(unref(ElIcon), {
  53420. class: normalizeClass(unref(nsIcon).m("zoom-in"))
  53421. }, {
  53422. default: withCtx(() => [
  53423. createVNode(unref(zoom_in_default))
  53424. ]),
  53425. _: 1
  53426. }, 8, ["class"])
  53427. ], 10, _hoisted_411),
  53428. !unref(disabled) ? (openBlock(), createElementBlock("span", {
  53429. key: 0,
  53430. class: normalizeClass(unref(nsUpload).be("list", "item-delete")),
  53431. onClick: ($event) => handleRemove(file)
  53432. }, [
  53433. createVNode(unref(ElIcon), {
  53434. class: normalizeClass(unref(nsIcon).m("delete"))
  53435. }, {
  53436. default: withCtx(() => [
  53437. createVNode(unref(delete_default))
  53438. ]),
  53439. _: 1
  53440. }, 8, ["class"])
  53441. ], 10, _hoisted_58)) : createCommentVNode("v-if", true)
  53442. ], 2)) : createCommentVNode("v-if", true)
  53443. ])
  53444. ], 42, _hoisted_167);
  53445. }), 128)),
  53446. renderSlot(_ctx.$slots, "append")
  53447. ]),
  53448. _: 3
  53449. }, 8, ["class", "name"]);
  53450. };
  53451. }
  53452. });
  53453. var UploadList = _export_sfc(_sfc_main140, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]);
  53454. // node_modules/element-plus/es/components/upload/src/upload-dragger.mjs
  53455. var uploadDraggerProps = buildProps({
  53456. disabled: {
  53457. type: Boolean,
  53458. default: false
  53459. }
  53460. });
  53461. var uploadDraggerEmits = {
  53462. file: (file) => isArray(file)
  53463. };
  53464. // node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs
  53465. var _hoisted_168 = ["onDrop", "onDragover"];
  53466. var COMPONENT_NAME24 = "ElUploadDrag";
  53467. var __default__95 = defineComponent({
  53468. name: COMPONENT_NAME24
  53469. });
  53470. var _sfc_main141 = defineComponent({
  53471. ...__default__95,
  53472. props: uploadDraggerProps,
  53473. emits: uploadDraggerEmits,
  53474. setup(__props, { emit }) {
  53475. const uploaderContext = inject(uploadContextKey);
  53476. if (!uploaderContext) {
  53477. throwError(COMPONENT_NAME24, "usage: <el-upload><el-upload-dragger /></el-upload>");
  53478. }
  53479. const ns2 = useNamespace("upload");
  53480. const dragover = ref(false);
  53481. const disabled = useDisabled();
  53482. const onDrop = (e) => {
  53483. if (disabled.value)
  53484. return;
  53485. dragover.value = false;
  53486. const files = Array.from(e.dataTransfer.files);
  53487. const accept = uploaderContext.accept.value;
  53488. if (!accept) {
  53489. emit("file", files);
  53490. return;
  53491. }
  53492. const filesFiltered = files.filter((file) => {
  53493. const { type: type4, name } = file;
  53494. const extension = name.includes(".") ? `.${name.split(".").pop()}` : "";
  53495. const baseType = type4.replace(/\/.*$/, "");
  53496. return accept.split(",").map((type22) => type22.trim()).filter((type22) => type22).some((acceptedType) => {
  53497. if (acceptedType.startsWith(".")) {
  53498. return extension === acceptedType;
  53499. }
  53500. if (/\/\*$/.test(acceptedType)) {
  53501. return baseType === acceptedType.replace(/\/\*$/, "");
  53502. }
  53503. if (/^[^/]+\/[^/]+$/.test(acceptedType)) {
  53504. return type4 === acceptedType;
  53505. }
  53506. return false;
  53507. });
  53508. });
  53509. emit("file", filesFiltered);
  53510. };
  53511. const onDragover = () => {
  53512. if (!disabled.value)
  53513. dragover.value = true;
  53514. };
  53515. return (_ctx, _cache) => {
  53516. return openBlock(), createElementBlock("div", {
  53517. class: normalizeClass([unref(ns2).b("dragger"), unref(ns2).is("dragover", dragover.value)]),
  53518. onDrop: withModifiers(onDrop, ["prevent"]),
  53519. onDragover: withModifiers(onDragover, ["prevent"]),
  53520. onDragleave: _cache[0] || (_cache[0] = withModifiers(($event) => dragover.value = false, ["prevent"]))
  53521. }, [
  53522. renderSlot(_ctx.$slots, "default")
  53523. ], 42, _hoisted_168);
  53524. };
  53525. }
  53526. });
  53527. var UploadDragger = _export_sfc(_sfc_main141, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);
  53528. // node_modules/element-plus/es/components/upload/src/upload-content.mjs
  53529. var uploadContentProps = buildProps({
  53530. ...uploadBaseProps,
  53531. beforeUpload: {
  53532. type: definePropType(Function),
  53533. default: NOOP
  53534. },
  53535. onRemove: {
  53536. type: definePropType(Function),
  53537. default: NOOP
  53538. },
  53539. onStart: {
  53540. type: definePropType(Function),
  53541. default: NOOP
  53542. },
  53543. onSuccess: {
  53544. type: definePropType(Function),
  53545. default: NOOP
  53546. },
  53547. onProgress: {
  53548. type: definePropType(Function),
  53549. default: NOOP
  53550. },
  53551. onError: {
  53552. type: definePropType(Function),
  53553. default: NOOP
  53554. },
  53555. onExceed: {
  53556. type: definePropType(Function),
  53557. default: NOOP
  53558. }
  53559. });
  53560. // node_modules/element-plus/es/components/upload/src/upload-content2.mjs
  53561. var _hoisted_169 = ["onKeydown"];
  53562. var _hoisted_242 = ["name", "multiple", "accept"];
  53563. var __default__96 = defineComponent({
  53564. name: "ElUploadContent",
  53565. inheritAttrs: false
  53566. });
  53567. var _sfc_main142 = defineComponent({
  53568. ...__default__96,
  53569. props: uploadContentProps,
  53570. setup(__props, { expose }) {
  53571. const props = __props;
  53572. const ns2 = useNamespace("upload");
  53573. const disabled = useDisabled();
  53574. const requests = shallowRef({});
  53575. const inputRef = shallowRef();
  53576. const uploadFiles = (files) => {
  53577. if (files.length === 0)
  53578. return;
  53579. const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props;
  53580. if (limit && fileList.length + files.length > limit) {
  53581. onExceed(files, fileList);
  53582. return;
  53583. }
  53584. if (!multiple) {
  53585. files = files.slice(0, 1);
  53586. }
  53587. for (const file of files) {
  53588. const rawFile = file;
  53589. rawFile.uid = genFileId();
  53590. onStart(rawFile);
  53591. if (autoUpload)
  53592. upload(rawFile);
  53593. }
  53594. };
  53595. const upload = async (rawFile) => {
  53596. inputRef.value.value = "";
  53597. if (!props.beforeUpload) {
  53598. return doUpload(rawFile);
  53599. }
  53600. let hookResult;
  53601. try {
  53602. hookResult = await props.beforeUpload(rawFile);
  53603. } catch (e) {
  53604. hookResult = false;
  53605. }
  53606. if (hookResult === false) {
  53607. props.onRemove(rawFile);
  53608. return;
  53609. }
  53610. let file = rawFile;
  53611. if (hookResult instanceof Blob) {
  53612. if (hookResult instanceof File) {
  53613. file = hookResult;
  53614. } else {
  53615. file = new File([hookResult], rawFile.name, {
  53616. type: rawFile.type
  53617. });
  53618. }
  53619. }
  53620. doUpload(Object.assign(file, {
  53621. uid: rawFile.uid
  53622. }));
  53623. };
  53624. const doUpload = (rawFile) => {
  53625. const {
  53626. headers,
  53627. data,
  53628. method: method5,
  53629. withCredentials,
  53630. name: filename,
  53631. action,
  53632. onProgress,
  53633. onSuccess,
  53634. onError,
  53635. httpRequest
  53636. } = props;
  53637. const { uid: uid2 } = rawFile;
  53638. const options = {
  53639. headers: headers || {},
  53640. withCredentials,
  53641. file: rawFile,
  53642. data,
  53643. method: method5,
  53644. filename,
  53645. action,
  53646. onProgress: (evt) => {
  53647. onProgress(evt, rawFile);
  53648. },
  53649. onSuccess: (res) => {
  53650. onSuccess(res, rawFile);
  53651. delete requests.value[uid2];
  53652. },
  53653. onError: (err) => {
  53654. onError(err, rawFile);
  53655. delete requests.value[uid2];
  53656. }
  53657. };
  53658. const request = httpRequest(options);
  53659. requests.value[uid2] = request;
  53660. if (request instanceof Promise) {
  53661. request.then(options.onSuccess, options.onError);
  53662. }
  53663. };
  53664. const handleChange = (e) => {
  53665. const files = e.target.files;
  53666. if (!files)
  53667. return;
  53668. uploadFiles(Array.from(files));
  53669. };
  53670. const handleClick = () => {
  53671. if (!disabled.value) {
  53672. inputRef.value.value = "";
  53673. inputRef.value.click();
  53674. }
  53675. };
  53676. const handleKeydown = () => {
  53677. handleClick();
  53678. };
  53679. const abort = (file) => {
  53680. const _reqs = entriesOf(requests.value).filter(file ? ([uid2]) => String(file.uid) === uid2 : () => true);
  53681. _reqs.forEach(([uid2, req]) => {
  53682. if (req instanceof XMLHttpRequest)
  53683. req.abort();
  53684. delete requests.value[uid2];
  53685. });
  53686. };
  53687. expose({
  53688. abort,
  53689. upload
  53690. });
  53691. return (_ctx, _cache) => {
  53692. return openBlock(), createElementBlock("div", {
  53693. class: normalizeClass([unref(ns2).b(), unref(ns2).m(_ctx.listType), unref(ns2).is("drag", _ctx.drag)]),
  53694. tabindex: "0",
  53695. onClick: handleClick,
  53696. onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"])
  53697. }, [
  53698. _ctx.drag ? (openBlock(), createBlock(UploadDragger, {
  53699. key: 0,
  53700. disabled: unref(disabled),
  53701. onFile: uploadFiles
  53702. }, {
  53703. default: withCtx(() => [
  53704. renderSlot(_ctx.$slots, "default")
  53705. ]),
  53706. _: 3
  53707. }, 8, ["disabled"])) : renderSlot(_ctx.$slots, "default", { key: 1 }),
  53708. createBaseVNode("input", {
  53709. ref_key: "inputRef",
  53710. ref: inputRef,
  53711. class: normalizeClass(unref(ns2).e("input")),
  53712. name: _ctx.name,
  53713. multiple: _ctx.multiple,
  53714. accept: _ctx.accept,
  53715. type: "file",
  53716. onChange: handleChange,
  53717. onClick: _cache[0] || (_cache[0] = withModifiers(() => {
  53718. }, ["stop"]))
  53719. }, null, 42, _hoisted_242)
  53720. ], 42, _hoisted_169);
  53721. };
  53722. }
  53723. });
  53724. var UploadContent = _export_sfc(_sfc_main142, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);
  53725. // node_modules/element-plus/es/components/upload/src/use-handlers.mjs
  53726. var SCOPE8 = "ElUpload";
  53727. var revokeObjectURL = (file) => {
  53728. var _a2;
  53729. if ((_a2 = file.url) == null ? void 0 : _a2.startsWith("blob:")) {
  53730. URL.revokeObjectURL(file.url);
  53731. }
  53732. };
  53733. var useHandlers = (props, uploadRef) => {
  53734. const uploadFiles = useVModel(props, "fileList", void 0, { passive: true });
  53735. const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid);
  53736. function abort(file) {
  53737. var _a2;
  53738. (_a2 = uploadRef.value) == null ? void 0 : _a2.abort(file);
  53739. }
  53740. function clearFiles(states = ["ready", "uploading", "success", "fail"]) {
  53741. uploadFiles.value = uploadFiles.value.filter((row) => !states.includes(row.status));
  53742. }
  53743. const handleError = (err, rawFile) => {
  53744. const file = getFile(rawFile);
  53745. if (!file)
  53746. return;
  53747. console.error(err);
  53748. file.status = "fail";
  53749. uploadFiles.value.splice(uploadFiles.value.indexOf(file), 1);
  53750. props.onError(err, file, uploadFiles.value);
  53751. props.onChange(file, uploadFiles.value);
  53752. };
  53753. const handleProgress = (evt, rawFile) => {
  53754. const file = getFile(rawFile);
  53755. if (!file)
  53756. return;
  53757. props.onProgress(evt, file, uploadFiles.value);
  53758. file.status = "uploading";
  53759. file.percentage = Math.round(evt.percent);
  53760. };
  53761. const handleSuccess = (response, rawFile) => {
  53762. const file = getFile(rawFile);
  53763. if (!file)
  53764. return;
  53765. file.status = "success";
  53766. file.response = response;
  53767. props.onSuccess(response, file, uploadFiles.value);
  53768. props.onChange(file, uploadFiles.value);
  53769. };
  53770. const handleStart = (file) => {
  53771. if (isNil_default(file.uid))
  53772. file.uid = genFileId();
  53773. const uploadFile = {
  53774. name: file.name,
  53775. percentage: 0,
  53776. status: "ready",
  53777. size: file.size,
  53778. raw: file,
  53779. uid: file.uid
  53780. };
  53781. if (props.listType === "picture-card" || props.listType === "picture") {
  53782. try {
  53783. uploadFile.url = URL.createObjectURL(file);
  53784. } catch (err) {
  53785. debugWarn(SCOPE8, err.message);
  53786. props.onError(err, uploadFile, uploadFiles.value);
  53787. }
  53788. }
  53789. uploadFiles.value = [...uploadFiles.value, uploadFile];
  53790. props.onChange(uploadFile, uploadFiles.value);
  53791. };
  53792. const handleRemove = async (file) => {
  53793. const uploadFile = file instanceof File ? getFile(file) : file;
  53794. if (!uploadFile)
  53795. throwError(SCOPE8, "file to be removed not found");
  53796. const doRemove = (file2) => {
  53797. abort(file2);
  53798. const fileList = uploadFiles.value;
  53799. fileList.splice(fileList.indexOf(file2), 1);
  53800. props.onRemove(file2, fileList);
  53801. revokeObjectURL(file2);
  53802. };
  53803. if (props.beforeRemove) {
  53804. const before2 = await props.beforeRemove(uploadFile, uploadFiles.value);
  53805. if (before2 !== false)
  53806. doRemove(uploadFile);
  53807. } else {
  53808. doRemove(uploadFile);
  53809. }
  53810. };
  53811. function submit() {
  53812. uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => {
  53813. var _a2;
  53814. return raw && ((_a2 = uploadRef.value) == null ? void 0 : _a2.upload(raw));
  53815. });
  53816. }
  53817. watch(() => props.listType, (val) => {
  53818. if (val !== "picture-card" && val !== "picture") {
  53819. return;
  53820. }
  53821. uploadFiles.value = uploadFiles.value.map((file) => {
  53822. const { raw, url: url2 } = file;
  53823. if (!url2 && raw) {
  53824. try {
  53825. file.url = URL.createObjectURL(raw);
  53826. } catch (err) {
  53827. props.onError(err, file, uploadFiles.value);
  53828. }
  53829. }
  53830. return file;
  53831. });
  53832. });
  53833. watch(uploadFiles, (files) => {
  53834. for (const file of files) {
  53835. file.uid || (file.uid = genFileId());
  53836. file.status || (file.status = "success");
  53837. }
  53838. }, { immediate: true, deep: true });
  53839. return {
  53840. uploadFiles,
  53841. abort,
  53842. clearFiles,
  53843. handleError,
  53844. handleProgress,
  53845. handleStart,
  53846. handleSuccess,
  53847. handleRemove,
  53848. submit
  53849. };
  53850. };
  53851. // node_modules/element-plus/es/components/upload/src/upload2.mjs
  53852. var __default__97 = defineComponent({
  53853. name: "ElUpload"
  53854. });
  53855. var _sfc_main143 = defineComponent({
  53856. ...__default__97,
  53857. props: uploadProps,
  53858. setup(__props, { expose }) {
  53859. const props = __props;
  53860. const slots = useSlots();
  53861. const disabled = useDisabled();
  53862. const uploadRef = shallowRef();
  53863. const {
  53864. abort,
  53865. submit,
  53866. clearFiles,
  53867. uploadFiles,
  53868. handleStart,
  53869. handleError,
  53870. handleRemove,
  53871. handleSuccess,
  53872. handleProgress
  53873. } = useHandlers(props, uploadRef);
  53874. const isPictureCard = computed2(() => props.listType === "picture-card");
  53875. const uploadContentProps2 = computed2(() => ({
  53876. ...props,
  53877. fileList: uploadFiles.value,
  53878. onStart: handleStart,
  53879. onProgress: handleProgress,
  53880. onSuccess: handleSuccess,
  53881. onError: handleError,
  53882. onRemove: handleRemove
  53883. }));
  53884. onBeforeUnmount(() => {
  53885. uploadFiles.value.forEach(({ url: url2 }) => {
  53886. if (url2 == null ? void 0 : url2.startsWith("blob:"))
  53887. URL.revokeObjectURL(url2);
  53888. });
  53889. });
  53890. provide(uploadContextKey, {
  53891. accept: toRef(props, "accept")
  53892. });
  53893. expose({
  53894. abort,
  53895. submit,
  53896. clearFiles,
  53897. handleStart,
  53898. handleRemove
  53899. });
  53900. return (_ctx, _cache) => {
  53901. return openBlock(), createElementBlock("div", null, [
  53902. unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
  53903. key: 0,
  53904. disabled: unref(disabled),
  53905. "list-type": _ctx.listType,
  53906. files: unref(uploadFiles),
  53907. "handle-preview": _ctx.onPreview,
  53908. onRemove: unref(handleRemove)
  53909. }, createSlots({
  53910. append: withCtx(() => [
  53911. createVNode(UploadContent, mergeProps({
  53912. ref_key: "uploadRef",
  53913. ref: uploadRef
  53914. }, unref(uploadContentProps2)), {
  53915. default: withCtx(() => [
  53916. unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
  53917. !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
  53918. ]),
  53919. _: 3
  53920. }, 16)
  53921. ]),
  53922. _: 2
  53923. }, [
  53924. _ctx.$slots.file ? {
  53925. name: "default",
  53926. fn: withCtx(({ file }) => [
  53927. renderSlot(_ctx.$slots, "file", { file })
  53928. ])
  53929. } : void 0
  53930. ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true),
  53931. !unref(isPictureCard) || unref(isPictureCard) && !_ctx.showFileList ? (openBlock(), createBlock(UploadContent, mergeProps({
  53932. key: 1,
  53933. ref_key: "uploadRef",
  53934. ref: uploadRef
  53935. }, unref(uploadContentProps2)), {
  53936. default: withCtx(() => [
  53937. unref(slots).trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
  53938. !unref(slots).trigger && unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
  53939. ]),
  53940. _: 3
  53941. }, 16)) : createCommentVNode("v-if", true),
  53942. _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
  53943. renderSlot(_ctx.$slots, "tip"),
  53944. !unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
  53945. key: 3,
  53946. disabled: unref(disabled),
  53947. "list-type": _ctx.listType,
  53948. files: unref(uploadFiles),
  53949. "handle-preview": _ctx.onPreview,
  53950. onRemove: unref(handleRemove)
  53951. }, createSlots({ _: 2 }, [
  53952. _ctx.$slots.file ? {
  53953. name: "default",
  53954. fn: withCtx(({ file }) => [
  53955. renderSlot(_ctx.$slots, "file", { file })
  53956. ])
  53957. } : void 0
  53958. ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true)
  53959. ]);
  53960. };
  53961. }
  53962. });
  53963. var Upload = _export_sfc(_sfc_main143, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);
  53964. // node_modules/element-plus/es/components/upload/index.mjs
  53965. var ElUpload = withInstall(Upload);
  53966. // node_modules/element-plus/es/component.mjs
  53967. var Components = [
  53968. ElAffix,
  53969. ElAlert,
  53970. ElAutocomplete,
  53971. ElAutoResizer,
  53972. ElAvatar,
  53973. ElBacktop,
  53974. ElBadge,
  53975. ElBreadcrumb,
  53976. ElBreadcrumbItem,
  53977. ElButton,
  53978. ElButtonGroup,
  53979. ElCalendar,
  53980. ElCard,
  53981. ElCarousel,
  53982. ElCarouselItem,
  53983. ElCascader,
  53984. ElCascaderPanel,
  53985. ElCheckTag,
  53986. ElCheckbox,
  53987. ElCheckboxButton,
  53988. ElCheckboxGroup,
  53989. ElCol,
  53990. ElCollapse,
  53991. ElCollapseItem,
  53992. ElCollapseTransition,
  53993. ElColorPicker,
  53994. ElConfigProvider,
  53995. ElContainer,
  53996. ElAside,
  53997. ElFooter,
  53998. ElHeader,
  53999. ElMain,
  54000. ElDatePicker,
  54001. ElDescriptions,
  54002. ElDescriptionsItem,
  54003. ElDialog,
  54004. ElDivider,
  54005. ElDrawer,
  54006. ElDropdown,
  54007. ElDropdownItem,
  54008. ElDropdownMenu,
  54009. ElEmpty,
  54010. ElForm,
  54011. ElFormItem,
  54012. ElIcon,
  54013. ElImage,
  54014. ElImageViewer,
  54015. ElInput,
  54016. ElInputNumber,
  54017. ElLink,
  54018. ElMenu,
  54019. ElMenuItem,
  54020. ElMenuItemGroup,
  54021. ElPageHeader,
  54022. ElPagination,
  54023. ElPopconfirm,
  54024. ElPopover,
  54025. ElPopper,
  54026. ElProgress,
  54027. ElRadio,
  54028. ElRadioButton,
  54029. ElRadioGroup,
  54030. ElRate,
  54031. ElResult,
  54032. ElRow,
  54033. ElScrollbar,
  54034. ElSelect,
  54035. ElOption,
  54036. ElOptionGroup,
  54037. ElSelectV2,
  54038. ElSkeleton,
  54039. ElSkeletonItem,
  54040. ElSlider,
  54041. ElSpace,
  54042. ElStatistic,
  54043. ElCountdown,
  54044. ElSteps,
  54045. ElStep,
  54046. ElSwitch,
  54047. ElTable,
  54048. ElTableColumn2,
  54049. ElTableV2,
  54050. ElTabs,
  54051. ElTabPane,
  54052. ElTag,
  54053. ElTimePicker,
  54054. ElTimeSelect,
  54055. ElTimeline,
  54056. ElTimelineItem,
  54057. ElTooltip,
  54058. ElTooltipV2,
  54059. ElTransfer,
  54060. ElTree,
  54061. ElTreeSelect,
  54062. ElTreeV2,
  54063. ElUpload
  54064. ];
  54065. // node_modules/element-plus/es/components/infinite-scroll/src/index.mjs
  54066. var SCOPE9 = "ElInfiniteScroll";
  54067. var CHECK_INTERVAL = 50;
  54068. var DEFAULT_DELAY = 200;
  54069. var DEFAULT_DISTANCE = 0;
  54070. var attributes = {
  54071. delay: {
  54072. type: Number,
  54073. default: DEFAULT_DELAY
  54074. },
  54075. distance: {
  54076. type: Number,
  54077. default: DEFAULT_DISTANCE
  54078. },
  54079. disabled: {
  54080. type: Boolean,
  54081. default: false
  54082. },
  54083. immediate: {
  54084. type: Boolean,
  54085. default: true
  54086. }
  54087. };
  54088. var getScrollOptions = (el, instance) => {
  54089. return Object.entries(attributes).reduce((acm, [name, option]) => {
  54090. var _a2, _b;
  54091. const { type: type4, default: defaultValue } = option;
  54092. const attrVal = el.getAttribute(`infinite-scroll-${name}`);
  54093. let value = (_b = (_a2 = instance[attrVal]) != null ? _a2 : attrVal) != null ? _b : defaultValue;
  54094. value = value === "false" ? false : value;
  54095. value = type4(value);
  54096. acm[name] = Number.isNaN(value) ? defaultValue : value;
  54097. return acm;
  54098. }, {});
  54099. };
  54100. var destroyObserver = (el) => {
  54101. const { observer } = el[SCOPE9];
  54102. if (observer) {
  54103. observer.disconnect();
  54104. delete el[SCOPE9].observer;
  54105. }
  54106. };
  54107. var handleScroll = (el, cb) => {
  54108. const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE9];
  54109. const { disabled, distance } = getScrollOptions(el, instance);
  54110. const { clientHeight, scrollHeight, scrollTop } = containerEl;
  54111. const delta = scrollTop - lastScrollTop;
  54112. el[SCOPE9].lastScrollTop = scrollTop;
  54113. if (observer || disabled || delta < 0)
  54114. return;
  54115. let shouldTrigger = false;
  54116. if (container === el) {
  54117. shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance;
  54118. } else {
  54119. const { clientTop, scrollHeight: height } = el;
  54120. const offsetTop = getOffsetTopDistance(el, containerEl);
  54121. shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance;
  54122. }
  54123. if (shouldTrigger) {
  54124. cb.call(instance);
  54125. }
  54126. };
  54127. function checkFull(el, cb) {
  54128. const { containerEl, instance } = el[SCOPE9];
  54129. const { disabled } = getScrollOptions(el, instance);
  54130. if (disabled || containerEl.clientHeight === 0)
  54131. return;
  54132. if (containerEl.scrollHeight <= containerEl.clientHeight) {
  54133. cb.call(instance);
  54134. } else {
  54135. destroyObserver(el);
  54136. }
  54137. }
  54138. var InfiniteScroll = {
  54139. async mounted(el, binding) {
  54140. const { instance, value: cb } = binding;
  54141. if (!isFunction(cb)) {
  54142. throwError(SCOPE9, "'v-infinite-scroll' binding value must be a function");
  54143. }
  54144. await nextTick();
  54145. const { delay: delay2, immediate } = getScrollOptions(el, instance);
  54146. const container = getScrollContainer(el, true);
  54147. const containerEl = container === window ? document.documentElement : container;
  54148. const onScroll = throttle_default(handleScroll.bind(null, el, cb), delay2);
  54149. if (!container)
  54150. return;
  54151. el[SCOPE9] = {
  54152. instance,
  54153. container,
  54154. containerEl,
  54155. delay: delay2,
  54156. cb,
  54157. onScroll,
  54158. lastScrollTop: containerEl.scrollTop
  54159. };
  54160. if (immediate) {
  54161. const observer = new MutationObserver(throttle_default(checkFull.bind(null, el, cb), CHECK_INTERVAL));
  54162. el[SCOPE9].observer = observer;
  54163. observer.observe(el, { childList: true, subtree: true });
  54164. checkFull(el, cb);
  54165. }
  54166. container.addEventListener("scroll", onScroll);
  54167. },
  54168. unmounted(el) {
  54169. const { container, onScroll } = el[SCOPE9];
  54170. container == null ? void 0 : container.removeEventListener("scroll", onScroll);
  54171. destroyObserver(el);
  54172. },
  54173. async updated(el) {
  54174. if (!el[SCOPE9]) {
  54175. await nextTick();
  54176. }
  54177. const { containerEl, cb, observer } = el[SCOPE9];
  54178. if (containerEl.clientHeight && observer) {
  54179. checkFull(el, cb);
  54180. }
  54181. }
  54182. };
  54183. // node_modules/element-plus/es/components/infinite-scroll/index.mjs
  54184. var _InfiniteScroll = InfiniteScroll;
  54185. _InfiniteScroll.install = (app) => {
  54186. app.directive("InfiniteScroll", _InfiniteScroll);
  54187. };
  54188. var ElInfiniteScroll = _InfiniteScroll;
  54189. // node_modules/element-plus/es/components/loading/src/loading.mjs
  54190. function createLoadingComponent(options) {
  54191. let afterLeaveTimer;
  54192. const ns2 = useNamespace("loading");
  54193. const afterLeaveFlag = ref(false);
  54194. const data = reactive({
  54195. ...options,
  54196. originalPosition: "",
  54197. originalOverflow: "",
  54198. visible: false
  54199. });
  54200. function setText(text) {
  54201. data.text = text;
  54202. }
  54203. function destroySelf() {
  54204. const target2 = data.parent;
  54205. if (!target2.vLoadingAddClassList) {
  54206. let loadingNumber = target2.getAttribute("loading-number");
  54207. loadingNumber = Number.parseInt(loadingNumber) - 1;
  54208. if (!loadingNumber) {
  54209. removeClass(target2, ns2.bm("parent", "relative"));
  54210. target2.removeAttribute("loading-number");
  54211. } else {
  54212. target2.setAttribute("loading-number", loadingNumber.toString());
  54213. }
  54214. removeClass(target2, ns2.bm("parent", "hidden"));
  54215. }
  54216. removeElLoadingChild();
  54217. loadingInstance.unmount();
  54218. }
  54219. function removeElLoadingChild() {
  54220. var _a2, _b;
  54221. (_b = (_a2 = vm.$el) == null ? void 0 : _a2.parentNode) == null ? void 0 : _b.removeChild(vm.$el);
  54222. }
  54223. function close2() {
  54224. var _a2;
  54225. if (options.beforeClose && !options.beforeClose())
  54226. return;
  54227. afterLeaveFlag.value = true;
  54228. clearTimeout(afterLeaveTimer);
  54229. afterLeaveTimer = window.setTimeout(handleAfterLeave, 400);
  54230. data.visible = false;
  54231. (_a2 = options.closed) == null ? void 0 : _a2.call(options);
  54232. }
  54233. function handleAfterLeave() {
  54234. if (!afterLeaveFlag.value)
  54235. return;
  54236. const target2 = data.parent;
  54237. afterLeaveFlag.value = false;
  54238. target2.vLoadingAddClassList = void 0;
  54239. destroySelf();
  54240. }
  54241. const elLoadingComponent = {
  54242. name: "ElLoading",
  54243. setup() {
  54244. return () => {
  54245. const svg = data.spinner || data.svg;
  54246. const spinner = h("svg", {
  54247. class: "circular",
  54248. viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50",
  54249. ...svg ? { innerHTML: svg } : {}
  54250. }, [
  54251. h("circle", {
  54252. class: "path",
  54253. cx: "25",
  54254. cy: "25",
  54255. r: "20",
  54256. fill: "none"
  54257. })
  54258. ]);
  54259. const spinnerText = data.text ? h("p", { class: ns2.b("text") }, [data.text]) : void 0;
  54260. return h(Transition, {
  54261. name: ns2.b("fade"),
  54262. onAfterLeave: handleAfterLeave
  54263. }, {
  54264. default: withCtx(() => [
  54265. withDirectives(createVNode("div", {
  54266. style: {
  54267. backgroundColor: data.background || ""
  54268. },
  54269. class: [
  54270. ns2.b("mask"),
  54271. data.customClass,
  54272. data.fullscreen ? "is-fullscreen" : ""
  54273. ]
  54274. }, [
  54275. h("div", {
  54276. class: ns2.b("spinner")
  54277. }, [spinner, spinnerText])
  54278. ]), [[vShow, data.visible]])
  54279. ])
  54280. });
  54281. };
  54282. }
  54283. };
  54284. const loadingInstance = createApp(elLoadingComponent);
  54285. const vm = loadingInstance.mount(document.createElement("div"));
  54286. return {
  54287. ...toRefs(data),
  54288. setText,
  54289. removeElLoadingChild,
  54290. close: close2,
  54291. handleAfterLeave,
  54292. vm,
  54293. get $el() {
  54294. return vm.$el;
  54295. }
  54296. };
  54297. }
  54298. // node_modules/element-plus/es/components/loading/src/service.mjs
  54299. var fullscreenInstance = void 0;
  54300. var Loading = function(options = {}) {
  54301. if (!isClient)
  54302. return void 0;
  54303. const resolved = resolveOptions(options);
  54304. if (resolved.fullscreen && fullscreenInstance) {
  54305. return fullscreenInstance;
  54306. }
  54307. const instance = createLoadingComponent({
  54308. ...resolved,
  54309. closed: () => {
  54310. var _a2;
  54311. (_a2 = resolved.closed) == null ? void 0 : _a2.call(resolved);
  54312. if (resolved.fullscreen)
  54313. fullscreenInstance = void 0;
  54314. }
  54315. });
  54316. addStyle(resolved, resolved.parent, instance);
  54317. addClassList(resolved, resolved.parent, instance);
  54318. resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
  54319. let loadingNumber = resolved.parent.getAttribute("loading-number");
  54320. if (!loadingNumber) {
  54321. loadingNumber = "1";
  54322. } else {
  54323. loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
  54324. }
  54325. resolved.parent.setAttribute("loading-number", loadingNumber);
  54326. resolved.parent.appendChild(instance.$el);
  54327. nextTick(() => instance.visible.value = resolved.visible);
  54328. if (resolved.fullscreen) {
  54329. fullscreenInstance = instance;
  54330. }
  54331. return instance;
  54332. };
  54333. var resolveOptions = (options) => {
  54334. var _a2, _b, _c, _d;
  54335. let target2;
  54336. if (isString(options.target)) {
  54337. target2 = (_a2 = document.querySelector(options.target)) != null ? _a2 : document.body;
  54338. } else {
  54339. target2 = options.target || document.body;
  54340. }
  54341. return {
  54342. parent: target2 === document.body || options.body ? document.body : target2,
  54343. background: options.background || "",
  54344. svg: options.svg || "",
  54345. svgViewBox: options.svgViewBox || "",
  54346. spinner: options.spinner || false,
  54347. text: options.text || "",
  54348. fullscreen: target2 === document.body && ((_b = options.fullscreen) != null ? _b : true),
  54349. lock: (_c = options.lock) != null ? _c : false,
  54350. customClass: options.customClass || "",
  54351. visible: (_d = options.visible) != null ? _d : true,
  54352. target: target2
  54353. };
  54354. };
  54355. var addStyle = async (options, parent2, instance) => {
  54356. const { nextZIndex } = useZIndex();
  54357. const maskStyle = {};
  54358. if (options.fullscreen) {
  54359. instance.originalPosition.value = getStyle(document.body, "position");
  54360. instance.originalOverflow.value = getStyle(document.body, "overflow");
  54361. maskStyle.zIndex = nextZIndex();
  54362. } else if (options.parent === document.body) {
  54363. instance.originalPosition.value = getStyle(document.body, "position");
  54364. await nextTick();
  54365. for (const property2 of ["top", "left"]) {
  54366. const scroll = property2 === "top" ? "scrollTop" : "scrollLeft";
  54367. maskStyle[property2] = `${options.target.getBoundingClientRect()[property2] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property2}`), 10)}px`;
  54368. }
  54369. for (const property2 of ["height", "width"]) {
  54370. maskStyle[property2] = `${options.target.getBoundingClientRect()[property2]}px`;
  54371. }
  54372. } else {
  54373. instance.originalPosition.value = getStyle(parent2, "position");
  54374. }
  54375. for (const [key, value] of Object.entries(maskStyle)) {
  54376. instance.$el.style[key] = value;
  54377. }
  54378. };
  54379. var addClassList = (options, parent2, instance) => {
  54380. const ns2 = useNamespace("loading");
  54381. if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) {
  54382. addClass(parent2, ns2.bm("parent", "relative"));
  54383. } else {
  54384. removeClass(parent2, ns2.bm("parent", "relative"));
  54385. }
  54386. if (options.fullscreen && options.lock) {
  54387. addClass(parent2, ns2.bm("parent", "hidden"));
  54388. } else {
  54389. removeClass(parent2, ns2.bm("parent", "hidden"));
  54390. }
  54391. };
  54392. // node_modules/element-plus/es/components/loading/src/directive.mjs
  54393. var INSTANCE_KEY = Symbol("ElLoading");
  54394. var createInstance = (el, binding) => {
  54395. var _a2, _b, _c, _d;
  54396. const vm = binding.instance;
  54397. const getBindingProp = (key) => isObject(binding.value) ? binding.value[key] : void 0;
  54398. const resolveExpression = (key) => {
  54399. const data = isString(key) && (vm == null ? void 0 : vm[key]) || key;
  54400. if (data)
  54401. return ref(data);
  54402. else
  54403. return data;
  54404. };
  54405. const getProp2 = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(`element-loading-${hyphenate(name)}`));
  54406. const fullscreen = (_a2 = getBindingProp("fullscreen")) != null ? _a2 : binding.modifiers.fullscreen;
  54407. const options = {
  54408. text: getProp2("text"),
  54409. svg: getProp2("svg"),
  54410. svgViewBox: getProp2("svgViewBox"),
  54411. spinner: getProp2("spinner"),
  54412. background: getProp2("background"),
  54413. customClass: getProp2("customClass"),
  54414. fullscreen,
  54415. target: (_b = getBindingProp("target")) != null ? _b : fullscreen ? void 0 : el,
  54416. body: (_c = getBindingProp("body")) != null ? _c : binding.modifiers.body,
  54417. lock: (_d = getBindingProp("lock")) != null ? _d : binding.modifiers.lock
  54418. };
  54419. el[INSTANCE_KEY] = {
  54420. options,
  54421. instance: Loading(options)
  54422. };
  54423. };
  54424. var updateOptions = (newOptions, originalOptions) => {
  54425. for (const key of Object.keys(originalOptions)) {
  54426. if (isRef(originalOptions[key]))
  54427. originalOptions[key].value = newOptions[key];
  54428. }
  54429. };
  54430. var vLoading = {
  54431. mounted(el, binding) {
  54432. if (binding.value) {
  54433. createInstance(el, binding);
  54434. }
  54435. },
  54436. updated(el, binding) {
  54437. const instance = el[INSTANCE_KEY];
  54438. if (binding.oldValue !== binding.value) {
  54439. if (binding.value && !binding.oldValue) {
  54440. createInstance(el, binding);
  54441. } else if (binding.value && binding.oldValue) {
  54442. if (isObject(binding.value))
  54443. updateOptions(binding.value, instance.options);
  54444. } else {
  54445. instance == null ? void 0 : instance.instance.close();
  54446. }
  54447. }
  54448. },
  54449. unmounted(el) {
  54450. var _a2;
  54451. (_a2 = el[INSTANCE_KEY]) == null ? void 0 : _a2.instance.close();
  54452. }
  54453. };
  54454. // node_modules/element-plus/es/components/loading/index.mjs
  54455. var ElLoading = {
  54456. install(app) {
  54457. app.directive("loading", vLoading);
  54458. app.config.globalProperties.$loading = Loading;
  54459. },
  54460. directive: vLoading,
  54461. service: Loading
  54462. };
  54463. // node_modules/element-plus/es/components/message/src/message.mjs
  54464. var messageTypes = ["success", "info", "warning", "error"];
  54465. var messageDefaults = mutable({
  54466. customClass: "",
  54467. center: false,
  54468. dangerouslyUseHTMLString: false,
  54469. duration: 3e3,
  54470. icon: void 0,
  54471. id: "",
  54472. message: "",
  54473. onClose: void 0,
  54474. showClose: false,
  54475. type: "info",
  54476. offset: 16,
  54477. zIndex: 0,
  54478. grouping: false,
  54479. repeatNum: 1,
  54480. appendTo: isClient ? document.body : void 0
  54481. });
  54482. var messageProps = buildProps({
  54483. customClass: {
  54484. type: String,
  54485. default: messageDefaults.customClass
  54486. },
  54487. center: {
  54488. type: Boolean,
  54489. default: messageDefaults.center
  54490. },
  54491. dangerouslyUseHTMLString: {
  54492. type: Boolean,
  54493. default: messageDefaults.dangerouslyUseHTMLString
  54494. },
  54495. duration: {
  54496. type: Number,
  54497. default: messageDefaults.duration
  54498. },
  54499. icon: {
  54500. type: iconPropType,
  54501. default: messageDefaults.icon
  54502. },
  54503. id: {
  54504. type: String,
  54505. default: messageDefaults.id
  54506. },
  54507. message: {
  54508. type: definePropType([
  54509. String,
  54510. Object,
  54511. Function
  54512. ]),
  54513. default: messageDefaults.message
  54514. },
  54515. onClose: {
  54516. type: definePropType(Function),
  54517. required: false
  54518. },
  54519. showClose: {
  54520. type: Boolean,
  54521. default: messageDefaults.showClose
  54522. },
  54523. type: {
  54524. type: String,
  54525. values: messageTypes,
  54526. default: messageDefaults.type
  54527. },
  54528. offset: {
  54529. type: Number,
  54530. default: messageDefaults.offset
  54531. },
  54532. zIndex: {
  54533. type: Number,
  54534. default: messageDefaults.zIndex
  54535. },
  54536. grouping: {
  54537. type: Boolean,
  54538. default: messageDefaults.grouping
  54539. },
  54540. repeatNum: {
  54541. type: Number,
  54542. default: messageDefaults.repeatNum
  54543. }
  54544. });
  54545. var messageEmits = {
  54546. destroy: () => true
  54547. };
  54548. // node_modules/element-plus/es/components/message/src/instance.mjs
  54549. var instances = shallowReactive([]);
  54550. var getInstance = (id2) => {
  54551. const idx = instances.findIndex((instance) => instance.id === id2);
  54552. const current = instances[idx];
  54553. let prev;
  54554. if (idx > 0) {
  54555. prev = instances[idx - 1];
  54556. }
  54557. return { current, prev };
  54558. };
  54559. var getLastOffset = (id2) => {
  54560. const { prev } = getInstance(id2);
  54561. if (!prev)
  54562. return 0;
  54563. return prev.vm.exposed.bottom.value;
  54564. };
  54565. // node_modules/element-plus/es/components/message/src/message2.mjs
  54566. var _hoisted_170 = ["id"];
  54567. var _hoisted_243 = ["innerHTML"];
  54568. var __default__98 = defineComponent({
  54569. name: "ElMessage"
  54570. });
  54571. var _sfc_main144 = defineComponent({
  54572. ...__default__98,
  54573. props: messageProps,
  54574. emits: messageEmits,
  54575. setup(__props, { expose }) {
  54576. const props = __props;
  54577. const { Close } = TypeComponents;
  54578. const ns2 = useNamespace("message");
  54579. const messageRef = ref();
  54580. const visible = ref(false);
  54581. const height = ref(0);
  54582. let stopTimer = void 0;
  54583. const badgeType = computed2(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
  54584. const typeClass = computed2(() => {
  54585. const type4 = props.type;
  54586. return { [ns2.bm("icon", type4)]: type4 && TypeComponentsMap[type4] };
  54587. });
  54588. const iconComponent = computed2(() => props.icon || TypeComponentsMap[props.type] || "");
  54589. const lastOffset = computed2(() => getLastOffset(props.id));
  54590. const offset2 = computed2(() => props.offset + lastOffset.value);
  54591. const bottom = computed2(() => height.value + offset2.value);
  54592. const customStyle = computed2(() => ({
  54593. top: `${offset2.value}px`,
  54594. zIndex: props.zIndex
  54595. }));
  54596. function startTimer() {
  54597. if (props.duration === 0)
  54598. return;
  54599. ({ stop: stopTimer } = useTimeoutFn(() => {
  54600. close2();
  54601. }, props.duration));
  54602. }
  54603. function clearTimer() {
  54604. stopTimer == null ? void 0 : stopTimer();
  54605. }
  54606. function close2() {
  54607. visible.value = false;
  54608. }
  54609. function keydown({ code }) {
  54610. if (code === EVENT_CODE.esc) {
  54611. close2();
  54612. }
  54613. }
  54614. onMounted(() => {
  54615. startTimer();
  54616. visible.value = true;
  54617. });
  54618. watch(() => props.repeatNum, () => {
  54619. clearTimer();
  54620. startTimer();
  54621. });
  54622. useEventListener(document, "keydown", keydown);
  54623. useResizeObserver(messageRef, () => {
  54624. height.value = messageRef.value.getBoundingClientRect().height;
  54625. });
  54626. expose({
  54627. visible,
  54628. bottom,
  54629. close: close2
  54630. });
  54631. return (_ctx, _cache) => {
  54632. return openBlock(), createBlock(Transition, {
  54633. name: unref(ns2).b("fade"),
  54634. onBeforeLeave: _ctx.onClose,
  54635. onAfterLeave: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("destroy")),
  54636. persisted: ""
  54637. }, {
  54638. default: withCtx(() => [
  54639. withDirectives(createBaseVNode("div", {
  54640. id: _ctx.id,
  54641. ref_key: "messageRef",
  54642. ref: messageRef,
  54643. class: normalizeClass([
  54644. unref(ns2).b(),
  54645. { [unref(ns2).m(_ctx.type)]: _ctx.type && !_ctx.icon },
  54646. unref(ns2).is("center", _ctx.center),
  54647. unref(ns2).is("closable", _ctx.showClose),
  54648. _ctx.customClass
  54649. ]),
  54650. style: normalizeStyle(unref(customStyle)),
  54651. role: "alert",
  54652. onMouseenter: clearTimer,
  54653. onMouseleave: startTimer
  54654. }, [
  54655. _ctx.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), {
  54656. key: 0,
  54657. value: _ctx.repeatNum,
  54658. type: unref(badgeType),
  54659. class: normalizeClass(unref(ns2).e("badge"))
  54660. }, null, 8, ["value", "type", "class"])) : createCommentVNode("v-if", true),
  54661. unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
  54662. key: 1,
  54663. class: normalizeClass([unref(ns2).e("icon"), unref(typeClass)])
  54664. }, {
  54665. default: withCtx(() => [
  54666. (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
  54667. ]),
  54668. _: 1
  54669. }, 8, ["class"])) : createCommentVNode("v-if", true),
  54670. renderSlot(_ctx.$slots, "default", {}, () => [
  54671. !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", {
  54672. key: 0,
  54673. class: normalizeClass(unref(ns2).e("content"))
  54674. }, toDisplayString(_ctx.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  54675. createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
  54676. createBaseVNode("p", {
  54677. class: normalizeClass(unref(ns2).e("content")),
  54678. innerHTML: _ctx.message
  54679. }, null, 10, _hoisted_243)
  54680. ], 2112))
  54681. ]),
  54682. _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
  54683. key: 2,
  54684. class: normalizeClass(unref(ns2).e("closeBtn")),
  54685. onClick: withModifiers(close2, ["stop"])
  54686. }, {
  54687. default: withCtx(() => [
  54688. createVNode(unref(Close))
  54689. ]),
  54690. _: 1
  54691. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
  54692. ], 46, _hoisted_170), [
  54693. [vShow, visible.value]
  54694. ])
  54695. ]),
  54696. _: 3
  54697. }, 8, ["name", "onBeforeLeave"]);
  54698. };
  54699. }
  54700. });
  54701. var MessageConstructor = _export_sfc(_sfc_main144, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
  54702. // node_modules/element-plus/es/components/message/src/method.mjs
  54703. var seed = 1;
  54704. var normalizeOptions = (params) => {
  54705. const options = !params || isString(params) || isVNode(params) || isFunction(params) ? { message: params } : params;
  54706. const normalized = {
  54707. ...messageDefaults,
  54708. ...options
  54709. };
  54710. if (!normalized.appendTo) {
  54711. normalized.appendTo = document.body;
  54712. } else if (isString(normalized.appendTo)) {
  54713. let appendTo = document.querySelector(normalized.appendTo);
  54714. if (!isElement2(appendTo)) {
  54715. debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  54716. appendTo = document.body;
  54717. }
  54718. normalized.appendTo = appendTo;
  54719. }
  54720. return normalized;
  54721. };
  54722. var closeMessage = (instance) => {
  54723. const idx = instances.indexOf(instance);
  54724. if (idx === -1)
  54725. return;
  54726. instances.splice(idx, 1);
  54727. const { handler } = instance;
  54728. handler.close();
  54729. };
  54730. var createMessage = ({ appendTo, ...options }, context) => {
  54731. const { nextZIndex } = useZIndex();
  54732. const id2 = `message_${seed++}`;
  54733. const userOnClose = options.onClose;
  54734. const container = document.createElement("div");
  54735. const props = {
  54736. ...options,
  54737. zIndex: nextZIndex() + options.zIndex,
  54738. id: id2,
  54739. onClose: () => {
  54740. userOnClose == null ? void 0 : userOnClose();
  54741. closeMessage(instance);
  54742. },
  54743. onDestroy: () => {
  54744. render(null, container);
  54745. }
  54746. };
  54747. const vnode = createVNode(MessageConstructor, props, isFunction(props.message) || isVNode(props.message) ? {
  54748. default: isFunction(props.message) ? props.message : () => props.message
  54749. } : null);
  54750. vnode.appContext = context || message._context;
  54751. render(vnode, container);
  54752. appendTo.appendChild(container.firstElementChild);
  54753. const vm = vnode.component;
  54754. const handler = {
  54755. close: () => {
  54756. vm.exposed.visible.value = false;
  54757. }
  54758. };
  54759. const instance = {
  54760. id: id2,
  54761. vnode,
  54762. vm,
  54763. handler,
  54764. props: vnode.component.props
  54765. };
  54766. return instance;
  54767. };
  54768. var message = (options = {}, context) => {
  54769. if (!isClient)
  54770. return { close: () => void 0 };
  54771. if (isNumber2(messageConfig.max) && instances.length >= messageConfig.max) {
  54772. return { close: () => void 0 };
  54773. }
  54774. const normalized = normalizeOptions(options);
  54775. if (normalized.grouping && instances.length) {
  54776. const instance2 = instances.find(({ vnode: vm }) => {
  54777. var _a2;
  54778. return ((_a2 = vm.props) == null ? void 0 : _a2.message) === normalized.message;
  54779. });
  54780. if (instance2) {
  54781. instance2.props.repeatNum += 1;
  54782. instance2.props.type = normalized.type;
  54783. return instance2.handler;
  54784. }
  54785. }
  54786. const instance = createMessage(normalized, context);
  54787. instances.push(instance);
  54788. return instance.handler;
  54789. };
  54790. messageTypes.forEach((type4) => {
  54791. message[type4] = (options = {}, appContext) => {
  54792. const normalized = normalizeOptions(options);
  54793. return message({ ...normalized, type: type4 }, appContext);
  54794. };
  54795. });
  54796. function closeAll(type4) {
  54797. for (const instance of instances) {
  54798. if (!type4 || type4 === instance.props.type) {
  54799. instance.handler.close();
  54800. }
  54801. }
  54802. }
  54803. message.closeAll = closeAll;
  54804. message._context = null;
  54805. // node_modules/element-plus/es/components/message/index.mjs
  54806. var ElMessage = withInstallFunction(message, "$message");
  54807. // node_modules/element-plus/es/components/message-box/src/index.mjs
  54808. var _sfc_main145 = defineComponent({
  54809. name: "ElMessageBox",
  54810. directives: {
  54811. TrapFocus
  54812. },
  54813. components: {
  54814. ElButton,
  54815. ElFocusTrap,
  54816. ElInput,
  54817. ElOverlay,
  54818. ElIcon,
  54819. ...TypeComponents
  54820. },
  54821. inheritAttrs: false,
  54822. props: {
  54823. buttonSize: {
  54824. type: String,
  54825. validator: isValidComponentSize
  54826. },
  54827. modal: {
  54828. type: Boolean,
  54829. default: true
  54830. },
  54831. lockScroll: {
  54832. type: Boolean,
  54833. default: true
  54834. },
  54835. showClose: {
  54836. type: Boolean,
  54837. default: true
  54838. },
  54839. closeOnClickModal: {
  54840. type: Boolean,
  54841. default: true
  54842. },
  54843. closeOnPressEscape: {
  54844. type: Boolean,
  54845. default: true
  54846. },
  54847. closeOnHashChange: {
  54848. type: Boolean,
  54849. default: true
  54850. },
  54851. center: Boolean,
  54852. draggable: Boolean,
  54853. roundButton: {
  54854. default: false,
  54855. type: Boolean
  54856. },
  54857. container: {
  54858. type: String,
  54859. default: "body"
  54860. },
  54861. boxType: {
  54862. type: String,
  54863. default: ""
  54864. }
  54865. },
  54866. emits: ["vanish", "action"],
  54867. setup(props, { emit }) {
  54868. const { t } = useLocale();
  54869. const ns2 = useNamespace("message-box");
  54870. const visible = ref(false);
  54871. const { nextZIndex } = useZIndex();
  54872. const state = reactive({
  54873. autofocus: true,
  54874. beforeClose: null,
  54875. callback: null,
  54876. cancelButtonText: "",
  54877. cancelButtonClass: "",
  54878. confirmButtonText: "",
  54879. confirmButtonClass: "",
  54880. customClass: "",
  54881. customStyle: {},
  54882. dangerouslyUseHTMLString: false,
  54883. distinguishCancelAndClose: false,
  54884. icon: "",
  54885. inputPattern: null,
  54886. inputPlaceholder: "",
  54887. inputType: "text",
  54888. inputValue: null,
  54889. inputValidator: null,
  54890. inputErrorMessage: "",
  54891. message: null,
  54892. modalFade: true,
  54893. modalClass: "",
  54894. showCancelButton: false,
  54895. showConfirmButton: true,
  54896. type: "",
  54897. title: void 0,
  54898. showInput: false,
  54899. action: "",
  54900. confirmButtonLoading: false,
  54901. cancelButtonLoading: false,
  54902. confirmButtonDisabled: false,
  54903. editorErrorMessage: "",
  54904. validateError: false,
  54905. zIndex: nextZIndex()
  54906. });
  54907. const typeClass = computed2(() => {
  54908. const type4 = state.type;
  54909. return { [ns2.bm("icon", type4)]: type4 && TypeComponentsMap[type4] };
  54910. });
  54911. const contentId = useId();
  54912. const inputId = useId();
  54913. const btnSize = useSize(computed2(() => props.buttonSize), { prop: true, form: true, formItem: true });
  54914. const iconComponent = computed2(() => state.icon || TypeComponentsMap[state.type] || "");
  54915. const hasMessage = computed2(() => !!state.message);
  54916. const rootRef = ref();
  54917. const headerRef = ref();
  54918. const focusStartRef = ref();
  54919. const inputRef = ref();
  54920. const confirmRef = ref();
  54921. const confirmButtonClasses = computed2(() => state.confirmButtonClass);
  54922. watch(() => state.inputValue, async (val) => {
  54923. await nextTick();
  54924. if (props.boxType === "prompt" && val !== null) {
  54925. validate();
  54926. }
  54927. }, { immediate: true });
  54928. watch(() => visible.value, (val) => {
  54929. var _a2, _b;
  54930. if (val) {
  54931. if (props.boxType !== "prompt") {
  54932. if (state.autofocus) {
  54933. focusStartRef.value = (_b = (_a2 = confirmRef.value) == null ? void 0 : _a2.$el) != null ? _b : rootRef.value;
  54934. } else {
  54935. focusStartRef.value = rootRef.value;
  54936. }
  54937. }
  54938. state.zIndex = nextZIndex();
  54939. }
  54940. if (props.boxType !== "prompt")
  54941. return;
  54942. if (val) {
  54943. nextTick().then(() => {
  54944. var _a22;
  54945. if (inputRef.value && inputRef.value.$el) {
  54946. if (state.autofocus) {
  54947. focusStartRef.value = (_a22 = getInputElement()) != null ? _a22 : rootRef.value;
  54948. } else {
  54949. focusStartRef.value = rootRef.value;
  54950. }
  54951. }
  54952. });
  54953. } else {
  54954. state.editorErrorMessage = "";
  54955. state.validateError = false;
  54956. }
  54957. });
  54958. const draggable2 = computed2(() => props.draggable);
  54959. useDraggable(rootRef, headerRef, draggable2);
  54960. onMounted(async () => {
  54961. await nextTick();
  54962. if (props.closeOnHashChange) {
  54963. window.addEventListener("hashchange", doClose);
  54964. }
  54965. });
  54966. onBeforeUnmount(() => {
  54967. if (props.closeOnHashChange) {
  54968. window.removeEventListener("hashchange", doClose);
  54969. }
  54970. });
  54971. function doClose() {
  54972. if (!visible.value)
  54973. return;
  54974. visible.value = false;
  54975. nextTick(() => {
  54976. if (state.action)
  54977. emit("action", state.action);
  54978. });
  54979. }
  54980. const handleWrapperClick = () => {
  54981. if (props.closeOnClickModal) {
  54982. handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
  54983. }
  54984. };
  54985. const overlayEvent = useSameTarget(handleWrapperClick);
  54986. const handleInputEnter = (e) => {
  54987. if (state.inputType !== "textarea") {
  54988. e.preventDefault();
  54989. return handleAction("confirm");
  54990. }
  54991. };
  54992. const handleAction = (action) => {
  54993. var _a2;
  54994. if (props.boxType === "prompt" && action === "confirm" && !validate()) {
  54995. return;
  54996. }
  54997. state.action = action;
  54998. if (state.beforeClose) {
  54999. (_a2 = state.beforeClose) == null ? void 0 : _a2.call(state, action, state, doClose);
  55000. } else {
  55001. doClose();
  55002. }
  55003. };
  55004. const validate = () => {
  55005. if (props.boxType === "prompt") {
  55006. const inputPattern = state.inputPattern;
  55007. if (inputPattern && !inputPattern.test(state.inputValue || "")) {
  55008. state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
  55009. state.validateError = true;
  55010. return false;
  55011. }
  55012. const inputValidator = state.inputValidator;
  55013. if (typeof inputValidator === "function") {
  55014. const validateResult = inputValidator(state.inputValue);
  55015. if (validateResult === false) {
  55016. state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
  55017. state.validateError = true;
  55018. return false;
  55019. }
  55020. if (typeof validateResult === "string") {
  55021. state.editorErrorMessage = validateResult;
  55022. state.validateError = true;
  55023. return false;
  55024. }
  55025. }
  55026. }
  55027. state.editorErrorMessage = "";
  55028. state.validateError = false;
  55029. return true;
  55030. };
  55031. const getInputElement = () => {
  55032. const inputRefs = inputRef.value.$refs;
  55033. return inputRefs.input || inputRefs.textarea;
  55034. };
  55035. const handleClose = () => {
  55036. handleAction("close");
  55037. };
  55038. const onCloseRequested = () => {
  55039. if (props.closeOnPressEscape) {
  55040. handleClose();
  55041. }
  55042. };
  55043. if (props.lockScroll) {
  55044. useLockscreen(visible);
  55045. }
  55046. useRestoreActive(visible);
  55047. return {
  55048. ...toRefs(state),
  55049. ns: ns2,
  55050. overlayEvent,
  55051. visible,
  55052. hasMessage,
  55053. typeClass,
  55054. contentId,
  55055. inputId,
  55056. btnSize,
  55057. iconComponent,
  55058. confirmButtonClasses,
  55059. rootRef,
  55060. focusStartRef,
  55061. headerRef,
  55062. inputRef,
  55063. confirmRef,
  55064. doClose,
  55065. handleClose,
  55066. onCloseRequested,
  55067. handleWrapperClick,
  55068. handleInputEnter,
  55069. handleAction,
  55070. t
  55071. };
  55072. }
  55073. });
  55074. var _hoisted_171 = ["aria-label", "aria-describedby"];
  55075. var _hoisted_244 = ["aria-label"];
  55076. var _hoisted_320 = ["id"];
  55077. function _sfc_render35(_ctx, _cache, $props, $setup, $data, $options) {
  55078. const _component_el_icon = resolveComponent("el-icon");
  55079. const _component_close = resolveComponent("close");
  55080. const _component_el_input = resolveComponent("el-input");
  55081. const _component_el_button = resolveComponent("el-button");
  55082. const _component_el_focus_trap = resolveComponent("el-focus-trap");
  55083. const _component_el_overlay = resolveComponent("el-overlay");
  55084. return openBlock(), createBlock(Transition, {
  55085. name: "fade-in-linear",
  55086. onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish")),
  55087. persisted: ""
  55088. }, {
  55089. default: withCtx(() => [
  55090. withDirectives(createVNode(_component_el_overlay, {
  55091. "z-index": _ctx.zIndex,
  55092. "overlay-class": [_ctx.ns.is("message-box"), _ctx.modalClass],
  55093. mask: _ctx.modal
  55094. }, {
  55095. default: withCtx(() => [
  55096. createBaseVNode("div", {
  55097. role: "dialog",
  55098. "aria-label": _ctx.title,
  55099. "aria-modal": "true",
  55100. "aria-describedby": !_ctx.showInput ? _ctx.contentId : void 0,
  55101. class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),
  55102. onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),
  55103. onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),
  55104. onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))
  55105. }, [
  55106. createVNode(_component_el_focus_trap, {
  55107. loop: "",
  55108. trapped: _ctx.visible,
  55109. "focus-trap-el": _ctx.rootRef,
  55110. "focus-start-el": _ctx.focusStartRef,
  55111. onReleaseRequested: _ctx.onCloseRequested
  55112. }, {
  55113. default: withCtx(() => [
  55114. createBaseVNode("div", {
  55115. ref: "rootRef",
  55116. class: normalizeClass([
  55117. _ctx.ns.b(),
  55118. _ctx.customClass,
  55119. _ctx.ns.is("draggable", _ctx.draggable),
  55120. { [_ctx.ns.m("center")]: _ctx.center }
  55121. ]),
  55122. style: normalizeStyle(_ctx.customStyle),
  55123. tabindex: "-1",
  55124. onClick: _cache[7] || (_cache[7] = withModifiers(() => {
  55125. }, ["stop"]))
  55126. }, [
  55127. _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", {
  55128. key: 0,
  55129. ref: "headerRef",
  55130. class: normalizeClass(_ctx.ns.e("header"))
  55131. }, [
  55132. createBaseVNode("div", {
  55133. class: normalizeClass(_ctx.ns.e("title"))
  55134. }, [
  55135. _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
  55136. key: 0,
  55137. class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
  55138. }, {
  55139. default: withCtx(() => [
  55140. (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
  55141. ]),
  55142. _: 1
  55143. }, 8, ["class"])) : createCommentVNode("v-if", true),
  55144. createBaseVNode("span", null, toDisplayString(_ctx.title), 1)
  55145. ], 2),
  55146. _ctx.showClose ? (openBlock(), createElementBlock("button", {
  55147. key: 0,
  55148. type: "button",
  55149. class: normalizeClass(_ctx.ns.e("headerbtn")),
  55150. "aria-label": _ctx.t("el.messagebox.close"),
  55151. onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
  55152. onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
  55153. }, [
  55154. createVNode(_component_el_icon, {
  55155. class: normalizeClass(_ctx.ns.e("close"))
  55156. }, {
  55157. default: withCtx(() => [
  55158. createVNode(_component_close)
  55159. ]),
  55160. _: 1
  55161. }, 8, ["class"])
  55162. ], 42, _hoisted_244)) : createCommentVNode("v-if", true)
  55163. ], 2)) : createCommentVNode("v-if", true),
  55164. createBaseVNode("div", {
  55165. id: _ctx.contentId,
  55166. class: normalizeClass(_ctx.ns.e("content"))
  55167. }, [
  55168. createBaseVNode("div", {
  55169. class: normalizeClass(_ctx.ns.e("container"))
  55170. }, [
  55171. _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
  55172. key: 0,
  55173. class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
  55174. }, {
  55175. default: withCtx(() => [
  55176. (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))
  55177. ]),
  55178. _: 1
  55179. }, 8, ["class"])) : createCommentVNode("v-if", true),
  55180. _ctx.hasMessage ? (openBlock(), createElementBlock("div", {
  55181. key: 1,
  55182. class: normalizeClass(_ctx.ns.e("message"))
  55183. }, [
  55184. renderSlot(_ctx.$slots, "default", {}, () => [
  55185. !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
  55186. key: 0,
  55187. for: _ctx.showInput ? _ctx.inputId : void 0
  55188. }, {
  55189. default: withCtx(() => [
  55190. createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : ""), 1)
  55191. ]),
  55192. _: 1
  55193. }, 8, ["for"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
  55194. key: 1,
  55195. for: _ctx.showInput ? _ctx.inputId : void 0,
  55196. innerHTML: _ctx.message
  55197. }, null, 8, ["for", "innerHTML"]))
  55198. ])
  55199. ], 2)) : createCommentVNode("v-if", true)
  55200. ], 2),
  55201. withDirectives(createBaseVNode("div", {
  55202. class: normalizeClass(_ctx.ns.e("input"))
  55203. }, [
  55204. createVNode(_component_el_input, {
  55205. id: _ctx.inputId,
  55206. ref: "inputRef",
  55207. modelValue: _ctx.inputValue,
  55208. "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
  55209. type: _ctx.inputType,
  55210. placeholder: _ctx.inputPlaceholder,
  55211. "aria-invalid": _ctx.validateError,
  55212. class: normalizeClass({ invalid: _ctx.validateError }),
  55213. onKeydown: withKeys(_ctx.handleInputEnter, ["enter"])
  55214. }, null, 8, ["id", "modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
  55215. createBaseVNode("div", {
  55216. class: normalizeClass(_ctx.ns.e("errormsg")),
  55217. style: normalizeStyle({
  55218. visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden"
  55219. })
  55220. }, toDisplayString(_ctx.editorErrorMessage), 7)
  55221. ], 2), [
  55222. [vShow, _ctx.showInput]
  55223. ])
  55224. ], 10, _hoisted_320),
  55225. createBaseVNode("div", {
  55226. class: normalizeClass(_ctx.ns.e("btns"))
  55227. }, [
  55228. _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
  55229. key: 0,
  55230. loading: _ctx.cancelButtonLoading,
  55231. class: normalizeClass([_ctx.cancelButtonClass]),
  55232. round: _ctx.roundButton,
  55233. size: _ctx.btnSize,
  55234. onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
  55235. onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
  55236. }, {
  55237. default: withCtx(() => [
  55238. createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)
  55239. ]),
  55240. _: 1
  55241. }, 8, ["loading", "class", "round", "size"])) : createCommentVNode("v-if", true),
  55242. withDirectives(createVNode(_component_el_button, {
  55243. ref: "confirmRef",
  55244. type: "primary",
  55245. loading: _ctx.confirmButtonLoading,
  55246. class: normalizeClass([_ctx.confirmButtonClasses]),
  55247. round: _ctx.roundButton,
  55248. disabled: _ctx.confirmButtonDisabled,
  55249. size: _ctx.btnSize,
  55250. onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
  55251. onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
  55252. }, {
  55253. default: withCtx(() => [
  55254. createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)
  55255. ]),
  55256. _: 1
  55257. }, 8, ["loading", "class", "round", "disabled", "size"]), [
  55258. [vShow, _ctx.showConfirmButton]
  55259. ])
  55260. ], 2)
  55261. ], 6)
  55262. ]),
  55263. _: 3
  55264. }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
  55265. ], 42, _hoisted_171)
  55266. ]),
  55267. _: 3
  55268. }, 8, ["z-index", "overlay-class", "mask"]), [
  55269. [vShow, _ctx.visible]
  55270. ])
  55271. ]),
  55272. _: 3
  55273. });
  55274. }
  55275. var MessageBoxConstructor = _export_sfc(_sfc_main145, [["render", _sfc_render35], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);
  55276. // node_modules/element-plus/es/components/message-box/src/messageBox.mjs
  55277. var messageInstance = /* @__PURE__ */ new Map();
  55278. var getAppendToElement = (props) => {
  55279. let appendTo = document.body;
  55280. if (props.appendTo) {
  55281. if (isString(props.appendTo)) {
  55282. appendTo = document.querySelector(props.appendTo);
  55283. }
  55284. if (isElement2(props.appendTo)) {
  55285. appendTo = props.appendTo;
  55286. }
  55287. if (!isElement2(appendTo)) {
  55288. debugWarn("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  55289. appendTo = document.body;
  55290. }
  55291. }
  55292. return appendTo;
  55293. };
  55294. var initInstance = (props, container, appContext = null) => {
  55295. const vnode = createVNode(MessageBoxConstructor, props, isFunction(props.message) || isVNode(props.message) ? {
  55296. default: isFunction(props.message) ? props.message : () => props.message
  55297. } : null);
  55298. vnode.appContext = appContext;
  55299. render(vnode, container);
  55300. getAppendToElement(props).appendChild(container.firstElementChild);
  55301. return vnode.component;
  55302. };
  55303. var genContainer = () => {
  55304. return document.createElement("div");
  55305. };
  55306. var showMessage = (options, appContext) => {
  55307. const container = genContainer();
  55308. options.onVanish = () => {
  55309. render(null, container);
  55310. messageInstance.delete(vm);
  55311. };
  55312. options.onAction = (action) => {
  55313. const currentMsg = messageInstance.get(vm);
  55314. let resolve;
  55315. if (options.showInput) {
  55316. resolve = { value: vm.inputValue, action };
  55317. } else {
  55318. resolve = action;
  55319. }
  55320. if (options.callback) {
  55321. options.callback(resolve, instance.proxy);
  55322. } else {
  55323. if (action === "cancel" || action === "close") {
  55324. if (options.distinguishCancelAndClose && action !== "cancel") {
  55325. currentMsg.reject("close");
  55326. } else {
  55327. currentMsg.reject("cancel");
  55328. }
  55329. } else {
  55330. currentMsg.resolve(resolve);
  55331. }
  55332. }
  55333. };
  55334. const instance = initInstance(options, container, appContext);
  55335. const vm = instance.proxy;
  55336. for (const prop in options) {
  55337. if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {
  55338. vm[prop] = options[prop];
  55339. }
  55340. }
  55341. vm.visible = true;
  55342. return vm;
  55343. };
  55344. function MessageBox(options, appContext = null) {
  55345. if (!isClient)
  55346. return Promise.reject();
  55347. let callback;
  55348. if (isString(options) || isVNode(options)) {
  55349. options = {
  55350. message: options
  55351. };
  55352. } else {
  55353. callback = options.callback;
  55354. }
  55355. return new Promise((resolve, reject2) => {
  55356. const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);
  55357. messageInstance.set(vm, {
  55358. options,
  55359. callback,
  55360. resolve,
  55361. reject: reject2
  55362. });
  55363. });
  55364. }
  55365. var MESSAGE_BOX_VARIANTS = ["alert", "confirm", "prompt"];
  55366. var MESSAGE_BOX_DEFAULT_OPTS = {
  55367. alert: { closeOnPressEscape: false, closeOnClickModal: false },
  55368. confirm: { showCancelButton: true },
  55369. prompt: { showCancelButton: true, showInput: true }
  55370. };
  55371. MESSAGE_BOX_VARIANTS.forEach((boxType) => {
  55372. ;
  55373. MessageBox[boxType] = messageBoxFactory(boxType);
  55374. });
  55375. function messageBoxFactory(boxType) {
  55376. return (message2, title, options, appContext) => {
  55377. let titleOrOpts = "";
  55378. if (isObject(title)) {
  55379. options = title;
  55380. titleOrOpts = "";
  55381. } else if (isUndefined2(title)) {
  55382. titleOrOpts = "";
  55383. } else {
  55384. titleOrOpts = title;
  55385. }
  55386. return MessageBox(Object.assign({
  55387. title: titleOrOpts,
  55388. message: message2,
  55389. type: "",
  55390. ...MESSAGE_BOX_DEFAULT_OPTS[boxType]
  55391. }, options, {
  55392. boxType
  55393. }), appContext);
  55394. };
  55395. }
  55396. MessageBox.close = () => {
  55397. messageInstance.forEach((_2, vm) => {
  55398. vm.doClose();
  55399. });
  55400. messageInstance.clear();
  55401. };
  55402. MessageBox._context = null;
  55403. // node_modules/element-plus/es/components/message-box/index.mjs
  55404. var _MessageBox = MessageBox;
  55405. _MessageBox.install = (app) => {
  55406. _MessageBox._context = app._context;
  55407. app.config.globalProperties.$msgbox = _MessageBox;
  55408. app.config.globalProperties.$messageBox = _MessageBox;
  55409. app.config.globalProperties.$alert = _MessageBox.alert;
  55410. app.config.globalProperties.$confirm = _MessageBox.confirm;
  55411. app.config.globalProperties.$prompt = _MessageBox.prompt;
  55412. };
  55413. var ElMessageBox = _MessageBox;
  55414. // node_modules/element-plus/es/components/notification/src/notification.mjs
  55415. var notificationTypes = [
  55416. "success",
  55417. "info",
  55418. "warning",
  55419. "error"
  55420. ];
  55421. var notificationProps = buildProps({
  55422. customClass: {
  55423. type: String,
  55424. default: ""
  55425. },
  55426. dangerouslyUseHTMLString: {
  55427. type: Boolean,
  55428. default: false
  55429. },
  55430. duration: {
  55431. type: Number,
  55432. default: 4500
  55433. },
  55434. icon: {
  55435. type: iconPropType
  55436. },
  55437. id: {
  55438. type: String,
  55439. default: ""
  55440. },
  55441. message: {
  55442. type: definePropType([String, Object]),
  55443. default: ""
  55444. },
  55445. offset: {
  55446. type: Number,
  55447. default: 0
  55448. },
  55449. onClick: {
  55450. type: definePropType(Function),
  55451. default: () => void 0
  55452. },
  55453. onClose: {
  55454. type: definePropType(Function),
  55455. required: true
  55456. },
  55457. position: {
  55458. type: String,
  55459. values: ["top-right", "top-left", "bottom-right", "bottom-left"],
  55460. default: "top-right"
  55461. },
  55462. showClose: {
  55463. type: Boolean,
  55464. default: true
  55465. },
  55466. title: {
  55467. type: String,
  55468. default: ""
  55469. },
  55470. type: {
  55471. type: String,
  55472. values: [...notificationTypes, ""],
  55473. default: ""
  55474. },
  55475. zIndex: {
  55476. type: Number,
  55477. default: 0
  55478. }
  55479. });
  55480. var notificationEmits = {
  55481. destroy: () => true
  55482. };
  55483. // node_modules/element-plus/es/components/notification/src/notification2.mjs
  55484. var _hoisted_173 = ["id"];
  55485. var _hoisted_245 = ["textContent"];
  55486. var _hoisted_321 = { key: 0 };
  55487. var _hoisted_412 = ["innerHTML"];
  55488. var __default__99 = defineComponent({
  55489. name: "ElNotification"
  55490. });
  55491. var _sfc_main146 = defineComponent({
  55492. ...__default__99,
  55493. props: notificationProps,
  55494. emits: notificationEmits,
  55495. setup(__props, { expose }) {
  55496. const props = __props;
  55497. const ns2 = useNamespace("notification");
  55498. const { Close } = CloseComponents;
  55499. const visible = ref(false);
  55500. let timer = void 0;
  55501. const typeClass = computed2(() => {
  55502. const type4 = props.type;
  55503. return type4 && TypeComponentsMap[props.type] ? ns2.m(type4) : "";
  55504. });
  55505. const iconComponent = computed2(() => {
  55506. if (!props.type)
  55507. return props.icon;
  55508. return TypeComponentsMap[props.type] || props.icon;
  55509. });
  55510. const horizontalClass = computed2(() => props.position.endsWith("right") ? "right" : "left");
  55511. const verticalProperty = computed2(() => props.position.startsWith("top") ? "top" : "bottom");
  55512. const positionStyle = computed2(() => {
  55513. return {
  55514. [verticalProperty.value]: `${props.offset}px`,
  55515. zIndex: props.zIndex
  55516. };
  55517. });
  55518. function startTimer() {
  55519. if (props.duration > 0) {
  55520. ;
  55521. ({ stop: timer } = useTimeoutFn(() => {
  55522. if (visible.value)
  55523. close2();
  55524. }, props.duration));
  55525. }
  55526. }
  55527. function clearTimer() {
  55528. timer == null ? void 0 : timer();
  55529. }
  55530. function close2() {
  55531. visible.value = false;
  55532. }
  55533. function onKeydown({ code }) {
  55534. if (code === EVENT_CODE.delete || code === EVENT_CODE.backspace) {
  55535. clearTimer();
  55536. } else if (code === EVENT_CODE.esc) {
  55537. if (visible.value) {
  55538. close2();
  55539. }
  55540. } else {
  55541. startTimer();
  55542. }
  55543. }
  55544. onMounted(() => {
  55545. startTimer();
  55546. visible.value = true;
  55547. });
  55548. useEventListener(document, "keydown", onKeydown);
  55549. expose({
  55550. visible,
  55551. close: close2
  55552. });
  55553. return (_ctx, _cache) => {
  55554. return openBlock(), createBlock(Transition, {
  55555. name: unref(ns2).b("fade"),
  55556. onBeforeLeave: _ctx.onClose,
  55557. onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
  55558. persisted: ""
  55559. }, {
  55560. default: withCtx(() => [
  55561. withDirectives(createBaseVNode("div", {
  55562. id: _ctx.id,
  55563. class: normalizeClass([unref(ns2).b(), _ctx.customClass, unref(horizontalClass)]),
  55564. style: normalizeStyle(unref(positionStyle)),
  55565. role: "alert",
  55566. onMouseenter: clearTimer,
  55567. onMouseleave: startTimer,
  55568. onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
  55569. }, [
  55570. unref(iconComponent) ? (openBlock(), createBlock(unref(ElIcon), {
  55571. key: 0,
  55572. class: normalizeClass([unref(ns2).e("icon"), unref(typeClass)])
  55573. }, {
  55574. default: withCtx(() => [
  55575. (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
  55576. ]),
  55577. _: 1
  55578. }, 8, ["class"])) : createCommentVNode("v-if", true),
  55579. createBaseVNode("div", {
  55580. class: normalizeClass(unref(ns2).e("group"))
  55581. }, [
  55582. createBaseVNode("h2", {
  55583. class: normalizeClass(unref(ns2).e("title")),
  55584. textContent: toDisplayString(_ctx.title)
  55585. }, null, 10, _hoisted_245),
  55586. withDirectives(createBaseVNode("div", {
  55587. class: normalizeClass(unref(ns2).e("content")),
  55588. style: normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
  55589. }, [
  55590. renderSlot(_ctx.$slots, "default", {}, () => [
  55591. !_ctx.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_321, toDisplayString(_ctx.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
  55592. createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
  55593. createBaseVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_412)
  55594. ], 2112))
  55595. ])
  55596. ], 6), [
  55597. [vShow, _ctx.message]
  55598. ]),
  55599. _ctx.showClose ? (openBlock(), createBlock(unref(ElIcon), {
  55600. key: 0,
  55601. class: normalizeClass(unref(ns2).e("closeBtn")),
  55602. onClick: withModifiers(close2, ["stop"])
  55603. }, {
  55604. default: withCtx(() => [
  55605. createVNode(unref(Close))
  55606. ]),
  55607. _: 1
  55608. }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
  55609. ], 2)
  55610. ], 46, _hoisted_173), [
  55611. [vShow, visible.value]
  55612. ])
  55613. ]),
  55614. _: 3
  55615. }, 8, ["name", "onBeforeLeave"]);
  55616. };
  55617. }
  55618. });
  55619. var NotificationConstructor = _export_sfc(_sfc_main146, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);
  55620. // node_modules/element-plus/es/components/notification/src/notify.mjs
  55621. var notifications = {
  55622. "top-left": [],
  55623. "top-right": [],
  55624. "bottom-left": [],
  55625. "bottom-right": []
  55626. };
  55627. var GAP_SIZE = 16;
  55628. var seed2 = 1;
  55629. var notify = function(options = {}, context = null) {
  55630. if (!isClient)
  55631. return { close: () => void 0 };
  55632. if (typeof options === "string" || isVNode(options)) {
  55633. options = { message: options };
  55634. }
  55635. const position = options.position || "top-right";
  55636. let verticalOffset = options.offset || 0;
  55637. notifications[position].forEach(({ vm: vm2 }) => {
  55638. var _a2;
  55639. verticalOffset += (((_a2 = vm2.el) == null ? void 0 : _a2.offsetHeight) || 0) + GAP_SIZE;
  55640. });
  55641. verticalOffset += GAP_SIZE;
  55642. const { nextZIndex } = useZIndex();
  55643. const id2 = `notification_${seed2++}`;
  55644. const userOnClose = options.onClose;
  55645. const props = {
  55646. zIndex: nextZIndex(),
  55647. ...options,
  55648. offset: verticalOffset,
  55649. id: id2,
  55650. onClose: () => {
  55651. close(id2, position, userOnClose);
  55652. }
  55653. };
  55654. let appendTo = document.body;
  55655. if (isElement2(options.appendTo)) {
  55656. appendTo = options.appendTo;
  55657. } else if (isString(options.appendTo)) {
  55658. appendTo = document.querySelector(options.appendTo);
  55659. }
  55660. if (!isElement2(appendTo)) {
  55661. debugWarn("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body.");
  55662. appendTo = document.body;
  55663. }
  55664. const container = document.createElement("div");
  55665. const vm = createVNode(NotificationConstructor, props, isVNode(props.message) ? {
  55666. default: () => props.message
  55667. } : null);
  55668. vm.appContext = context != null ? context : notify._context;
  55669. vm.props.onDestroy = () => {
  55670. render(null, container);
  55671. };
  55672. render(vm, container);
  55673. notifications[position].push({ vm });
  55674. appendTo.appendChild(container.firstElementChild);
  55675. return {
  55676. close: () => {
  55677. ;
  55678. vm.component.exposed.visible.value = false;
  55679. }
  55680. };
  55681. };
  55682. notificationTypes.forEach((type4) => {
  55683. notify[type4] = (options = {}) => {
  55684. if (typeof options === "string" || isVNode(options)) {
  55685. options = {
  55686. message: options
  55687. };
  55688. }
  55689. return notify({
  55690. ...options,
  55691. type: type4
  55692. });
  55693. };
  55694. });
  55695. function close(id2, position, userOnClose) {
  55696. const orientedNotifications = notifications[position];
  55697. const idx = orientedNotifications.findIndex(({ vm: vm2 }) => {
  55698. var _a2;
  55699. return ((_a2 = vm2.component) == null ? void 0 : _a2.props.id) === id2;
  55700. });
  55701. if (idx === -1)
  55702. return;
  55703. const { vm } = orientedNotifications[idx];
  55704. if (!vm)
  55705. return;
  55706. userOnClose == null ? void 0 : userOnClose(vm);
  55707. const removedHeight = vm.el.offsetHeight;
  55708. const verticalPos = position.split("-")[0];
  55709. orientedNotifications.splice(idx, 1);
  55710. const len = orientedNotifications.length;
  55711. if (len < 1)
  55712. return;
  55713. for (let i = idx; i < len; i++) {
  55714. const { el, component: component2 } = orientedNotifications[i].vm;
  55715. const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE;
  55716. component2.props.offset = pos;
  55717. }
  55718. }
  55719. function closeAll2() {
  55720. for (const orientedNotifications of Object.values(notifications)) {
  55721. orientedNotifications.forEach(({ vm }) => {
  55722. ;
  55723. vm.component.exposed.visible.value = false;
  55724. });
  55725. }
  55726. }
  55727. notify.closeAll = closeAll2;
  55728. notify._context = null;
  55729. // node_modules/element-plus/es/components/notification/index.mjs
  55730. var ElNotification = withInstallFunction(notify, "$notify");
  55731. // node_modules/element-plus/es/plugin.mjs
  55732. var Plugins = [
  55733. ElInfiniteScroll,
  55734. ElLoading,
  55735. ElMessage,
  55736. ElMessageBox,
  55737. ElNotification,
  55738. ElPopoverDirective
  55739. ];
  55740. // node_modules/element-plus/es/defaults.mjs
  55741. var installer = makeInstaller([...Components, ...Plugins]);
  55742. // node_modules/element-plus/es/index.mjs
  55743. var import_dayjs17 = __toESM(require_dayjs_min(), 1);
  55744. var install = installer.install;
  55745. var version3 = installer.version;
  55746. // dep:element-plus
  55747. var element_plus_default = installer;
  55748. var export_dayjs = import_dayjs17.default;
  55749. export {
  55750. BAR_MAP,
  55751. CASCADER_PANEL_INJECTION_KEY,
  55752. CHANGE_EVENT,
  55753. ClickOutside,
  55754. CommonPicker,
  55755. CommonProps,
  55756. DEFAULT_FORMATS_DATE,
  55757. DEFAULT_FORMATS_DATEPICKER,
  55758. DEFAULT_FORMATS_TIME,
  55759. COLLECTION_INJECTION_KEY2 as DROPDOWN_COLLECTION_INJECTION_KEY,
  55760. COLLECTION_ITEM_INJECTION_KEY2 as DROPDOWN_COLLECTION_ITEM_INJECTION_KEY,
  55761. DROPDOWN_INJECTION_KEY,
  55762. DefaultProps,
  55763. DynamicSizeGrid,
  55764. DynamicSizeList,
  55765. EVENT_CODE,
  55766. Effect,
  55767. ElAffix,
  55768. ElAlert,
  55769. ElAside,
  55770. ElAutoResizer,
  55771. ElAutocomplete,
  55772. ElAvatar,
  55773. ElBacktop,
  55774. ElBadge,
  55775. ElBreadcrumb,
  55776. ElBreadcrumbItem,
  55777. ElButton,
  55778. ElButtonGroup,
  55779. ElCalendar,
  55780. ElCard,
  55781. ElCarousel,
  55782. ElCarouselItem,
  55783. ElCascader,
  55784. ElCascaderPanel,
  55785. ElCheckTag,
  55786. ElCheckbox,
  55787. ElCheckboxButton,
  55788. ElCheckboxGroup,
  55789. ElCol,
  55790. ElCollapse,
  55791. ElCollapseItem,
  55792. ElCollapseTransition,
  55793. ElCollection2 as ElCollection,
  55794. ElCollectionItem2 as ElCollectionItem,
  55795. ElColorPicker,
  55796. ElConfigProvider,
  55797. ElContainer,
  55798. ElCountdown,
  55799. ElDatePicker,
  55800. ElDescriptions,
  55801. ElDescriptionsItem,
  55802. ElDialog,
  55803. ElDivider,
  55804. ElDrawer,
  55805. ElDropdown,
  55806. ElDropdownItem,
  55807. ElDropdownMenu,
  55808. ElEmpty,
  55809. ElFooter,
  55810. ElForm,
  55811. ElFormItem,
  55812. ElHeader,
  55813. ElIcon,
  55814. ElImage,
  55815. ElImageViewer,
  55816. ElInfiniteScroll,
  55817. ElInput,
  55818. ElInputNumber,
  55819. ElLink,
  55820. ElLoading,
  55821. vLoading as ElLoadingDirective,
  55822. Loading as ElLoadingService,
  55823. ElMain,
  55824. ElMenu,
  55825. ElMenuItem,
  55826. ElMenuItemGroup,
  55827. ElMessage,
  55828. ElMessageBox,
  55829. ElNotification,
  55830. ElOption,
  55831. ElOptionGroup,
  55832. ElOverlay,
  55833. ElPageHeader,
  55834. ElPagination,
  55835. ElPopconfirm,
  55836. ElPopover,
  55837. ElPopoverDirective,
  55838. ElPopper,
  55839. ElPopperArrow,
  55840. ElPopperContent,
  55841. ElPopperTrigger,
  55842. ElProgress,
  55843. ElRadio,
  55844. ElRadioButton,
  55845. ElRadioGroup,
  55846. ElRate,
  55847. ElResult,
  55848. ElRow,
  55849. ElScrollbar,
  55850. ElSelect,
  55851. ElSelectV2,
  55852. ElSkeleton,
  55853. ElSkeletonItem,
  55854. ElSlider,
  55855. ElSpace,
  55856. ElStatistic,
  55857. ElStep,
  55858. ElSteps,
  55859. ElSubMenu,
  55860. ElSwitch,
  55861. ElTabPane,
  55862. ElTable,
  55863. ElTableColumn2 as ElTableColumn,
  55864. ElTableV2,
  55865. ElTabs,
  55866. ElTag,
  55867. ElTimePicker,
  55868. ElTimeSelect,
  55869. ElTimeline,
  55870. ElTimelineItem,
  55871. ElTooltip,
  55872. ElTransfer,
  55873. ElTree,
  55874. ElTreeSelect,
  55875. ElTreeV2,
  55876. ElUpload,
  55877. FIRST_KEYS,
  55878. FIRST_LAST_KEYS,
  55879. FORWARD_REF_INJECTION_KEY,
  55880. FixedSizeGrid,
  55881. FixedSizeList,
  55882. GAP,
  55883. ID_INJECTION_KEY,
  55884. INPUT_EVENT,
  55885. INSTALLED_KEY,
  55886. IconComponentMap,
  55887. IconMap,
  55888. LAST_KEYS,
  55889. LEFT_CHECK_CHANGE_EVENT,
  55890. Mousewheel,
  55891. POPPER_CONTENT_INJECTION_KEY,
  55892. POPPER_INJECTION_KEY,
  55893. RIGHT_CHECK_CHANGE_EVENT,
  55894. ROOT_PICKER_INJECTION_KEY,
  55895. RowAlign,
  55896. RowJustify,
  55897. TOOLTIP_INJECTION_KEY,
  55898. TOOLTIP_V2_OPEN,
  55899. TableV2,
  55900. Alignment as TableV2Alignment,
  55901. FixedDir as TableV2FixedDir,
  55902. placeholderSign as TableV2Placeholder,
  55903. SortOrder as TableV2SortOrder,
  55904. TimePickPanel,
  55905. TrapFocus,
  55906. UPDATE_MODEL_EVENT,
  55907. WEEK_DAYS,
  55908. affixEmits,
  55909. affixProps,
  55910. alertEffects,
  55911. alertEmits,
  55912. alertProps,
  55913. arrowMiddleware,
  55914. autoResizerProps,
  55915. autocompleteEmits,
  55916. autocompleteProps,
  55917. avatarEmits,
  55918. avatarProps,
  55919. backtopEmits,
  55920. backtopProps,
  55921. badgeProps,
  55922. breadcrumbItemProps,
  55923. breadcrumbKey,
  55924. breadcrumbProps,
  55925. buildLocaleContext,
  55926. buildTimeList,
  55927. buildTranslator,
  55928. buttonEmits,
  55929. buttonGroupContextKey,
  55930. buttonNativeTypes,
  55931. buttonProps,
  55932. buttonTypes,
  55933. calendarEmits,
  55934. calendarProps,
  55935. cardProps,
  55936. carouselContextKey,
  55937. carouselEmits,
  55938. carouselItemProps,
  55939. carouselProps,
  55940. checkTagEmits,
  55941. checkTagProps,
  55942. checkboxEmits,
  55943. checkboxGroupContextKey,
  55944. checkboxGroupEmits,
  55945. checkboxGroupProps,
  55946. checkboxProps,
  55947. colProps,
  55948. collapseContextKey,
  55949. collapseEmits,
  55950. collapseItemProps,
  55951. collapseProps,
  55952. colorPickerContextKey,
  55953. colorPickerEmits,
  55954. colorPickerProps,
  55955. componentSizeMap,
  55956. componentSizes,
  55957. configProviderContextKey,
  55958. configProviderProps,
  55959. countdownEmits,
  55960. countdownProps,
  55961. createModelToggleComposable,
  55962. dateEquals,
  55963. datePickTypes,
  55964. export_dayjs as dayjs,
  55965. element_plus_default as default,
  55966. defaultNamespace,
  55967. descriptionProps,
  55968. dialogEmits,
  55969. dialogInjectionKey,
  55970. dialogProps,
  55971. dividerProps,
  55972. drawerEmits,
  55973. drawerProps,
  55974. dropdownItemProps,
  55975. dropdownMenuProps,
  55976. dropdownProps,
  55977. elPaginationKey,
  55978. emitChangeFn,
  55979. emptyProps,
  55980. extractDateFormat,
  55981. extractTimeFormat,
  55982. formContextKey,
  55983. formEmits,
  55984. formItemContextKey,
  55985. formItemProps,
  55986. formItemValidateStates,
  55987. formProps,
  55988. formatter,
  55989. genFileId,
  55990. getPositionDataWithUnit,
  55991. iconProps,
  55992. imageEmits,
  55993. imageProps,
  55994. imageViewerEmits,
  55995. imageViewerProps,
  55996. inputEmits,
  55997. inputNumberEmits,
  55998. inputNumberProps,
  55999. inputProps,
  56000. install,
  56001. linkEmits,
  56002. linkProps,
  56003. makeInstaller,
  56004. makeList,
  56005. menuEmits,
  56006. menuItemEmits,
  56007. menuItemGroupProps,
  56008. menuItemProps,
  56009. menuProps,
  56010. messageConfig,
  56011. messageDefaults,
  56012. messageEmits,
  56013. messageProps,
  56014. messageTypes,
  56015. notificationEmits,
  56016. notificationProps,
  56017. notificationTypes,
  56018. overlayEmits,
  56019. overlayProps,
  56020. pageHeaderEmits,
  56021. pageHeaderProps,
  56022. paginationEmits,
  56023. paginationProps,
  56024. parseDate,
  56025. popconfirmProps,
  56026. popoverEmits,
  56027. popoverProps,
  56028. popperArrowProps,
  56029. popperContentEmits,
  56030. popperContentProps,
  56031. popperCoreConfigProps,
  56032. popperProps,
  56033. popperTriggerProps,
  56034. progressProps,
  56035. provideGlobalConfig,
  56036. radioButtonProps,
  56037. radioEmits,
  56038. radioGroupEmits,
  56039. radioGroupKey,
  56040. radioGroupProps,
  56041. radioProps,
  56042. radioPropsBase,
  56043. rangeArr,
  56044. rateEmits,
  56045. rateProps,
  56046. renderThumbStyle,
  56047. resultProps,
  56048. roleTypes,
  56049. rowContextKey,
  56050. rowProps,
  56051. scrollbarContextKey,
  56052. scrollbarEmits,
  56053. scrollbarProps,
  56054. selectGroupKey,
  56055. selectKey,
  56056. selectV2InjectionKey,
  56057. skeletonItemProps,
  56058. skeletonProps,
  56059. sliderContextKey,
  56060. sliderEmits,
  56061. sliderProps,
  56062. spaceProps,
  56063. statisticProps,
  56064. stepProps,
  56065. stepsEmits,
  56066. stepsProps,
  56067. subMenuProps,
  56068. switchEmits,
  56069. switchProps,
  56070. tabBarProps,
  56071. tabNavEmits,
  56072. tabNavProps,
  56073. tabPaneProps,
  56074. tableV2Props,
  56075. tableV2RowProps,
  56076. tabsEmits,
  56077. tabsProps,
  56078. tabsRootContextKey,
  56079. tagEmits,
  56080. tagProps,
  56081. thumbProps,
  56082. timePickerDefaultProps,
  56083. timeUnits,
  56084. timelineItemProps,
  56085. tooltipEmits,
  56086. tooltipV2ContentKey,
  56087. tooltipV2RootKey,
  56088. transferCheckedChangeFn,
  56089. transferEmits,
  56090. transferProps,
  56091. translate,
  56092. uploadBaseProps,
  56093. uploadContentProps,
  56094. uploadContextKey,
  56095. uploadDraggerEmits,
  56096. uploadDraggerProps,
  56097. uploadListEmits,
  56098. uploadListProps,
  56099. uploadListTypes,
  56100. uploadProps,
  56101. useAttrs2 as useAttrs,
  56102. useCascaderConfig,
  56103. useCursor,
  56104. useDelayedRender,
  56105. useDelayedToggle,
  56106. useDelayedToggleProps,
  56107. useDeprecated,
  56108. useDialog,
  56109. useDisabled,
  56110. useDraggable,
  56111. useEscapeKeydown,
  56112. useFloating,
  56113. useFloatingProps,
  56114. useFocus,
  56115. useFormItem,
  56116. useFormItemInputId,
  56117. useForwardRef,
  56118. useForwardRefDirective,
  56119. useGlobalConfig,
  56120. useId,
  56121. useIdInjection,
  56122. useLocale,
  56123. useLockscreen,
  56124. useModal,
  56125. useModelToggle,
  56126. useModelToggleEmits,
  56127. useModelToggleProps,
  56128. useNamespace,
  56129. useOrderedChildren,
  56130. usePopperArrowProps,
  56131. usePopperContainer,
  56132. usePopperContainerId,
  56133. usePopperContentEmits,
  56134. usePopperContentProps,
  56135. usePopperCoreConfigProps,
  56136. usePopperProps,
  56137. usePopperTriggerProps,
  56138. usePreventGlobal,
  56139. useProp,
  56140. useRestoreActive,
  56141. useSameTarget,
  56142. useSize,
  56143. useSizeProp,
  56144. useSpace,
  56145. useTeleport,
  56146. useThrottleRender,
  56147. useTimeout,
  56148. useTooltipContentProps,
  56149. useTooltipModelToggle,
  56150. useTooltipModelToggleEmits,
  56151. useTooltipModelToggleProps,
  56152. useTooltipProps,
  56153. useTooltipTriggerProps,
  56154. useTransitionFallthrough,
  56155. useTransitionFallthroughEmits,
  56156. useZIndex,
  56157. vLoading,
  56158. vRepeatClick,
  56159. valueEquals,
  56160. version3 as version,
  56161. virtualizedGridProps,
  56162. virtualizedListProps,
  56163. virtualizedProps,
  56164. virtualizedScrollbarProps
  56165. };
  56166. /*!
  56167. * escape-html
  56168. * Copyright(c) 2012-2013 TJ Holowaychuk
  56169. * Copyright(c) 2015 Andreas Lubbe
  56170. * Copyright(c) 2015 Tiancheng "Timothy" Gu
  56171. * MIT Licensed
  56172. */
  56173. /**
  56174. * @license
  56175. * Lodash (Custom Build) <https://lodash.com/>
  56176. * Build: `lodash modularize exports="es" -o ./`
  56177. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  56178. * Released under MIT license <https://lodash.com/license>
  56179. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  56180. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  56181. */
  56182. /**
  56183. * Checks if an event is supported in the current execution environment.
  56184. *
  56185. * NOTE: This will not work correctly for non-generic events such as `change`,
  56186. * `reset`, `load`, `error`, and `select`.
  56187. *
  56188. * Borrows from Modernizr.
  56189. *
  56190. * @param {string} eventNameSuffix Event name, e.g. "click".
  56191. * @param {?boolean} capture Check if the capture phase is supported.
  56192. * @return {boolean} True if the event is supported.
  56193. * @internal
  56194. * @license Modernizr 3.0.0pre (Custom Build) | MIT
  56195. */
  56196. //# sourceMappingURL=element-plus.js.map